public interface EntryBlogAssignmentSession extends OsidSession
This session provides methods to re-assign Entries
to
Blogs.
An Entry
may map to multiple
Blog
objects and removing the last reference to an Entry
is the equivalent of deleting it. Each Blog
may
have its own authorizations governing who is allowed to operate on it.
Moving or adding a reference of a Entry
to another
Blog
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignEntryToBlog(Id entryId,
Id blogId)
Adds an existing
Entry to a Blog. |
boolean |
canAssignEntries()
Tests if this user can alter entry/blog mappings.
|
boolean |
canAssignEntriesToBlog(Id blogId)
Tests if this user can alter entry/blog mappings.
|
IdList |
getAssignableBlogIds(Id blogId)
Gets a list of blogs including and under the given blogs node in which
any entry can be assigned.
|
IdList |
getAssignableBlogIdsForEntry(Id blogId,
Id entryId)
Gets a list of blogs including and under the given blog node in which
a specific entry can be assigned.
|
void |
reassignEntryToBlog(Id entryId,
Id fromBlogId,
Id toBlogId)
Moves an
Entry from one Blog to another. |
void |
unassignEntryFromBlog(Id entryId,
Id blogId)
Removes an
Entry from a Blog. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignEntries()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignEntriesToBlog(Id blogId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.blogId
- the Id
of the Blog
false
if mapping is not authorized, true
otherwiseNullArgumentException
- blogId
is
null
mandatory
- This method must be implemented. IdList getAssignableBlogIds(Id blogId) throws OperationFailedException
blogId
- the Id
of the Blog
Ids
NullArgumentException
- blogId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableBlogIdsForEntry(Id blogId, Id entryId) throws OperationFailedException
blogId
- the Id
of the Blog
entryId
- the Id
of the Entry
Ids
NullArgumentException
- blogId
or
entryId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignEntryToBlog(Id entryId, Id blogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Entry
to a Blog.
entryId
- the Id
of the Entry
blogId
- the Id
of the Blog
AlreadyExistsException
- entryId
is
already assigned to blogId
NotFoundException
- entryId
or
blogId
not foundNullArgumentException
- entryId
or
blogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignEntryFromBlog(Id entryId, Id blogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Entry
from a Blog.
entryId
- the Id
of the Entry
blogId
- the Id
of the Blog
NotFoundException
- entryId
or
blogId
not found or entryId
not
assigned to blogId
NullArgumentException
- entryId
or
blogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignEntryToBlog(Id entryId, Id fromBlogId, Id toBlogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Entry
from one Blog
to another.
Mappings to other Blogs
are unaffected.entryId
- the Id
of the Entry
fromBlogId
- the Id
of the current Blog
toBlogId
- the Id
of the destination Blog
NotFoundException
- entryId, fromBlogId,
or toBlogId
not found or entryId
not mapped to fromBlogId
NullArgumentException
- entryId, fromBlogId,
or toBlogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.