Class ProfileInst
- java.lang.Object
-
- org.silverpeas.core.admin.BaseRightProfile
-
- org.silverpeas.core.admin.user.model.ProfileInst
-
- All Implemented Interfaces:
Serializable
,RightProfile
public class ProfileInst extends BaseRightProfile
A right profile on a component instance or in an object managed by that component instance. It defines all the users and groups that can access a component instance with some well-defined privileges. The privileges in Silverpeas are defined by a set of predefined roles and the given role a profile is related to is indicated by theBaseRightProfile.getName()
method. When the profile is about a given resource of a component instance, the right accesses are defined for that resource whose identifier can be got with thegetObjectId()
method; by default this method returnsProfiledObjectId.NOTHING
if the right profile is on the component instance itself.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProfileInst()
Constructs an empty right profile on a component instance.ProfileInst(ProfileInst profile)
Constructs a right profile on a component instance by copying the specified one.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getComponentFatherId()
Gets the component instance on which is related this profile.ProfiledObjectId
getObjectId()
Gets the identifier of the object covered by this profile.ProfiledObjectId
getParentObjectId()
This profile isn't on the actual object but on its one of its parent (in the case the objects are related) whose identifier is returned here.boolean
isOnComponentInstance()
Is the right profile on a component instance?void
setComponentFatherId(int sComponentFatherId)
Sets the component instance that is related by this profile.void
setObjectId(ProfiledObjectId objectId)
This profile is about the specified object and not on the component instance referred by thegetComponentFatherId()
method.void
setParentObjectId(ProfiledObjectId parentObjectId)
This profile isn't on the actual object but on its one of its parent (in the case the objects are related) whose identifier is set here.-
Methods inherited from class org.silverpeas.core.admin.BaseRightProfile
addGroup, addGroups, addUser, addUsers, getAllGroups, getAllUsers, getDescription, getId, getLabel, getName, getNumGroup, getNumUser, isEmpty, isInherited, removeAllGroups, removeAllUsers, removeGroup, removeUser, setDescription, setGroups, setId, setInherited, setLabel, setName, setUsers
-
-
-
-
Constructor Detail
-
ProfileInst
public ProfileInst()
Constructs an empty right profile on a component instance.
-
ProfileInst
public ProfileInst(ProfileInst profile)
Constructs a right profile on a component instance by copying the specified one.- Parameters:
profile
- a right profile to copy.
-
-
Method Detail
-
setComponentFatherId
public void setComponentFatherId(int sComponentFatherId)
Sets the component instance that is related by this profile. By default, this profile is on this component instance until an object identifier is set with thesetObjectId(ProfiledObjectId)
method with a value other thanProfiledObjectId.NOTHING
.- Parameters:
sComponentFatherId
- the unique identifier of a component instance
-
getComponentFatherId
public int getComponentFatherId()
Gets the component instance on which is related this profile. The profile is about the access granted to this component instance with some well-defined privileges unless thegetObjectId()
returns other thanProfiledObjectId.NOTHING
.- Returns:
- the unique identifier of a component instance.
-
getObjectId
public ProfiledObjectId getObjectId()
Gets the identifier of the object covered by this profile. In the case the profile only about the component instance referred by thegetComponentFatherId()
method, thenProfiledObjectId.NOTHING
is returned. Such an object can be for example a node.- Returns:
- the identifier of the object referred by this profile.
ProfiledObjectId.NOTHING
if none object is covered explicitly by this profile.
-
setObjectId
public void setObjectId(ProfiledObjectId objectId)
This profile is about the specified object and not on the component instance referred by thegetComponentFatherId()
method. Such an object can be for example a node.- Parameters:
objectId
- the unique identifier of the object covered by this profile.
-
getParentObjectId
public ProfiledObjectId getParentObjectId()
This profile isn't on the actual object but on its one of its parent (in the case the objects are related) whose identifier is returned here.- Returns:
- the identifier of the object that is really covered by this profile. The
actual object get by
getObjectId()
method inherits the right access defines by this profile.
-
setParentObjectId
public void setParentObjectId(ProfiledObjectId parentObjectId)
This profile isn't on the actual object but on its one of its parent (in the case the objects are related) whose identifier is set here.- Parameters:
parentObjectId
- the identifier of the object that is really covered by this profile. The actual object get bygetObjectId()
method inherits the right access defines by this profile.
-
isOnComponentInstance
public boolean isOnComponentInstance()
Is the right profile on a component instance?- Returns:
- true if the profile defines right access of a component instance or false if it defines right access of an object managed by that component instance.
-
-