public interface OublietteAdminSession extends OsidSession
This session creates, updates, and deletes Oubliettes.
The data for create and update is provided by the consumer via the form
object. OsidForms
are requested for each create or update
and may not be reused.
Create and update operations differ in their usage. To create a
Oubliette,
a OublietteForm
is requested using
getOublietteFormForCreate()
specifying the desired record
Types
or none if no record Types
are needed.
The returned OublietteForm
will indicate that it is to be
used with a create operation and can be used to examine metdata or
validate data prior to creation. Once the OublietteForm
is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
OublietteForm
corresponds to an attempted transaction.
For updates, OublietteForms
are requested to the
Oubliette
Id
that is to be updated using
getOublietteFormForUpdate().
Similarly, the OublietteForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The OublietteForm
can only be used once for a successful update and cannot be reused.
The delete operations delete Oubliettes.
This session includes an Id
aliasing mechanism to
assign an external Id
to an internally assigned Id.
Modifier and Type | Method and Description |
---|---|
void |
aliasOubliette(Id oublietteId,
Id aliasId)
Adds an
Id to a Oubliette for the
purpose of creating compatibility. |
boolean |
canCreateOubliette()
Tests if this user can create
Oubliettes. |
boolean |
canCreateOublietteWithRecordTypes(Type[] oublietteRecordTypes)
Tests if this user can create a single
Oubliette using
the desired record types. |
boolean |
canDeleteOubliettes()
Tests if this user can delete
Oubliettes. |
boolean |
canManageOublietteAliases()
Tests if this user can manage
Id aliases for
Oubliettes. |
boolean |
canUpdateOubliettes()
Tests if this user can update
Oubliettes. |
Oubliette |
createOubliette(OublietteForm oublietteForm)
Creates a new
Oubliette. |
void |
deleteOubliette(Id oublietteId)
Deletes a
Oubliette. |
OublietteForm |
getOublietteFormForCreate(Type[] oublietteRecordTypes)
Gets the oubliette form for creating new oubliettes.
|
OublietteForm |
getOublietteFormForUpdate(Id oublietteId)
Gets the oubliette form for updating an existing oubliette.
|
void |
updateOubliette(OublietteForm oublietteForm)
Updates an existing oubliette.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canCreateOubliette()
Oubliettes.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known creating a Oubliette.
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may not wish to offer create operations to
unauthorized users. false
if Oubliette
creation is
not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateOublietteWithRecordTypes(Type[] oublietteRecordTypes)
Oubliette
using
the desired record types. While
HoldManager.getOublietteRecordTypes()
can be used to examine
which records are supported, this method tests which record(s) are
required for creating a specific Oubliette.
Providing
an empty array tests if a Oubliette
can be created with
no records.oublietteRecordTypes
- array of oubliette record types true
if Oubliette
creation using
the specified record Types
is supported,
false
otherwiseNullArgumentException
- oublietteRecordTypes
is null
mandatory
- This method must be implemented. OublietteForm getOublietteFormForCreate(Type[] oublietteRecordTypes) throws OperationFailedException, PermissionDeniedException
oublietteRecordTypes
- array of oubliette record typesNullArgumentException
- oublietteRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. Oubliette createOubliette(OublietteForm oublietteForm) throws OperationFailedException, PermissionDeniedException
Oubliette.
oublietteForm
- the form for this Oubliette
Oubliette
IllegalStateException
- oublietteForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- oublietteForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- oublietteForm
did
not originate from getOublietteFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateOubliettes()
Oubliettes.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known updating a Oubliette
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may not wish to offer update operations to
unauthorized users. false
if Oubliette
modification
is not authorized, true
otherwisemandatory
- This method must be implemented. OublietteForm getOublietteFormForUpdate(Id oublietteId) throws NotFoundException, OperationFailedException
oublietteId
- the Id
of the Oubliette
NotFoundException
- oublietteId
is not
foundNullArgumentException
- oublietteId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void updateOubliette(OublietteForm oublietteForm) throws OperationFailedException, PermissionDeniedException
oublietteForm
- the form containing the elements to be updatedIllegalStateException
- oublietteForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- oublietteForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- oublietteForm
did
not originate from getOublietteFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteOubliettes()
Oubliettes.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known deleting a Oubliette
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may not wish to offer delete operations to
unauthorized users. false
if Oubliette
deletion is
not authorized, true
otherwisemandatory
- This method must be implemented. void deleteOubliette(Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Oubliette.
oublietteId
- the Id
of the Oubliette
to removeNotFoundException
- oublietteId
not
foundNullArgumentException
- oublietteId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageOublietteAliases()
Id
aliases for
Oubliettes.
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 Oubliette
aliasing is
not authorized, true
otherwisemandatory
- This method must be implemented. void aliasOubliette(Id oublietteId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a Oubliette
for the
purpose of creating compatibility. The primary Id
of
the Oubliette
is determined by the provider. The new
Id
performs as an alias to the primary Id.
oublietteId
- the Id
of a Oubliette
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- oublietteId
not
foundNullArgumentException
- oublietteId
or
aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.