From: Eric C. <ecr...@us...> - 2006-06-15 15:00:06
|
User: ecrutchfield Date: 06/06/15 07:59:56 Modified: andromda-nspring/src/main/java/org/andromda/cartridges/nspring/metafacades SpringGlobals.java SpringServiceLogicImpl.java andromda-nspring/src/main/resources/templates/nspring NSpringDaoInterface.vsl NSpringHibernateDaoBase.vsl NSpringHibernateDaoImpl.vsl andromda-nspring/src/main/resources/META-INF/andromda profile.xml namespace.xml cartridge.xml metafacades.xml Added: andromda-nspring/src/main/resources/templates/nspring NSpringServiceInterface.vsl NSpringServiceImpl.vsl NSpringServiceBase.vsl Removed: andromda-nspring/src/main/resources/templates/nspring NSpringHibernateDaoImplManual.vsl Log: [Applied Naresh's latest code for generating services] - Added capabilty to generate service layer. Merged manual and normal DaoImpl templated into one. Revision Changes Path 1.2 +5 -0 cartridges/andromda-nspring/src/main/java/org/andromda/cartridges/nspring/metafacades/SpringGlobals.java Index: SpringGlobals.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/java/org/andromda/cartridges/nspring/metafacades/SpringGlobals.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- SpringGlobals.java 8 Mar 2006 04:18:24 -0000 1.1 +++ SpringGlobals.java 15 Jun 2006 14:59:55 -0000 1.2 @@ -18,6 +18,11 @@ final static String EJB_IMPLEMENTATION_SUFFIX = "Bean"; /** + * The pattern used to construct the service interface name. + */ + static final String SERVICE_INTERFACE_PATTERN = "serviceInterfaceNamePattern"; + + /** * The service base class suffix. */ final static String SERVICE_BASE_SUFFIX = "Base"; 1.2 +30 -0 cartridges/andromda-nspring/src/main/java/org/andromda/cartridges/nspring/metafacades/SpringServiceLogicImpl.java Index: SpringServiceLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/java/org/andromda/cartridges/nspring/metafacades/SpringServiceLogicImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- SpringServiceLogicImpl.java 8 Mar 2006 04:18:24 -0000 1.1 +++ SpringServiceLogicImpl.java 15 Jun 2006 14:59:55 -0000 1.2 @@ -101,6 +101,16 @@ } /** + * @see org.andromda.cartridges.nspring.metafacades.SpringService#getFullyQualifiedInterfaceName() + */ + protected java.lang.String handleGetFullyQualifiedInterfaceName() + { + return SpringMetafacadeUtils.getFullyQualifiedName( + this.getPackageName(), + this.getInterfaceName()); + } + + /** * @see org.andromda.cartridges.nspring.metafacades.SpringService#getBaseName() */ protected java.lang.String handleGetBaseName() @@ -235,6 +245,26 @@ } /** + * @see org.andromda.cartridges.nspring.metafacades.SpringServiceLogic#handleGetInterfaceName() + */ + protected String handleGetInterfaceName() + { + return this.getInterfaceNamePattern().replaceAll( + "\\{0\\}", + this.getName()); + } + + /** + * Gets the value of the {@link SpringGlobals#SERVICE_INTERFACE_PATTERN} + * + * @return the service interface name pattern. + */ + private String getInterfaceNamePattern() + { + return String.valueOf(this.getConfiguredProperty(SpringGlobals.SERVICE_INTERFACE_PATTERN)); + } + + /** * @see org.andromda.cartridges.nspring.metafacades.SpringService#isRemotable() */ protected boolean handleIsRemotable() 1.3 +15 -20 cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringDaoInterface.vsl Index: NSpringDaoInterface.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringDaoInterface.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- NSpringDaoInterface.vsl 9 Apr 2006 13:49:12 -0000 1.2 +++ NSpringDaoInterface.vsl 15 Jun 2006 14:59:55 -0000 1.3 @@ -80,39 +80,36 @@ /// <summary> /// <p> - /// Does the same thing as <seealso cref="#Load($identifier.type.fullyQualifiedName)"/> with an + /// Does the same thing as <seealso cref="${entity.daoName}.Load($identifier.type.fullyQualifiedName)"/> with an /// additional flag called <code>transform</code>. If this flag is set to <code>$daoNoTransformationEnumName</code> then /// the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants /// defined in this class then the result <strong>WILL BE</strong> passed through an operation which can /// optionally transform the entity (into a value object for example). By default, transformation does /// not occur. /// </p> - /// + /// </summary> /// <param name="$identifier.name">the identifier of the entity to load.</param> /// <returns>either the entity or the object transformed from the entity.</returns> - /// </summary> Object Load(int transform, $identifier.type.fullyQualifiedName $identifier.name); /// <summary> /// Loads all entities of type <seealso cref="${entity.fullyQualifiedEntityName}"/>. - /// - /// <returns>the loaded entities.</returns> /// </summary> + /// <returns>the loaded entities.</returns> System.Collections.IList LoadAll(); /// <summary> /// <p> - /// Does the same thing as <seealso cref="#LoadAll()"/> with an + /// Does the same thing as <seealso cref="${entity.daoName}.LoadAll()"/> with an /// additional flag called <code>transform</code>. If this flag is set to <code>$daoNoTransformationEnumName</code> then /// the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants /// defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally /// transform the entity (into a value object for example). By default, transformation does /// not occur. /// </p> - /// + /// </summary> /// <param name="transform">the flag indicating what transformation to use.</param> /// <returns>the loaded entities.</returns> - /// </summary> System.Collections.IList LoadAll(int transform); #end @@ -125,7 +122,7 @@ /// <summary> /// <p> - /// Does the same thing as <seealso cref="#Create($entity.fullyQualifiedEntityName)"/> with an + /// Does the same thing as <seealso cref="${entity.daoName}.Create($entity.fullyQualifiedEntityName)"/> with an /// additional flag called <code>transform</code>. If this flag is set to <code>$daoNoTransformationEnumName</code> then /// the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants /// defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally @@ -139,16 +136,14 @@ /// <summary> /// Creates a new instance of $entity.fullyQualifiedEntityName and adds /// from the passed in <code>entities</code> collection - /// + /// </summary> /// <param name="entities">the collection of $entity.fullyQualifiedEntityName instances to create.</param> - /// /// <returns>the created instances.</returns> - /// </summary> System.Collections.ICollection Create(System.Collections.ICollection entities); /// <summary> /// <p> - /// Does the same thing as <seealso cref="#Create($entity.fullyQualifiedEntityName)"/> with an + /// Does the same thing as <seealso cref="${entity.daoName}.Create($entity.fullyQualifiedEntityName)"/> with an /// additional flag called <code>transform</code>. If this flag is set to <code>$daoNoTransformationEnumName</code> then /// the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants /// defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally @@ -177,7 +172,7 @@ /// <summary> /// <p> - /// Does the same thing as <seealso cref="#Create($entity.getAttributeTypeList(true,false))"/> with an + /// Does the same thing as <seealso cref="${entity.daoName}.Create($entity.getAttributeTypeList(true,false))"/> with an /// additional flag called <code>transform</code>. If this flag is set to <code>$daoNoTransformationEnumName</code> then /// the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants /// defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally @@ -210,7 +205,7 @@ /// <summary> /// <p> - /// Does the same thing as <seealso cref="#Create($entity.getRequiredAttributeTypeList(true,false))"/> with an + /// Does the same thing as <seealso cref="${entity.daoName}.Create($entity.getRequiredAttributeTypeList(true,false))"/> with an /// additional flag called <code>transform</code>. If this flag is set to <code>$daoNoTransformationEnumName</code> then /// the returned entity will <strong>NOT</strong be transformed. If this flag is any of the other constants /// defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally @@ -273,9 +268,9 @@ #if(!$operation.criteriaFinder) /// <summary> /// <p> - /// Does the same thing as <seealso cref="#${operation.getSignature(false)}"/> with an + /// Does the same thing as <seealso cref="${operation.getSignature(false)}"/> with an /// additional argument called <code>queryString</code>. This <code>queryString</code> - /// argument allows you to override the query string defined in <seealso cref="#${operation.getSignature(false)}"/>. + /// argument allows you to override the query string defined in <seealso cref="${entity.daoName}.${operation.getSignature(false)}"/>. /// </p> /// </summary> #if ($operation.exceptionsPresent) @@ -290,7 +285,7 @@ #end /// <summary> /// <p> - /// Does the same thing as <seealso cref="#${operation.getSignature(false)}"/> with an + /// Does the same thing as <seealso cref="${entity.daoName}.${operation.getSignature(false)}"/> with an /// additional flag called <code>transform</code>. If this flag is set to <code>$daoNoTransformationEnumName</code> then /// finder results will <strong>NOT</strong> be transformed during retrieval. /// If this flag is any of the other constants defined here @@ -308,7 +303,7 @@ /// <summary> /// <p> - /// Does the same thing as <seealso cref="#${operation.name}(boolean#if(!$operation.arguments.empty), ${operation.argumentTypeNames}#end)"/> with an + /// Does the same thing as <seealso cref="${entity.daoName}.${operation.name}(boolean#if(!$operation.arguments.empty), ${operation.argumentTypeNames}#end)"/> with an /// additional argument called <code>queryString</code>. This <code>queryString</code> /// argument allows you to override the query string defined in <seealso cref="#${operation.name}(int#if(!$operation.arguments.empty), ${operation.typedArgumentList}#end)"/>. /// </p> @@ -322,7 +317,7 @@ #else /// <summary> /// <p> - /// Does the same thing as <seealso cref="#${operation.getSignature(false)}"/> with an + /// Does the same thing as <seealso cref="${entity.daoName}.${operation.getSignature(false)}"/> with an /// additional flag called <code>transform</code>. If this flag is set to <code>$daoNoTransformationEnumName</code> then /// finder results will <strong>NOT</strong> be transformed during retrieval. /// If this flag is any of the other constants defined here 1.4 +2 -4 cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringHibernateDaoBase.vsl Index: NSpringHibernateDaoBase.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringHibernateDaoBase.vsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- NSpringHibernateDaoBase.vsl 9 Apr 2006 13:49:12 -0000 1.3 +++ NSpringHibernateDaoBase.vsl 15 Jun 2006 14:59:55 -0000 1.4 @@ -542,11 +542,10 @@ #end /// /// If the integer argument value is unknown <seealso cref="${entity.daoNoTransformationConstantName}"/> is assumed. - /// + /// </summary> /// <param name="transform">one of the constants declared in <seealso cref="$entity.fullyQualifiedDaoName"/></param> /// <param name="entity">an entity that was found</param> /// <returns>the transformed entity (i.e. new value object, etc) <see cref="#TransformEntities(int,System.Collections.ICollection)"/></returns> - /// </summary> protected Object TransformEntity(int transform, $entity.fullyQualifiedName entity) { Object target = null; @@ -586,11 +585,10 @@ /// <seealso cref="#TransformEntity(int,$entity.fullyQualifiedName)"/> method. /// <p/> /// This method is to be used internally only. - /// + /// </summary> /// <param name="transform">one of the constants declared in <code>$entity.fullyQualifiedDaoName</code></param> /// <param name="entities">the collection of entities to transform</param> /// <returns>a new list containing the transformed entities <see cref="#TransformEntity(int,$entity.fullyQualifiedName)"/></returns> - /// </summary> protected $inheritanceModifierAllEntityMethod System.Collections.IList TransformEntities(int transform, System.Collections.ICollection entities) { System.Collections.IList entityList = null; 1.3 +46 -0 cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringHibernateDaoImpl.vsl Index: NSpringHibernateDaoImpl.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringHibernateDaoImpl.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- NSpringHibernateDaoImpl.vsl 9 Apr 2006 13:49:12 -0000 1.2 +++ NSpringHibernateDaoImpl.vsl 15 Jun 2006 14:59:55 -0000 1.3 @@ -2,8 +2,13 @@ // Name: ${entity.daoImplementationName}.cs // license-header cs merge-point // +#if ($entity.daoImplementationRequired) +// This is only generated once! It will never be overwritten. +// You can (and have to!) safely modify it by hand. +#else // Attention: Generated code! Do not modify by hand! // Generated by: NSpringHibernateDaoImpl.vsl in andromda-nspring-cartridge. +#end using System; @@ -17,6 +22,47 @@ /// </summary> public class $entity.daoImplementationName : $entity.fullyQualifiedDaoBaseName { +#foreach ($operation in $entity.daoBusinessOperations) +#set ($returnType = $operation.returnType) +#set ($returnObject = "returnValue") +#set ($signature = $operation.implementationSignature) + /// <summary> + /// @see ${entity.fullyQualifiedDaoName}#${operation.getSignature(false)} + /// </summary> + protected override $returnType.fullyQualifiedName $signature +#if ($operation.exceptionsPresent) + throws $operation.exceptionList +#end + { + //@todo implement $operation.visibility $returnType.fullyQualifiedName $signature +#if ($operation.returnTypePresent) + return $operation.returnType.javaNullString; +#else + throw new InvalidOperationException("${entity.fullyQualifiedName}.${signature} Not implemented!"); +#end + } + +#end +#foreach ($valueObjectRef in $entity.valueObjectReferences) + /// <summary> + /// @see ${entity.fullyQualifiedDaoName}#${valueObjectRef.transformationMethodName}($entity.fullyQualifiedName) + /// </summary> + public override $valueObjectRef.targetElement.fullyQualifiedName ${valueObjectRef.transformationMethodName}($entity.fullyQualifiedName entity) + { + // put your implementation here + return null; + } + + /// <summary> + /// @see ${entity.fullyQualifiedDaoName}#${valueObjectRef.transformationToEntityMethodName}($valueObjectRef.targetElement.fullyQualifiedName) + /// </summary> + public override $entity.fullyQualifiedEntityName ${valueObjectRef.transformationToEntityMethodName}($valueObjectRef.targetElement.fullyQualifiedName $stringUtils.uncapitalize($valueObjectRef.name)) + { + // put your implementation here + return null; + } + +#end } #if ($stringUtils.isNotBlank($entity.packageName)) } 1.1 cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringServiceInterface.vsl Index: NSpringServiceInterface.vsl =================================================================== #set ($generatedFile = "${service.packagePath}/${service.interfaceName}.cs") // Name: ${service.name}.cs // license-header cs merge-point // // Attention: Generated code! Do not modify by hand! // Generated by: NSpringServiceInterface.vsl in andromda-nspring-cartridge. using System; #if ($stringUtils.isNotBlank($service.packageName)) namespace $service.packageName { #end /// <summary> $service.getDocumentation(" /// ") /// </summary> public interface $service.interfaceName #if ($service.generalization) : $service.generalization.fullyQualifiedName #if (!$service.interfaceAbstractions.empty) , $service.implementedInterfaceList #end #else #if (!$service.interfaceAbstractions.empty) , $service.implementedInterfaceList #end #end { #foreach ($operation in $service.operations) /// <summary> $operation.getDocumentation(" /// ") /// </summary> #if ($operation.exceptionsPresent) $operation.visibility $operation.returnType.fullyQualifiedName $operation.signature $operation.throwsClause; #else $operation.returnType.fullyQualifiedName $operation.signature; #end #end } #if ($stringUtils.isNotBlank($service.packageName)) } #end 1.1 cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringServiceImpl.vsl Index: NSpringServiceImpl.vsl =================================================================== #set ($generatedFile = "${service.packagePath}/${service.implementationName}.cs") // Name: ${service.implementationName}.cs // license-header cs merge-point // // This is only generated once! It will never be overwritten. // You can (and have to!) safely modify it by hand. using System; using AndroMDA.NHibernateSupport; #if ($stringUtils.isNotBlank($service.packageName)) namespace $service.packageName { #end /// <summary> /// @see $service.fullyQualifiedName /// </summary> public#if($service.abstract) abstract#end class $service.implementationName : $service.fullyQualifiedBaseName { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof($service.implementationName)); #foreach ($operation in $service.operations) /// <summary> /// @see ${service.fullyQualifiedName}#${operation.getSignature(false)} /// </summary> #set ($abstract = $service.abstract && $operation.abstract) #if ($abstract) #set ($termination = ";") #else #set ($termination = "") #end protected#if ($abstract) abstract#else override#end $operation.returnType.fullyQualifiedName $operation.implementationSignature$termination #if (!$abstract) { // put your implementation here #if ($operation.returnTypePresent) return $operation.returnType.javaNullString; #else throw new InvalidOperationException("${service.fullyQualifiedName}.${operation.implementationSignature} Not implemented!"); #end } #end #end } #if ($stringUtils.isNotBlank($service.packageName)) } #end 1.1 cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringServiceBase.vsl Index: NSpringServiceBase.vsl =================================================================== #set ($generatedFile = "${service.packagePath}/${service.baseName}.cs") // Name: ${service.baseName}.cs // license-header cs merge-point // // Attention: Generated code! Do not modify by hand! // Generated by: NSpringServiceBase.vsl in andromda-nspring-cartridge. using System; using AndroMDA.NHibernateSupport; #if ($stringUtils.isNotBlank($service.packageName)) namespace $service.packageName { #end /// <summary> /// <p> /// Spring Service base class for <code>$service.fullyQualifiedName</code>, /// provides access to all services and entities referenced by this service. /// </p> /// /// @see $service.fullyQualifiedName /// </summary> public abstract class $service.baseName #if($service.generalization) : $service.generalization.fullyQualifiedImplementationName #else : $service.fullyQualifiedInterfaceName #end { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof($service.baseName)); #foreach($entityRef in $service.entityReferences) #set ($daoPropertyName = "$stringUtils.capitalize($entityRef.name)Dao") /// <summary>Property to access $daoPropertyName</summary> protected $entityRef.targetElement.fullyQualifiedDaoName $daoPropertyName { get { return ${springTypesPackage}.DaoFactory.Get$daoPropertyName(); } } #end #foreach ($operation in $service.operations) /// <summary> /// @see ${service.fullyQualifiedName}#${operation.getSignature(false)} /// </summary> $operation.visibility $operation.returnType.fullyQualifiedName $operation.signature { #if ($requiredCheckEnabled) #foreach ($argument in $operation.arguments) #if ($argument.required && !$argument.type.primitive) if ($argument.name == null) { throw new ArgumentNullException( "${service.fullyQualifiedName}.${operation.signature} - '${argument.name}' can not be null"); } #end #end #end #if ($operation.constraintsPresent) this.$operation.preconditionCall; #end #set ($call = "${operation.implementationCall};") ## If transactionType is PROPAGATION_REQUIRED then wrap the call with Hibernate session and transaction #if ($operation.transactionType == "PROPAGATION_REQUIRED") #if ($operation.returnTypePresent) #if ($operation.returnType.primitive) $operation.returnType.fullyQualifiedName result; #else $operation.returnType.fullyQualifiedName result = null; #end #end SessionManagerFactory.SessionManager.HandleSessionStart(); SessionManagerFactory.SessionManager.BeginTransaction(); try { #if ($operation.returnTypePresent) result = $call #else $call #end SessionManagerFactory.SessionManager.CommitTransaction(); } catch (Exception ex) { SessionManagerFactory.SessionManager.RollbackTransaction(); log.Error(ex); throw; } finally { SessionManagerFactory.SessionManager.HandleSessionEnd(); } #if ($operation.returnTypePresent) return result; #end #else ## If transactionType is not PROPAGATION_REQUIRED then make a simple call #if ($operation.returnTypePresent) return $call #else $call #end #end } #if ($operation.constraintsPresent) /// <summary> /// Performs any precondition checks for {@link #${operation.call}}. /// </summary> private void $operation.preconditionSignature { #renderPreconditions($operation) } #end /// <summary> /// Performs the core logic for {@link #${operation.getSignature(false)}} /// <summary> protected abstract $operation.returnType.fullyQualifiedName $operation.implementationSignature; #end } #if ($stringUtils.isNotBlank($service.packageName)) } #end 1.2 +5 -2 cartridges/andromda-nspring/src/main/resources/META-INF/andromda/profile.xml Index: profile.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/META-INF/andromda/profile.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- profile.xml 8 Mar 2006 04:18:36 -0000 1.1 +++ profile.xml 15 Jun 2006 14:59:55 -0000 1.2 @@ -87,8 +87,11 @@ </element> <element name="TRANSACTION_TYPE"> <documentation> - Defines a Spring transaction type for the service operation - (when <strong>NOT</strong> wrapped by EJBs). + Defines whether the service operation will start a new NHibernate session + and a transaction. PROPAGATION_REQUIRED, which is the default value, + will start a new session and transaction and PROPAGATION_SUPPORTS will + not. Other values are not supported by the NSpring cartridge and should + not be used. </documentation> <value>@andromda.spring.transaction.type</value> <appliedOnElement>Service Operation</appliedOnElement> 1.2 +14 -0 cartridges/andromda-nspring/src/main/resources/META-INF/andromda/namespace.xml Index: namespace.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/META-INF/andromda/namespace.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- namespace.xml 8 Mar 2006 04:18:36 -0000 1.1 +++ namespace.xml 15 Jun 2006 14:59:55 -0000 1.2 @@ -30,6 +30,12 @@ will be generated. </documentation> </property> + <property name="service-interfaces"> + <documentation> + The location to which all service interfaces and common API classes such + as default service exceptions will be generated. + </documentation> + </property> <property name="daos"> <documentation> The location to which Spring DAOs, and any support classes. @@ -211,6 +217,14 @@ package ending in the <em>ejb</em> package. </documentation> </property> + <property name="serviceInterfaceNamePattern"> + <default>I{0}</default> + <documentation> + The pattern to use when constructing the service interface name. <em>{0}</em> is used to represent + the entity name in the model, so if you specified a value of <code>I{0}</code> all + the entities generated would have a prefix of "I". + </documentation> + </property> <property name="defaultServiceExceptionNamePattern"> <default>{0}Exception</default> <documentation> 1.3 +43 -1 cartridges/andromda-nspring/src/main/resources/META-INF/andromda/cartridge.xml Index: cartridge.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/META-INF/andromda/cartridge.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- cartridge.xml 25 Mar 2006 20:24:02 -0000 1.2 +++ cartridge.xml 15 Jun 2006 14:59:55 -0000 1.3 @@ -153,7 +153,7 @@ </template> <template - path="templates/nspring/NSpringHibernateDaoImplManual.vsl" + path="templates/nspring/NSpringHibernateDaoImpl.vsl" outputPattern="$generatedFile" outlet="dao-impls" overwrite="false"> @@ -166,6 +166,48 @@ </modelElements> </template> + <template + path="templates/nspring/NSpringServiceInterface.vsl" + outputPattern="$generatedFile" + outlet="service-interfaces" + overwrite="true"> + <modelElements variable="service"> + <modelElement> + <type name="org.andromda.cartridges.nspring.metafacades.SpringService"> + <property name="configonly">false</property> + </type> + </modelElement> + </modelElements> + </template> + + <template + path="templates/nspring/NSpringServiceBase.vsl" + outputPattern="$generatedFile" + outlet="services" + overwrite="true"> + <modelElements variable="service"> + <modelElement> + <type name="org.andromda.cartridges.nspring.metafacades.SpringService"> + <property name="configonly">false</property> + </type> + </modelElement> + </modelElements> + </template> + + <template + path="templates/nspring/NSpringServiceImpl.vsl" + outputPattern="$generatedFile" + outlet="service-impls" + overwrite="false"> + <modelElements variable="service"> + <modelElement> + <type name="org.andromda.cartridges.nspring.metafacades.SpringService"> + <property name="configonly">false</property> + </type> + </modelElement> + </modelElements> + </template> + <!-- cartridge-template merge-point --> </cartridge> \ No newline at end of file 1.2 +1 -0 cartridges/andromda-nspring/src/main/resources/META-INF/andromda/metafacades.xml Index: metafacades.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/META-INF/andromda/metafacades.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- metafacades.xml 8 Mar 2006 04:18:36 -0000 1.1 +++ metafacades.xml 15 Jun 2006 14:59:55 -0000 1.2 @@ -17,6 +17,7 @@ <property reference="entityNamePattern"/> <property reference="hibernateQueryUseNamedParameters"/> <property reference="hibernateInheritanceStrategy"/> + <property reference="serviceInterfaceNamePattern"/> <property reference="serviceOperationTransactionType"/> <property reference="ejbServiceOperationTransactionType"/> <property reference="serviceHibernateInterceptorEnabled"/> |