Interface ValueEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes value enablers. The data for create
and update is provided via the ValueEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasValueEnabler(Id valueEnablerId, Id aliasId) Adds anIdto aValueEnablerfor the purpose of creating compatibility.booleanTests if this user can create value enablers.booleancanCreateValueEnablerWithRecordTypes(Type[] valueEnablerRecordTypes) Tests if this user can create a singleValueEnablerusing the desired record types.booleanTests if this user can delete value enablers.booleanTests if this user can manageIdaliases for value enablers.booleanTests if this user can update value enablers.createValueEnabler(ValueEnablerForm valueEnablerForm) Creates a newValueEnabler.voiddeleteValueEnabler(Id valueEnablerId) Deletes aValueEnabler.Gets theConfigurationassociated with this session.Gets theConfigurationIdassociated with this session.getValueEnablerFormForCreate(Type[] valueEnablerRecordTypes) Gets the value enabler form for creating new value enablers.getValueEnablerFormForUpdate(Id valueEnablerId) Gets the value enabler form for updating an existing value enabler.voidupdateValueEnabler(ValueEnablerForm valueEnablerForm) Updates an existing value enabler.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
-
getConfigurationId
Id getConfigurationId()Gets theConfigurationIdassociated with this session.- Returns:
- the
Configuration Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getConfiguration
Gets theConfigurationassociated with this session.- Returns:
- the configuration
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateValueEnabler
boolean canCreateValueEnabler()Tests if this user can create value enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aValueEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifValueEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateValueEnablerWithRecordTypes
Tests if this user can create a singleValueEnablerusing the desired record types. WhileConfigurationRulesManager.getValueEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificValueEnabler. Providing an empty array tests if aValueEnablercan be created with no records.- Parameters:
valueEnablerRecordTypes- array of value enabler record types- Returns:
trueifValueEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-valueEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getValueEnablerFormForCreate
ValueEnablerForm getValueEnablerFormForCreate(Type[] valueEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the value enabler form for creating new value enablers. A new form should be requested for each create transaction.- Parameters:
valueEnablerRecordTypes- array of value enabler record types- Returns:
- the value enabler form
- Throws:
NullArgumentException-valueEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createValueEnabler
ValueEnabler createValueEnabler(ValueEnablerForm valueEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newValueEnabler.- Parameters:
valueEnablerForm- the form for thisValueEnabler- Returns:
- the new
ValueEnabler - Throws:
IllegalStateException-valueEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-valueEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-valueEnablerFormdid not originate fromgetValueEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateValueEnablers
boolean canUpdateValueEnablers()Tests if this user can update value enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aValueEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifValueEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getValueEnablerFormForUpdate
ValueEnablerForm getValueEnablerFormForUpdate(Id valueEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the value enabler form for updating an existing value enabler. A new value enabler form should be requested for each update transaction.- Parameters:
valueEnablerId- theIdof theValueEnabler- Returns:
- the value enabler form
- Throws:
NotFoundException-valueEnablerIdis not foundNullArgumentException-valueEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateValueEnabler
void updateValueEnabler(ValueEnablerForm valueEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing value enabler.- Parameters:
valueEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-valueEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-valueEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-valueEnablerFormdid not originate fromgetValueEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteValueEnablers
boolean canDeleteValueEnablers()Tests if this user can delete value enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aValueEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifValueEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteValueEnabler
void deleteValueEnabler(Id valueEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aValueEnabler.- Parameters:
valueEnablerId- theIdof theValueEnablerto remove- Throws:
NotFoundException-valueEnablerIdnot foundNullArgumentException-valueEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageValueEnablerAliases
boolean canManageValueEnablerAliases()Tests if this user can manageIdaliases for value 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifValueEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasValueEnabler
void aliasValueEnabler(Id valueEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aValueEnablerfor the purpose of creating compatibility. The primaryIdof theValueEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another value enabler. it is reassigned to the given value enablerId.- Parameters:
valueEnablerId- theIdof aValueEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-valueEnablerIdnot foundNullArgumentException-valueEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-