public interface DemographicEnablerAdminSession extends OsidSession
This session creates and removes demographic enablers. The data for
create and update is provided via the DemographicEnablerForm.
Modifier and Type | Method and Description |
---|---|
void |
aliasDemographicEnabler(Id demographicEnablerId,
Id aliasId)
Adds an
Id to a DemographicEnabler for
the purpose of creating compatibility. |
boolean |
canCreateDemographicEnabler()
Tests if this user can create demographic enablers.
|
boolean |
canCreateDemographicEnablerWithRecordTypes(Type[] demographicEnablerRecordTypes)
Tests if this user can create a single
DemographicEnabler
using the desired record types. |
boolean |
canDeleteDemographicEnabler(Id demographicEnablerId)
Tests if this user can delete a specified
DemographicEnabler. |
boolean |
canDeleteDemographicEnablers()
Tests if this user can delete demographic enablers.
|
boolean |
canManageDemographicEnablerAliases()
Tests if this user can manage
Id aliases for
demographic enablers. |
boolean |
canUpdateDemographicEnabler(Id demographicEnablerId)
Tests if this user can update a demographic enabler.
|
boolean |
canUpdateDemographicEnablers()
Tests if this user can update demographic enablers.
|
DemographicEnabler |
createDemographicEnabler(DemographicEnablerForm demographicEnablerForm)
Creates a new
DemographicEnabler. |
void |
deleteDemographicEnabler(Id demographicEnablerId)
Deletes a
DemographicEnabler. |
Bin |
getBin()
Gets the
Bin associated with this session. |
Id |
getBinId()
Gets the
Bin Id associated with this
session. |
DemographicEnablerForm |
getDemographicEnablerFormForCreate(Type[] demographicEnablerRecordTypes)
Gets the demographic enabler form for creating new demographic
enablers.
|
DemographicEnablerForm |
getDemographicEnablerFormForUpdate(Id demographicEnablerId)
Gets the demographic enabler form for updating an existing demographic
enabler.
|
void |
updateDemographicEnabler(Id demographicEnablerId,
DemographicEnablerForm demographicEnablerForm)
Updates an existing demographic enabler.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBinId()
Bin
Id
associated with this
session. Bin Id
associated with this sessionmandatory
- This method must be implemented. Bin getBin() throws OperationFailedException, PermissionDeniedException
Bin
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateDemographicEnabler()
DemographicEnabler
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 DemographicEnabler
creation is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateDemographicEnablerWithRecordTypes(Type[] demographicEnablerRecordTypes)
DemographicEnabler
using the desired record types. While
ResourceDemographicManager.getDemographicEnablerRecordTypes()
can be used to examine which records are supported, this method tests
which record(s) are required for creating a specific
DemographicEnabler.
Providing an empty array tests if a
DemographicEnabler
can be created with no records.demographicEnablerRecordTypes
- array of demographic enabler
record types true
if DemographicEnabler
creation using the specified record Types
is
supported, false
otherwiseNullArgumentException
-
demographicEnablerRecordTypes
is null
mandatory
- This method must be implemented. DemographicEnablerForm getDemographicEnablerFormForCreate(Type[] demographicEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
demographicEnablerRecordTypes
- array of demographic enabler
record typesNullArgumentException
-
demographicEnablerRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. DemographicEnabler createDemographicEnabler(DemographicEnablerForm demographicEnablerForm) throws AlreadyExistsException, OperationFailedException, PermissionDeniedException
DemographicEnabler.
demographicEnablerForm
- the form for this
DemographicEnabler
DemographicEnabler
AlreadyExistsException
- attempt at duplicating a
property the underlying system is enforcing to be uniqueInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- demographicEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- demographicEnablerForm
is not of this servicemandatory
- This method must be implemented. boolean canUpdateDemographicEnablers()
DemographicEnabler
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 DemographicEnabler
modification is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canUpdateDemographicEnabler(Id demographicEnablerId)
DemographicEnabler
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.demographicEnablerId
- the Id
of the
DemographicEnabler
false
if demographic enabler modification is
not authorized, true
otherwiseNullArgumentException
- demographicEnablerId
is null
mandatory
- This method must be implemented. If
- the demographicEnablerId
is not found, then
it is acceptable to return false to indicate the lack of an
update available. DemographicEnablerForm getDemographicEnablerFormForUpdate(Id demographicEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
demographicEnablerId
- the Id
of the
DemographicEnabler
NotFoundException
- demographicEnablerId
is not foundNullArgumentException
- demographicEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateDemographicEnabler(Id demographicEnablerId, DemographicEnablerForm demographicEnablerForm) throws NotFoundException, OperationFailedException, PermissionDeniedException
demographicEnablerId
- the Id
of the
DemographicEnabler
demographicEnablerForm
- the form containing the elements to be
updatedInvalidArgumentException
- the form contains an invalid
valueNotFoundException
- demographicEnablerId
is not foundNullArgumentException
- demographicEnablerId
or demographicEnablerForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
-
resourceEnablerProcessorForm
is not of this servicemandatory
- This method must be implemented. boolean canDeleteDemographicEnablers()
DemographicEnabler
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 DemographicEnabler
deletion is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canDeleteDemographicEnabler(Id demographicEnablerId)
DemographicEnabler.
A return of true does not guarantee successful authorization.
A return of false indicates that it is known deleting the
DemographicEnabler
will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer a delete operation to an unauthorized user.demographicEnablerId
- the Id
of the
DemographicEnabler
false
if deletion of this
DemographicEnabler
is not authorized, true
otherwiseNullArgumentException
- demographicEnablerId
is null
mandatory
- This method must be implemented. If
- the demographicEnablerId
is not found, then
it is acceptable to return false to indicate the lack of a
delete available. void deleteDemographicEnabler(Id demographicEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
DemographicEnabler.
demographicEnablerId
- the Id
of the
DemographicEnabler
to removeNotFoundException
- demographicEnablerId
not foundNullArgumentException
- demographicEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageDemographicEnablerAliases()
Id
aliases for
demographic 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 DemographicEnabler
aliasing is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasDemographicEnabler(Id demographicEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a DemographicEnabler
for
the purpose of creating compatibility. The primary Id
of the DemographicEnabler
is determined by the
provider. The new Id
performs as an alias to the
primary Id
. If the alias is a pointer to another
demographic enabler. it is reassigned to the given demographic enabler
Id.
demographicEnablerId
- the Id
of a
DemographicEnabler
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- demographicEnablerId
not foundNullArgumentException
- demographicEnablerId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.