public interface PublisherAdminSession extends OsidSession
This session creates and removes publishers. The data for create and update is provided by the consumer via the form object.
Modifier and Type | Method and Description |
---|---|
void |
aliasPublisher(Id publisherId,
Id aliasId)
Adds an
Id to a Publisher for the
purpose of creating compatibility. |
boolean |
canCreatePublishers()
Tests if this user can create
Publishers. |
boolean |
canCreatePublisherWithRecordTypes(Type[] publisherRecordTypes)
Tests if this user can create a single
Publisher using
the desired record interface types. |
boolean |
canDeletePublishers()
Tests if this user can delete
Publishers A return of
true does not guarantee successful authorization. |
boolean |
canManagePublisherAliases()
Tests if this user can manage
Id aliases for
Publishers. |
boolean |
canUpdatePublishers()
Tests if this user can update
Publishers. |
Publisher |
createPublisher(PublisherForm publisherForm)
Creates a new
Publisher. |
void |
deletePublisher(Id publisherId)
Deletes a
Publisher. |
PublisherForm |
getPublisherFormForCreate(Type[] publisherRecordTypes)
Gets the publisher form for creating new publishers.
|
PublisherForm |
getPublisherFormForUpdate(Id publisherId)
Gets the publisher form for updating an existing publisher.
|
void |
updatePublisher(PublisherForm publisherForm)
Updates an existing publisher.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canCreatePublishers()
Publishers.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known creating a Publisher
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may not wish to offer create operations to
unauthorized users. false
if Publisher
creation is
not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreatePublisherWithRecordTypes(Type[] publisherRecordTypes)
Publisher
using
the desired record interface types. While
SubscriptionManager.getPublisherRecordTypes()
can be used to
examine which record interfaces are supported, this method tests which
record(s) are required for creating a specific Publisher.
Providing an empty array tests if a Publisher
can be created with no records.publisherRecordTypes
- array of publisher record types true
if Publisher
creation using
the specified record Types
is supported,
false
otherwiseNullArgumentException
- publisherRecordTypes
is null
mandatory
- This method must be implemented. PublisherForm getPublisherFormForCreate(Type[] publisherRecordTypes) throws OperationFailedException, PermissionDeniedException
publisherRecordTypes
- array of publisher record typesNullArgumentException
- publisherRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get foem for requested
record typesmandatory
- This method must be implemented. Publisher createPublisher(PublisherForm publisherForm) throws OperationFailedException, PermissionDeniedException
Publisher.
publisherForm
- the form for this Publisher
Publisher
IllegalStateException
- publisherForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- publisherForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- publisherForm
did
not originate from getPublisherFormForCreate()
mandatory
- This method must be implemented. boolean canUpdatePublishers()
Publishers.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known updating a Publisher
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may not wish to offer update operations to
unauthorized users. false
if Publisher
modification
is not authorized, true
otherwisemandatory
- This method must be implemented. PublisherForm getPublisherFormForUpdate(Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
publisherId
- the Id
of the Publisher
NotFoundException
- publisherId
is not
foundNullArgumentException
- publisherId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updatePublisher(PublisherForm publisherForm) throws OperationFailedException, PermissionDeniedException
publisherForm
- the form containing the elements to be updatedIllegalStateException
- publisherForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- publisherForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- publisherForm
did
not originate from getPublisherFormForUpdate()
mandatory
- This method must be implemented. boolean canDeletePublishers()
Publishers
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known deleting a Publisher
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may not wish to offer delete operations to
unauthorized users. false
if Publisher
deletion is
not authorized, true
otherwisemandatory
- This method must be implemented. void deletePublisher(Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Publisher.
publisherId
- the Id
of the Publisher
to removeNotFoundException
- publisherId
not
foundNullArgumentException
- publisherId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManagePublisherAliases()
Id
aliases for
Publishers.
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 Publisher
aliasing is
not authorized, true
otherwisemandatory
- This method must be implemented. void aliasPublisher(Id publisherId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a Publisher
for the
purpose of creating compatibility. The primary Id
of
the Publisher
is determined by the provider. The new
Id
performs as an alias to the primary Id.
If the alias is a pointer to another publisher, it is
reassigned to the given publisher Id.
publisherId
- the Id
of a Publisher
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- publisherId
not
foundNullArgumentException
- publisherId
or
aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.