From: Vance K. <va...@us...> - 2006-01-03 01:06:30
|
User: vancek Date: 06/01/02 17:06:24 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionLocal.vsl SessionRemote.vsl Log: fixed interfaces to work with ejb3 session bean Revision Changes Path 1.2 +46 -50 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionLocal.vsl Index: SessionLocal.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionLocal.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- SessionLocal.vsl 28 Dec 2005 00:32:55 -0000 1.1 +++ SessionLocal.vsl 3 Jan 2006 01:06:24 -0000 1.2 @@ -5,81 +5,77 @@ #end /** - * Local component interface for the $service.name session bean. + * Local component interface for the ${service.serviceName} session bean. $service.getDocumentation(" * ") */ +@javax.ejb.Local public interface ${service.serviceLocalInterfaceName} #if($service.generalization) extends ${service.generalization.fullyQualifiedName}Local -#else - extends javax.ejb.EJBLocalObject #end { - // -- accessors for environment entries -- -#foreach($envEntry in $service.getEnvironmentEntries(true)) -#if($envEntry.visibility == "public") - /** - * Get the ${envEntry.name} environment entry -$envEntry.getDocumentation(" * ") - */ - public $envEntry.type.fullyQualifiedName get$AttName(); +#set ($constants = $service.constants) +#if (!$constants.empty) -#end -#end - // -- accessors for constants -- -#foreach($attribute in $service.staticAttributes) -#if(!$attribute.hasStereotype("EnvEntry")) -#set ($visibility = $attribute.visibility) -## Only expose the method to the home interface if it is public. -#if($visibility == "public") -#set($attType = $attribute.type.fullyQualifiedName) -#set($AttName = $stringUtils.capitalize($attribute.name)) + // ----------- accessors for constants ------------ + +#**##foreach($constant in $constants) +## Only expose the method if it is public. +#* *##if($constant.visibility == "public") /** * Get the $attribute.name constant -$attribute.getDocumentation(" * ") +$constant.getDocumentation(" * ") */ - public $attType get$AttName(); + public $constant.type.fullyQualifiedName ${constant.getterName}(); +#* *##end +#**##end #end -#end -#end +#set ($attributes = $service.instanceAttributes) +#if (!$attributes.empty) + // --------------- attributes --------------------- -#foreach ( $attribute in $service.instanceAttributes) -#set ($visibility = $attribute.visibility) + +#**##foreach ($attribute in $attributes) ## Only expose the method to the component interface if it is public. -#if($visibility == "public") +#* *##if ($attribute.visibility == "public") /** - * Get the ${attribute.name} property + * Get the $attribute.name property $attribute.getDocumentation(" * ") */ public $attribute.type.fullyQualifiedName ${attribute.getterName}(); -#if(!$attribute.readOnly) +#* *##if(!$attribute.readOnly) /** - * Set the ${attribute.name} property + * Set the $attribute.name property * @param value the new value */ public void ${attribute.setterName}($attribute.type.fullyQualifiedName value); + +#* *##end +#* *##end +#**##end #end -#end -#end +#set ($operations = $service.businessOperations) +#if (!$operations.empty) - // ---------------- business methods ---------------------- -#foreach ( $operation in $service.businessOperations) -#set ($visibility = $operation.visibility) -## Only expose public methods -#if ($visibility == "public") + // ------------ business methods ----------------- +#**##foreach ($operation in $operations) +## Only expose public methods with local view type accessability +#* *##if ($operation.visibility == "public" && ($operation.viewTypeLocal || $operation.viewTypeBoth)) /** $operation.getDocumentation(" * ") */ -#set ($returnType = $operation.returnType.fullyQualifiedName) -#if ($operation.exceptionsPresent) +#* *##set ($returnType = $operation.returnType.fullyQualifiedName) +#* *##if ($operation.exceptionsPresent) public $returnType $operation.signature throws $operation.exceptionList; -#else - $visibility $returnType $operation.signature; -#end -#end +#* *##else + public $returnType $operation.signature; +#* *##end + +#* *##end +#**##end #end } \ No newline at end of file 1.2 +46 -43 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionRemote.vsl Index: SessionRemote.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionRemote.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- SessionRemote.vsl 28 Dec 2005 00:32:55 -0000 1.1 +++ SessionRemote.vsl 3 Jan 2006 01:06:24 -0000 1.2 @@ -8,71 +8,74 @@ * Remote component interface for the ${service.serviceName} session bean. $service.getDocumentation(" * ") */ +...@ja...mote public interface ${service.serviceRemoteInterfaceName} #if ($service.generalization) - extends $service.fullyQualifiedName -#else - extends javax.ejb.EJBObject + extends ${service.generalization.fullyQualifiedName}Remote #end { - // -- accessors for environment entries -- -#foreach($envEntry in $service.getEnvironmentEntries(true)) -#if($visibility == "public") - /** - * Get the ${envEntry.name} environment entry -$envEntry.getDocumentation(" * ") - */ - public $envEntry.type.fullyQualifiedName ${envEntry.getterName}(); +#set ($constants = $service.constants) +#if (!$constants.empty) -#end -#end - // -- accessors for constants -- -#foreach($constant in $service.constants) -## Only expose the method to the home interface if it is public. -#if($constant.visibility == "public") + // ---------- accessors for constants ----------- + +#**##foreach($constant in $constants) +## Only expose the method if it is public. +#* *##if($constant.visibility == "public") /** * Get the $attribute.name constant $constant.getDocumentation(" * ") */ public $constant.type.fullyQualifiedName ${constant.getterName}(); +#* *##end +#**##end #end -#end +#set ($attributes = $service.instanceAttributes) +#if (!$attributes.empty) + // --------------- attributes --------------------- -#foreach ( $attribute in $service.instanceAttributes) + +#**##foreach ($attribute in $attributes) +## Only expose the method to the component interface if it is public. +#* *##if ($attribute.visibility == "public") /** - * Get the ${attribute.name} property + * Get the $attribute.name property $attribute.getDocumentation(" * ") */ - public $attribute.type.fullyQualifiedName ${attribute.getterName}() - throws java.rmi.RemoteException; + public $attribute.type.fullyQualifiedName ${attribute.getterName}(); -#if(!$attribute.readOnly) +#* *##if(!$attribute.readOnly) /** * Set the $attribute.name property * @param value the new value */ - public void ${attribute.setterName}($attribute.type.fullyQualifiedName value) - throws java.rmi.RemoteException; -#end + public void ${attribute.setterName}($attribute.type.fullyQualifiedName value); + +#* *##end +#* *##end +#**##end #end +#set ($operations = $service.businessOperations) +#if (!$operations.empty) - // ---------------- business methods ---------------------- -#foreach ( $operation in $service.businessOperations) -## Only expose public methods -#if ($operation.visibility == "public") + // ------------ business methods ----------------- +#**##foreach ($operation in $operations) +## Only expose public methods with remote view type accessability +#* *##if ($operation.visibility == "public" && ($operation.viewTypeRemote || $operation.viewTypeBoth)) /** $operation.getDocumentation(" * ") */ -#set ($returnType = $operation.returnType.fullyQualifiedName) -#if ($operation.exceptionsPresent) - public $returnType $operation.signature - throws $operation.getExceptionList('java.rmi.RemoteException'); -#else +#* *##set ($returnType = $operation.returnType.fullyQualifiedName) +#* *##if ($operation.exceptionsPresent) public $returnType $operation.signature - throws java.rmi.RemoteException; -#end -#end + throws $operation.exceptionList; +#* *##else + public $returnType $operation.signature; +#* *##end + +#* *##end +#**##end #end } \ No newline at end of file |