Interface EffortLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Effort objects.
The Effort represents a fixed connection between two
Availabilities .
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 foundry view: All effort methods in this session
operate, retrieve and pertain to efforts defined explicitly in the
current foundry. Using an isolated view is useful for managing
Effortswith theEffortAdminSession. - federated foundry view: All effort methods in this session operate, retrieve and pertain to all efforts defined in this foundry and any other efforts implicitly available in this foundry through foundry inheritence.
- effective effort view: All effort lookup methods return efforts where the current date falls in between the effective dates inclusive.
- any effective effort view: Efforts of any effective date are returned from methods.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. The
methods useFederatedFoundryView() and
useIsolatedFoundryView() behave as a radio group and one should be
selected before invoking any lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performEffortlookups.Gets theEffortspecified by itsId.Gets allEfforts.getEffortsByGenusType(Type effortGenusType) Gets anEffortListcorresponding to the given effort genusTypewhich does not include efforts of genus types derived from the specifiedType.getEffortsByIds(IdList effortIds) Gets anEffortListcorresponding to the givenIdList.getEffortsByParentGenusType(Type effortGenusType) Gets anEffortListcorresponding to the given effort genusTypeand include any additional efforts with genus types derived from the specifiedType.getEffortsByRecordType(Type effortRecordType) Gets anEffortListcontaining the given effort recordType.getEffortsForCommission(Id commissionId) Gets a list of efforts for a commission.getEffortsForCommissionOnDate(Id commissionId, DateTime from, DateTime to) Gets a list of efforts for a commission and effective during the entire given date range inclusive but not confined to the date range.getEffortsForResource(Id resourceId) Gets a list of efforts for a resource.getEffortsForResourceAndCommission(Id resourceId, Id commissionId) Gets a list of efforts for a resource and commission.getEffortsForResourceAndCommissionOnDate(Id resourceId, Id commissionId, DateTime from, DateTime to) Gets a list of efforts for a resource and commission and effective during the entire given date range inclusive but not confined to the date range.getEffortsForResourceAndWork(Id resourceId, Id workId) Gets a list of efforts for a resource and work.getEffortsForResourceAndWorkOnDate(Id resourceId, Id workId, DateTime from, DateTime to) Gets a list of efforts for a resource and work and effective during the entire given date range inclusive but not confined to the date range.getEffortsForResourceOnDate(Id resourceId, DateTime from, DateTime to) Gets a list of efforts for a resource and effective beginning in the date range.getEffortsForWork(Id workId) Gets a list of efforts for a work.getEffortsForWorkOnDate(Id workId, DateTime from, DateTime to) Gets a list of efforts for a work and effective during the entire given date range inclusive but not confined to the date range.getEffortsOnDate(DateTime from, DateTime to) Gets a list of efforts effective during the entire given date range inclusive but not confined to the date range.Gets theFoundryassociated with this session.Gets theFoundryIdassociated with this session.voidAll efforts of any effective dates are returned by 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 efforts whose effective dates are current are returned by methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theEffortreturns 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
-
getFoundryId
Id getFoundryId()Gets theFoundryIdassociated with this session.- Returns:
- the
Foundry Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getFoundry
Gets theFoundryassociated with this session.- Returns:
- the foundry
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupEfforts
boolean canLookupEfforts()Tests if this user can performEffortlookups. 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 opt not to offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeEffortView
void useComparativeEffortView()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.
-
usePlenaryEffortView
void usePlenaryEffortView()A complete view of theEffortreturns 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.
-
useFederatedFoundryView
void useFederatedFoundryView()Federates the view for methods in this session. A federated view will include efforts in foundries which are children of this foundry in the foundry hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedFoundryView
void useIsolatedFoundryView()Isolates the view for methods in this session. An isolated view restricts lookups to this foundry only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveEffortView
void useEffectiveEffortView()Only efforts whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveEffortView
void useAnyEffectiveEffortView()All efforts of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getEffort
Effort getEffort(Id effortId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theEffortspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedEffortmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anEffortand retained for compatibility. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
effortId-Idof theEffort- Returns:
- the effort
- Throws:
NotFoundException-effortIdnot foundNullArgumentException-effortIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getEffortsByIds
EffortList getEffortsByIds(IdList effortIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anEffortListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the efforts 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, inaccessibleEffortsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
effortIds- the list ofIdsto retrieve- Returns:
- the returned
Effortlist - Throws:
NotFoundException- anIdwas not foundNullArgumentException-effortIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsByGenusType
EffortList getEffortsByGenusType(Type effortGenusType) throws OperationFailedException, PermissionDeniedException Gets anEffortListcorresponding to the given effort genusTypewhich does not include efforts of genus types derived from the specifiedType. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
effortGenusType- an effort genus type- Returns:
- the returned
Effortlist - Throws:
NullArgumentException-effortGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsByParentGenusType
EffortList getEffortsByParentGenusType(Type effortGenusType) throws OperationFailedException, PermissionDeniedException Gets anEffortListcorresponding to the given effort genusTypeand include any additional efforts with genus types derived from the specifiedType. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
effortGenusType- an effort genus type- Returns:
- the returned
Effortlist - Throws:
NullArgumentException-effortGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsByRecordType
EffortList getEffortsByRecordType(Type effortRecordType) throws OperationFailedException, PermissionDeniedException Gets anEffortListcontaining the given effort recordType. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
effortRecordType- an effort record type- Returns:
- the returned
Effortlist - Throws:
NullArgumentException-effortRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsOnDate
EffortList getEffortsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of efforts effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
Effortlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsForResource
EffortList getEffortsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of efforts for a resource. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
resourceId- a resourceId- Returns:
- the returned
Effortlist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsForResourceOnDate
EffortList getEffortsForResourceOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of efforts for a resource and effective beginning in the date range. Efforts are returned with a start effective date that falls between the requested dates inclusive. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
resourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Effortlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsForCommission
EffortList getEffortsForCommission(Id commissionId) throws OperationFailedException, PermissionDeniedException Gets a list of efforts for a commission. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
commissionId- a commissionId- Returns:
- the returned
Effortlist - Throws:
NullArgumentException-commissionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsForCommissionOnDate
EffortList getEffortsForCommissionOnDate(Id commissionId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of efforts for a commission and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
commissionId- a commisionIdfrom- start of date rangeto- end of date range- Returns:
- the returned Effort list
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-commissionId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsForResourceAndCommission
EffortList getEffortsForResourceAndCommission(Id resourceId, Id commissionId) throws OperationFailedException, PermissionDeniedException Gets a list of efforts for a resource and commission. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
resourceId- a resourceIdcommissionId- a commissionId- Returns:
- the returned
Effortlist - Throws:
NullArgumentException-resourceIdorcommissionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsForResourceAndCommissionOnDate
EffortList getEffortsForResourceAndCommissionOnDate(Id resourceId, Id commissionId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of efforts for a resource and commission and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
resourceId- a resourceIdcommissionId- a commissionIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Effortlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, commissionId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsForWork
Gets a list of efforts for a work. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
workId- a workId- Returns:
- the returned
Effortlist - Throws:
NullArgumentException-workIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsForWorkOnDate
EffortList getEffortsForWorkOnDate(Id workId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of efforts for a work and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
workId- a workIdfrom- start of date rangeto- end of date range- Returns:
- the returned Effort list
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-workId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsForResourceAndWork
EffortList getEffortsForResourceAndWork(Id resourceId, Id workId) throws OperationFailedException, PermissionDeniedException Gets a list of efforts for a resource and work. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
resourceId- a resourceIdworkId- a workId- Returns:
- the returned
Effortlist - Throws:
NullArgumentException-resourceIdorworkIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEffortsForResourceAndWorkOnDate
EffortList getEffortsForResourceAndWorkOnDate(Id resourceId, Id workId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of efforts for a resource and work and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Parameters:
resourceId- a resourceIdworkId- a workIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Effortlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, workId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEfforts
Gets allEfforts. In plenary mode, the returned list contains all known efforts or an error results. Otherwise, the returned list may contain only those efforts that are accessible through this session. In effective mode, efforts are returned that are currently effective. In any effective mode, effective efforts and those currently expired are returned.- Returns:
- a list of
Efforts - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-