Interface OublietteAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
All Known Subinterfaces:
OublietteBatchAdminSession

public interface OublietteAdminSession extends OsidSession

This session creates, updates, and deletes Oubliettes . The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create an Oubliette , an OublietteForm is requested using getOublietteFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned OublietteForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the OublietteForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each OublietteForm corresponds to an attempted transaction.

For updates, OublietteForms are requested to the Oubliette Id that is to be updated using getOublietteFormForUpdate() . Similarly, the OublietteForm has metadata about the data that can be updated and it can perform validation before submitting the update. The OublietteForm can only be used once for a successful update and cannot be reused.

The delete operations delete Oubliettes .

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

  • Method Details

    • canCreateOubliette

      boolean canCreateOubliette()
      Tests if this user can create Oubliettes . A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Oubliette . will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
      Returns:
      false if Oubliette creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateOublietteWithRecordTypes

      boolean canCreateOublietteWithRecordTypes(Type[] oublietteRecordTypes)
      Tests if this user can create a single Oubliette using the desired record types. While HoldManager.getOublietteRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Oubliette . Providing an empty array tests if an Oubliette can be created with no records.
      Parameters:
      oublietteRecordTypes - array of oubliette record types
      Returns:
      true if Oubliette creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - oublietteRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getOublietteFormForCreate

      OublietteForm getOublietteFormForCreate(Type[] oublietteRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the oubliette form for creating new oubliettes. A new form should be requested for each create transaction.
      Parameters:
      oublietteRecordTypes - array of oubliette record types
      Returns:
      the oubliette form
      Throws:
      NullArgumentException - oublietteRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get form for requested record types
      Compliance:
      mandatory - This method must be implemented.
    • createOubliette

      Creates a new Oubliette .
      Parameters:
      oublietteForm - the form for this Oubliette
      Returns:
      the new Oubliette
      Throws:
      IllegalStateException - oublietteForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - oublietteForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - oublietteForm did not originate from getOublietteFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateOubliettes

      boolean canUpdateOubliettes()
      Tests if this user can update Oubliettes . A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an Oubliette will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
      Returns:
      false if Oubliette modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getOublietteFormForUpdate

      OublietteForm getOublietteFormForUpdate(Id oublietteId) throws NotFoundException, OperationFailedException
      Gets the oubliette form for updating an existing oubliette. A new oubliette form should be requested for each update transaction.
      Parameters:
      oublietteId - the Id of the Oubliette
      Returns:
      the oubliette form
      Throws:
      NotFoundException - oublietteId is not found
      NullArgumentException - oublietteId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • updateOubliette

      void updateOubliette(OublietteForm oublietteForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing oubliette.
      Parameters:
      oublietteForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - oublietteForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - oublietteForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - oublietteForm did not originate from getOublietteFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteOubliettes

      boolean canDeleteOubliettes()
      Tests if this user can delete Oubliettes . A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Oubliette will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
      Returns:
      false if Oubliette deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteOubliette

      void deleteOubliette(Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes an Oubliette .
      Parameters:
      oublietteId - the Id of the Oubliette to remove
      Throws:
      NotFoundException - oublietteId not found
      NullArgumentException - oublietteId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageOublietteAliases

      boolean canManageOublietteAliases()
      Tests if this user can manage Id aliases for Oubliettes . A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
      Returns:
      false if Oubliette aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasOubliette

      Adds an Id to an Oubliette for the purpose of creating compatibility. The primary Id of the Oubliette is determined by the provider. The new Id performs as an alias to the primary Id .
      Parameters:
      oublietteId - the Id of an Oubliette
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - oublietteId not found
      NullArgumentException - oublietteId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.