Skip to content

Commit

Permalink
ROO-516: JSF 2.0 Addon - refactored with new packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Stewart committed Oct 14, 2011
1 parent 478e6c1 commit efa3044
Show file tree
Hide file tree
Showing 22 changed files with 84 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.springframework.roo.addon.jsf.model.Theme;
import org.springframework.roo.addon.jsf.model.UploadedFileContentType;
import org.springframework.roo.model.JavaPackage;
import org.springframework.roo.model.JavaSymbolName;
import org.springframework.roo.model.JavaType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.springframework.roo.addon.jsf;

import org.springframework.roo.addon.jsf.model.Theme;
import org.springframework.roo.addon.jsf.model.UploadedFileContentType;
import org.springframework.roo.model.JavaPackage;
import org.springframework.roo.model.JavaSymbolName;
import org.springframework.roo.model.JavaType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.springframework.roo.addon.jsf.managedbean.JsfManagedBeanMetadata;
import org.springframework.roo.addon.jsf.model.Theme;
import org.springframework.roo.addon.jsf.model.UploadedFileContentType;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.classpath.PhysicalTypeCategory;
import org.springframework.roo.classpath.PhysicalTypeIdentifier;
Expand Down Expand Up @@ -234,7 +237,7 @@ private void copyEntityTypePage(final JavaType entity, final String beanName, fi

private void createConverter(final JavaPackage javaPackage, final JavaType entity) {
// Create type annotation for new converter class
JavaType converterType = new JavaType(javaPackage.getFullyQualifiedPackageName() + "." + entity.getSimpleTypeName() + "Converter");
JavaType converterType = new JavaType(javaPackage.getFullyQualifiedPackageName() + ".converter." + entity.getSimpleTypeName() + "Converter");
AnnotationMetadataBuilder annotationBuilder = new AnnotationMetadataBuilder(ROO_JSF_CONVERTER);
annotationBuilder.addClassAttribute("entity", entity);
String declaredByMetadataId = PhysicalTypeIdentifier.createIdentifier(converterType, Path.SRC_MAIN_JAVA);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package org.springframework.roo.addon.jsf;

import static org.springframework.roo.addon.jsf.JsfJavaType.DISPLAY_CREATE_DIALOG;
import static org.springframework.roo.addon.jsf.JsfJavaType.DISPLAY_LIST;
import static org.springframework.roo.addon.jsf.JsfJavaType.EL_CONTEXT;
import static org.springframework.roo.addon.jsf.JsfJavaType.EXPRESSION_FACTORY;
import static org.springframework.roo.addon.jsf.JsfJavaType.FACES_CONTEXT;
import static org.springframework.roo.addon.jsf.JsfJavaType.MANAGED_BEAN;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_DEFAULT_MENU_MODEL;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_MENU_ITEM;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_MENU_MODEL;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_SUB_MENU;
import static org.springframework.roo.addon.jsf.JsfJavaType.REQUEST_SCOPED;
import static org.springframework.roo.addon.jsf.JsfJavaType.SESSION_SCOPED;
import static org.springframework.roo.addon.jsf.JsfJavaType.VIEW_SCOPED;
package org.springframework.roo.addon.jsf.application;

import static org.springframework.roo.addon.jsf.model.JsfJavaType.DISPLAY_CREATE_DIALOG;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.DISPLAY_LIST;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.EL_CONTEXT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.EXPRESSION_FACTORY;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.FACES_CONTEXT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.MANAGED_BEAN;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_DEFAULT_MENU_MODEL;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_MENU_ITEM;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_MENU_MODEL;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_SUB_MENU;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.REQUEST_SCOPED;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.SESSION_SCOPED;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.VIEW_SCOPED;
import static org.springframework.roo.model.JdkJavaType.POST_CONSTRUCT;
import static org.springframework.roo.model.RooJavaType.ROO_JSF_MANAGED_BEAN;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.application;

import org.springframework.roo.classpath.itd.ItdTriggerBasedMetadataProvider;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.application;

import static org.springframework.roo.model.RooJavaType.ROO_JSF_APPLICATION_BEAN;
import static org.springframework.roo.model.RooJavaType.ROO_JSF_MANAGED_BEAN;
Expand All @@ -10,6 +10,7 @@
import org.apache.felix.scr.annotations.Service;
import org.osgi.service.component.ComponentContext;
import org.springframework.roo.addon.configurable.ConfigurableMetadataProvider;
import org.springframework.roo.addon.jsf.managedbean.JsfManagedBeanMetadata;
import org.springframework.roo.classpath.PhysicalTypeIdentifier;
import org.springframework.roo.classpath.PhysicalTypeMetadata;
import org.springframework.roo.classpath.TypeLocationService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.application;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.converter;

import static org.springframework.roo.model.RooJavaType.ROO_JSF_CONVERTER;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.converter;

import static java.lang.reflect.Modifier.PUBLIC;
import static org.springframework.roo.addon.jsf.JsfJavaType.CONVERTER;
import static org.springframework.roo.addon.jsf.JsfJavaType.FACES_CONTEXT;
import static org.springframework.roo.addon.jsf.JsfJavaType.FACES_CONVERTER;
import static org.springframework.roo.addon.jsf.JsfJavaType.UI_COMPONENT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.CONVERTER;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.FACES_CONTEXT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.FACES_CONVERTER;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.UI_COMPONENT;
import static org.springframework.roo.model.JavaType.OBJECT;

import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.converter;

import org.springframework.roo.classpath.itd.ItdTriggerBasedMetadataProvider;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.converter;

import static org.springframework.roo.classpath.customdata.CustomDataKeys.FIND_ALL_METHOD;
import static org.springframework.roo.classpath.customdata.CustomDataKeys.PERSISTENT_TYPE;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.converter;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.managedbean;

import static org.springframework.roo.model.RooJavaType.ROO_JSF_MANAGED_BEAN;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.managedbean;

import static java.lang.reflect.Modifier.PRIVATE;
import static java.lang.reflect.Modifier.PUBLIC;
import static org.springframework.roo.addon.jsf.JsfJavaType.DATE_TIME_CONVERTER;
import static org.springframework.roo.addon.jsf.JsfJavaType.DISPLAY_CREATE_DIALOG;
import static org.springframework.roo.addon.jsf.JsfJavaType.DISPLAY_LIST;
import static org.springframework.roo.addon.jsf.JsfJavaType.DOUBLE_RANGE_VALIDATOR;
import static org.springframework.roo.addon.jsf.JsfJavaType.EL_CONTEXT;
import static org.springframework.roo.addon.jsf.JsfJavaType.ENUM_CONVERTER;
import static org.springframework.roo.addon.jsf.JsfJavaType.EXPRESSION_FACTORY;
import static org.springframework.roo.addon.jsf.JsfJavaType.FACES_CONTEXT;
import static org.springframework.roo.addon.jsf.JsfJavaType.FACES_MESSAGE;
import static org.springframework.roo.addon.jsf.JsfJavaType.HTML_OUTPUT_TEXT;
import static org.springframework.roo.addon.jsf.JsfJavaType.HTML_PANEL_GRID;
import static org.springframework.roo.addon.jsf.JsfJavaType.LENGTH_VALIDATOR;
import static org.springframework.roo.addon.jsf.JsfJavaType.LONG_RANGE_VALIDATOR;
import static org.springframework.roo.addon.jsf.JsfJavaType.MANAGED_BEAN;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_AUTO_COMPLETE;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_CALENDAR;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_CLOSE_EVENT;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_COMMAND_BUTTON;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_DEFAULT_STREAMED_CONTENT;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_FILE_DOWNLOAD_ACTION_LISTENER;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_FILE_UPLOAD;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_FILE_UPLOAD_EVENT;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_INPUT_TEXT;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_INPUT_TEXTAREA;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_MESSAGE;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_REQUEST_CONTEXT;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_SELECT_BOOLEAN_CHECKBOX;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_SELECT_MANY_MENU;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_SPINNER;
import static org.springframework.roo.addon.jsf.JsfJavaType.PRIMEFACES_STREAMED_CONTENT;
import static org.springframework.roo.addon.jsf.JsfJavaType.REQUEST_SCOPED;
import static org.springframework.roo.addon.jsf.JsfJavaType.SESSION_SCOPED;
import static org.springframework.roo.addon.jsf.JsfJavaType.UI_SELECT_ITEM;
import static org.springframework.roo.addon.jsf.JsfJavaType.UI_SELECT_ITEMS;
import static org.springframework.roo.addon.jsf.JsfJavaType.VIEW_SCOPED;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.DATE_TIME_CONVERTER;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.DISPLAY_CREATE_DIALOG;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.DISPLAY_LIST;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.DOUBLE_RANGE_VALIDATOR;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.EL_CONTEXT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.ENUM_CONVERTER;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.EXPRESSION_FACTORY;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.FACES_CONTEXT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.FACES_MESSAGE;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.HTML_OUTPUT_TEXT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.HTML_PANEL_GRID;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.LENGTH_VALIDATOR;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.LONG_RANGE_VALIDATOR;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.MANAGED_BEAN;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_AUTO_COMPLETE;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_CALENDAR;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_CLOSE_EVENT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_COMMAND_BUTTON;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_DEFAULT_STREAMED_CONTENT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_FILE_DOWNLOAD_ACTION_LISTENER;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_FILE_UPLOAD;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_FILE_UPLOAD_EVENT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_INPUT_TEXT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_INPUT_TEXTAREA;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_MESSAGE;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_REQUEST_CONTEXT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_SELECT_BOOLEAN_CHECKBOX;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_SELECT_MANY_MENU;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_SPINNER;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.PRIMEFACES_STREAMED_CONTENT;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.REQUEST_SCOPED;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.SESSION_SCOPED;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.UI_SELECT_ITEM;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.UI_SELECT_ITEMS;
import static org.springframework.roo.addon.jsf.model.JsfJavaType.VIEW_SCOPED;
import static org.springframework.roo.classpath.customdata.CustomDataKeys.FIND_ALL_METHOD;
import static org.springframework.roo.classpath.customdata.CustomDataKeys.MERGE_METHOD;
import static org.springframework.roo.classpath.customdata.CustomDataKeys.PERSIST_METHOD;
Expand Down Expand Up @@ -64,6 +64,8 @@
import java.util.Map;
import java.util.Set;

import org.springframework.roo.addon.jsf.model.JsfFieldHolder;
import org.springframework.roo.addon.jsf.model.UploadedFileContentType;
import org.springframework.roo.classpath.PhysicalTypeIdentifierNamingUtils;
import org.springframework.roo.classpath.PhysicalTypeMetadata;
import org.springframework.roo.classpath.customdata.CustomDataKeys;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.managedbean;

import org.springframework.roo.classpath.itd.ItdTriggerBasedMetadataProvider;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.managedbean;

import static org.springframework.roo.classpath.customdata.CustomDataKeys.COUNT_ALL_METHOD;
import static org.springframework.roo.classpath.customdata.CustomDataKeys.EMBEDDED_FIELD;
Expand Down Expand Up @@ -28,6 +28,7 @@
import org.apache.felix.scr.annotations.Service;
import org.osgi.service.component.ComponentContext;
import org.springframework.roo.addon.configurable.ConfigurableMetadataProvider;
import org.springframework.roo.addon.jsf.model.JsfFieldHolder;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.classpath.PhysicalTypeCategory;
import org.springframework.roo.classpath.PhysicalTypeIdentifier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.managedbean;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.model;

import static org.springframework.roo.model.RooJavaType.ROO_UPLOADED_FILE;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.model;

import org.springframework.roo.model.JavaType;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.model;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.model;

/**
* Enum to represent PrimeFaces themes. PrimeFaces is integrated with the <a href="http://jqueryui.com/themeroller/">ThemeRoller</a> CSS framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.jsf;
package org.springframework.roo.addon.jsf.model;


/**
Expand Down

0 comments on commit efa3044

Please sign in to comment.