153 lines
4.6 KiB
Java
153 lines
4.6 KiB
Java
|
package org.gcube.vomanagement.usermanagement.impl;
|
||
|
|
||
|
import java.util.HashMap;
|
||
|
import java.util.List;
|
||
|
|
||
|
import org.gcube.vomanagement.usermanagement.RoleManager;
|
||
|
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
||
|
import org.gcube.vomanagement.usermanagement.exception.RoleRetrievalFault;
|
||
|
import org.gcube.vomanagement.usermanagement.exception.UserManagementFileNotFoundException;
|
||
|
import org.gcube.vomanagement.usermanagement.exception.UserManagementIOException;
|
||
|
import org.gcube.vomanagement.usermanagement.exception.UserManagementPortalException;
|
||
|
import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException;
|
||
|
import org.gcube.vomanagement.usermanagement.exception.UserRetrievalFault;
|
||
|
import org.gcube.vomanagement.usermanagement.model.GCubeRole;
|
||
|
|
||
|
import com.liferay.portal.kernel.exception.PortalException;
|
||
|
import com.liferay.portal.kernel.exception.SystemException;
|
||
|
import com.liferay.portal.model.Role;
|
||
|
|
||
|
public class LiferayRoleManager implements RoleManager {
|
||
|
//simple role mapping
|
||
|
protected static GCubeRole mapLRRole(Role r) throws PortalException, SystemException {
|
||
|
if (r != null) {
|
||
|
return new GCubeRole(r.getName(), r.getRoleId(), r.getDescription());
|
||
|
}
|
||
|
else
|
||
|
return null;
|
||
|
}
|
||
|
@Override
|
||
|
public boolean isAdmin(String userId) {
|
||
|
// TODO Auto-generated method stub
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void assignRoleToUser(String groupId, String roleId, String userId)
|
||
|
throws UserManagementSystemException, UserRetrievalFault,
|
||
|
GroupRetrievalFault, RoleRetrievalFault {
|
||
|
// TODO Auto-generated method stub
|
||
|
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void createRole(String groupName)
|
||
|
throws UserManagementSystemException, GroupRetrievalFault,
|
||
|
RoleRetrievalFault, UserManagementPortalException,
|
||
|
UserManagementFileNotFoundException, UserManagementIOException {
|
||
|
// TODO Auto-generated method stub
|
||
|
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean createRole(String roleName, String roleDescription,
|
||
|
String groupName) throws UserManagementSystemException,
|
||
|
RoleRetrievalFault, GroupRetrievalFault,
|
||
|
UserManagementPortalException {
|
||
|
// TODO Auto-generated method stub
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void deleteRole(String roleName, String groupName)
|
||
|
throws UserManagementSystemException, RoleRetrievalFault {
|
||
|
// TODO Auto-generated method stub
|
||
|
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void dismissRoleFromUser(String groupId, String roleId, String userId)
|
||
|
throws UserManagementSystemException, UserRetrievalFault,
|
||
|
GroupRetrievalFault, RoleRetrievalFault {
|
||
|
// TODO Auto-generated method stub
|
||
|
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public GCubeRole getRole(String roleId)
|
||
|
throws UserManagementSystemException, RoleRetrievalFault {
|
||
|
// TODO Auto-generated method stub
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String getRoleId(String roleName, String groupName)
|
||
|
throws UserManagementSystemException {
|
||
|
// TODO Auto-generated method stub
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public HashMap<String, String> listAllowedRoles(String groupName)
|
||
|
throws UserManagementSystemException, GroupRetrievalFault,
|
||
|
UserManagementFileNotFoundException, UserManagementIOException {
|
||
|
// TODO Auto-generated method stub
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public List<String> listRoles() throws UserManagementSystemException {
|
||
|
// TODO Auto-generated method stub
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public List<GCubeRole> listAllRoles() throws UserManagementSystemException {
|
||
|
// TODO Auto-generated method stub
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public List<GCubeRole> listRolesByGroup(String groupId)
|
||
|
throws UserManagementSystemException, GroupRetrievalFault,
|
||
|
UserManagementFileNotFoundException, UserManagementIOException {
|
||
|
// TODO Auto-generated method stub
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public List<GCubeRole> listRolesByUser(String userId)
|
||
|
throws UserManagementSystemException {
|
||
|
// TODO Auto-generated method stub
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public List<GCubeRole> listRolesByUserAndGroup(String groupId, String userId)
|
||
|
throws UserManagementSystemException, GroupRetrievalFault,
|
||
|
UserRetrievalFault {
|
||
|
// TODO Auto-generated method stub
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void updateRole(String initialRoleName, String newRoleName,
|
||
|
String roleDescription, String groupName)
|
||
|
throws UserManagementSystemException, RoleRetrievalFault,
|
||
|
NumberFormatException, UserManagementFileNotFoundException,
|
||
|
UserManagementIOException, GroupRetrievalFault,
|
||
|
UserManagementPortalException {
|
||
|
// TODO Auto-generated method stub
|
||
|
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void updatePredefinedRoles(HashMap<String, String> rolesMap,
|
||
|
String groupType) throws UserManagementIOException,
|
||
|
UserManagementFileNotFoundException {
|
||
|
// TODO Auto-generated method stub
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|