Package org.silverpeas.core.admin.user
Class ProfileInstManager
- java.lang.Object
-
- org.silverpeas.core.admin.user.ProfileInstManager
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROFILE
static String
PROFILES_OF_USER
-
Constructor Summary
Constructors Modifier Constructor Description protected
ProfileInstManager()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
createProfileInst(ProfileInst profileInst, int fatherCompLocalId)
Create a new Profile instance in databasevoid
deleteProfileInst(ProfileInst profileInst)
Deletes profile instance from SilverpeasString[]
getAllComponentObjectProfileIdsOfGroup(String groupId)
Get all the node profiles Id for the given groupString[]
getAllComponentObjectProfileIdsOfUser(String sUserId, List<String> groupIds)
Get all the component object profile Ids for the given user and/or groupsProfileInst
getInheritedProfileInst(int instanceLocalId, String roleName)
String[]
getProfileIdsOfGroup(String sGroupId)
Get all the profiles Id for the given groupString[]
getProfileIdsOfUser(String sUserId, List<String> groupIds)
Get all the profiles Id for the given user and groupsProfileInst
getProfileInst(String sProfileId, boolean includeRemovedUsersAndGroups)
Get Profile information from database with the given id and creates a new Profile instanceString[]
getProfileNamesOfUser(String userId, List<String> groupIds, int componentLocalId)
Map<Integer,Set<String>>
getProfileNamesOfUser(String userId, List<String> groupIds, Collection<Integer> componentLocalIds)
String
updateProfileInst(ProfileInst profileInstNew)
Update profile instance.
-
-
-
Field Detail
-
PROFILES_OF_USER
public static final String PROFILES_OF_USER
- See Also:
- Constant Field Values
-
PROFILE
public static final String PROFILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
createProfileInst
public String createProfileInst(ProfileInst profileInst, int fatherCompLocalId) throws AdminException
Create a new Profile instance in database- Parameters:
profileInst
-fatherCompLocalId
-- Returns:
- Throws:
AdminException
-
getProfileInst
public ProfileInst getProfileInst(String sProfileId, boolean includeRemovedUsersAndGroups) throws AdminException
Get Profile information from database with the given id and creates a new Profile instance- Parameters:
sProfileId
- identifier of the profile.includeRemovedUsersAndGroups
- true to take into account removed groups and removed users.- Returns:
- the corresponding
ProfileInst
if any, null otherwise. - Throws:
AdminException
- if an error occurred.
-
getInheritedProfileInst
public ProfileInst getInheritedProfileInst(int instanceLocalId, String roleName) throws AdminException
- Throws:
AdminException
-
deleteProfileInst
public void deleteProfileInst(ProfileInst profileInst) throws AdminException
Deletes profile instance from Silverpeas- Parameters:
profileInst
-- Throws:
AdminException
-
updateProfileInst
public String updateProfileInst(ProfileInst profileInstNew) throws AdminException
Update profile instance. The method take into account the Node Rights of users or groups.- Parameters:
profileInstNew
-- Throws:
AdminException
-
getProfileIdsOfUser
public String[] getProfileIdsOfUser(String sUserId, List<String> groupIds) throws AdminException
Get all the profiles Id for the given user and groups- Parameters:
sUserId
-groupIds
-- Returns:
- Throws:
AdminException
-
getAllComponentObjectProfileIdsOfUser
public String[] getAllComponentObjectProfileIdsOfUser(String sUserId, List<String> groupIds) throws AdminException
Get all the component object profile Ids for the given user and/or groups- Parameters:
sUserId
-groupIds
-- Returns:
- Throws:
AdminException
-
getProfileNamesOfUser
public String[] getProfileNamesOfUser(String userId, List<String> groupIds, int componentLocalId) throws AdminException
- Throws:
AdminException
-
getProfileNamesOfUser
public Map<Integer,Set<String>> getProfileNamesOfUser(String userId, List<String> groupIds, Collection<Integer> componentLocalIds) throws AdminException
- Throws:
AdminException
-
getProfileIdsOfGroup
public String[] getProfileIdsOfGroup(String sGroupId) throws AdminException
Get all the profiles Id for the given group- Parameters:
sGroupId
-- Returns:
- Throws:
AdminException
-
getAllComponentObjectProfileIdsOfGroup
public String[] getAllComponentObjectProfileIdsOfGroup(String groupId) throws AdminException
Get all the node profiles Id for the given group- Parameters:
groupId
-- Returns:
- Throws:
AdminException
-
-