public interface WorkLookupSession extends OsidSession
This session provides methods for retrieving Work
objects. The Work
represents a fixed connection between two
Availabilities.
This session defines views that offer differing behaviors when retrieving multiple objects.
Works
with the WorkAdminSession.
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.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupWorks()
Tests if this user can perform
Work lookups. |
Foundry |
getFoundry()
Gets the
Foundry associated with this session. |
Id |
getFoundryId()
Gets the
Foundry Id associated with this
session. |
WorkList |
getIncompleteWorks()
Gets all incomplete
Works. |
WorkList |
getIncompleteWorksByDate(DateTime from,
DateTime to)
Gets a
WorkList of incomplete works created between the
given date range inclusive . |
WorkList |
getIncompleteWorksByDateForJob(Id jobId,
DateTime from,
DateTime to)
Gets a
WorkList of incomplete works corresponding to
the given job and created between the given date range inclusive
. |
WorkList |
getIncompleteWorksForJob(Id jobId)
Gets a
WorkList of incomplete works corresponding to
the given job . |
WorkList |
getUncommittedWorks()
Gets all
Works that have no commitments. |
WorkList |
getUncommittedWorksByDate(DateTime from,
DateTime to)
Gets a
WorkList of uncommitted works created between
the given date range inclusive . |
WorkList |
getUncommittedWorksForJob(Id jobId)
Gets a
WorkList of uncommitted works corresponding to
the given job . |
Work |
getWork(Id workId)
Gets the
Work specified by its Id. |
WorkList |
getWorks()
Gets all
Works. |
WorkList |
getWorksByDate(DateTime from,
DateTime to)
Gets a
WorkList of all works created between the given
date range inclusive . |
WorkList |
getWorksByDateForJob(Id jobId,
DateTime from,
DateTime to)
Gets a
WorkList of all works of corresponding to the
given job and created between the given date range inclusive . |
WorkList |
getWorksByGenusType(Type workGenusType)
Gets a
WorkList corresponding to the given work genus
Type which does not include works of genus types
derived from the specified Type. |
WorkList |
getWorksByIds(IdList workIds)
Gets a
WorkList corresponding to the given
IdList. |
WorkList |
getWorksByParentGenusType(Type workGenusType)
Gets a
WorkList corresponding to the given work genus
Type and include any additional works with genus types
derived from the specified Type. |
WorkList |
getWorksByRecordType(Type workRecordType)
Gets a
WorkList containing the given work record
Type. |
WorkList |
getWorksForJob(Id jobId)
Gets a
WorkList corresponding to the given job . |
void |
useComparativeWorkView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useFederatedFoundryView()
Federates the view for methods in this session.
|
void |
useIsolatedFoundryView()
Isolates the view for methods in this session.
|
void |
usePlenaryWorkView()
A complete view of the
Work returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getFoundryId()
Foundry
Id
associated with this
session. Foundry Id
associated with this sessionmandatory
- This method must be implemented. Foundry getFoundry() throws OperationFailedException, PermissionDeniedException
Foundry
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupWorks()
Work
lookups. 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
a PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer lookup operations to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeWorkView()
mandatory
- This method is must be implemented. void usePlenaryWorkView()
Work
returns 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.mandatory
- This method is must be implemented. void useFederatedFoundryView()
mandatory
- This method is must be implemented. void useIsolatedFoundryView()
mandatory
- This method is must be implemented. Work getWork(Id workId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Work
specified by its Id.
In
plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Work
may have a different Id
than requested, such as the
case where a duplicate Id
was assigned to a Work
and retained for compatibility.workId
- Id
of the Work
NotFoundException
- workId
not foundNullArgumentException
- workId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. WorkList getWorksByIds(IdList workIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
WorkList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
works specified in the Id
list, in the order of the
list, including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible Works
may be omitted from the list and may
present the elements in any order including returning a unique set.workIds
- the list of Ids
to retrieve Work
listNotFoundException
- an Id
was not foundNullArgumentException
- workIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getWorksByGenusType(Type workGenusType) throws OperationFailedException, PermissionDeniedException
WorkList
corresponding to the given work genus
Type
which does not include works of genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known works or an error results. Otherwise,
the returned list may contain only those works that are accessible
through this session.workGenusType
- a work genus type Work
listNullArgumentException
- workGenusType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getWorksByParentGenusType(Type workGenusType) throws OperationFailedException, PermissionDeniedException
WorkList
corresponding to the given work genus
Type
and include any additional works with genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known works or an error results. Otherwise,
the returned list may contain only those works that are accessible
through this session.workGenusType
- a work genus type Work
listNullArgumentException
- workGenusType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getWorksByRecordType(Type workRecordType) throws OperationFailedException, PermissionDeniedException
WorkList
containing the given work record
Type.
In plenary mode, the returned list contains all known
works or an error results. Otherwise, the returned list may contain
only those works that are accessible through this session.workRecordType
- a work record type Work
listNullArgumentException
- workRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getWorksForJob(Id jobId) throws OperationFailedException, PermissionDeniedException
WorkList
corresponding to the given job .
In plenary mode, the returned list contains all known works or
an error results. Otherwise, the returned list may contain only those
works that are accessible through this session.jobId
- a job Id
Work
listNullArgumentException
- jobId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getUncommittedWorksForJob(Id jobId) throws OperationFailedException, PermissionDeniedException
WorkList
of uncommitted works corresponding to
the given job .
In plenary mode, the returned list
contains all known works or an error results. Otherwise, the returned
list may contain only those works that are accessible through this
session.jobId
- a job Id
Work
listNullArgumentException
- jobId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getIncompleteWorksForJob(Id jobId) throws OperationFailedException, PermissionDeniedException
WorkList
of incomplete works corresponding to
the given job .
In plenary mode, the returned list
contains all known works or an error results. Otherwise, the returned
list may contain only those works that are accessible through this
session.jobId
- a job Id
Work
listNullArgumentException
- jobId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getWorksByDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
WorkList
of all works created between the given
date range inclusive .
In plenary mode, the returned
list contains all known works or an error results. Otherwise, the
returned list may contain only those works that are accessible through
this session.from
- start rangeto
- end range Work
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getIncompleteWorksByDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
WorkList
of incomplete works created between the
given date range inclusive .
In plenary mode, the
returned list contains all known works or an error results. Otherwise,
the returned list may contain only those works that are accessible
through this session.from
- start rangeto
- end range Work
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getUncommittedWorksByDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
WorkList
of uncommitted works created between
the given date range inclusive .
In plenary mode, the
returned list contains all known works or an error results. Otherwise,
the returned list may contain only those works that are accessible
through this session.from
- start rangeto
- end range Work
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getWorksByDateForJob(Id jobId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
WorkList
of all works of corresponding to the
given job and created between the given date range inclusive .
In plenary mode, the returned list contains all known works or
an error results. Otherwise, the returned list may contain only those
works that are accessible through this session.jobId
- a job Id
from
- start rangeto
- end range Work
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- jobId, from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getIncompleteWorksByDateForJob(Id jobId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
WorkList
of incomplete works corresponding to
the given job and created between the given date range inclusive
.
In plenary mode, the returned list contains all known
works or an error results. Otherwise, the returned list may contain
only those works that are accessible through this session.jobId
- a job Id
from
- start rangeto
- end range Work
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- jobId, from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getIncompleteWorks() throws OperationFailedException, PermissionDeniedException
Works.
In plenary mode, the
returned list contains all known works or an error results. Otherwise,
the returned list may contain only those works that are accessible
through this session. Works
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getUncommittedWorks() throws OperationFailedException, PermissionDeniedException
Works
that have no commitments. In plenary
mode, the returned list contains all known works or an error results.
Otherwise, the returned list may contain only those works that are
accessible through this session. Works
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. WorkList getWorks() throws OperationFailedException, PermissionDeniedException
Works.
In plenary mode, the returned list
contains all known works or an error results. Otherwise, the returned
list may contain only those works that are accessible through this
session. Works
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.