|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.khubla.pragmatach.framework.controller.impl.AbstractController
public abstract class AbstractController
Constructor Summary | |
---|---|
AbstractController()
|
Method Summary | ||
---|---|---|
Response |
bad()
bad; HTTP 400 |
|
static String |
buildWildcardResourceURI(String[] resource)
build a path from a wildcard path |
|
Response |
forward(String uri)
forward to another controller uri |
|
String |
getApplicationURL()
get the base URI of this application |
|
protected Map<String,String> |
getCacheHeaders()
generate the cache headers |
|
String |
getConfigurationParameter(String name)
get a configuration parameter from the pragmatatch configuration |
|
static String |
getControllerName(Class<?> clazz)
get the name of the controller from the annotation |
|
static String |
getControllerName(PragmatachController pragmatachController)
get the name of the controller from the annotation |
|
PragmatachRoute |
getPragmatachRoute()
|
|
Request |
getRequest()
get the request |
|
protected InputStream |
getResource(String resource)
get a resource using the servlet's class loader |
|
|
getSessionScopedController(Class<T> clazz)
get the instance of a session-bound controller |
|
Response |
ok()
ok; HTTP 200 |
|
Response |
redirect(String uri)
redirect. |
|
void |
setPragmatachRoute(PragmatachRoute pragmatachRoute)
set the Route this is being invoked on |
|
void |
setRequest(Request request)
set the request |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractController()
Method Detail |
---|
public static String buildWildcardResourceURI(String[] resource)
public static String getControllerName(Class<?> clazz)
public static String getControllerName(PragmatachController pragmatachController)
public Response bad() throws PragmatachException
PragmatachException
public Response forward(String uri) throws PragmatachException
PragmatachException
public String getApplicationURL()
protected Map<String,String> getCacheHeaders() throws PragmatachException
PragmatachException
public String getConfigurationParameter(String name) throws PragmatachException
PragmatachException
public PragmatachRoute getPragmatachRoute()
public Request getRequest()
protected InputStream getResource(String resource) throws PragmatachException
PragmatachException
public <T> T getSessionScopedController(Class<T> clazz)
public Response ok() throws PragmatachException
PragmatachException
public Response redirect(String uri) throws PragmatachException
PragmatachException
public void setPragmatachRoute(PragmatachRoute pragmatachRoute)
PragmatachController
setPragmatachRoute
in interface PragmatachController
public void setRequest(Request request)
setRequest
in interface PragmatachController
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |