public interface ValueEnablerAdminSession extends OsidSession
This session creates and removes value enablers. The data for create
and update is provided via the ValueEnablerForm.
Modifier and Type | Method and Description |
---|---|
void |
aliasValueEnabler(Id valueEnablerId,
Id aliasId)
Adds an
Id to a ValueEnabler for the
purpose of creating compatibility. |
boolean |
canCreateValueEnabler()
Tests if this user can create value enablers.
|
boolean |
canCreateValueEnablerWithRecordTypes(Type[] valueEnablerRecordTypes)
Tests if this user can create a single
ValueEnabler
using the desired record types. |
boolean |
canDeleteValueEnablers()
Tests if this user can delete value enablers.
|
boolean |
canManageValueEnablerAliases()
Tests if this user can manage
Id aliases for value
enablers. |
boolean |
canUpdateValueEnablers()
Tests if this user can update value enablers.
|
ValueEnabler |
createValueEnabler(ValueEnablerForm valueEnablerForm)
Creates a new
ValueEnabler. |
void |
deleteValueEnabler(Id valueEnablerId)
Deletes a
ValueEnabler. |
Configuration |
getConfiguration()
Gets the
Configuration associated with this session. |
Id |
getConfigurationId()
Gets the
Configuration Id associated
with this session. |
ValueEnablerForm |
getValueEnablerFormForCreate(Type[] valueEnablerRecordTypes)
Gets the value enabler form for creating new value enablers.
|
ValueEnablerForm |
getValueEnablerFormForUpdate(Id valueEnablerId)
Gets the value enabler form for updating an existing value enabler.
|
void |
updateValueEnabler(ValueEnablerForm valueEnablerForm)
Updates an existing value enabler.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getConfigurationId()
Configuration
Id
associated
with this session. Configuration Id
associated with this
sessionmandatory
- This method must be implemented. Configuration getConfiguration() throws OperationFailedException, PermissionDeniedException
Configuration
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateValueEnabler()
ValueEnabler
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 ValueEnabler
creation
is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateValueEnablerWithRecordTypes(Type[] valueEnablerRecordTypes)
ValueEnabler
using the desired record types. While
ConfigurationRulesManager.getValueEnablerRecordTypes()
can be
used to examine which records are supported, this method tests which
record(s) are required for creating a specific ValueEnabler.
Providing an empty array tests if a ValueEnabler
can be created with no records.valueEnablerRecordTypes
- array of value enabler record types true
if ValueEnabler
creation
using the specified record Types
is supported,
false
otherwiseNullArgumentException
- valueEnablerRecordTypes
is null
mandatory
- This method must be implemented. ValueEnablerForm getValueEnablerFormForCreate(Type[] valueEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
valueEnablerRecordTypes
- array of value enabler record typesNullArgumentException
- valueEnablerRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. ValueEnabler createValueEnabler(ValueEnablerForm valueEnablerForm) throws OperationFailedException, PermissionDeniedException
ValueEnabler.
valueEnablerForm
- the form for this ValueEnabler
ValueEnabler
IllegalStateException
- valueEnablerForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- valueEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- valueEnablerForm
did not originate from getValueEnablerFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateValueEnablers()
ValueEnabler
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 ValueEnabler
modification is not authorized, true
otherwisemandatory
- This method must be implemented. ValueEnablerForm getValueEnablerFormForUpdate(Id valueEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
valueEnablerId
- the Id
of the
ValueEnabler
NotFoundException
- valueEnablerId
is
not foundNullArgumentException
- valueEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateValueEnabler(ValueEnablerForm valueEnablerForm) throws OperationFailedException, PermissionDeniedException
valueEnablerForm
- the form containing the elements to be
updatedIllegalStateException
- valueEnablerForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- valueEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- valueEnablerForm
did not originate from getValueEnablerFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteValueEnablers()
ValueEnabler
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 ValueEnabler
deletion
is not authorized, true
otherwisemandatory
- This method must be implemented. void deleteValueEnabler(Id valueEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ValueEnabler.
valueEnablerId
- the Id
of the
ValueEnabler
to removeNotFoundException
- valueEnablerId
not
foundNullArgumentException
- valueEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageValueEnablerAliases()
Id
aliases for value
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. false
if ValueEnabler
aliasing
is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasValueEnabler(Id valueEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a ValueEnabler
for the
purpose of creating compatibility. The primary Id
of
the ValueEnabler
is determined by the provider. The new
Id
performs as an alias to the primary Id
. If the alias is a pointer to another value enabler. it is
reassigned to the given value enabler Id.
valueEnablerId
- the Id
of a ValueEnabler
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- valueEnablerId
not
foundNullArgumentException
- valueEnablerId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.