User: vancek
Date: 06/06/13 21:48:32
Added: andromda-ejb3/src/main/resources/templates/ejb3
ServiceDelegateBase.vsl
Log:
Initial revision - base class for service delegates
Revision Changes Path
1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/ServiceDelegateBase.vsl
Index: ServiceDelegateBase.vsl
===================================================================
// license-header java merge-point
//
// Attention: Generated code! Do not modify by hand!
// Generated by: ServiceDelegateBase.vsl in andromda-ejb3-cartridge.
//
#set ($generatedFile = "ServiceDelegateBase.java")
#if($stringUtils.isNotEmpty($ejb3TypesPackage))
package $ejb3TypesPackage;
#**##set ($generatedFile = "${stringUtils.replace($ejb3TypesPackage,'.','/')}/${generatedFile}")
#end
/**
* Service delegate base class extended by all service delegates.
*
*/
public abstract class ServiceDelegateBase
{
/**
* Define remote interface view type
*/
public static final int REMOTE_VIEW_TYPE = 0;
/**
* Define local interface view type
*/
public static final int LOCAL_VIEW_TYPE = 1;
/**
* Default remote view type selected
*/
private int viewType = REMOTE_VIEW_TYPE;
/**
* Environment properties
*/
private java.util.Properties properties = null;
/**
* Default empty constructor
*/
public ServiceDelegateBase()
{
// empty constructor
}
/**
* Constructor setting the envirinment properties.
*
* @param properties
*/
public ServiceDelegateBase(java.util.Properties properties)
{
this.properties = properties;
}
/**
* Get the view interface for invoking business operations
*/
public int getViewType()
{
return this.viewType;
}
/**
* Set the view interface for invoking business operations
*/
public void setViewType(int viewType)
{
this.viewType = viewType;
}
/**
* Get the environment properties if set, otherwise return null
*/
public java.util.Properties getProperties()
{
return this.properties;
}
/**
* Set the environment properties
*/
public void setProperties(java.util.Properties properties)
{
this.properties = properties;
}
/**
* Close down service delegate resources
*/
public void close()
{
${ejb3TypesPackage}.ServiceLocator.getInstance().shutdown();
}
}
|