Class LiferayGroupManager
java.lang.Object
org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager
- All Implemented Interfaces:
GroupManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
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)
-
Field Details
-
INFRASTRUCTURE_NAME
- See Also:
-
-
Constructor Details
-
LiferayGroupManager
public LiferayGroupManager()
-
-
Method Details
-
getVirtualGroups
public List<VirtualGroup> getVirtualGroups(long actualGroupId) throws GroupRetrievalFault, VirtualGroupNotExistingException Virtual Groups are handled as Custom attributes in Liferay Sites table- Specified by:
getVirtualGroupsin interfaceGroupManager- Parameters:
actualGroupId- the LR groupId- Returns:
- the virtual group name associated to this group
- Throws:
GroupRetrievalFaultVirtualGroupNotExistingException
-
getVirtualGroups
Virtual Groups are handled as Custom attributes in Liferay Sites table- Specified by:
getVirtualGroupsin interfaceGroupManager- Returns:
- the virtual group list available
- Throws:
VirtualGroupNotExistingException- if the virtual group does not exist
-
createRootVO
public 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- Specified by:
createRootVOin interfaceGroupManager- Parameters:
rootVOName- the namedescription- the description- Returns:
- the instance of the yet created root VO
- Throws:
UserManagementNameExceptionUserManagementSystemExceptionUserRetrievalFaultGroupRetrievalFaultUserManagementPortalException
-
createVO
public 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- Specified by:
createVOin interfaceGroupManager- Parameters:
virtualOrgName- the name you wish- Returns:
- the instance of the yet created VO
- Throws:
UserManagementNameExceptionUserManagementSystemExceptionUserRetrievalFaultGroupRetrievalFaultUserManagementPortalException
-
createVRE
public 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- Specified by:
createVREin interfaceGroupManager- Parameters:
virtualResearchEnvName- the name you wish for this VREdescription- the description- Returns:
- the instance of the yet created root VRE
- Throws:
UserManagementNameExceptionUserManagementSystemExceptionUserRetrievalFaultGroupRetrievalFaultUserManagementPortalException
-
getGroupParentId
public long getGroupParentId(long groupId) throws UserManagementSystemException, GroupRetrievalFault - Specified by:
getGroupParentIdin interfaceGroupManager- Parameters:
groupId- the LR groupId- Returns:
- the parent groupId if exists, -1 otherwise
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
getGroupId
- Specified by:
getGroupIdin interfaceGroupManager- Parameters:
groupName- the VO/VRE name- Returns:
- the LR groupId if exists, -1 otherwise
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
getGroup
- Specified by:
getGroupin interfaceGroupManager- Parameters:
groupId- the LR groupId- Returns:
- an instance of @see
GCubeGroupif exists, null otherwise - Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
getGroupIdFromInfrastructureScope
public long getGroupIdFromInfrastructureScope(String scope) throws IllegalArgumentException, UserManagementSystemException, GroupRetrievalFault - Specified by:
getGroupIdFromInfrastructureScopein interfaceGroupManager- Throws:
GroupRetrievalFaultUserManagementSystemExceptionIllegalArgumentException
-
getRootVO
- Specified by:
getRootVOin interfaceGroupManager- Returns:
- an instance of @see
GCubeGroupfilled with the RootVO metadata - Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
getRootVOName
- Specified by:
getRootVONamein interfaceGroupManager- Returns:
- the RootVO name
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
listGroups
* @return a flat list of VOs and VREs present in this gateway mapped as @seeGCubeGroup- Specified by:
listGroupsin interfaceGroupManager- Throws:
GroupRetrievalFaultUserManagementSystemException
-
listGroupsByUser
public List<GCubeGroup> listGroupsByUser(long userId) throws UserRetrievalFault, UserManagementSystemException, GroupRetrievalFault - Specified by:
listGroupsByUserin interfaceGroupManager- Parameters:
userId- the LR userId- Returns:
- a flat list of VOs and VREs where the user is registered as @see
GCubeGroup - Throws:
UserRetrievalFaultUserManagementSystemExceptionGroupRetrievalFault
-
listVresByUser
public List<GCubeGroup> listVresByUser(long userId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault Description copied from interface:GroupManager* @return the list of user VREs- Specified by:
listVresByUserin interfaceGroupManager- Throws:
UserManagementSystemExceptionGroupRetrievalFault- if the rootVO does not existsUserRetrievalFault- if the user does not exists
-
listGroupsByUserAndSite
public Set<GCubeGroup> listGroupsByUserAndSite(long userId, String serverName) throws UserRetrievalFault, UserManagementSystemException, GroupRetrievalFault, VirtualGroupNotExistingException - Specified by:
listGroupsByUserAndSitein interfaceGroupManager- 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
public Set<GCubeGroup> listGroupsByUserAndSiteGroupId(long userId, long siteGroupId) throws UserRetrievalFault, UserManagementSystemException, GroupRetrievalFault, VirtualGroupNotExistingException - Specified by:
listGroupsByUserAndSiteGroupIdin interfaceGroupManager- 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
public Map<GCubeGroup,List<GCubeRole>> listGroupsAndRolesByUser(long userId) throws UserManagementSystemException - Specified by:
listGroupsAndRolesByUserin interfaceGroupManager- Parameters:
userId- the LR userId- Returns:
- a map contaiting the users groups and his roles in the group
- Throws:
UserManagementSystemException
-
isRootVO
- Specified by:
isRootVOin interfaceGroupManager- Parameters:
groupId- the LR groupId- Returns:
- true if the groupId is the RootVO, false otherwise
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
isVO
- Specified by:
isVOin interfaceGroupManager- Parameters:
groupId- the LR groupId- Returns:
- true if the groupId is a VO, false otherwise
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
isVRE
- Specified by:
isVREin interfaceGroupManager- Parameters:
groupId- the LR groupId- Returns:
- true if the groupId is a VRE, false otherwise
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
getInfrastructureScope
public String getInfrastructureScope(long groupId) throws UserManagementSystemException, GroupRetrievalFault - Specified by:
getInfrastructureScopein interfaceGroupManager- 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)- Specified by:
getScopein interfaceGroupManager- Parameters:
groupId- the LR groupId- Returns:
- the infrastructure scope given the groupId e.g. for devsec VO would return /gcube/devsec
- Throws:
UserManagementSystemExceptionGroupRetrievalFault
-
readCustomAttr
- Specified by:
readCustomAttrin interfaceGroupManager- 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
public void saveCustomAttr(long groupId, String attributeKey, Serializable value) throws GroupRetrievalFault - Specified by:
saveCustomAttrin interfaceGroupManagerattributeKey- the name of the attribute you want to savevalue- the value- Throws:
GroupRetrievalFault
-
updateGroupDescription
- Specified by:
updateGroupDescriptionin interfaceGroupManagerdescription- text to update- Returns:
- the updated description
- Throws:
GroupRetrievalFault
-
getGroupLogoURL
- Specified by:
getGroupLogoURLin interfaceGroupManager- 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 ... )
-
getGateways
Description copied from interface:GroupManagerRetrieve the list of GCubeGroups that are Gateways (i.e. groups with no father and children).- Specified by:
getGatewaysin interfaceGroupManager- Returns:
- a list of gateways
-