Class PermanentChannelContentManager

All Implemented Interfaces:
IChannelContentManager, IContentManager, IMovingContentManager

public class PermanentChannelContentManager extends PermanentContentManager implements IChannelContentManager
  • Constructor Details

    • PermanentChannelContentManager

      public PermanentChannelContentManager(IContentManager delegate, String connectionName)
  • Method Details

    • create

      public GUID create(ReadableByteChannel readableByteChannel, String name, String contentType, Long processId, String caseId, CustomContentProperties properties, IUserData user, String... roles)
      Description copied from interface: IChannelContentManager
      Add new content to the repository.
      Specified by:
      create in interface IChannelContentManager
      Parameters:
      readableByteChannel - The channel representing connection to the data, may not be null.
      name - A name for the content, may not be null.
      contentType - The content type of the data, may be null if unknown.
      processId - The id of the process where this content is part of, may be null.
      caseId - The id of the case where this content is part of, may be null.
      properties - Custom properties that should be stored with the content, may not be null.
      user - The user who is considered the creator of the content, may not be null.
      roles - The list of authorized roles associated to this content, may not be null.
      Returns:
      Returns a GUID that uniquely identifies the content, never null.
    • update

      public void update(GUID id, ReadableByteChannel readableByteChannel, String name, String contentType, Long processId, String caseId, CustomContentProperties properties, IUserData user)
      Description copied from interface: IChannelContentManager
      Update existing content with new data and metadata.
      Specified by:
      update in interface IChannelContentManager
      Parameters:
      id - The id of the content which should be updated, may not be null.
      readableByteChannel - The channel representing connection to the data, may not be null.
      name - A name for the content, may not be null.
      contentType - The content type of the new data, may be null.
      processId - The id of the case where this content is part of, may be null.
      caseId - The id of the case where this content is part of, may be null.
      properties - The new set of properties, this will completely overwrite the existing properties, may not be null.
      user - The user that is updating the content, may not be null.
    • update

      public void update(GUID id, ReadableByteChannel readableByteChannel, String name, String contentType, IUserData user)
      Description copied from interface: IChannelContentManager
      Update existing content with new data, but keep the existing metadata.
      Specified by:
      update in interface IChannelContentManager
      Parameters:
      id - The id of the content which should be updated, may not be null.
      readableByteChannel - The channel representing connection to the data, may not be null.
      name - A name for the content, may not be null.
      contentType - The content type of the new data, may be null.
      user - The user that is updating the content, may not be null.
    • getReadableByteChannel

      public ReadableByteChannel getReadableByteChannel(GUID id, IUserData user)
      Description copied from interface: IChannelContentManager
      Exposes a Channel for the Content of id. The caller of this method is responsible for closing the returned channel. If not closed it will acquire a shared (READ) FileLock in case of the FileSystemContentManager. If the user is not authorized it will throw an exception.
      Specified by:
      getReadableByteChannel in interface IChannelContentManager
      Parameters:
      id - The id of the content where a channel for is needed, may not be null.
      user - The user that is reading the content, may not be null.
      Returns:
      The total number of bytes read into the buffer, or -1 if there is no more data because the end of the content has been reached.