Interface SilverpeasPersonalComponentInstance
-
- All Superinterfaces:
Identifiable
,Nameable
,Serializable
,SilverpeasComponentInstance
- All Known Implementing Classes:
PersonalComponentInstance
,ToolInstance
public interface SilverpeasPersonalComponentInstance extends SilverpeasComponentInstance
- Author:
- Yohann Chastagnier
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static Optional<SilverpeasPersonalComponentInstance>
getById(String personalComponentInstanceId)
Gets a personal silverpeas component instance from the specified identifier.default Collection<SilverpeasRole>
getSilverpeasRolesFor(User user)
Gets the silverpeas role the given user has on the component instance.
BE CAREFUL, the manager role is never returned as it corresponds to a space role.User
getUser()
Gets the user associated to the personal component instance.default boolean
isPersonal()
Indicates if the component instance is a personal one.
A personal component instance is linked to a user.-
Methods inherited from interface org.silverpeas.core.Identifiable
getId
-
Methods inherited from interface org.silverpeas.core.admin.component.model.SilverpeasComponentInstance
getDescription, getDescription, getHighestSilverpeasRolesFor, getLabel, getLabel, getName, getOrderPosition, getParameterValue, getSpaceId, isHidden, isPublic, isRemoved, isTopicTracker, isWorkflow
-
-
-
-
Method Detail
-
getById
static Optional<SilverpeasPersonalComponentInstance> getById(String personalComponentInstanceId)
Gets a personal silverpeas component instance from the specified identifier.- Parameters:
personalComponentInstanceId
- a personal component instance identifier as string.- Returns:
- an optional silverpeas personal component instance of
SilverpeasPersonalComponentInstance
.
-
getUser
User getUser()
Gets the user associated to the personal component instance.- Returns:
- a
User
instance.
-
isPersonal
default boolean isPersonal()
Description copied from interface:SilverpeasComponentInstance
Indicates if the component instance is a personal one.
A personal component instance is linked to a user.- Specified by:
isPersonal
in interfaceSilverpeasComponentInstance
- Returns:
- true if it is a personal one, false otherwise.
-
getSilverpeasRolesFor
default Collection<SilverpeasRole> getSilverpeasRolesFor(User user)
Description copied from interface:SilverpeasComponentInstance
Gets the silverpeas role the given user has on the component instance.
BE CAREFUL, the manager role is never returned as it corresponds to a space role.- Specified by:
getSilverpeasRolesFor
in interfaceSilverpeasComponentInstance
- Parameters:
user
- the user for which the roles are retrieved.- Returns:
- a list of
SilverpeasRole
, empty of no roles.
-
-