Class PermanentChannelContentManager
java.lang.Object
com.aquima.interactions.portal.content.ContentManagerDelegate
com.aquima.interactions.portal.content.PermanentContentManager
com.aquima.interactions.portal.content.PermanentChannelContentManager
- All Implemented Interfaces:
IChannelContentManager
,IContentManager
,IMovingContentManager
public class PermanentChannelContentManager
extends PermanentContentManager
implements IChannelContentManager
-
Field Summary
Fields inherited from class com.aquima.interactions.portal.content.ContentManagerDelegate
delegate
-
Constructor Summary
ConstructorDescriptionPermanentChannelContentManager
(IContentManager delegate, String connectionName) -
Method Summary
Modifier and TypeMethodDescriptioncreate
(ReadableByteChannel readableByteChannel, String name, String contentType, Long processId, String caseId, CustomContentProperties properties, IUserData user, String... roles) Add new content to the repository.getReadableByteChannel
(GUID id, IUserData user) Exposes a Channel for the Content ofid
.void
update
(GUID id, ReadableByteChannel readableByteChannel, String name, String contentType, IUserData user) Update existing content with new data, but keep the existing metadata.void
update
(GUID id, ReadableByteChannel readableByteChannel, String name, String contentType, Long processId, String caseId, CustomContentProperties properties, IUserData user) Update existing content with new data and metadata.Methods inherited from class com.aquima.interactions.portal.content.PermanentContentManager
canMove, create
Methods inherited from class com.aquima.interactions.portal.content.ContentManagerDelegate
delete, getDisposableContent, getImplementation, hasDisposableContent, isAuthorized, move, notifyMove, readBytes, readMetadata, readRoles, update, update, update, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aquima.interactions.portal.IContentManager
create, delete, getDisposableContent, hasDisposableContent, isAuthorized, readBytes, readMetadata, readRoles, update, update, update, update
Methods inherited from interface com.aquima.interactions.portal.IMovingContentManager
canMove, getImplementation, move, notifyMove
-
Constructor Details
-
PermanentChannelContentManager
-
-
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 interfaceIChannelContentManager
- Parameters:
readableByteChannel
- The channel representing connection to the data, may not benull
.name
- A name for the content, may not benull
.contentType
- The content type of the data, may benull
ifunknown
.processId
- The id of the process where this content is part of, may benull
.caseId
- The id of the case where this content is part of, may benull
.properties
- Custom properties that should be stored with the content, may not benull
.user
- The user who is considered the creator of the content, may not benull
.roles
- The list of authorized roles associated to this content, may not benull
.- 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 interfaceIChannelContentManager
- Parameters:
id
- The id of the content which should be updated, may not benull
.readableByteChannel
- The channel representing connection to the data, may not benull
.name
- A name for the content, may not benull
.contentType
- The content type of the new data, may benull
.processId
- The id of the case where this content is part of, may benull
.caseId
- The id of the case where this content is part of, may benull
.properties
- The new set of properties, this will completely overwrite the existing properties, may not benull
.user
- The user that is updating the content, may not benull
.
-
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 interfaceIChannelContentManager
- Parameters:
id
- The id of the content which should be updated, may not benull
.readableByteChannel
- The channel representing connection to the data, may not benull
.name
- A name for the content, may not benull
.contentType
- The content type of the new data, may benull
.user
- The user that is updating the content, may not benull
.
-
getReadableByteChannel
Description copied from interface:IChannelContentManager
Exposes a Channel for the Content ofid
. 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 interfaceIChannelContentManager
- Parameters:
id
- The id of the content where a channel for is needed, may not benull
.user
- The user that is reading the content, may not benull
.- 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.
-