Interface OublietteAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
OublietteBatchAdminSession
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 an
Oubliette , an 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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasOubliette(Id oublietteId, Id aliasId) Adds anIdto anOubliettefor the purpose of creating compatibility.booleanTests if this user can createOubliettes.booleancanCreateOublietteWithRecordTypes(Type[] oublietteRecordTypes) Tests if this user can create a singleOublietteusing the desired record types.booleanTests if this user can deleteOubliettes.booleanTests if this user can manageIdaliases forOubliettes.booleanTests if this user can updateOubliettes.createOubliette(OublietteForm oublietteForm) Creates a newOubliette.voiddeleteOubliette(Id oublietteId) Deletes anOubliette.getOublietteFormForCreate(Type[] oublietteRecordTypes) Gets the oubliette form for creating new oubliettes.getOublietteFormForUpdate(Id oublietteId) Gets the oubliette form for updating an existing oubliette.voidupdateOubliette(OublietteForm oublietteForm) Updates an existing oubliette.Methods 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
-
canCreateOubliette
boolean canCreateOubliette()Tests if this user can createOubliettes. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anOubliette. 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:
falseifOubliettecreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateOublietteWithRecordTypes
Tests if this user can create a singleOublietteusing the desired record types. WhileHoldManager.getOublietteRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificOubliette. Providing an empty array tests if anOubliettecan be created with no records.- Parameters:
oublietteRecordTypes- array of oubliette record types- Returns:
trueifOubliettecreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-oublietteRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getOublietteFormForCreate
OublietteForm getOublietteFormForCreate(Type[] oublietteRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the oubliette form for creating new oubliettes. A new form should be requested for each create transaction.- Parameters:
oublietteRecordTypes- array of oubliette record types- Returns:
- the oubliette form
- Throws:
NullArgumentException-oublietteRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createOubliette
Oubliette createOubliette(OublietteForm oublietteForm) throws OperationFailedException, PermissionDeniedException Creates a newOubliette.- Parameters:
oublietteForm- the form for thisOubliette- Returns:
- the new
Oubliette - Throws:
IllegalStateException-oublietteFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-oublietteFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-oublietteFormdid not originate fromgetOublietteFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateOubliettes
boolean canUpdateOubliettes()Tests if this user can updateOubliettes. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anOubliettewill 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:
falseifOubliettemodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getOublietteFormForUpdate
OublietteForm getOublietteFormForUpdate(Id oublietteId) throws NotFoundException, OperationFailedException Gets the oubliette form for updating an existing oubliette. A new oubliette form should be requested for each update transaction.- Parameters:
oublietteId- theIdof theOubliette- Returns:
- the oubliette form
- Throws:
NotFoundException-oublietteIdis not foundNullArgumentException-oublietteIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
updateOubliette
void updateOubliette(OublietteForm oublietteForm) throws OperationFailedException, PermissionDeniedException Updates an existing oubliette.- Parameters:
oublietteForm- the form containing the elements to be updated- Throws:
IllegalStateException-oublietteFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-oublietteFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-oublietteFormdid not originate fromgetOublietteFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteOubliettes
boolean canDeleteOubliettes()Tests if this user can deleteOubliettes. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anOubliettewill 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:
falseifOubliettedeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteOubliette
void deleteOubliette(Id oublietteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anOubliette.- Parameters:
oublietteId- theIdof theOublietteto remove- Throws:
NotFoundException-oublietteIdnot foundNullArgumentException-oublietteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageOublietteAliases
boolean canManageOublietteAliases()Tests if this user can manageIdaliases forOubliettes. 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:
falseifOubliettealiasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasOubliette
void aliasOubliette(Id oublietteId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anOubliettefor the purpose of creating compatibility. The primaryIdof theOublietteis determined by the provider. The newIdperforms as an alias to the primaryId.- Parameters:
oublietteId- theIdof anOubliettealiasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-oublietteIdnot foundNullArgumentException-oublietteIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-