Interface InputEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes input enablers. The data for create
and update is provided via the InputEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasInputEnabler(Id inputEnablerId, Id aliasId) Adds anIdto anInputEnablerfor the purpose of creating compatibility.booleanTests if this user can create input enablers.booleancanCreateInputEnablerWithRecordTypes(Type[] inputEnablerRecordTypes) Tests if this user can create a singleInputEnablerusing the desired record types.booleanTests if this user can delete input enablers.booleanTests if this user can manageIdaliases for input enablers.booleanTests if this user can update input enablers.createInputEnabler(InputEnablerForm inputEnablerForm) Creates a newInputEnabler.voiddeleteInputEnabler(Id inputEnablerId) Deletes anInputEnabler.getInputEnablerFormForCreate(Type[] inputEnablerRecordTypes) Gets the input enabler form for creating new input enablers.getInputEnablerFormForUpdate(Id inputEnablerId) Gets the input enabler form for updating an existing input enabler.Gets theSystemassociated with this session.Gets theSystemIdassociated with this session.voidupdateInputEnabler(InputEnablerForm inputEnablerForm) Updates an existing input 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
-
getSystemId
Id getSystemId()Gets theSystemIdassociated with this session.- Returns:
- the
System Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getSystem
Gets theSystemassociated with this session.- Returns:
- the system
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateInputEnabler
boolean canCreateInputEnabler()Tests if this user can create input enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anInputEnablerwill 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:
falseifInputEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateInputEnablerWithRecordTypes
Tests if this user can create a singleInputEnablerusing the desired record types. WhileOfferingRulesManager.getInputEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificInputEnabler. Providing an empty array tests if anInputEnablercan be created with no records.- Parameters:
inputEnablerRecordTypes- array of input enabler record types- Returns:
trueifInputEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-inputEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getInputEnablerFormForCreate
InputEnablerForm getInputEnablerFormForCreate(Type[] inputEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the input enabler form for creating new input enablers. A new form should be requested for each create transaction.- Parameters:
inputEnablerRecordTypes- array of input enabler record types- Returns:
- the input enabler form
- Throws:
NullArgumentException-inputEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createInputEnabler
InputEnabler createInputEnabler(InputEnablerForm inputEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newInputEnabler.- Parameters:
inputEnablerForm- the form for thisInputEnabler- Returns:
- the new
InputEnabler - Throws:
IllegalStateException-inputEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-inputEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-inputEnablerForm did not originate from getInputEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateInputEnablers
boolean canUpdateInputEnablers()Tests if this user can update input enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anInputEnablerwill 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:
falseifInputEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getInputEnablerFormForUpdate
InputEnablerForm getInputEnablerFormForUpdate(Id inputEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the input enabler form for updating an existing input enabler. A new input enabler form should be requested for each update transaction.- Parameters:
inputEnablerId- theIdof theInputEnabler- Returns:
- the input enabler form
- Throws:
NotFoundException-inputEnablerIdis not foundNullArgumentException-inputEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateInputEnabler
void updateInputEnabler(InputEnablerForm inputEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing input enabler.- Parameters:
inputEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-inputEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-inputEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-inputEnablerForm did not originate from getInputEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteInputEnablers
boolean canDeleteInputEnablers()Tests if this user can delete input enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anInputEnablerwill 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:
falseifInputEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteInputEnabler
void deleteInputEnabler(Id inputEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anInputEnabler.- Parameters:
inputEnablerId- theIdof theInputEnablerto remove- Throws:
NotFoundException-inputEnablerIdnot foundNullArgumentException-inputEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageInputEnablerAliases
boolean canManageInputEnablerAliases()Tests if this user can manageIdaliases for input 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:
falseifInputEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasInputEnabler
void aliasInputEnabler(Id inputEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anInputEnablerfor the purpose of creating compatibility. The primaryIdof theInputEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another input enabler. it is reassigned to the given input enablerId.- Parameters:
inputEnablerId- theIdof anInputEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-inputEnablerIdnot foundNullArgumentException-inputEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-