org.apache.tapestry.annotations
Class PersistAnnotationWorker

java.lang.Object
  extended by org.apache.tapestry.annotations.PersistAnnotationWorker
All Implemented Interfaces:
MethodAnnotationEnhancementWorker

public class PersistAnnotationWorker
extends Object
implements MethodAnnotationEnhancementWorker

Allow a property to be marked as persistent, and (optionally) allows a strategy to be set. Works by adding a new IPropertySpecification to the IComponentSpecification.

The Persist annotation may optionally by accompanied by a InitialValue annotation; this sets the initial value, as a binding reference, used to initialize and re-initialize the property.

Since:
4.0
Author:
Howard M. Lewis Ship
See Also:
Persist

Field Summary
static String DEFAULT_PROPERTY_PERSISTENCE_STRATEGY
          Application property that gives the default property persistence strategy to use for properties annotated by @Persist
 
Constructor Summary
PersistAnnotationWorker()
           
 
Method Summary
 void performEnhancement(EnhancementOperation op, IComponentSpecification spec, Method method, org.apache.hivemind.Location location)
          Performs a particular enhancement based on a registered annotation.
 void setPropertySource(IPropertySource propertySource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PROPERTY_PERSISTENCE_STRATEGY

public static final String DEFAULT_PROPERTY_PERSISTENCE_STRATEGY
Application property that gives the default property persistence strategy to use for properties annotated by @Persist

See Also:
Constant Field Values
Constructor Detail

PersistAnnotationWorker

public PersistAnnotationWorker()
Method Detail

performEnhancement

public void performEnhancement(EnhancementOperation op,
                               IComponentSpecification spec,
                               Method method,
                               org.apache.hivemind.Location location)
Description copied from interface: MethodAnnotationEnhancementWorker
Performs a particular enhancement based on a registered annotation. Exception reporting is the responsibility of the caller.

Specified by:
performEnhancement in interface MethodAnnotationEnhancementWorker
Parameters:
op - the enhancement operaration
spec - the specification of the component for which a class is being enhanced
method - the method to which the annotation is attached. The annotation may be obtained from the method.
location - TODO

setPropertySource

public void setPropertySource(IPropertySource propertySource)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.