Package ch.autumo.beetroot.handler.users
Class ChangeHandler
java.lang.Object
org.nanohttpd.router.RouterNanoHTTPD.DefaultStreamHandler
org.nanohttpd.router.RouterNanoHTTPD.DefaultHandler
ch.autumo.beetroot.handler.BaseHandler
ch.autumo.beetroot.handler.users.ChangeHandler
- All Implemented Interfaces:
Handler,RouterNanoHTTPD.UriResponder
Default login handler.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.autumo.beetroot.handler.BaseHandler
BaseHandler.IfSectionHandler -
Field Summary
FieldsFields inherited from class ch.autumo.beetroot.handler.BaseHandler
action, columns, emptyBean, htmlData, htmlHead, initialValues, insertServletNameInTemplateRefs, MSG_TYPE_ERR, MSG_TYPE_INFO, MSG_TYPE_WARN, PRECISION_INPUT_TYPES, servletName, TAG_PREFIX_LANG, transientFields, uniqueFields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet web entity (use plural, e.g.Class<?>Overwrite to get the right re-route/redirect index handler after modifying data.Get web resource file as it lies on the file system relatively to the started server process.readData(BeetRootHTTPSession session, int id) Read data from DB that must be filled when the template is parsed.voidrender(BeetRootHTTPSession session) Overwrite to set your template variables.booleanshowLangMenu(Session userSession) Show language menu?booleanShow template menu?updateData(BeetRootHTTPSession session, int id) Update data in DB.Methods inherited from class ch.autumo.beetroot.handler.BaseHandler
addCheckBox, addErrorMessage, addHtmlDataLine, addHtmlHeadLine, addSuccessMessage, addWarningMessage, columns, columnsSize, deleteData, formatSingleValueForDB, get, getBeanClass, getColumn, getColumnsForSql, getColumnsForSql, getCurrentEntityDbId, getCurrentSession, getCustomizedExceptionInformation, getData, getEmptyBean, getHandlerClass, getHtmlData, getHtmlHead, getInsertValues, getLayout, getMessageType, getMimeType, getNewScanner, getNewScanner, getPaginator, getSimpleManagementUserRoles, getStatus, getTableExport, getTemplateEngineErrorMessage, getTemplateEngineErrorTitle, getText, getText, getTitle, getTransientFields, getUpdateSetClause, getUpdateSetClause, hasAccess, hasExternalLinks, hasNoColumnsConfig, initialize, initialValue, initValuesSize, isCurrentUserUpdate, isCustomResponse, isNoContentResponse, isNoContentResponseButRoute, isPrecisionInputType, isRetryCall, loginMarker, parseAssociatedEntities, parseUnassociatedEntities, patchInputValue, readSnippetResource, redirectedMarker, refreshUserRoles, registerDisplayField, registerRoutes, renderAll, saveData, setCurrentEntityDbId, setMessageType, setVar, setVarAll, uniqueFields, uniqueTestMethods inherited from class org.nanohttpd.router.RouterNanoHTTPD.DefaultStreamHandler
delete, other, post, put
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
ChangeHandler
-
-
Method Details
-
readData
Description copied from class:BaseHandlerRead data from DB that must be filled when the template is parsed. Used by index and view handlers.- Overrides:
readDatain classBaseHandler- Parameters:
session- HTTP sessionid- db record id > 0 if a single record should be read otherwise < 0;- Returns:
- response or null, null means success, response's status must be checked!
- Throws:
Exception- exception
-
updateData
Description copied from class:BaseHandlerUpdate data in DB. Override for edit handlers.- Overrides:
updateDatain classBaseHandler- Parameters:
session- HTTP sessionid- db record id- Returns:
- response or null, null means success, response's status must be checked!
- Throws:
Exception- exception
-
render
Description copied from class:BaseHandlerOverwrite to set your template variables. Only use the pure names without bracket-limiters and $-sign; e.g., In template '{$name}' -> 'name' as variable. Example:setVar("name", "Gandalf").- Overrides:
renderin classBaseHandler- Parameters:
session- HTTP session
-
getRedirectHandler
Description copied from class:BaseHandlerOverwrite to get the right re-route/redirect index handler after modifying data. It must be of the same entity as the last executing handler!- Overrides:
getRedirectHandlerin classBaseHandler- Returns:
- redirect index handler
-
getResource
Description copied from class:BaseHandlerGet web resource file as it lies on the file system relatively to the started server process.- Specified by:
getResourcein interfaceHandler- Specified by:
getResourcein classBaseHandler- Returns:
- web resource
-
getEntity
Description copied from class:BaseHandlerGet web entity (use plural, e.g. 'tasks', 'users'.- Overrides:
getEntityin classBaseHandler- Returns:
- web entity
-
showMenu
Description copied from class:BaseHandlerShow template menu?- Overrides:
showMenuin classBaseHandler- Parameters:
userSession- user session, possible even a temporary session from a not logged in user- Returns:
- true if a menu should be shown
-
showLangMenu
Description copied from class:BaseHandlerShow language menu?- Overrides:
showLangMenuin classBaseHandler- Parameters:
userSession- user session, possible even a temporary session from a not logged in user- Returns:
- true if language menu should be shown
-