
vlc.coxb-bind-xml-to-host-transformer.vm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of legstar-distribution
Show all versions of legstar-distribution
Used to create a single distribution for the entire LegStar project.
The newest version!
## Determine the value Object type
#set ($valueObjectType = $coxbHelper.getBoundTypeName($binding))
package ${coxbContext.getCoxbPackageName()};
import com.legstar.coxb.CobolContext;
import com.legstar.coxb.transform.AbstractXmlToHostTransformer;
import com.legstar.coxb.transform.HostTransformException;
/**
* Transforms XML to mainframe data.
*
* This is a typical use of this class:
*
* StringReader reader = new StringReader("... ");
* ${valueObjectType}XmlToHostTransformer transformer = new ${valueObjectType}XmlToHostTransformer();
* byte[] hostByteArray = transformer.transform(new StreamSource(reader));
*
*
*/
public class ${binding.jaxbName}XmlToHostTransformer extends AbstractXmlToHostTransformer {
/**
* Create a XML to Host transformer using a Java to Host transformer.
* @throws HostTransformException if transformer cannot be created
*/
public ${binding.jaxbName}XmlToHostTransformer() throws HostTransformException {
super(new ${binding.jaxbName}JavaToHostTransformer());
}
/**
* Create an XML to Host transformer using a specific COBOL parameters set.
* @param cobolContext the COBOL parameters set.
* @throws HostTransformException if transformer cannot be created
*/
public ${binding.jaxbName}XmlToHostTransformer(
final CobolContext cobolContext) throws HostTransformException {
super(new ${binding.jaxbName}JavaToHostTransformer(cobolContext));
}
/**
* Create an XML to Host transformer using a specific host character set while
* other COBOL parameters are set by default.
* @param hostCharset the host character set
* @throws HostTransformException if transformer cannot be created
*/
public ${binding.jaxbName}XmlToHostTransformer(
final String hostCharset) throws HostTransformException {
super(new ${binding.jaxbName}JavaToHostTransformer(hostCharset));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy