public abstract class AppController extends HttpSupport
HttpSupport.HttpBuilder, HttpSupport.RenderBuilder
LOGGER
Constructor and Description |
---|
AppController() |
Modifier and Type | Method and Description |
---|---|
protected String |
getContentType()
Returns hardcoded value "text/html".
|
protected String |
getLayout()
Returns a name for a default layout as provided in
activeweb_defaults.properties file. |
protected HttpSupport.RenderBuilder |
render()
Use this method in order to override a layout, status code, and content type.
|
protected HttpSupport.RenderBuilder |
render(String template)
Renders results with a template.
|
boolean |
restful()
Returns true if this controller is configured to be
RESTful . |
static <T extends AppController> |
restful(Class<T> controllerClass) |
assign, blank, encoding, flash, flash, flash, flash, getEncoding, getFile, getHttpServletRequest, getHttpServletResponse, getMap, getMap, getRealPath, getRequestBytes, getRequestInputStream, getRequestStream, getRequestString, getResponseHeaders, header, header, jsonList, jsonMap, jsonMaps, locale, logDebug, logError, logError, logError, logInfo, logWarning, logWarning, merge, multipartForm, multipartForm, multipartFormItems, multipartFormItems, multipartFormItems, outputStream, outputStream, outputStream, redirect, redirect, redirect, redirect, redirect, redirect, redirect, redirect, redirectToReferrer, redirectToReferrer, render, respond, sanitize, sendCookie, sendCookie, sendFile, sendFile, sendPermanentCookie, session, session, sessionBoolean, sessionDouble, sessionFloat, sessionHas, sessionInteger, sessionLong, sessionObject, sessionString, setContentLength, setEncoding, setLocale, setRequestEncoding, setResponseEncoding, status, streamOut, uploadedFiles, uploadedFiles, uploadedFiles, values, view, view, view, writer, writer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appContext, context, cookie, cookies, cookieValue, exists, format, getId, getLocale, getRequestHost, getRequestPort, getRequestProperties, getRequestProtocol, getRoute, header, headers, host, ipAddress, ipForwardedFor, isDelete, isGet, isHead, isMethod, isMultipartContent, isPost, isPut, isXhr, locale, method, param, param, params, params, params, params1st, params1st, path, port, protocol, queryString, remoteAddress, remoteHost, requestHas, servletPath, session, session, uri, url, userAgent, xhr
protected HttpSupport.RenderBuilder render(String template)
IllegalStateException
.template
- - template name, can be "list" - for a view whose name is different than the name of this action, or
"/another_controller/any_view" - this is a reference to a view from another controller. The format of this
parameter should be either a single word or two words separated by slash: '/'. If this is a single word, than
it is assumed that template belongs to current controller, if there is a slash used as a separator, then the
first word is assumed to be a name of another controller.RenderBuilder
, which is used to provide additional parameters.protected HttpSupport.RenderBuilder render()
RenderBuilder
, which is used to provide additional parameters.protected String getLayout()
activeweb_defaults.properties
file.
Override this method in a sub-class. Value expected is a fully qualified name of a layout template.
Example: "/custom/custom_layout"
protected String getContentType()
public boolean restful()
RESTful
.public static <T extends AppController> boolean restful(Class<T> controllerClass)
Copyright © 2020 JavaLite. All rights reserved.