@CompileStatic @GroovyASTTransformation(phase: CompilePhase.CANONICALIZATION) class ResourceTransform extends Object implements ASTTransformation, CompilationUnitAware
The Resource transform automatically exposes a domain class as a RESTful resource. In effect the transform adds a controller to a Grails application that performs CRUD operations on the domain. See the Resource annotation for more details
Modifiers | Name | Description |
---|---|---|
static String |
ARGUMENT_STATUS |
|
static String |
ATTR_NAMESPACE |
|
static String |
ATTR_READY_ONLY |
|
static String |
ATTR_RESPONSE_FORMATS |
|
static String |
ATTR_SUPER_CLASS |
|
static String |
ATTR_URI |
|
static ClassNode |
AUTOWIRED_CLASS_NODE |
|
static ConstantExpression |
CONSTANT_STATUS |
|
static String |
PARAMS_VARIABLE |
|
static String |
REDIRECT_METHOD |
|
static String |
RENDER_METHOD |
|
static String |
RESPOND_METHOD |
Constructor and description |
---|
ResourceTransform() |
Type Params | Return Type | Name and description |
---|---|---|
|
ConstructorNode |
addConstructor(ClassNode controllerClassNode, ClassNode domainClassNode, boolean readOnly) |
|
void |
setCompilationUnit(CompilationUnit unit) |
|
void |
visit(ASTNode[] astNodes, SourceUnit source) |