Class DefaultOrganizationController
- java.lang.Object
-
- org.silverpeas.core.admin.service.DefaultOrganizationController
-
- All Implemented Interfaces:
OrganizationController
@Service @Singleton public class DefaultOrganizationController extends Object implements OrganizationController
-
-
Constructor Summary
Constructors Constructor Description DefaultOrganizationController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getAdministratorUserIds(String fromUserId)Return all administrators idsString[]getAllComponentIds(String sSpaceId)Returns all the component identifiers of the space represented by the given identifier.String[]getAllComponentIdsRecur(String sSpaceId)Returns all the component identifiers of the space, and its sub spaces, represented by the given identifier.Domain[]getAllDomains()Gets all the user domains defined in Silverpeas.String[]getAllGroupIdsOfUser(String userId)Gets all the groups to which the specified user belongs.Group[]getAllGroups()Return all the groups of silverpeasString[]getAllowedComponentIds(String userId)Gets all the component instances in Silverpeas allowed to be accessed by the specified user.String[]getAllowedSubSpaceIds(String userId, String spaceFatherId)Gets the all the subspaces of the specified space accessible to the given user.Group[]getAllRootGroups()Return all root groups of silverpeas or null if an error occurred when getting the root groups.Group[]getAllRootGroupsInDomain(String domainId)Gets all the user groups that belong to the specified domain.String[]getAllRootSpaceIds()Return all the root spaceIdsString[]getAllRootSpaceIds(String sUserId)Return all the root spaceIds available for the user sUserIdString[]getAllSpaceIds()Return all the spaces available in silverpeasString[]getAllSpaceIds(String sUserId)Group[]getAllSubGroups(String parentGroupId)For use in userPanel : return the direct subgroupsString[]getAllSubSpaceIds(String sSpaceId)Return all the subSpaces available in silverpeas given a space id (driver format)String[]getAllSubSpaceIds(String sSpaceId, String sUserId)Return all the subSpaces id available given a space id (driver format)intgetAllSubUsersNumber(String sGroupId)Returns the total number of distinct users recursively contained in the specified groupUserDetail[]getAllUsers()Return all the users of SilverpeasUserDetail[]getAllUsers(String componentId)Return all the users allowed to access the given componentString[]getAllUsersIds()Return all the users of SilverpeasUserDetail[]getAllUsersInDomain(String domainId)Gets all the users that belong to the specified domain.UserDetail[]getAllUsersOfGroup(String groupId)Get ALL the users that are in a group or his subgroupsList<String>getAvailableComponentsByUser(String userId)Gets the component instance identifiers available for the specified user?String[]getAvailCompoIds(String sUserId)Return the component ids available for the current user idString[]getAvailCompoIds(String sClientSpaceId, String sUserId)Return the component ids available for the current user id in the given space idString[]getAvailCompoIdsAtRoot(String sClientSpaceId, String sUserId)Return the component ids available for the current user id in the given space idList<ComponentInstLight>getAvailComponentInstLights(String userId, String componentName)Gets the available component for a given userCompoSpace[]getCompoForUser(String sUserId, String sCompoName)Return the tuples (space id, compo id) allowed for the given user and given component nameString[]getCompoId(String sCompoName)Return the compo id for the given component nameString[]getComponentIdsForUser(String sUserId, String sCompoName)Gets the component instances accessible by the specified user and spawn from the specified application in Silverpeas.ComponentInstgetComponentInst(String sComponentId)Return the component Instance corresponding to the given component idOptional<SilverpeasComponentInstance>getComponentInstance(String componentInstanceIdentifier)Gets the component instance related to the given identifier.
In contrary toOrganizationController.getComponentInst(String),OrganizationController.getComponentInstLight(String)signatures, this one is able to return different kinds of implementation ofSilverpeasComponentInstanceand it is able to deal with administration cache too.
So, this signature is useful into contexts of transverse treatments.ComponentInstLightgetComponentInstLight(String sComponentId)Return the component Instance Light corresponding to the given component idStringgetComponentParameterValue(String sComponentId, String parameterName)Gets the value of the specified parameter of the given application instance.List<ComponentInstLight>getComponentsWithParameterValue(String param, String value)Gets all the component instance having the specified value for the given application parameter.List<GroupDetail>getDirectGroupsOfUser(String userId)Gets all the groups to which the specified user belongs explicitly.DomaingetDomain(String domainId)Gets the domain with the specified identifier.UserDetail[]getFilteredDirectUsers(String sGroupId, String sUserLastNameFilter)For use in userPanel : return the users that are direct child of a given groupSpaceWithSubSpacesAndComponentsgetFullTreeview()Gets the complete treeview of spaces and component instances defined in Silverpeas.SpaceWithSubSpacesAndComponentsgetFullTreeview(String userId)Gets the complete treeview of spaces and component instances defined in Silverpeas accessible to the specified user.SpaceWithSubSpacesAndComponentsgetFullTreeview(String userId, String spaceId)Gets the complete treeview of spaces and component instances contained in the specified space and that are accessible to the specified user.SpaceWithSubSpacesAndComponentsgetFullTreeviewOnComponentName(String userId, String componentName)Gets the complete treeview of spaces and of instances of the specified application and that are accessible to the specified user.GroupgetGroup(String sGroupId)Return the Group of the group with the given idGroup[]getGroups(String[] groupsId)Return all groups specified by the groupsIdsMap<String,Map<String,String>>getParameterValuesByComponentIdThenByParamName(Collection<String> componentIds, Collection<String> paramNames)Gets all parameters values by component and by parameter name.List<SpaceInstLight>getPathToComponent(String componentId)Gets the path of the specified component instance in the organizational tree of Silverpeas.List<String>getPathToGroup(String groupId)Get path to GroupList<SpaceInstLight>getPathToSpace(String spaceId)Gets the path of the specified space in the organizational tree of Silverpeas.Group[]getRecursivelyAllSubgroups(String parentGroupId)Gets all the groups and subgroups that are children of the specified group.SpaceInstLightgetRootSpace(String spaceId)Gets the root space for which the specified space is a direct or indirect child.List<SpaceInstLight>getRootSpacesContainingComponent(String userId, String componentName)Gets all the spaces at root level accessible by the specified user and containing at least one instance of the specified application.List<String>getSearchableComponentsByCriteria(ComponentSearchCriteria criteria)Gets the identifier of the component instances that are both searchable and that satisfy the specified criteria.SpaceInstgetSpaceInstById(String sSpaceId)Return the space instance corresponding to the given space idSpaceInstLightgetSpaceInstLightById(String spaceId)Return the space light corresponding to the given space idString[]getSpaceNames(String[] asSpaceIds)Return the spaces name corresponding to the given space ids.SpaceProfilegetSpaceProfile(String spaceId, SilverpeasRole role)Gets the space profile instance which provides all user and group identifiers through simple methods.List<SpaceInstLight>getSpaceTreeview(String userId)Gets the treeview of spaces in Silverpeas available to the specified user.List<String>getSpaceUserProfilesBySpaceId(String userId, String spaceId)Gets all the profiles the specified user plays in the given space.Map<String,Set<String>>getSpaceUserProfilesBySpaceIds(String userId, Collection<String> spaceIds)Gets the profile names of given user indexed by the given space.List<SpaceInstLight>getSubSpacesContainingComponent(String spaceId, String userId, String componentName)Gets all the subspaces of the given space accessible by the specified user and containing at least one instance of the specified application.UserDetailgetUserDetail(String sUserId)Return the detail of the user with the given ldap idUserDetail[]getUserDetails(String[] asUserIds)Return an array of users corresponding to the given user id arrayUserFullgetUserFull(String sUserId)Return the full detail of the user with the given ldap idList<UserFull>getUserFulls(Collection<String> userIds)Return a list of full detail of users corresponding toString[]getUserManageableSpaceIds(String sUserId)Return all the spaces id manageable by given user in SilverpeasMap<String,List<String>>getUserObjectProfiles(String userId, String componentId, ProfiledObjectType profiledObjectType)Gets the profile names the given user plays in the component instance for accessing the resources of the given type. instances.ProfileInstgetUserProfile(String profileId)Gets the user profile with the specified unique identifier.String[]getUserProfiles(String userId, String componentId)Gets all the profiles the specified user plays in the given component instance.String[]getUserProfiles(String userId, String componentId, ProfiledObjectId objectId)Gets all the profiles the user have for the specified resource in the given component instance.List<ProfileInst>getUserProfiles(String componentId, ProfiledObjectId objectId)Gets all the user profiles defined in the specified component instance to access the specified resource.Map<String,Set<String>>getUserProfilesByComponentId(String userId, Collection<String> componentIds)Gets the profile names of given user indexed by the given component instances.Map<org.silverpeas.kernel.util.Pair<String,String>,Set<String>>getUserProfilesByComponentIdAndObjectId(String userId, Collection<String> componentIds, ProfiledObjectIds profiledObjectIds)Gets the profile names of given user indexed by couple of given component instances and object instances.UserDetail[]getUsers(String componentId, String profile)Return all the users with the given profile allowed to access the given component of the given spaceString[]getUsersIdsByRoleNames(String componentId, List<String> profileNames)Return userIds according to a list of profile namesString[]getUsersIdsByRoleNames(String componentId, List<String> profileNames, boolean includeRemovedUsersAndGroups)Return userIds according to a list of profile namesString[]getUsersIdsByRoleNames(String componentId, ProfiledObjectId objectId, List<String> profileNames)Gets the users playing the specified roles for the given protected resource in the specified component instance.String[]getUsersIdsByRoleNames(String componentId, ProfiledObjectId objectId, List<String> profileNames, boolean includeRemovedUsersAndGroups)Gets the users playing the specified roles for the given protected resource in the specified component instance.Collection<SilverpeasRole>getUserSilverpeasRolesOn(User user, String componentInstanceIdentifier)Gets the collection of silverpeas roles the given user has on the component instance represented by the given identifier.
In contrary toOrganizationController.getUserProfiles(String, String),OrganizationController.getUserProfiles(String, ProfiledObjectId)orOrganizationController.getUserProfiles(String, String, ProfiledObjectId)signatures, this one is able to return user roles of different kinds of implementation ofSilverpeasComponentInstance.
So, this signature is useful into contexts of transversal treatments.
BE CAREFUL, the manager role is never returned as it corresponds to a space role.<T extends User>
List<T>getUsersOfDomains(List<String> domainIds)Get all the users (except delete ones) that are defined in the specified domains.<T extends User>
List<T>getUsersOfDomainsFromNewestToOldest(List<String> domainIds)Get all the users (except delete ones) that are defined in the specified domains.UserSpaceAvailabilityCheckergetUserSpaceAvailabilityChecker(String userId)This method allows callers to perform several space availability checks for a given user.booleanisAdminTool(String toolId)Is the specified tool belongs to the administration component?booleanisComponentAvailableToGroup(String componentId, String groupId)Is the specified component instance available among the components instances accessible by the specified group of users?booleanisComponentAvailableToUser(String componentId, String userId)Is the specified component instance available among the components instances accessible by the specified user?booleanisComponentExist(String componentId)Is the specified component instance exists in Silverpeas?booleanisComponentManageable(String componentId, String userId)Is the specified component instance manageable by the given user?booleanisObjectAvailableToGroup(ProfiledObjectId objectId, String componentId, String groupId)Is the specified resource protected by access rights in the given component instance is allowed to be accessed by the specified group of users?booleanisObjectAvailableToUser(ProfiledObjectId objectId, String componentId, String userId)Is the specified resource protected by access rights in the given component instance is allowed to be accessed by the specified user?booleanisSpaceAvailable(String spaceId, String userId)Is the specified space is allowed to be accessed by the given user?booleanisToolAvailable(String toolId)Is the specified tool is available in Silverpeas?<T extends Group>
SilverpeasList<T>searchGroups(GroupsSearchCriteria criteria)Searches the groups that match the specified criteria.<T extends User>
SilverpeasList<T>searchUsers(UserDetailsSearchCriteria criteria)Searches the users that match the specified criteria.
-
-
-
Method Detail
-
getAllSpaceIds
public String[] getAllSpaceIds()
Description copied from interface:OrganizationControllerReturn all the spaces available in silverpeas- Specified by:
getAllSpaceIdsin interfaceOrganizationController- Returns:
- an array with the identifiers of the spaces
-
getAllSubSpaceIds
public String[] getAllSubSpaceIds(String sSpaceId)
Description copied from interface:OrganizationControllerReturn all the subSpaces available in silverpeas given a space id (driver format)- Specified by:
getAllSubSpaceIdsin interfaceOrganizationController- Parameters:
sSpaceId- the identifier of the parent space- Returns:
- an array with the identifiers of the subspaces.
-
getSpaceNames
public String[] getSpaceNames(String[] asSpaceIds)
Description copied from interface:OrganizationControllerReturn the spaces name corresponding to the given space ids.- Specified by:
getSpaceNamesin interfaceOrganizationController- Parameters:
asSpaceIds- one or more space identifiers.- Returns:
- the names of the specified spaces
-
getSpaceInstLightById
public SpaceInstLight getSpaceInstLightById(String spaceId)
Description copied from interface:OrganizationControllerReturn the space light corresponding to the given space id- Specified by:
getSpaceInstLightByIdin interfaceOrganizationController- Parameters:
spaceId- the unique identifier of a space.- Returns:
- the space
-
getSpaceInstById
public SpaceInst getSpaceInstById(String sSpaceId)
Description copied from interface:OrganizationControllerReturn the space instance corresponding to the given space id- Specified by:
getSpaceInstByIdin interfaceOrganizationController
-
getAvailCompoIds
public String[] getAvailCompoIds(String sClientSpaceId, String sUserId)
Description copied from interface:OrganizationControllerReturn the component ids available for the current user id in the given space id- Specified by:
getAvailCompoIdsin interfaceOrganizationController
-
getAvailCompoIds
public String[] getAvailCompoIds(String sUserId)
Description copied from interface:OrganizationControllerReturn the component ids available for the current user id- Specified by:
getAvailCompoIdsin interfaceOrganizationController
-
getAvailCompoIdsAtRoot
public String[] getAvailCompoIdsAtRoot(String sClientSpaceId, String sUserId)
Description copied from interface:OrganizationControllerReturn the component ids available for the current user id in the given space id- Specified by:
getAvailCompoIdsAtRootin interfaceOrganizationController
-
getCompoForUser
public CompoSpace[] getCompoForUser(String sUserId, String sCompoName)
Description copied from interface:OrganizationControllerReturn the tuples (space id, compo id) allowed for the given user and given component name- Specified by:
getCompoForUserin interfaceOrganizationController- Parameters:
sUserId- the identifier of a usersCompoName- the name of a component- Returns:
- an array of tuples (space id, component instance id) of resources available by the user
-
getAvailComponentInstLights
public List<ComponentInstLight> getAvailComponentInstLights(String userId, String componentName)
Description copied from interface:OrganizationControllerGets the available component for a given user- Specified by:
getAvailComponentInstLightsin interfaceOrganizationController- Parameters:
userId- user identifier used to get componentcomponentName- type of component to retrieve ( for example : kmelia, forums, blog)- Returns:
- a list of ComponentInstLight object
-
getComponentIdsForUser
public String[] getComponentIdsForUser(String sUserId, String sCompoName)
Description copied from interface:OrganizationControllerGets the component instances accessible by the specified user and spawn from the specified application in Silverpeas.- Specified by:
getComponentIdsForUserin interfaceOrganizationController- Parameters:
sUserId- the unique identifier of a user in Silverpeas.sCompoName- the name of the application for which the instances have to be got.- Returns:
- an array with the identifier of component instances.
-
getCompoId
public String[] getCompoId(String sCompoName)
Description copied from interface:OrganizationControllerReturn the compo id for the given component name- Specified by:
getCompoIdin interfaceOrganizationController- Parameters:
sCompoName- the name of a component- Returns:
- an array of identifiers of instances of the given component
-
getComponentParameterValue
public String getComponentParameterValue(String sComponentId, String parameterName)
Description copied from interface:OrganizationControllerGets the value of the specified parameter of the given application instance.- Specified by:
getComponentParameterValuein interfaceOrganizationController- Parameters:
sComponentId- the unique identifier of a component instance.parameterName- the name of an application parameter.- Returns:
- a textual representation of the value of the parameter or an empty string if no such parameter is defined for the given component instance.
-
getComponentsWithParameterValue
public List<ComponentInstLight> getComponentsWithParameterValue(String param, String value)
Description copied from interface:OrganizationControllerGets all the component instance having the specified value for the given application parameter.- Specified by:
getComponentsWithParameterValuein interfaceOrganizationController- Parameters:
param- the name of an application parameter.value- the value of the application parameter.- Returns:
- a list of component instances.
-
getParameterValuesByComponentIdThenByParamName
public Map<String,Map<String,String>> getParameterValuesByComponentIdThenByParamName(Collection<String> componentIds, Collection<String> paramNames)
Description copied from interface:OrganizationControllerGets all parameters values by component and by parameter name.- Specified by:
getParameterValuesByComponentIdThenByParamNamein interfaceOrganizationController- Parameters:
componentIds- list of component identifier.paramNames- optional list of parameter name. All parameters are retrieved if it is not filled or null- Returns:
- a map filled with couples of parameter name / value per component instance identifier.
-
getComponentInstance
public Optional<SilverpeasComponentInstance> getComponentInstance(String componentInstanceIdentifier)
Description copied from interface:OrganizationControllerGets the component instance related to the given identifier.
In contrary toOrganizationController.getComponentInst(String),OrganizationController.getComponentInstLight(String)signatures, this one is able to return different kinds of implementation ofSilverpeasComponentInstanceand it is able to deal with administration cache too.
So, this signature is useful into contexts of transverse treatments.- Specified by:
getComponentInstancein interfaceOrganizationController- Parameters:
componentInstanceIdentifier- the identifier of the requested component instance.- Returns:
- an optional component instance.
-
getComponentInst
public ComponentInst getComponentInst(String sComponentId)
Description copied from interface:OrganizationControllerReturn the component Instance corresponding to the given component id- Specified by:
getComponentInstin interfaceOrganizationController
-
getComponentInstLight
public ComponentInstLight getComponentInstLight(String sComponentId)
Description copied from interface:OrganizationControllerReturn the component Instance Light corresponding to the given component id- Specified by:
getComponentInstLightin interfaceOrganizationController
-
getUserFull
public UserFull getUserFull(String sUserId)
Description copied from interface:OrganizationControllerReturn the full detail of the user with the given ldap id- Specified by:
getUserFullin interfaceOrganizationController
-
getUserFulls
public List<UserFull> getUserFulls(Collection<String> userIds)
Description copied from interface:OrganizationControllerReturn a list of full detail of users corresponding to- Specified by:
getUserFullsin interfaceOrganizationController
-
getUserDetail
public UserDetail getUserDetail(String sUserId)
Description copied from interface:OrganizationControllerReturn the detail of the user with the given ldap id- Specified by:
getUserDetailin interfaceOrganizationController
-
getUserDetails
public UserDetail[] getUserDetails(String[] asUserIds)
Description copied from interface:OrganizationControllerReturn an array of users corresponding to the given user id array- Specified by:
getUserDetailsin interfaceOrganizationController
-
getAllUsers
public UserDetail[] getAllUsers(String componentId)
Description copied from interface:OrganizationControllerReturn all the users allowed to access the given component- Specified by:
getAllUsersin interfaceOrganizationController
-
getAllUsersInDomain
public UserDetail[] getAllUsersInDomain(String domainId)
Description copied from interface:OrganizationControllerGets all the users that belong to the specified domain.- Specified by:
getAllUsersInDomainin interfaceOrganizationController- Parameters:
domainId- the unique identifier of the domain.- Returns:
- an array of users objects or null if no such domain exists.
-
getUsersOfDomains
public <T extends User> List<T> getUsersOfDomains(List<String> domainIds)
Description copied from interface:OrganizationControllerGet all the users (except delete ones) that are defined in the specified domains.- Specified by:
getUsersOfDomainsin interfaceOrganizationController- Parameters:
domainIds- a list of domain identifiers.- Returns:
- a list of users belonging to the given domains sorted by the alphabetic order of their name.
-
getUsersOfDomainsFromNewestToOldest
public <T extends User> List<T> getUsersOfDomainsFromNewestToOldest(List<String> domainIds)
Description copied from interface:OrganizationControllerGet all the users (except delete ones) that are defined in the specified domains.- Specified by:
getUsersOfDomainsFromNewestToOldestin interfaceOrganizationController- Parameters:
domainIds- a list of domain identifiers.- Returns:
- a list of users belonging to the given domains sorted by reverse creation order.
-
searchUsers
public <T extends User> SilverpeasList<T> searchUsers(UserDetailsSearchCriteria criteria)
Description copied from interface:OrganizationControllerSearches the users that match the specified criteria.- Specified by:
searchUsersin interfaceOrganizationController- Parameters:
criteria- the criteria in searching of user details.- Returns:
- a slice of the list of user details matching the criteria or an empty list of no ones are found. user details.
-
getAllRootGroupsInDomain
public Group[] getAllRootGroupsInDomain(String domainId)
Description copied from interface:OrganizationControllerGets all the user groups that belong to the specified domain.- Specified by:
getAllRootGroupsInDomainin interfaceOrganizationController- Parameters:
domainId- the unique identifier of the domain.- Returns:
- an array of Group objects or null if no such domain exists.
-
getFilteredDirectUsers
public UserDetail[] getFilteredDirectUsers(String sGroupId, String sUserLastNameFilter)
Description copied from interface:OrganizationControllerFor use in userPanel : return the users that are direct child of a given group- Specified by:
getFilteredDirectUsersin interfaceOrganizationController
-
searchGroups
public <T extends Group> SilverpeasList<T> searchGroups(GroupsSearchCriteria criteria)
Description copied from interface:OrganizationControllerSearches the groups that match the specified criteria.- Specified by:
searchGroupsin interfaceOrganizationController- Parameters:
criteria- the criteria in searching of user groups.- Returns:
- a slice of the list of user groups matching the criteria or an empty list of no ones are found. user groups.
-
getAllSubUsersNumber
public int getAllSubUsersNumber(String sGroupId)
Description copied from interface:OrganizationControllerReturns the total number of distinct users recursively contained in the specified group- Specified by:
getAllSubUsersNumberin interfaceOrganizationController
-
getAllSubGroups
public Group[] getAllSubGroups(String parentGroupId)
Description copied from interface:OrganizationControllerFor use in userPanel : return the direct subgroups- Specified by:
getAllSubGroupsin interfaceOrganizationController
-
getRecursivelyAllSubgroups
public Group[] getRecursivelyAllSubgroups(String parentGroupId)
Description copied from interface:OrganizationControllerGets all the groups and subgroups that are children of the specified group.- Specified by:
getRecursivelyAllSubgroupsin interfaceOrganizationController- Parameters:
parentGroupId- the unique identifier of a group.- Returns:
- an array with all the groups that are children of the specified group.
-
getAllUsers
public UserDetail[] getAllUsers()
Description copied from interface:OrganizationControllerReturn all the users of Silverpeas- Specified by:
getAllUsersin interfaceOrganizationController
-
getUsers
public UserDetail[] getUsers(String componentId, String profile)
Description copied from interface:OrganizationControllerReturn all the users with the given profile allowed to access the given component of the given space- Specified by:
getUsersin interfaceOrganizationController
-
getUserSilverpeasRolesOn
public Collection<SilverpeasRole> getUserSilverpeasRolesOn(User user, String componentInstanceIdentifier)
Description copied from interface:OrganizationControllerGets the collection of silverpeas roles the given user has on the component instance represented by the given identifier.
In contrary toOrganizationController.getUserProfiles(String, String),OrganizationController.getUserProfiles(String, ProfiledObjectId)orOrganizationController.getUserProfiles(String, String, ProfiledObjectId)signatures, this one is able to return user roles of different kinds of implementation ofSilverpeasComponentInstance.
So, this signature is useful into contexts of transversal treatments.
BE CAREFUL, the manager role is never returned as it corresponds to a space role.- Specified by:
getUserSilverpeasRolesOnin interfaceOrganizationControllercomponentInstanceIdentifier- the identifier of the component instance.- Returns:
- an optional component instance.
-
getUserProfiles
public String[] getUserProfiles(String userId, String componentId)
Description copied from interface:OrganizationControllerGets all the profiles the specified user plays in the given component instance.- Specified by:
getUserProfilesin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user in Silverpeas.componentId- the unique identifier of a component instance.- Returns:
- an array with the name of all the user profiles in the given component instance. The name of the profiles correspond to the roles the user plays in the component instance.
-
getUserProfilesByComponentId
public Map<String,Set<String>> getUserProfilesByComponentId(String userId, Collection<String> componentIds)
Description copied from interface:OrganizationControllerGets the profile names of given user indexed by the given component instances.- Specified by:
getUserProfilesByComponentIdin interfaceOrganizationController- Parameters:
userId- a user identifier as string.componentIds- list of component instance identifier as string.- Returns:
- a map filled with list of profile name as string by component instance identifier as string.
-
getSpaceUserProfilesBySpaceId
public List<String> getSpaceUserProfilesBySpaceId(String userId, String spaceId)
Description copied from interface:OrganizationControllerGets all the profiles the specified user plays in the given space.- Specified by:
getSpaceUserProfilesBySpaceIdin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user in Silverpeas.spaceId- the unique identifier of a space.- Returns:
- a list with the name of all the user profiles in the given space. The name of the profiles correspond to the roles the user plays in the space.
-
getSpaceUserProfilesBySpaceIds
public Map<String,Set<String>> getSpaceUserProfilesBySpaceIds(String userId, Collection<String> spaceIds)
Description copied from interface:OrganizationControllerGets the profile names of given user indexed by the given space.- Specified by:
getSpaceUserProfilesBySpaceIdsin interfaceOrganizationController- Parameters:
userId- a user identifier as string.spaceIds- list of space identifier as string.- Returns:
- a map filled with list of profile name as string by space identifier as string.
-
getUserProfiles
public String[] getUserProfiles(String userId, String componentId, ProfiledObjectId objectId)
Description copied from interface:OrganizationControllerGets all the profiles the user have for the specified resource in the given component instance.- Specified by:
getUserProfilesin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user.componentId- the unique identifier of a component instance.objectId- the unique identifier of a resource in Silverpeas whose access is covered by some user profiles.- Returns:
- an array with the name of all the user profiles the user play for the given resource in the application instance. The name of the profiles correspond to the roles the user plays.
-
getUserProfilesByComponentIdAndObjectId
public Map<org.silverpeas.kernel.util.Pair<String,String>,Set<String>> getUserProfilesByComponentIdAndObjectId(String userId, Collection<String> componentIds, ProfiledObjectIds profiledObjectIds)
Description copied from interface:OrganizationControllerGets the profile names of given user indexed by couple of given component instances and object instances.- Specified by:
getUserProfilesByComponentIdAndObjectIdin interfaceOrganizationController- Parameters:
userId- a user identifier as string.componentIds- list of component instance identifier as string.profiledObjectIds- if NOTHING is given, then all the rows associated to the type are returned, otherwise all the rows associated to type and ids.- Returns:
- a map filled with list of profile name as string by couple component instance identifier as string - object identifier as String.
-
getUserObjectProfiles
public Map<String,List<String>> getUserObjectProfiles(String userId, String componentId, ProfiledObjectType profiledObjectType)
Description copied from interface:OrganizationControllerGets the profile names the given user plays in the component instance for accessing the resources of the given type. instances.- Specified by:
getUserObjectProfilesin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user.componentId- the unique identifier of a component instance.profiledObjectType- if NONE is given, then all the rows associated to the type are returned, otherwise all the rows associated to type.- Returns:
- a map associating each object whose type matches the specified one with a list of profile names.
-
getUserProfiles
public List<ProfileInst> getUserProfiles(String componentId, ProfiledObjectId objectId)
Description copied from interface:OrganizationControllerGets all the user profiles defined in the specified component instance to access the specified resource.- Specified by:
getUserProfilesin interfaceOrganizationController- Parameters:
componentId- the unique identifier of a component instance.objectId- the unique identifier of a resource covered by access rights.- Returns:
- a list of user profiles.
-
getUserProfile
public ProfileInst getUserProfile(String profileId)
Description copied from interface:OrganizationControllerGets the user profile with the specified unique identifier.- Specified by:
getUserProfilein interfaceOrganizationController- Parameters:
profileId- the unique identifier of a user profile.- Returns:
- the profile instance or null if no such profile exists.
-
getAdministratorUserIds
public String[] getAdministratorUserIds(String fromUserId)
Description copied from interface:OrganizationControllerReturn all administrators ids- Specified by:
getAdministratorUserIdsin interfaceOrganizationController
-
getGroup
public Group getGroup(String sGroupId)
Description copied from interface:OrganizationControllerReturn the Group of the group with the given id- Specified by:
getGroupin interfaceOrganizationController
-
getGroups
public Group[] getGroups(String[] groupsId)
Description copied from interface:OrganizationControllerReturn all groups specified by the groupsIds- Specified by:
getGroupsin interfaceOrganizationController
-
getAllGroups
public Group[] getAllGroups()
Description copied from interface:OrganizationControllerReturn all the groups of silverpeas- Specified by:
getAllGroupsin interfaceOrganizationController
-
getAllRootGroups
public Group[] getAllRootGroups()
Description copied from interface:OrganizationControllerReturn all root groups of silverpeas or null if an error occurred when getting the root groups.- Specified by:
getAllRootGroupsin interfaceOrganizationController
-
getAllUsersOfGroup
public UserDetail[] getAllUsersOfGroup(String groupId)
Description copied from interface:OrganizationControllerGet ALL the users that are in a group or his subgroups- Specified by:
getAllUsersOfGroupin interfaceOrganizationController
-
getPathToGroup
public List<String> getPathToGroup(String groupId)
Description copied from interface:OrganizationControllerGet path to Group- Specified by:
getPathToGroupin interfaceOrganizationController
-
getAllSpaceIds
public String[] getAllSpaceIds(String sUserId)
- Specified by:
getAllSpaceIdsin interfaceOrganizationController
-
getUserManageableSpaceIds
public String[] getUserManageableSpaceIds(String sUserId)
Description copied from interface:OrganizationControllerReturn all the spaces id manageable by given user in Silverpeas- Specified by:
getUserManageableSpaceIdsin interfaceOrganizationController
-
getAllRootSpaceIds
public String[] getAllRootSpaceIds()
Description copied from interface:OrganizationControllerReturn all the root spaceIds- Specified by:
getAllRootSpaceIdsin interfaceOrganizationController
-
getAllRootSpaceIds
public String[] getAllRootSpaceIds(String sUserId)
Description copied from interface:OrganizationControllerReturn all the root spaceIds available for the user sUserId- Specified by:
getAllRootSpaceIdsin interfaceOrganizationController
-
getAllSubSpaceIds
public String[] getAllSubSpaceIds(String sSpaceId, String sUserId)
Description copied from interface:OrganizationControllerReturn all the subSpaces id available given a space id (driver format)- Specified by:
getAllSubSpaceIdsin interfaceOrganizationController
-
getAllComponentIds
public String[] getAllComponentIds(String sSpaceId)
Description copied from interface:OrganizationControllerReturns all the component identifiers of the space represented by the given identifier.Component instance of sub spaces are not retrieved.
It returns also ids of
SilverpeasPersonalComponentInstanceinstances.- Specified by:
getAllComponentIdsin interfaceOrganizationController
-
getAllComponentIdsRecur
public String[] getAllComponentIdsRecur(String sSpaceId)
Description copied from interface:OrganizationControllerReturns all the component identifiers of the space, and its sub spaces, represented by the given identifier.It returns also ids of
SilverpeasPersonalComponentInstanceinstances.- Specified by:
getAllComponentIdsRecurin interfaceOrganizationController
-
getRootSpacesContainingComponent
public List<SpaceInstLight> getRootSpacesContainingComponent(String userId, String componentName)
Description copied from interface:OrganizationControllerGets all the spaces at root level accessible by the specified user and containing at least one instance of the specified application.- Specified by:
getRootSpacesContainingComponentin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user in Silverpeas.componentName- the name of an application in Silverpeas.- Returns:
- a list of space instances.
-
getSubSpacesContainingComponent
public List<SpaceInstLight> getSubSpacesContainingComponent(String spaceId, String userId, String componentName)
Description copied from interface:OrganizationControllerGets all the subspaces of the given space accessible by the specified user and containing at least one instance of the specified application.- Specified by:
getSubSpacesContainingComponentin interfaceOrganizationController- Parameters:
spaceId- the unique identifier of a space in Silverpeas.userId- the unique identifier of a user in Silverpeas.componentName- the name of an application in Silverpeas.- Returns:
- a list of space instances.
-
isAdminTool
public boolean isAdminTool(String toolId)
Is the specified tool belongs to the administration component? The administration component (or administrative console) forms a particular component made up of several tools, each of them providing an administrative feature. Each tool in the administration component have the same identifier that refers in fact the administration console.- Specified by:
isAdminToolin interfaceOrganizationController- Parameters:
toolId- the unique identifier of the tool.- Returns:
- true if the tool belongs to the administration component.
-
isToolAvailable
public boolean isToolAvailable(String toolId)
Description copied from interface:OrganizationControllerIs the specified tool is available in Silverpeas? A tool in Silverpeas is a singleton component that is dedicated to a given user. Each tool is identified by a unique identifier, and it is unique to each user.- Specified by:
isToolAvailablein interfaceOrganizationController- Parameters:
toolId- the unique identifier of a tool.- Returns:
- true if the tool is available, false otherwise.
-
getAvailableComponentsByUser
public List<String> getAvailableComponentsByUser(String userId)
Description copied from interface:OrganizationControllerGets the component instance identifiers available for the specified user? A component is an application in Silverpeas to perform some tasks and to manage some resources. Each component in Silverpeas can be instantiated several times, each of them corresponding then to a running application in Silverpeas, and it is uniquely identified from others instances by a given identifier.- Specified by:
getAvailableComponentsByUserin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user.- Returns:
- a list of component instance identifier as string.
-
isComponentAvailableToUser
public boolean isComponentAvailableToUser(String componentId, String userId)
Description copied from interface:OrganizationControllerIs the specified component instance available among the components instances accessible by the specified user? A component is an application in Silverpeas to perform some tasks and to manage some resources. Each component in Silverpeas can be instantiated several times, each of them corresponding then to a running application in Silverpeas, and it is uniquely identified from others instances by a given identifier.- Specified by:
isComponentAvailableToUserin interfaceOrganizationController- Parameters:
componentId- the unique identifier of a component instance.userId- the unique identifier of a user.- Returns:
- true if the component instance is available, false otherwise.
-
isComponentAvailableToGroup
public boolean isComponentAvailableToGroup(String componentId, String groupId)
Description copied from interface:OrganizationControllerIs the specified component instance available among the components instances accessible by the specified group of users? A component is an application in Silverpeas to perform some tasks and to manage some resources. Each component in Silverpeas can be instantiated several times, each of them corresponding then to a running application in Silverpeas, and it is uniquely identified from others instances by a given identifier.- Specified by:
isComponentAvailableToGroupin interfaceOrganizationController- Parameters:
componentId- the unique identifier of a component instance.groupId- the unique identifier of a group of users.- Returns:
- true if the component instance is available, false otherwise.
-
isComponentExist
public boolean isComponentExist(String componentId)
Description copied from interface:OrganizationControllerIs the specified component instance exists in Silverpeas?- Specified by:
isComponentExistin interfaceOrganizationController- Parameters:
componentId- the unique identifier of a component instance.- Returns:
- true if a component instance exists in Silverpeas with the given identifier. False otherwise.
-
isComponentManageable
public boolean isComponentManageable(String componentId, String userId)
Description copied from interface:OrganizationControllerIs the specified component instance manageable by the given user? The component instance is manageable if the user has enough access right to manage it.- Specified by:
isComponentManageablein interfaceOrganizationController- Parameters:
componentId- the unique identifier of the component instance.userId- the unique identifier of a user.- Returns:
- true of the user can manage the specified component instance. False otherwise.
-
isSpaceAvailable
public boolean isSpaceAvailable(String spaceId, String userId)
Description copied from interface:OrganizationControllerIs the specified space is allowed to be accessed by the given user?- Specified by:
isSpaceAvailablein interfaceOrganizationController- Parameters:
spaceId- the unique identifier of a spaceuserId- the unique identifier of a user- Returns:
- true if user is allowed to access at least to one component instance in given space, false otherwise.
-
getUserSpaceAvailabilityChecker
public UserSpaceAvailabilityChecker getUserSpaceAvailabilityChecker(String userId)
Description copied from interface:OrganizationControllerThis method allows callers to perform several space availability checks for a given user.This is useful for treatments requiring highest performances than calling each time
OrganizationController.isSpaceAvailable(String, String)for example.IMPORTANT: the
UserSpaceAvailabilityCheckerMUST not be an attribute of a singleton instance.- Specified by:
getUserSpaceAvailabilityCheckerin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user- Returns:
- a
UserSpaceAvailabilityCheckerinstance initialized for the given user identifier.
-
isObjectAvailableToUser
public boolean isObjectAvailableToUser(ProfiledObjectId objectId, String componentId, String userId)
Description copied from interface:OrganizationControllerIs the specified resource protected by access rights in the given component instance is allowed to be accessed by the specified user?- Specified by:
isObjectAvailableToUserin interfaceOrganizationController- Parameters:
objectId- the unique identifier of a resource protected by access rights.componentId- the unique identifier of a component instance.userId- the unique identifier of a user in Silverpeas.- Returns:
- true if the user can access the given resource in the component instance. False otherwise.
-
isObjectAvailableToGroup
public boolean isObjectAvailableToGroup(ProfiledObjectId objectId, String componentId, String groupId)
Description copied from interface:OrganizationControllerIs the specified resource protected by access rights in the given component instance is allowed to be accessed by the specified group of users?- Specified by:
isObjectAvailableToGroupin interfaceOrganizationController- Parameters:
objectId- the unique identifier of a resource protected by access rights.componentId- the unique identifier of a component instance.groupId- the unique identifier of a group of users in Silverpeas.- Returns:
- true if the group can access the given resource in the component instance. False otherwise.
-
getSpaceTreeview
public List<SpaceInstLight> getSpaceTreeview(String userId)
Description copied from interface:OrganizationControllerGets the treeview of spaces in Silverpeas available to the specified user.- Specified by:
getSpaceTreeviewin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user.- Returns:
- a list of space instances accessible by the user and modeling a treeview.
-
getAllowedSubSpaceIds
public String[] getAllowedSubSpaceIds(String userId, String spaceFatherId)
Description copied from interface:OrganizationControllerGets the all the subspaces of the specified space accessible to the given user.- Specified by:
getAllowedSubSpaceIdsin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user.spaceFatherId- the unique identifier of a space.- Returns:
- an array with the identifiers of the subspaces.
-
getRootSpace
public SpaceInstLight getRootSpace(String spaceId)
Description copied from interface:OrganizationControllerGets the root space for which the specified space is a direct or indirect child. If the given space is yet a root space, it returns just its instance.- Specified by:
getRootSpacein interfaceOrganizationController- Parameters:
spaceId- the unique identifier of a space in Silverpeas.- Returns:
- the space instance representing the root space, parent of the given space, or null if the given space doesn't exist.
-
getAllUsersIds
public String[] getAllUsersIds()
Description copied from interface:OrganizationControllerReturn all the users of Silverpeas- Specified by:
getAllUsersIdsin interfaceOrganizationController
-
getUsersIdsByRoleNames
public String[] getUsersIdsByRoleNames(String componentId, List<String> profileNames)
Description copied from interface:OrganizationControllerReturn userIds according to a list of profile names- Specified by:
getUsersIdsByRoleNamesin interfaceOrganizationController- Parameters:
componentId- the instance idprofileNames- the list which contains the profile names- Returns:
- a string array of user id
-
getUsersIdsByRoleNames
public String[] getUsersIdsByRoleNames(String componentId, List<String> profileNames, boolean includeRemovedUsersAndGroups)
Description copied from interface:OrganizationControllerReturn userIds according to a list of profile names- Specified by:
getUsersIdsByRoleNamesin interfaceOrganizationController- Parameters:
componentId- the instance idprofileNames- the list which contains the profile namesincludeRemovedUsersAndGroups- users in removed state are taken into account- Returns:
- a string array of user id
-
getUsersIdsByRoleNames
public String[] getUsersIdsByRoleNames(String componentId, ProfiledObjectId objectId, List<String> profileNames)
Description copied from interface:OrganizationControllerGets the users playing the specified roles for the given protected resource in the specified component instance.- Specified by:
getUsersIdsByRoleNamesin interfaceOrganizationController- Parameters:
componentId- the unique identifier of a component instance.profileNames- the list which contains the profile names- Returns:
- an array with the user identifiers.
-
getUsersIdsByRoleNames
public String[] getUsersIdsByRoleNames(String componentId, ProfiledObjectId objectId, List<String> profileNames, boolean includeRemovedUsersAndGroups)
Description copied from interface:OrganizationControllerGets the users playing the specified roles for the given protected resource in the specified component instance.- Specified by:
getUsersIdsByRoleNamesin interfaceOrganizationController- Parameters:
componentId- the unique identifier of a component instance.profileNames- the list which contains the profile namesincludeRemovedUsersAndGroups- users in removed state are taken into account- Returns:
- an array with the user identifiers.
-
getDomain
public Domain getDomain(String domainId)
Description copied from interface:OrganizationControllerGets the domain with the specified identifier.- Specified by:
getDomainin interfaceOrganizationController- Parameters:
domainId- the unique identifier of a user domain.- Returns:
- a
Domaininstance or null if no such user domain exists.
-
getAllDomains
public Domain[] getAllDomains()
Description copied from interface:OrganizationControllerGets all the user domains defined in Silverpeas.- Specified by:
getAllDomainsin interfaceOrganizationController- Returns:
- an array of
Domaininstances.
-
getDirectGroupsOfUser
public List<GroupDetail> getDirectGroupsOfUser(String userId)
Description copied from interface:OrganizationControllerGets all the groups to which the specified user belongs explicitly. The parent groups to which the user doesn't belong directly but only by the children group(s) it belongs to aren't taken into account.- Specified by:
getDirectGroupsOfUserin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user.- Returns:
- a list of group of users to which the given user explicitly belongs.
-
getAllGroupIdsOfUser
public String[] getAllGroupIdsOfUser(String userId)
Description copied from interface:OrganizationControllerGets all the groups to which the specified user belongs. All the groups are taken into account, even those to which he doesn't belong directly but only by a child group.- Specified by:
getAllGroupIdsOfUserin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user.- Returns:
- an array with the identifier of all the groups the user is concerned.
-
getAllowedComponentIds
public String[] getAllowedComponentIds(String userId)
Description copied from interface:OrganizationControllerGets all the component instances in Silverpeas allowed to be accessed by the specified user.- Specified by:
getAllowedComponentIdsin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user.- Returns:
- an array with the identifier of the component instances accessible to the given user.
-
getSearchableComponentsByCriteria
public List<String> getSearchableComponentsByCriteria(ComponentSearchCriteria criteria)
Description copied from interface:OrganizationControllerGets the identifier of the component instances that are both searchable and that satisfy the specified criteria.- Specified by:
getSearchableComponentsByCriteriain interfaceOrganizationController- Parameters:
criteria- the criteria on the component instances to get.- Returns:
- a list of component instance identifiers.
-
getSpaceProfile
public SpaceProfile getSpaceProfile(String spaceId, SilverpeasRole role)
Description copied from interface:OrganizationControllerGets the space profile instance which provides all user and group identifiers through simple methods.- Specified by:
getSpaceProfilein interfaceOrganizationController- Parameters:
spaceId- the identifier of aimed space.role- the aimed technical role name.- Returns:
- the
SpaceProfileinstance.
-
getFullTreeview
public SpaceWithSubSpacesAndComponents getFullTreeview() throws AdminException
Description copied from interface:OrganizationControllerGets the complete treeview of spaces and component instances defined in Silverpeas.- Specified by:
getFullTreeviewin interfaceOrganizationController- Returns:
- a
SpaceWithSubSpacesAndComponentsinstance representing the complete treeview of the organizational resources defined in Silverpeas. - Throws:
AdminException- if an error occurs while computing the treeview.
-
getFullTreeview
public SpaceWithSubSpacesAndComponents getFullTreeview(String userId) throws AdminException
Description copied from interface:OrganizationControllerGets the complete treeview of spaces and component instances defined in Silverpeas accessible to the specified user.- Specified by:
getFullTreeviewin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user in Silverpeas.- Returns:
- a
SpaceWithSubSpacesAndComponentsinstance representing the complete treeview of the organizational resources defined in Silverpeas and accessible to the given user. - Throws:
AdminException- if an error occurs while computing the treeview.
-
getFullTreeviewOnComponentName
public SpaceWithSubSpacesAndComponents getFullTreeviewOnComponentName(String userId, String componentName) throws AdminException
Description copied from interface:OrganizationControllerGets the complete treeview of spaces and of instances of the specified application and that are accessible to the specified user.- Specified by:
getFullTreeviewOnComponentNamein interfaceOrganizationController- Parameters:
userId- the unique identifier of a user in Silverpeas.componentName- the name of an application in Silverpeas.- Returns:
- a
SpaceWithSubSpacesAndComponentsinstance representing the complete treeview accessible to the given user, with only as component instances those of the given application. - Throws:
AdminException- if an error occurs while computing the treeview.
-
getFullTreeview
public SpaceWithSubSpacesAndComponents getFullTreeview(String userId, String spaceId) throws AdminException
Description copied from interface:OrganizationControllerGets the complete treeview of spaces and component instances contained in the specified space and that are accessible to the specified user.- Specified by:
getFullTreeviewin interfaceOrganizationController- Parameters:
userId- the unique identifier of a user in Silverpeas.spaceId- the unique identifier of a space.- Returns:
- a
SpaceWithSubSpacesAndComponentsinstance representing the complete treeview rooted to the given space and accessible to the given user. - Throws:
AdminException- if an error occurs while computing the treeview.
-
getPathToSpace
@NonNull public List<SpaceInstLight> getPathToSpace(@NonNull String spaceId)
Description copied from interface:OrganizationControllerGets the path of the specified space in the organizational tree of Silverpeas.- Specified by:
getPathToSpacein interfaceOrganizationController- Parameters:
spaceId- the unique identifier of a space.- Returns:
- a list of space instances ordered from the root space to the specified one, each of them representing a node of the path.
-
getPathToComponent
public List<SpaceInstLight> getPathToComponent(String componentId)
Description copied from interface:OrganizationControllerGets the path of the specified component instance in the organizational tree of Silverpeas.- Specified by:
getPathToComponentin interfaceOrganizationController- Parameters:
componentId- the unique identifier of a component instance.- Returns:
- a list of space instances ordered from the root space to the space to which the component instance belongs directly. Each of then represents a node in the path to the given component instance.
-
-