Class DisposableContentManager
java.lang.Object
com.aquima.interactions.portal.content.ContentManagerDelegate
com.aquima.interactions.portal.content.DisposableContentManager
- All Implemented Interfaces:
IContentManager
A content manager which will place a DisposableContent on the
IPortalScope
.- Since:
- 9.3
- Author:
- m.mahabiersing
-
Constructor Summary
ConstructorsConstructorDescriptionDisposableContentManager
(IContentManager delegate, String connectionName, IPortalScope scope) DisposableContentManager
(IContentManager delegate, String connectionName, IPortalScope scope, String key) -
Method Summary
Modifier and TypeMethodDescriptioncreate
(InputStream stream, String name, String contentType, Long caseId, CustomContentProperties properties, IUserData user, String[] roles) Add new content to the repository.void
Delete content from the repositoryThis method returns the content manager's disposable content.boolean
This method checks if the current content manager has anyIDisposableContent
contents.Methods inherited from class com.aquima.interactions.portal.content.ContentManagerDelegate
getDelegate, isAuthorized, readBytes, readMetadata, readRoles, update, update, update, update
-
Constructor Details
-
DisposableContentManager
public DisposableContentManager(IContentManager delegate, String connectionName, IPortalScope scope) -
DisposableContentManager
public DisposableContentManager(IContentManager delegate, String connectionName, IPortalScope scope, String key)
-
-
Method Details
-
create
public GUID create(InputStream stream, String name, String contentType, Long caseId, CustomContentProperties properties, IUserData user, String[] roles) throws CreateContentException Description copied from interface:IContentManager
Add new content to the repository.- Specified by:
create
in interfaceIContentManager
- Overrides:
create
in classContentManagerDelegate
- Parameters:
stream
- The stream containing the data, may not benull
.name
- A name for the content, may not benull
.contentType
- The content type of the data, may benull
ifunknown
.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
. - Throws:
CreateContentException
- If creation failed for any reason.
-
delete
public void delete(GUID id, IUserData user, boolean checkRoles) throws DeleteContentException, ContentAuthorizationException Description copied from interface:IContentManager
Delete content from the repository- Specified by:
delete
in interfaceIContentManager
- Overrides:
delete
in classContentManagerDelegate
- Parameters:
id
- The id of the content which should be deleted, may not benull
.user
- The user that is deleting the content, may not benull
.checkRoles
- Flag indicating if the roles check should be done or not.- Throws:
DeleteContentException
- If the content can not be deleted for any reason.ContentAuthorizationException
- If user is not authorized to access the content.
-
hasDisposableContent
public boolean hasDisposableContent()Description copied from interface:IContentManager
This method checks if the current content manager has anyIDisposableContent
contents.- Specified by:
hasDisposableContent
in interfaceIContentManager
- Overrides:
hasDisposableContent
in classContentManagerDelegate
- Returns:
- A flag indicating whether the content manager has disposable content objects.
-
getDisposableContent
Description copied from interface:IContentManager
This method returns the content manager's disposable content.- Specified by:
getDisposableContent
in interfaceIContentManager
- Overrides:
getDisposableContent
in classContentManagerDelegate
-