public interface DeviceEnablerAdminSession extends OsidSession
This session creates and removes device enablers. The data for create
and update is provided via the DeviceEnablerForm.
Modifier and Type | Method and Description |
---|---|
void |
aliasDeviceEnabler(Id deviceEnablerId,
Id aliasId)
Adds an
Id to a DeviceEnabler for the
purpose of creating compatibility. |
boolean |
canCreateDeviceEnabler()
Tests if this user can create device enablers.
|
boolean |
canCreateDeviceEnablerWithRecordTypes(Type[] deviceEnablerRecordTypes)
Tests if this user can create a single
DeviceEnabler
using the desired record types. |
boolean |
canDeleteDeviceEnablers()
Tests if this user can delete device enablers.
|
boolean |
canManageDeviceEnablerAliases()
Tests if this user can manage
Id aliases for device
enablers. |
boolean |
canUpdateDeviceEnablers()
Tests if this user can update device enablers.
|
DeviceEnabler |
createDeviceEnabler(DeviceEnablerForm deviceEnablerForm)
Creates a new
DeviceEnabler. |
void |
deleteDeviceEnabler(Id deviceEnablerId)
Deletes a
DeviceEnabler. |
DeviceEnablerForm |
getDeviceEnablerFormForCreate(Type[] deviceEnablerRecordTypes)
Gets the device enabler form for creating new device enablers.
|
DeviceEnablerForm |
getDeviceEnablerFormForUpdate(Id deviceEnablerId)
Gets the device enabler form for updating an existing device enabler.
|
System |
getSystem()
Gets the
System associated with this session. |
Id |
getSystemId()
Gets the
System Id associated with this
session. |
void |
updateDeviceEnabler(DeviceEnablerForm deviceEnablerForm)
Updates an existing device enabler.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getSystemId()
System
Id
associated with this
session. System Id
associated with this sessionmandatory
- This method must be implemented. System getSystem() throws OperationFailedException, PermissionDeniedException
System
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateDeviceEnabler()
DeviceEnabler
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 DeviceEnabler
creation
is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateDeviceEnablerWithRecordTypes(Type[] deviceEnablerRecordTypes)
DeviceEnabler
using the desired record types. While
OfferingRulesManager.getDeviceEnablerRecordTypes()
can be used
to examine which records are supported, this method tests which
record(s) are required for creating a specific DeviceEnabler.
Providing an empty array tests if a DeviceEnabler
can be created with no records.deviceEnablerRecordTypes
- array of device enabler record types true
if DeviceEnabler
creation
using the specified record Types
is supported,
false
otherwiseNullArgumentException
- deviceEnablerRecordTypes
is null
mandatory
- This method must be implemented. DeviceEnablerForm getDeviceEnablerFormForCreate(Type[] deviceEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
deviceEnablerRecordTypes
- array of device enabler record typesNullArgumentException
- deviceEnablerRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. DeviceEnabler createDeviceEnabler(DeviceEnablerForm deviceEnablerForm) throws OperationFailedException, PermissionDeniedException
DeviceEnabler.
deviceEnablerForm
- the form for this DeviceEnabler
DeviceEnabler
IllegalStateException
- deviceEnablerForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- deviceEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- deviceEnablerForm did not
originate from getDeviceEnablerFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateDeviceEnablers()
DeviceEnabler
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 DeviceEnabler
modification is not authorized, true
otherwisemandatory
- This method must be implemented. DeviceEnablerForm getDeviceEnablerFormForUpdate(Id deviceEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
deviceEnablerId
- the Id
of the
DeviceEnabler
NotFoundException
- deviceEnablerId
is
not foundNullArgumentException
- deviceEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateDeviceEnabler(DeviceEnablerForm deviceEnablerForm) throws OperationFailedException, PermissionDeniedException
deviceEnablerForm
- the form containing the elements to be
updatedIllegalStateException
- deviceEnablerForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- deviceEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- deviceEnablerForm
did not originate from getDeviceEnablerFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteDeviceEnablers()
DeviceEnabler
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 DeviceEnabler
deletion
is not authorized, true
otherwisemandatory
- This method must be implemented. void deleteDeviceEnabler(Id deviceEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
DeviceEnabler.
deviceEnablerId
- the Id
of the
DeviceEnabler
to removeNotFoundException
- deviceEnablerId
not
foundNullArgumentException
- deviceEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageDeviceEnablerAliases()
Id
aliases for device
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 DeviceEnabler
aliasing
is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasDeviceEnabler(Id deviceEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a DeviceEnabler
for the
purpose of creating compatibility. The primary Id
of
the DeviceEnabler
is determined by the provider. The
new Id
performs as an alias to the primary Id
. If the alias is a pointer to another device enabler. it is
reassigned to the given device enabler Id.
deviceEnablerId
- the Id
of a
DeviceEnabler
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- deviceEnablerId
not
foundNullArgumentException
- deviceEnablerId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.