public class ContentServiceImpl extends Object implements ContentService, org.springframework.context.ApplicationContextAware
Note: This class was formerly the RoutingContentService but the
'routing' functionality has been pushed into the store
implementations.
| Modifier and Type | Field and Description |
|---|---|
protected TransformerDebug |
transformerDebug
Deprecated.
|
| Constructor and Description |
|---|
ContentServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
List<ContentTransformer> |
getActiveTransformers(String sourceMimetype,
long sourceSize,
String targetMimetype,
TransformationOptions options)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
List<ContentTransformer> |
getActiveTransformers(String sourceMimetype,
String targetMimetype,
TransformationOptions options)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
ContentTransformer |
getImageTransformer()
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
long |
getMaxSourceSizeBytes(String sourceMimetype,
String targetMimetype,
TransformationOptions options)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
org.alfresco.service.cmr.repository.ContentReader |
getRawReader(String contentUrl)
Fetch content from the low-level stores using a content URL.
|
org.alfresco.service.cmr.repository.ContentReader |
getReader(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName propertyQName)
Gets a reader for the content associated with the given node property.
|
long |
getStoreFreeSpace()
Gets the remaing available space in the underlying content store.
|
long |
getStoreTotalSpace()
Gets the total space of the underlying content store (not exclusively Alfresco-controlled binaries).
|
org.alfresco.service.cmr.repository.ContentWriter |
getTempWriter()
Gets a writer to a temporary location.
|
ContentTransformer |
getTransformer(String sourceMimetype,
String targetMimetype)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
ContentTransformer |
getTransformer(String sourceUrl,
String sourceMimetype,
long sourceSize,
String targetMimetype,
TransformationOptions options)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
ContentTransformer |
getTransformer(String sourceMimetype,
String targetMimetype,
TransformationOptions options)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
List<ContentTransformer> |
getTransformers(String sourceUrl,
String sourceMimetype,
long sourceSize,
String targetMimetype,
TransformationOptions options)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
org.alfresco.service.cmr.repository.ContentWriter |
getWriter(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName propertyQName,
boolean update)
Get a content writer for the given node property, choosing to optionally have
the node property updated automatically when the content stream closes.
|
void |
init()
Service initialise
|
boolean |
isTransformable(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
boolean |
isTransformable(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
void |
onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Map<org.alfresco.service.namespace.QName,Serializable> before,
Map<org.alfresco.service.namespace.QName,Serializable> after)
Update properties policy behaviour
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setEagerContentStoreCleaner(EagerContentStoreCleaner eagerContentStoreCleaner) |
void |
setIgnoreEmptyContent(boolean ignoreEmptyContent) |
void |
setImageMagickContentTransformer(ContentTransformer imageMagickContentTransformer)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
void |
setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setRetryingTransactionHelper(RetryingTransactionHelper helper) |
void |
setStore(org.alfresco.repo.content.ContentStore store) |
void |
setTransformerDebug(TransformerDebug transformerDebug)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
void |
setTransformerFailover(boolean transformerFailover)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the
new async RenditionService2 or other external libraries.
|
void |
setTransformerRegistry(ContentTransformerRegistry transformerRegistry)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
void |
transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
void |
transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
Map<String,Object> options)
Deprecated.
|
void |
transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options)
Deprecated.
The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
@Deprecated protected TransformerDebug transformerDebug
public void setRetryingTransactionHelper(RetryingTransactionHelper helper)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
@Deprecated public void setTransformerRegistry(ContentTransformerRegistry transformerRegistry)
public void setEagerContentStoreCleaner(EagerContentStoreCleaner eagerContentStoreCleaner)
public void setStore(org.alfresco.repo.content.ContentStore store)
public void setPolicyComponent(PolicyComponent policyComponent)
@Deprecated public void setImageMagickContentTransformer(ContentTransformer imageMagickContentTransformer)
public void setIgnoreEmptyContent(boolean ignoreEmptyContent)
@Deprecated public void setTransformerFailover(boolean transformerFailover)
transformerFailover - true (the default) indicate
that fail over should take place.public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansException@Deprecated public void setTransformerDebug(TransformerDebug transformerDebug)
transformerDebug - TransformerDebugpublic void init()
public void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Map<org.alfresco.service.namespace.QName,Serializable> before,
Map<org.alfresco.service.namespace.QName,Serializable> after)
nodeRef - the node referencebefore - the before values of the propertiesafter - the after values of the propertiespublic long getStoreFreeSpace()
ContentServicegetStoreFreeSpace in interface ContentServicepublic long getStoreTotalSpace()
ContentServicegetStoreTotalSpace in interface ContentServicepublic org.alfresco.service.cmr.repository.ContentReader getRawReader(String contentUrl)
null is never returned, but the reader should always be checked for
existence.
getRawReader in interface ContentServicecontentUrl - a content store URLpublic org.alfresco.service.cmr.repository.ContentReader getReader(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName propertyQName)
ContentService
If a content URL is present for the given node then a reader must
be returned. The exists method should then
be used to detect 'missing' content.
getReader in interface ContentServicenodeRef - a reference to a node having a content propertypropertyQName - the name of the property, which must be of type contentFileContentReader.getSafeContentReader(ContentReader, String, Object[])public org.alfresco.service.cmr.repository.ContentWriter getWriter(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName propertyQName,
boolean update)
ContentServiceIf the update flag is off, then the state of the node property will remain unchanged regardless of the state of the written binary data. If the flag is on, then the node property will be updated on the same thread as the code that closed the write channel.
If no node is supplied, then the writer will provide a stream into the backing content store, but will not be associated with any new or previous content.
NOTE: The content URL provided will be registered for automatic cleanup in the event that the transaction, in which this method was called, rolls back. If the transaction is successful, the writer may still be open and available for use but the underlying binary will not be cleaned up subsequently. The recommended pattern is to group calls to retrieve the writer in the same transaction as the calls to subsequently update and close the write stream - including setting of the related content properties.getWriter in interface ContentServicenodeRef - a reference to a node having a content property, or null
to just get a valid writer into a backing content store.propertyQName - the name of the property, which must be of type contentupdate - true if the property must be updated atomically when the content write
stream is closed (attaches a listener to the stream); false if the client code
will perform the updates itself.public org.alfresco.service.cmr.repository.ContentWriter getTempWriter()
ContentServicegetTempWriter in interface ContentService@Deprecated public void transform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer)
ContentService
The mimetypes used for the transformation must be set both on
the reader and on the
writer.
transform in interface ContentServicereader - the source content location and mimetypewriter - the target content location and mimetypeContentTransformerRegistry,
ContentTransformer,
ContentService.transform(org.alfresco.service.cmr.repository.ContentReader, org.alfresco.service.cmr.repository.ContentWriter)@Deprecated public void transform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, Map<String,Object> options) throws NoTransformerException, org.alfresco.service.cmr.repository.ContentIOException
transform in interface ContentServicereader - the source content location and mimetypewriter - the target content location and mimetypeoptions - the options for the transformationNoTransformerException - if no transformer exists for the
given source and target mimetypes of the reader and writerContentIOException - if the transformation failsContentTransformerRegistry,
ContentTransformer@Deprecated public void transform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, TransformationOptions options) throws NoTransformerException, org.alfresco.service.cmr.repository.ContentIOException
transform in interface ContentServicereader - the source content location and mimetypewriter - the target content location and mimetypeoptions - the options for the transformationNoTransformerException - if no transformer exists for the
given source and target mimetypes of the reader and writerContentIOException - if the transformation failsContentTransformerRegistry,
ContentTransformer@Deprecated public ContentTransformer getTransformer(String sourceMimetype, String targetMimetype)
ContentServiceSince no transformation options are provided only the source and destination mimetypes are considered when getting the correct transformer.
getTransformer in interface ContentServicesourceMimetype - the source mimetypetargetMimetype - the target mimetypeContentTransformerRegistry,
ContentTransformer@Deprecated public ContentTransformer getTransformer(String sourceMimetype, String targetMimetype, TransformationOptions options)
getTransformer in interface ContentService@Deprecated public ContentTransformer getTransformer(String sourceUrl, String sourceMimetype, long sourceSize, String targetMimetype, TransformationOptions options)
ContentServicegetTransformer in interface ContentServicesourceUrl - TODOsourceMimetype - the source mimetypesourceSize - the source size (bytes). Ignored if negative.targetMimetype - the target mimetypeoptions - the transformation optionsContentService.getTransformer(String, java.lang.String, long, java.lang.String, org.alfresco.service.cmr.repository.TransformationOptions)@Deprecated public List<ContentTransformer> getTransformers(String sourceUrl, String sourceMimetype, long sourceSize, String targetMimetype, TransformationOptions options)
ContentServicegetTransformers in interface ContentServicesourceUrl - TODOsourceMimetype - the source mimetypesourceSize - the source size (bytes). Ignored if negative.targetMimetype - the target mimetypeoptions - the transformation optionsContentService.getTransformers(String, java.lang.String, long, java.lang.String, org.alfresco.service.cmr.repository.TransformationOptions)@Deprecated public long getMaxSourceSizeBytes(String sourceMimetype, String targetMimetype, TransformationOptions options)
getMaxSourceSizeBytes in interface ContentServicesourceMimetype - source mime typetargetMimetype - target mime typeoptions - transformation options@Deprecated public List<ContentTransformer> getActiveTransformers(String sourceMimetype, String targetMimetype, TransformationOptions options)
getActiveTransformers in interface ContentService@Deprecated public List<ContentTransformer> getActiveTransformers(String sourceMimetype, long sourceSize, String targetMimetype, TransformationOptions options)
getActiveTransformers in interface ContentService@Deprecated public ContentTransformer getImageTransformer()
ContentServicegetImageTransformer in interface ContentServiceContentService.getImageTransformer()@Deprecated public boolean isTransformable(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer)
isTransformable in interface ContentServiceContentTransformerRegistry,
ContentTransformer@Deprecated public boolean isTransformable(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, TransformationOptions options)
ContentService
If you are about to call ContentService.transform(ContentReader, ContentWriter, TransformationOptions)
it is best NOT to call this method first as it must perform the same steps and will throw
NoTransformerException if there are no transformers.
The mimetypes used for the transformation must be set both on
the reader and on the
writer.
isTransformable in interface ContentServicereader - the source content location and mimetypewriter - the target content location and mimetypeoptions - the transformation optionsContentService.isTransformable(org.alfresco.service.cmr.repository.ContentReader, org.alfresco.service.cmr.repository.ContentWriter, org.alfresco.service.cmr.repository.TransformationOptions)Copyright © 2005–2018 Alfresco Software. All rights reserved.