Interface LeaseLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Leases . The
Lease represents a relationship to a room.
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete set or is an error condition
- isolated campus view: All lease methods in this session operate,
retrieve and pertain to leases defined explicitly in the current
campus. Using an isolated view is useful for managing leases with the
LeaseAdminSession. - federated campus view: All lease lookup methods in this session operate, retrieve and pertain to all leases defined in this campus and any other campuses implicitly available in this campus through campus inheritence.
- effective lease view: All lease lookup methods return effective leases.
- any effective lease view: Leases of any effective date are returned.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performLeaselookups.Gets theCampusassociated with this session.Gets theCampusIdassociated with this session.Gets theLeasespecified by itsId.Gets allLeases.getLeasesByGenusType(Type leaseGenusType) Gets aLeaseListcorresponding to the given lease genusTypewhich does not include leases of genus types derived from the specifiedType.getLeasesByGenusTypeForRoom(Id roomId, Type leaseGenusType) Gets a list of all leases for a room and a lease genus type.getLeasesByGenusTypeForRoomAndTenant(Id roomId, Id resourceId, Type leaseGenusType) Gets a list of all leases for a room, resource, and of a lease genus type.getLeasesByGenusTypeForRoomAndTenantOnDate(Id roomId, Id resourceId, Type leaseGenusType, DateTime from, DateTime to) Gets a list of all leases for a room, tenant, and of a lease genus type effective during the entire given date range inclusive but not confined to the date range.getLeasesByGenusTypeForRoomOnDate(Id roomId, Type leaseGenusType, DateTime from, DateTime to) Gets a list of all leases for a room and of a lease genus type effective during the entire given date range inclusive but not confined to the date range.getLeasesByGenusTypeForTenant(Id resourceId, Type leaseGenusType) Gets a list of all leases corresponding to a tenantIdand of a lease genus type.getLeasesByGenusTypeForTenantOnDate(Id resourceId, Type leaseGenusType, DateTime from, DateTime to) Gets a list of all leases for a tenant and of a lease genus type effective during the entire given date range inclusive but not confined to the date range.getLeasesByGenusTypeOnDate(Type leaseGenusType, DateTime from, DateTime to) Gets a list of all leases of a genus type effective during the entire given date range inclusive but not confined to the date range.getLeasesByIds(IdList leaseIds) Gets aLeaseListcorresponding to the givenIdList.getLeasesByParentGenusType(Type leaseGenusType) Gets aLeaseListcorresponding to the given lease genusTypeand include any additional leases with genus types derived from the specifiedType.getLeasesByRecordType(Type leaseRecordType) Gets aLeaseListcontaining the given lease recordType.getLeasesForRoom(Id roomId) Gets a list of all leases corresponding to a roomId.getLeasesForRoomAndTenant(Id roomId, Id resourceId) Gets a list of all leases corresponding to a room and tenant.getLeasesForRoomAndTenantOnDate(Id roomId, Id resourceId, DateTime from, DateTime to) Gets a list of all leases for a room and tenant effective during the entire given date range inclusive but not confined to the date range.getLeasesForRoomOnDate(Id roomId, DateTime from, DateTime to) Gets a list of all leases for a room effective during the entire given date range inclusive but not confined to the date range.getLeasesForTenant(Id resourceId) Gets a list of all leases for a tenant corresponding to a roomId.getLeasesForTenantOnDate(Id resourceId, DateTime from, DateTime to) Gets a list of all leases for a tenant effective during the entire given date range inclusive but not confined to the date range.getLeasesOnDate(DateTime from, DateTime to) Gets a list of all leases effective during the entire given date range inclusive but not confined to the date range.voidLeases of any effective dates are returned by all methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly leases whose effective dates are current are returned by methods in this sessionvoidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theLeasereturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getCampusId
Id getCampusId()Gets theCampusIdassociated with this session.- Returns:
- the
Campus Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCampus
Gets theCampusassociated with this session.- Returns:
- the campus
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupLeases
boolean canLookupLeases()Tests if this user can performLeaselookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may not offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeLeaseView
void useComparativeLeaseView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryLeaseView
void usePlenaryLeaseView()A complete view of theLeasereturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedCampusView
void useFederatedCampusView()Federates the view for methods in this session. A federated view will include leases in campuses which are children of this campus in the campus hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedCampusView
void useIsolatedCampusView()Isolates the view for methods in this session. An isolated view restricts retrievals to this campus only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveLeaseView
void useEffectiveLeaseView()Only leases whose effective dates are current are returned by methods in this session- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveLeaseView
void useAnyEffectiveLeaseView()Leases of any effective dates are returned by all methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getLease
Lease getLease(Id leaseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theLeasespecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedLeasemay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aLeaseand retained for compatibility. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
leaseId-Idof theLease- Returns:
- the lease
- Throws:
NotFoundException-leaseIdnot foundNullArgumentException-leaseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getLeasesByIds
LeaseList getLeasesByIds(IdList leaseIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aLeaseListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the leases specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleLeasesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
leaseIds- the list ofIdsto retrieve- Returns:
- the returned
Leaselist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-leaseIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesByGenusType
LeaseList getLeasesByGenusType(Type leaseGenusType) throws OperationFailedException, PermissionDeniedException Gets aLeaseListcorresponding to the given lease genusTypewhich does not include leases of genus types derived from the specifiedType. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
leaseGenusType- a lease genus type- Returns:
- the returned
Leaselist - Throws:
NullArgumentException-leaseGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesByParentGenusType
LeaseList getLeasesByParentGenusType(Type leaseGenusType) throws OperationFailedException, PermissionDeniedException Gets aLeaseListcorresponding to the given lease genusTypeand include any additional leases with genus types derived from the specifiedType. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
leaseGenusType- a lease genus type- Returns:
- the returned
Leaselist - Throws:
NullArgumentException-leaseGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesByRecordType
LeaseList getLeasesByRecordType(Type leaseRecordType) throws OperationFailedException, PermissionDeniedException Gets aLeaseListcontaining the given lease recordType. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
leaseRecordType- a lease record type- Returns:
- the returned
Leaselist - Throws:
NullArgumentException-leaseRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesOnDate
LeaseList getLeasesOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all leases effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
LeaseList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesByGenusTypeOnDate
LeaseList getLeasesByGenusTypeOnDate(Type leaseGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all leases of a genus type effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
leaseGenusType- a lease genus typefrom- start of date rangeto- end of date range- Returns:
- the returned
LeaseList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-leaseGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesForRoom
Gets a list of all leases corresponding to a roomId. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
roomId- theIdof the room- Returns:
- the returned
LeaseList - Throws:
NullArgumentException-roomIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesByGenusTypeForRoom
LeaseList getLeasesByGenusTypeForRoom(Id roomId, Type leaseGenusType) throws OperationFailedException, PermissionDeniedException Gets a list of all leases for a room and a lease genus type. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
roomId- a roomIdleaseGenusType- a lease genus type- Returns:
- the returned
LeaseList - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-roomIdorleaseGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesForRoomOnDate
LeaseList getLeasesForRoomOnDate(Id roomId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all leases for a room effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
roomId- a roomIdfrom- start of date rangeto- end of date range- Returns:
- the returned
LeaseList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-roomId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesByGenusTypeForRoomOnDate
LeaseList getLeasesByGenusTypeForRoomOnDate(Id roomId, Type leaseGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all leases for a room and of a lease genus type effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
roomId- a roomIdleaseGenusType- a lease genus typefrom- start of date rangeto- end of date range- Returns:
- the returned
LeaseList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-roomId, leaseGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesForTenant
LeaseList getLeasesForTenant(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of all leases for a tenant corresponding to a roomId. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
resourceId- a resourceId- Returns:
- the returned
LeaseList - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesByGenusTypeForTenant
LeaseList getLeasesByGenusTypeForTenant(Id resourceId, Type leaseGenusType) throws OperationFailedException, PermissionDeniedException Gets a list of all leases corresponding to a tenantIdand of a lease genus type. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
resourceId- a resourceIdIdleaseGenusType- a lease genus type- Returns:
- the returned
LeaseList - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-resourceIdorleaseGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesForTenantOnDate
LeaseList getLeasesForTenantOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all leases for a tenant effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
resourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
LeaseList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesByGenusTypeForTenantOnDate
LeaseList getLeasesByGenusTypeForTenantOnDate(Id resourceId, Type leaseGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all leases for a tenant and of a lease genus type effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
resourceId- a resourceIdleaseGenusType- a lease genus typefrom- start of date rangeto- end of date range- Returns:
- the returned
LeaseList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, leaseGenusType, from,ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesForRoomAndTenant
LeaseList getLeasesForRoomAndTenant(Id roomId, Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of all leases corresponding to a room and tenant. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
roomId- theIdof the roomresourceId- a tenantId- Returns:
- the returned
LeaseList - Throws:
NullArgumentException-roomIdorresourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesByGenusTypeForRoomAndTenant
LeaseList getLeasesByGenusTypeForRoomAndTenant(Id roomId, Id resourceId, Type leaseGenusType) throws OperationFailedException, PermissionDeniedException Gets a list of all leases for a room, resource, and of a lease genus type. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
roomId- a roomIdresourceId- a tenantIdleaseGenusType- a lease genus type- Returns:
- the returned
LeaseList - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-roomId, resourceId, orleaseGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesForRoomAndTenantOnDate
LeaseList getLeasesForRoomAndTenantOnDate(Id roomId, Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all leases for a room and tenant effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
roomId- a roomIdresourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
LeaseList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-roomId, resourceId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeasesByGenusTypeForRoomAndTenantOnDate
LeaseList getLeasesByGenusTypeForRoomAndTenantOnDate(Id roomId, Id resourceId, Type leaseGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all leases for a room, tenant, and of a lease genus type effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Parameters:
roomId- a roomIdresourceId- a resourceIdleaseGenusType- a lease genus typefrom- start of date rangeto- end of date range- Returns:
- the returned
LeaseList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-roomId, resourceId, leaseGenusType, from,ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLeases
Gets allLeases. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.- Returns:
- a list of
Leases - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-