You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/07/21 23:01:27 UTC
svn commit: r678567 - in
/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra:
connectionManager/ conversation/ conversation/versioning/ dynaForm/
dynaForm/annot/ dynaForm/jsf/component/ dynaForm/jsf/guiBuilder/
dynaForm/jsf/guiB...
Author: skitching
Date: Mon Jul 21 14:01:26 2008
New Revision: 678567
URL: http://svn.apache.org/viewvc?rev=678567&view=rev
Log:
Code style fixes (wrap long lines, use UPPER_CASE for constants, fix license headers, no wildcard imports etc).
Modified:
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnectionFactory.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/SerializingConversationDataHolder.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/VersioningConversation.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/annot/package-info.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/component/DynaForm.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/component/package-info.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/GuiBuilder.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/jsf/JsfGuiBuilder.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/jsf/JsfGuiBuilderFactory.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/MyFacesCheck.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/MyFacesGuiBuilder.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/SuggestSelectListMethodWrapper.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/lib/NullObject.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/lib/_FacesUtils.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/impl/ejb/ClassHelperFactory.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/impl/ejb/EjbExtractor.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/package-info.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/utils/TypeInfos.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/package-info.java
myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/uri/FacesUriResolver.java
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnectionFactory.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnectionFactory.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnectionFactory.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnectionFactory.java Mon Jul 21 14:01:26 2008
@@ -97,7 +97,8 @@
}
catch (SQLException e)
{
- LogFactory.getLog(DisconnectableConnectionFactory.class).warn(e.getLocalizedMessage(), e);
+ LogFactory.getLog(DisconnectableConnectionFactory.class).warn(
+ e.getLocalizedMessage(), e);
}
}
}
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/SerializingConversationDataHolder.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/SerializingConversationDataHolder.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/SerializingConversationDataHolder.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/SerializingConversationDataHolder.java Mon Jul 21 14:01:26 2008
@@ -18,7 +18,11 @@
*/
package org.apache.myfaces.orchestra.conversation;
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
import java.util.Map;
/**
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/VersioningConversation.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/VersioningConversation.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/VersioningConversation.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/conversation/versioning/VersioningConversation.java Mon Jul 21 14:01:26 2008
@@ -19,13 +19,18 @@
package org.apache.myfaces.orchestra.conversation.versioning;
+import java.util.Map;
+import java.util.Stack;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.orchestra.conversation.*;
+import org.apache.myfaces.orchestra.conversation.Conversation;
+import org.apache.myfaces.orchestra.conversation.ConversationContext;
+import org.apache.myfaces.orchestra.conversation.ConversationDataHolder;
+import org.apache.myfaces.orchestra.conversation.ConversationFactory;
+import org.apache.myfaces.orchestra.conversation.SerializingConversationDataHolder;
import org.apache.myfaces.orchestra.conversation.versioning.spring.SpringVersioningScope;
-import java.util.*;
-
/**
* A special kind of conversation which provides snapshot- and rollback functionality.
* Both commands can be triggered from within a version scoped managed-bean.
@@ -52,7 +57,8 @@
// choosen strategy to store the data
private String versioningStrategy;
- public VersioningConversation(ConversationContext conversationContext, String name, ConversationFactory factory, String strategy)
+ public VersioningConversation(ConversationContext conversationContext,
+ String name, ConversationFactory factory, String strategy)
{
super(conversationContext, name, factory);
versioningStrategy = strategy;
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/annot/package-info.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/annot/package-info.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/annot/package-info.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/annot/package-info.java Mon Jul 21 14:01:26 2008
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/**
* Provide annotations that can be used with a DynaForm.
* <p>
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/component/DynaForm.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/component/DynaForm.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/component/DynaForm.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/component/DynaForm.java Mon Jul 21 14:01:26 2008
@@ -485,7 +485,8 @@
}
if (dynaFormComponent == null)
{
- throw new IllegalArgumentException("component with id '" + component.getId() + "' not contained in an dynaForm");
+ throw new IllegalArgumentException(
+ "component with id '" + component.getId() + "' not contained in an dynaForm");
}
return (DynaForm) dynaFormComponent;
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/component/package-info.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/component/package-info.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/component/package-info.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/component/package-info.java Mon Jul 21 14:01:26 2008
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/**
* This package declares a couple of JSF components plus the jsp tags that can be
* used to add those components to a view-tree.
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/GuiBuilder.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/GuiBuilder.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/GuiBuilder.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/GuiBuilder.java Mon Jul 21 14:01:26 2008
@@ -22,6 +22,7 @@
import org.apache.myfaces.orchestra.dynaForm.metadata.MetaField;
import org.apache.myfaces.orchestra.dynaForm.metadata.RelationType;
import org.apache.myfaces.orchestra.dynaForm.metadata.utils.TypeInfos;
+import org.apache.myfaces.orchestra.lib.OrchestraException;
import java.util.Date;
import java.util.Map;
@@ -199,6 +200,10 @@
case InputBoolean:
createInputBoolean(field);
return true;
+
+ default:
+ throw new OrchestraException("Unhandled wantedComponentType");
+
}
}
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/jsf/JsfGuiBuilder.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/jsf/JsfGuiBuilder.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/jsf/JsfGuiBuilder.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/jsf/JsfGuiBuilder.java Mon Jul 21 14:01:26 2008
@@ -59,6 +59,8 @@
import javax.faces.el.MethodBinding;
import javax.faces.validator.DoubleRangeValidator;
import javax.faces.validator.LengthValidator;
+import javax.persistence.TemporalType;
+
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
@@ -77,7 +79,8 @@
private NewComponentListener newComponentListener;
private String backingEntityPrefix;
- private static final Map<String, JsfGuiElementBuilder> builderMap = new TreeMap<String, JsfGuiElementBuilder>();
+ private static final Map<String, JsfGuiElementBuilder> BUILDER_MAP =
+ new TreeMap<String, JsfGuiElementBuilder>();
public JsfGuiBuilder()
{
@@ -88,7 +91,7 @@
*/
public static void addElementBuilder(Class<?> elementType, JsfGuiElementBuilder builder)
{
- builderMap.put(elementType.getName(), builder);
+ BUILDER_MAP.put(elementType.getName(), builder);
}
public String getBackingEntityPrefix()
@@ -429,9 +432,10 @@
{
DateTimeConverter cnv = (DateTimeConverter) context.getApplication()
.createConverter("javax.faces.DateTime");
- if (field.getTemporalType() != null)
+ TemporalType fieldType = field.getTemporalType();
+ if (fieldType != null)
{
- switch (field.getTemporalType())
+ switch (fieldType)
{
case DATE:
cnv.setType("date");
@@ -442,6 +446,9 @@
case TIMESTAMP:
cnv.setType("both");
break;
+
+ default:
+ throw new IllegalArgumentException("Unsupported TemporalType:" + fieldType);
}
}
else
@@ -642,7 +649,9 @@
itemSourceName=field.getName();
break;
default:
- throw new IllegalArgumentException("dont know how to handle selectionSource: " + field.getSelectionSource());
+ throw new IllegalArgumentException(
+ "dont know how to handle selectionSource: " +
+ field.getSelectionSource());
}
*/
@@ -1124,7 +1133,7 @@
if (field.getType() != null)
{
- JsfGuiElementBuilder builder = builderMap.get(field.getType().getName());
+ JsfGuiElementBuilder builder = BUILDER_MAP.get(field.getType().getName());
if (builder != null)
{
if (builder.buildElement(this, field))
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/jsf/JsfGuiBuilderFactory.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/jsf/JsfGuiBuilderFactory.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/jsf/JsfGuiBuilderFactory.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/jsf/JsfGuiBuilderFactory.java Mon Jul 21 14:01:26 2008
@@ -103,7 +103,8 @@
{
// See whether the sandbox implementation is also in the classpath. This
// generates nicer output...
- String myfacesImpl = "org.apache.myfaces.orchestra.dynaForm.jsf.guiBuilder.impl.myfaces.MyFacesGuiBuilder";
+ String myfacesImpl =
+ "org.apache.myfaces.orchestra.dynaForm.jsf.guiBuilder.impl.myfaces.MyFacesGuiBuilder";
@SuppressWarnings("unchecked")
Class<? extends JsfGuiBuilder> myfacesGuiBuilder =
ClassUtils.classForName(myfacesImpl);
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/MyFacesCheck.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/MyFacesCheck.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/MyFacesCheck.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/MyFacesCheck.java Mon Jul 21 14:01:26 2008
@@ -20,7 +20,7 @@
public final class MyFacesCheck
{
- private static final boolean tomahawkAvailable;
+ private static final boolean TOMAHAWK_AVAILABLE;
static
{
@@ -33,7 +33,7 @@
{
clazz = null;
}
- tomahawkAvailable = clazz != null;
+ TOMAHAWK_AVAILABLE = clazz != null;
}
private MyFacesCheck()
@@ -42,6 +42,6 @@
public static boolean isTomahawkAvailable()
{
- return tomahawkAvailable;
+ return TOMAHAWK_AVAILABLE;
}
}
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/MyFacesGuiBuilder.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/MyFacesGuiBuilder.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/MyFacesGuiBuilder.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/MyFacesGuiBuilder.java Mon Jul 21 14:01:26 2008
@@ -57,7 +57,8 @@
|| BigDecimal.class.isAssignableFrom(type))
{
// use the super duper intelligent number converter
- TypedNumberConverter converter = (TypedNumberConverter) getContext().getApplication().createConverter(TypedNumberConverter.CONVERTER_ID);
+ TypedNumberConverter converter = (TypedNumberConverter) getContext().getApplication()
+ .createConverter(TypedNumberConverter.CONVERTER_ID);
converter.setDestType(type);
return converter;
}
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/SuggestSelectListMethodWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/SuggestSelectListMethodWrapper.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/SuggestSelectListMethodWrapper.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/jsf/guiBuilder/impl/myfaces/SuggestSelectListMethodWrapper.java Mon Jul 21 14:01:26 2008
@@ -70,7 +70,10 @@
if (!(items instanceof Collection))
{
- throw new UnsupportedOperationException("unknown return type " + items.getClass().getName() + " for " + getExpressionString() + " awaited instanceof java.util.Collection");
+ throw new UnsupportedOperationException(
+ "unknown return type " + items.getClass().getName() +
+ " for " + getExpressionString() +
+ " awaited instanceof java.util.Collection");
}
Collection<?> coll = (Collection<?>) items;
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/lib/NullObject.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/lib/NullObject.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/lib/NullObject.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/lib/NullObject.java Mon Jul 21 14:01:26 2008
@@ -33,4 +33,10 @@
{
return obj == null || obj instanceof NullObject;
}
+
+ @Override
+ public int hashCode()
+ {
+ return 1;
+ }
}
\ No newline at end of file
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/lib/_FacesUtils.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/lib/_FacesUtils.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/lib/_FacesUtils.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/lib/_FacesUtils.java Mon Jul 21 14:01:26 2008
@@ -46,10 +46,10 @@
String.class
};
- private static final Method _methodGELC = getMethod(FacesContext.class, "getELContext", (Class[]) null);
- private static final Method _methodGVE = getMethod(UIComponent.class, "getValueExpression", ARGS_GET_VALUE_EXPR);
- private static final Method _methodSVE = getMethod(UIComponent.class, "setValueExpression", ARGS_SET_VALUE_EXPR);
- private static final Method _methodEF = getMethod(Application.class, "getExpressionFactory", (Class[]) null);
+ private static final Method _METHOD_GELC = getMethod(FacesContext.class, "getELContext", (Class[]) null);
+ private static final Method _METHOD_GVE = getMethod(UIComponent.class, "getValueExpression", ARGS_GET_VALUE_EXPR);
+ private static final Method _METHOD_SVE = getMethod(UIComponent.class, "setValueExpression", ARGS_SET_VALUE_EXPR);
+ private static final Method _METHOD_EF = getMethod(Application.class, "getExpressionFactory", (Class[]) null);
private _FacesUtils()
{
@@ -91,12 +91,12 @@
public static void copyRendered(UIComponent source, UIComponent destination)
{
boolean renderedSet = false;
- if (_methodGVE != null)
+ if (_METHOD_GVE != null)
{
- ValueExpression ve = invoke(ValueExpression.class, _methodGVE, source, new Object[] {"rendered"});
+ ValueExpression ve = invoke(ValueExpression.class, _METHOD_GVE, source, new Object[] {"rendered"});
if (ve != null)
{
- invoke(Void.class, _methodSVE, destination, new Object[]{"rendered", ve});
+ invoke(Void.class, _METHOD_SVE, destination, new Object[]{"rendered", ve});
renderedSet = true;
}
}
@@ -131,17 +131,17 @@
public static void setValueExpression(UIComponent cmp, ELContext elCtx, FacesContext context, String vbString)
{
Application app = context.getApplication();
- if (_methodGELC != null)
+ if (_METHOD_GELC != null)
{
if (elCtx == null)
{
- elCtx = invoke(ELContext.class, _methodGELC, context, (Object[]) null);
+ elCtx = invoke(ELContext.class, _METHOD_GELC, context, (Object[]) null);
}
- ExpressionFactory expressionFactory = invoke(ExpressionFactory.class, _methodEF, app, (Object[]) null);
+ ExpressionFactory expressionFactory = invoke(ExpressionFactory.class, _METHOD_EF, app, (Object[]) null);
ValueExpression ve = expressionFactory.createValueExpression(elCtx, vbString, Object.class);
- invoke(Void.class, _methodSVE, cmp, new Object[] {"value", ve});
+ invoke(Void.class, _METHOD_SVE, cmp, new Object[] {"value", ve});
}
else
{
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/impl/ejb/ClassHelperFactory.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/impl/ejb/ClassHelperFactory.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/impl/ejb/ClassHelperFactory.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/impl/ejb/ClassHelperFactory.java Mon Jul 21 14:01:26 2008
@@ -20,12 +20,12 @@
public class ClassHelperFactory
{
- private static final String[] helperClasses = new String[] {
+ private static final String[] HELPER_CLASSES = new String[] {
"org.apache.myfaces.orchestra.dynaForm.metadata.impl.ejb.AsmHelper",
"org.apache.myfaces.orchestra.dynaForm.metadata.impl.ejb.BcelHelper"
};
- private static final ClassHelper classHelper = newClassHelper();
+ private static final ClassHelper CLASS_HELPER = newClassHelper();
private ClassHelperFactory()
{
@@ -33,13 +33,13 @@
public static ClassHelper get()
{
- return classHelper;
+ return CLASS_HELPER;
}
public static ClassHelper newClassHelper()
{
ClassLoader cl = ClassHelperFactory.class.getClassLoader();
- for(String helperClassName: helperClasses)
+ for(String helperClassName: HELPER_CLASSES)
{
try
{
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/impl/ejb/EjbExtractor.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/impl/ejb/EjbExtractor.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/impl/ejb/EjbExtractor.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/impl/ejb/EjbExtractor.java Mon Jul 21 14:01:26 2008
@@ -401,14 +401,18 @@
protected boolean processEmbedded(Context context, MetaDataWritable metaData, AccessibleObject accessibleObject,
String name, Class<?> type)
{
- if (accessibleObject.isAnnotationPresent(Embedded.class) || accessibleObject.isAnnotationPresent(Id.class) || accessibleObject.isAnnotationPresent(EmbeddedId.class))
+ if (accessibleObject.isAnnotationPresent(Embedded.class)
+ || accessibleObject.isAnnotationPresent(Id.class)
+ || accessibleObject.isAnnotationPresent(EmbeddedId.class))
{
if (type.isAnnotationPresent(Embeddable.class) || type.isAnnotationPresent(MappedSuperclass.class))
{
// process embedded type
try
{
- boolean isId = context.isId() || accessibleObject.isAnnotationPresent(Id.class) || accessibleObject.isAnnotationPresent(EmbeddedId.class);
+ boolean isId = context.isId()
+ || accessibleObject.isAnnotationPresent(Id.class)
+ || accessibleObject.isAnnotationPresent(EmbeddedId.class);
context.startEmbedded(name, true, isId);
@@ -514,11 +518,14 @@
Object componentHandlerBean = FrameworkAdapter.getCurrentInstance().getBean(componentHandlerBeanName);
if (componentHandlerBean == null)
{
- throw new IllegalArgumentException("no component handler with bean name " + componentHandlerBeanName + " found.");
+ throw new IllegalArgumentException(
+ "no component handler with bean name " + componentHandlerBeanName + " found.");
}
if (!(componentHandlerBean instanceof DynaFormComponentHandler))
{
- throw new IllegalArgumentException("component handler with bean name " + componentHandlerBeanName + " doesn't implement the " + DynaFormComponentHandler.class.getName() + " interface.");
+ throw new IllegalArgumentException(
+ "component handler with bean name " + componentHandlerBeanName +
+ " doesn't implement the " + DynaFormComponentHandler.class.getName() + " interface.");
}
mdField.setComponentHandler((DynaFormComponentHandler) componentHandlerBean);
@@ -609,7 +616,8 @@
// ... but override with our own Temporal if required
if (accessibleObject.isAnnotationPresent(org.apache.myfaces.orchestra.dynaForm.annot.ui.Temporal.class))
{
- org.apache.myfaces.orchestra.dynaForm.annot.ui.Temporal temporal = accessibleObject.getAnnotation(org.apache.myfaces.orchestra.dynaForm.annot.ui.Temporal.class);
+ org.apache.myfaces.orchestra.dynaForm.annot.ui.Temporal temporal =
+ accessibleObject.getAnnotation(org.apache.myfaces.orchestra.dynaForm.annot.ui.Temporal.class);
mdField.setTemporalType(temporal.value());
}
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/package-info.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/package-info.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/package-info.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/package-info.java Mon Jul 21 14:01:26 2008
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/**
* This package exposes sufficient information about the properties of
* persistent entities for the DynaForm to create the correct JSF input
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/utils/TypeInfos.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/utils/TypeInfos.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/utils/TypeInfos.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/metadata/utils/TypeInfos.java Mon Jul 21 14:01:26 2008
@@ -103,10 +103,14 @@
static
{
- addInfo(new Info(true, (double) Byte.MIN_VALUE, (double) Byte.MAX_VALUE, false), Byte.class, Byte.TYPE);
- addInfo(new Info(true, (double) Short.MIN_VALUE, (double) Short.MAX_VALUE, false), Short.class, Short.TYPE);
- addInfo(new Info(true, (double) Integer.MIN_VALUE, (double) Integer.MAX_VALUE, false), Integer.class, Integer.TYPE);
- addInfo(new Info(true, (double) Long.MIN_VALUE, (double) Long.MAX_VALUE, false), Long.class, Long.TYPE);
+ addInfo(new Info(true, (double) Byte.MIN_VALUE, (double) Byte.MAX_VALUE, false),
+ Byte.class, Byte.TYPE);
+ addInfo(new Info(true, (double) Short.MIN_VALUE, (double) Short.MAX_VALUE, false),
+ Short.class, Short.TYPE);
+ addInfo(new Info(true, (double) Integer.MIN_VALUE, (double) Integer.MAX_VALUE, false),
+ Integer.class, Integer.TYPE);
+ addInfo(new Info(true, (double) Long.MIN_VALUE, (double) Long.MAX_VALUE, false),
+ Long.class, Long.TYPE);
addInfo(new Info(true, null, null, false), BigInteger.class);
addInfo(new Info(true, null, (double) Float.MAX_VALUE, true), Float.class, Float.TYPE);
addInfo(new Info(true, null, Double.MAX_VALUE, true), Double.class, Double.TYPE);
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/package-info.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/package-info.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/package-info.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/package-info.java Mon Jul 21 14:01:26 2008
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/**
* Defines a DynaForm JSF component that can render a "form" to
* display/edit/create instances of some persistent entity.
Modified: myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/uri/FacesUriResolver.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/uri/FacesUriResolver.java?rev=678567&r1=678566&r2=678567&view=diff
==============================================================================
--- myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/uri/FacesUriResolver.java (original)
+++ myfaces/orchestra/trunk/sandbox/src/main/java/org/apache/myfaces/orchestra/dynaForm/uri/FacesUriResolver.java Mon Jul 21 14:01:26 2008
@@ -29,7 +29,8 @@
@Override
protected InputStream findConfig(String config)
{
- InputStream is = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream("/WEB-INF/" + config);
+ InputStream is = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream(
+ "/WEB-INF/" + config);
if (is != null)
{
return is;