Interface FrontOfficeAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
FrontOfficeBatchAdminSession
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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasFrontOffice(Id frontOfficeId, Id aliasId) Adds anIdto aFrontOfficefor the purpose of creating compatibility.booleanTests if this user can createFrontOffices.booleancanCreateFrontOfficeWithRecordTypes(Type[] frontOfficeRecordTypes) Tests if this user can create a singleFrontOfficeusing the desired record types.booleanTests if this user can deleteFrontOffices.booleanTests if this user can manageIdaliases forFrontOffices.booleanTests if this user can updateFrontOffices.createFrontOffice(FrontOfficeForm frontOfficeForm) Creates a newFrontOffice.voiddeleteFrontOffice(Id frontOfficeId) Deletes aFrontOffice.getFrontOfficeFormForCreate(Type[] frontOfficeRecordTypes) Gets the front office form for creating new frontOffices.getFrontOfficeFormForUpdate(Id frontOfficeId) Gets the front office form for updating an existing front office.voidupdateFrontOffice(FrontOfficeForm frontOfficeForm) Updates an existing front officeMethods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canCreateFrontOffices
boolean canCreateFrontOffices()Tests if this user can createFrontOffices. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aFrontOffice. will result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.- Returns:
falseifFrontOfficecreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateFrontOfficeWithRecordTypes
Tests if this user can create a singleFrontOfficeusing the desired record types. WhileTrackingManager.getFrontOfficeRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificFrontOffice. Providing an empty array tests if aFrontOfficecan be created with no records.- Parameters:
frontOfficeRecordTypes- array of front office record types- Returns:
trueifFrontOfficecreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-frontOfficeRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getFrontOfficeFormForCreate
FrontOfficeForm getFrontOfficeFormForCreate(Type[] frontOfficeRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the front office form for creating new frontOffices. A new form should be requested for each create transaction.- Parameters:
frontOfficeRecordTypes- array of front office record types- Returns:
- the front office form
- Throws:
NullArgumentException-frontOfficeRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createFrontOffice
FrontOffice createFrontOffice(FrontOfficeForm frontOfficeForm) throws OperationFailedException, PermissionDeniedException Creates a newFrontOffice.- Parameters:
frontOfficeForm- the form for thisFrontOffice- Returns:
- the new
FrontOffice - Throws:
IllegalStateException-frontOfficeFormalready use din a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-frontOfficeFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-frontOfficeFormdid not originate fromgetFrontOfficeFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateFrontOffices
boolean canUpdateFrontOffices()Tests if this user can updateFrontOffices. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aFrontOfficewill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.- Returns:
falseifFrontOfficemodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getFrontOfficeFormForUpdate
FrontOfficeForm getFrontOfficeFormForUpdate(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the front office form for updating an existing front office. A new front office form should be requested for each update transaction.- Parameters:
frontOfficeId- theIdof theFrontOffice- Returns:
- the front office form
- Throws:
NotFoundException-frontOfficeIdis not foundNullArgumentException-frontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateFrontOffice
void updateFrontOffice(FrontOfficeForm frontOfficeForm) throws OperationFailedException, PermissionDeniedException Updates an existing front office- Parameters:
frontOfficeForm- the form containing the elements to be updated- Throws:
IllegalStateException-frontOfficeFormalready use din an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-frontOfficeIdorfrontOfficeFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-frontOfficeFormdid not originate fromgetFrontOfficeFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteFrontOffices
boolean canDeleteFrontOffices()Tests if this user can deleteFrontOffices. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aFrontOfficewill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.- Returns:
falseifFrontOfficedeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteFrontOffice
void deleteFrontOffice(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aFrontOffice.- Parameters:
frontOfficeId- theIdof theFrontOfficeto remove- Throws:
NotFoundException-frontOfficeIdnot foundNullArgumentException-frontOfficeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageFrontOfficeAliases
boolean canManageFrontOfficeAliases()Tests if this user can manageIdaliases forFrontOffices. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifFrontOfficealiasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasFrontOffice
void aliasFrontOffice(Id frontOfficeId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aFrontOfficefor the purpose of creating compatibility. The primaryIdof theFrontOfficeis determined by the provider. The newIdperforms as an alias to the primaryId.- Parameters:
frontOfficeId- theIdof aFrontOfficealiasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-frontOfficeIdnot foundNullArgumentException-frontOfficeIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-