Interface CircleOfTrustSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CircleOfTrustSession extends OsidSession

This session examines the relationship between Agents and Trusts .

  • 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.
  • 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.
    • canLookupTrustCircles

      boolean canLookupTrustCircles()
      Tests if this user can look up trusts for agents. A return of true does not guarantee successful authorization. A return of false indicates that it is known these methods will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer create operations to users outside the circle.
      Returns:
      false if trust methods are not authorized, true otherwise
      Compliance:
      mandatory - This method 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 a trust level for the given agent. An Agent may be in one circle of trust that, in turn, is inside another circle of trust. To test whether an agent is inside a specific circle, use IsInCircle() .
      Parameters:
      agentId - an agent Id
      Returns:
      the trust
      Throws:
      NotFoundException - agentId is not found
      NullArgumentException - agentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • isInCircle

      boolean isInCircle(Id agentId) throws OperationFailedException, PermissionDeniedException
      Tests if the given agent is inside the given circle of trust.
      Parameters:
      agentId - an agent Id
      Returns:
      true if the agent is in the given trust, false if agent not found or is outside the circle
      Throws:
      NullArgumentException - agentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.