Interface EntryAdminSession

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

public interface EntryAdminSession extends OsidSession

EntryAdminSession creates, updates and deletes dictionary entries.

  • Method Details

    • getDictionaryId

      Id getDictionaryId()
      Gets the Dictionary Id associated with this session.
      Returns:
      the Dictionary Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getDictionary

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

      boolean canCreateEntries()
      Tests if this user can create entries A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Entry 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 entry creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateEntryWithRecordTypes

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

      EntryForm getEntryFormForCreate(Type keyType, Object key, Type valueType, Type[] entryRecordTypes) throws AlreadyExistsException, OperationFailedException, PermissionDeniedException
      Gets the entry form for creating new inquiries. A new form should be requested for each create transaction.
      Parameters:
      keyType - the Type of the key
      key - the key
      valueType - the Type of the value
      entryRecordTypes - array of entry record types
      Returns:
      the entry form
      Throws:
      AlreadyExistsException - an entry by this key , keyType , and valueType already exists
      NullArgumentException - keyType, key, valueType , or entryRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get form for requested key/value or record types
      Compliance:
      mandatory - This method must be implemented.
    • createEntry

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

      boolean canUpdateEntries()
      Tests if this user can update entries. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an Entry 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 entry modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getEntryFormForUpdate

      Gets the entry form for updating an existing entry. A new entry form should be requested for each update transaction.
      Parameters:
      entryId - the Id of the Entry
      Returns:
      the entry form
      Throws:
      NotFoundException - entryId is not found
      NullArgumentException - entryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateEntry

      void updateEntry(EntryForm entryForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing Entry .
      Parameters:
      entryForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - entryForm already used in an update transatcion
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - entryForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - entryyForm did not originate from getEntryFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteEntries

      boolean canDeleteEntries()
      Tests if this user can delete Entries . A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Entry 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 Entry deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteEntry

      Updates an existing Dictionary entry identified with the specified key with the given value.
      Parameters:
      entryId - the Id of the entry
      Throws:
      NotFoundException - entry is not found
      NullArgumentException - entryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageEntryAliases

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

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