org.nakedobjects.metamodel.facets.actions
Class ActionMethodsFacetFactory

java.lang.Object
  extended by org.nakedobjects.metamodel.facets.FacetFactoryAbstract
      extended by org.nakedobjects.metamodel.java5.MethodPrefixBasedFacetFactoryAbstract
          extended by org.nakedobjects.metamodel.facets.actions.ActionMethodsFacetFactory
All Implemented Interfaces:
FacetFactory, MethodPrefixBasedFacetFactory, RuntimeContextAware, SpecificationLoaderAware

public class ActionMethodsFacetFactory
extends MethodPrefixBasedFacetFactoryAbstract
implements RuntimeContextAware

Sets up all the Facets for an action in a single shot.

TODO: should be more fine-grained?


Field Summary
 
Fields inherited from class org.nakedobjects.metamodel.java5.MethodPrefixBasedFacetFactoryAbstract
CHOICES_PREFIX, CLASS, DEFAULT_PREFIX, NO_PARAMETERS, NO_PARAMETERS_TYPES, OBJECT, VALIDATE_PREFIX
 
Constructor Summary
ActionMethodsFacetFactory()
          Note that the Facets registered are the generic ones from noa-architecture (where they exist)
 
Method Summary
 RuntimeContext getRuntimeContext()
           
 boolean process(java.lang.reflect.Method actionMethod, MethodRemover methodRemover, FacetHolder action)
          Process the method, and return the correctly setup annotation if present.
 void setRuntimeContext(RuntimeContext runtimeContext)
          Injected because RuntimeContextAware
 
Methods inherited from class org.nakedobjects.metamodel.java5.MethodPrefixBasedFacetFactoryAbstract
findAndRemoveAlwaysHideMethod, findAndRemoveAlwaysHideMethod, findAndRemoveAlwaysHideMethod, findAndRemoveDescriptionMethod, findAndRemoveDescriptionMethod, findAndRemoveDescriptionMethod, findAndRemoveDisableForSessionMethod, findAndRemoveDisableForSessionMethod, findAndRemoveDisableMethod, findAndRemoveDisableMethod, findAndRemoveDisableMethod, findAndRemoveHideForSessionMethod, findAndRemoveHideForSessionMethod, findAndRemoveHideMethod, findAndRemoveHideMethod, findAndRemoveHideMethod, findAndRemoveNameMethod, findAndRemoveNameMethod, findAndRemoveNameMethod, findAndRemoveProtectMethod, findAndRemoveProtectMethod, findAndRemoveProtectMethod, findMethod, findMethod, findMethodWithOrWithoutParameters, getPrefixes, paramTypesOrNull, removeMethod
 
Methods inherited from class org.nakedobjects.metamodel.facets.FacetFactoryAbstract
getFeatureTypes, getSpecificationLoader, process, processParams, setSpecificationLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nakedobjects.metamodel.facets.FacetFactory
getFeatureTypes, process, processParams
 

Constructor Detail

ActionMethodsFacetFactory

public ActionMethodsFacetFactory()
Note that the Facets registered are the generic ones from noa-architecture (where they exist)

Method Detail

process

public boolean process(java.lang.reflect.Method actionMethod,
                       MethodRemover methodRemover,
                       FacetHolder action)
Description copied from interface: FacetFactory
Process the method, and return the correctly setup annotation if present.

Specified by:
process in interface FacetFactory
Overrides:
process in class FacetFactoryAbstract
Parameters:
actionMethod - - method representing the feature being processed (getter for property or collection, or action)
methodRemover - - allow any methods of the class to be removed
action - - to attach the facets to
Returns:
true if any facets were added and therefore should be removed, false otherwise. Returning true will cause the method to be removed

getRuntimeContext

public RuntimeContext getRuntimeContext()
Returns:
See Also:
setRuntimeContext(RuntimeContext)

setRuntimeContext

public void setRuntimeContext(RuntimeContext runtimeContext)
Injected because RuntimeContextAware

Specified by:
setRuntimeContext in interface RuntimeContextAware


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.