Class ConstantTextFragment
- java.lang.Object
-
- com.hybris.datahub.core.services.impl.ConstantTextFragment
-
- All Implemented Interfaces:
ImpExFragment
public class ConstantTextFragment extends java.lang.Object implements ImpExFragment
A block of an ImpEx script containing constant content.
-
-
Constructor Summary
Constructors Constructor Description ConstantTextFragment()Instantiates a script fragment with constant content.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddLine(java.lang.String line)Adds a line of the script to this block.booleanaddLine(java.lang.String line, java.util.List<ImpExFragment> fragments)Adds a line of the script to this block.java.lang.StringgetContent()Reads back the content of this script block.java.io.InputStreamgetContentAsInputStream()Retrieves an input stream to read content of this fragment.
-
-
-
Method Detail
-
addLine
public boolean addLine(java.lang.String line)
Description copied from interface:ImpExFragmentAdds a line of the script to this block.- Specified by:
addLinein interfaceImpExFragment- Parameters:
line- a line of script text- Returns:
true, if the line is added;false, if the line does not belong to this block.
-
addLine
public boolean addLine(java.lang.String line, java.util.List<ImpExFragment> fragments)Description copied from interface:ImpExFragmentAdds a line of the script to this block.- Specified by:
addLinein interfaceImpExFragment- Parameters:
line- a line of script text- Returns:
true, if the line is added;false, if the line does not belong to this block.
-
getContent
public java.lang.String getContent()
Description copied from interface:ImpExFragmentReads back the content of this script block.- Specified by:
getContentin interfaceImpExFragment- Returns:
- content of this script block or an empty string, if this block is empty.
-
getContentAsInputStream
public java.io.InputStream getContentAsInputStream()
Description copied from interface:ImpExFragmentRetrieves an input stream to read content of this fragment.- Specified by:
getContentAsInputStreamin interfaceImpExFragment- Returns:
- an input stream to read content of this fragment.
-
-