Interface ProfilingSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProfilingSession extends OsidSession

This is the basic session for querying profiles.

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

      boolean canAccessProfileEntries()
      Tests if this user can perform profile checks. 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 to unauthorized users.
      Returns:
      false if profile methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useFederatedProfileView

      void useFederatedProfileView()
      Federates the view for methods in this session. A federated view will include profile entries from descendant profiles 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.
    • hasProfileEntry

      boolean hasProfileEntry(Id profileItemId) throws OperationFailedException, PermissionDeniedException
      Determines if the question Id of the profile entry is true.
      Parameters:
      profileItemId - the Id of a ProfileItem
      Returns:
      true if the the profile question is true, false othersise
      Throws:
      NullArgumentException - profileItemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure making request
      Compliance:
      mandatory - This method must be implemented.
      Notes:
      Profile - entries may be stored in a normalized form with respect to various Resources and created using specific nodes in a {@code ProfileItem} hierarchy. The provider needs to maintain a de-normalized implicit profile entry store or expand the applicable hierarchies on the fly to honor this query.
    • getProfileEntryCondition

      ProfileEntryCondition getProfileEntryCondition(Id profileItemId)
      Gets the ProfileEntryCondition for making conditional profile checks.
      Parameters:
      profileItemId - the Id of a ProfileItem
      Returns:
      a profil entry condition
      Throws:
      NullArgumentException - profileItemId is null
      Compliance:
      mandatory - This method must be implemented.
    • hasProfileEntryOnCondition

      boolean hasProfileEntryOnCondition(Id profileItemId, ProfileEntryCondition condition) throws OperationFailedException, PermissionDeniedException
      Determines if the question Id of the profile entry is true.
      Parameters:
      profileItemId - the Id of a ProfileItem
      condition - a profile entry condition
      Returns:
      true if the profile entry is true, false othersise
      Throws:
      NullArgumentException - profileItemId or condition is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure making request
      UnsupportedException - condition is not of this service
      Compliance:
      mandatory - This method must be implemented.
      Notes:
      ProfileEntries - may be stored in a normalized form with respect to various Resources and created using specific nodes in a {@code ProfileItem} hierarchy. The provider needs to maintain a de-normalized implicit entry store or expand the applicable hierarchies on the fly to honor this query.