Class PipelineContentImpl
java.lang.Object
org.craftercms.studio.impl.v1.content.pipeline.PipelineContentImpl
- All Implemented Interfaces:
PipelineContent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InputStreamcontent as input streamprotected org.dom4j.Documentcontent as documentprotected Stringcontent encodingprotected Stringcontent idcontent propertiesprotected booleanis this XML content?static final org.slf4j.LoggerFields inherited from interface org.craftercms.studio.api.v1.content.pipeline.PipelineContent
KEY_CONTENT_TYPE, KEY_FILE_NAME, KEY_PATH, KEY_SITE -
Constructor Summary
ConstructorsConstructorDescriptionconstructorPipelineContentImpl(String id, InputStream contentStream, boolean isXml, org.dom4j.Document document, String encoding, Map<String, String> properties) constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String key, String value) add a content propertyvoidclose this contentget this content as input streamorg.dom4j.Documentget this content as XML Documentget the encoding of this contentgetId()get the id of this contentget properties of this contentgetProperty(String key) get a property value given the keyvoidsetContentStream(InputStream contentStream) set content input stream.this will reset document.voidsetDocument(org.dom4j.Document document) set the content document.voidsetEncoding(String encoding) set the encoding of this contentvoidset the id of this contentvoidsetProperties(Map<String, String> properties) set content properties
-
Field Details
-
_id
content id -
_document
protected org.dom4j.Document _documentcontent as document -
_contentStream
content as input stream -
_encoding
content encoding -
_properties
content properties -
_xml
protected boolean _xmlis this XML content? -
logger
public static final org.slf4j.Logger logger
-
-
Constructor Details
-
PipelineContentImpl
public PipelineContentImpl()constructor -
PipelineContentImpl
public PipelineContentImpl(String id, InputStream contentStream, boolean isXml, org.dom4j.Document document, String encoding, Map<String, String> properties) constructor- Parameters:
id-contentStream-isXml-document-encoding-properties-
-
-
Method Details
-
getId
Description copied from interface:PipelineContentget the id of this content- Specified by:
getIdin interfacePipelineContent- Returns:
- id
-
setId
Description copied from interface:PipelineContentset the id of this content- Specified by:
setIdin interfacePipelineContent- Parameters:
id-
-
getContentStream
Description copied from interface:PipelineContentget this content as input stream- Specified by:
getContentStreamin interfacePipelineContent- Returns:
- input stream
- Throws:
ContentProcessException
-
setContentStream
Description copied from interface:PipelineContentset content input stream.this will reset document.- Specified by:
setContentStreamin interfacePipelineContent- Parameters:
contentStream-
-
getDocument
Description copied from interface:PipelineContentget this content as XML Document- Specified by:
getDocumentin interfacePipelineContent- Returns:
- document
- Throws:
ContentProcessException
-
setDocument
public void setDocument(org.dom4j.Document document) Description copied from interface:PipelineContentset the content document. this will reset content stream- Specified by:
setDocumentin interfacePipelineContent- Parameters:
document-
-
getEncoding
Description copied from interface:PipelineContentget the encoding of this content- Specified by:
getEncodingin interfacePipelineContent- Returns:
- encoding
-
setEncoding
Description copied from interface:PipelineContentset the encoding of this content- Specified by:
setEncodingin interfacePipelineContent- Parameters:
encoding-
-
getProperties
Description copied from interface:PipelineContentget properties of this content- Specified by:
getPropertiesin interfacePipelineContent- Returns:
- properties
-
setProperties
Description copied from interface:PipelineContentset content properties- Specified by:
setPropertiesin interfacePipelineContent- Parameters:
properties-
-
addProperty
Description copied from interface:PipelineContentadd a content property- Specified by:
addPropertyin interfacePipelineContent- Parameters:
key-value-
-
getProperty
Description copied from interface:PipelineContentget a property value given the key- Specified by:
getPropertyin interfacePipelineContent- Parameters:
key-- Returns:
- property value
-
closeContentStream
public void closeContentStream()Description copied from interface:PipelineContentclose this content- Specified by:
closeContentStreamin interfacePipelineContent
-