Interface DispatchConstrainerEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes
DispatchConstrainerEnablers . 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
DispatchConstrainerEnabler , a DispatchConstrainerEnablerForm is
requested using getDispatchConstrainerEnablerFormForCreate()
specifying the desired record Types or none if no record
Types are needed. The returned DispatchConstrainerEnablerForm
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
DispatchConstrainerEnablerForm is submiited to a create operation,
it cannot be reused with another create operation unless the first
operation was unsuccessful. Each DispatchConstrainerEnablerForm
corresponds to an attempted transaction.
For updates, DispatchConstrainerEnablerForms are requested to
the DispatchConstrainerEnabler Id that is to be updated
using getDispatchConstrainerEnablerFormForUpdate() . Similarly,
the DispatchConstrainerEnablerForm has metadata about the data
that can be updated and it can perform validation before submitting the
update. The DispatchConstrainerEnablerForm can only be used once
for a successful update and cannot be reused.
The delete operations delete DispatchConstrainerEnablers . To
unmap a DispatchConstrainerEnabler from the current
Publisher , the
DispatchConstrainerEnablerPublisherAssignmentSession should be used.
These delete operations attempt to remove the
DispatchConstrainerEnabler 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 TypeMethodDescriptionvoidaliasDispatchConstrainerEnabler(Id dispatchConstrainerEnablerId, Id aliasId) Adds anIdto aDispatchConstrainerEnablerfor the purpose of creating compatibility.booleanTests if this user can createDispatchConstrainerEnablers.booleancanCreateDispatchConstrainerEnablerWithRecordTypes(Type[] dispatchConstrainerEnablerRecordTypes) Tests if this user can create a singleDispatchConstrainerEnablerusing the desired record types.booleanTests if this user can deleteDispatchConstrainerEnablers.booleanTests if this user can manageIdaliases forDispatchConstrainerEnablersA return of true does not guarantee successful authorization.booleanTests if this user can updateDispatchConstrainerEnablers.createDispatchConstrainerEnabler(DispatchConstrainerEnablerForm dispatchConstrainerEnablerForm) Creates a newDispatchConstrainerEnabler.voiddeleteDispatchConstrainerEnabler(Id dispatchConstrainerEnablerId) Deletes aDispatchConstrainerEnabler.getDispatchConstrainerEnablerFormForCreate(Type[] dispatchConstrainerEnablerRecordTypes) Gets the dispatch constrainer enabler form for creating new dispatch constrainer enablers.getDispatchConstrainerEnablerFormForUpdate(Id dispatchConstrainerEnablerId) Gets the dispatch constrainer enabler form for updating an existing dispatch constrainer enabler.Gets thePublisherassociated with this session.Gets thePublisherIdassociated with this session.voidupdateDispatchConstrainerEnabler(DispatchConstrainerEnablerForm dispatchConstrainerEnablerForm) Updates an existing dispatch constrainer 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.
-
canCreateDispatchConstrainerEnablers
boolean canCreateDispatchConstrainerEnablers()Tests if this user can createDispatchConstrainerEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aDispatchConstrainerEnablerwill 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:
falseifDispatchConstrainerEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateDispatchConstrainerEnablerWithRecordTypes
boolean canCreateDispatchConstrainerEnablerWithRecordTypes(Type[] dispatchConstrainerEnablerRecordTypes) Tests if this user can create a singleDispatchConstrainerEnablerusing the desired record types. WhileSubscriptionRulesManager.getDispatchConstrainerEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificDispatchConstrainerEnabler. Providing an empty array tests if aDispatchConstrainerEnabler can becreated with no records.- Parameters:
dispatchConstrainerEnablerRecordTypes- array of dispatch constrainer enabler record types- Returns:
trueifDispatchConstrainerEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-dispatchConstrainerEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getDispatchConstrainerEnablerFormForCreate
DispatchConstrainerEnablerForm getDispatchConstrainerEnablerFormForCreate(Type[] dispatchConstrainerEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the dispatch constrainer enabler form for creating new dispatch constrainer enablers. A new form should be requested for each create transaction.- Parameters:
dispatchConstrainerEnablerRecordTypes- array of dispatch constrainer enabler record types- Returns:
- the dispatch constrainer enabler form
- Throws:
NullArgumentException-dispatchConstrainerEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createDispatchConstrainerEnabler
DispatchConstrainerEnabler createDispatchConstrainerEnabler(DispatchConstrainerEnablerForm dispatchConstrainerEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newDispatchConstrainerEnabler.- Parameters:
dispatchConstrainerEnablerForm- the form for thisDispatchConstrainerEnabler- Returns:
- the new
DispatchConstrainerEnabler - Throws:
IllegalStateException-dispatchConstrainerEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-dispatchConstrainerEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-dispatchConstrainerEnablerFormdid not originate fromgetDispatchConstrainerEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateDispatchConstrainerEnablers
boolean canUpdateDispatchConstrainerEnablers()Tests if this user can updateDispatchConstrainerEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aDispatchConstrainerEnablerwill 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:
falseifDispatchConstrainerEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getDispatchConstrainerEnablerFormForUpdate
DispatchConstrainerEnablerForm getDispatchConstrainerEnablerFormForUpdate(Id dispatchConstrainerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the dispatch constrainer enabler form for updating an existing dispatch constrainer enabler. A new dispatch constrainer enabler form should be requested for each update transaction.- Parameters:
dispatchConstrainerEnablerId- theIdof theDispatchConstrainerEnabler- Returns:
- the dispatch constrainer enabler form
- Throws:
NotFoundException-dispatchConstrainerEnablerIdis not foundNullArgumentException-dispatchConstrainerEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateDispatchConstrainerEnabler
void updateDispatchConstrainerEnabler(DispatchConstrainerEnablerForm dispatchConstrainerEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing dispatch constrainer enabler.- Parameters:
dispatchConstrainerEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-dispatchConstrainerEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-dispatchConstrainerEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-dispatchConstrainerEnablerFormdid not originate fromgetDispatchConstrainerEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteDispatchConstrainerEnablers
boolean canDeleteDispatchConstrainerEnablers()Tests if this user can deleteDispatchConstrainerEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aDispatchConstrainerEnablerwill 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:
falseifDispatchConstrainerEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteDispatchConstrainerEnabler
void deleteDispatchConstrainerEnabler(Id dispatchConstrainerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aDispatchConstrainerEnabler.- Parameters:
dispatchConstrainerEnablerId- theIdof theDispatchConstrainerEnablerto remove- Throws:
NotFoundException-dispatchConstrainerEnablerIdnot foundNullArgumentException-dispatchConstrainerEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageDispatchConstrainerEnablerAliases
boolean canManageDispatchConstrainerEnablerAliases()Tests if this user can manageIdaliases forDispatchConstrainerEnablersA 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:
falseifDispatchConstrainerEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasDispatchConstrainerEnabler
void aliasDispatchConstrainerEnabler(Id dispatchConstrainerEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aDispatchConstrainerEnablerfor the purpose of creating compatibility. The primaryIdof theDispatchConstrainerEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another dispatch constrainer enabler, it is reassigned to the given dispatch constrainer enablerId.- Parameters:
dispatchConstrainerEnablerId- theIdof aDispatchConstrainerEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-dispatchConstrainerEnablerIdnot foundNullArgumentException-dispatchConstrainerEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-