Package org.netxms.client.server
Class AgentFile
java.lang.Object
org.netxms.client.server.AgentFile
- All Implemented Interfaces:
RemoteFile
Represents information about file on remote system accessible via agent
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGet file extension.getGroup()Get file modification time.getName()Get file name.longgetOwner()longgetSize()Get file size in bytes.intgetType()booleanCheck if this file object represents directory.booleanCheck if this file object is a placeholder (does not correspond to actual remote file).voidremoveChild(AgentFile child) voidsetAccessRights(String accessRights) voidsetChildren(List<AgentFile> children) voidsetFileInfo(AgentFileInfo info) voidvoidvoidvoid
-
Field Details
-
FILE
public static final int FILE- See Also:
-
DIRECTORY
public static final int DIRECTORY- See Also:
-
SYMBOLYC_LINK
public static final int SYMBOLYC_LINK- See Also:
-
PLACEHOLDER
public static final int PLACEHOLDER- See Also:
-
-
Constructor Details
-
AgentFile
Create server file object from NXCP message.- Parameters:
msg- NXCP messagebaseId- base variable IDparent- parent file for this filenodeId- source node of file
-
AgentFile
Constructor for AgentFile- Parameters:
name- file namefileType- file typeparent- parent file for this filenodeId- source node of file
-
AgentFile
Copy constructor for agent file- Parameters:
src- AgentFile to copy
-
-
Method Details
-
isDirectory
public boolean isDirectory()Description copied from interface:RemoteFileCheck if this file object represents directory.- Specified by:
isDirectoryin interfaceRemoteFile- Returns:
- true if this file object represents directory
- See Also:
-
isPlaceholder
public boolean isPlaceholder()Description copied from interface:RemoteFileCheck if this file object is a placeholder (does not correspond to actual remote file).- Specified by:
isPlaceholderin interfaceRemoteFile- Returns:
- true if this file object is a placeholder
- See Also:
-
getName
Description copied from interface:RemoteFileGet file name.- Specified by:
getNamein interfaceRemoteFile- Returns:
- file name
- See Also:
-
setName
- Parameters:
name- the name to set
-
getSize
public long getSize()Description copied from interface:RemoteFileGet file size in bytes.- Specified by:
getSizein interfaceRemoteFile- Returns:
- file size in bytes
- See Also:
-
getModificationTime
Description copied from interface:RemoteFileGet file modification time.- Specified by:
getModificationTimein interfaceRemoteFile- Returns:
- file modification time
- See Also:
-
getExtension
Description copied from interface:RemoteFileGet file extension.- Specified by:
getExtensionin interfaceRemoteFile- Returns:
- file extension
- See Also:
-
getChildren
- Returns:
- the children
-
setChildren
- Parameters:
children- the children to set
-
removeChild
- Parameters:
child- to be removed
-
addChild
- Parameters:
child- to be added
-
getFullName
- Returns:
- the fullName
-
getFilePath
- Returns:
- the fullName
-
getParent
- Returns:
- the parent
-
setParent
- Parameters:
parent- the parent to set
-
getNodeId
public long getNodeId()- Returns:
- the nodeId
-
getType
public int getType()- Returns:
- the type
-
getOwner
- Returns:
- the owner
-
setOwner
- Parameters:
owner- the owner to set
-
getGroup
- Returns:
- the group
-
setGroup
- Parameters:
group- the group to set
-
getAccessRights
- Returns:
- the accessRights
-
setAccessRights
- Parameters:
accessRights- the accessRights to set
-
setFileInfo
- Parameters:
info- Set agent file info
-
getFileInfo
- Returns:
- Agent File Info
-