Interface ProjectLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Projects . The
Project represents a construction of a building.
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 room methods in this session operate,
retrieve and pertain to projects defined explicitly in the current
campus. Using an isolated view is useful for managing projects with
the
ProjectAdminSession. - federated campus view: All project lookup methods in this session operate, retrieve and pertain to all projects defined in this campus and any other campuses implicitly available in this campus through campus inheritence.
- effective project view: All project lookup methods return effective projects.
- any effective project view: projects of any effective date are returned.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performProjectlookups.Gets theCampusassociated with this session.Gets theCampusIdassociated with this session.getProject(Id projectId) Gets theProjectspecified by itsId.Gets allProjects.getProjectsByGenusType(Type projectGenusType) Gets aProjectListcorresponding to the given project genusTypewhich does not include projects of genus types derived from the specifiedType.getProjectsByGenusTypeForBuilding(Id buildingId, Type projectGenusType) Gets aProjectListcontaining the given building and genus type.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.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.getProjectsByIds(IdList projectIds) Gets aProjectListcorresponding to the givenIdList.getProjectsByParentGenusType(Type projectGenusType) Gets aProjectListcorresponding to the given project genusTypeand include any additional projects with genus types derived from the specifiedType.getProjectsByRecordType(Type projectRecordType) Gets aProjectListcontaining the given project recordType.getProjectsForBuilding(Id buildingId) Gets aProjectListcontaining the given building.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.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.voidProjects 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 projects 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 theProjectreturns 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.
-
canLookupProjects
boolean canLookupProjects()Tests if this user can performProjectlookups. 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.
-
useComparativeProjectView
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. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryProjectView
void usePlenaryProjectView()A complete view of theProjectreturns 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 projects 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.
-
useEffectiveProjectView
void useEffectiveProjectView()Only projects whose effective dates are current are returned by methods in this session- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveProjectView
void useAnyEffectiveProjectView()Projects of any effective dates are returned by all methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getProject
Project getProject(Id projectId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theProjectspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedProjectmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aProjectand 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.- Parameters:
projectId-Idof theProject- Returns:
- the project
- Throws:
NotFoundException-projectIdnot foundNullArgumentException-projectIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getProjectsByIds
ProjectList getProjectsByIds(IdList projectIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aProjectListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the projects 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, inaccessibleProjectsmay 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.- Parameters:
projectIds- the list ofIdsto retrieve- Returns:
- the returned
Projectlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-projectIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProjectsByGenusType
ProjectList getProjectsByGenusType(Type projectGenusType) throws OperationFailedException, PermissionDeniedException Gets aProjectListcorresponding to the given project genusTypewhich does not include projects of genus types derived from the specifiedType. 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.- Parameters:
projectGenusType- a project genus type- Returns:
- the returned
Projectlist - Throws:
NullArgumentException-projectGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProjectsByParentGenusType
ProjectList getProjectsByParentGenusType(Type projectGenusType) throws OperationFailedException, PermissionDeniedException Gets aProjectListcorresponding to the given project genusTypeand include any additional projects with genus types derived from the specifiedType. 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.- Parameters:
projectGenusType- a project genus type- Returns:
- the returned
Projectlist - Throws:
NullArgumentException-projectGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProjectsByRecordType
ProjectList getProjectsByRecordType(Type projectRecordType) throws OperationFailedException, PermissionDeniedException Gets aProjectListcontaining the given project recordType. 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.- Parameters:
projectRecordType- a project record type- Returns:
- the returned
Projectlist - Throws:
NullArgumentException-projectRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProjectsOnDate
ProjectList getProjectsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all projects effective during the entire given date range inclusive but not confined to the date range. 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.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
Projectlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProjectsByGenusTypeOnDate
ProjectList getProjectsByGenusTypeOnDate(Type projectGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException 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. 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.- Parameters:
projectGenusType- a project genus typefrom- start of date rangeto- end of date range- Returns:
- the returned
Projectlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-projectGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProjectsForBuilding
ProjectList getProjectsForBuilding(Id buildingId) throws OperationFailedException, PermissionDeniedException Gets aProjectListcontaining 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.- Parameters:
buildingId- a buildingId- Returns:
- the returned
Projectlist - Throws:
NullArgumentException-buildingIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProjectsByGenusTypeForBuilding
ProjectList getProjectsByGenusTypeForBuilding(Id buildingId, Type projectGenusType) throws OperationFailedException, PermissionDeniedException Gets aProjectListcontaining 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.- Parameters:
buildingId- a buildingIdprojectGenusType- a project genus type- Returns:
- the returned
Projectlist - Throws:
NullArgumentException-buildingIdorprojectGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProjectsForBuildingOnDate
ProjectList getProjectsForBuildingOnDate(Id buildingId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all projects for a building effective during the entire given date range inclusive but not confined to the date range. 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.- Parameters:
buildingId- a buildingIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Projectlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-buildingId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProjectsByGenusTypeForBuildingOnDate
ProjectList getProjectsByGenusTypeForBuildingOnDate(Id buildingId, Type projectGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException 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. 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.- Parameters:
buildingId- a buildingIdprojectGenusType- a project genus typefrom- start of date rangeto- end of date range- Returns:
- the returned
Projectlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-buildingId, projectGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getProjects
Gets allProjects. 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.- Returns:
- a list of
Projects - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-