public interface SubscriptionEnablerAdminSession extends OsidSession
This session creates and removes subscription enablers. The data for
create and update is provided via the SubscriptionEnablerForm.
Modifier and Type | Method and Description |
---|---|
void |
aliasSubscriptionEnabler(Id subscriptionEnablerId,
Id aliasId)
Adds an
Id to a SubscriptionEnabler for
the purpose of creating compatibility. |
boolean |
canCreateSubscriptionEnabler()
Tests if this user can create subscription enablers.
|
boolean |
canCreateSubscriptionEnablerWithRecordTypes(Type[] subscriptionEnablerRecordTypes)
Tests if this user can create a single
SubscriptionEnabler
using the desired record types. |
boolean |
canDeleteSubscriptionEnablers()
Tests if this user can delete subscription enablers.
|
boolean |
canManageSubscriptionEnablerAliases()
Tests if this user can manage
Id aliases for
subscription enablers. |
boolean |
canUpdateSubscriptionEnablers()
Tests if this user can update subscription enablers.
|
SubscriptionEnabler |
createSubscriptionEnabler(SubscriptionEnablerForm subscriptionEnablerForm)
Creates a new
SubscriptionEnabler. |
void |
deleteSubscriptionEnabler(Id subscriptionEnablerId)
Deletes a
SubscriptionEnabler. |
Publisher |
getPublisher()
Gets the
Publisher associated with this session. |
Id |
getPublisherId()
Gets the
Publisher Id associated with
this session. |
SubscriptionEnablerForm |
getSubscriptionEnablerFormForCreate(Type[] subscriptionEnablerRecordTypes)
Gets the subscription enabler form for creating new subscription
enablers.
|
SubscriptionEnablerForm |
getSubscriptionEnablerFormForUpdate(Id subscriptionEnablerId)
Gets the subscription enabler form for updating an existing
subscription enabler.
|
void |
updateSubscriptionEnabler(SubscriptionEnablerForm subscriptionEnablerForm)
Updates an existing subscription enabler.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getPublisherId()
Publisher
Id
associated with
this session. Publisher Id
associated with this sessionmandatory
- This method must be implemented. Publisher getPublisher() throws OperationFailedException, PermissionDeniedException
Publisher
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateSubscriptionEnabler()
SubscriptionEnabler
will result in a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer create
operations to an unauthorized user. false
if SubscriptionEnabler
creation is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateSubscriptionEnablerWithRecordTypes(Type[] subscriptionEnablerRecordTypes)
SubscriptionEnabler
using the desired record types. While
SubscriptionRulesManager.getSubscriptionEnablerRecordTypes()
can be used to examine which records are supported, this method tests
which record(s) are required for creating a specific
SubscriptionEnabler.
Providing an empty array tests if a
SubscriptionEnabler
can be created with no records.subscriptionEnablerRecordTypes
- array of subscription enabler
record types true
if SubscriptionEnabler
creation using the specified record Types
is
supported, false
otherwiseNullArgumentException
-
subscriptionEnablerRecordTypes
is null
mandatory
- This method must be implemented. SubscriptionEnablerForm getSubscriptionEnablerFormForCreate(Type[] subscriptionEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
subscriptionEnablerRecordTypes
- array of subscription enabler
record typesNullArgumentException
-
subscriptionEnablerRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. SubscriptionEnabler createSubscriptionEnabler(SubscriptionEnablerForm subscriptionEnablerForm) throws OperationFailedException, PermissionDeniedException
SubscriptionEnabler.
subscriptionEnablerForm
- the form for this
SubscriptionEnabler
SubscriptionEnabler
IllegalStateException
- subscriptionEnablerForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- subscriptionEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- subscriptionEnablerForm
did not originate from
getSubscriptionEnablerFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateSubscriptionEnablers()
SubscriptionEnabler
will result in a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer update
operations to an unauthorized user. false
if SubscriptionEnabler
modification is not authorized, true
otherwisemandatory
- This method must be implemented. SubscriptionEnablerForm getSubscriptionEnablerFormForUpdate(Id subscriptionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
subscriptionEnablerId
- the Id
of the
SubscriptionEnabler
NotFoundException
- subscriptionEnablerId
is not foundNullArgumentException
- subscriptionEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateSubscriptionEnabler(SubscriptionEnablerForm subscriptionEnablerForm) throws OperationFailedException, PermissionDeniedException
subscriptionEnablerForm
- the form containing the elements to be
updatedIllegalStateException
- subscriptionEnablerForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- subscriptionEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- subscriptionEnablerForm
did not originate from
getSubscriptionEnablerFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteSubscriptionEnablers()
SubscriptionEnabler
will result in a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer delete
operations to an unauthorized user. false
if SubscriptionEnabler
deletion is not authorized, true
otherwisemandatory
- This method must be implemented. void deleteSubscriptionEnabler(Id subscriptionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
SubscriptionEnabler.
subscriptionEnablerId
- the Id
of the
SubscriptionEnabler
to removeNotFoundException
- subscriptionEnablerId
not foundNullArgumentException
- subscriptionEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageSubscriptionEnablerAliases()
Id
aliases for
subscription 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 a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer alias
operations to an unauthorized user. false
if SubscriptionEnabler
aliasing is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasSubscriptionEnabler(Id subscriptionEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a SubscriptionEnabler
for
the purpose of creating compatibility. The primary Id
of the SubscriptionEnabler
is determined by the
provider. The new Id
performs as an alias to the
primary Id
. If the alias is a pointer to another
subscription enabler. it is reassigned to the given subscription
enabler Id.
subscriptionEnablerId
- the Id
of a
SubscriptionEnabler
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- subscriptionEnablerId
not foundNullArgumentException
- subscriptionEnablerId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.