public class DataHubDataFragment extends Object implements ImpExFragment
| Constructor and Description |
|---|
DataHubDataFragment(DataHubFacade daHub)
Instantiates this fragment.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addLine(String line)
Adds a line of the script to this block.
|
boolean |
addLine(String line,
List<ImpExFragment> fragments)
Adds a line of the script to this block.
|
String |
getContent()
Reads back the content of this script block.
|
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.
|
String |
getHeader(String header)
Reads value of a specific header defined in this fragment.
|
Map<String,String> |
getHeaders()
Reads headers present in this fragment.
|
protected InputStream |
getImpexBody() |
String |
getUrl()
Reads URL specified in this fragment.
|
protected void |
validateImpexHeader(String header,
String macros) |
public DataHubDataFragment(DataHubFacade daHub)
daHub - implementation of the facade for communicating to the Data Hub.public boolean addLine(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(String line, 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(String header, String macros) throws ImpExException
ImpExExceptionprotected InputStream getImpexBody() throws IOException
IOExceptionpublic String getContent() throws IOException
ImpExFragmentgetContent in interface ImpExFragmentIOException - if failed to read this fragment content.public InputStream getContentAsInputStream() throws IOException
ImpExFragmentgetContentAsInputStream in interface ImpExFragmentIOException - if failed to create an input stream for the fragment content.protected DataHubFacade getDataHubFacade()
public String getUrl()
public Map<String,String> getHeaders()
Copyright © 2017 SAP SE. All Rights Reserved.