Package org.silverpeas.core.admin
Class ProfiledObjectId
- java.lang.Object
-
- org.silverpeas.core.admin.ProfiledObjectId
-
- All Implemented Interfaces:
Serializable
,ResourceIdentifier
public class ProfiledObjectId extends Object implements ResourceIdentifier, Serializable
The unique identifier of an object that is covered by a right profile.- Author:
- mmoquillon
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ProfiledObjectId
NOTHING
static String
ROOT_ID
-
Constructor Summary
Constructors Constructor Description ProfiledObjectId(ProfiledObjectType type, String id)
Constructs the identifier of an object that is related to a right profile, that is of the specified type and that have the given identifier.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
asString()
Gets the value of this identifier as a String.boolean
equals(Object o)
static ProfiledObjectId
from(String expressionId)
Constructs from its specified serialized expression aProfiledObjectId
instance.static ProfiledObjectId
fromNode(String nodeId)
Constructs from the specified node identifier aProfiledObjectId
instance that refers the node as an access right profiled object.String
getId()
Gets the local identifier of the object referred by this identifier.ProfiledObjectType
getType()
Gets the type of the object referred by this identifier.int
hashCode()
boolean
isDefined()
Is this identifier defined?boolean
isNotDefined()
Is this identifier undefined?boolean
isRootNode()
Is the identifier referring a root node object?
-
-
-
Field Detail
-
NOTHING
public static final ProfiledObjectId NOTHING
-
ROOT_ID
public static final String ROOT_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ProfiledObjectId
public ProfiledObjectId(ProfiledObjectType type, String id)
Constructs the identifier of an object that is related to a right profile, that is of the specified type and that have the given identifier.- Parameters:
type
- the type of the profiled object.id
- the local identifier of the object.
-
-
Method Detail
-
fromNode
public static ProfiledObjectId fromNode(String nodeId)
Constructs from the specified node identifier aProfiledObjectId
instance that refers the node as an access right profiled object.- Parameters:
nodeId
- the unique identifier of a node.- Returns:
- the
ProfiledObjectId
instance representation of the node identifier.
-
from
public static ProfiledObjectId from(String expressionId)
Constructs from its specified serialized expression aProfiledObjectId
instance. The expression must be formed with a code defining its type and of its local identifier. For knowing possible types, please seeProfiledObjectType
enumeration.- Parameters:
expressionId
- a textual expression of a profiled object identifier.- Returns:
- the
ProfiledObjectId
instance represented by the specified expression.
-
getId
public String getId()
Gets the local identifier of the object referred by this identifier.- Returns:
- an identifier.
-
getType
public ProfiledObjectType getType()
Gets the type of the object referred by this identifier.- Returns:
- the type of the object as a
ProfiledObjectType
enumeration value.
-
isDefined
public boolean isDefined()
Is this identifier defined? If the identifier is defined, then the referred object must have a type and an identifier positive.- Returns:
- true if the identifier is defined.
-
isNotDefined
public boolean isNotDefined()
Is this identifier undefined? The identifier isn't defined when no object is referred by it. As such, the type isn't defined and the identifier is strictly negative.- Returns:
-
isRootNode
public boolean isRootNode()
Is the identifier referring a root node object?- Returns:
- true if the referred object is a root node.
-
asString
public String asString()
Description copied from interface:ResourceIdentifier
Gets the value of this identifier as a String.- Specified by:
asString
in interfaceResourceIdentifier
- Returns:
- the String representation of this identifier.
-
-