git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vo-management/usermanagement-core@124492 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7c3b5305c2
commit
49d7eef956
|
@ -55,6 +55,23 @@ public interface GroupManager {
|
|||
* @throws GroupRetrievalFault
|
||||
*/
|
||||
String getRootVOName() throws UserManagementSystemException, GroupRetrievalFault;
|
||||
/**
|
||||
*
|
||||
* @param groupId the LR groupId
|
||||
* @return the infrastructure scope given the groupId e.g. for devsec VO would return /gcube/devsec
|
||||
* @throws UserManagementSystemException
|
||||
* @throws GroupRetrievalFault
|
||||
*/
|
||||
String getInfrastructureScope(long groupId) throws UserManagementSystemException, GroupRetrievalFault;
|
||||
/**
|
||||
* @deprecated
|
||||
* please use getInfrastructureScope(long groupId)
|
||||
* @param groupId the LR groupId
|
||||
* @return the infrastructure scope given the groupId e.g. for devsec VO would return /gcube/devsec
|
||||
* @throws UserManagementSystemException
|
||||
* @throws GroupRetrievalFault
|
||||
*/
|
||||
String getScope(long groupId) throws UserManagementSystemException, GroupRetrievalFault;
|
||||
/**
|
||||
* * @return a flat list of VOs and VREs present in this gateway mapped as @see {@link GCubeGroup}
|
||||
* @throws UserManagementSystemException
|
||||
|
@ -62,7 +79,7 @@ public interface GroupManager {
|
|||
*/
|
||||
List<GCubeGroup> listGroups() throws UserManagementSystemException, GroupRetrievalFault ;
|
||||
/**
|
||||
* @param userId
|
||||
* @param userId the LR userId
|
||||
* @return a flat list of VOs and VREs where the user is registered as @see {@link GCubeGroup}
|
||||
* @throws UserRetrievalFault
|
||||
* @throws UserManagementSystemException
|
||||
|
@ -71,7 +88,7 @@ public interface GroupManager {
|
|||
List<GCubeGroup> listGroupsByUser(long userId) throws UserRetrievalFault, UserManagementSystemException, GroupRetrievalFault;
|
||||
/**
|
||||
*
|
||||
* @param userId
|
||||
* @param userId the LR userId
|
||||
* @return a map contaiting the users groups and his roles in the group
|
||||
* @throws UserManagementSystemException
|
||||
*/
|
||||
|
|
|
@ -238,5 +238,33 @@ public class LiferayGroupManager implements GroupManager {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String getInfrastructureScope(long groupId) throws UserManagementSystemException, GroupRetrievalFault {
|
||||
try {
|
||||
Group g = GroupLocalServiceUtil.getGroup(groupId);
|
||||
if (isVRE(groupId))
|
||||
return "/" + g.getParentGroup().getName() + "/" + g.getParentGroup().getName() + "/" + g.getName();
|
||||
if (isVO(groupId))
|
||||
return "/" + g.getParentGroup().getName() + "/" + g.getName();
|
||||
if (isRootVO(groupId))
|
||||
return "/"+g.getName();
|
||||
|
||||
} catch (PortalException e1) {
|
||||
throw new GroupRetrievalFault("Group not existing (I think you better check)", e1);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String getScope(long groupId) throws UserManagementSystemException, GroupRetrievalFault {
|
||||
return getInfrastructureScope(groupId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -107,10 +107,19 @@ public class GCubeUser implements Serializable {
|
|||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
/**
|
||||
* @deprecated
|
||||
* please use getUsername
|
||||
* @return the username
|
||||
*/
|
||||
public String getScreenName() {
|
||||
return username;
|
||||
}
|
||||
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
|
|
Loading…
Reference in New Issue