Class PipelineContentImpl
java.lang.Object
org.craftercms.studio.impl.v1.content.pipeline.PipelineContentImpl
- All Implemented Interfaces:
PipelineContent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InputStream
content as input streamprotected org.dom4j.Document
content as documentprotected String
content encodingprotected String
content idcontent propertiesprotected boolean
is this XML content?static final org.slf4j.Logger
Fields 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 TypeMethodDescriptionvoid
addProperty
(String key, String value) add a content propertyvoid
close this contentget this content as input streamorg.dom4j.Document
get 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 keyvoid
setContentStream
(InputStream contentStream) set content input stream.this will reset document.void
setDocument
(org.dom4j.Document document) set the content document. this will reset content streamvoid
setEncoding
(String encoding) set the encoding of this contentvoid
set the id of this contentvoid
setProperties
(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:PipelineContent
get the id of this content- Specified by:
getId
in interfacePipelineContent
- Returns:
- id
-
setId
Description copied from interface:PipelineContent
set the id of this content- Specified by:
setId
in interfacePipelineContent
- Parameters:
id
-
-
getContentStream
Description copied from interface:PipelineContent
get this content as input stream- Specified by:
getContentStream
in interfacePipelineContent
- Returns:
- input stream
- Throws:
ContentProcessException
-
setContentStream
Description copied from interface:PipelineContent
set content input stream.this will reset document.- Specified by:
setContentStream
in interfacePipelineContent
- Parameters:
contentStream
-
-
getDocument
Description copied from interface:PipelineContent
get this content as XML Document- Specified by:
getDocument
in interfacePipelineContent
- Returns:
- document
- Throws:
ContentProcessException
-
setDocument
public void setDocument(org.dom4j.Document document) Description copied from interface:PipelineContent
set the content document. this will reset content stream- Specified by:
setDocument
in interfacePipelineContent
- Parameters:
document
-
-
getEncoding
Description copied from interface:PipelineContent
get the encoding of this content- Specified by:
getEncoding
in interfacePipelineContent
- Returns:
- encoding
-
setEncoding
Description copied from interface:PipelineContent
set the encoding of this content- Specified by:
setEncoding
in interfacePipelineContent
- Parameters:
encoding
-
-
getProperties
Description copied from interface:PipelineContent
get properties of this content- Specified by:
getProperties
in interfacePipelineContent
- Returns:
- properties
-
setProperties
Description copied from interface:PipelineContent
set content properties- Specified by:
setProperties
in interfacePipelineContent
- Parameters:
properties
-
-
addProperty
Description copied from interface:PipelineContent
add a content property- Specified by:
addProperty
in interfacePipelineContent
- Parameters:
key
-value
-
-
getProperty
Description copied from interface:PipelineContent
get a property value given the key- Specified by:
getProperty
in interfacePipelineContent
- Parameters:
key
-- Returns:
- property value
-
closeContentStream
public void closeContentStream()Description copied from interface:PipelineContent
close this content- Specified by:
closeContentStream
in interfacePipelineContent
-