Interface OrganizationController

    • Method Detail

      • getAllSpaceIds

        String[] getAllSpaceIds()
        Return all the spaces available in silverpeas
        Returns:
        an array with the identifiers of the spaces
      • getAllSubSpaceIds

        String[] getAllSubSpaceIds​(String sSpaceId)
        Return all the subSpaces available in silverpeas given a space id (driver format)
        Parameters:
        sSpaceId - the identifier of the parent space
        Returns:
        an array with the identifiers of the subspaces.
      • getSpaceNames

        String[] getSpaceNames​(String[] asSpaceIds)
        Return the spaces name corresponding to the given space ids.
        Parameters:
        asSpaceIds - one or more space identifiers.
        Returns:
        the names of the specified spaces
      • getSpaceInstLightById

        SpaceInstLight getSpaceInstLightById​(String spaceId)
        Return the space light corresponding to the given space id
        Parameters:
        spaceId - the unique identifier of a space.
        Returns:
        the space
      • getSpaceInstById

        SpaceInst getSpaceInstById​(String sSpaceId)
        Return the space Instance corresponding to the given space id
      • getAvailCompoIds

        String[] getAvailCompoIds​(String sClientSpaceId,
                                  String sUserId)
        Return the component ids available for the current user Id in the given space id
      • getAvailCompoIds

        String[] getAvailCompoIds​(String sUserId)
        Return the component ids available for the current user Id
      • getAvailCompoIdsAtRoot

        String[] getAvailCompoIdsAtRoot​(String sClientSpaceId,
                                        String sUserId)
        Return the component ids available for the current user id in the given space id
      • getCompoForUser

        CompoSpace[] getCompoForUser​(String sUserId,
                                     String sCompoName)
        Return the tuples (space id, compo id) allowed for the given user and given component name
        Parameters:
        sUserId - the identifier of a user
        sCompoName - the name of a component
        Returns:
        an array of tuples (space id, component instance id) of resources available by the user
      • getAvailComponentInstLights

        List<ComponentInstLight> getAvailComponentInstLights​(String userId,
                                                             String componentName)
        Gets the available component for a given user
        Parameters:
        userId - user identifier used to get component
        componentName - type of component to retrieve ( for example : kmelia, forums, blog)
        Returns:
        a list of ComponentInstLight object
      • getComponentIdsForUser

        String[] getComponentIdsForUser​(String sUserId,
                                        String sCompoName)
      • getCompoId

        String[] getCompoId​(String sCompoName)
        Return the compo id for the given component name
        Parameters:
        sCompoName - the name of a component
        Returns:
        an array of identifiers of instances of the given component
      • getComponentParameterValue

        String getComponentParameterValue​(String sComponentId,
                                          String parameterName)
      • getParameterValuesByComponentIdThenByParamName

        Map<String,​Map<String,​String>> getParameterValuesByComponentIdThenByParamName​(Collection<String> componentIds,
                                                                                                  Collection<String> paramNames)
        Gets all parameters values by component and by parameter name.
        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

        Optional<SilverpeasComponentInstance> getComponentInstance​(String componentInstanceIdentifier)
        Gets the component instance related to the given identifier.
        In contrary to getComponentInst(String), getComponentInstLight(String) signatures, this one is able to return different kinds of implementation of SilverpeasComponentInstance and it is able to deal with administration cache too.
        So, this signature is useful into contexts of transverse treatments.
        Parameters:
        componentInstanceIdentifier - the identifier of the requested component instance.
        Returns:
        an optional component instance.
      • getComponentInst

        ComponentInst getComponentInst​(String sComponentId)
        Return the component Instance corresponding to the given component id
      • getComponentInstLight

        ComponentInstLight getComponentInstLight​(String sComponentId)
        Return the component Instance Light corresponding to the given component id
      • getUserFull

        UserFull getUserFull​(String sUserId)
        Return the full detail of the user with the given ldap Id
      • getUserDetail

        <T extends User> T getUserDetail​(String sUserId)
        Return the detail of the user with the given ldap Id
      • getUserDetails

        <T extends User> T[] getUserDetails​(String[] asUserIds)
        Return an array of users corresponding to the given user Id array
      • getAllUsers

        <T extends User> T[] getAllUsers​(String componentId)
        Return all the users allowed to acces the given component
      • getAllUsersInDomain

        <T extends User> T[] getAllUsersInDomain​(String domainId)
        Gets all the users that belong to the specified domain.
        Parameters:
        domainId - the unique identifier of the domain.
        Returns:
        an array of users objects or null if no such domain exists.
      • searchUsers

        <T extends UserSilverpeasList<T> searchUsers​(UserDetailsSearchCriteria criteria)
        Searches the users that match the specified criteria.
        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

        <T extends Group> T[] getAllRootGroupsInDomain​(String domainId)
        Gets all the user groups that belong to the specified domain.
        Parameters:
        domainId - the unique identifier of the domain.
        Returns:
        an array of Group objects or null if no such domain exists.
      • getFilteredDirectUsers

        <T extends User> T[] getFilteredDirectUsers​(String sGroupId,
                                                    String sUserLastNameFilter)
        For use in userPanel : return the users that are direct child of a given group
      • searchGroups

        <T extends GroupSilverpeasList<T> searchGroups​(GroupsSearchCriteria criteria)
        Searches the groups that match the specified criteria.
        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

        int getAllSubUsersNumber​(String sGroupId)
        Returns the total number of distinct users recursively contained in the specified group
      • getAllSubGroups

        <T extends Group> T[] getAllSubGroups​(String parentGroupId)
        For use in userPanel : return the direct sub-groups
      • getRecursivelyAllSubgroups

        <T extends Group> T[] getRecursivelyAllSubgroups​(String parentGroupId)
        Gets all the groups and sub groups that are children of the specified group.
        Type Parameters:
        T - the concrete type of the Group instances to return.
        Parameters:
        parentGroupId - the unique identifier of a group.
        Returns:
        an array with all the groups that are children of the specified group.
      • getAllUsers

        <T extends User> T[] getAllUsers()
        Return all the users of Silverpeas
      • getUsers

        <T extends User> T[] getUsers​(String sPrefixTableName,
                                      String sComponentName,
                                      String sProfile)
        Return all the users with the given profile allowed to access the given component of the given space
      • getUserProfilesByComponentId

        Map<String,​Set<String>> getUserProfilesByComponentId​(String userId,
                                                                   Collection<String> componentIds)
        Gets the profile names of given user indexed by the given component instances.
        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.
      • getUserProfilesByComponentIdAndObjectId

        Map<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.
        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.
      • getAdministratorUserIds

        String[] getAdministratorUserIds​(String fromUserId)
        Return all administrators ids
      • getGroup

        <T extends Group> T getGroup​(String sGroupId)
        Return the Group of the group with the given Id
      • getGroups

        <T extends Group> T[] getGroups​(String[] groupsId)
        Return all groups specified by the groupsIds
      • getAllGroups

        <T extends Group> T[] getAllGroups()
        Return all the groups of silverpeas
      • getAllRootGroups

        <T extends Group> T[] getAllRootGroups()
        Return all root groups of silverpeas or null if an error occured when getting the root groups.
      • getAllUsersOfGroup

        <T extends User> T[] getAllUsersOfGroup​(String groupId)
        Get ALL the users that are in a group or his sub groups
      • getPathToGroup

        List<String> getPathToGroup​(String groupId)
        Get path to Group
      • getAllSpaceIds

        String[] getAllSpaceIds​(String sUserId)
      • getUserManageableSpaceIds

        String[] getUserManageableSpaceIds​(String sUserId)
        Return all the spaces Id manageable by given user in Silverpeas
      • getAllRootSpaceIds

        String[] getAllRootSpaceIds()
        Return all the root spaceIds
      • getAllRootSpaceIds

        String[] getAllRootSpaceIds​(String sUserId)
        Return all the root spaceIds available for the user sUserId
      • getAllSubSpaceIds

        String[] getAllSubSpaceIds​(String sSpaceId,
                                   String sUserId)
        Return all the subSpaces Id available in webactiv given a space id (driver format)
      • getAllComponentIds

        String[] getAllComponentIds​(String sSpaceId)
        Returns 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 SilverpeasPersonalComponentInstance instances.

      • getAllComponentIdsRecur

        String[] getAllComponentIdsRecur​(String sSpaceId)
        Returns all the component identifiers of the space, and its sub spaces, represented by the given identifier.

        It returns also ids of SilverpeasPersonalComponentInstance instances.

      • isToolAvailable

        boolean isToolAvailable​(String toolId)
      • getAvailableComponentsByUser

        List<String> getAvailableComponentsByUser​(String userId)
        Gets 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.
        Parameters:
        userId - the unique identifier of a user.
        Returns:
        a list of component instance identifier as string.
      • isComponentAvailableToUser

        boolean isComponentAvailableToUser​(String componentId,
                                           String userId)
        Is 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.
        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

        boolean isComponentAvailableToGroup​(String componentId,
                                            String groupId)
      • isComponentExist

        boolean isComponentExist​(String componentId)
      • isComponentManageable

        boolean isComponentManageable​(String componentId,
                                      String userId)
      • isSpaceAvailable

        boolean isSpaceAvailable​(String spaceId,
                                 String userId)
      • getAllowedSubSpaceIds

        String[] getAllowedSubSpaceIds​(String userId,
                                       String spaceFatherId)
      • getAllUsersIds

        String[] getAllUsersIds()
        Return all the users of Silverpeas
      • getUsersIdsByRoleNames

        String[] getUsersIdsByRoleNames​(String componentId,
                                        List<String> profileNames)
        Return userIds according to a list of profile names
        Parameters:
        componentId - the instance id
        profileNames - the list which contains the profile names
        Returns:
        a string array of user id
      • getAllDomains

        Domain[] getAllDomains()
      • getAllGroupIdsOfUser

        String[] getAllGroupIdsOfUser​(String userId)
      • isAnonymousAccessActivated

        boolean isAnonymousAccessActivated()
        Is the anonymous access is activated for the running Silverpeas? When the anonymous access is activated, then a specific user for anonymous access should be set; all anonym accesses to the running Silverpeas are done with this user profile.
        Returns:
        true if the anonym access is activated, false otherwise.
      • getAllowedComponentIds

        String[] getAllowedComponentIds​(String userId)
      • getAllUsersFromNewestToOldest

        <T extends UserList<T> getAllUsersFromNewestToOldest()
      • getUsersOfDomainsFromNewestToOldest

        <T extends UserList<T> getUsersOfDomainsFromNewestToOldest​(List<String> domainIds)
      • getUsersOfDomains

        <T extends UserList<T> getUsersOfDomains​(List<String> domainIds)
      • isAdminTool

        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.
        Parameters:
        toolId - the unique identifier of the tool.
        Returns:
        true if the tool belongs to the administration component.
      • getSearchableComponentsByCriteria

        List<String> getSearchableComponentsByCriteria​(ComponentSearchCriteria criteria)
        Gets the identifier of the component instances that are both searchable and that satisfy the specified criteria.
        Parameters:
        criteria - the criteria on the component instances to get.
        Returns:
        a list of component instance identifiers.
      • getSpaceProfile

        SpaceProfile getSpaceProfile​(String spaceId,
                                     SilverpeasRole role)
        Gets the space profile instance which provides all user and group identifiers through simple methods.
        Parameters:
        spaceId - the identifier of aimed space.
        role - the aimed technical role name.
        Returns:
        the SpaceProfile instance.