Interface ActionEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ActionEnablerAdminSession extends OsidSession

This session creates and removes action enablers. The data for create and update is provided via the ActionEnablerForm .

  • Method Details

    • getSystemId

      Id getSystemId()
      Gets the System Id associated with this session.
      Returns:
      the System Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getSystem

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

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

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

      ActionEnablerForm getActionEnablerFormForCreate(Type[] actionEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the action enabler form for creating new action enablers. A new form should be requested for each create transaction.
      Parameters:
      actionEnablerRecordTypes - array of action enabler record types
      Returns:
      the action enabler form
      Throws:
      NullArgumentException - actionEnablerRecordTypes 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.
    • createActionEnabler

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

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

      ActionEnablerForm getActionEnablerFormForUpdate(Id actionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the action enabler form for updating an existing action enabler. A new action enabler form should be requested for each update transaction.
      Parameters:
      actionEnablerId - the Id of the ActionEnabler
      Returns:
      the action enabler form
      Throws:
      NotFoundException - actionEnablerId is not found
      NullArgumentException - actionEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateActionEnabler

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

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

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

      boolean canManageActionEnablerAliases()
      Tests if this user can manage Id aliases for action enablers. 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 ActionEnabler aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasActionEnabler

      void aliasActionEnabler(Id actionEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to an ActionEnabler for the purpose of creating compatibility. The primary Id of the ActionEnabler is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another action enabler. it is reassigned to the given action enabler Id .
      Parameters:
      actionEnablerId - the Id of an ActionEnabler
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - actionEnablerId not found
      NullArgumentException - actionEnablerId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.