Class NodeDetail

    • Constructor Detail

      • NodeDetail

        public NodeDetail​(NodeDetail other)
        Copy constructor of persisted entity, all data are deeply copied and id is set to "unknown" value.
        Parameters:
        other - the instance to copy.
      • NodeDetail

        public NodeDetail()
        Construct an empty NodeDetail
        Since:
        1.0
      • NodeDetail

        public NodeDetail​(String id,
                          String name,
                          String description,
                          int level,
                          String fatherId)
        Create a new NodeDetail
        Parameters:
        id - id of the node
        name - The node name
        description - The node description
        level - The node level (root level = 1)
        fatherId - The id of the father
      • NodeDetail

        public NodeDetail​(NodePK pk,
                          String name,
                          String description,
                          int level,
                          String fatherId)
        Create a new NodeDetail
        Parameters:
        pk - id of the node
        name - The node name
        description - The node description
        level - The node level (root level = 1)
        fatherId - The id of the father
    • Method Detail

      • getNodePK

        public NodePK getNodePK()
        Get the NodePK
        Returns:
        The NodePK
        Since:
        1.0
      • setNodePK

        public void setNodePK​(NodePK nodePK)
      • getId

        public String getId()
        Description copied from interface: Identifiable
        Gets the unique identifier of the object in Silverpeas. If he's also identified by a local identifier, then this method should return the one global to Silverpeas.
        Specified by:
        getId in interface Identifiable
        Returns:
        the identifier encoded as a String. If the identifier is a complex one, that is made up of several identification parts, then the returned representation should take care of such a structure.
      • getLocalId

        public int getLocalId()
      • getContributionType

        public String getContributionType()
        Description copied from interface: Contribution
        Gets the type of this contribution. The type is a label that identifies uniquely a kind of contribution handled by a Silverpeas application. By default, this method returns the simple name of the class implementing this interface.
        Specified by:
        getContributionType in interface Contribution
        Returns:
        the label of the type of this contribution.
      • isRoot

        public boolean isRoot()
        Is this node the root of a tree of nodes?
        Specified by:
        isRoot in interface Folder
        Returns:
        true if the node is the root of a tree of nodes. False otherwise.
      • isBin

        public boolean isBin()
        Is this node a bin of contributions?
        Specified by:
        isBin in interface Folder
        Returns:
        true if this node represents a bin. False otherwise.
      • isUnclassified

        public boolean isUnclassified()
        Is this node the one containing unclassified contributions?
        Specified by:
        isUnclassified in interface Folder
        Returns:
        true if the node isn't yet classified among other nodes. False otherwise.
      • isChild

        public boolean isChild()
        Is this node a child of another node? A node is a child of another node if the following conditions are satisfied:
        • the node isn't the root one,
        • the node isn't a bin,
        • the node isn't unclassified (orphaned).
        Specified by:
        isChild in interface Folder
        Returns:
        true if this node is a child of another node. False otherwise.
      • getLastUpdater

        public User getLastUpdater()
        No modification is traced for nodes. Returns the creator.
        Specified by:
        getLastUpdater in interface SilverpeasResource
        Returns:
        the creator of the node
      • getLastUpdateDate

        public Date getLastUpdateDate()
        No modification is traced for nodes. Returns the date of this node creation.
        Specified by:
        getLastUpdateDate in interface SilverpeasResource
        Returns:
        the creation date.
      • getCreatorId

        public String getCreatorId()
        Get the creator id
        Returns:
        the creator identifier
        Since:
        1.0
      • getPath

        public String getPath()
        Get the path
        Returns:
        the path
        Since:
        1.0
      • getLevel

        public int getLevel()
        Get the level
        Returns:
        the level
        Since:
        1.0
      • getModelId

        public String getModelId()
        Get the modelId
        Returns:
        the modelId
      • getStatus

        public String getStatus()
        Get the status
        Returns:
        the status
      • getFatherPK

        public NodePK getFatherPK()
        Get the NodePK of the father
        Returns:
        the NodePK of the father
        Since:
        1.0
      • getChildrenDetails

        public Collection<NodeDetail> getChildrenDetails()
        Get the details of each child
        Returns:
        A collection of NodeDetail
        Since:
        1.0
        See Also:
        NodeDetail
      • setCreationDate

        public void setCreationDate​(Date date)
        Set the creation date
        Parameters:
        date - A string representing a date
        Since:
        1.0
      • setCreatorId

        public void setCreatorId​(String creatorId)
        Set the creator id
        Parameters:
        creatorId - The creator id
        Since:
        1.0
      • setModelId

        public void setModelId​(String modelId)
        Set the modelId
        Parameters:
        modelId - the modelId of the node
      • setStatus

        public void setStatus​(String status)
        Set the status
        Parameters:
        status - the status of the node
      • setChildrenDetails

        public void setChildrenDetails​(Collection<NodeDetail> childrenDetails)
        Set the details of children
        Parameters:
        childrenDetails - a NodeDetail Collection
        Since:
        1.0
      • setFatherPK

        public void setFatherPK​(NodePK fatherPK)
        Set the father of the node
        Parameters:
        fatherPK - the nodePK of the father
        Since:
        1.0
      • setId

        public void setId​(int id)
        Méthode nécéssaire au marshalling JAXB
        Parameters:
        id -
      • setPath

        public void setPath​(String path)
        Set the path
        Parameters:
        path - the path of the node
        Since:
        1.0
      • setLevel

        public void setLevel​(int level)
        Set the level
        Parameters:
        level - the level of the node
        Since:
        1.0
      • getChildrenNumber

        public int getChildrenNumber()
        Get the number of children of the node
        Returns:
        the number of children of the node
        Since:
        1.0
      • getOrder

        public int getOrder()
      • setOrder

        public void setOrder​(int order)
      • toString

        public String toString()
        Converts the contents of the key into a readable String.
        Overrides:
        toString in class Object
        Returns:
        The string representation of this object
      • getNodeType

        public String getNodeType()
      • setNodeType

        public void setNodeType​(String nodeType)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getURL

        public String getURL()
      • getLink

        public String getLink()
      • getNbObjects

        public int getNbObjects()
      • setNbObjects

        public void setNbObjects​(int nbObjects)
      • getRightsDependsOn

        public String getRightsDependsOn()
      • setRightsDependsOn

        public void setRightsDependsOn​(String rightsDependsOn)
      • setRightsDependsOnMe

        public void setRightsDependsOnMe()
      • haveLocalRights

        public boolean haveLocalRights()
      • haveInheritedRights

        public boolean haveInheritedRights()
      • haveRights

        public boolean haveRights()
      • getUserRole

        public String getUserRole()
      • setUserRole

        public void setUserRole​(String userRole)
      • isUseId

        public boolean isUseId()
      • hasFather

        public boolean hasFather()
      • setUseId

        public void setUseId​(boolean useId)
      • getFullPath

        public String getFullPath()
      • isFatherOf

        public boolean isFatherOf​(NodeDetail node)
      • canBeAccessedBy

        public boolean canBeAccessedBy​(User user)
        Is the specified user can access this node?

        Specified by:
        canBeAccessedBy in interface Contribution
        Specified by:
        canBeAccessedBy in interface Securable
        Parameters:
        user - a user in Silverpeas.
        Returns:
        true if the user can access this node, false otherwise.
      • canBeModifiedBy

        public boolean canBeModifiedBy​(User user)
        Description copied from interface: Securable
        Checks the given user can modify this resource. By default, if the user can access this securable resource, then it can also modify it.
        Specified by:
        canBeModifiedBy in interface Securable
        Parameters:
        user - a user in Silverpeas.
        Returns:
        true if the user can modify the data managed by this instance, false otherwise.
      • canBeFiledInBy

        public boolean canBeFiledInBy​(User user)
        Is the specified user can file into this node a contribution (either another node or a different kind of contributions supported by the underlying application)?
        Specified by:
        canBeFiledInBy in interface Securable
        Parameters:
        user - a user in Silverpeas.
        Returns:
        true if the user has at least the role of writer for this node.
      • canBeSharedBy

        public boolean canBeSharedBy​(User user)