Interface TrustLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface TrustLookupSession extends OsidSession

This session provides methods for retrieving Trusts . The Trust represents the trust level of an agent. The relationship among Agents and Trust is not explicity managed but understood by an Authentication OSID Provider when orchestration to an Authorization OSID Provider is desired.

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 agency view: All agent methods in this session operate, retrieve and pertain to trusts defined explicitly in the current agency.
  • federated agency view: All trust methods in this session operate, retrieve and pertain to all trusts defined in this agency and any other trusts implicitly available in this agency through agency 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.

Trusts may have an additional records indicated by their respective record types. The record may not be accessed through a cast of the Trust .

  • Method Details

    • getAgencyId

      Id getAgencyId()
      Gets the Agency Id associated with this session.
      Returns:
      the Agency Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getAgency

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

      boolean canLookupTrusts()
      Tests if this user can perform Trust 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.
    • useComparativeTrustView

      void useComparativeTrustView()
      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.
    • usePlenaryTrustView

      void usePlenaryTrustView()
      A complete view of the Trust 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.
    • useFederatedAgencyView

      void useFederatedAgencyView()
      Federates the view for methods in this session. A federated view will include trusts in agencies which are children of this agency in the agency hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedAgencyView

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

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

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

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

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

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

      Gets a TrustList in the same circle, or the same level of confidence, as the given trust. In plenary mode, the returned list contains all known trusts or an error results. Otherwise, the returned list may contain only those trusts that are accessible through this session.
      Parameters:
      trustId - a trust Id
      Returns:
      the returned Trust list
      Throws:
      NotFoundException - trustId is not found
      NullArgumentException - trustId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getTrusts

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