org.eclipse.emf.emfstore.internal.client.model.impl
Class AdminBrokerImpl

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.model.impl.AdminBrokerImpl
All Implemented Interfaces:
AdminBroker

public class AdminBrokerImpl
extends Object
implements AdminBroker

Implementation of the AdminBroker.

Author:
wesendon, koegel

Constructor Summary
AdminBrokerImpl(ServerInfo serverInfo, SessionId sessionId)
          Constructor.
 
Method Summary
 void addInitialParticipant(ProjectId projectId, ACOrgUnitId participantId, org.eclipse.emf.ecore.EClass role)
          Delegates call to method in AdminEmfStore.
 void addMember(ACOrgUnitId group, ACOrgUnitId member)
          Delegates call to method in AdminEmfStore.
 void addParticipant(ProjectId projectId, ACOrgUnitId participant, org.eclipse.emf.ecore.EClass role)
          Delegates call to method in AdminEmfStore.
 void assignRole(ACOrgUnitId orgUnitId, org.eclipse.emf.ecore.EClass role)
          Delegates call to method in AdminEmfStore.
 void changeOrgUnit(ACOrgUnitId orgUnitId, String name, String description)
          Delegates call to method in AdminEmfStore.
 void changeRole(ProjectId projectId, ACOrgUnitId orgUnit, org.eclipse.emf.ecore.EClass role)
          Delegates call to method in AdminEmfStore.
 void changeUser(ACOrgUnitId userId, String name, String password)
          Delegates call to method in AdminEmfStore.
 ACOrgUnitId createGroup(String name)
          Delegates call to method in AdminEmfStore.
 ACOrgUnitId createUser(String name)
          Delegates call to method in AdminEmfStore.
 void deleteGroup(ACOrgUnitId group)
          Delegates call to method in AdminEmfStore.
 void deleteUser(ACOrgUnitId user)
          Delegates call to method in AdminEmfStore.
 List<ACGroup> getGroups()
          Delegates call to method in AdminEmfStore.
 List<ACGroup> getGroups(ACOrgUnitId user)
          Delegates call to method in AdminEmfStore.
 List<ACOrgUnit> getMembers(ACOrgUnitId groupId)
          Delegates call to method in AdminEmfStore.
 ACOrgUnit getOrgUnit(ACOrgUnitId orgUnitId)
          Delegates call to method in AdminEmfStore.
 List<ACOrgUnit> getOrgUnits()
          Delegates call to method in AdminEmfStore.
 List<ACOrgUnit> getParticipants(ProjectId projectId)
          Delegates call to method in AdminEmfStore.
 List<ProjectInfo> getProjectInfos()
          Delegates call to method in AdminEmfStore.
 Role getRole(ProjectId projectId, ACOrgUnitId orgUnit)
          Delegates call to method in AdminEmfStore.
 List<ACUser> getUsers()
          Delegates call to method in AdminEmfStore.
 void removeGroup(ACOrgUnitId user, ACOrgUnitId group)
          Delegates call to method in AdminEmfStore.
 void removeMember(ACOrgUnitId group, ACOrgUnitId member)
          Delegates call to method in AdminEmfStore.
 void removeParticipant(ProjectId projectId, ACOrgUnitId participant)
          Delegates call to method in AdminEmfStore.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminBrokerImpl

public AdminBrokerImpl(ServerInfo serverInfo,
                       SessionId sessionId)
                throws ConnectionException
Constructor.

Parameters:
serverInfo - server info
sessionId - session id, must be an admin session
Throws:
ConnectionException - if connection init fails
Method Detail

addParticipant

public void addParticipant(ProjectId projectId,
                           ACOrgUnitId participant,
                           org.eclipse.emf.ecore.EClass role)
                    throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
addParticipant in interface AdminBroker
Parameters:
projectId - the ProjectId
participant - the ACOrgUnitId of the participant to be added
role - the EClass of the role that should be assigned to the participant
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.addParticipant(org.eclipse.emf.emfstore.internal.server.model.ProjectId, org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId, org.eclipse.emf.ecore.EClass)

changeRole

public void changeRole(ProjectId projectId,
                       ACOrgUnitId orgUnit,
                       org.eclipse.emf.ecore.EClass role)
                throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
changeRole in interface AdminBroker
Parameters:
projectId - the project id
orgUnit - the orgUnit id
role - new role
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.changeRole(org.eclipse.emf.emfstore.internal.server.model.ProjectId, org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId, org.eclipse.emf.ecore.EClass)

getGroups

public List<ACGroup> getGroups()
                        throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
getGroups in interface AdminBroker
Returns:
list of groups
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.getGroups()

getGroups

public List<ACGroup> getGroups(ACOrgUnitId user)
                        throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
getGroups in interface AdminBroker
Parameters:
user - orgUnit id
Returns:
list of groups
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.getGroups(org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId)

getOrgUnits

public List<ACOrgUnit> getOrgUnits()
                            throws ESException
Delegates call to method in AdminEmfStore. AdminEmfStore.getOrgUnits(org.eclipse.emf.emfstore.internal.server.model.SessionId)

Specified by:
getOrgUnits in interface AdminBroker
Returns:
list of orgUnits
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.getOrgUnits()

getParticipants

public List<ACOrgUnit> getParticipants(ProjectId projectId)
                                throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
getParticipants in interface AdminBroker
Parameters:
projectId - project id
Returns:
list of participating orgUnits
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.getParticipants(org.eclipse.emf.emfstore.internal.server.model.ProjectId)

getMembers

public List<ACOrgUnit> getMembers(ACOrgUnitId groupId)
                           throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
getMembers in interface AdminBroker
Parameters:
groupId - group id
Returns:
list of members
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.getMembers(org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId)

getProjectInfos

public List<ProjectInfo> getProjectInfos()
                                  throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
getProjectInfos in interface AdminBroker
Returns:
list of project infos
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.getProjectInfos()

getRole

public Role getRole(ProjectId projectId,
                    ACOrgUnitId orgUnit)
             throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
getRole in interface AdminBroker
Parameters:
projectId - project id
orgUnit - orgUnit id
Returns:
the role
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.getRole(org.eclipse.emf.emfstore.internal.server.model.ProjectId, org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId)

getUsers

public List<ACUser> getUsers()
                      throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
getUsers in interface AdminBroker
Returns:
list of users
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.getUsers()

removeGroup

public void removeGroup(ACOrgUnitId user,
                        ACOrgUnitId group)
                 throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
removeGroup in interface AdminBroker
Parameters:
user - orgUnit id
group - group id
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.removeGroup(org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId, org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId)

removeParticipant

public void removeParticipant(ProjectId projectId,
                              ACOrgUnitId participant)
                       throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
removeParticipant in interface AdminBroker
Parameters:
projectId - project id
participant - orgUnit id
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.removeParticipant(org.eclipse.emf.emfstore.internal.server.model.ProjectId, org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId)

createGroup

public ACOrgUnitId createGroup(String name)
                        throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
createGroup in interface AdminBroker
Parameters:
name - new name
Returns:
ACOrgUnitId
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.createGroup(java.lang.String)

createUser

public ACOrgUnitId createUser(String name)
                       throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
createUser in interface AdminBroker
Parameters:
name - user's name
Returns:
ACOrgUnitId
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.createUser(java.lang.String)

deleteGroup

public void deleteGroup(ACOrgUnitId group)
                 throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
deleteGroup in interface AdminBroker
Parameters:
group - orgUnit id
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.deleteGroup(org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId)

deleteUser

public void deleteUser(ACOrgUnitId user)
                throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
deleteUser in interface AdminBroker
Parameters:
user - user id
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.deleteUser(org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId)

addMember

public void addMember(ACOrgUnitId group,
                      ACOrgUnitId member)
               throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
addMember in interface AdminBroker
Parameters:
group - group id
member - member id
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.addMember(org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId, org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId)

removeMember

public void removeMember(ACOrgUnitId group,
                         ACOrgUnitId member)
                  throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
removeMember in interface AdminBroker
Parameters:
group - group id
member - member id
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.removeMember(org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId, org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId)

changeOrgUnit

public void changeOrgUnit(ACOrgUnitId orgUnitId,
                          String name,
                          String description)
                   throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
changeOrgUnit in interface AdminBroker
Parameters:
orgUnitId - orgUnit id
name - new name
description - new description
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.changeOrgUnit(org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId, java.lang.String, java.lang.String)

changeUser

public void changeUser(ACOrgUnitId userId,
                       String name,
                       String password)
                throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
changeUser in interface AdminBroker
Parameters:
userId - the ID of the user
name - the new name of the user
password - the new password of the user
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.changeUser(org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId, java.lang.String, java.lang.String)

getOrgUnit

public ACOrgUnit getOrgUnit(ACOrgUnitId orgUnitId)
                     throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
getOrgUnit in interface AdminBroker
Parameters:
orgUnitId - orgUnit id
Returns:
orgUnit
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.getOrgUnit(org.eclipse.emf.emfstore.internal.server.model.accesscontrol.ACOrgUnitId)

assignRole

public void assignRole(ACOrgUnitId orgUnitId,
                       org.eclipse.emf.ecore.EClass role)
                throws ESException
Delegates call to method in AdminEmfStore.

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

addInitialParticipant

public void addInitialParticipant(ProjectId projectId,
                                  ACOrgUnitId participantId,
                                  org.eclipse.emf.ecore.EClass role)
                           throws ESException
Delegates call to method in AdminEmfStore.

Specified by:
addInitialParticipant in interface AdminBroker
Parameters:
projectId - the ProjectId
participantId - the ACOrgUnitId of the participant to be added
role - the EClass of the role that should be assigned to the participant
Throws:
ESException - if an exceptions occurs on the server or on transport
See Also:
AdminBroker.addInitialParticipant(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.