public interface EntryAdminSession extends OsidSession
EntryAdminSession
creates, updates and deletes
dictionary entries.
Modifier and Type | Method and Description |
---|---|
void |
aliasEntry(Id entryId,
Id aliasId)
Adds an
Id to an Entry for the purpose
of creating compatibility. |
boolean |
canCreateEntries()
Tests if this user can create entries A return of true does not
guarantee successful authorization.
|
boolean |
canCreateEntryWithRecordTypes(Type[] entryRecordTypes)
Tests if this user can create a single
Entry using the
desired record types. |
boolean |
canDeleteEntries()
Tests if this user can delete
Entries. |
boolean |
canManageEntryAliases()
Tests if this user can manage
Id aliases for
Entries. |
boolean |
canUpdateEntries()
Tests if this user can update entries.
|
Entry |
createEntry(EntryForm entryForm)
Creates a new
Entry. |
void |
deleteEntry(Id entryId)
Updates an existing
Dictionary entry identified with
the specified key with the given value. |
Dictionary |
getDictionary()
Gets the
Dictionary associated with this session. |
Id |
getDictionaryId()
Gets the
Dictionary Id associated with
this session. |
EntryForm |
getEntryFormForCreate(Type keyType,
java.lang.Object key,
Type valueType,
Type[] entryRecordTypes)
Gets the entry form for creating new inquiries.
|
EntryForm |
getEntryFormForUpdate(Id entryId)
Gets the entry form for updating an existing entry.
|
void |
updateEntry(EntryForm entryForm)
Updates an existing
Entry. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getDictionaryId()
Dictionary
Id
associated with
this session. Dictionary
Id
associated
with this sessionmandatory
- This method must be implemented. Dictionary getDictionary() throws OperationFailedException, PermissionDeniedException
Dictionary
associated with this session. Dictionary
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateEntries()
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. false
if entry creation is not authorized,
true
otherwisemandatory
- This method must be implemented. boolean canCreateEntryWithRecordTypes(Type[] entryRecordTypes)
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.entryRecordTypes
- array of entry record types true
if Entry
creation using the
specified record Types
is supported,
false
otherwiseNullArgumentException
- entryRecordTypes
is null
mandatory
- This method must be implemented. EntryForm getEntryFormForCreate(Type keyType, java.lang.Object key, Type valueType, Type[] entryRecordTypes) throws AlreadyExistsException, OperationFailedException, PermissionDeniedException
keyType
- the Type
of the keykey
- the keyvalueType
- the Type
of the valueentryRecordTypes
- array of entry record typesAlreadyExistsException
- an entry by this key,
keyType,
and valueType
already existsNullArgumentException
- keyType, key, valueType,
or entryRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
key/value or record typesmandatory
- This method must be implemented. Entry createEntry(EntryForm entryForm) throws OperationFailedException, PermissionDeniedException
Entry.
entryForm
- the form for this entryIllegalStateException
- entryForm
already used in a create transaction.InvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- entryForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- entryForm
did not
originate from getEntryFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateEntries()
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. false
if entry modification is not authorized,
true
otherwisemandatory
- This method must be implemented. EntryForm getEntryFormForUpdate(Id entryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
entryId
- the Id
of the Entry
NotFoundException
- entryId
is not foundNullArgumentException
- entryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateEntry(EntryForm entryForm) throws OperationFailedException, PermissionDeniedException
Entry.
entryForm
- the form containing the elements to be updatedIllegalStateException
- entryForm
already used in an update transatcionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- entryForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- entryyForm
did
not originate from getEntryFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteEntries()
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. false
if Entry
deletion is not
authorized, true
otherwisemandatory
- This method must be implemented. void deleteEntry(Id entryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Dictionary
entry identified with
the specified key with the given value.entryId
- the Id
of the entryNotFoundException
- entry is not foundNullArgumentException
- entryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageEntryAliases()
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. false
if Entry
aliasing is not
authorized, true
otherwisemandatory
- This method must be implemented. void aliasEntry(Id entryId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
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.
entryId
- the Id
of an Entry
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- entryId
not foundNullArgumentException
- entryId
or
aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.