Permalink
Browse files

git-svn-id: http://umple.googlecode.com/svn/trunk@398 6ebf9d09-8eb1-0…

…036-9d08-68c07d1b990a
  • Loading branch information...
Julian Solano
Julian Solano committed May 8, 2011
1 parent d35a432 commit 5f03f4d2c53071684965145b37b3b97b1ed4eea2
Showing with 147 additions and 0 deletions.
  1. +64 −0 UmpleUIResources/UmpleProject.xml
  2. +63 −0 UmpleUIResources/build.xml
  3. +20 −0 UmpleUIResources/examples/school.ump
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- UMPLE PROJECT JSF PROVIDER-->
<UmpleProject UmpleFile="examples/school.ump" name="School" UIFactory="cruise.ui.jsf.JSFFactory" OutputFolder="AirlineOut" xsi:noNamespaceSchemaLocation="UmpleProject.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Properties>
<Property name="UMPLE_FOLDER" value="JavaSource" />
<Property name="ATTRIBUTE_CONFIGURATOR" value="xml/AttributeConfigurator.xml" />
<Property name="GUI_ATTRIBUTE_CONFIGURATOR" value="xml/GUIConfigurator.xml" />
<!--Property name="PROVIDER_JAR" value="c:\pruebas\JSFProvider.jar" / -->
<!-- JSF PROVIDER Properties-->
<Property name="BCK_OBJECT_SUFFIX" value="Bean" />
<Property name="PACKAGE_PREFIX" value="web" />
</Properties>
<GenerationUnits>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="dao" OutputExtension="java" TemplatePackage="cruise.data.impl.dao" TemplateClass="DAOInterface" ClassSuffix="DAO" ParameterType="NORMAL_CLASS_BY_CLASS"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="dao.keys" OutputExtension="java" TemplatePackage="cruise.data.impl.dao.generic" TemplateClass="KeyClass" OutputPackage="dao.keys" ClassSuffix="Key" ParameterType="NORMAL_CLASS_BY_CLASS"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="dao.keys" OutputExtension="java" TemplatePackage="cruise.data.impl.dao.generic.impl" TemplateClass="IKey" OutputName="IKey" ParameterType="NONE"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="dao.factory" OutputExtension="java" TemplatePackage="cruise.data.impl.dao.factory" TemplateClass="DAOFactory" OutputName="DAOFactory" ParameterType="ALL_NORMAL_CLASSES"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="dao.factory" OutputExtension="java" TemplatePackage="cruise.data.impl.dao.factory" TemplateClass="FakeDAOFactory" OutputName="FakeDAOFactory" ParameterType="ALL_NORMAL_CLASSES"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="dao.generic" OutputExtension="java" TemplatePackage="cruise.data.impl.dao.generic" TemplateClass="GenericDAO" OutputName="GenericDAO" ParameterType="NONE"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="dao.generic.impl" OutputExtension="java" TemplatePackage="cruise.data.impl.dao.generic.impl" TemplateClass="GenericFakeDAO" OutputName="GenericFakeDAO" ParameterType="NONE"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="dao.session" OutputExtension="java" TemplatePackage="cruise.data.impl.dao.session" TemplateClass="ObjectRepository" OutputName="ObjectRepository" ParameterType="ALL_NORMAL_CLASSES"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="dao.session" OutputExtension="java" TemplatePackage="cruise.data.impl.dao.session" TemplateClass="Session" OutputName="Session" ParameterType="NONE"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="bundles" OutputExtension="properties" TemplatePackage="cruise.data.impl.bundles" TemplateClass="ResourceBundle" OutputPackage="bundles" ParameterType="NORMAL_CLASS_BY_CLASS"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="bundles" OutputExtension="properties" TemplatePackage="cruise.data.impl.bundles" TemplateClass="ResourceBundle" OutputPackage="bundles" ParameterType="SINGLETON_CLASS_BY_CLASS"/>
<!-- JSF PROVIDER GenerationUnits-->
<!-- JSF PROVIDER Beans and Utils-->
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="web.components.bean" OutputExtension="java" TemplatePackage="cruise.ui.jsf.templates.impl.components" TemplateClass="SkinBean" OutputName="SkinBean" ParameterType="NONE"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="web.components.bean" OutputExtension="java" TemplatePackage="cruise.ui.jsf.templates.impl.components" TemplateClass="TimeBean" OutputName="TimeBean" ParameterType="NONE"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="web.control" OutputExtension="java" TemplatePackage="cruise.ui.jsf.templates.impl.control" TemplateClass="BeanLinker" OutputName="BeanLinker" ParameterType="NONE"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="web.control" OutputExtension="java" TemplatePackage="cruise.ui.jsf.templates.impl.control" TemplateClass="MainBean" OutputName="MainBean" ParameterType="NONE"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="web.utils" OutputExtension="java" TemplatePackage="cruise.ui.jsf.templates.impl.utils" TemplateClass="PageFlowUtils" OutputName="PageFlowUtils" ParameterType="NONE"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="web" OutputExtension="java" TemplatePackage="cruise.ui.jsf.templates.impl" TemplateClass="BckBean" ClassSuffix="Bean" ParameterType="NORMAL_CLASS_BY_CLASS"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="web" OutputExtension="java" TemplatePackage="cruise.ui.jsf.templates.impl" TemplateClass="BckBeanSingleton" ClassSuffix="Bean" ParameterType="SINGLETON_CLASS_BY_CLASS"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="bundles" OutputExtension="properties" TemplatePackage="cruise.data.impl.bundles" TemplateClass="ResourceBundle" OutputPackage="bundles" ParameterType="NORMAL_CLASS_BY_CLASS"/>
<GenerationUnit OutputSubFolder="JavaSource" PackagePreffix="bundles" OutputExtension="properties" TemplatePackage="cruise.data.impl.bundles" TemplateClass="ResourceBundle" OutputPackage="bundles" ParameterType="SINGLETON_CLASS_BY_CLASS"/>
<!-- JSF PROVIDER Config Files-->
<GenerationUnit OutputSubFolder="WebContent/WEB-INF" OutputExtension="xml" TemplatePackage="cruise.ui.jsf.templates.impl.GUI.config" TemplateClass="WebXML" OutputName="web" ParameterType="NONE"/>
<GenerationUnit OutputSubFolder="WebContent/WEB-INF" OutputExtension="xml" TemplatePackage="cruise.ui.jsf.templates.impl.GUI.config" TemplateClass="FacesConfig" OutputName="faces-config" ParameterType="ALL_CLASSES"/>
<GenerationUnit OutputSubFolder="WebContent/pages" PackagePreffix="templates" OutputExtension="xhtml" TemplatePackage="cruise.ui.jsf.templates.impl.GUI.templates" TemplateClass="Common" OutputName="common" ParameterType="ALL_CLASSES"/>
<!-- JSF PROVIDER web pages Files-->
<GenerationUnit OutputSubFolder="WebContent/pages" OutputExtension="xhtml" TemplatePackage="cruise.ui.jsf.templates.impl.GUI" TemplateClass="Home" OutputName="home" ParameterType="NONE"/>
<GenerationUnit OutputSubFolder="WebContent/pages" OutputExtension="xhtml" TemplatePackage="cruise.ui.jsf.templates.impl.GUI" TemplateClass="BaseInsertable" ClassSuffix="Insertable" AddClassNameToRoute="YES" ParameterType="NORMAL_CLASS_BY_CLASS"/>
<GenerationUnit OutputSubFolder="WebContent/pages" OutputExtension="xhtml" TemplatePackage="cruise.ui.jsf.templates.impl.GUI" TemplateClass="BaseMain" ClassSuffix="Main" AddClassNameToRoute="YES" ParameterType="NORMAL_CLASS_BY_CLASS"/>
<GenerationUnit OutputSubFolder="WebContent/pages" OutputExtension="xhtml" TemplatePackage="cruise.ui.jsf.templates.impl.GUI" TemplateClass="Grid" OutputName="grid" AddClassNameToRoute="YES" ParameterType="NORMAL_CLASS_BY_CLASS"/>
<GenerationUnit OutputSubFolder="WebContent/pages" OutputExtension="xhtml" TemplatePackage="cruise.ui.jsf.templates.impl.GUI" TemplateClass="GridSelectMany" OutputName="gridSelectMany" AddClassNameToRoute="YES" ParameterType="NORMAL_CLASS_BY_CLASS"/>
<GenerationUnit OutputSubFolder="WebContent/pages" OutputExtension="xhtml" TemplatePackage="cruise.ui.jsf.templates.impl.GUI" TemplateClass="GridSelectOne" OutputName="gridSelectOne" AddClassNameToRoute="YES" ParameterType="NORMAL_CLASS_BY_CLASS"/>
<GenerationUnit OutputSubFolder="WebContent/pages" OutputExtension="xhtml" TemplatePackage="cruise.ui.jsf.templates.impl.GUI" TemplateClass="BaseInsertableSingleton" ClassSuffix="Insertable" AddClassNameToRoute="YES" ParameterType="SINGLETON_CLASS_BY_CLASS"/>
<GenerationUnit OutputSubFolder="WebContent/pages" OutputExtension="xhtml" TemplatePackage="cruise.ui.jsf.templates.impl.GUI" TemplateClass="BaseMain" ClassSuffix="Main" AddClassNameToRoute="YES" ParameterType="SINGLETON_CLASS_BY_CLASS"/>
</GenerationUnits>
<Files>
<Directory InputFolder="files/compile-libs" OutputSubFolder="compile-libs" />
<Directory InputFolder="files/images" OutputSubFolder="WebContent/images" />
<Directory InputFolder="files/lib" OutputSubFolder="WebContent/WEB-INF/lib" />
<!-- Use the following tag if your target server is Tomcat, commented it out if you are going to deploy the app in jboss-->
<Directory InputFolder="files/tomcat-libs" OutputSubFolder="WebContent/WEB-INF/lib" />
<Directory InputFolder="files/META-INF" OutputSubFolder="WebContent/META-INF" />
<File InputFolder="files" OutputSubFolder="WebContent" Name="index.jsp" />
</Files>
</UmpleProject>
View
@@ -0,0 +1,63 @@
<project name="JSF" default="war" basedir=".">
<description>
Ant sript to create a JSF war file
</description>
<!-- set global properties for this build -->
<xmlproperty file="${xmlFile}" keepRoot="true"
semanticAttributes="true" />
<property name="outputFolder" value="${UmpleProject.OutputFolder}" />
<property name="umpleFile" value="${UmpleProject.UmpleFile}" />
<property name="projectName" value="${UmpleProject.name}" />
<property name="src" value="${outputFolder}/JavaSource" />
<property name="build" value="${outputFolder}/bin" />
<property name="compile-libs" value="${outputFolder}/compile-libs" />
<target name="run">
<java classname="cruise.generator.UIGU" fork="true">
<arg value="${xmlFile}" />
<arg value="${umpleFile}" />
<arg value="${outputFolder}" />
<arg value="${projectName}" />
<classpath>
<pathelement location="UmpleUIGenerator.jar" />
<pathelement location="UmpleUIJSFProvider.jar" />
<pathelement location="UmpleUIModel.jar" />
<pathelement location="junit.jar" />
<pathelement location="Umple.jar" />
</classpath>
</java>
</target>
<target name="war" depends="run, compile" description="generate war">
<war destfile="${projectName}.war"
webxml="${outputFolder}/WebContent/WEB-INF/web.xml"
basedir="${outputFolder}/WebContent">
<classes dir="${outputFolder}/bin" />
</war>
</target>
<target name="prepare">
<mkdir dir="${build}" />
<copy todir="${build}/bundles">
<fileset dir="${outputFolder}/JavaSource/bundles"/>
</copy>
</target>
<target name="compile" depends="run, prepare">
<javac debug="on" srcdir="${src}" destdir="${build}" includes="**/*">
<classpath>
<pathelement location="${compile-libs}/jsf-api.jar" />
<pathelement location="${compile-libs}/jsf-impl.jar" />
<pathelement location="${compile-libs}/servlet-api.jar" />
<pathelement location="${compile-libs}/el-api.jar" />
</classpath>
</javac>
</target>
</project>
@@ -0,0 +1,20 @@
namespace education;
class School {
String name;
String address;
String description;
0..1 -- * Person student;
key{name}
}
namespace human;
class Person {
String name;
Integer idNumber;
key{idNumber}
}

0 comments on commit 5f03f4d

Please sign in to comment.