public class DataHubDataFragment extends java.lang.Object implements ImpExFragment
| Constructor and Description |
|---|
DataHubDataFragment(DataHubFacade daHub)
Instantiates this fragment.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addLine(java.lang.String line)
Adds a line of the script to this block.
|
boolean |
addLine(java.lang.String line,
java.util.List<ImpExFragment> fragments)
Adds a line of the script to this block.
|
java.lang.String |
getContent()
Reads back the content of this script block.
|
java.io.InputStream |
getContentAsInputStream()
Retrieves an input stream to read content of this fragment.
|
protected DataHubFacade |
getDataHubFacade()
Retrieves facade being used for communication with the Data Hub.
|
java.lang.String |
getHeader(java.lang.String header)
Reads value of a specific header defined in this fragment.
|
java.util.Map<java.lang.String,java.lang.String> |
getHeaders()
Reads headers present in this fragment.
|
protected java.io.InputStream |
getImpexBody() |
java.lang.String |
getUrl()
Reads URL specified in this fragment.
|
protected void |
validateImpexHeader(java.lang.String header,
java.lang.String macros) |
public DataHubDataFragment(DataHubFacade daHub)
daHub - implementation of the facade for communicating to the Data Hub.public boolean addLine(java.lang.String line)
ImpExFragmentaddLine in interface ImpExFragmentline - a line of script texttrue, if the line is added; false, if the line does not belong to this block.public boolean addLine(java.lang.String line,
java.util.List<ImpExFragment> fragments)
ImpExFragmentaddLine in interface ImpExFragmentline - a line of script texttrue, if the line is added; false, if the line does not belong to this block.protected void validateImpexHeader(java.lang.String header,
java.lang.String macros)
throws ImpExException
ImpExExceptionprotected java.io.InputStream getImpexBody()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getContent()
throws java.io.IOException
ImpExFragmentgetContent in interface ImpExFragmentjava.io.IOException - if failed to read this fragment content.public java.io.InputStream getContentAsInputStream()
throws java.io.IOException
ImpExFragmentgetContentAsInputStream in interface ImpExFragmentjava.io.IOException - if failed to create an input stream for the fragment content.protected DataHubFacade getDataHubFacade()
public java.lang.String getUrl()
public java.util.Map<java.lang.String,java.lang.String> getHeaders()
public java.lang.String getHeader(java.lang.String header)
header - name of the header to read.null, if the specified header is not defined in this
fragment.Copyright © 2018 SAP SE. All Rights Reserved.