You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2012/01/22 07:59:23 UTC
svn commit: r1234453 [12/33] - in /incubator/isis/trunk/framework/core:
commons/src/main/java/org/apache/isis/core/commons/authentication/
commons/src/main/java/org/apache/isis/core/commons/components/
commons/src/main/java/org/apache/isis/core/commons...
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/MethodFinderUtils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/MethodFinderUtils.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/MethodFinderUtils.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/MethodFinderUtils.java Sun Jan 22 06:58:43 2012
@@ -30,27 +30,25 @@ public final class MethodFinderUtils {
private MethodFinderUtils() {
}
- public static Method findMethodWithOrWithoutParameters(final Class<?> type, final MethodScope classMethod,
- final String name, final Class<?> returnType, final Class<?>[] paramTypes) {
+ public static Method findMethodWithOrWithoutParameters(final Class<?> type, final MethodScope classMethod, final String name, final Class<?> returnType, final Class<?>[] paramTypes) {
Method method = MethodFinderUtils.findMethod(type, classMethod, name, returnType, paramTypes);
if (method == null) {
- method =
- MethodFinderUtils.findMethod(type, classMethod, name, returnType,
- MethodPrefixBasedFacetFactoryAbstract.NO_PARAMETERS_TYPES);
+ method = MethodFinderUtils.findMethod(type, classMethod, name, returnType, MethodPrefixBasedFacetFactoryAbstract.NO_PARAMETERS_TYPES);
}
return method;
}
/**
- * Returns a specific public methods that: have the specified prefix; have the specified return type, or void, if
- * canBeVoid is true; and has the specified number of parameters. If the returnType is specified as null then the
- * return type is ignored.
+ * Returns a specific public methods that: have the specified prefix; have
+ * the specified return type, or void, if canBeVoid is true; and has the
+ * specified number of parameters. If the returnType is specified as null
+ * then the return type is ignored.
*
* @param paramTypes
- * the set of parameters the method should have, if null then is ignored
+ * the set of parameters the method should have, if null then is
+ * ignored
*/
- public static Method findMethod(final Class<?> type, final MethodScope methodScope, final String name,
- final Class<?> returnType, final Class<?>[] paramTypes) {
+ public static Method findMethod(final Class<?> type, final MethodScope methodScope, final String name, final Class<?> returnType, final Class<?>[] paramTypes) {
Method method;
try {
method = type.getMethod(name, paramTypes);
@@ -103,8 +101,7 @@ public final class MethodFinderUtils {
return methodScope.doesNotMatchScope(method);
}
- public static Method findMethod(final Class<?> type, final MethodScope methodScope, final String name,
- final Class<?> returnType) {
+ public static Method findMethod(final Class<?> type, final MethodScope methodScope, final String name, final Class<?> returnType) {
try {
final Method[] methods = type.getMethods();
for (final Method method2 : methods) {
@@ -137,28 +134,27 @@ public final class MethodFinderUtils {
return null;
}
- public static List<Method> findMethodsWithAnnotation(final Class<?> type, final MethodScope methodScope,
- Class<? extends Annotation> annotationClass) {
+ public static List<Method> findMethodsWithAnnotation(final Class<?> type, final MethodScope methodScope, final Class<? extends Annotation> annotationClass) {
- List<Method> methods = new ArrayList<Method>();
+ final List<Method> methods = new ArrayList<Method>();
- // Validate arguments
- if ( (type == null) || (methodScope == null) || (annotationClass == null)) {
- throw new IllegalArgumentException("One or more arguments are 'null' valued");
- }
+ // Validate arguments
+ if ((type == null) || (methodScope == null) || (annotationClass == null)) {
+ throw new IllegalArgumentException("One or more arguments are 'null' valued");
+ }
- // Find methods annotated with the specified annotation
- for (Method method : type.getMethods()) {
+ // Find methods annotated with the specified annotation
+ for (final Method method : type.getMethods()) {
if (!methodScope.matchesScopeOf(method)) {
continue;
}
- if (method.isAnnotationPresent(annotationClass)) {
- methods.add(method);
- }
- }
+ if (method.isAnnotationPresent(annotationClass)) {
+ methods.add(method);
+ }
+ }
- return methods;
+ return methods;
}
public static void removeMethod(final MethodRemover methodRemover, final Method method) {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/MethodPrefixBasedFacetFactoryAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/MethodPrefixBasedFacetFactoryAbstract.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/MethodPrefixBasedFacetFactoryAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/MethodPrefixBasedFacetFactoryAbstract.java Sun Jan 22 06:58:43 2012
@@ -27,8 +27,7 @@ import org.apache.isis.core.metamodel.fa
import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
import org.apache.isis.core.metamodel.facets.MethodPrefixBasedFacetFactory;
-public abstract class MethodPrefixBasedFacetFactoryAbstract extends FacetFactoryAbstract implements
- MethodPrefixBasedFacetFactory {
+public abstract class MethodPrefixBasedFacetFactoryAbstract extends FacetFactoryAbstract implements MethodPrefixBasedFacetFactory {
private final List<String> prefixes;
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/MethodPrefixConstants.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/MethodPrefixConstants.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/MethodPrefixConstants.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/MethodPrefixConstants.java Sun Jan 22 06:58:43 2012
@@ -45,8 +45,7 @@ public class MethodPrefixConstants {
public static final String VALIDATE_ADD_TO_PREFIX = VALIDATE_PREFIX + ADD_TO_PREFIX;
public static final String VALIDATE_ADD_TO_PREFIX_2 = VALIDATE_PREFIX + StringUtils.capitalize(ADD_TO_PREFIX);
public static final String VALIDATE_REMOVE_FROM_PREFIX = VALIDATE_PREFIX + REMOVE_FROM_PREFIX;
- public static final String VALIDATE_REMOVE_FROM_PREFIX_2 = VALIDATE_PREFIX
- + StringUtils.capitalize(REMOVE_FROM_PREFIX);
+ public static final String VALIDATE_REMOVE_FROM_PREFIX_2 = VALIDATE_PREFIX + StringUtils.capitalize(REMOVE_FROM_PREFIX);
public static final String FIELD_PREFIX = "field";
public static final String ACTION_PREFIX = "action";
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/PropertyOrCollectionIdentifyingFacetFactoryAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/PropertyOrCollectionIdentifyingFacetFactoryAbstract.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/PropertyOrCollectionIdentifyingFacetFactoryAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/PropertyOrCollectionIdentifyingFacetFactoryAbstract.java Sun Jan 22 06:58:43 2012
@@ -27,13 +27,11 @@ import org.apache.isis.core.metamodel.fa
import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistry;
import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistryAware;
-public abstract class PropertyOrCollectionIdentifyingFacetFactoryAbstract extends MethodPrefixBasedFacetFactoryAbstract
- implements PropertyOrCollectionIdentifyingFacetFactory, CollectionTypeRegistryAware {
+public abstract class PropertyOrCollectionIdentifyingFacetFactoryAbstract extends MethodPrefixBasedFacetFactoryAbstract implements PropertyOrCollectionIdentifyingFacetFactory, CollectionTypeRegistryAware {
private CollectionTypeRegistry collectionTypeRegistry;
- public PropertyOrCollectionIdentifyingFacetFactoryAbstract(final List<FeatureType> featureTypes,
- final String... prefixes) {
+ public PropertyOrCollectionIdentifyingFacetFactoryAbstract(final List<FeatureType> featureTypes, final String... prefixes) {
super(featureTypes, prefixes);
}
@@ -50,8 +48,9 @@ public abstract class PropertyOrCollecti
}
/**
- * Injected so can propogate to any {@link #registerFactory(FacetFactory) registered} {@link FacetFactory} s that
- * are also {@link CollectionTypeRegistryAware}.
+ * Injected so can propogate to any {@link #registerFactory(FacetFactory)
+ * registered} {@link FacetFactory} s that are also
+ * {@link CollectionTypeRegistryAware}.
*/
@Override
public void setCollectionTypeRegistry(final CollectionTypeRegistry collectionTypeRegistry) {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/debug/annotation/DebugAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/debug/annotation/DebugAnnotationFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/debug/annotation/DebugAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/debug/annotation/DebugAnnotationFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -28,7 +28,8 @@ import org.apache.isis.core.metamodel.fa
import org.apache.isis.core.progmodel.facets.actions.invoke.ActionInvocationFacetFactory;
/**
- * {@link DebugFacet} can also be installed via a naming convention, see {@link ActionInvocationFacetFactory}.
+ * {@link DebugFacet} can also be installed via a naming convention, see
+ * {@link ActionInvocationFacetFactory}.
*/
public class DebugAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/defaults/method/ActionDefaultsFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/defaults/method/ActionDefaultsFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/defaults/method/ActionDefaultsFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/defaults/method/ActionDefaultsFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -44,7 +44,8 @@ public class ActionDefaultsFacetFactory
private AdapterMap adapterMap;
/**
- * Note that the {@link Facet}s registered are the generic ones from noa-architecture (where they exist)
+ * Note that the {@link Facet}s registered are the generic ones from
+ * noa-architecture (where they exist)
*/
public ActionDefaultsFacetFactory() {
super(FeatureType.ACTIONS_ONLY, PREFIXES);
@@ -60,8 +61,7 @@ public class ActionDefaultsFacetFactory
attachActionDefaultsFacetIfParameterDefaultsMethodIsFound(processMethodContext);
}
- private static void attachActionDefaultsFacetIfParameterDefaultsMethodIsFound(
- final ProcessMethodContext processMethodContext) {
+ private static void attachActionDefaultsFacetIfParameterDefaultsMethodIsFound(final ProcessMethodContext processMethodContext) {
Method defaultsMethod = findDefaultsMethodReturning(processMethodContext, Object[].class);
if (defaultsMethod == null) {
@@ -78,8 +78,7 @@ public class ActionDefaultsFacetFactory
FacetUtil.addFacet(facet);
}
- private static Method findDefaultsMethodReturning(final ProcessMethodContext processMethodContext,
- final Class<?> returnType) {
+ private static Method findDefaultsMethodReturning(final ProcessMethodContext processMethodContext, final Class<?> returnType) {
final Method actionMethod = processMethodContext.getMethod();
final String capitalizedName = NameUtils.capitalizeName(actionMethod.getName());
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/defaults/method/ActionDefaultsFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/defaults/method/ActionDefaultsFacetViaMethod.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/defaults/method/ActionDefaultsFacetViaMethod.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/defaults/method/ActionDefaultsFacetViaMethod.java Sun Jan 22 06:58:43 2012
@@ -49,8 +49,7 @@ public class ActionDefaultsFacetViaMetho
Method method2;
final Facet actionInvocationFacet = holder.getFacet(ActionInvocationFacet.class);
if (actionInvocationFacet instanceof ActionInvocationFacetViaMethod) {
- final ActionInvocationFacetViaMethod facetViaMethod =
- (ActionInvocationFacetViaMethod) actionInvocationFacet;
+ final ActionInvocationFacetViaMethod facetViaMethod = (ActionInvocationFacetViaMethod) actionInvocationFacet;
method2 = facetViaMethod.getMethods().get(0);
} else {
method2 = null;
@@ -59,7 +58,8 @@ public class ActionDefaultsFacetViaMetho
}
/**
- * Returns a singleton list of the {@link Method} provided in the constructor.
+ * Returns a singleton list of the {@link Method} provided in the
+ * constructor.
*/
@Override
public List<Method> getMethods() {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/executed/annotation/ExecutedAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/executed/annotation/ExecutedAnnotationFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/executed/annotation/ExecutedAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/executed/annotation/ExecutedAnnotationFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -28,10 +28,12 @@ import org.apache.isis.core.metamodel.fa
import org.apache.isis.core.progmodel.facets.actions.invoke.ActionInvocationFacetFactory;
/**
- * Creates an {@link ExecutedFacet} based on the presence of an {@link Executed} annotation.
+ * Creates an {@link ExecutedFacet} based on the presence of an {@link Executed}
+ * annotation.
*
* <p>
- * {@link ExecutedFacet} can also be installed via a naming convention, see {@link ActionInvocationFacetFactory}.
+ * {@link ExecutedFacet} can also be installed via a naming convention, see
+ * {@link ActionInvocationFacetFactory}.
*/
public class ExecutedAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/executed/prefix/ExecutedViaNamingConventionFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/executed/prefix/ExecutedViaNamingConventionFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/executed/prefix/ExecutedViaNamingConventionFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/executed/prefix/ExecutedViaNamingConventionFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -34,7 +34,8 @@ import org.apache.isis.core.progmodel.fa
* Creates an {@link ExecutedFacet} based on the prefix of the action's name.
*
* <p>
- * TODO: think that this prefix is handled by the {@link ActionInvocationFacetFactory}.
+ * TODO: think that this prefix is handled by the
+ * {@link ActionInvocationFacetFactory}.
*/
public class ExecutedViaNamingConventionFacetFactory extends FacetFactoryAbstract {
@@ -53,9 +54,7 @@ public class ExecutedViaNamingConvention
return;
}
- FacetUtil.addFacets(new Facet[] {
- new ExecutedFacetViaNamingConvention(ExecutedFacet.Where.LOCALLY, processMethodContext.getFacetHolder()),
- new NamedFacetInferred(capitalizedName.substring(5), processMethodContext.getFacetHolder()) });
+ FacetUtil.addFacets(new Facet[] { new ExecutedFacetViaNamingConvention(ExecutedFacet.Where.LOCALLY, processMethodContext.getFacetHolder()), new NamedFacetInferred(capitalizedName.substring(5), processMethodContext.getFacetHolder()) });
}
public boolean recognizes(final Method method) {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/exploration/annotation/ExplorationAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/exploration/annotation/ExplorationAnnotationFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/exploration/annotation/ExplorationAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/exploration/annotation/ExplorationAnnotationFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -28,7 +28,8 @@ import org.apache.isis.core.metamodel.fa
import org.apache.isis.core.progmodel.facets.actions.invoke.ActionInvocationFacetFactory;
/**
- * {@link ExplorationFacet} can also be installed via a naming convention, see {@link ActionInvocationFacetFactory}.
+ * {@link ExplorationFacet} can also be installed via a naming convention, see
+ * {@link ActionInvocationFacetFactory}.
*/
public class ExplorationAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/idempotent/IdempotentAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/idempotent/IdempotentAnnotationFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/idempotent/IdempotentAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/idempotent/IdempotentAnnotationFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -38,7 +38,6 @@ public class IdempotentAnnotationFacetFa
FacetUtil.addFacet(create(annotation, processMethodContext.getFacetHolder()));
}
-
private IdempotentFacet create(final Idempotent annotation, final FacetHolder holder) {
return annotation == null ? null : new IdempotentFacetAnnotation(holder);
}
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -40,24 +40,26 @@ import org.apache.isis.core.metamodel.sp
import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
/**
- * Sets up {@link ActionInvocationFacet}, along with a number of supporting facets that are based on the action's name.
+ * Sets up {@link ActionInvocationFacet}, along with a number of supporting
+ * facets that are based on the action's name.
*
* <p>
- * The supporting methods are: {@link ExecutedFacet}, {@link ExplorationFacet} and {@link DebugFacet}. In addition a
- * {@link NamedFacet} is inferred from the name (taking into account the above well-known prefixes).
+ * The supporting methods are: {@link ExecutedFacet}, {@link ExplorationFacet}
+ * and {@link DebugFacet}. In addition a {@link NamedFacet} is inferred from the
+ * name (taking into account the above well-known prefixes).
*/
public class ActionInvocationFacetFactory extends MethodPrefixBasedFacetFactoryAbstract implements AdapterMapAware {
private static final String EXPLORATION_PREFIX = "Exploration";
private static final String DEBUG_PREFIX = "Debug";
- private static final String[] PREFIXES = { EXPLORATION_PREFIX, DEBUG_PREFIX, ExecutedFacet.Where.REMOTE_PREFIX,
- ExecutedFacet.Where.LOCAL_PREFIX };
+ private static final String[] PREFIXES = { EXPLORATION_PREFIX, DEBUG_PREFIX, ExecutedFacet.Where.REMOTE_PREFIX, ExecutedFacet.Where.LOCAL_PREFIX };
private AdapterMap adapterMap;
/**
- * Note that the {@link Facet}s registered are the generic ones from noa-architecture (where they exist)
+ * Note that the {@link Facet}s registered are the generic ones from
+ * noa-architecture (where they exist)
*/
public ActionInvocationFacetFactory() {
super(FeatureType.ACTIONS_ONLY, PREFIXES);
@@ -79,8 +81,12 @@ public class ActionInvocationFacetFactor
attachExecutedFacetIfActionMethodNamePrefixed(processMethodContext);
// inferred name
- attachNamedFacetInferredFromMethodName(processMethodContext); // must be called after the
- // attachinvocationFacet methods
+ attachNamedFacetInferredFromMethodName(processMethodContext); // must be
+ // called
+ // after
+ // the
+ // attachinvocationFacet
+ // methods
}
@@ -99,16 +105,16 @@ public class ActionInvocationFacetFactor
final ObjectSpecification typeSpec = getSpecificationLookup().loadSpecification(cls);
final FacetHolder holder = processMethodContext.getFacetHolder();
- FacetUtil.addFacet(new ActionInvocationFacetViaMethod(actionMethod, typeSpec, returnSpec, holder,
- getAdapterMap()));
+ FacetUtil.addFacet(new ActionInvocationFacetViaMethod(actionMethod, typeSpec, returnSpec, holder, getAdapterMap()));
} finally {
processMethodContext.removeMethod(actionMethod);
}
}
/**
- * Adds the {@link ExecutedFacet} (indicating where the action should be executed, either {@link Where#LOCALLY
- * locally} or {@link Where#REMOTELY remotely}.
+ * Adds the {@link ExecutedFacet} (indicating where the action should be
+ * executed, either {@link Where#LOCALLY locally} or {@link Where#REMOTELY
+ * remotely}.
*/
private void attachExecutedFacetIfActionMethodNamePrefixed(final ProcessMethodContext processMethodContext) {
final Method actionMethod = processMethodContext.getMethod();
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetViaMethod.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetViaMethod.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/invoke/ActionInvocationFacetViaMethod.java Sun Jan 22 06:58:43 2012
@@ -47,8 +47,7 @@ public class ActionInvocationFacetViaMet
private final AdapterMap adapterMap;
- public ActionInvocationFacetViaMethod(final Method method, final ObjectSpecification onType,
- final ObjectSpecification returnType, final FacetHolder holder, final AdapterMap adapterMap) {
+ public ActionInvocationFacetViaMethod(final Method method, final ObjectSpecification onType, final ObjectSpecification returnType, final FacetHolder holder, final AdapterMap adapterMap) {
super(holder);
this.method = method;
this.paramCount = method.getParameterTypes().length;
@@ -58,7 +57,8 @@ public class ActionInvocationFacetViaMet
}
/**
- * Returns a singleton list of the {@link Method} provided in the constructor.
+ * Returns a singleton list of the {@link Method} provided in the
+ * constructor.
*/
@Override
public List<Method> getMethods() {
@@ -98,16 +98,14 @@ public class ActionInvocationFacetViaMet
final ObjectAdapter resultAdapter = getAdapterMap().adapterFor(result);
final TypeOfFacet typeOfFacet = getFacetHolder().getFacet(TypeOfFacet.class);
- resultAdapter.setElementSpecificationProvider(ElementSpecificationProviderFromTypeOfFacet
- .createFrom(typeOfFacet));
+ resultAdapter.setElementSpecificationProvider(ElementSpecificationProviderFromTypeOfFacet.createFrom(typeOfFacet));
return resultAdapter;
} catch (final IllegalArgumentException e) {
throw e;
} catch (final InvocationTargetException e) {
if (e.getTargetException() instanceof IllegalStateException) {
- throw new ReflectiveActionException("IllegalStateException thrown while executing " + method + " "
- + e.getTargetException().getMessage(), e.getTargetException());
+ throw new ReflectiveActionException("IllegalStateException thrown while executing " + method + " " + e.getTargetException().getMessage(), e.getTargetException());
} else {
InvokeUtils.invocationException("Exception executing " + method, e);
return null;
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notcontributed/NotContributedFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notcontributed/NotContributedFacet.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notcontributed/NotContributedFacet.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notcontributed/NotContributedFacet.java Sun Jan 22 06:58:43 2012
@@ -22,11 +22,12 @@ package org.apache.isis.core.progmodel.f
import org.apache.isis.core.metamodel.facetapi.Facet;
/**
- * Indicates that the (repository) action should not be contributed to any objects.
+ * Indicates that the (repository) action should not be contributed to any
+ * objects.
*
* <p>
- * In the standard Apache Isis Programming Model, corresponds to annotating the action method using
- * <tt>@NotContributed</tt>.
+ * In the standard Apache Isis Programming Model, corresponds to annotating the
+ * action method using <tt>@NotContributed</tt>.
*/
public interface NotContributedFacet extends Facet {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/NotInServiceMenuFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/NotInServiceMenuFacet.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/NotInServiceMenuFacet.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/NotInServiceMenuFacet.java Sun Jan 22 06:58:43 2012
@@ -24,11 +24,12 @@ import org.apache.isis.core.metamodel.fa
import org.apache.isis.core.metamodel.interactions.VisibilityContext;
/**
- * Indicates that the (repository) action should not be contributed to any objects.
+ * Indicates that the (repository) action should not be contributed to any
+ * objects.
*
* <p>
- * In the standard Apache Isis Programming Model, corresponds to annotating the action method using
- * <tt>@NotContributed</tt>.
+ * In the standard Apache Isis Programming Model, corresponds to annotating the
+ * action method using <tt>@NotContributed</tt>.
*/
public interface NotInServiceMenuFacet extends Facet {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/annotation/NotInServiceMenuFacetAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/annotation/NotInServiceMenuFacetAnnotation.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/annotation/NotInServiceMenuFacetAnnotation.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/annotation/NotInServiceMenuFacetAnnotation.java Sun Jan 22 06:58:43 2012
@@ -31,7 +31,7 @@ public class NotInServiceMenuFacetAnnota
}
@Override
- public String hides(VisibilityContext<? extends VisibilityEvent> ic) {
+ public String hides(final VisibilityContext<? extends VisibilityEvent> ic) {
return "@NotInServiceMenu annotation present";
}
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/method/NotInServiceMenuFacetMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/method/NotInServiceMenuFacetMethod.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/method/NotInServiceMenuFacetMethod.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/method/NotInServiceMenuFacetMethod.java Sun Jan 22 06:58:43 2012
@@ -32,14 +32,14 @@ public class NotInServiceMenuFacetMethod
private final Method notInServiceMenuMethod;
- public NotInServiceMenuFacetMethod(Method notInServiceMenuMethod, final FacetHolder holder) {
+ public NotInServiceMenuFacetMethod(final Method notInServiceMenuMethod, final FacetHolder holder) {
super(holder);
this.notInServiceMenuMethod = notInServiceMenuMethod;
}
@Override
- public String hides(VisibilityContext<? extends VisibilityEvent> ic) {
- ObjectAdapter owningAdapter = ic.getTarget();
+ public String hides(final VisibilityContext<? extends VisibilityEvent> ic) {
+ final ObjectAdapter owningAdapter = ic.getTarget();
if (owningAdapter == null) {
return null;
}
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/method/NotInServiceMenuMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/method/NotInServiceMenuMethodFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/method/NotInServiceMenuMethodFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/notinservicemenu/method/NotInServiceMenuMethodFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -41,8 +41,11 @@ public class NotInServiceMenuMethodFacet
final String capitalizedName = NameUtils.javaBaseNameStripAccessorPrefixIfRequired(getMethod.getName());
final Class<?> cls = processMethodContext.getCls();
- final Method hideMethod =
- MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, /* MethodPrefixConstants.HIDE_PREFIX */
+ final Method hideMethod = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, /*
+ * MethodPrefixConstants
+ * .
+ * HIDE_PREFIX
+ */
"notInServiceMenu" + capitalizedName, boolean.class, new Class[] {});
if (hideMethod == null) {
return;
@@ -51,7 +54,8 @@ public class NotInServiceMenuMethodFacet
processMethodContext.removeMethod(hideMethod);
final FacetHolder facetedMethod = processMethodContext.getFacetHolder();
- // FacetUtil.addFacet(new NotInServiceMenuFacetAnnotation(facetedMethod));
+ // FacetUtil.addFacet(new
+ // NotInServiceMenuFacetAnnotation(facetedMethod));
FacetUtil.addFacet(new NotInServiceMenuFacetMethod(hideMethod, facetedMethod));
}
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/queryonly/QueryOnlyAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/queryonly/QueryOnlyAnnotationFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/queryonly/QueryOnlyAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/queryonly/QueryOnlyAnnotationFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -34,10 +34,10 @@ public class QueryOnlyAnnotationFacetFac
@Override
public void process(final ProcessMethodContext processMethodContext) {
final QueryOnly annotation = getAnnotation(processMethodContext.getMethod(), QueryOnly.class);
- if(annotation == null) {
+ if (annotation == null) {
return;
}
- FacetedMethod facetHolder = processMethodContext.getFacetHolder();
+ final FacetedMethod facetHolder = processMethodContext.getFacetHolder();
FacetUtil.addFacet(new QueryOnlyFacetAnnotation(facetHolder));
FacetUtil.addFacet(new IdempotentFacetInferredFromQueryOnly(facetHolder));
}
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -32,8 +32,7 @@ import org.apache.isis.core.metamodel.fa
import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistry;
import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistryAware;
-public class TypeOfAnnotationForActionsFacetFactory extends AnnotationBasedFacetFactoryAbstract implements
- CollectionTypeRegistryAware {
+public class TypeOfAnnotationForActionsFacetFactory extends AnnotationBasedFacetFactoryAbstract implements CollectionTypeRegistryAware {
private CollectionTypeRegistry collectionTypeRegistry;
public TypeOfAnnotationForActionsFacetFactory() {
@@ -46,22 +45,19 @@ public class TypeOfAnnotationForActionsF
final TypeOf annotation = getAnnotation(processMethodContext.getMethod(), TypeOf.class);
final Class<?> methodReturnType = processMethodContext.getMethod().getReturnType();
- if (!collectionTypeRegistry.isCollectionType(methodReturnType)
- && !collectionTypeRegistry.isArrayType(methodReturnType)) {
+ if (!collectionTypeRegistry.isCollectionType(methodReturnType) && !collectionTypeRegistry.isArrayType(methodReturnType)) {
return;
}
final Class<?> returnType = processMethodContext.getMethod().getReturnType();
if (returnType.isArray()) {
final Class<?> componentType = returnType.getComponentType();
- FacetUtil.addFacet(new TypeOfFacetInferredFromArray(componentType, processMethodContext.getFacetHolder(),
- getSpecificationLookup()));
+ FacetUtil.addFacet(new TypeOfFacetInferredFromArray(componentType, processMethodContext.getFacetHolder(), getSpecificationLookup()));
return;
}
if (annotation != null) {
- FacetUtil.addFacet(new TypeOfFacetAnnotationForAction(annotation.value(), processMethodContext
- .getFacetHolder(), getSpecificationLookup()));
+ FacetUtil.addFacet(new TypeOfFacetAnnotationForAction(annotation.value(), processMethodContext.getFacetHolder(), getSpecificationLookup()));
return;
}
@@ -79,8 +75,7 @@ public class TypeOfAnnotationForActionsF
final Object actualTypeArgument = actualTypeArguments[0];
if (actualTypeArgument instanceof Class) {
final Class<?> actualType = (Class<?>) actualTypeArgument;
- FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualType, processMethodContext.getFacetHolder(),
- getSpecificationLookup()));
+ FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualType, processMethodContext.getFacetHolder(), getSpecificationLookup()));
return;
}
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfFacetAnnotationForAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfFacetAnnotationForAction.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfFacetAnnotationForAction.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfFacetAnnotationForAction.java Sun Jan 22 06:58:43 2012
@@ -25,8 +25,7 @@ import org.apache.isis.core.metamodel.sp
public class TypeOfFacetAnnotationForAction extends TypeOfFacetAbstract {
- public TypeOfFacetAnnotationForAction(final Class<?> type, final FacetHolder holder,
- final SpecificationLookup specificationLookup) {
+ public TypeOfFacetAnnotationForAction(final Class<?> type, final FacetHolder holder, final SpecificationLookup specificationLookup) {
super(type, holder, specificationLookup);
}
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/ActionValidationFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/ActionValidationFacet.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/ActionValidationFacet.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/ActionValidationFacet.java Sun Jan 22 06:58:43 2012
@@ -25,14 +25,16 @@ import org.apache.isis.core.metamodel.fa
import org.apache.isis.core.metamodel.interactions.ValidatingInteractionAdvisor;
/**
- * The mechanism by which the set of parameters of the action can be validated before the action itself is invoked.
+ * The mechanism by which the set of parameters of the action can be validated
+ * before the action itself is invoked.
*
* <p>
- * In the standard Apache Isis Programming Model, corresponds to invoking the <tt>validateXxx</tt> support method for an
- * action.
+ * In the standard Apache Isis Programming Model, corresponds to invoking the
+ * <tt>validateXxx</tt> support method for an action.
*
* <p>
- * Note that the parameters may be validated independently first (eg a range check on a numeric parameter).
+ * Note that the parameters may be validated independently first (eg a range
+ * check on a numeric parameter).
*
* @see ActionInvocationFacet
*/
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaMethod.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaMethod.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaMethod.java Sun Jan 22 06:58:43 2012
@@ -39,7 +39,8 @@ public class ActionValidationFacetViaMet
}
/**
- * Returns a singleton list of the {@link Method} provided in the constructor.
+ * Returns a singleton list of the {@link Method} provided in the
+ * constructor.
*/
@Override
public List<Method> getMethods() {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaValidateMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaValidateMethodFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaValidateMethodFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaValidateMethodFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -40,7 +40,8 @@ public class ActionValidationFacetViaVal
private static final String[] PREFIXES = { MethodPrefixConstants.VALIDATE_PREFIX };
/**
- * Note that the {@link Facet}s registered are the generic ones from noa-architecture (where they exist)
+ * Note that the {@link Facet}s registered are the generic ones from
+ * noa-architecture (where they exist)
*/
public ActionValidationFacetViaValidateMethodFacetFactory() {
super(FeatureType.ACTIONS_ONLY, PREFIXES);
@@ -64,9 +65,7 @@ public class ActionValidationFacetViaVal
final Class<?>[] paramTypes = actionMethod.getParameterTypes();
final MethodScope onClass = MethodScope.scopeFor(actionMethod);
- final Method validateMethod =
- MethodFinderUtils.findMethod(cls, onClass, MethodPrefixConstants.VALIDATE_PREFIX + capitalizedName,
- String.class, paramTypes);
+ final Method validateMethod = MethodFinderUtils.findMethod(cls, onClass, MethodPrefixConstants.VALIDATE_PREFIX + capitalizedName, String.class, paramTypes);
if (validateMethod == null) {
return;
}
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -73,8 +73,8 @@ public class CollectionAccessorFacetFact
}
/**
- * The method way well represent a reference property, but this facet factory does not have any opinion on the
- * matter.
+ * The method way well represent a reference property, but this facet
+ * factory does not have any opinion on the matter.
*/
@Override
public boolean isPropertyAccessor(final Method method) {
@@ -82,26 +82,24 @@ public class CollectionAccessorFacetFact
}
/**
- * The method way well represent a value property, but this facet factory does not have any opinion on the matter.
+ * The method way well represent a value property, but this facet factory
+ * does not have any opinion on the matter.
*/
public boolean isValuePropertyAccessor(final Method method) {
return false;
}
@Override
- public void findAndRemoveCollectionAccessors(final MethodRemover methodRemover,
- final List<Method> methodListToAppendTo) {
+ public void findAndRemoveCollectionAccessors(final MethodRemover methodRemover, final List<Method> methodListToAppendTo) {
final Class<?>[] collectionClasses = getCollectionTypeRepository().getCollectionType();
for (final Class<?> returnType : collectionClasses) {
- final List<Method> list =
- methodRemover.removeMethods(MethodScope.OBJECT, MethodPrefixConstants.GET_PREFIX, returnType, false, 0);
+ final List<Method> list = methodRemover.removeMethods(MethodScope.OBJECT, MethodPrefixConstants.GET_PREFIX, returnType, false, 0);
methodListToAppendTo.addAll(list);
}
}
@Override
- public void findAndRemovePropertyAccessors(final MethodRemover methodRemover,
- final List<Method> methodListToAppendTo) {
+ public void findAndRemovePropertyAccessors(final MethodRemover methodRemover, final List<Method> methodListToAppendTo) {
// does nothing
}
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetViaAccessor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetViaAccessor.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetViaAccessor.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetViaAccessor.java Sun Jan 22 06:58:43 2012
@@ -30,8 +30,7 @@ import org.apache.isis.core.metamodel.fa
import org.apache.isis.core.metamodel.facets.ImperativeFacet;
import org.apache.isis.core.metamodel.facets.accessor.PropertyOrCollectionAccessorFacetAbstract;
-public class CollectionAccessorFacetViaAccessor extends PropertyOrCollectionAccessorFacetAbstract implements
- ImperativeFacet {
+public class CollectionAccessorFacetViaAccessor extends PropertyOrCollectionAccessorFacetAbstract implements ImperativeFacet {
private final Method method;
@@ -41,7 +40,8 @@ public class CollectionAccessorFacetViaA
}
/**
- * Returns a singleton list of the {@link Method} provided in the constructor.
+ * Returns a singleton list of the {@link Method} provided in the
+ * constructor.
*/
@Override
public List<Method> getMethods() {
@@ -54,8 +54,10 @@ public class CollectionAccessorFacetViaA
}
/**
- * Bytecode cannot automatically call {@link DomainObjectContainer#objectChanged(Object)} because cannot distinguish
- * whether interacting with accessor to read it or to modify its contents.
+ * Bytecode cannot automatically call
+ * {@link DomainObjectContainer#objectChanged(Object)} because cannot
+ * distinguish whether interacting with accessor to read it or to modify its
+ * contents.
*/
@Override
public boolean impliesObjectChanged() {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/aggregated/AggregatedIfCollectionFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/aggregated/AggregatedIfCollectionFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/aggregated/AggregatedIfCollectionFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/aggregated/AggregatedIfCollectionFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -29,10 +29,12 @@ import org.apache.isis.core.metamodel.sp
import org.apache.isis.core.progmodel.facets.collections.collection.CollectionFacetFactory;
/**
- * All {@link CollectionTypeRegistry collection types} are intrinsically {@link AggregatedFacet aggregeted}.
+ * All {@link CollectionTypeRegistry collection types} are intrinsically
+ * {@link AggregatedFacet aggregeted}.
*
*
- * Must be registered in the {@link ProgrammingModel} after {@link CollectionFacetFactory}.
+ * Must be registered in the {@link ProgrammingModel} after
+ * {@link CollectionFacetFactory}.
*/
public class AggregatedIfCollectionFacetFactory extends FacetFactoryAbstract {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -35,8 +35,7 @@ import org.apache.isis.core.progmodel.fa
import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
import org.apache.isis.core.progmodel.facets.MethodPrefixConstants;
-public class CollectionClearFacetFactory extends MethodPrefixBasedFacetFactoryAbstract implements AdapterMapAware,
- ObjectDirtierAware {
+public class CollectionClearFacetFactory extends MethodPrefixBasedFacetFactoryAbstract implements AdapterMapAware, ObjectDirtierAware {
private static final String[] PREFIXES = { MethodPrefixConstants.CLEAR_PREFIX };
@@ -59,17 +58,14 @@ public class CollectionClearFacetFactory
final String capitalizedName = NameUtils.javaBaseName(getMethod.getName());
final Class<?> cls = processMethodContext.getCls();
- final Method method =
- MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.CLEAR_PREFIX + capitalizedName,
- void.class, null);
+ final Method method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.CLEAR_PREFIX + capitalizedName, void.class, null);
processMethodContext.removeMethod(method);
final FacetHolder collection = processMethodContext.getFacetHolder();
FacetUtil.addFacet(createCollectionClearFacet(method, getMethod, collection));
}
- private CollectionClearFacet createCollectionClearFacet(final Method clearMethodIfAny, final Method accessorMethod,
- final FacetHolder collection) {
+ private CollectionClearFacet createCollectionClearFacet(final Method clearMethodIfAny, final Method accessorMethod, final FacetHolder collection) {
if (clearMethodIfAny != null) {
return new CollectionClearFacetViaMethod(clearMethodIfAny, collection);
} else {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaAccessor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaAccessor.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaAccessor.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaAccessor.java Sun Jan 22 06:58:43 2012
@@ -39,8 +39,7 @@ public class CollectionClearFacetViaAcce
private final AdapterMap adapterMap;
private final ObjectDirtier objectDirtier;
- public CollectionClearFacetViaAccessor(final Method method, final FacetHolder holder,
- final AdapterMap adapterManager, final ObjectDirtier objectDirtier) {
+ public CollectionClearFacetViaAccessor(final Method method, final FacetHolder holder, final AdapterMap adapterManager, final ObjectDirtier objectDirtier) {
super(holder);
this.method = method;
this.adapterMap = adapterManager;
@@ -48,7 +47,8 @@ public class CollectionClearFacetViaAcce
}
/**
- * Returns a singleton list of the {@link Method} provided in the constructor.
+ * Returns a singleton list of the {@link Method} provided in the
+ * constructor.
*/
@Override
public List<Method> getMethods() {
@@ -61,8 +61,10 @@ public class CollectionClearFacetViaAcce
}
/**
- * Bytecode cannot automatically call {@link DomainObjectContainer#objectChanged(Object)} because cannot distinguish
- * whether interacting with accessor to read it or to modify its contents.
+ * Bytecode cannot automatically call
+ * {@link DomainObjectContainer#objectChanged(Object)} because cannot
+ * distinguish whether interacting with accessor to read it or to modify its
+ * contents.
*/
@Override
public boolean impliesObjectChanged() {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaMethod.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaMethod.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaMethod.java Sun Jan 22 06:58:43 2012
@@ -39,7 +39,8 @@ public class CollectionClearFacetViaMeth
}
/**
- * Returns a singleton list of the {@link Method} provided in the constructor.
+ * Returns a singleton list of the {@link Method} provided in the
+ * constructor.
*/
@Override
public List<Method> getMethods() {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -31,8 +31,7 @@ import org.apache.isis.core.metamodel.fa
import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistry;
import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistryAware;
-public class CollectionFacetFactory extends FacetFactoryAbstract implements CollectionTypeRegistryAware,
- AdapterMapAware {
+public class CollectionFacetFactory extends FacetFactoryAbstract implements CollectionTypeRegistryAware, AdapterMapAware {
private CollectionTypeRegistry collectionTypeRegistry;
private AdapterMap adapterMap;
@@ -57,9 +56,7 @@ public class CollectionFacetFactory exte
final TypeOfFacet typeOfFacet = facetHolder.getFacet(TypeOfFacet.class);
if (typeOfFacet == null) {
final Class<?> collectionElementType = collectionElementType(processClassContaxt.getCls());
- facetHolder.addFacet(collectionElementType != Object.class ? new TypeOfFacetInferredFromGenerics(
- collectionElementType, facetHolder, getSpecificationLookup()) : new TypeOfFacetDefaultToObject(
- facetHolder, getSpecificationLookup()));
+ facetHolder.addFacet(collectionElementType != Object.class ? new TypeOfFacetInferredFromGenerics(collectionElementType, facetHolder, getSpecificationLookup()) : new TypeOfFacetDefaultToObject(facetHolder, getSpecificationLookup()));
} else {
// nothing
}
@@ -70,8 +67,7 @@ public class CollectionFacetFactory exte
private void processAsArrayType(final ProcessClassContext processClassContaxt) {
final FacetHolder facetHolder = processClassContaxt.getFacetHolder();
facetHolder.addFacet(new JavaArrayFacet(facetHolder, getAdapterMap()));
- facetHolder.addFacet(new TypeOfFacetInferredFromArray(processClassContaxt.getCls().getComponentType(),
- facetHolder, getSpecificationLookup()));
+ facetHolder.addFacet(new TypeOfFacetInferredFromArray(processClassContaxt.getCls().getComponentType(), facetHolder, getSpecificationLookup()));
}
private Class<?> collectionElementType(final Class<?> cls) {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/ObjectToAdapterTransformer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/ObjectToAdapterTransformer.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/ObjectToAdapterTransformer.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/ObjectToAdapterTransformer.java Sun Jan 22 06:58:43 2012
@@ -24,7 +24,8 @@ import org.apache.isis.core.metamodel.ad
import org.apache.isis.core.metamodel.adapter.map.AdapterMap;
/**
- * Uses the Commons Collection API to transform {@link Object}s into {@link ObjectAdapter} adapters.
+ * Uses the Commons Collection API to transform {@link Object}s into
+ * {@link ObjectAdapter} adapters.
*
*/
public final class ObjectToAdapterTransformer implements Transformer {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -28,8 +28,9 @@ import org.apache.isis.core.metamodel.fa
import org.apache.isis.core.metamodel.spec.ObjectSpecification;
/**
- * REVIEW: I'm not sure this {@link FacetFactory} actually makes sense. Just because a type is immutable, doesn't imply
- * that the property can't change the instance that it refers to?
+ * REVIEW: I'm not sure this {@link FacetFactory} actually makes sense. Just
+ * because a type is immutable, doesn't imply that the property can't change the
+ * instance that it refers to?
*/
public class DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory extends AnnotationBasedFacetFactoryAbstract {
@@ -39,8 +40,7 @@ public class DisabledFacetForCollectionD
@Override
public void process(final ProcessMethodContext processMethodContext) {
- final ObjectSpecification spec =
- getSpecificationLookup().loadSpecification(processMethodContext.getMethod().getDeclaringClass());
+ final ObjectSpecification spec = getSpecificationLookup().loadSpecification(processMethodContext.getMethod().getDeclaringClass());
if (spec.containsDoOpFacet(ImmutableFacet.class)) {
final ImmutableFacet immutableFacet = spec.getFacet(ImmutableFacet.class);
final FacetedMethod facetHolder = processMethodContext.getFacetHolder();
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddRemoveAndValidateFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddRemoveAndValidateFacetFactory.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddRemoveAndValidateFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddRemoveAndValidateFacetFactory.java Sun Jan 22 06:58:43 2012
@@ -39,11 +39,11 @@ import org.apache.isis.core.progmodel.fa
import org.apache.isis.core.progmodel.facets.collections.validate.CollectionValidateRemoveFromFacetViaMethod;
/**
- * TODO: should probably split out into two {@link FacetFactory}s, one for <tt>addTo()</tt>/<tt>removeFrom()</tt> and
- * one for <tt>validateAddTo()</tt>/<tt>validateRemoveFrom()</tt>.
+ * TODO: should probably split out into two {@link FacetFactory}s, one for
+ * <tt>addTo()</tt>/<tt>removeFrom()</tt> and one for <tt>validateAddTo()</tt>/
+ * <tt>validateRemoveFrom()</tt>.
*/
-public class CollectionAddRemoveAndValidateFacetFactory extends MethodPrefixBasedFacetFactoryAbstract implements
- ObjectDirtierAware {
+public class CollectionAddRemoveAndValidateFacetFactory extends MethodPrefixBasedFacetFactoryAbstract implements ObjectDirtierAware {
private static final String[] PREFIXES = {};
@@ -68,15 +68,11 @@ public class CollectionAddRemoveAndValid
final Class<?> cls = processMethodContext.getCls();
// add
- final Method addToMethod =
- MethodFinderUtils.findMethod(cls, MethodScope.OBJECT,
- MethodPrefixConstants.ADD_TO_PREFIX + capitalizedName, void.class);
+ final Method addToMethod = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.ADD_TO_PREFIX + capitalizedName, void.class);
processMethodContext.removeMethod(addToMethod);
// remove
- final Method removeFromMethod =
- MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.REMOVE_FROM_PREFIX
- + capitalizedName, void.class);
+ final Method removeFromMethod = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.REMOVE_FROM_PREFIX + capitalizedName, void.class);
processMethodContext.removeMethod(removeFromMethod);
// add facets
@@ -85,21 +81,17 @@ public class CollectionAddRemoveAndValid
FacetUtil.addFacet(createRemoveFromFacet(removeFromMethod, accessorMethod, collection));
// infer typ
- final Class<?> addToType =
- ((addToMethod == null || addToMethod.getParameterTypes().length != 1) ? null : addToMethod
- .getParameterTypes()[0]);
- final Class<?> removeFromType =
- ((removeFromMethod == null || removeFromMethod.getParameterTypes().length != 1) ? null : removeFromMethod
- .getParameterTypes()[0]);
+ final Class<?> addToType = ((addToMethod == null || addToMethod.getParameterTypes().length != 1) ? null : addToMethod.getParameterTypes()[0]);
+ final Class<?> removeFromType = ((removeFromMethod == null || removeFromMethod.getParameterTypes().length != 1) ? null : removeFromMethod.getParameterTypes()[0]);
return inferTypeOfIfPossible(accessorMethod, addToType, removeFromType, collection);
}
/**
- * TODO need to distinguish between Java collections, arrays and other collections!
+ * TODO need to distinguish between Java collections, arrays and other
+ * collections!
*/
- private CollectionAddToFacet createAddToFacet(final Method addToMethodIfAny, final Method accessorMethod,
- final FacetHolder holder) {
+ private CollectionAddToFacet createAddToFacet(final Method addToMethodIfAny, final Method accessorMethod, final FacetHolder holder) {
if (addToMethodIfAny != null) {
return new CollectionAddToFacetViaMethod(addToMethodIfAny, holder);
} else {
@@ -108,10 +100,10 @@ public class CollectionAddRemoveAndValid
}
/**
- * TODO need to distinguish between Java collections, arrays and other collections!
+ * TODO need to distinguish between Java collections, arrays and other
+ * collections!
*/
- private CollectionRemoveFromFacet createRemoveFromFacet(final Method removeFromMethodIfAny,
- final Method accessorMethod, final FacetHolder holder) {
+ private CollectionRemoveFromFacet createRemoveFromFacet(final Method removeFromMethodIfAny, final Method accessorMethod, final FacetHolder holder) {
if (removeFromMethodIfAny != null) {
return new CollectionRemoveFromFacetViaMethod(removeFromMethodIfAny, holder);
} else {
@@ -119,43 +111,34 @@ public class CollectionAddRemoveAndValid
}
}
- private Class<?> inferTypeOfIfPossible(final Method getMethod, final Class<?> addType, final Class<?> removeType,
- final FacetHolder collection) {
+ private Class<?> inferTypeOfIfPossible(final Method getMethod, final Class<?> addType, final Class<?> removeType, final FacetHolder collection) {
if (addType != null && removeType != null && addType != removeType) {
- throw new MetaModelException("The addTo/removeFrom methods for " + getMethod.getDeclaringClass() + " must "
- + "both deal with same type of object: " + addType + "; " + removeType);
+ throw new MetaModelException("The addTo/removeFrom methods for " + getMethod.getDeclaringClass() + " must " + "both deal with same type of object: " + addType + "; " + removeType);
}
final Class<?> type = addType != null ? addType : removeType;
if (type != null) {
- FacetUtil
- .addFacet(new TypeOfFacetInferredFromSupportingMethods(type, collection, getSpecificationLookup()));
+ FacetUtil.addFacet(new TypeOfFacetInferredFromSupportingMethods(type, collection, getSpecificationLookup()));
}
return type;
}
- private void attachValidateAddToAndRemoveFromFacetIfMethodsFound(final ProcessMethodContext processMethodContext,
- final Class<?> collectionType) {
+ private void attachValidateAddToAndRemoveFromFacetIfMethodsFound(final ProcessMethodContext processMethodContext, final Class<?> collectionType) {
attachValidateAddToFacetIfValidateAddToMethodIsFound(processMethodContext, collectionType);
attachValidateRemoveFacetIfValidateRemoveFromMethodIsFound(processMethodContext, collectionType);
}
- private void attachValidateAddToFacetIfValidateAddToMethodIsFound(final ProcessMethodContext processMethodContext,
- final Class<?> collectionType) {
+ private void attachValidateAddToFacetIfValidateAddToMethodIsFound(final ProcessMethodContext processMethodContext, final Class<?> collectionType) {
final Method getMethod = processMethodContext.getMethod();
final String capitalizedName = NameUtils.javaBaseName(getMethod.getName());
final Class<?> cls = processMethodContext.getCls();
final Class<?>[] paramTypes = MethodFinderUtils.paramTypesOrNull(collectionType);
- Method validateAddToMethod =
- MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.VALIDATE_ADD_TO_PREFIX
- + capitalizedName, String.class, paramTypes);
+ Method validateAddToMethod = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.VALIDATE_ADD_TO_PREFIX + capitalizedName, String.class, paramTypes);
if (validateAddToMethod == null) {
- validateAddToMethod =
- MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.VALIDATE_ADD_TO_PREFIX_2
- + capitalizedName, String.class, MethodFinderUtils.paramTypesOrNull(collectionType));
+ validateAddToMethod = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.VALIDATE_ADD_TO_PREFIX_2 + capitalizedName, String.class, MethodFinderUtils.paramTypesOrNull(collectionType));
}
if (validateAddToMethod == null) {
return;
@@ -166,22 +149,16 @@ public class CollectionAddRemoveAndValid
FacetUtil.addFacet(new CollectionValidateAddToFacetViaMethod(validateAddToMethod, collection));
}
- private void attachValidateRemoveFacetIfValidateRemoveFromMethodIsFound(
- final ProcessMethodContext processMethodContext, final Class<?> collectionType) {
+ private void attachValidateRemoveFacetIfValidateRemoveFromMethodIsFound(final ProcessMethodContext processMethodContext, final Class<?> collectionType) {
final Method getMethod = processMethodContext.getMethod();
final String capitalizedName = NameUtils.javaBaseName(getMethod.getName());
final Class<?> cls = processMethodContext.getCls();
final Class<?>[] paramTypes = MethodFinderUtils.paramTypesOrNull(collectionType);
- Method validateRemoveFromMethod =
- MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.VALIDATE_REMOVE_FROM_PREFIX
- + capitalizedName, String.class, paramTypes);
+ Method validateRemoveFromMethod = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.VALIDATE_REMOVE_FROM_PREFIX + capitalizedName, String.class, paramTypes);
if (validateRemoveFromMethod == null) {
- validateRemoveFromMethod =
- MethodFinderUtils.findMethod(cls, MethodScope.OBJECT,
- MethodPrefixConstants.VALIDATE_REMOVE_FROM_PREFIX_2 + capitalizedName, String.class,
- MethodFinderUtils.paramTypesOrNull(collectionType));
+ validateRemoveFromMethod = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.VALIDATE_REMOVE_FROM_PREFIX_2 + capitalizedName, String.class, MethodFinderUtils.paramTypesOrNull(collectionType));
}
if (validateRemoveFromMethod == null) {
return;
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddToFacetViaAccessor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddToFacetViaAccessor.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddToFacetViaAccessor.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddToFacetViaAccessor.java Sun Jan 22 06:58:43 2012
@@ -38,15 +38,15 @@ public class CollectionAddToFacetViaAcce
private final Method method;
private final ObjectDirtier objectDirtier;
- public CollectionAddToFacetViaAccessor(final Method method, final FacetHolder holder,
- final ObjectDirtier objectDirtier) {
+ public CollectionAddToFacetViaAccessor(final Method method, final FacetHolder holder, final ObjectDirtier objectDirtier) {
super(holder);
this.method = method;
this.objectDirtier = objectDirtier;
}
/**
- * Returns a singleton list of the {@link Method} provided in the constructor.
+ * Returns a singleton list of the {@link Method} provided in the
+ * constructor.
*/
@Override
public List<Method> getMethods() {
@@ -59,8 +59,10 @@ public class CollectionAddToFacetViaAcce
}
/**
- * Bytecode cannot automatically call {@link DomainObjectContainer#objectChanged(Object)} because cannot distinguish
- * whether interacting with accessor to read it or to modify its contents.
+ * Bytecode cannot automatically call
+ * {@link DomainObjectContainer#objectChanged(Object)} because cannot
+ * distinguish whether interacting with accessor to read it or to modify its
+ * contents.
*/
@Override
public boolean impliesObjectChanged() {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddToFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddToFacetViaMethod.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddToFacetViaMethod.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionAddToFacetViaMethod.java Sun Jan 22 06:58:43 2012
@@ -39,7 +39,8 @@ public class CollectionAddToFacetViaMeth
}
/**
- * Returns a singleton list of the {@link Method} provided in the constructor.
+ * Returns a singleton list of the {@link Method} provided in the
+ * constructor.
*/
@Override
public List<Method> getMethods() {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionRemoveFromFacetViaAccessor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionRemoveFromFacetViaAccessor.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionRemoveFromFacetViaAccessor.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionRemoveFromFacetViaAccessor.java Sun Jan 22 06:58:43 2012
@@ -38,15 +38,15 @@ public class CollectionRemoveFromFacetVi
private final Method method;
private final ObjectDirtier objectDirtier;
- public CollectionRemoveFromFacetViaAccessor(final Method method, final FacetHolder holder,
- final ObjectDirtier objectDirtier) {
+ public CollectionRemoveFromFacetViaAccessor(final Method method, final FacetHolder holder, final ObjectDirtier objectDirtier) {
super(holder);
this.method = method;
this.objectDirtier = objectDirtier;
}
/**
- * Returns a singleton list of the {@link Method} provided in the constructor.
+ * Returns a singleton list of the {@link Method} provided in the
+ * constructor.
*/
@Override
public List<Method> getMethods() {
@@ -59,8 +59,10 @@ public class CollectionRemoveFromFacetVi
}
/**
- * Bytecode cannot automatically call {@link DomainObjectContainer#objectChanged(Object)} because cannot distinguish
- * whether interacting with accessor to read it or to modify its contents.
+ * Bytecode cannot automatically call
+ * {@link DomainObjectContainer#objectChanged(Object)} because cannot
+ * distinguish whether interacting with accessor to read it or to modify its
+ * contents.
*/
@Override
public boolean impliesObjectChanged() {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionRemoveFromFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionRemoveFromFacetViaMethod.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionRemoveFromFacetViaMethod.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/CollectionRemoveFromFacetViaMethod.java Sun Jan 22 06:58:43 2012
@@ -39,7 +39,8 @@ public class CollectionRemoveFromFacetVi
}
/**
- * Returns a singleton list of the {@link Method} provided in the constructor.
+ * Returns a singleton list of the {@link Method} provided in the
+ * constructor.
*/
@Override
public List<Method> getMethods() {
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/TypeOfFacetInferredFromSupportingMethods.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/TypeOfFacetInferredFromSupportingMethods.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/TypeOfFacetInferredFromSupportingMethods.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/modify/TypeOfFacetInferredFromSupportingMethods.java Sun Jan 22 06:58:43 2012
@@ -25,8 +25,7 @@ import org.apache.isis.core.metamodel.sp
public class TypeOfFacetInferredFromSupportingMethods extends TypeOfFacetAbstract {
- public TypeOfFacetInferredFromSupportingMethods(final Class<?> type, final FacetHolder holder,
- final SpecificationLookup specificationLookup) {
+ public TypeOfFacetInferredFromSupportingMethods(final Class<?> type, final FacetHolder holder, final SpecificationLookup specificationLookup) {
super(type, holder, specificationLookup);
}
Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/notpersisted/annotation/NotPersistedFacetAnnotationForCollection.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/notpersisted/annotation/NotPersistedFacetAnnotationForCollection.java?rev=1234453&r1=1234452&r2=1234453&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/notpersisted/annotation/NotPersistedFacetAnnotationForCollection.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/notpersisted/annotation/NotPersistedFacetAnnotationForCollection.java Sun Jan 22 06:58:43 2012
@@ -28,5 +28,4 @@ public class NotPersistedFacetAnnotation
super(holder);
}
-
}