org.eclipse.emf.emfstore.internal.server.model.impl.api
Class ESOrgUnitRepositoryImpl

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.server.model.impl.api.ESOrgUnitRepositoryImpl
All Implemented Interfaces:
ESOrgUnitRepository

public class ESOrgUnitRepositoryImpl
extends Object
implements ESOrgUnitRepository

Default implementation of an ESOrgUnitRepository.

Author:
emueller

Constructor Summary
ESOrgUnitRepositoryImpl(ACDAOFacade facade)
          Constructor.
 
Method Summary
 void addGroup(ESGroup group)
          Adds the given group.
 void addUser(ESUser user)
          Adds the given user.
 Set<ESGroup> getGroups()
          Returns a set of all available ESGroups.
 List<ESProjectHistory> getProjects()
          Returns a list of all available project histories.
 Set<ESUser> getUsers()
          Returns a set of all available ESUsers.
 void removeGroup(ESGroup group)
          Removes the given group.
 void removeUser(ESUser user)
          Removes the given user.
 void save()
          Saves the state of the repository.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ESOrgUnitRepositoryImpl

public ESOrgUnitRepositoryImpl(ACDAOFacade facade)
Constructor.

Parameters:
facade - the internally available access control DAO backed by EMFStore
Method Detail

getUsers

public Set<ESUser> getUsers()
Returns a set of all available ESUsers.

Specified by:
getUsers in interface ESOrgUnitRepository
Returns:
a set of users
See Also:
ESOrgUnitRepository.getUsers()

getGroups

public Set<ESGroup> getGroups()
Returns a set of all available ESGroups.

Specified by:
getGroups in interface ESOrgUnitRepository
Returns:
a set of groups
See Also:
ESOrgUnitRepository.getGroups()

getProjects

public List<ESProjectHistory> getProjects()
Returns a list of all available project histories.

Specified by:
getProjects in interface ESOrgUnitRepository
Returns:
a list of ESProjectHistory
See Also:
ESOrgUnitRepository.getProjects()

removeGroup

public void removeGroup(ESGroup group)
Removes the given group.

Specified by:
removeGroup in interface ESOrgUnitRepository
Parameters:
group - the group to be removed
See Also:
ESOrgUnitRepository.removeGroup(org.eclipse.emf.emfstore.server.model.ESGroup)

removeUser

public void removeUser(ESUser user)
Removes the given user.

Specified by:
removeUser in interface ESOrgUnitRepository
Parameters:
user - the user to be removed
See Also:
ESOrgUnitRepository.removeUser(org.eclipse.emf.emfstore.server.model.ESUser)

addUser

public void addUser(ESUser user)
Adds the given user.

Specified by:
addUser in interface ESOrgUnitRepository
Parameters:
user - the user to be added
See Also:
ESOrgUnitRepository.addUser(org.eclipse.emf.emfstore.server.model.ESUser)

addGroup

public void addGroup(ESGroup group)
Adds the given group.

Specified by:
addGroup in interface ESOrgUnitRepository
Parameters:
group - the group to be added
See Also:
ESOrgUnitRepository.addGroup(org.eclipse.emf.emfstore.server.model.ESGroup)

save

public void save()
          throws IOException
Saves the state of the repository. Depending on the actual implementation this method may remain empty. This method exists mainly for performance reasons.

Specified by:
save in interface ESOrgUnitRepository
Throws:
IOException - in case saving fails
See Also:
ESOrgUnitRepository.save()


Copyright © 2016. All Rights Reserved.