Interface ProfileItemLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProfileItemLookupSession extends OsidSession

This session provides methods for retrieving ProfileItems .

This session defines two sets of views which offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete and ordered result set or is an error condition
  • isolated profile view: All profile item methods in this session operate, retrieve and pertain to profile items defined explicitly in the current profile. Using an isolated view is useful for managing profile items with the ProfileItemAdminSession .
  • federated profile view: All profile item methods in this session operate, retrieve and pertain to all profile items defined in this profile and any other profiles implicitly available in this profile through profile inheritence.

Generally, the comparative view should be used for most applications as it permits operation even if there a particular element is inaccessible. For example, a hierarchy output can be plugged into a lookup method to retrieve all objects known to a hierarchy, but it may not be necessary to break execution if a node from the hierarchy no longer exists. However, some administrative applications may need to know whether it had retrieved an entire set of objects and may sacrifice some interoperability for the sake of precision.

ProfileItems may have an additional records indicated by their respective record types.

  • Method Details

    • getProfileId

      Id getProfileId()
      Gets the Profile Id associated with this session.
      Returns:
      the Profile Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getProfile

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

      boolean canLookupProfileItems()
      Tests if this user can perform ProfileItem 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.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeProfileItemView

      void useComparativeProfileItemView()
      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.
    • usePlenaryProfileItemView

      void usePlenaryProfileItemView()
      A complete view of the ProfileItem 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.
    • useFederatedProfileView

      void useFederatedProfileView()
      Federates the view for methods in this session. A federated view will include items in profiles which are children of this profile in the profile hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedProfileView

      void useIsolatedProfileView()
      Isolates the view for methods in this session. An isolated view restricts lookups to this profile only.
      Compliance:
      mandatory - This method is must be implemented.
    • getProfileItem

      Gets the ProfileItem specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned ProfileItem may have a different Id than requested, such as the case where a duplicate Id was assigned to a ProfileItem and retained for compatibility.
      Parameters:
      profileItemId - the Id of the ProfileItem to retrieve
      Returns:
      the returned ProfileItem
      Throws:
      NotFoundException - no ProfileItem found with the given Id
      NullArgumentException - profileItemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getProfileItemsByIds

      Gets a ProfileItemList corresponding to the given IdList .In plenary mode, the returned list contains all of the profile items 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 ProfileItems may be omitted from the list and may present the elements in any order including returning a unique set.
      Parameters:
      profileItemIds - the list of Ids to retrieve
      Returns:
      the returned ProfileItem list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - profileItemIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getProfileItemsByGenusType

      ProfileItemList getProfileItemsByGenusType(Type profileItemGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a ProfileItemList corresponding to the given profile item genus Type which does not include profile items of genus types derived from the specified Type . In plenary mode, the returned list contains all known profile items or an error results. Otherwise, the returned list may contain only those profile items that are accessible through this session.
      Parameters:
      profileItemGenusType - a profile item genus type
      Returns:
      the returned ProfileItem list
      Throws:
      NullArgumentException - profileItemGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getProfileItemsByParentGenusType

      ProfileItemList getProfileItemsByParentGenusType(Type profileItemGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a ProfileItemList corresponding to the given profile item genus Type and include any additional profile item with genus types derived from the specified Type . In plenary mode, the returned list contains all known profile items or an error results. Otherwise, the returned list may contain only those profile items that are accessible through this session.
      Parameters:
      profileItemGenusType - a profile item genus type
      Returns:
      the returned ProfileItem list
      Throws:
      NullArgumentException - profileItemGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getProfileItemsByRecordType

      ProfileItemList getProfileItemsByRecordType(Type profileItemRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a ProfileItemList containing the given profile item record Type .In plenary mode, the returned list contains all known profile items or an error results. Otherwise, the returned list may contain only those profile items that are accessible through this session.
      Parameters:
      profileItemRecordType - a profile item record type
      Returns:
      the returned ProfileItem list
      Throws:
      NullArgumentException - profileItemRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getProfileItems

      Gets all ProfileItems . In plenary mode, the returned list contains all known profile items or an error results. Otherwise, the returned list may contain only those profile items that are accessible through this session.
      Returns:
      a list of ProfileItems
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.