[jboss-cvs] jboss-seam/src/gen/org/jboss/seam/tool ...
Gavin King
gavin.king at jboss.com
Thu Nov 2 21:35:44 EST 2006
User: gavin
Date: 06/11/02 21:35:44
Modified: src/gen/org/jboss/seam/tool FaceletGenerator.java
JavaClassGenerator.java SeamGenCommandLine.java
Log:
edit page
Revision Changes Path
1.4 +12 -12 jboss-seam/src/gen/org/jboss/seam/tool/FaceletGenerator.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: FaceletGenerator.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/gen/org/jboss/seam/tool/FaceletGenerator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- FaceletGenerator.java 2 Nov 2006 23:17:33 -0000 1.3
+++ FaceletGenerator.java 3 Nov 2006 02:35:44 -0000 1.4
@@ -53,9 +53,7 @@
}
public void newPage() throws IOException, TemplateException {
- logger.info("Generating a new Facelet Page");
- String pageTemplate = getFaceletPath( this.projectProps.getWorkspaceHome(),
- this.projectName, "template", this.projectProps.getWtp());
+ logger.info("Generating a new page");
String page = getFaceletPath( this.projectProps.getWorkspaceHome(),
this.projectName, this.pageName, this.projectProps.getWtp());
@@ -63,19 +61,23 @@
}
public void newActionPage() throws IOException, TemplateException {
- logger.info("Generating a new action Facelet Page");
- String pageTemplate = getFaceletPath( this.projectProps.getWorkspaceHome(),
- this.projectName, "template", this.projectProps.getWtp());
+ logger.info("Generating a new action page");
String page = getFaceletPath( this.projectProps.getWorkspaceHome(),
this.projectName, this.pageName, this.projectProps.getWtp());
generateFile("action-page.ftl", page, getModel());
}
+ public void newEditPage() throws IOException, TemplateException {
+ logger.info("Generating a new edit page");
+ String page = getFaceletPath( this.projectProps.getWorkspaceHome(),
+ this.projectName, this.pageName, this.projectProps.getWtp());
+
+ generateFile("edit-page.ftl", page, getModel());
+ }
+
public void newFormPage() throws IOException, TemplateException {
- logger.info("Generating a new action Facelet Page");
- String pageTemplate = getFaceletPath( this.projectProps.getWorkspaceHome(),
- this.projectName, "template", this.projectProps.getWtp());
+ logger.info("Generating a new form page");
String page = getFaceletPath( this.projectProps.getWorkspaceHome(),
this.projectName, this.pageName, this.projectProps.getWtp());
@@ -83,9 +85,7 @@
}
public void newConversationPage() throws IOException, TemplateException {
- logger.info("Generating a new conversation Facelet Page");
- String pageTemplate = getFaceletPath( this.projectProps.getWorkspaceHome(),
- this.projectName, "template", this.projectProps.getWtp());
+ logger.info("Generating a new conversation page");
String page = getFaceletPath( this.projectProps.getWorkspaceHome(),
this.projectName, this.pageName, this.projectProps.getWtp());
1.3 +11 -2 jboss-seam/src/gen/org/jboss/seam/tool/JavaClassGenerator.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: JavaClassGenerator.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/gen/org/jboss/seam/tool/JavaClassGenerator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- JavaClassGenerator.java 2 Nov 2006 22:34:20 -0000 1.2
+++ JavaClassGenerator.java 3 Nov 2006 02:35:44 -0000 1.3
@@ -87,7 +87,7 @@
}
public void newConversation() throws IOException, TemplateException {
- logger.info("Generating a new SFSB Conversation and interface");
+ logger.info("Generating a new SFSB and interface");
String sfsbAction = getJavaFilePath(this.projectProps.getWorkspaceHome(),
this.projectName, this.projectProps.getActionDir(),
this.actionName+"Action", this.projectProps.getWtp());
@@ -114,7 +114,7 @@
}
public void newEntity() throws IOException, TemplateException {
- logger.info("Generating a new Entity EJB");
+ logger.info("Generating a new entity bean");
String entity = getJavaFilePath(this.projectProps.getWorkspaceHome(),
this.projectName, this.projectProps.getModelDir(),
this.actionName, this.projectProps.getWtp());
@@ -122,6 +122,15 @@
generateFile("Entity.ftl", entity, getModel());
}
+ public void newEntityHome() throws IOException, TemplateException {
+ logger.info("Generating a new EntityHome SFSB");
+ String entity = getJavaFilePath(this.projectProps.getWorkspaceHome(),
+ this.projectName, this.projectProps.getActionDir(),
+ this.actionName + "Home", this.projectProps.getWtp());
+
+ generateFile("EntityHome.ftl", entity, getModel());
+ }
+
public void newMdb() throws IOException, TemplateException {
logger.info("Generating a new MDB");
HashMap model = getModel();
1.5 +5 -1 jboss-seam/src/gen/org/jboss/seam/tool/SeamGenCommandLine.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SeamGenCommandLine.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/gen/org/jboss/seam/tool/SeamGenCommandLine.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- SeamGenCommandLine.java 3 Nov 2006 00:53:48 -0000 1.4
+++ SeamGenCommandLine.java 3 Nov 2006 02:35:44 -0000 1.5
@@ -77,9 +77,13 @@
}
else if (args[0].equals("new-entity")) {
- if (args.length == 3) {
+ if (args.length == 4) {
JavaClassGenerator actionGen = new JavaClassGenerator(args);
+ FaceletGenerator faceletGen = new FaceletGenerator(args);
+
actionGen.newEntity();
+ actionGen.newEntityHome();
+ faceletGen.newEditPage();
} else {
throw new Exception("Wrong number of arguments");
}
More information about the jboss-cvs-commits
mailing list