com.fatwire.gst.foundation.controller.annotation
Class AnnotationController

java.lang.Object
  extended by com.fatwire.gst.foundation.controller.AbstractController
      extended by com.fatwire.gst.foundation.controller.annotation.AnnotationController
All Implemented Interfaces:
COM.FutureTense.XML.Template.Seed, COM.FutureTense.XML.Template.Seed2

public abstract class AnnotationController
extends AbstractController

The Controller delegates the business logic to an annotated method. In this method the special logic for the request is executed. Method selection is done via the @IcsVariable annotation. This works of the premise that a special name/value pair on the ics scope set before this controller is executed, is enough to determine the selection for the business logic method.

Since:
Apr 15, 2011
Author:
Dolf Dijkstra
See Also:
IcsVariable

Field Summary
 
Fields inherited from class com.fatwire.gst.foundation.controller.AbstractController
ics, LOG, STATUS_HEADER
 
Fields inherited from interface COM.FutureTense.XML.Template.Seed
returnString
 
Constructor Summary
AnnotationController()
           
 
Method Summary
protected  void doExecute()
          Executes the core business logic of the controller.
protected  Object getTarget()
           
protected  void handleCSRuntimeException(CSRuntimeException e)
          This method transforms errno values into http status codes and sets them using the X-Fatwire-Status header.
protected  void handleException(Exception e)
          Handles the exception, doing what is required
protected  void invokeControllerMethod(Method m, Object target)
           
protected  void recordCompositionalDependencies()
          Record compositional dependencies that are required for the controller
 
Methods inherited from class com.fatwire.gst.foundation.controller.AbstractController
Execute, getInputArgument, getInputArgumentAsString, sendError, SetAppLogic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationController

public AnnotationController()
Method Detail

doExecute

protected void doExecute()
Description copied from class: AbstractController
Executes the core business logic of the controller.

Specified by:
doExecute in class AbstractController

invokeControllerMethod

protected void invokeControllerMethod(Method m,
                                      Object target)
Parameters:
m -
target -

getTarget

protected Object getTarget()
Returns:
this

handleException

protected void handleException(Exception e)
Description copied from class: AbstractController
Handles the exception, doing what is required

Specified by:
handleException in class AbstractController
Parameters:
e - exception

handleCSRuntimeException

protected void handleCSRuntimeException(CSRuntimeException e)
This method transforms errno values into http status codes and sets them using the X-Fatwire-Status header.

Only some errnos are handled by this base class.

More info coming soon

Parameters:
e - exception

recordCompositionalDependencies

protected void recordCompositionalDependencies()
Record compositional dependencies that are required for the controller



Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.