Interface ProjectLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProjectLookupSession extends 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 Details

    • getCampusId

      Id getCampusId()
      Gets the Campus Id associated with this session.
      Returns:
      the Campus Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCampus

      Gets the Campus associated with this session.
      Returns:
      the campus
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canLookupProjects

      boolean canLookupProjects()
      Tests if this user can perform 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.
      Returns:
      false if lookup methods are not authorized, true otherwise
      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 the 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.
      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

      Gets the 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.
      Parameters:
      projectId - Id of the Project
      Returns:
      the project
      Throws:
      NotFoundException - projectId not found
      NullArgumentException - projectId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getProjectsByIds

      Gets a 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.
      Parameters:
      projectIds - the list of Ids to retrieve
      Returns:
      the returned Project list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - projectIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getProjectsByGenusType

      ProjectList getProjectsByGenusType(Type projectGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a 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.
      Parameters:
      projectGenusType - a project genus type
      Returns:
      the returned Project list
      Throws:
      NullArgumentException - projectGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getProjectsByParentGenusType

      ProjectList getProjectsByParentGenusType(Type projectGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a 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.
      Parameters:
      projectGenusType - a project genus type
      Returns:
      the returned Project list
      Throws:
      NullArgumentException - projectGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getProjectsByRecordType

      ProjectList getProjectsByRecordType(Type projectRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a 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.
      Parameters:
      projectRecordType - a project record type
      Returns:
      the returned Project list
      Throws:
      NullArgumentException - projectRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getProjectsOnDate

      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 range
      to - end of date range
      Returns:
      the returned Project list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 type
      from - start of date range
      to - end of date range
      Returns:
      the returned Project list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - projectGenusType, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getProjectsForBuilding

      ProjectList getProjectsForBuilding(Id buildingId) throws OperationFailedException, PermissionDeniedException
      Gets a 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.
      Parameters:
      buildingId - a building Id
      Returns:
      the returned Project list
      Throws:
      NullArgumentException - buildingId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getProjectsByGenusTypeForBuilding

      ProjectList getProjectsByGenusTypeForBuilding(Id buildingId, Type projectGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a 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.
      Parameters:
      buildingId - a building Id
      projectGenusType - a project genus type
      Returns:
      the returned Project list
      Throws:
      NullArgumentException - buildingId or projectGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 building Id
      from - start of date range
      to - end of date range
      Returns:
      the returned Project list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - buildingId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 building Id
      projectGenusType - a project genus type
      from - start of date range
      to - end of date range
      Returns:
      the returned Project list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - buildingId, projectGenusType, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getProjects

      Gets all 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.
      Returns:
      a list of Projects
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.