Interface DispatchProcessorEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes
DispatchProcessorEnablers . 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
DispatchProcessorEnabler , a DispatchProcessorEnablerForm is
requested using getDispatchProcessorEnablerFormForCreate()
specifying the desired record Types or none if no record
Types are needed. The returned DispatchProcessorEnablerForm 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
DispatchProcessorEnablerForm is submiited to a create operation, it
cannot be reused with another create operation unless the first operation
was unsuccessful. Each DispatchProcessorEnablerForm corresponds to
an attempted transaction.
For updates, DispatchProcessorEnablerForms are requested to
the DispatchProcessorEnabler Id that is to be updated
using getDispatchProcessorEnablerFormForUpdate() . Similarly, the
DispatchProcessorEnablerForm has metadata about the data that can
be updated and it can perform validation before submitting the update. The
DispatchProcessorEnablerForm can only be used once for a
successful update and cannot be reused.
The delete operations delete DispatchProcessorEnablers . To
unmap a DispatchProcessorEnabler from the current
Publisher , the
DispatchProcessorEnablerPublisherAssignmentSession should be used. These
delete operations attempt to remove the DispatchProcessorEnabler
itself thus removing it from all known Publisher catalogs.
This session includes an Id aliasing mechanism to assign an
external Id to an internally assigned Id .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasDispatchProcessorEnabler(Id dispatchProcessorEnablerId, Id aliasId) Adds anIdto aDispatchProcessorEnablerfor the purpose of creating compatibility.booleanTests if this user can createDispatchProcessorEnablers.booleancanCreateDispatchProcessorEnablerWithRecordTypes(Type[] dispatchProcessorEnablerRecordTypes) Tests if this user can create a singleDispatchProcessorEnablerusing the desired record types.booleanTests if this user can deleteDispatchProcessorEnablers.booleanTests if this user can manageIdaliases forDispatchProcessorEnablersA return of true does not guarantee successful authorization.booleanTests if this user can updateDispatchProcessorEnablers.createDispatchProcessorEnabler(DispatchProcessorEnablerForm dispatchProcessorEnablerForm) Creates a newDispatchProcessorEnabler.voiddeleteDispatchProcessorEnabler(Id dispatchProcessorEnablerId) Deletes aDispatchProcessorEnabler.getDispatchProcessorEnablerFormForCreate(Type[] dispatchProcessorEnablerRecordTypes) Gets the dispatch processor enabler form for creating new dispatch processor enablers.getDispatchProcessorEnablerFormForUpdate(Id dispatchProcessorEnablerId) Gets the dispatch processor enabler form for updating an existing dispatch processor enabler.Gets thePublisherassociated with this session.Gets thePublisherIdassociated with this session.voidupdateDispatchProcessorEnabler(DispatchProcessorEnablerForm dispatchProcessorEnablerForm) Updates an existing dispatch processor 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
-
getPublisherId
Id getPublisherId()Gets thePublisherIdassociated with this session.- Returns:
- the
Publisher Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getPublisher
Gets thePublisherassociated with this session.- Returns:
- the publisher
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateDispatchProcessorEnablers
boolean canCreateDispatchProcessorEnablers()Tests if this user can createDispatchProcessorEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aDispatchProcessorEnablerwill 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:
falseifDispatchProcessorEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateDispatchProcessorEnablerWithRecordTypes
boolean canCreateDispatchProcessorEnablerWithRecordTypes(Type[] dispatchProcessorEnablerRecordTypes) Tests if this user can create a singleDispatchProcessorEnablerusing the desired record types. WhileSubscriptionRulesManager.getDispatchProcessorEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificDispatchProcessorEnabler. Providing an empty array tests if aDispatchProcessorEnabler can becreated with no records.- Parameters:
dispatchProcessorEnablerRecordTypes- array of dispatch processor enabler record types- Returns:
trueifDispatchProcessorEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-dispatchProcessorEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getDispatchProcessorEnablerFormForCreate
DispatchProcessorEnablerForm getDispatchProcessorEnablerFormForCreate(Type[] dispatchProcessorEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the dispatch processor enabler form for creating new dispatch processor enablers. A new form should be requested for each create transaction.- Parameters:
dispatchProcessorEnablerRecordTypes- array of dispatch processor enabler record types- Returns:
- the dispatch processor enabler form
- Throws:
NullArgumentException-dispatchProcessorEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createDispatchProcessorEnabler
DispatchProcessorEnabler createDispatchProcessorEnabler(DispatchProcessorEnablerForm dispatchProcessorEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newDispatchProcessorEnabler.- Parameters:
dispatchProcessorEnablerForm- the form for thisDispatchProcessorEnabler- Returns:
- the new
DispatchProcessorEnabler - Throws:
IllegalStateException-dispatchProcessorEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-dispatchProcessorEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-dispatchProcessorEnablerFormdid not originate fromgetDispatchProcessorEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateDispatchProcessorEnablers
boolean canUpdateDispatchProcessorEnablers()Tests if this user can updateDispatchProcessorEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aDispatchProcessorEnablerwill 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:
falseifDispatchProcessorEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getDispatchProcessorEnablerFormForUpdate
DispatchProcessorEnablerForm getDispatchProcessorEnablerFormForUpdate(Id dispatchProcessorEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the dispatch processor enabler form for updating an existing dispatch processor enabler. A new dispatch processor enabler form should be requested for each update transaction.- Parameters:
dispatchProcessorEnablerId- theIdof theDispatchProcessorEnabler- Returns:
- the dispatch processor enabler form
- Throws:
NotFoundException-dispatchProcessorEnablerIdis not foundNullArgumentException-dispatchProcessorEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateDispatchProcessorEnabler
void updateDispatchProcessorEnabler(DispatchProcessorEnablerForm dispatchProcessorEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing dispatch processor enabler.- Parameters:
dispatchProcessorEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-dispatchProcessorEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-dispatchProcessorEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-dispatchProcessorEnablerFormdid not originate fromgetDispatchProcessorEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteDispatchProcessorEnablers
boolean canDeleteDispatchProcessorEnablers()Tests if this user can deleteDispatchProcessorEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aDispatchProcessorEnablerwill 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:
falseifDispatchProcessorEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteDispatchProcessorEnabler
void deleteDispatchProcessorEnabler(Id dispatchProcessorEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aDispatchProcessorEnabler.- Parameters:
dispatchProcessorEnablerId- theIdof theDispatchProcessorEnablerto remove- Throws:
NotFoundException-dispatchProcessorEnablerIdnot foundNullArgumentException-dispatchProcessorEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageDispatchProcessorEnablerAliases
boolean canManageDispatchProcessorEnablerAliases()Tests if this user can manageIdaliases forDispatchProcessorEnablersA 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:
falseifDispatchProcessorEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasDispatchProcessorEnabler
void aliasDispatchProcessorEnabler(Id dispatchProcessorEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aDispatchProcessorEnablerfor the purpose of creating compatibility. The primaryIdof theDispatchProcessorEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another dispatch processor enabler, it is reassigned to the given dispatch processor enablerId.- Parameters:
dispatchProcessorEnablerId- theIdof aDispatchProcessorEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-dispatchProcessorEnablerIdnot foundNullArgumentException-dispatchProcessorEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-