|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sail.webapp.service.workgroup.impl.WorkgroupServiceImpl
public class WorkgroupServiceImpl
| Field Summary | |
|---|---|
protected AclService<Workgroup> |
aclService
|
protected GroupDao<Group> |
groupDao
|
protected OfferingService |
offeringService
|
protected SdsWorkgroupDao |
sdsWorkgroupDao
|
protected UserService |
userService
|
protected WorkgroupDao<Workgroup> |
workgroupDao
|
| Constructor Summary | |
|---|---|
WorkgroupServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
addMembers(Workgroup workgroup,
Set<User> membersToAdd)
Adds members to an already-existing workgroup. |
List<Workgroup> |
createPreviewWorkgroupForOfferingIfNecessary(Offering offering,
List<Workgroup> workgroupList,
User user,
String previewWorkgroupName)
Given a list of workgroups for a particular offering, if the list is empty (i.e. |
protected SdsWorkgroup |
createSdsWorkgroup(String name,
Set<User> members,
Offering offering)
Creates and returns a SdsWorkgroup given parameters |
protected Workgroup |
createWorkgroup(Set<User> members,
Offering offering,
SdsWorkgroup sdsWorkgroup)
Creates and returns a Workgroup given parameters |
Workgroup |
createWorkgroup(String name,
Set<User> members,
Offering offering)
Creates a new SdsWorkgroup on the SDS as well as a
Workgroup object in the local data store, and then associates
that workgroup to an offering. |
Workgroup |
getPreviewWorkgroupForRooloOffering(Offering previewOffering,
User previewUser)
Creates a workgroup for a preview offering. |
Workgroup |
getWorkgroupForPreviewOffering(Offering previewOffering,
User previewUser)
Given a PreviewOffering, returns a workgroup that is used to preview it If a workgroup has not been created yet, a new workgroup is created with a default preview user |
List<Workgroup> |
getWorkgroupList()
Gets a List of workgroups available. |
List<Workgroup> |
getWorkgroupListByOfferingAndUser(Offering offering,
User user)
Gets a List of workgroups for a given offering with the
specified user as a member of that workgroup. |
List<Workgroup> |
getWorkgroupsForUser(User user)
Given a User, returns all of the workgroups that the user is in |
void |
removeMembers(Workgroup workgroup,
Set<User> membersToRemove)
Removes members from an already-existing workgroup. |
Workgroup |
retrieveById(Long workgroupId)
Retrieves the Workgroup domain object using unique workgroupId |
void |
setAclService(AclService<Workgroup> aclService)
|
void |
setGroupDao(GroupDao<Group> groupDao)
|
void |
setOfferingService(OfferingService offeringService)
|
void |
setSdsWorkgroupDao(SdsWorkgroupDao sdsWorkgroupDao)
|
void |
setUserService(UserService userService)
|
void |
setWorkgroupDao(WorkgroupDao<Workgroup> workgroupDao)
|
Workgroup |
updateWorkgroupMembership(ChangeWorkgroupParameters params)
Updates the Workgroups by modifying its members |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SdsWorkgroupDao sdsWorkgroupDao
protected WorkgroupDao<Workgroup> workgroupDao
protected GroupDao<Group> groupDao
protected OfferingService offeringService
protected AclService<Workgroup> aclService
protected UserService userService
| Constructor Detail |
|---|
public WorkgroupServiceImpl()
| Method Detail |
|---|
public void setAclService(AclService<Workgroup> aclService)
aclService - the aclService to setpublic void setSdsWorkgroupDao(SdsWorkgroupDao sdsWorkgroupDao)
sdsWorkgroupDao - the sdsWorkgroupDao to setpublic void setWorkgroupDao(WorkgroupDao<Workgroup> workgroupDao)
workgroupDao - the workgroupDao to set
@Transactional(rollbackFor=HttpStatusCodeException.class)
public Workgroup createWorkgroup(String name,
Set<User> members,
Offering offering)
WorkgroupServiceSdsWorkgroup on the SDS as well as a
Workgroup object in the local data store, and then associates
that workgroup to an offering. A side effect is
that the workgroup id is set to the value that the SDS assigns to the new
workgroup.
createWorkgroup in interface WorkgroupServicename - String name of the workgroup you want to createoffering - The offering to associate the workgroup to
Workgroup that is created.net.sf.sail.webapp.service.workgroup.WorkgroupService#createWorkgroup(net.sf.sail.webapp.domain.Workgroup, net.sf.sail.webapp.domain.Offering)
protected Workgroup createWorkgroup(Set<User> members,
Offering offering,
SdsWorkgroup sdsWorkgroup)
Workgroup given parameters
members - Set of users in this SdsWorkgroupoffering - which Offering this workgroup belongs insdsWorkgroup - SdsWorkgroupReturns:Workgroup
protected SdsWorkgroup createSdsWorkgroup(String name,
Set<User> members,
Offering offering)
SdsWorkgroup given parameters
name - what this SdsWorkgroup is calledmembers - Set of users in this SdsWorkgroupoffering - which Offering this workgroup belongs in
SdsWorkgroup@Transactional(readOnly=true) public List<Workgroup> getWorkgroupList()
WorkgroupServiceList of workgroups available.
getWorkgroupList in interface WorkgroupServiceWorkgroup List.net.sf.sail.webapp.service.workgroup.WorkgroupService#getWorkgroupIterator()
@Transactional(readOnly=true)
public List<Workgroup> getWorkgroupListByOfferingAndUser(Offering offering,
User user)
WorkgroupServiceList of workgroups for a given offering with the
specified user as a member of that workgroup.
getWorkgroupListByOfferingAndUser in interface WorkgroupServiceoffering - for the workgroupuser - that is a member of the workgroup
WorkgroupService.getWorkgroupListByOfferingAndUser(net.sf.sail.webapp.domain.Offering,
net.sf.sail.webapp.domain.User)@Transactional(readOnly=true) public List<Workgroup> getWorkgroupsForUser(User user)
WorkgroupService
getWorkgroupsForUser in interface WorkgroupServiceuser - the User to search for
WorkgroupService.getWorkgroupsForUser(net.sf.sail.webapp.domain.User)
@Transactional(rollbackFor=HttpStatusCodeException.class)
public List<Workgroup> createPreviewWorkgroupForOfferingIfNecessary(Offering offering,
List<Workgroup> workgroupList,
User user,
String previewWorkgroupName)
WorkgroupService
createPreviewWorkgroupForOfferingIfNecessary in interface WorkgroupServiceoffering - the given offering associated with the workgroupsworkgroupList - List of workgroups belonging to the given
offeringuser - the User that should be put into the preview
workgrouppreviewWorkgroupName - String that specifies the default preview
workgroup name
net.sf.sail.webapp.service.workgroup.WorkgroupService#createPreviewWorkgroupForOfferingIfNecessary(net.sf.sail.webapp.domain.Offering,
java.util.List, net.sf.sail.webapp.domain.User)
@Transactional(rollbackFor=HttpStatusCodeException.class)
public Workgroup getWorkgroupForPreviewOffering(Offering previewOffering,
User previewUser)
WorkgroupService
getWorkgroupForPreviewOffering in interface WorkgroupServicenet.sf.sail.webapp.service.workgroup.WorkgroupService#getWorkgroupForPreviewOffering(net.sf.sail.webapp.domain.Offering)
@Transactional(rollbackFor=HttpStatusCodeException.class)
public Workgroup getPreviewWorkgroupForRooloOffering(Offering previewOffering,
User previewUser)
WorkgroupService
getPreviewWorkgroupForRooloOffering in interface WorkgroupServiceWorkgroupWorkgroupService.getPreviewWorkgroupForRooloOffering(net.sf.sail.webapp.domain.Offering, net.sf.sail.webapp.domain.User)
@Transactional
public void addMembers(Workgroup workgroup,
Set<User> membersToAdd)
WorkgroupService
addMembers in interface WorkgroupServiceworkgroup - an existing Workgroup that the members will be
added tomembersToAdd - Set of users to add to the groupWorkgroupService.addMembers(net.sf.sail.webapp.domain.Workgroup, java.util.Set)
@Transactional
public void removeMembers(Workgroup workgroup,
Set<User> membersToRemove)
WorkgroupService
removeMembers in interface WorkgroupServiceworkgroup - an existing Workgroup that the members will be
removed frommembersToRemove - Set of users to remove from the groupWorkgroupService.removeMembers(Workgroup, Set)
@Transactional
public Workgroup updateWorkgroupMembership(ChangeWorkgroupParameters params)
throws Exception
WorkgroupService
updateWorkgroupMembership in interface WorkgroupServiceExceptionnet.sf.sail.webapp.service.workgroup.WorkgroupService#updateWorkgroupMembership(net.sf.sail.webapp.domain.User, net.sf.sail.webapp.domain.Workgroup, net.sf.sail.webapp.domain.Workgroup)
public Workgroup retrieveById(Long workgroupId)
throws ObjectNotFoundException
WorkgroupService
retrieveById in interface WorkgroupServiceworkgroupId - Long workgroupId to use for lookup
Workgroup
the Workgroup object with the workgroupId
ObjectNotFoundExceptionWorkgroupService.retrieveById(Long)public void setOfferingService(OfferingService offeringService)
offeringService - the offeringService to setpublic void setGroupDao(GroupDao<Group> groupDao)
groupDao - the groupDao to setpublic void setUserService(UserService userService)
userService - the userService to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||