Interface GroupManager
- All Known Implementing Classes:
LiferayGroupManager,LiferayWSGroupManager
public interface GroupManager
This interface defines the class that manages the groups.
- Author:
- Massimiliano Assante, CNR-ISTI
-
Method Summary
Modifier and TypeMethodDescriptioncreateRootVO(String rootVOName, String description) This method only creates the Group (site), no private or public pages are associatedThis method only creates the Group (site), no private or public pages are associatedThis method only creates the Group (site), no private or public pages are associatedRetrieve the list of GCubeGroups that are Gateways (i.e. groups with no father and children).getGroup(long groupId) longgetGroupId(String groupName) longgetGroupLogoURL(long logoId) longgetGroupParentId(long groupId) getInfrastructureScope(long groupId) getScope(long groupId) Deprecated.please use getInfrastructureScope(long groupId)Virtual Groups are handled as Custom attributes in Liferay Sites tablegetVirtualGroups(long actualGroupId) Virtual Groups are handled as Custom attributes in Liferay Sites tableisRootVO(long groupId) isVO(long groupId) isVRE(long groupId) * @return a flat list of VOs and VREs present in this gateway mapped as @seeGCubeGrouplistGroupsAndRolesByUser(long userId) listGroupsByUser(long userId) listGroupsByUserAndSite(long userId, String serverName) listGroupsByUserAndSiteGroupId(long userId, long siteGroupId) listVresByUser(long userId) * @return the list of user VREsreadCustomAttr(long groupId, String attributeKey) voidsaveCustomAttr(long groupId, String attributeKey, Serializable value) updateGroupDescription(long groupId, String description)
-
Method Details
-
createRootVO
GCubeGroup createRootVO(String rootVOName, String description) throws UserManagementNameException, UserManagementSystemException, UserRetrievalFault, GroupRetrievalFault, UserManagementPortalException This method only creates the Group (site), no private or public pages are associated- Parameters:
rootVOName- the namedescription- the description- Returns:
- the instance of the yet created root VO
- Throws:
UserManagementNameExceptionUserManagementSystemExceptionUserRetrievalFaultGroupRetrievalFaultUserManagementPortalException
-
createVO
GCubeGroup createVO(String virtualOrgName, long rootVOGroupId, String description) throws UserManagementNameException, UserManagementSystemException, UserRetrievalFault, GroupRetrievalFault, UserManagementPortalException This method only creates the Group (site), no private or public pages are associated- Parameters:
virtualOrgName- the name you wishrootVOGroupId-description-- Returns:
- the instance of the yet created VO
- Throws:
UserManagementNameExceptionUserManagementSystemExceptionUserRetrievalFaultGroupRetrievalFaultUserManagementPortalException
-
createVRE
GCubeGroup createVRE(String virtualResearchEnvName, long virtualOrgGroupId, String description) throws UserManagementNameException, UserManagementSystemException, UserRetrievalFault, GroupRetrievalFault, UserManagementPortalException This method only creates the Group (site), no private or public pages are associated- Parameters:
virtualResearchEnvName- the name you wish for this VREvirtualOrgGroupId-description- the description- Returns:
- the instance of the yet created root VRE
- Throws:
UserManagementNameExceptionUserManagementSystemExceptionUserRetrievalFaultGroupRetrievalFaultUserManagementPortalException
-
getGroupParentId
- Parameters:
groupId- the LR groupId- Returns:
- the parent groupId if exists, -1 otherwise
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
getGroupId
- Parameters:
groupName- the VO/VRE name- Returns:
- the LR groupId if exists, -1 otherwise
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
getGroup
- Parameters:
groupId- the LR groupId- Returns:
- an instance of @see
GCubeGroupif exists, null otherwise - Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
getVirtualGroups
Virtual Groups are handled as Custom attributes in Liferay Sites table- Returns:
- the virtual group list available
- Throws:
VirtualGroupNotExistingException- if the virtual group does not exist
-
getVirtualGroups
List<VirtualGroup> getVirtualGroups(long actualGroupId) throws GroupRetrievalFault, VirtualGroupNotExistingException Virtual Groups are handled as Custom attributes in Liferay Sites table- Parameters:
actualGroupId- the LR groupId- Returns:
- the virtual group name associated to this group
- Throws:
GroupRetrievalFault- if the group does not existVirtualGroupNotExistingException- if the virtual group does not exist
-
getGroupIdFromInfrastructureScope
long getGroupIdFromInfrastructureScope(String scope) throws IllegalArgumentException, UserManagementSystemException, GroupRetrievalFault -
getRootVO
- Returns:
- an instance of @see
GCubeGroupfilled with the RootVO metadata - Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
getRootVOName
- Returns:
- the RootVO name
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
getInfrastructureScope
String getInfrastructureScope(long groupId) throws UserManagementSystemException, GroupRetrievalFault - Parameters:
groupId- the LR groupId- Returns:
- the infrastructure scope given the groupId e.g. for devsec VO would return /gcube/devsec
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
getScope
Deprecated.please use getInfrastructureScope(long groupId)- Parameters:
groupId- the LR groupId- Returns:
- the infrastructure scope given the groupId e.g. for devsec VO would return /gcube/devsec
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
listGroups
* @return a flat list of VOs and VREs present in this gateway mapped as @seeGCubeGroup- Throws:
UserManagementSystemExceptionGroupRetrievalFault- if the rootVO does not exists
-
listGroupsByUser
List<GCubeGroup> listGroupsByUser(long userId) throws UserRetrievalFault, UserManagementSystemException, GroupRetrievalFault - Parameters:
userId- the LR userId- Returns:
- a flat list of VOs and VREs where the user is registered as @see
GCubeGroup - Throws:
UserRetrievalFaultUserManagementSystemExceptionGroupRetrievalFault
-
listVresByUser
List<GCubeGroup> listVresByUser(long userId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault * @return the list of user VREs- Throws:
UserManagementSystemExceptionGroupRetrievalFault- if the rootVO does not existsUserRetrievalFault- if the user does not exists
-
listGroupsByUserAndSite
Set<GCubeGroup> listGroupsByUserAndSite(long userId, String serverName) throws UserRetrievalFault, UserManagementSystemException, GroupRetrievalFault, VirtualGroupNotExistingException - Parameters:
userId- the LR userIdserverName- the host name of the server that is sending the request (e.g. i-marine.d4science.org)- Returns:
- a set of VREs where the user is registered as @see
GCubeGroupon the current Site (e.g i-marine.d4science.org) - Throws:
UserRetrievalFaultUserManagementSystemExceptionGroupRetrievalFaultVirtualGroupNotExistingException
-
listGroupsByUserAndSiteGroupId
Set<GCubeGroup> listGroupsByUserAndSiteGroupId(long userId, long siteGroupId) throws UserRetrievalFault, UserManagementSystemException, GroupRetrievalFault, VirtualGroupNotExistingException - Parameters:
userId- the LR userIdsiteGroupId- the LR groupId from which is sending the request- Returns:
- a set of VREs where the user is registered as @see
GCubeGroupon the current Site (e.g i-marine.d4science.org) - Throws:
UserRetrievalFaultUserManagementSystemExceptionGroupRetrievalFaultVirtualGroupNotExistingException
-
listGroupsAndRolesByUser
Map<GCubeGroup,List<GCubeRole>> listGroupsAndRolesByUser(long userId) throws UserManagementSystemException - Parameters:
userId- the LR userId- Returns:
- a map contaiting the users groups and his roles in the group
- Throws:
UserManagementSystemException
-
isRootVO
- Parameters:
groupId- the LR groupId- Returns:
- true if the groupId is the RootVO, false otherwise
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
isVO
- Parameters:
groupId- the LR groupId- Returns:
- true if the groupId is a VO, false otherwise
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
isVRE
- Parameters:
groupId- the LR groupId- Returns:
- true if the groupId is a VRE, false otherwise
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
readCustomAttr
- Parameters:
groupId- the LR groupIdattributeKey- the name of the attribute you want to read its value- Returns:
- the attributeKey value if existing, null otherwise
- Throws:
GroupRetrievalFault
-
saveCustomAttr
void saveCustomAttr(long groupId, String attributeKey, Serializable value) throws GroupRetrievalFault - Parameters:
groupId-attributeKey- the name of the attribute you want to savevalue- the value- Throws:
GroupRetrievalFault
-
updateGroupDescription
- Parameters:
groupId-description- text to update- Returns:
- the updated description
- Throws:
GroupRetrievalFault
-
getGroupLogoURL
- Parameters:
logoId- the logo identifier of the group @see {GCubeGroup#logoId}- Returns:
- the absolute path on server for the logo (e.g. /image/layout_set_logo?img_id ... )
- Throws:
GroupRetrievalFault- the group retrieval fault
-
getGateways
List<GCubeGroup> getGateways()Retrieve the list of GCubeGroups that are Gateways (i.e. groups with no father and children).- Returns:
- a list of gateways
-