public interface ProjectLookupSession extends OsidSession
This session provides methods for retrieving Project
objects. The Project
represents a construction of a
building.
This session defines views that offer differing behaviors when retrieving multiple objects.
ProjectAdminSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupProjects()
Tests if this user can perform
Project lookups. |
Campus |
getCampus()
Gets the
Campus associated with this session. |
Id |
getCampusId()
Gets the
Campus Id associated with this
session. |
Project |
getProject(Id projectId)
Gets the
Project specified by its Id. |
ProjectList |
getProjects()
Gets all
Projects. |
ProjectList |
getProjectsByGenusType(Type projectGenusType)
Gets a
ProjectList corresponding to the given project
genus Type which does not include projects of genus
types derived from the specified Type. |
ProjectList |
getProjectsByGenusTypeForBuilding(Id buildingId,
Type projectGenusType)
Gets a
ProjectList containing the given building and
genus type . |
ProjectList |
getProjectsByGenusTypeForBuildingOnDate(Id buildingId,
Type projectGenusType,
DateTime from,
DateTime to)
Gets a list of all projects for a building with a genus type and
effective during the entire given date range inclusive but not
confined to the date range.
|
ProjectList |
getProjectsByGenusTypeOnDate(Type projectGenusType,
DateTime from,
DateTime to)
Gets a list of all projects with a genus type and effective during the
entire given date range inclusive but not confined to the date range.
|
ProjectList |
getProjectsByIds(IdList projectIds)
Gets a
ProjectList corresponding to the given
IdList. |
ProjectList |
getProjectsByParentGenusType(Type projectGenusType)
Gets a
ProjectList corresponding to the given project
genus Type and include any additional projects with
genus types derived from the specified Type. |
ProjectList |
getProjectsByRecordType(Type projectRecordType)
Gets a
ProjectList containing the given project record
Type. |
ProjectList |
getProjectsForBuilding(Id buildingId)
Gets a
ProjectList containing the given building
. |
ProjectList |
getProjectsForBuildingOnDate(Id buildingId,
DateTime from,
DateTime to)
Gets a list of all projects for a building effective during the entire
given date range inclusive but not confined to the date range.
|
ProjectList |
getProjectsOnDate(DateTime from,
DateTime to)
Gets a list of all projects effective during the entire given date
range inclusive but not confined to the date range.
|
void |
useAnyEffectiveProjectView()
Projects of any effective dates are returned by all methods in this
session.
|
void |
useComparativeProjectView()
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 |
useEffectiveProjectView()
Only projects whose effective dates are current are returned by
methods in this session
|
void |
useFederatedCampusView()
Federates the view for methods in this session.
|
void |
useIsolatedCampusView()
Isolates the view for methods in this session.
|
void |
usePlenaryProjectView()
A complete view of the
Project returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getCampusId()
Campus
Id
associated with this
session. Campus Id
associated with this sessionmandatory
- This method must be implemented. Campus getCampus() throws OperationFailedException, PermissionDeniedException
Campus
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupProjects()
Project
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 not offer lookup operations to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeProjectView()
mandatory
- This method is must be implemented. void usePlenaryProjectView()
Project
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 useFederatedCampusView()
mandatory
- This method is must be implemented. void useIsolatedCampusView()
mandatory
- This method is must be implemented. void useEffectiveProjectView()
mandatory
- This method is must be implemented. void useAnyEffectiveProjectView()
mandatory
- This method is must be implemented. Project getProject(Id projectId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Project
specified by its Id.
In plenary mode, the exact Id
is found
or a NOT_FOUND
results. Otherwise, the returned
Project
may have a different Id
than requested,
such as the case where a duplicate Id
was assigned to a
Project
and retained for compatibility.
In effective mode, projects are returned that are currently effective.
In any effective mode, effective projects and those currently expired
are returned.projectId
- Id
of the Project
NotFoundException
- projectId
not foundNullArgumentException
- projectId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. ProjectList getProjectsByIds(IdList projectIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
ProjectList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
projects 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 Projects
may be omitted from the list and
may present the elements in any order including returning a unique
set.
In effective mode, projects are returned that are currently effective.
In any effective mode, effective projects and those currently expired
are returned.projectIds
- the list of Ids
to retrieve Project
listNotFoundException
- an Id was
not foundNullArgumentException
- projectIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProjectList getProjectsByGenusType(Type projectGenusType) throws OperationFailedException, PermissionDeniedException
ProjectList
corresponding to the given project
genus Type
which does not include projects of genus
types derived from the specified Type.
In plenary mode, the returned list contains all known
projects or an error results. Otherwise, the returned list may contain
only those projects that are accessible through this session.
In effective mode, projects are returned that are currently effective.
In any effective mode, effective projects and those currently expired
are returned.projectGenusType
- a project genus type Project
listNullArgumentException
- projectGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProjectList getProjectsByParentGenusType(Type projectGenusType) throws OperationFailedException, PermissionDeniedException
ProjectList
corresponding to the given project
genus Type
and include any additional projects with
genus types derived from the specified Type.
In plenary mode, the returned list contains all known
projects or an error results. Otherwise, the returned list may contain
only those projects that are accessible through this session.
In effective mode, projects are returned that are currently effective.
In any effective mode, effective projects and those currently expired
are returned.projectGenusType
- a project genus type Project
listNullArgumentException
- projectGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProjectList getProjectsByRecordType(Type projectRecordType) throws OperationFailedException, PermissionDeniedException
ProjectList
containing the given project record
Type.
In plenary mode, the returned list contains all known
projects or an error results. Otherwise, the returned list may contain
only those projects that are accessible through this session.
In effective mode, projects are returned that are currently effective.
In any effective mode, effective projects and those currently expired
are returned.projectRecordType
- a project record type Project
listNullArgumentException
- projectRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProjectList getProjectsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
from
- start of date rangeto
- end of date range Project
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProjectList getProjectsByGenusTypeOnDate(Type projectGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
projectGenusType
- a project genus typefrom
- start of date rangeto
- end of date range Project
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- projectGenusType, from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProjectList getProjectsForBuilding(Id buildingId) throws OperationFailedException, PermissionDeniedException
ProjectList
containing the given building
.
In plenary mode, the returned list contains all known
projects or an error results. Otherwise, the returned list may contain
only those projects that are accessible through this session.
In effective mode, projects are returned that are currently effective.
In any effective mode, effective projects and those currently expired
are returned.buildingId
- a building Id
Project
listNullArgumentException
- buildingId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProjectList getProjectsByGenusTypeForBuilding(Id buildingId, Type projectGenusType) throws OperationFailedException, PermissionDeniedException
ProjectList
containing the given building and
genus type .
In plenary mode, the returned list contains all known
projects or an error results. Otherwise, the returned list may contain
only those projects that are accessible through this session.
In effective mode, projects are returned that are currently effective.
In any effective mode, effective projects and those currently expired
are returned.buildingId
- a building Id
projectGenusType
- a project genus type Project
listNullArgumentException
- buildingId
or
projectGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProjectList getProjectsForBuildingOnDate(Id buildingId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
buildingId
- a building Id
from
- start of date rangeto
- end of date range Project
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- buildingId, from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProjectList getProjectsByGenusTypeForBuildingOnDate(Id buildingId, Type projectGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
buildingId
- a building Id
projectGenusType
- a project genus typefrom
- start of date rangeto
- end of date range Project
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- buildingId,
projectGenusType, from
or to
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ProjectList getProjects() throws OperationFailedException, PermissionDeniedException
Projects.
In plenary mode, the returned list contains all known projects or an
error results. Otherwise, the returned list may contain only those
projects that are accessible through this session.
In effective mode, projects are returned that are currently effective.
In any effective mode, effective projects and those currently expired
are returned. Projects
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.