Class FolderNode
- java.lang.Object
-
- com.saperion.ngc.model.navigation.FolderNode
-
- All Implemented Interfaces:
NavigationItem
,NavigationNode
,java.io.Serializable
public class FolderNode extends java.lang.Object implements NavigationNode
Folder nodes class.- Author:
- mak
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FolderNode(NavigationItem parentItem, DocumentDatabaseMetaInfo info, com.saperion.rmi.SaACLRights access, FolderClass folderClass)
Constructor.FolderNode(NavigationItem parentItem, java.lang.String folderName, java.lang.String folderPath, com.saperion.constants.SaFolderConstants.FOLDER_TYPE nodeType, FolderClass folderClass)
Constructor.FolderNode(NavigationItem parentItem, java.lang.String folderName, java.lang.String folderPath, com.saperion.constants.SaFolderConstants.FOLDER_TYPE nodeType, WorkflowNodeInfo wfInfo)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canAddFolder()
boolean
canDelete()
boolean
canMove()
boolean
canPermissions()
boolean
canRename()
boolean
equals(java.lang.Object obj)
java.io.InputStream
getContent()
Returns the content stream, it will be loaded on demand.java.lang.String
getDisplayName()
Returns the node/folder name to display on frontend.long
getDocCount()
FolderClass
getFolderClass()
Returns the folder class.FolderId
getId()
Returns the node/folder identifier.java.lang.String
getIndexFormName()
Returns the index form name.java.lang.String
getLinkFolder()
Returns the link folder id.NavigationNode
getLinkingNode()
java.lang.String
getLinkTable()
Returns the link table.java.lang.String
getMaskDDCName()
Returns the mask ddc name.java.lang.String
getName()
java.util.List<NavigationNode>
getNodes()
NavigationItem
getParent()
Returns the parent navigation item (node or tree).java.lang.String
getPath()
java.util.Map<java.lang.String,java.lang.String>
getProperties()
Returns the properties of the folder.java.lang.String
getQuery()
java.lang.String
getQueryFormName()
Returns the query form name.com.saperion.constants.SaFolderConstants.FOLDER_TYPE
getType()
Returns folder type.long
getUnreadCount()
FolderUploadInfos
getUploadInfos()
java.lang.String
getViewElementId()
Returns the ID of the associated ZK view element.WorkflowNodeInfo
getWorkflowInfo()
int
hashCode()
boolean
isInPrivateSubtree()
Checks if the node is located within a private-subtree of the navigation tree.boolean
isLinked()
void
remove(NavigationNode node)
Removes the given child node.void
setContent(java.io.InputStream contentStream)
Sets the content stream.void
setDocCount(int count)
Sets the number of documents enclosed by this folder.void
setId(FolderId id)
Sets the ID of this node.void
setLinkingNode(NavigationNode linking)
Sets the node that is linking to this node.void
setName(java.lang.String name)
Sets the node name.void
setParent(NavigationItem parentItem)
Sets a new parent to a Node.void
setUnreadCount(long count)
Sets the number of unread documents enclosed by this folder.void
setViewElementId(java.lang.String elementId)
Sets the ID of the associated ZK view element.void
setWorkflowInfo(WorkflowNodeInfo info)
-
-
-
Constructor Detail
-
FolderNode
public FolderNode(NavigationItem parentItem, java.lang.String folderName, java.lang.String folderPath, com.saperion.constants.SaFolderConstants.FOLDER_TYPE nodeType, FolderClass folderClass)
Constructor.- Parameters:
parentItem
- Parent itemfolderName
- Folder namefolderPath
- Folder pathnodeType
- node typefolderClass
- folderClass
-
FolderNode
public FolderNode(NavigationItem parentItem, java.lang.String folderName, java.lang.String folderPath, com.saperion.constants.SaFolderConstants.FOLDER_TYPE nodeType, WorkflowNodeInfo wfInfo)
Constructor.- Parameters:
parentItem
- Parent itemfolderName
- Folder namenodeType
- node typefolderPath
- folder pathwfInfo
- Workflow info
-
FolderNode
public FolderNode(NavigationItem parentItem, DocumentDatabaseMetaInfo info, com.saperion.rmi.SaACLRights access, FolderClass folderClass) throws SystemException, AuthenticationException, UnknownFolderTypeException
Constructor.- Parameters:
parentItem
- parentinfo
- Document infoaccess
- Access datafolderClass
- folder class for this folder- Throws:
AuthenticationException
- authentication exception when reading propertiesSystemException
- system exception when reading propertiesUnknownFolderTypeException
- when the type of the folder is unknown
-
-
Method Detail
-
getNodes
public java.util.List<NavigationNode> getNodes()
- Specified by:
getNodes
in interfaceNavigationItem
- Returns:
- Nodes
- See Also:
NavigationItem.getNodes()
-
getParent
public NavigationItem getParent()
Returns the parent navigation item (node or tree).- Specified by:
getParent
in interfaceNavigationNode
- Returns:
NavigationItem
- See Also:
NavigationNode.getParent()
-
setParent
public void setParent(NavigationItem parentItem)
Sets a new parent to a Node.- Specified by:
setParent
in interfaceNavigationNode
- Parameters:
parentItem
- The new parentItem.- See Also:
(com.saperion.ngc.model.navigation.intf.NavigationItem)
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceNavigationItem
- Returns:
- Name
- See Also:
NavigationItem.getName()
-
getQuery
public java.lang.String getQuery()
- Specified by:
getQuery
in interfaceNavigationItem
- Returns:
- Query string
- See Also:
NavigationItem.getQuery()
-
getViewElementId
public java.lang.String getViewElementId()
Returns the ID of the associated ZK view element.- Specified by:
getViewElementId
in interfaceNavigationItem
- Returns:
- view element id
- See Also:
NavigationItem.getViewElementId()
-
setViewElementId
public void setViewElementId(java.lang.String elementId)
Sets the ID of the associated ZK view element.- Specified by:
setViewElementId
in interfaceNavigationItem
- Parameters:
elementId
- element id- See Also:
NavigationItem.setViewElementId(java.lang.String)
-
getId
public FolderId getId()
Returns the node/folder identifier.- Specified by:
getId
in interfaceNavigationNode
- Returns:
- the navigation node's id
- See Also:
NavigationNode.getId()
-
getType
public com.saperion.constants.SaFolderConstants.FOLDER_TYPE getType()
Returns folder type.- Specified by:
getType
in interfaceNavigationNode
- Returns:
- folder type
- See Also:
NavigationNode.getType()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
remove
public void remove(NavigationNode node)
Removes the given child node.- Specified by:
remove
in interfaceNavigationItem
- Parameters:
node
- child node- See Also:
#remove(com.saperion.ngc.model.navigation.intf.NavigationNode)
-
setId
public void setId(FolderId id)
Sets the ID of this node.- Specified by:
setId
in interfaceNavigationNode
- Parameters:
id
- node id- See Also:
NavigationNode.setId(com.saperion.ngc.model.FolderId)
-
setName
public void setName(java.lang.String name)
Sets the node name.- Specified by:
setName
in interfaceNavigationNode
- Parameters:
name
- Name- See Also:
NavigationNode.setName(java.lang.String)
-
getDisplayName
public java.lang.String getDisplayName()
Returns the node/folder name to display on frontend.- Specified by:
getDisplayName
in interfaceNavigationNode
- Returns:
- the node display name
- See Also:
NavigationNode.getDisplayName()
-
getIndexFormName
public java.lang.String getIndexFormName()
Returns the index form name.- Specified by:
getIndexFormName
in interfaceNavigationNode
- Returns:
- the index form name
- See Also:
NavigationNode.getIndexFormName()
-
getQueryFormName
public java.lang.String getQueryFormName()
Returns the query form name.- Specified by:
getQueryFormName
in interfaceNavigationNode
- Returns:
- the query form name
- See Also:
NavigationNode.getQueryFormName()
-
getMaskDDCName
public java.lang.String getMaskDDCName()
Returns the mask ddc name.- Specified by:
getMaskDDCName
in interfaceNavigationNode
- Returns:
- Form DDC name
- See Also:
NavigationNode.getMaskDDCName()
-
getLinkFolder
public final java.lang.String getLinkFolder()
Returns the link folder id.- Specified by:
getLinkFolder
in interfaceNavigationNode
- Returns:
- the linkFolder
- See Also:
NavigationNode.getLinkFolder()
-
getLinkTable
public final java.lang.String getLinkTable()
Returns the link table.- Specified by:
getLinkTable
in interfaceNavigationNode
- Returns:
- the linkTable
- See Also:
NavigationNode.getLinkTable()
-
getContent
public java.io.InputStream getContent() throws BinaryUnavailableException, AuthenticationException
Returns the content stream, it will be loaded on demand.- Specified by:
getContent
in interfaceNavigationNode
- Returns:
- content
- Throws:
BinaryUnavailableException
- BinaryUnavailableExceptionAuthenticationException
- AuthenticationException
-
setContent
public void setContent(java.io.InputStream contentStream)
Sets the content stream.- Specified by:
setContent
in interfaceNavigationNode
- Parameters:
contentStream
- content
-
getPath
public java.lang.String getPath()
- Specified by:
getPath
in interfaceNavigationNode
- Returns:
- the node path
- See Also:
NavigationNode.getPath()
-
getDocCount
public long getDocCount()
- Specified by:
getDocCount
in interfaceNavigationNode
- Returns:
- Document count
- See Also:
NavigationNode.getDocCount()
-
setDocCount
public void setDocCount(int count)
Sets the number of documents enclosed by this folder.- Specified by:
setDocCount
in interfaceNavigationNode
- Parameters:
count
- the number of documents enclosed by this folder.- See Also:
NavigationNode.setDocCount(int)
-
getUnreadCount
public long getUnreadCount()
- Specified by:
getUnreadCount
in interfaceNavigationNode
- Returns:
- Document count
- See Also:
NavigationNode.getUnreadCount()
-
setUnreadCount
public void setUnreadCount(long count)
Sets the number of unread documents enclosed by this folder.- Specified by:
setUnreadCount
in interfaceNavigationNode
- Parameters:
count
- the number of unread documents enclosed by this folder.- See Also:
NavigationNode.setUnreadCount(long)
-
canDelete
public boolean canDelete()
- Specified by:
canDelete
in interfaceNavigationItem
- Returns:
- Can delete this
- See Also:
NavigationItem.canDelete()
-
canRename
public boolean canRename()
- Specified by:
canRename
in interfaceNavigationItem
- Returns:
- Can rename this
- See Also:
NavigationItem.canRename()
-
canAddFolder
public boolean canAddFolder()
- Specified by:
canAddFolder
in interfaceNavigationItem
- Returns:
- Can add folder.
- See Also:
NavigationItem.canAddFolder()
-
canPermissions
public boolean canPermissions()
- Specified by:
canPermissions
in interfaceNavigationItem
- Returns:
- Can set permissions.
- See Also:
NavigationItem.canPermissions()
-
canMove
public boolean canMove()
- Specified by:
canMove
in interfaceNavigationNode
- Returns:
- Can move.
- See Also:
NavigationNode.canMove()
-
getUploadInfos
public FolderUploadInfos getUploadInfos()
- Specified by:
getUploadInfos
in interfaceNavigationNode
- Returns:
- information about the upload capabilities of the node
- See Also:
NavigationNode.getUploadInfos()
-
getFolderClass
public FolderClass getFolderClass()
Returns the folder class. If no class is defined, a GenericFolderClass is generated.- Specified by:
getFolderClass
in interfaceNavigationNode
- Returns:
- the folder class
- See Also:
NavigationNode.getFolderClass()
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
Returns the properties of the folder. The properties do not contain system properties.- Specified by:
getProperties
in interfaceNavigationNode
- Returns:
- folder properties
- See Also:
NavigationNode.getProperties()
-
setWorkflowInfo
public void setWorkflowInfo(WorkflowNodeInfo info)
- Specified by:
setWorkflowInfo
in interfaceNavigationNode
- Parameters:
info
- Set the workflow infomation's- See Also:
NavigationNode.setWorkflowInfo(com.saperion.ngc.model.navigation.intf.WorkflowNodeInfo)
-
getWorkflowInfo
public WorkflowNodeInfo getWorkflowInfo()
- Specified by:
getWorkflowInfo
in interfaceNavigationNode
- Returns:
- The workflow infomation's
- See Also:
NavigationNode.getWorkflowInfo()
-
isLinked
public boolean isLinked()
- Specified by:
isLinked
in interfaceNavigationNode
- Returns:
- true if this node is linked by another node
- See Also:
NavigationNode.isLinked()
-
getLinkingNode
public NavigationNode getLinkingNode()
- Specified by:
getLinkingNode
in interfaceNavigationNode
- Returns:
- the node that links to this node or null if this node is not linked
- See Also:
NavigationNode.getLinkingNode()
-
setLinkingNode
public void setLinkingNode(NavigationNode linking)
Sets the node that is linking to this node.- Specified by:
setLinkingNode
in interfaceNavigationNode
- Parameters:
linking
- the linking node- See Also:
(com.saperion.ngc.model.navigation.intf.NavigationNode)
-
isInPrivateSubtree
public boolean isInPrivateSubtree()
Checks if the node is located within a private-subtree of the navigation tree.- Specified by:
isInPrivateSubtree
in interfaceNavigationNode
- Returns:
- true if node is in private subtree
- See Also:
NavigationNode.isInPrivateSubtree()
-
-