public interface FrontOfficeAdminSession extends OsidSession
This session creates, updates, and deletes FrontOffices.
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
FrontOffice,
a FrontOfficeForm
is requested using
getFrontOfficeFormForCreate()
specifying the desired record
Types
or none if no record Types
are needed.
The returned FrontOfficeForm
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 FrontOfficeForm
is submiited to a create operation, it cannot be reused with another
create operation unless the first operation was unsuccessful. Each
FrontOfficeForm
corresponds to an attempted transaction.
For updates, FrontOfficeForms
are requested to the
FrontOffice
Id
that is to be updated using
getFrontOfficeFormForUpdate().
Similarly, the
FrontOfficeForm
has metadata about the data that can be updated
and it can perform validation before submitting the update. The
FrontOfficeForm
can only be used once for a successful update and
cannot be reused.
The delete operations delete FrontOffices.
This session includes an Id
aliasing mechanism to
assign an external Id
to an internally assigned Id.
Modifier and Type | Method and Description |
---|---|
void |
aliasFrontOffice(Id frontOfficeId,
Id aliasId)
Adds an
Id to a FrontOffice for the
purpose of creating compatibility. |
boolean |
canCreateFrontOffices()
Tests if this user can create
FrontOffices. |
boolean |
canCreateFrontOfficeWithRecordTypes(Type[] frontOfficeRecordTypes)
Tests if this user can create a single
FrontOffice
using the desired record types. |
boolean |
canDeleteFrontOffices()
Tests if this user can delete
FrontOffices. |
boolean |
canManageFrontOfficeAliases()
Tests if this user can manage
Id aliases for
FrontOffices. |
boolean |
canUpdateFrontOffices()
Tests if this user can update
FrontOffices. |
FrontOffice |
createFrontOffice(FrontOfficeForm frontOfficeForm)
Creates a new
FrontOffice. |
void |
deleteFrontOffice(Id frontOfficeId)
Deletes a
FrontOffice. |
FrontOfficeForm |
getFrontOfficeFormForCreate(Type[] frontOfficeRecordTypes)
Gets the front office form for creating new frontOffices.
|
FrontOfficeForm |
getFrontOfficeFormForUpdate(Id frontOfficeId)
Gets the front office form for updating an existing front office.
|
void |
updateFrontOffice(FrontOfficeForm frontOfficeForm)
Updates an existing front office
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canCreateFrontOffices()
FrontOffices.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known creating a FrontOffice.
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 FrontOffice
creation is
not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateFrontOfficeWithRecordTypes(Type[] frontOfficeRecordTypes)
FrontOffice
using the desired record types. While
TrackingManager.getFrontOfficeRecordTypes()
can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific FrontOffice.
Providing an empty array tests if a FrontOffice
can be
created with no records.frontOfficeRecordTypes
- array of front office record types true
if FrontOffice
creation
using the specified record Types
is supported,
false
otherwiseNullArgumentException
- frontOfficeRecordTypes
is null
mandatory
- This method must be implemented. FrontOfficeForm getFrontOfficeFormForCreate(Type[] frontOfficeRecordTypes) throws OperationFailedException, PermissionDeniedException
frontOfficeRecordTypes
- array of front office record typesNullArgumentException
- frontOfficeRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. FrontOffice createFrontOffice(FrontOfficeForm frontOfficeForm) throws OperationFailedException, PermissionDeniedException
FrontOffice.
frontOfficeForm
- the form for this FrontOffice
FrontOffice
IllegalStateException
- frontOfficeForm
already use din a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- frontOfficeForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- frontOfficeForm
did not originate from getFrontOfficeFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateFrontOffices()
FrontOffices.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known updating a FrontOffice
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 FrontOffice
modification is not authorized, true
otherwisemandatory
- This method must be implemented. FrontOfficeForm getFrontOfficeFormForUpdate(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
frontOfficeId
- the Id
of the FrontOffice
NotFoundException
- frontOfficeId
is not
foundNullArgumentException
- frontOfficeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateFrontOffice(FrontOfficeForm frontOfficeForm) throws OperationFailedException, PermissionDeniedException
frontOfficeForm
- the form containing the elements to be updatedIllegalStateException
- frontOfficeForm
already use din an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- frontOfficeId
or
frontOfficeForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- frontOfficeForm
did not originate from getFrontOfficeFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteFrontOffices()
FrontOffices.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known deleting a FrontOffice
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 FrontOffice
deletion is
not authorized, true
otherwisemandatory
- This method must be implemented. void deleteFrontOffice(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
FrontOffice.
frontOfficeId
- the Id
of the FrontOffice
to removeNotFoundException
- frontOfficeId
not
foundNullArgumentException
- frontOfficeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageFrontOfficeAliases()
Id
aliases for
FrontOffices.
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 FrontOffice
aliasing is
not authorized, true
otherwisemandatory
- This method must be implemented. void aliasFrontOffice(Id frontOfficeId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a FrontOffice
for the
purpose of creating compatibility. The primary Id
of
the FrontOffice
is determined by the provider. The new
Id
performs as an alias to the primary Id.
frontOfficeId
- the Id
of a FrontOffice
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- frontOfficeId
not
foundNullArgumentException
- frontOfficeId
or
aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.