Interface Administration


  • public interface Administration
    This interface defines all the required services to manage administration data (domains, spaces, components, users, groups,...).
    Author:
    Yohann Chastagnier
    • Method Detail

      • reloadCache

        void reloadCache()
      • initSynchronization

        void initSynchronization()
      • createSpaceIndex

        void createSpaceIndex​(int spaceId)
      • createSpaceIndex

        void createSpaceIndex​(SpaceInstLight spaceInst)
      • deleteSpaceIndex

        void deleteSpaceIndex​(SpaceInst spaceInst)
      • deleteAllSpaceIndexes

        void deleteAllSpaceIndexes()
      • addSpaceInst

        String addSpaceInst​(String userId,
                            SpaceInst spaceInst)
                     throws AdminException
        add a space instance in database
        Parameters:
        userId - Id of user who add the space
        spaceInst - SpaceInst object containing information about the space to be created
        Returns:
        the created space id
        Throws:
        AdminException
      • deleteSpaceInstById

        String deleteSpaceInstById​(String userId,
                                   String spaceId,
                                   boolean definitive)
                            throws AdminException
        Delete the given space. It is applied recursively to the sub-spaces
        Parameters:
        userId - Id of user who deletes the space
        spaceId - Id of the space to be deleted
        definitive - is the deletion is definitive?
        Returns:
        the deleted space id
        Throws:
        AdminException - if an error occurs while deleting the space.
      • restoreSpaceFromBasket

        void restoreSpaceFromBasket​(String spaceId)
                             throws AdminException
        Restores the space from the basket.
        Parameters:
        spaceId - the unique identifier of the space to restore.
        Throws:
        AdminException - if an error occurs while restoring the space.
      • getSpaceInstById

        SpaceInst getSpaceInstById​(String spaceId)
                            throws AdminException
        Get the space instance with the given space id.
        Parameters:
        spaceId - client space id
        Returns:
        Space information as SpaceInst object.
        Throws:
        AdminException - if an error occurs while getting the space.
      • getAllSubSpaceIds

        String[] getAllSubSpaceIds​(String domainFatherId)
                            throws AdminException
        Get all the subspaces Ids available in Silverpeas given a domainFatherId (client id format)
        Parameters:
        domainFatherId - Id of the father space
        Returns:
        an array of String containing the ids of spaces that are child of given space.
        Throws:
        AdminException - if an error occurs all the subspaces.
      • updateSpaceInst

        String updateSpaceInst​(SpaceInst spaceInstNew)
                        throws AdminException
        Updates the space (with the given name) with the given space Updates only the node
        Parameters:
        spaceInstNew - SpaceInst object containing new information for space to be updated
        Returns:
        the updated space id.
        Throws:
        AdminException - if an error occurs while updating the space.
      • isSpaceInstExist

        boolean isSpaceInstExist​(String spaceId)
                          throws AdminException
        Tests if a space with given space id exists.
        Parameters:
        spaceId - if of space to be tested
        Returns:
        true if the given space instance name is an existing space
        Throws:
        AdminException
      • getAllRootSpaceIds

        String[] getAllRootSpaceIds()
                             throws AdminException
        Return all the root spaces Ids available in Silverpeas.
        Returns:
        all the root spaces Ids available in Silverpeas.
        Throws:
        AdminException - if an error occurs
      • getPathToComponent

        List<SpaceInstLight> getPathToComponent​(String componentId)
                                         throws AdminException
        Retrieve spaces from root to component
        Parameters:
        componentId - the target component
        Returns:
        a List of SpaceInstLight
        Throws:
        AdminException - if an error occurs
      • getPathToSpace

        List<SpaceInstLight> getPathToSpace​(String spaceId,
                                            boolean includeTarget)
                                     throws AdminException
        Retrieve all the spaces that are parent to the given space up to the root space.
        Parameters:
        spaceId - the target space
        includeTarget - is the target space should be included with the returned spaces.
        Returns:
        an ordered list of space, from the root space down to the targeted space.
        Throws:
        AdminException - if an error occurs
      • getAllSpaceIds

        String[] getAllSpaceIds()
                         throws AdminException
        Return the all the spaces Ids available in Silverpeas.
        Returns:
        the all the spaces Ids available in Silverpeas.
        Throws:
        AdminException - if an error occurs
      • getSpaceNames

        String[] getSpaceNames​(String[] asClientSpaceIds)
                        throws AdminException
        Return the spaces name corresponding to the given space ids
        Parameters:
        asClientSpaceIds - the global space identifiers
        Returns:
        the name of the specified spaces
        Throws:
        AdminException - if an error occurs
      • getAllWAComponents

        Map<String,​WAComponent> getAllWAComponents()
        Return all the components of silverpeas read in the xmlComponent directory.
        Returns:
        all the components of silverpeas read in the xmlComponent directory.
      • getComponentInst

        ComponentInst getComponentInst​(String sClientComponentId)
                                throws AdminException
        Return the component Inst corresponding to the given ID
        Parameters:
        sClientComponentId - the global component instance identifier.
        Returns:
        the component Inst corresponding to the given ID
        Throws:
        AdminException - if an error occurs
      • getComponentInstLight

        ComponentInstLight getComponentInstLight​(String componentId)
                                          throws AdminException
        Return the component Inst Light corresponding to the given ID
        Parameters:
        componentId - the component instance identifier
        Returns:
        the component Inst Light corresponding to the given ID
        Throws:
        AdminException - if an error occurs
      • getComponentParameters

        List<Parameter> getComponentParameters​(String componentId)
        Get the parameters for the given component.
        Parameters:
        componentId - the component instance identifier
        Returns:
        the parameters for the given component.
      • getComponentParameterValue

        String getComponentParameterValue​(String componentId,
                                          String parameterName)
        Return the value of the parameter for the given component and the given name of parameter
        Parameters:
        componentId - the component instance identifier
        parameterName - the name of the parameter
        Returns:
        the value of the parameter for the given component and the given name of parameter
      • 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.
      • createComponentIndex

        void createComponentIndex​(String componentId)
        Create the index for the specified component.
        Parameters:
        componentId - the unique identifier of a component instance
      • createComponentIndex

        void createComponentIndex​(SilverpeasComponentInstance componentInst)
        Create the index for the specified component.
        Parameters:
        componentInst - a component instance
      • deleteAllComponentIndexes

        void deleteAllComponentIndexes()
      • deleteComponentInst

        String deleteComponentInst​(String userId,
                                   String componentId,
                                   boolean definitive)
                            throws AdminException
        Delete the specified component.
        Parameters:
        userId - the unique identifier of a user
        componentId - the unique identifier of a component instance
        definitive - is the deletion definitive?
        Returns:
        the identifier of the deleted component instance.
        Throws:
        AdminException - if an error occurs
      • updateComponentInst

        String updateComponentInst​(ComponentInst component)
                            throws AdminException
        Update the given component in Silverpeas.
        Parameters:
        component - the component instance.
        Returns:
        the unique identifier of the updated component instance.
        Throws:
        AdminException - if an error occurs
      • setSpaceProfilesToSubSpace

        void setSpaceProfilesToSubSpace​(SpaceInst subSpace,
                                        SpaceInst space)
                                 throws AdminException
        Set space profiles to a subspace. There is no persistance. The subspace object is enriched.
        Parameters:
        subSpace - the object to set profiles
        space - the object to get profiles
        Throws:
        AdminException - if an error occurs
      • moveComponentInst

        void moveComponentInst​(String spaceId,
                               String componentId,
                               String idComponentBefore,
                               ComponentInst[] componentInsts)
                        throws AdminException
        Move the given component in Silverpeas.
        Parameters:
        spaceId - the unique identifier of the targeted space.
        componentId - the unique identifier of the component.
        idComponentBefore - the unique identifier of the component placed before the new position of the component in the targeted space.
        componentInsts - the list of component instances in the targeted spaces.
        Throws:
        AdminException - if an error occurs
      • getRequestRouter

        String getRequestRouter​(String sComponentName)
      • getAllProfilesNames

        String[] getAllProfilesNames​(String sComponentName)
        Get all the profiles name available for the given component.
        Parameters:
        sComponentName - the unique identifier of the component instance.
        Returns:
        an array of role profiles defined for the given component instance.
      • getProfileLabelFromName

        String getProfileLabelFromName​(String sComponentName,
                                       String sProfileName,
                                       String lang)
        Get the profile label from its name.
        Parameters:
        sComponentName - the unique identifier of the component instance.
        sProfileName - the name of the role profile
        Returns:
        the label of the profile
      • getProfileInst

        ProfileInst getProfileInst​(String sProfileId)
                            throws AdminException
        Get the profile instance corresponding to the given id
        Parameters:
        sProfileId - the unique identifier of the profile.
        Returns:
        the role profile
        Throws:
        AdminException - if an error occurs
      • getUserProfilesByComponentIdAndObjectId

        Map<Pair<String,​String>,​Set<String>> getUserProfilesByComponentIdAndObjectId​(ProfiledObjectIds profiledObjectIds,
                                                                                                 Collection<String> componentIds,
                                                                                                 String userId)
                                                                                          throws AdminException
        Gets the profile names of given user indexed by couple of given component instances and object instances.
        Parameters:
        profiledObjectIds - if NOTHING is given, then all the rows associated to the type are returned, otherwise all the rows associated to type and ids.
        componentIds - list of component instance identifier as string.
        userId - a user identifier as string.
        Returns:
        a map filled with list of profile name as string by couple component instance identifier as string - object identifier as integer.
        Throws:
        AdminException
      • getSpaceProfileInst

        SpaceProfileInst getSpaceProfileInst​(String spaceProfileId)
                                      throws AdminException
        Get the space profile instance corresponding to the given ID
        Parameters:
        spaceProfileId - the unique profile identifier.
        Returns:
        the profile instance.
        Throws:
        AdminException - if an error occurs
      • getGroupNames

        String[] getGroupNames​(String[] groupIds)
                        throws AdminException
        Get the group names corresponding to the given group ids.
        Parameters:
        groupIds - one or more identifiers of user groups.
        Returns:
        the name of the specified groups.
        Throws:
        AdminException - if an error occurs
      • getGroupName

        String getGroupName​(String sGroupId)
                     throws AdminException
        Get the group name corresponding to the given group id.
        Parameters:
        sGroupId - the unique identifier of a group.
        Returns:
        the name of the group.
        Throws:
        AdminException - if an error occurs
      • isGroupExist

        boolean isGroupExist​(String groupName)
                      throws AdminException
        Tests if GroupState.VALID group exists in Silverpeas.
        Parameters:
        groupName - the name of a group
        Returns:
        true if a group with the given name
        Throws:
        AdminException - if an error occurs
      • getGroup

        GroupDetail getGroup​(String groupId)
                      throws AdminException
        Get group information with the given id
        Parameters:
        groupId - the unique identifier of a group
        Returns:
        a user group instance.
        Throws:
        AdminException - if an error occurs
      • getGroupByNameInDomain

        GroupDetail getGroupByNameInDomain​(String groupName,
                                           String domainFatherId)
                                    throws AdminException
        Get group information with the given group name.
        Parameters:
        groupName - the name of the group.
        domainFatherId - the identifier of a user domain.
        Returns:
        a user group instance.
        Throws:
        AdminException - if an error occurs
      • getGroups

        GroupDetail[] getGroups​(String[] asGroupId)
                         throws AdminException
        Get groups information with the given ids.
        Parameters:
        asGroupId - one or more group identifiers.
        Returns:
        the group instances of the specified identifiers.
        Throws:
        AdminException - if an error occurs
      • addGroup

        String addGroup​(GroupDetail group)
                 throws AdminException
        Add the given group in Silverpeas.
        Parameters:
        group - a user group.
        Returns:
        the identifier of the new group.
        Throws:
        AdminException - if an error occurs
      • addGroup

        String addGroup​(GroupDetail group,
                        boolean onlyInSilverpeas)
                 throws AdminException
        Add the given group in Silverpeas.
        Parameters:
        group - a user group.
        onlyInSilverpeas - performs the operation only in Silverpeas
        Returns:
        the identifier of the new group
        Throws:
        AdminException - if an error occurs
      • restoreGroup

        List<GroupDetail> restoreGroup​(String groupId)
                                throws AdminException
        Restores the given group from silverpeas and specific domain
        Parameters:
        groupId - the group identifier
        Returns:
        all the group instance which have been restored from the given one.
        Throws:
        AdminException - if an error occurs
      • removeGroup

        List<GroupDetail> removeGroup​(String groupId)
                               throws AdminException
        Removes the given group from silverpeas and specific domain
        Parameters:
        groupId - the group identifier
        Returns:
        all the group instance which have been removed from the given one.
        Throws:
        AdminException - if an error occurs
      • deleteGroupById

        List<GroupDetail> deleteGroupById​(String sGroupId)
                                   throws AdminException
        Delete the group with the given Id. The deletion is applied recursively to the subgroups.
        Parameters:
        sGroupId - the unique identifier of a group
        Returns:
        the identifier of the deleted group.
        Throws:
        AdminException - if an error occurs
      • deleteGroupById

        List<GroupDetail> deleteGroupById​(String sGroupId,
                                          boolean onlyInSilverpeas)
                                   throws AdminException
        Delete the group with the given id. The deletion is applied recursively to the subgroups.
        Parameters:
        sGroupId - the unique identifier of a group.
        onlyInSilverpeas - performs the operation only in Silverpeas.
        Returns:
        the identifier of the deleted group.
        Throws:
        AdminException - if an error occurs.
      • updateGroup

        String updateGroup​(GroupDetail group)
                    throws AdminException
        Update the given group in Silverpeas and specific.
        Parameters:
        group - the group to update
        Returns:
        the unique identifier of the updated group
        Throws:
        AdminException - if an error occurs
      • updateGroup

        String updateGroup​(GroupDetail group,
                           boolean onlyInSilverpeas)
                    throws AdminException
        Update the given group in Silverpeas and specific
        Parameters:
        group - the group to update
        onlyInSilverpeas - performs the operation only in Silverpeas
        Returns:
        the unique identifier of the updated group
        Throws:
        AdminException - if an error occurs
      • getAllRootGroups

        List<GroupDetail> getAllRootGroups()
                                    throws AdminException
        Gets all GroupState.VALID root groups in Silverpeas. A root group is the group of users without any other parent group.
        Returns:
        a list of user groups.
        Throws:
        AdminException - if an error occurs whil getting the root user groups.
      • getUserDetail

        UserDetail getUserDetail​(String sUserId)
                          throws AdminException
        Get the user detail corresponding to the given user Id
        Parameters:
        sUserId - the user id.
        Returns:
        the user detail corresponding to the given user Id
        Throws:
        AdminException - if an error occurs
      • getUserDetails

        UserDetail[] getUserDetails​(String[] userIds)
        Get the user details corresponding to the given user Ids.
        Parameters:
        userIds - one or more user identifiers
        Returns:
        the user details corresponding to the given user Ids.
      • getAllUsers

        List<UserDetail> getAllUsers()
                              throws AdminException
        Get all users (except delete ones) from all domains.
        Returns:
        the user details from all domains sort by alphabetical order
        Throws:
        AdminException - if an error occurs
      • getAllUsersFromNewestToOldest

        List<UserDetail> getAllUsersFromNewestToOldest()
                                                throws AdminException
        Get all users (except delete ones) from all domains.
        Returns:
        the user details from all domains sort by reverse creation order
        Throws:
        AdminException - if an error occurs
      • isEmailExisting

        boolean isEmailExisting​(String email)
                         throws AdminException
        Checks if an existing user already have the given email
        Parameters:
        email - email to check
        Returns:
        true if at least one user with given email is found
        Throws:
        AdminException - if an error occurs
      • getUserIdByLoginAndDomain

        String getUserIdByLoginAndDomain​(String sLogin,
                                         String sDomainId)
                                  throws AdminException
        Get the user id corresponding to Domain/Login (ignoring the login case)
        Parameters:
        sLogin - the user login
        sDomainId - the domain of the user
        Returns:
        the unique identifier of the user
        Throws:
        AdminException - if an error occurs
      • getUserIdByAuthenticationKey

        String getUserIdByAuthenticationKey​(String authenticationKey)
                                     throws AdminException
        Parameters:
        authenticationKey - The authentication key.
        Returns:
        The user id corresponding to the authentication key.
        Throws:
        AdminException - if an error occurs
      • getUserFull

        UserFull getUserFull​(String sUserId)
                      throws AdminException
        Get full information about the user with the given unique identifier (only info in cache table) from its domain.
        Parameters:
        sUserId - the unique identifier of the user to get.
        Returns:
        a UserFull instance.
        Throws:
        AdminException - if an error occurs while getting the user.
      • getUserFulls

        List<UserFull> getUserFulls​(Collection<String> userIds)
                             throws AdminException
        Gets full information about users corresponding to given unique identifiers (only info in cache table) from its domain.
        Parameters:
        userIds - the unique identifiers of user to get.
        Returns:
        list of UserFull instance.
        Throws:
        AdminException - if an error occurs while getting the user.
      • addUser

        String addUser​(UserDetail userDetail)
                throws AdminException
        Add the given user in Silverpeas and specific domain.
        Parameters:
        userDetail - a user
        Returns:
        the new user id.
        Throws:
        AdminException - if an error occurs
      • addUser

        String addUser​(UserDetail userDetail,
                       boolean addOnlyInSilverpeas)
                throws AdminException
        Add the given user in Silverpeas and specific domain
        Parameters:
        userDetail - user to add
        addOnlyInSilverpeas - true if user must not be added in distant datasource (used by synchronization tools)
        Returns:
        id of created user
        Throws:
        AdminException
      • blockUser

        void blockUser​(String userId)
                throws AdminException
        Blocks the user represented by the given identifier.
        Parameters:
        userId - the unique identifier of the user
        Throws:
        AdminException - if an error occurs
      • unblockUser

        void unblockUser​(String userId)
                  throws AdminException
        Unblock the user represented by the given identifier.
        Parameters:
        userId - the unique identifier of the user
        Throws:
        AdminException - if an error occurs
      • deactivateUser

        void deactivateUser​(String userId)
                     throws AdminException
        Deactivates the user represented by the given identifier.
        Parameters:
        userId - the unique identifier of the user
        Throws:
        AdminException - if an error occurs
      • activateUser

        void activateUser​(String userId)
                   throws AdminException
        Activate the user represented by the given identifier.
        Parameters:
        userId - the unique identifier of the user
        Throws:
        AdminException - if an error occurs
      • userAcceptsTermsOfService

        void userAcceptsTermsOfService​(String userId)
                                throws AdminException
        Updates the acceptance date of a user from its id.
        Parameters:
        userId - the unique identifier of the user
        Throws:
        AdminException - if an error occurs
      • restoreUser

        String restoreUser​(String sUserId)
                    throws AdminException
        Restores the given user from silverpeas and specific domain
        Parameters:
        sUserId - the user identifier
        Returns:
        the user identifier
        Throws:
        AdminException - if an error occurs
      • removeUser

        String removeUser​(String sUserId)
                   throws AdminException
        Removes the given user from silverpeas and specific domain
        Parameters:
        sUserId - the user identifier
        Returns:
        the user identifier
        Throws:
        AdminException - if an error occurs
      • deleteUser

        String deleteUser​(String sUserId)
                   throws AdminException
        Delete the given user from silverpeas and specific domain
        Parameters:
        sUserId - the user identifier
        Returns:
        the user identifier
        Throws:
        AdminException - if an error occurs
      • deleteUser

        String deleteUser​(String sUserId,
                          boolean onlyInSilverpeas)
                   throws AdminException
        Delete the given user from silverpeas and specific domain
        Parameters:
        sUserId - the user identifier
        onlyInSilverpeas - performs the operation only in Silverpeas
        Returns:
        the user identifier
        Throws:
        AdminException - if an error occurs
      • updateUserFull

        String updateUserFull​(UserFull user)
                       throws AdminException
        Update the given user in Silverpeas and specific domain
        Parameters:
        user - the user
        Returns:
        the user identifier
        Throws:
        AdminException - if an error occurs
      • getClientSpaceId

        String getClientSpaceId​(String sDriverSpaceId)
        Converts driver space id to client space id
        Parameters:
        sDriverSpaceId - the local space identifier
        Returns:
        the global space identifier
      • getClientSpaceIds

        String[] getClientSpaceIds​(String[] asDriverSpaceIds)
        Converts driver space ids to client space ids
        Parameters:
        asDriverSpaceIds - one or more local space identifiers
        Returns:
        the global identifier of the specified spaces.
      • addDomain

        String addDomain​(Domain theDomain)
                  throws AdminException
        Create a new domain
        Parameters:
        theDomain - the user domain to create.
        Returns:
        the unique identifier of the domain
        Throws:
        AdminException
      • updateDomain

        String updateDomain​(Domain domain)
                     throws AdminException
        Update a domain
        Parameters:
        domain - the domain to update
        Returns:
        the unique identifier of the updated domain.
        Throws:
        AdminException
      • removeDomain

        String removeDomain​(String domainId)
                     throws AdminException
        Remove a domain
        Parameters:
        domainId - the unique identifier of a domain
        Returns:
        the unique identifier of the deleted domain
        Throws:
        AdminException
      • getAllDomainIdsForLogin

        List<String> getAllDomainIdsForLogin​(String login)
                                      throws AdminException
        Get all domain ids for the specified login.
        Parameters:
        login - a user login
        Returns:
        a list of all domains for which the given user login exists
        Throws:
        AdminException
      • getUsersOfDomains

        List<UserDetail> getUsersOfDomains​(List<String> domainIds)
                                    throws AdminException
        Get all users (except delete ones) from specified domains.
        Parameters:
        domainIds - a list of domain identifiers
        Returns:
        the user details from specified domains sort by alphabetical order
        Throws:
        AdminException - if an error occurs
      • getUsersOfDomainsFromNewestToOldest

        List<UserDetail> getUsersOfDomainsFromNewestToOldest​(List<String> domainIds)
                                                      throws AdminException
        Get all users (except delete ones) from specified domains.
        Parameters:
        domainIds - a list of domain identifiers.
        Returns:
        the user details from specified domains sort by reverse creation order
        Throws:
        AdminException - if an error occurs
      • getUserSpaceIds

        String[] getUserSpaceIds​(String sUserId)
                          throws AdminException
        Get the spaces ids allowed for the given user
        Parameters:
        sUserId - the unique identifier of a user
        Returns:
        the unique identifier of the allowed spaces.
        Throws:
        AdminException - if an error occurs
      • getUserRootSpaceIds

        String[] getUserRootSpaceIds​(String sUserId)
                              throws AdminException
        Get the root spaces ids allowed for the given user
        Parameters:
        sUserId - the unique identifier of a user
        Returns:
        the unique identifier of the allowed root spaces.
        Throws:
        AdminException - if an error occurs
      • getUserSubSpaceIds

        String[] getUserSubSpaceIds​(String sUserId,
                                    String spaceId)
                             throws AdminException
        Get the subspaces ids in the specified space that are allowed for the given user
        Parameters:
        sUserId - the unique identifier of a user
        spaceId - the unique identifier of the space parent.
        Returns:
        the unique identifier of the allowed root spaces.
        Throws:
        AdminException - if an error occurs
      • isSpaceAvailable

        boolean isSpaceAvailable​(String userId,
                                 String spaceId)
                          throws AdminException
        This method permit knowing if the given space is allowed to the given user.
        Parameters:
        userId - the unique identifier of a user
        spaceId - the unique identifier of a space
        Returns:
        true if user is allowed to access to one component (at least) in given space, false otherwise.
        Throws:
        AdminException - if an error occurs
      • getAvailCompoInSpace

        List<ComponentInstLight> getAvailCompoInSpace​(String userId,
                                                      String spaceId)
                                               throws AdminException
        Get components of a given space (and subspaces) available to a user.
        Parameters:
        userId - the unique identifier of a user
        spaceId - the unique identifier of a space
        Returns:
        a list of ComponentInstLight
        Throws:
        AdminException - if an error occurs
      • getUserSpaceTreeview

        List<SpaceInstLight> getUserSpaceTreeview​(String userId)
                                           throws AdminException
        Get all spaces available to a user. N levels compliant. Infos of each space are in SpaceInstLight object.
        Parameters:
        userId - the unique identifier of a user
        Returns:
        an ordered list of SpaceInstLight. Built according a depth-first algorithm.
        Throws:
        AdminException - if an error occurs
      • getSpaceInstLightById

        SpaceInstLight getSpaceInstLightById​(String sClientSpaceId)
                                      throws AdminException
        Get the space instance light (only space id, father id and name) with the given space id
        Parameters:
        sClientSpaceId - client space id (as WAxx)
        Returns:
        Space information as SpaceInstLight object
        Throws:
        AdminException - if an error occurs
      • getRootSpace

        SpaceInstLight getRootSpace​(String spaceId)
                             throws AdminException
        Return the higher space according to a subspace (N level compliant)
        Parameters:
        spaceId - the subspace id
        Returns:
        a SpaceInstLight object
        Throws:
        AdminException - if an error occurs
      • getGroupManageableSpaceIds

        String[] getGroupManageableSpaceIds​(String sGroupId)
                                     throws AdminException
        Get the spaces ids manageable by given group id
        Parameters:
        sGroupId - the unique identifier of a group
        Returns:
        an array of space identifiers.
        Throws:
        AdminException - if an error occurs
      • getUserManageableSpaceIds

        String[] getUserManageableSpaceIds​(String sUserId)
                                    throws AdminException
        Get the spaces ids manageable by given user id
        Parameters:
        sUserId - the unique identifier of a user
        Returns:
        an array of space identifiers
        Throws:
        AdminException - if an error occurs
      • getUserManageableSpaceRootIds

        String[] getUserManageableSpaceRootIds​(String sUserId)
                                        throws AdminException
        Get the spaces roots ids manageable by given user id
        Parameters:
        sUserId - the unique identifier of a user
        Returns:
        an array of identifiers of root spaces.
        Throws:
        AdminException - if an error occurs
      • getUserManageableSubSpaceIds

        String[] getUserManageableSubSpaceIds​(String sUserId,
                                              String sParentSpaceId)
                                       throws AdminException
        Get the subspace manageable by given user id in given space
        Parameters:
        sUserId - the unique identifier of a user
        sParentSpaceId - the identifier of the parent space
        Returns:
        an array of space identifiers
        Throws:
        AdminException - if an error occurs
      • getSpaceProfile

        SpaceProfile getSpaceProfile​(String spaceId,
                                     SilverpeasRole role)
                              throws AdminException
        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.
        Throws:
        AdminException - on a technical error.
      • getAvailCompoIds

        String[] getAvailCompoIds​(String sClientSpaceId,
                                  String sUserId)
                           throws AdminException
        Get the component ids allowed for the given user id in the given space
        Parameters:
        sClientSpaceId - the global space identifier
        sUserId - the unique identifier of a user
        Returns:
        an array of component instance identifiers
        Throws:
        AdminException - if an error occurs
      • isAnAdminTool

        boolean isAnAdminTool​(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.
      • getAvailableComponentsByUser

        List<String> getAvailableComponentsByUser​(String userId)
                                           throws AdminException
        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.
        Throws:
        AdminException - if an error occurs
      • isComponentAvailableToUser

        boolean isComponentAvailableToUser​(String componentId,
                                           String userId)
                                    throws AdminException
        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.
        Throws:
        AdminException - if an error occurs
      • isComponentAvailableToGroup

        boolean isComponentAvailableToGroup​(String componentId,
                                            String groupId)
                                     throws AdminException
        Is 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.
        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.
        Throws:
        AdminException - if an error occurs
      • isComponentManageable

        boolean isComponentManageable​(String componentId,
                                      String userId)
                               throws AdminException
        Is the specified component instance manageable by the given user? The component instance is manageable if the user has enough access right to manage it.
        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.
        Throws:
        AdminException - if an error occurs while checking the access right of the user.
      • getAvailCompoIdsAtRoot

        String[] getAvailCompoIdsAtRoot​(String sClientSpaceId,
                                        String sUserId)
                                 throws AdminException
        Get ids of components allowed to user in given space (not in subspaces)
        Parameters:
        sClientSpaceId - the identifier of a space
        sUserId - the unique identifier of a user
        Returns:
        an array of componentId (kmelia12, hyperlink145...)
        Throws:
        AdminException - if an error occurs
      • getAvailCompoIdsAtRoot

        List<String> getAvailCompoIdsAtRoot​(String sClientSpaceId,
                                            String sUserId,
                                            String componentNameRoot)
                                     throws AdminException
        Get the componentIds allowed for the given user Id in the given space and the componentNameRoot
        Parameters:
        sClientSpaceId - the unique identifier of a space
        sUserId - the unique identifier of a user
        componentNameRoot - the root name of the component
        Returns:
        a list of component ids
        Throws:
        AdminException - if an error occurs
      • getAvailCompoIds

        String[] getAvailCompoIds​(String userId)
                           throws AdminException
        Get the component ids allowed for the given user id.
        Parameters:
        userId - the unique identifier of a user
        Throws:
        AdminException - if an error occurs
      • getAvailComponentInstLights

        List<ComponentInstLight> getAvailComponentInstLights​(String userId,
                                                             String componentName)
                                                      throws AdminException
        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
        Throws:
        AdminException - if an error occurs
      • getRootSpacesContainingComponent

        List<SpaceInstLight> getRootSpacesContainingComponent​(String userId,
                                                              String componentName)
                                                       throws AdminException
        This method returns all root spaces which contains at least one allowed component of type componentName in this space or subspaces.
        Parameters:
        userId - the unique identifier of a user
        componentName - the component type (kmelia, gallery...)
        Returns:
        a list of root spaces
        Throws:
        AdminException - if an error occurs
      • getSubSpacesContainingComponent

        List<SpaceInstLight> getSubSpacesContainingComponent​(String spaceId,
                                                             String userId,
                                                             String componentName)
                                                      throws AdminException
        This method returns all sub spaces which contains at least one allowed component of type componentName in this space or subspaces.
        Parameters:
        userId - the unique identifier of a user
        componentName - the component type (kmelia, gallery...)
        Returns:
        a list of root spaces
        Throws:
        AdminException - if an error occurs
      • getCompoForUser

        CompoSpace[] getCompoForUser​(String sUserId,
                                     String sComponentName)
                              throws AdminException
        Get the tuples (space id, compo id) allowed for the given user and given component name
        Parameters:
        sUserId - the user identifier
        sComponentName - the name of a component
        Returns:
        an array of tuples (space id, component instance id)
        Throws:
        AdminException - if an error occurs
      • getCompoId

        String[] getCompoId​(String sComponentName)
                     throws AdminException
        Return the compo id for the given component name
        Parameters:
        sComponentName - a name of a component
        Returns:
        an array with the identifier of the instances of the specified component
        Throws:
        AdminException - if an error occurs
      • getProfileIds

        String[] getProfileIds​(String sUserId)
                        throws AdminException
        Get all the profile ids for the given user
        Parameters:
        sUserId - the unique identifier of a user
        Returns:
        an array with the identifier of all profiles of the user
        Throws:
        AdminException - if an error occurs
      • getProfileIdsOfGroup

        String[] getProfileIdsOfGroup​(String sGroupId)
                               throws AdminException
        Get all the profile ids for the given group
        Parameters:
        sGroupId - the unique identifier of a group
        Returns:
        an array with the identifier of all profiles of the group
        Throws:
        AdminException - if an error occurs
      • getCurrentProfiles

        String[] getCurrentProfiles​(String sUserId,
                                    ComponentInst componentInst)
        Get the profile names of the given user for the given component instance
        Parameters:
        sUserId - a unique identifier of a user
        componentInst - a component instance
        Returns:
        an array of all the name of the profiles in which the given user is for the given component instance
      • getCurrentProfiles

        String[] getCurrentProfiles​(String sUserId,
                                    String componentId)
                             throws AdminException
        Get the profile names of the given user for the given component instance
        Parameters:
        sUserId - a unique identifier of a user
        componentId - the unique identifier of a component instance
        Returns:
        an array of all the name of the profiles in which the given user is for the given component instance
        Throws:
        AdminException - if an error occurs
      • getUserProfilesByComponentId

        Map<String,​Set<String>> getUserProfilesByComponentId​(String userId,
                                                                   Collection<String> componentIds)
                                                            throws AdminException
        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.
        Throws:
        AdminException - if an error occurs
      • getUsers

        UserDetail[] getUsers​(boolean bAllProfiles,
                              String sProfile,
                              String sClientSpaceId,
                              String sClientComponentId)
                       throws AdminException
        Gets all the users in the given profile for the given component instance in the given space.
        Parameters:
        bAllProfiles - if bAllProfiles = true, return all the user details for the given space and given component if bAllProfiles = false, return the user details only for the given profile for the given space and given component
        sProfile - the identifier of a profile
        sClientSpaceId - the unique identifier of a space
        sClientComponentId - the unique identifier of a component instance.
        Throws:
        AdminException - if an error occurs
      • getAllSubGroups

        GroupDetail[] getAllSubGroups​(String parentGroupId)
                               throws AdminException
        For use in userPanel : return the direct GroupState.VALID subgroups.
        Parameters:
        parentGroupId - the unique identifier of the parent group
        Returns:
        an array with all the groups children of the specified group
        Throws:
        AdminException - if an error occurs
      • getRecursivelyAllSubGroups

        GroupDetail[] getRecursivelyAllSubGroups​(String parentGroupId)
                                          throws AdminException
        For use in userPanel: return recursively the direct GroupState.VALID subgroups of the specified group.
        Parameters:
        parentGroupId - the unique identifier of the parent group
        Returns:
        an array with all the groups children of the specified group
        Throws:
        AdminException - if an error occurs
      • getFilteredDirectUsers

        UserDetail[] getFilteredDirectUsers​(String sGroupId,
                                            String sUserLastNameFilter)
                                     throws AdminException
        For use in userPanel: return the users that are direct child of a given group
        Parameters:
        sGroupId - the unique identifier of the group
        sUserLastNameFilter - filter on the user last name.
        Returns:
        an array with all the users in the given group
        Throws:
        AdminException - if an error occurs
      • getAllSubUsersNumber

        int getAllSubUsersNumber​(String sGroupId)
                          throws AdminException
        For use in userPanel: return the total number of users recursively contained in a group
        Parameters:
        sGroupId - the unique identifier of a group
        Returns:
        the number of users in the given group and its subgroups.
        Throws:
        AdminException - if an error occurs
      • getUsersNumberOfDomain

        int getUsersNumberOfDomain​(String domainId)
                            throws AdminException
        This method gets number user in domain. If domain id is null, it returns number user of all domain.
        Parameters:
        domainId - the unique identifier of a user domain.
        Returns:
        the number of users in the given domain
        Throws:
        AdminException - if an error occurs
      • getAdministratorUserIds

        String[] getAdministratorUserIds​(String fromUserId)
                                  throws AdminException
        Get the identifiers of the administrators accessible by the given user.
        Parameters:
        fromUserId - the identifier of a user
        Returns:
        an array with the identifier of all the administrators that can be contacted by the given user
        Throws:
        AdminException - if an error occurs
      • getSilverpeasEmail

        String getSilverpeasEmail()
        Gets the email of Silverpeas. This email is dedicated to be used when Silverpeas sends emails to users.
        Returns:
        a non-reply address email with which Silverpeas sent emails to users.
      • getSilverpeasName

        String getSilverpeasName()
        Gets the name of Silverpeas to use when it sends notifications to users.
        Returns:
        the name to use when the system (Silverpeas) sends notifications to users.
      • getDAPIGeneralAdminId

        String getDAPIGeneralAdminId()
        Get the administrator email
      • getAllComponentIds

        String[] getAllComponentIds​(String sSpaceId)
                             throws AdminException
        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.

        Parameters:
        sSpaceId - the unique identifier of a space
        Returns:
        the identifiers of the component instances in the given space.
        Throws:
        AdminException - if an error occurs
      • getAllComponentIdsRecur

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

        It returns also ids of SilverpeasPersonalComponentInstance instances.

        Parameters:
        sSpaceId - the unique identifier of a space
        Returns:
        an array with the identifier of all the component instances in the given space and its subspaces.
        Throws:
        AdminException - if an error occurs
      • synchronizeUser

        String synchronizeUser​(String userId,
                               boolean recurs)
                        throws AdminException
        Synchronize Users and groups between cache and domain's datastore
        Parameters:
        userId - the identifier of the user performing the synchronization
        recurs - the synchronization should be recursive?
        Returns:
        the identifier of the user invoking this method
        Throws:
        AdminException - if an error occurs
      • synchronizeImportUserByLogin

        String synchronizeImportUserByLogin​(String domainId,
                                            String userLogin,
                                            boolean recurs)
                                     throws AdminException
        Synchronize Users and groups between cache and domain's datastore
        Parameters:
        domainId - the identifier of the domain concerned by the import
        userLogin - the login of a user in the given domain
        recurs - the synchronization should be recursive?
        Returns:
        the identifier of the user invoking this method
        Throws:
        AdminException - if an error occurs
      • synchronizeImportUser

        String synchronizeImportUser​(String domainId,
                                     String specificId,
                                     boolean recurs)
                              throws AdminException
        Synchronize Users and groups between cache and domain's datastore
        Parameters:
        domainId - the identifier of the domain concerned by the import
        specificId - the identifier of the user specific to the given domain
        recurs - the synchronization should be recursive?
        Returns:
        the identifier of the user invoking this method
        Throws:
        AdminException - if an error occurs
      • assignRightsFromUserToUser

        void assignRightsFromUserToUser​(RightAssignationContext.MODE operationMode,
                                        String sourceUserId,
                                        String targetUserId,
                                        boolean nodeAssignRights,
                                        String authorId)
                                 throws AdminException
        Assign rights of a user to a user
        Parameters:
        operationMode - value of RightAssignationContext.MODE
        sourceUserId - the user id of the source user
        targetUserId - the user id of the target user
        nodeAssignRights - true if you want also to apply the operation to the rights on nodes
        authorId - the userId of the author of this action
        Throws:
        AdminException - if an error occurs
      • assignRightsFromUserToGroup

        void assignRightsFromUserToGroup​(RightAssignationContext.MODE operationMode,
                                         String sourceUserId,
                                         String targetGroupId,
                                         boolean nodeAssignRights,
                                         String authorId)
                                  throws AdminException
        Assign rights of a user to a group
        Parameters:
        operationMode - value of RightAssignationContext.MODE
        sourceUserId - the user id of the source user
        targetGroupId - the group id of the target group
        nodeAssignRights - true if you want also to apply the operation to the rights on nodes
        authorId - the userId of the author of this action
        Throws:
        AdminException - if an error occurs
      • assignRightsFromGroupToUser

        void assignRightsFromGroupToUser​(RightAssignationContext.MODE operationMode,
                                         String sourceGroupId,
                                         String targetUserId,
                                         boolean nodeAssignRights,
                                         String authorId)
                                  throws AdminException
        Assign rights of a group to a user
        Parameters:
        operationMode - value of RightAssignationContext.MODE
        sourceGroupId - the group id of the source group
        targetUserId - the user id of the target user
        nodeAssignRights - true if you want also to apply the operation to the rights on nodes
        authorId - the userId of the author of this action
        Throws:
        AdminException - if an error occurs
      • assignRightsFromGroupToGroup

        void assignRightsFromGroupToGroup​(RightAssignationContext.MODE operationMode,
                                          String sourceGroupId,
                                          String targetGroupId,
                                          boolean nodeAssignRights,
                                          String authorId)
                                   throws AdminException
        Assign rights of a group to a group
        Parameters:
        operationMode - value of RightAssignationContext.MODE
        sourceGroupId - the group id of the source group
        targetGroupId - the group id of the target group
        nodeAssignRights - true if you want also to apply the operation to the rights on nodes
        authorId - the userId of the author of this action
        Throws:
        AdminException - if an error occurs
      • isDomainManagerUser

        boolean isDomainManagerUser​(String userId,
                                    String domainId)
        Is the specified user a manager of the specified domain?
        Parameters:
        userId - the user identifier.
        domainId - the domain identifier.
        Returns:
        true if user identified by given userId is the manager of given domain identifier.
      • getRemovedGroups

        List<GroupDetail> getRemovedGroups​(String... domainIds)
                                    throws AdminException
        Gets all the groups that were removed in the specified domains. If no domains are specified, then all the domains are taken into account.
        Parameters:
        domainIds - the unique identifiers of the domains.
        Returns:
        a list of groups or an empty list if there is no removed groups in the specified domains.
        Throws:
        AdminException - if an error occurs
      • getRemovedUsers

        List<UserDetail> getRemovedUsers​(String... domainIds)
                                  throws AdminException
        Gets all the users that were removed in the specified domains. If no domains are specified, then all the domains are taken into account.
        Parameters:
        domainIds - the unique identifiers of the domains.
        Returns:
        a list of users or an empty list if there is no removed users in the specified domains.
        Throws:
        AdminException - if an error occurs
      • getNonBlankedDeletedUsers

        List<UserDetail> getNonBlankedDeletedUsers​(String... domainIds)
                                            throws AdminException
        Gets all the users that were deleted in the specified domains and that weren't blanked. If no domains are specified, then all the domains are taken into account.
        Parameters:
        domainIds - the unique identifiers of the domains.
        Returns:
        a list of users or an empty list if there is no deleted users in the specified domains.
        Throws:
        AdminException - if an error occurs
      • blankDeletedUsers

        void blankDeletedUsers​(String targetDomainId,
                               List<String> userIds)
                        throws AdminException
        Blanks the specified users in the specified domain. The users have to be deleted in Silverpeas, otherwise an AdminException exception is thrown.
        Parameters:
        targetDomainId - the unique identifier of the domain.
        userIds - a list of unique identifiers of deleted users in the specified domain.
        Throws:
        AdminException - if an error occurs while blanking the deleted users.