edu.vt.middleware.registry.manage.group
Class RegistryUpdater

java.lang.Object
  extended by edu.vt.middleware.registry.common.CommonRegistryFinder
      extended by edu.vt.middleware.registry.manage.group.RegistryUpdater

public final class RegistryUpdater
extends CommonRegistryFinder

RegistryUpdater implements the details of managing groups in the Virginia Tech Registry.

Version:
$Revision: 7643 $
Author:
Daniel Fisher

Field Summary
private static Log LOG
          Log for this class
 
Constructor Summary
RegistryUpdater(EntityManager em)
          This creates a RegistryUpdater with the supplied Entity Manager.
 
Method Summary
 void addGroupMember(String parentUugid, String childUugid)
          This adds the supplied child group to the supplied parent group.
 void addPersonRelation(String uugid, Long uid, RoleType roleType)
          This adds the supplied person to the group with the supplied UUGID in the supplied role.
 void addServiceRelation(String uugid, String uusid, RoleType roleType)
          This adds the supplied service to the group with the supplied UUGID in the supplied role.
 void createGroup(String uugid, Long contactUid, Long adminUid)
          This creates a new group using the supplied uugid, contact person, and administrator.
 void removeDisplayName(String uugid)
          This removes the display name for the group with the supplied UUGID.
 void removeEmailAddress(String uugid)
          This removes the e-mail address for the group with the supplied UUGID.
 void removeGroup(String uugid)
          This deletes a group with the supplied UUGID.
 void removeGroupMember(String parentUugid, String childUugid)
          This removes the supplied child group from the supplied parent group.
 void removePersonRelation(String uugid, Long uid, RoleType roleType)
          This removes the supplied person from the group with the supplied UUGID in the supplied role.
 void removeServiceRelation(String uugid, String uusid, RoleType roleType)
          This removes the supplied service from the group with the supplied UUGID in the supplied role.
 void setDisplayName(String uugid, String displayName)
          This sets the display name for the group with the supplied UUGID.
 void setEmailAddress(String uugid, String emailAddress)
          This sets the e-mail address for the group with the supplied UUGID.
 void setExpiration(String uugid, Calendar date)
          This sets the expiration date of the group with the supplied UUGID.
 void setExpirationNotification(String uugid, Calendar date)
          This sets the expiration notification date of the group with the supplied UUGID.
 void setSuppressDisplay(String uugid, Boolean suppressDisplay)
          This sets the suppress display flag for the group with the supplied UUGID.
 void setSuppressMembers(String uugid, Boolean suppressMembers)
          This sets the suppress members flag for the group with the supplied UUGID.
 
Methods inherited from class edu.vt.middleware.registry.common.CommonRegistryFinder
emailAccountExists, entitlementExists, flushAndRefresh, getAccountState, getDataTypes, getEntitlementData, getEntityManager, getGroup, getGroup, getPerson, getPerson, getPersonUid, getService, getService, getTicket, getTicket, getUserid, groupExists, guestIdExists, personExists, serviceExists, ticketExists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Log LOG
Log for this class

Constructor Detail

RegistryUpdater

public RegistryUpdater(EntityManager em)
This creates a RegistryUpdater with the supplied Entity Manager.

Parameters:
em - EntityManager
Method Detail

createGroup

public void createGroup(String uugid,
                        Long contactUid,
                        Long adminUid)
                 throws ApplicationServerException
This creates a new group using the supplied uugid, contact person, and administrator.

Parameters:
uugid - String
contactUid - Long
adminUid - Long
Throws:
ApplicationServerException - if the method fails
NoResultFoundException - if the uids cannot be found

removeGroup

public void removeGroup(String uugid)
                 throws ApplicationServerException
This deletes a group with the supplied UUGID.

Parameters:
uugid - String
Throws:
ApplicationServerException - if the method fails

setExpiration

public void setExpiration(String uugid,
                          Calendar date)
                   throws ApplicationServerException
This sets the expiration date of the group with the supplied UUGID.

Parameters:
uugid - String
date - Calendar
Throws:
ApplicationServerException - if the method fails

setExpirationNotification

public void setExpirationNotification(String uugid,
                                      Calendar date)
                               throws ApplicationServerException
This sets the expiration notification date of the group with the supplied UUGID.

Parameters:
uugid - String
date - Calendar
Throws:
ApplicationServerException - if the method fails

setDisplayName

public void setDisplayName(String uugid,
                           String displayName)
                    throws ApplicationServerException
This sets the display name for the group with the supplied UUGID.

Parameters:
uugid - String
displayName - String
Throws:
ApplicationServerException - if the method fails

removeDisplayName

public void removeDisplayName(String uugid)
                       throws ApplicationServerException
This removes the display name for the group with the supplied UUGID.

Parameters:
uugid - String
Throws:
ApplicationServerException - if the method fails

setSuppressDisplay

public void setSuppressDisplay(String uugid,
                               Boolean suppressDisplay)
                        throws ApplicationServerException
This sets the suppress display flag for the group with the supplied UUGID.

Parameters:
uugid - String
suppressDisplay - Boolean
Throws:
ApplicationServerException - if the method fails

setSuppressMembers

public void setSuppressMembers(String uugid,
                               Boolean suppressMembers)
                        throws ApplicationServerException
This sets the suppress members flag for the group with the supplied UUGID.

Parameters:
uugid - String
suppressMembers - Boolean
Throws:
ApplicationServerException - if the method fails

setEmailAddress

public void setEmailAddress(String uugid,
                            String emailAddress)
                     throws ApplicationServerException
This sets the e-mail address for the group with the supplied UUGID.

Parameters:
uugid - String
emailAddress - String
Throws:
ApplicationServerException - if the method fails

removeEmailAddress

public void removeEmailAddress(String uugid)
                        throws ApplicationServerException
This removes the e-mail address for the group with the supplied UUGID.

Parameters:
uugid - String
Throws:
ApplicationServerException - if the method fails

addPersonRelation

public void addPersonRelation(String uugid,
                              Long uid,
                              RoleType roleType)
                       throws ApplicationServerException
This adds the supplied person to the group with the supplied UUGID in the supplied role.

Parameters:
uugid - String
uid - Long to add
roleType - RoleType of the person
Throws:
ApplicationServerException - if the method fails
NoResultFoundException - if the group or person cannot be found

removePersonRelation

public void removePersonRelation(String uugid,
                                 Long uid,
                                 RoleType roleType)
                          throws ApplicationServerException
This removes the supplied person from the group with the supplied UUGID in the supplied role.

Parameters:
uugid - String
uid - Long to remove
roleType - RoleType of the person
Throws:
ApplicationServerException - if the method fails
NoResultFoundException - if the group or person cannot be found

addGroupMember

public void addGroupMember(String parentUugid,
                           String childUugid)
                    throws ApplicationServerException
This adds the supplied child group to the supplied parent group.

Parameters:
parentUugid - String
childUugid - String
Throws:
ApplicationServerException - if the group cannot be found
FinderFailedException - if either group cannot be found

removeGroupMember

public void removeGroupMember(String parentUugid,
                              String childUugid)
                       throws ApplicationServerException
This removes the supplied child group from the supplied parent group.

Parameters:
parentUugid - String
childUugid - String
Throws:
ApplicationServerException - if the group cannot be found
FinderFailedException - if either group cannot be found

addServiceRelation

public void addServiceRelation(String uugid,
                               String uusid,
                               RoleType roleType)
                        throws ApplicationServerException
This adds the supplied service to the group with the supplied UUGID in the supplied role.

Parameters:
uugid - String
uusid - String to add
roleType - RoleType of the service
Throws:
ApplicationServerException - if the service cannot be added
FinderFailedException - if the group or service cannot be found

removeServiceRelation

public void removeServiceRelation(String uugid,
                                  String uusid,
                                  RoleType roleType)
                           throws ApplicationServerException
This removes the supplied service from the group with the supplied UUGID in the supplied role.

Parameters:
uugid - String
uusid - String to remove
roleType - RoleType of the person
Throws:
ApplicationServerException - if the group cannot be found
FinderFailedException - if the group or service cannot be found


Copyright © 2008 Virginia Tech. All Rights Reserved.