vlc.j2c-operation-host-program.vm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of legstar-jaxws-generator Show documentation
Show all versions of legstar-jaxws-generator Show documentation
Generates adapters and proxies for inbound and outbound mainframe integration with Web Services.
##/////////////////////////////////////////////////////////////////////
##Jaxws Operation Host Program Template.
##@author Fady
##/////////////////////////////////////////////////////////////////////
## ==================================================================
#macro(getLength $structures)
## --------------------------
#set($length = 0)
#foreach($structure in ${structures})
#set($length = $length + ${cixsHelper.getByteLength(${structure.jaxbPackageName}, ${structure.jaxbType})})
#end
#end
## ==================================================================
#macro(setContainers $prefix, $structures)
## ---------------------------------------
#foreach($structure in ${structures})
#set($length = ${cixsHelper.getByteLength(${structure.jaxbPackageName}, ${structure.jaxbType})})
get${prefix}putContainers().add(new HostContainer("$structure.cicsContainer", $length));
#end
#end
## ==================================================================
#if(${cixsOperation.packageName})
package ${cixsOperation.packageName};
#end
#if(${cixsOperation.hasChannel()})
import com.legstar.host.invoke.model.HostContainer;
#end
import com.legstar.host.invoke.model.HostProgram;
/**
* Target host program attributes.
*
*/
public class ${cixsOperation.className}HostProgram extends HostProgram {
/**
* Setup attributes values.
*/
public ${cixsOperation.className}HostProgram() {
setName("${cixsOperation.cicsProgramName.toUpperCase()}");
#if(${cixsOperation.hasChannel()})
setChannelName("${cixsOperation.cicsChannel}");
#setContainers("In", ${cixsOperation.getInput()})
#setContainers("Out", ${cixsOperation.getOutput()})
#else
#getLength(${cixsOperation.getInput()})
#set($inputLength = $length)
#getLength(${cixsOperation.getOutput()})
#set($outputLength = $length)
#if($outputLength > $inputLength)
setMaxDataLength($outputLength);
#else
setMaxDataLength($inputLength);
#end
setDataLength($inputLength);
#end
}
}