org.loom.annotation.processor
Class RestAnnotationProcessor

java.lang.Object
  extended by org.loom.annotation.processor.AbstractAnnotationProcessor
      extended by org.loom.annotation.processor.RestAnnotationProcessor
All Implemented Interfaces:
java.lang.Comparable<AnnotationProcessor>, AnnotationProcessor

public class RestAnnotationProcessor
extends AbstractAnnotationProcessor

Processes JSR311 JAX-RS annotations Path, GET, POST, DELETE, PUT are supported


Constructor Summary
RestAnnotationProcessor()
           
 
Method Summary
 java.lang.String concatMethodMapping(java.lang.String methodPrefix, java.lang.String methodMapping)
          Concatenate a common method prefix (as specified in the action mapping) with this concrete method mapping
 java.lang.String getHandle(java.lang.String actionPath)
          Extract the handle from the provided action path
 int getOrder()
          This annotation processor should be executed before any other
 void process(Event event)
          Expands an ActionMapping with the metadata annotated to an Action class.
protected  void processEventParameters(Event event)
           
 
Methods inherited from class org.loom.annotation.processor.AbstractAnnotationProcessor
compareTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestAnnotationProcessor

public RestAnnotationProcessor()
Method Detail

getOrder

public int getOrder()
This annotation processor should be executed before any other

Specified by:
getOrder in interface AnnotationProcessor
Overrides:
getOrder in class AbstractAnnotationProcessor

process

public void process(Event event)
Description copied from interface: AnnotationProcessor
Expands an ActionMapping with the metadata annotated to an Action class. This method processes any annotations attached to the Action class or any containing package.

Specified by:
process in interface AnnotationProcessor
Specified by:
process in class AbstractAnnotationProcessor
Parameters:
event - the event to be modified

processEventParameters

protected void processEventParameters(Event event)

concatMethodMapping

public java.lang.String concatMethodMapping(java.lang.String methodPrefix,
                                            java.lang.String methodMapping)
Concatenate a common method prefix (as specified in the action mapping) with this concrete method mapping


getHandle

public java.lang.String getHandle(java.lang.String actionPath)
Extract the handle from the provided action path

Parameters:
actionPath - the action path specified by the Path annotation
Returns:
The action handle extracted from the provided path (the substring until the first '/' character)