com.stratelia.webactiv.util.node.model
Class NodeDetail

java.lang.Object
  extended by com.silverpeas.util.i18n.AbstractI18NBean<NodeI18NDetail>
      extended by com.stratelia.webactiv.util.node.model.NodeDetail
All Implemented Interfaces:
I18NBean<NodeI18NDetail>, Serializable

public class NodeDetail
extends AbstractI18NBean<NodeI18NDetail>
implements Serializable

This object contains the description of a node (own attributes and children attributes)

Version:
1.0
Author:
Nicolas Eysseric
See Also:
Serialized Form

Field Summary
static String DEFAULT_TYPE
           
static String FILE_LINK_TYPE
           
static String STATUS_INVISIBLE
           
static String STATUS_VISIBLE
           
 
Constructor Summary
NodeDetail()
          Construct an empty NodeDetail
NodeDetail(NodeDetail detail)
           
NodeDetail(NodePK nodePK, String name, String description, String creationDate, String creatorId, String path, int level, NodePK fatherPK, Collection<NodeDetail> childrenDetails)
          Create a new NodeDetail
NodeDetail(NodePK nodePK, String name, String description, String creationDate, String creatorId, String path, int level, NodePK fatherPK, String modelId, String status, Collection<NodeDetail> childrenDetails)
           
NodeDetail(NodePK nodePK, String name, String description, String creationDate, String creatorId, String path, int level, NodePK fatherPK, String modelId, String status, Collection<NodeDetail> childrenDetails, String type)
           
NodeDetail(String id, String name, String description, String creationDate, String creatorId, String path, int level, String fatherId, String modelId, String status, Collection<NodeDetail> childrenDetails)
           
NodeDetail(String id, String name, String description, String creationDate, String creatorId, String path, int level, String fatherId, String modelId, String status, Collection<NodeDetail> childrenDetails, String type)
           
NodeDetail(String id, String name, String description, String creationDate, String creatorId, String path, String level, String fatherId)
          Create a new NodeDetail
NodeDetail(String id, String name, String description, String creationDate, String creatorId, String path, String level, String fatherId, String type)
           
 
Method Summary
 boolean canBeAccessedBy(UserDetail user)
          Is the specified user can access this node?
 NodeDetail clone()
           
 boolean equals(Object other)
           
 Collection<NodeDetail> getChildrenDetails()
          Get the details of each child
 int getChildrenNumber()
          Get the number of children of the node
 String getCreationDate()
          Get the creation date
 String getCreatorId()
          Get the creator id
 String getDefaultUrl(String componentName)
           
 NodePK getFatherPK()
          Get the NodePK of the father
 String getFullPath()
           
 int getId()
          Méthode nécéssaire au marshalling castor
 int getLevel()
          Get the level
 String getLink()
           
 String getModelId()
          Get the modelId
 int getNbObjects()
           
 NodePK getNodePK()
          Get the NodePK
 int getOrder()
           
 String getPath()
          Get the path
 String getPermalink()
           
 int getRightsDependsOn()
           
 String getStatus()
          Get the status
 String getType()
           
 String getURL()
           
 String getUserRole()
           
 boolean hasFather()
           
 int hashCode()
           
 boolean haveInheritedRights()
           
 boolean haveLocalRights()
           
 boolean haveRights()
           
 boolean isFatherOf(NodeDetail node)
           
 boolean isUseId()
           
 void setChildrenDetails(Collection<NodeDetail> childrenDetails)
          Set the details of children
 void setCreationDate(String date)
          Set the creation date
 void setCreatorId(String creatorId)
          Set the creator id
 void setFatherPK(NodePK fatherPK)
          Set the father of the node
 void setId(int id)
          Méthode nécéssaire au marshalling castor
 void setLevel(int level)
          Set the level
 void setModelId(String modelId)
          Set the modelId
 void setNbObjects(int nbObjects)
           
 void setNodePK(NodePK nodePK)
           
 void setOrder(int order)
           
 void setPath(String path)
          Set the path
 void setRightsDependsOn(int rightsDependsOn)
           
 void setRightsDependsOnMe()
           
 void setStatus(String status)
          Set the status
 void setType(String type)
           
 void setUseId(boolean useId)
           
 void setUserRole(String userRole)
           
 String toString()
          Converts the contents of the key into a readable String.
 
Methods inherited from class com.silverpeas.util.i18n.AbstractI18NBean
addTranslation, getClonedTranslations, getDescription, getDescription, getLanguage, getLanguages, getLanguageToDisplay, getName, getName, getNextTranslation, getTranslation, getTranslationId, getTranslations, isRemoveTranslation, setDescription, setLanguage, setName, setRemoveTranslation, setTranslationId, setTranslations, setTranslations, setTranslations
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_TYPE

public static final String DEFAULT_TYPE
See Also:
Constant Field Values

FILE_LINK_TYPE

public static final String FILE_LINK_TYPE
See Also:
Constant Field Values

STATUS_VISIBLE

public static final String STATUS_VISIBLE
See Also:
Constant Field Values

STATUS_INVISIBLE

public static final String STATUS_INVISIBLE
See Also:
Constant Field Values
Constructor Detail

NodeDetail

public NodeDetail(NodeDetail detail)

NodeDetail

public NodeDetail()
Construct an empty NodeDetail

Since:
1.0

NodeDetail

public NodeDetail(NodePK nodePK,
                  String name,
                  String description,
                  String creationDate,
                  String creatorId,
                  String path,
                  int level,
                  NodePK fatherPK,
                  Collection<NodeDetail> childrenDetails)
Create a new NodeDetail

Parameters:
nodePK - NodePK of the node
name - The node name
description - The node description
creationDate - A string which represent the creation date
creatorId - The name of the node creator
path - The node path
level - The node level (root level = 1)
fatherPK - The nodePK of the father
childrenDetails - A NodeDetail collection which contains each child
Since:
1.0
See Also:
Collection, NodePK, NodeDetail

NodeDetail

public NodeDetail(String id,
                  String name,
                  String description,
                  String creationDate,
                  String creatorId,
                  String path,
                  String level,
                  String fatherId)
Create a new NodeDetail

Parameters:
id - id of the node
name - The node name
description - The node description
creationDate - A string which represent the creation date
creatorId - The name of the node creator
path - The node path
level - The node level (root level = 1)
fatherId - The id of the father
Since:
1.0
See Also:
Collection, NodeDetail

NodeDetail

public NodeDetail(String id,
                  String name,
                  String description,
                  String creationDate,
                  String creatorId,
                  String path,
                  String level,
                  String fatherId,
                  String type)

NodeDetail

public NodeDetail(NodePK nodePK,
                  String name,
                  String description,
                  String creationDate,
                  String creatorId,
                  String path,
                  int level,
                  NodePK fatherPK,
                  String modelId,
                  String status,
                  Collection<NodeDetail> childrenDetails,
                  String type)

NodeDetail

public NodeDetail(String id,
                  String name,
                  String description,
                  String creationDate,
                  String creatorId,
                  String path,
                  int level,
                  String fatherId,
                  String modelId,
                  String status,
                  Collection<NodeDetail> childrenDetails,
                  String type)

NodeDetail

public NodeDetail(NodePK nodePK,
                  String name,
                  String description,
                  String creationDate,
                  String creatorId,
                  String path,
                  int level,
                  NodePK fatherPK,
                  String modelId,
                  String status,
                  Collection<NodeDetail> childrenDetails)

NodeDetail

public NodeDetail(String id,
                  String name,
                  String description,
                  String creationDate,
                  String creatorId,
                  String path,
                  int level,
                  String fatherId,
                  String modelId,
                  String status,
                  Collection<NodeDetail> childrenDetails)
Method Detail

getNodePK

public NodePK getNodePK()
Get the NodePK

Returns:
The NodePK
Since:
1.0

setNodePK

public void setNodePK(NodePK nodePK)

getId

public int getId()
Méthode nécéssaire au marshalling castor

Returns:

getCreationDate

public String getCreationDate()
Get the creation date

Returns:
the creation date
Since:
1.0

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(String 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 castor

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

getType

public String getType()

setType

public void setType(String type)

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getDefaultUrl

public String getDefaultUrl(String componentName)

getURL

public String getURL()

getLink

public String getLink()

getPermalink

public String getPermalink()

getNbObjects

public int getNbObjects()

setNbObjects

public void setNbObjects(int nbObjects)

getRightsDependsOn

public int getRightsDependsOn()

setRightsDependsOn

public void setRightsDependsOn(int 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()

clone

public NodeDetail clone()
Overrides:
clone in class Object

isFatherOf

public boolean isFatherOf(NodeDetail node)

canBeAccessedBy

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

Parameters:
user - a user in Silverpeas.
Returns:
true if the user can access this node, false otherwise.


Copyright © 2016 Silverpeas. All Rights Reserved.