package org.fulworx.core.descriptor.action;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
/**
* Simply to signify the attribute that will be used to retrieve the entity as a resource. The
* getter representing this entity will analyzed and it's return type retrieved.
* <p/>
* A getter starts with 'get', and this will be added to the entity name unless 'get' is already
* present.
*
* @author teastlack
* @date Sep 30, 2007
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface Accessor
{
public static String STRING = "string";
public static String FILE = "file";
/**
* This field should have the appropriate getter/setter combination to allow xwork parameterization
*
* @return name of the field in question, sans "get" or "set"
*/
String value();
/**
* Predefined types for the representation. The default is XML/JSON/etc, so no settings
* are required. Valid values are:
* <ul>
* <li>'DEFAULT' - this is the xml representations, no need to set it</li>
* <li>'STRING' - this will return a raw string representation</li>
* <li>'FILE' - will return a file representation</li>
* </ul>
*
* @return
*/
String type() default "default";
/**
* This is the object factory name to create the representation builder for your action to
* return.
*
* @return
*/
String builderName() default "default";
/**
* THis is the class of the representation builder to construct and generate representations
* for this action.
*
* @return
*/
Class builderClass() default Object.class;
}
|