Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30786/src/ccmtools/generator/java/templates Modified Files: ProvidesDefGetMethodAssemblyImplementationTemplate.java ProvidesDefAssemblyClassTemplate.java ComponentDefAssemblyClassTemplate.java Log Message: Java assemblies Index: ComponentDefAssemblyClassTemplate.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/ComponentDefAssemblyClassTemplate.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ComponentDefAssemblyClassTemplate.java 16 Feb 2007 13:34:21 -0000 1.4 --- ComponentDefAssemblyClassTemplate.java 19 Feb 2007 09:09:42 -0000 1.5 *************** *** 21,25 **** protected final String TEXT_4 = ";" + NL + " " + NL + "import Components.CCMException; " + NL + "import Components.CCMExceptionReason;" + NL + "import Components.SessionContext; " + NL; protected final String TEXT_5 = NL; ! protected final String TEXT_6 = " " + NL + " " + NL + "/**" + NL + " * This class implements component equivalent and supported interfaces" + NL + " * as well as component attributes." + NL + " * Additionally, session component callback methods must be implemented." + NL + " *" + NL + " */ " + NL + "public class "; protected final String TEXT_7 = "Impl " + NL + " implements "; protected final String TEXT_8 = NL + "{" + NL + " /** Supported interface attribute variables */" + NL; --- 21,25 ---- protected final String TEXT_4 = ";" + NL + " " + NL + "import Components.CCMException; " + NL + "import Components.CCMExceptionReason;" + NL + "import Components.SessionContext; " + NL; protected final String TEXT_5 = NL; ! protected final String TEXT_6 = " " + NL + " " + NL + "/**" + NL + " * This class implements component equivalent and supported interfaces" + NL + " * as well as component attributes." + NL + " */ " + NL + "public class "; protected final String TEXT_7 = "Impl " + NL + " implements "; protected final String TEXT_8 = NL + "{" + NL + " /** Supported interface attribute variables */" + NL; *************** *** 31,35 **** protected final String TEXT_14 = " " + NL + "" + NL + " public "; protected final String TEXT_15 = "_Context ctx;" + NL + " " + NL + " " + NL + " public "; ! protected final String TEXT_16 = "Impl()" + NL + " {" + NL + " // OPTIONAL: IMPLEMENT ME HERE !" + NL + " }" + NL + "" + NL + "" + NL + " /* " + NL + " * Supported interface methods " + NL + " */" + NL + "" + NL + " /** Supported interface attributes */" + NL; protected final String TEXT_17 = NL; protected final String TEXT_18 = " " + NL + " " + NL + " " + NL + " /** Supported interface methods */" + NL + " "; --- 31,35 ---- protected final String TEXT_14 = " " + NL + "" + NL + " public "; protected final String TEXT_15 = "_Context ctx;" + NL + " " + NL + " " + NL + " public "; ! protected final String TEXT_16 = "Impl()" + NL + " {" + NL + " }" + NL + "" + NL + "" + NL + " /* " + NL + " * Supported interface methods " + NL + " */" + NL + "" + NL + " /** Supported interface attributes */" + NL; protected final String TEXT_17 = NL; protected final String TEXT_18 = " " + NL + " " + NL + " " + NL + " /** Supported interface methods */" + NL + " "; *************** *** 155,159 **** stringBuffer.append(TEXT_23); ! stringBuffer.append(provides.generateGetMethodAssemblyImplementation(component.getInnerFacet(provides))); } --- 155,159 ---- stringBuffer.append(TEXT_23); ! stringBuffer.append(provides.generateGetMethodAssemblyImplementation()); } Index: ProvidesDefAssemblyClassTemplate.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/ProvidesDefAssemblyClassTemplate.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProvidesDefAssemblyClassTemplate.java 16 Feb 2007 12:33:43 -0000 1.1 --- ProvidesDefAssemblyClassTemplate.java 19 Feb 2007 09:09:42 -0000 1.2 *************** *** 24,32 **** protected final String TEXT_7 = "Impl " + NL + " implements "; protected final String TEXT_8 = NL + "{" + NL + " /** Reference to the facet's component implementation */" + NL + " private "; ! protected final String TEXT_9 = "Impl component;" + NL + " " + NL + " /** the facet of the inner component we delegate to */" + NL + " private "; ! protected final String TEXT_10 = " target;" + NL + "" + NL + " public "; ! protected final String TEXT_11 = "Impl(" + NL + " \t"; ! protected final String TEXT_12 = "Impl component," + NL + " \t"; ! protected final String TEXT_13 = " target)" + NL + " {" + NL + " this.component = component;" + NL + " this.target = target;" + NL + " }" + NL; protected final String TEXT_14 = " " + NL + "// TODO: assembly implementation"; protected final String TEXT_15 = NL; --- 24,32 ---- protected final String TEXT_7 = "Impl " + NL + " implements "; protected final String TEXT_8 = NL + "{" + NL + " /** Reference to the facet's component implementation */" + NL + " private "; ! protected final String TEXT_9 = "Impl component;" + NL + " " + NL + " /** the facet of the inner component we delegate to */"; ! protected final String TEXT_10 = NL + " "; ! protected final String TEXT_11 = " target;" + NL + "" + NL + " public "; ! protected final String TEXT_12 = "Impl(" + NL + " \t"; ! protected final String TEXT_13 = "Impl component)" + NL + " {" + NL + " this.component = component;" + NL + " }" + NL; protected final String TEXT_14 = " " + NL + "// TODO: assembly implementation"; protected final String TEXT_15 = NL; *************** *** 71,82 **** stringBuffer.append(provides.getComponent().getIdentifier()); stringBuffer.append(TEXT_9); - stringBuffer.append(iface.generateAbsoluteJavaName()); stringBuffer.append(TEXT_10); ! stringBuffer.append(provides.getComponent().getIdentifier()); ! stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_11); stringBuffer.append(provides.getComponent().getIdentifier()); stringBuffer.append(TEXT_12); ! stringBuffer.append(iface.generateAbsoluteJavaName()); stringBuffer.append(TEXT_13); --- 71,81 ---- stringBuffer.append(provides.getComponent().getIdentifier()); stringBuffer.append(TEXT_9); stringBuffer.append(TEXT_10); ! stringBuffer.append(iface.generateAbsoluteJavaName()); stringBuffer.append(TEXT_11); stringBuffer.append(provides.getComponent().getIdentifier()); + stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_12); ! stringBuffer.append(provides.getComponent().getIdentifier()); stringBuffer.append(TEXT_13); Index: ProvidesDefGetMethodAssemblyImplementationTemplate.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/ProvidesDefGetMethodAssemblyImplementationTemplate.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProvidesDefGetMethodAssemblyImplementationTemplate.java 16 Feb 2007 12:33:42 -0000 1.1 --- ProvidesDefGetMethodAssemblyImplementationTemplate.java 19 Feb 2007 09:09:42 -0000 1.2 *************** *** 15,25 **** protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; ! protected final String TEXT_1 = NL + " public "; ! protected final String TEXT_2 = " get_"; ! protected final String TEXT_3 = "()" + NL + " {" + NL + " return new "; ! protected final String TEXT_4 = "."; ! protected final String TEXT_5 = "Impl(this, "; ! protected final String TEXT_6 = ");" + NL + " }"; ! protected final String TEXT_7 = NL; public String generate(Object argument) --- 15,30 ---- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; ! protected final String TEXT_1 = NL + "\tprivate "; ! protected final String TEXT_2 = "."; ! protected final String TEXT_3 = "Impl "; ! protected final String TEXT_4 = "_;" + NL + "" + NL + " public "; ! protected final String TEXT_5 = " get_"; ! protected final String TEXT_6 = "()" + NL + " {" + NL + " \tif("; ! protected final String TEXT_7 = "_==null)" + NL + " \t\t"; ! protected final String TEXT_8 = "_ = new "; ! protected final String TEXT_9 = "."; ! protected final String TEXT_10 = "Impl(this);" + NL + " \treturn "; ! protected final String TEXT_11 = "_;" + NL + " }"; ! protected final String TEXT_12 = NL; public String generate(Object argument) *************** *** 30,45 **** stringBuffer.append(TEXT_1); ! stringBuffer.append(provides.getInterface().generateAbsoluteJavaCcmName()); stringBuffer.append(TEXT_2); stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_3); - stringBuffer.append(provides.generateJavaNamespace()); - stringBuffer.append(TEXT_4); - stringBuffer.append(provides.getComponent().getIdentifier()); stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_5); ! stringBuffer.append(provides.getAssemblyFacet()); stringBuffer.append(TEXT_6); stringBuffer.append(TEXT_7); return stringBuffer.toString(); } --- 35,61 ---- stringBuffer.append(TEXT_1); ! stringBuffer.append(provides.generateJavaNamespace()); stringBuffer.append(TEXT_2); + stringBuffer.append(provides.getComponent().getIdentifier()); stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_3); stringBuffer.append(provides.getIdentifier()); + stringBuffer.append(TEXT_4); + stringBuffer.append(provides.getInterface().generateAbsoluteJavaCcmName()); stringBuffer.append(TEXT_5); ! stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_6); + stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_7); + stringBuffer.append(provides.getIdentifier()); + stringBuffer.append(TEXT_8); + stringBuffer.append(provides.generateJavaNamespace()); + stringBuffer.append(TEXT_9); + stringBuffer.append(provides.getComponent().getIdentifier()); + stringBuffer.append(provides.getIdentifier()); + stringBuffer.append(TEXT_10); + stringBuffer.append(provides.getIdentifier()); + stringBuffer.append(TEXT_11); + stringBuffer.append(TEXT_12); return stringBuffer.toString(); } |