refined method for getting group logo url and friendlyURL
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vo-management/usermanagement-core@124957 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fc8a1738e4
commit
e873fb8677
|
@ -42,15 +42,16 @@ public class LiferayGroupManager implements GroupManager {
|
||||||
// group mapping
|
// group mapping
|
||||||
private GCubeGroup mapLRGroup(Group g) throws PortalException, SystemException, UserManagementSystemException, GroupRetrievalFault {
|
private GCubeGroup mapLRGroup(Group g) throws PortalException, SystemException, UserManagementSystemException, GroupRetrievalFault {
|
||||||
if (g != null) {
|
if (g != null) {
|
||||||
long logoId = LayoutSetLocalServiceUtil.getLayoutSet(g.getGroupId(), true).getLayoutSetId();
|
long logoId = LayoutSetLocalServiceUtil.getLayoutSet(g.getGroupId(), true).getLogoId();
|
||||||
if (isVRE(g.getGroupId())) {
|
if (isVRE(g.getGroupId())) {
|
||||||
return new GCubeGroup(g.getGroupId(), g.getParentGroupId(), g.getName(), g.getDescription(), g.getFriendlyURL(), logoId, null);
|
return new GCubeGroup(g.getGroupId(), g.getParentGroupId(), g.getName(), g.getDescription(), g.getFriendlyURL(), logoId, null);
|
||||||
}
|
}
|
||||||
else if (isVO(g.getGroupId())) {
|
else if (isVO(g.getGroupId())) {
|
||||||
List<GCubeGroup> vres = new ArrayList<GCubeGroup>();
|
List<GCubeGroup> vres = new ArrayList<GCubeGroup>();
|
||||||
List<Group> VREs = g.getChildren(true);
|
List<Group> VREs = g.getChildren(true);
|
||||||
for (Group vre : VREs)
|
for (Group vre : VREs) {
|
||||||
vres.add(mapLRGroup(vre));
|
vres.add(mapLRGroup(vre));
|
||||||
|
}
|
||||||
return new GCubeGroup(g.getGroupId(), g.getParentGroupId(), g.getName(), g.getDescription(), g.getFriendlyURL(), logoId, vres);
|
return new GCubeGroup(g.getGroupId(), g.getParentGroupId(), g.getName(), g.getDescription(), g.getFriendlyURL(), logoId, vres);
|
||||||
} else if (isRootVO(g.getGroupId())) {
|
} else if (isRootVO(g.getGroupId())) {
|
||||||
List<GCubeGroup> vos = new ArrayList<GCubeGroup>();
|
List<GCubeGroup> vos = new ArrayList<GCubeGroup>();
|
||||||
|
@ -174,7 +175,7 @@ public class LiferayGroupManager implements GroupManager {
|
||||||
g = GroupLocalServiceUtil.getGroup(ManagementUtils.getCompany().getCompanyId(), groupName);
|
g = GroupLocalServiceUtil.getGroup(ManagementUtils.getCompany().getCompanyId(), groupName);
|
||||||
return g.getGroupId();
|
return g.getGroupId();
|
||||||
} catch (PortalException e) {
|
} catch (PortalException e) {
|
||||||
throw new GroupRetrievalFault("Group not existing", e);
|
_log.warn(groupName + " Group not existing");
|
||||||
} catch (SystemException e) {
|
} catch (SystemException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class LiferayRoleManager implements RoleManager {
|
||||||
return (mapLRRole(role));
|
return (mapLRRole(role));
|
||||||
}
|
}
|
||||||
} catch (PortalException e) {
|
} catch (PortalException e) {
|
||||||
throw new GroupRetrievalFault("Group not existing", e);
|
_log.warn(roleName + " Role not existing");
|
||||||
} catch (SystemException e) {
|
} catch (SystemException e) {
|
||||||
throw new RoleRetrievalFault(e.getMessage(), e);
|
throw new RoleRetrievalFault(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ public class LiferayRoleManager implements RoleManager {
|
||||||
try {
|
try {
|
||||||
return mapLRRole(RoleLocalServiceUtil.getRole(roleId));
|
return mapLRRole(RoleLocalServiceUtil.getRole(roleId));
|
||||||
} catch (PortalException e) {
|
} catch (PortalException e) {
|
||||||
throw new RoleRetrievalFault("Role not existing", e);
|
_log.warn(roleId + " Role id not existing");
|
||||||
} catch (SystemException e) {
|
} catch (SystemException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue