Interface EntryBlogAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

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 ).

  • Method Details

    • canAssignEntries

      boolean canAssignEntries()
      Tests if this user can alter entry/blog mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignEntriesToBlog

      boolean canAssignEntriesToBlog(Id blogId)
      Tests if this user can alter entry/blog mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Parameters:
      blogId - the Id of the Blog
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - blogId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableBlogIds

      IdList getAssignableBlogIds(Id blogId) throws OperationFailedException
      Gets a list of blogs including and under the given blogs node in which any entry can be assigned.
      Parameters:
      blogId - the Id of the Blog
      Returns:
      list of assignable blog Ids
      Throws:
      NullArgumentException - blogId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableBlogIdsForEntry

      IdList getAssignableBlogIdsForEntry(Id blogId, Id entryId) throws OperationFailedException
      Gets a list of blogs including and under the given blog node in which a specific entry can be assigned.
      Parameters:
      blogId - the Id of the Blog
      entryId - the Id of the Entry
      Returns:
      list of assignable blog Ids
      Throws:
      NullArgumentException - blogId or entryId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignEntryToBlog

      Adds an existing Entry to a Blog .
      Parameters:
      entryId - the Id of the Entry
      blogId - the Id of the Blog
      Throws:
      AlreadyExistsException - entryId is already assigned to blogId
      NotFoundException - entryId or blogId not found
      NullArgumentException - entryId or blogId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignEntryFromBlog

      void unassignEntryFromBlog(Id entryId, Id blogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes an Entry from a Blog .
      Parameters:
      entryId - the Id of the Entry
      blogId - the Id of the Blog
      Throws:
      NotFoundException - entryId or blogId not found or entryId not assigned to blogId
      NullArgumentException - entryId or blogId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignEntryToBlog

      void reassignEntryToBlog(Id entryId, Id fromBlogId, Id toBlogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves an Entry from one Blog to another. Mappings to other Blogs are unaffected.
      Parameters:
      entryId - the Id of the Entry
      fromBlogId - the Id of the current Blog
      toBlogId - the Id of the destination Blog
      Throws:
      AlreadyExistsException - entryId already assigned to toBlogId
      NotFoundException - entryId, fromBlogId , or toBlogId not found or entryId not mapped to fromBlogId
      NullArgumentException - entryId, fromBlogId , or toBlogId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.