|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.vt.middleware.registry.common.CommonRegistryFinder
public class CommonRegistryFinder
CommonRegistryFinder implements the details of finding
common Registry beans and related data.
| Field Summary | |
|---|---|
private EntityManager |
entityManager
Entity Manager for looking up beans |
private static Log |
LOG
Log for this class |
| Constructor Summary | |
|---|---|
CommonRegistryFinder(EntityManager em)
Creates a new CommonRegistryFinder with the supplied
entity manager. |
|
| Method Summary | ||
|---|---|---|
boolean |
emailAccountExists(Long uid)
This returns whether the supplied email account uid exists. |
|
boolean |
entitlementExists(Long uid)
This returns whether the supplied entitlement exists in the registry. |
|
void |
flushAndRefresh(DataObject o)
Calls flush and refresh on the supplied data object. |
|
private Account |
getAccount(Long uid)
This returns the account for the person with the supplied UID. |
|
AccountState |
getAccountState(Long uid)
This returns the account state for the supplied UID. |
|
|
getDataTypes(Class<T> dataTypeClass)
This returns all data types in the registry. |
|
EntitlementData |
getEntitlementData(String entitlement)
This returns the EntitlementData bean for the supplied
entitlement string. |
|
EntityManager |
getEntityManager()
Returns the EntityManager for this class. |
|
Group |
getGroup(String uugid)
This returns the Group bean for the supplied
UUGID. |
|
Group |
getGroup(String uugid,
boolean throwIfNotFound)
Gets a group from the registry for the given uugid. |
|
private
|
getNamedDataObject(Class<T> ndoClass,
String uuid,
boolean throwIfNotFound)
Gets a named data object from the registry for the given uuid. |
|
Person |
getPerson(Long uid)
This returns the Person bean for the supplied
UID. |
|
Person |
getPerson(Long uid,
boolean throwIfNotFound)
Gets a person from the registry for the given uid. |
|
Long |
getPersonUid(String userid)
This returns the sequence number of the person with the supplied userid. |
|
Service |
getService(String uusid)
This returns the Service bean for the supplied
UUSID. |
|
Service |
getService(String uusid,
boolean throwIfNotFound)
Gets a service from the registry for the given uusid. |
|
Ticket |
getTicket(String id)
This returns the Ticket bean for the supplied
ID. |
|
Ticket |
getTicket(String id,
boolean throwIfNotFound)
|
|
String |
getUserid(Long uid)
This returns the userid for the person with the supplied UID. |
|
boolean |
groupExists(String uugid)
This returns whether a group exists for the supplied UUGID in the registry. |
|
boolean |
guestIdExists(String guestId)
This returns whether the supplied guest id exists. |
|
boolean |
personExists(Long uid)
This returns whether the supplied person exists in the registry. |
|
boolean |
serviceExists(String uusid)
This returns whether a service exists for the supplied UUSID in the registry. |
|
boolean |
ticketExists(String id)
This returns whether a ticket exists for the supplied ID in the registry. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final Log LOG
private EntityManager entityManager
| Constructor Detail |
|---|
public CommonRegistryFinder(EntityManager em)
CommonRegistryFinder with the supplied
entity manager.
em - EntityManager| Method Detail |
|---|
public EntityManager getEntityManager()
EntityManager for this class.
EntityManagerpublic void flushAndRefresh(DataObject o)
o - DataObjectpublic <T extends DataType> List<T> getDataTypes(Class<T> dataTypeClass)
T - data type to finddataTypeClass - Class to get data for
List - of all academic levelspublic boolean personExists(Long uid)
uid - Long
boolean
public Person getPerson(Long uid)
throws ApplicationServerException
Person bean for the supplied
UID.
uid - Long
Person
ApplicationServerException - if the method fails
NoResultFoundException - if the group cannot be found
NonUniqueResultFoundException - if multiple groups are found
public Person getPerson(Long uid,
boolean throwIfNotFound)
throws ApplicationServerException
uid - The UID of the person to find.throwIfNotFound - Indicates whether or not a
NoResultFoundException should be thrown if no matching
person is found.
NoResultFoundException, otherwise it will return null
when no match is found.
ApplicationServerException - if the method fails
NoResultFoundException - If the person cannot be found. This
only occurs if the boolean parameter is true.
public Long getPersonUid(String userid)
throws ApplicationServerException
userid - String
Long - sequence number
ApplicationServerException - if the method fails
FinderFailedException - if multiple userids are found
public String getUserid(Long uid)
throws ApplicationServerException
uid - Long
String - userid
ApplicationServerException - if the method fails
FinderFailedException - if multiple userids are found
public AccountState getAccountState(Long uid)
throws ApplicationServerException
uid - Long
AccountState
ApplicationServerException - if the method fails
FinderFailedException - if multiple userids are found
public boolean guestIdExists(String guestId)
throws ApplicationServerException
guestId - String to check
boolean
ApplicationServerException - if the method fails
FinderFailedException - if multiple userids are foundpublic boolean emailAccountExists(Long uid)
uid - Long to check
boolean
public boolean groupExists(String uugid)
throws ApplicationServerException
uugid - String
boolean
ApplicationServerException - if the method fails
NonUniqueResultFoundException - if multiple groups are found
public Group getGroup(String uugid)
throws ApplicationServerException
Group bean for the supplied
UUGID.
uugid - String
Group
ApplicationServerException - if the method fails
NoResultFoundException - if the group cannot be found
NonUniqueResultFoundException - if multiple groups are found
public Group getGroup(String uugid,
boolean throwIfNotFound)
throws ApplicationServerException
uugid - The UUGID of the group to find.throwIfNotFound - Indicates whether or not a
NoResultFoundException should be thrown if no matching
group is found.
NoResultFoundException, otherwise it will return null
when no match is found.
ApplicationServerException - if the method fails
NoResultFoundException - If the group cannot be found. This
only occurs if the boolean parameter is true.
NonUniqueResultFoundException - if multiple groups are found
public boolean serviceExists(String uusid)
throws ApplicationServerException
uusid - String
boolean
ApplicationServerException - if the method fails
NonUniqueResultFoundException - if multiple services are found
public Service getService(String uusid)
throws ApplicationServerException
Service bean for the supplied
UUSID.
uusid - String
Service
ApplicationServerException - if the method fails
NoResultFoundException - if the service cannot be found
NonUniqueResultFoundException - if multiple services are found
public Service getService(String uusid,
boolean throwIfNotFound)
throws ApplicationServerException
uusid - The UUSID of the service to find.throwIfNotFound - Indicates whether or not a
NoResultFoundException should be thrown if no matching
service is found.
NoResultFoundException, otherwise it will return null
when no match is found.
ApplicationServerException - if the method fails
NoResultFoundException - If the service cannot be found. This
only occurs if the boolean parameter is true.
NonUniqueResultFoundException - if multiple services are found
public boolean ticketExists(String id)
throws ApplicationServerException
id - String
boolean
ApplicationServerException - if the method fails
NonUniqueResultFoundException - if multiple tickets are found
public Ticket getTicket(String id)
throws ApplicationServerException
Ticket bean for the supplied
ID.
id - String
Ticket
ApplicationServerException - if the method fails
NoResultFoundException - if the ticket cannot be found
NonUniqueResultFoundException - if multiple tickets are found
public Ticket getTicket(String id,
boolean throwIfNotFound)
throws ApplicationServerException
id - The ID of the ticket to find.throwIfNotFound - Indicates whether or not a
NoResultFoundException should be thrown if no matching
ticket is found.
NoResultFoundException, otherwise it will return null
when no match is found.
ApplicationServerException - if the method fails
NoResultFoundException - If the ticket cannot be found. This
only occurs if the boolean parameter is true.
NonUniqueResultFoundException - if multiple tickets are foundgetNamedDataObject(Class, String, boolean)public boolean entitlementExists(Long uid)
uid - Long
boolean
public EntitlementData getEntitlementData(String entitlement)
throws ApplicationServerException
EntitlementData bean for the supplied
entitlement string.
entitlement - String
EntitlementData
ApplicationServerException - if the method fails
FinderFailedException - if multiple entitlements are found
private Account getAccount(Long uid)
throws ApplicationServerException
uid - Long
Account
ApplicationServerException - if the method fails
FinderFailedException - if multiple userids are found
private <T extends NamedDataObject> T getNamedDataObject(Class<T> ndoClass,
String uuid,
boolean throwIfNotFound)
throws ApplicationServerException
T - type of named data objectndoClass - of named data objectuuid - The UUID of the named data object to find.throwIfNotFound - Indicates whether or not a
NoResultFoundException should be thrown if no matching
NDO is found.
NoResultFoundException, otherwise it will return null
when no match is found.
ApplicationServerException - if the method fails
NoResultFoundException - If the NDO cannot be found. This
only occurs if the boolean parameter is true.
NonUniqueResultFoundException - if multiple NDOs are found
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||