Class AgentFile

java.lang.Object
org.netxms.client.server.AgentFile
All Implemented Interfaces:
RemoteFile

public class AgentFile extends Object implements RemoteFile
Represents information about file on remote system accessible via agent
  • Field Details

  • Constructor Details

    • AgentFile

      public AgentFile(NXCPMessage msg, long baseId, AgentFile parent, long nodeId)
      Create server file object from NXCP message.
      Parameters:
      msg - NXCP message
      baseId - base variable ID
      parent - parent file for this file
      nodeId - source node of file
    • AgentFile

      public AgentFile(String name, int fileType, AgentFile parent, long nodeId)
      Constructor for AgentFile
      Parameters:
      name - file name
      fileType - file type
      parent - parent file for this file
      nodeId - source node of file
    • AgentFile

      public AgentFile(AgentFile src)
      Copy constructor for agent file
      Parameters:
      src - AgentFile to copy
  • Method Details

    • isDirectory

      public boolean isDirectory()
      Description copied from interface: RemoteFile
      Check if this file object represents directory.
      Specified by:
      isDirectory in interface RemoteFile
      Returns:
      true if this file object represents directory
      See Also:
    • isPlaceholder

      public boolean isPlaceholder()
      Description copied from interface: RemoteFile
      Check if this file object is a placeholder (does not correspond to actual remote file).
      Specified by:
      isPlaceholder in interface RemoteFile
      Returns:
      true if this file object is a placeholder
      See Also:
    • getName

      public String getName()
      Description copied from interface: RemoteFile
      Get file name.
      Specified by:
      getName in interface RemoteFile
      Returns:
      file name
      See Also:
    • setName

      public void setName(String name)
      Parameters:
      name - the name to set
    • getSize

      public long getSize()
      Description copied from interface: RemoteFile
      Get file size in bytes.
      Specified by:
      getSize in interface RemoteFile
      Returns:
      file size in bytes
      See Also:
    • getModificationTime

      public Date getModificationTime()
      Description copied from interface: RemoteFile
      Get file modification time.
      Specified by:
      getModificationTime in interface RemoteFile
      Returns:
      file modification time
      See Also:
    • getExtension

      public String getExtension()
      Description copied from interface: RemoteFile
      Get file extension.
      Specified by:
      getExtension in interface RemoteFile
      Returns:
      file extension
      See Also:
    • getChildren

      public List<AgentFile> getChildren()
      Returns:
      the children
    • setChildren

      public void setChildren(List<AgentFile> children)
      Parameters:
      children - the children to set
    • removeChild

      public void removeChild(AgentFile child)
      Parameters:
      child - to be removed
    • addChild

      public void addChild(AgentFile child)
      Parameters:
      child - to be added
    • getFullName

      public String getFullName()
      Returns:
      the fullName
    • getFilePath

      public String getFilePath()
      Returns:
      the fullName
    • getParent

      public AgentFile getParent()
      Returns:
      the parent
    • setParent

      public void setParent(AgentFile parent)
      Parameters:
      parent - the parent to set
    • getNodeId

      public long getNodeId()
      Returns:
      the nodeId
    • getType

      public int getType()
      Returns:
      the type
    • getOwner

      public String getOwner()
      Returns:
      the owner
    • setOwner

      public void setOwner(String owner)
      Parameters:
      owner - the owner to set
    • getGroup

      public String getGroup()
      Returns:
      the group
    • setGroup

      public void setGroup(String group)
      Parameters:
      group - the group to set
    • getAccessRights

      public String getAccessRights()
      Returns:
      the accessRights
    • setAccessRights

      public void setAccessRights(String accessRights)
      Parameters:
      accessRights - the accessRights to set
    • setFileInfo

      public void setFileInfo(AgentFileInfo info)
      Parameters:
      info - Set agent file info
    • getFileInfo

      public AgentFileInfo getFileInfo()
      Returns:
      Agent File Info