org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc
Class XmlRpcAdminConnectionManager

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.model.connectionmanager.AbstractConnectionManager<XmlRpcClientManager>
      extended by org.eclipse.emf.emfstore.internal.client.model.connectionmanager.xmlrpc.XmlRpcAdminConnectionManager
All Implemented Interfaces:
AdminConnectionManager, AdminEmfStore, EMFStoreInterface

public class XmlRpcAdminConnectionManager
extends AbstractConnectionManager<XmlRpcClientManager>
implements AdminConnectionManager

Connection manager for EMFStore that enables administrator capabilities.

Author:
wesendon

Constructor Summary
XmlRpcAdminConnectionManager()
           
 
Method Summary
 void addInitialParticipant(SessionId sessionId, ProjectId projectId, ACOrgUnitId participantId, org.eclipse.emf.ecore.EClass roleClass)
          Adds an organization unit to a project.
 void addMember(SessionId sessionId, ACOrgUnitId group, ACOrgUnitId member)
          Adds an orgUnit to a group.
 void addParticipant(SessionId sessionId, ProjectId projectId, ACOrgUnitId participant, org.eclipse.emf.ecore.EClass role)
          Adds an organization unit to a project.
 void assignRole(SessionId sessionId, ACOrgUnitId orgUnitId, org.eclipse.emf.ecore.EClass roleClass)
          Assigns a role for an orgUnit without a project.
 void changeOrgUnit(SessionId sessionId, ACOrgUnitId orgUnitId, String name, String description)
          Changes the orgUnit's name and description.
 void changeRole(SessionId sessionId, ProjectId projectId, ACOrgUnitId orgUnit, org.eclipse.emf.ecore.EClass role)
          Changes the role for an orgUnit in a specified project.
 void changeUser(SessionId sessionId, ACOrgUnitId userId, String name, String password)
          Changes the name and password of an ACUser.
 ACOrgUnitId createGroup(SessionId sessionId, String name)
          Creates a group on the server.
 ACOrgUnitId createUser(SessionId sessionId, String name)
          Creates a user on the server.
 void deleteGroup(SessionId sessionId, ACOrgUnitId group)
          Deletes a group on the server.
 void deleteUser(SessionId sessionId, ACOrgUnitId user)
          Deletes a user from the server.
 List<ACGroup> getGroups(SessionId sessionId)
          Returns all groups on the server.
 List<ACGroup> getGroups(SessionId sessionId, ACOrgUnitId user)
          Returns a list of all groups in which the specified user is member of.
 List<ACOrgUnit> getMembers(SessionId sessionId, ACOrgUnitId groupId)
          Returns all members from a group.
 ACOrgUnit getOrgUnit(SessionId sessionId, ACOrgUnitId orgUnitId)
          Returns an orgUnit with the specified orgUnitId.
 List<ACOrgUnit> getOrgUnits(SessionId sessionId)
          Returns all orgUnits on the server.
 List<ACOrgUnit> getParticipants(SessionId sessionId, ProjectId projectId)
          Returns all orgUnits which are attached to the given project.
 List<ProjectInfo> getProjectInfos(SessionId sessionId)
          Returns a list of available project.
 Role getRole(SessionId sessionId, ProjectId projectId, ACOrgUnitId orgUnit)
          Returns an orgUnit's role for a specified project.
 List<ACUser> getUsers(SessionId sessionId)
          Returns all users on the server.
 void initConnection(ServerInfo serverInfo, SessionId id)
          Initialize the connection to the server.
 void removeGroup(SessionId sessionId, ACOrgUnitId user, ACOrgUnitId group)
          Removes a user from a group.
 void removeMember(SessionId sessionId, ACOrgUnitId group, ACOrgUnitId member)
          Removes a orgUnit from a group.
 void removeParticipant(SessionId sessionId, ProjectId projectId, ACOrgUnitId participant)
          Removes an orgUnits from a project.
 
Methods inherited from class org.eclipse.emf.emfstore.internal.client.model.connectionmanager.AbstractConnectionManager
hasConnectionProxy
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRpcAdminConnectionManager

public XmlRpcAdminConnectionManager()
Method Detail

initConnection

public void initConnection(ServerInfo serverInfo,
                           SessionId id)
                    throws ConnectionException
Initialize the connection to the server.

Specified by:
initConnection in interface AdminConnectionManager
Parameters:
serverInfo - the server info
id - the session id
Throws:
ConnectionException - if the connection fails

addMember

public void addMember(SessionId sessionId,
                      ACOrgUnitId group,
                      ACOrgUnitId member)
               throws ESException
Adds an orgUnit to a group.

Specified by:
addMember in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
group - the group's orgUnitId
member - the members orgUnitId
Throws:
ESException - if any error in the EmfStore occurs

addParticipant

public void addParticipant(SessionId sessionId,
                           ProjectId projectId,
                           ACOrgUnitId participant,
                           org.eclipse.emf.ecore.EClass role)
                    throws ESException
Adds an organization unit to a project.

Specified by:
addParticipant in interface AdminEmfStore
Parameters:
sessionId - the SessionId for authentication
projectId - the ProjectId of the project
participant - the ACOrgUnitId of the participant
role - the role to be assigned to the participant
Throws:
ESException - if any error in the EmfStore occurs

changeOrgUnit

public void changeOrgUnit(SessionId sessionId,
                          ACOrgUnitId orgUnitId,
                          String name,
                          String description)
                   throws ESException
Changes the orgUnit's name and description.

Specified by:
changeOrgUnit in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication.
orgUnitId - the orgUnitId
name - the new name
description - the new description
Throws:
ESException - if any error in the EmfStore occurs

changeUser

public void changeUser(SessionId sessionId,
                       ACOrgUnitId userId,
                       String name,
                       String password)
                throws ESException
Changes the name and password of an ACUser.

Specified by:
changeUser in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication.
userId - the ID of the user
name - the new name
password - the new password
Throws:
ESException - if any error in the EmfStore occurs

changeRole

public void changeRole(SessionId sessionId,
                       ProjectId projectId,
                       ACOrgUnitId orgUnit,
                       org.eclipse.emf.ecore.EClass role)
                throws ESException
Changes the role for an orgUnit in a specified project.

Specified by:
changeRole in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
projectId - the project's id
orgUnit - the orgUnit
role - new role for orgUnit
Throws:
ESException - if any error in the EmfStore occurs.

createGroup

public ACOrgUnitId createGroup(SessionId sessionId,
                               String name)
                        throws ESException
Creates a group on the server.

Specified by:
createGroup in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
name - the name for the group
Returns:
ACOrgUnitId
Throws:
ESException - if any error in the EmfStore occurs

createUser

public ACOrgUnitId createUser(SessionId sessionId,
                              String name)
                       throws ESException
Creates a user on the server.

Specified by:
createUser in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
name - the user's name
Returns:
ACOrgUnitId the ACOrgUnitId of the created user
Throws:
ESException - if any error occurred while creating the user

deleteGroup

public void deleteGroup(SessionId sessionId,
                        ACOrgUnitId group)
                 throws ESException
Deletes a group on the server.

Specified by:
deleteGroup in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
group - orgUnitId of the group
Throws:
ESException - if any error in the EmfStore occurs

deleteUser

public void deleteUser(SessionId sessionId,
                       ACOrgUnitId user)
                throws ESException
Deletes a user from the server.

Specified by:
deleteUser in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
user - the user's orgUnitId
Throws:
ESException - if any error in the EmfStore occurs

getGroups

public List<ACGroup> getGroups(SessionId sessionId)
                        throws ESException
Returns all groups on the server.

Specified by:
getGroups in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
Returns:
list of groups
Throws:
ESException - if any error in the EmfStore occurs

getGroups

public List<ACGroup> getGroups(SessionId sessionId,
                               ACOrgUnitId user)
                        throws ESException
Returns a list of all groups in which the specified user is member of.

Specified by:
getGroups in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
user - the users orgUnitId
Returns:
a list of groups
Throws:
ESException - if any error in the EmfStore occurs

getMembers

public List<ACOrgUnit> getMembers(SessionId sessionId,
                                  ACOrgUnitId groupId)
                           throws ESException
Returns all members from a group.

Specified by:
getMembers in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
groupId - the group's orgUnitId
Returns:
a list of orgUnits
Throws:
ESException - if any error in the EmfStore occurs.

getOrgUnit

public ACOrgUnit getOrgUnit(SessionId sessionId,
                            ACOrgUnitId orgUnitId)
                     throws ESException
Returns an orgUnit with the specified orgUnitId.

Specified by:
getOrgUnit in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
orgUnitId - the orgUnitId
Returns:
an orgUnit
Throws:
ESException - if any error in the EmfStore occurs

getOrgUnits

public List<ACOrgUnit> getOrgUnits(SessionId sessionId)
                            throws ESException
Returns all orgUnits on the server.

Specified by:
getOrgUnits in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
Returns:
list of orgUnits
Throws:
ESException - if any error in the EmfStore occurs

getParticipants

public List<ACOrgUnit> getParticipants(SessionId sessionId,
                                       ProjectId projectId)
                                throws ESException
Returns all orgUnits which are attached to the given project.

Specified by:
getParticipants in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
projectId - project's id
Returns:
a list of orgUnits
Throws:
ESException - if any error in the EmfStore occurs

getProjectInfos

public List<ProjectInfo> getProjectInfos(SessionId sessionId)
                                  throws ESException
Returns a list of available project.

Specified by:
getProjectInfos in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
Returns:
list of project infos
Throws:
ESException - if any error in the EmfStore occurs

getRole

public Role getRole(SessionId sessionId,
                    ProjectId projectId,
                    ACOrgUnitId orgUnit)
             throws ESException
Returns an orgUnit's role for a specified project.

Specified by:
getRole in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
projectId - the project's id
orgUnit - the orgUnit's id
Returns:
a role the user's role
Throws:
ESException - if any error in the EmfStore occurs

getUsers

public List<ACUser> getUsers(SessionId sessionId)
                      throws ESException
Returns all users on the server.

Specified by:
getUsers in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
Returns:
list of user
Throws:
ESException - if any error in the EmfStore occurs

removeGroup

public void removeGroup(SessionId sessionId,
                        ACOrgUnitId user,
                        ACOrgUnitId group)
                 throws ESException
Removes a user from a group.

Specified by:
removeGroup in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
user - the user's orgUnitId
group - the group's orgUnitId
Throws:
ESException - if any error in the EmfStore occurs

removeMember

public void removeMember(SessionId sessionId,
                         ACOrgUnitId group,
                         ACOrgUnitId member)
                  throws ESException
Removes a orgUnit from a group.

Specified by:
removeMember in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
group - the group's orgUnitId
member - the members orgUnitId
Throws:
ESException - if any error in the EmfStore occurs

removeParticipant

public void removeParticipant(SessionId sessionId,
                              ProjectId projectId,
                              ACOrgUnitId participant)
                       throws ESException
Removes an orgUnits from a project.

Specified by:
removeParticipant in interface AdminEmfStore
Parameters:
sessionId - the session id for authentication
projectId - the project's id
participant - the orgUnit's id
Throws:
ESException - if any error in the EmfStore occurs

assignRole

public void assignRole(SessionId sessionId,
                       ACOrgUnitId orgUnitId,
                       org.eclipse.emf.ecore.EClass roleClass)
                throws ESException
Assigns a role for an orgUnit without a project.

Specified by:
assignRole in interface AdminEmfStore
Parameters:
sessionId - the SessionId for authentication
orgUnitId - the ID of an organizational unit
roleClass - the role to be assigned
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminEmfStore.assignRole(org.eclipse.emf.emfstore.internal.server.model.SessionId, org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId, org.eclipse.emf.ecore.EClass)

addInitialParticipant

public void addInitialParticipant(SessionId sessionId,
                                  ProjectId projectId,
                                  ACOrgUnitId participantId,
                                  org.eclipse.emf.ecore.EClass roleClass)
                           throws ESException
Adds an organization unit to a project.

Specified by:
addInitialParticipant in interface AdminEmfStore
Parameters:
sessionId - the SessionId for authentication
projectId - the ProjectId of the project
participantId - the ACOrgUnitId of the participant
roleClass - the role to be assigned to the participant
Throws:
ESException - if any error in the EmfStore occurs
See Also:
AdminEmfStore.addInitialParticipant(org.eclipse.emf.emfstore.internal.server.model.SessionId, org.eclipse.emf.emfstore.internal.server.model.ProjectId, org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId, org.eclipse.emf.ecore.EClass)


Copyright © 2015. All Rights Reserved.