Class Location
- java.lang.Object
-
- org.silverpeas.core.WAPrimaryKey
-
- org.silverpeas.core.ResourceReference
-
- org.silverpeas.core.node.model.NodePK
-
- org.silverpeas.core.contribution.publication.model.Location
-
- All Implemented Interfaces:
Serializable
,Cloneable
,ComponentResourceIdentifier
,ResourceIdentifier
public class Location extends NodePK
Location of a publication. The location of a publication is the node in a tree of nodes in which is located the publication. This is for Silverpeas components that use nodes to organize the publications they manage into a tree view.The location concept here comes from the filesystem: a publication can be located only at a given location and any others locations from which the publication can be accessed is said to be virtual, that is to say to be an alias, a shortcut to the original location. This is useful to restrict the node concept to the folder or directory one and to reified this constrain.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Location.Alias
-
Field Summary
-
Fields inherited from class org.silverpeas.core.node.model.NodePK
BIN_NODE_ID, ROOT_NODE_ID, UNCLASSED_NODE_ID, UNDEFINED_NODE_ID
-
Fields inherited from class org.silverpeas.core.ResourceReference
UNKNOWN_ID
-
Fields inherited from class org.silverpeas.core.WAPrimaryKey
componentName, id, space
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
Check if an another object is equal to this objectLocation.Alias
getAlias()
int
getPubOrder()
Gets the order of this publication among other publications in the same location.int
hashCode()
Returns a hash code for the keyboolean
isAlias()
Is this location actually an alias to the publication.boolean
isNode(NodeDetail nodeDetail)
Is this location matches the specified node in a given component instance?void
setAsAlias(String userId)
void
setAsAlias(String userId, Date date)
void
setPubOrder(int pubOrder)
Sets the order of the publication among others ones in this location.-
Methods inherited from class org.silverpeas.core.node.model.NodePK
getRootTableName, getTableName, isRoot, isTrash, isUnclassed, isUndefined
-
Methods inherited from class org.silverpeas.core.ResourceReference
asString, getComponentInstanceId, getLocalId, to
-
Methods inherited from class org.silverpeas.core.WAPrimaryKey
clone, getComponentName, getId, getInstanceId, getSpace, getSpaceId, getTableName, setComponentName, setId, setSpace, toResourceReference, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.ComponentResourceIdentifier
toReference
-
-
-
-
Method Detail
-
getAlias
public Location.Alias getAlias()
-
setAsAlias
public void setAsAlias(String userId)
-
isNode
public boolean isNode(NodeDetail nodeDetail)
Is this location matches the specified node in a given component instance?- Parameters:
nodeDetail
- a node in a component instance.- Returns:
- true if this location matches exactly the specified node. False otherwise.
-
isAlias
public boolean isAlias()
Is this location actually an alias to the publication.- Returns:
- true if this location is in fact a shortcut to the publication in its true location. If false, then this location represents the true position of the publication. Then only move can be used to relocate the publication.
-
getPubOrder
public int getPubOrder()
Gets the order of this publication among other publications in the same location.- Returns:
- the order of the publication in this location.
-
setPubOrder
public void setPubOrder(int pubOrder)
Sets the order of the publication among others ones in this location.- Parameters:
pubOrder
- a new order of the publication in this location.
-
equals
public boolean equals(Object other)
Description copied from class:NodePK
Check if an another object is equal to this object- Overrides:
equals
in classNodePK
- Parameters:
other
- the object to compare to this NodePK- Returns:
- true if other is equals to this object
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
Description copied from class:NodePK
Returns a hash code for the key- Overrides:
hashCode
in classNodePK
- Returns:
- A hash code for this object
- See Also:
Object.hashCode()
-
-