Package ch.autumo.beetroot.handler.users
Class UsersAddHandler
java.lang.Object
org.nanohttpd.router.RouterNanoHTTPD.DefaultStreamHandler
org.nanohttpd.router.RouterNanoHTTPD.DefaultHandler
ch.autumo.beetroot.handler.BaseHandler
ch.autumo.beetroot.handler.DefaultAddHandler
ch.autumo.beetroot.handler.users.UsersAddHandler
- All Implemented Interfaces:
Handler,RouterNanoHTTPD.UriResponder
- Direct Known Subclasses:
ExtUsersAddHandler
Users add handler.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.autumo.beetroot.handler.BaseHandler
BaseHandler.IfSectionHandler -
Field Summary
Fields inherited from class ch.autumo.beetroot.handler.BaseHandler
action, columns, emptyBean, entity, htmlData, htmlHead, initialValues, insertServletNameInTemplateRefs, MSG_TYPE_ERR, MSG_TYPE_INFO, MSG_TYPE_WARN, PRECISION_INPUT_TYPES, servletName, TAG_PREFIX_LANG, transientFields, uniqueFields -
Constructor Summary
ConstructorsConstructorDescriptionUsersAddHandler(String entity) UsersAddHandler(String entity, String errMsg) -
Method Summary
Modifier and TypeMethodDescriptionGet additional mandatory fields of the table that are not present and mandatory fields in the GUI.Class<?>Get bean entity class that has been generated trough PLANT, self-written or null (then null in extract calls too).Class<?>Overwrite to get the right re-route/redirect index handler after modifying data.Page title show left above the navigation area.booleanOverwrite this method, to specifically extend handler authorization, e.g. with more app user roles.saveData(BeetRootHTTPSession session) Save data to DB.Methods inherited from class ch.autumo.beetroot.handler.DefaultAddHandler
extractCustomSingleInputDiv, extractSingleInputDiv, extractSingleInputDiv, formatSingleValueForDB, getResource, getSelectValues, isSelect, readDataMethods inherited from class ch.autumo.beetroot.handler.BaseHandler
addCheckBox, addErrorMessage, addHtmlDataLine, addHtmlHeadLine, addSuccessMessage, addWarningMessage, columns, columnsSize, deleteData, get, getColumn, getColumnsForSql, getColumnsForSql, getCurrentEntityDbId, getCurrentSession, getCustomizedExceptionInformation, getData, getEmptyBean, getEntity, getHandlerClass, getHtmlData, getHtmlHead, getInsertValues, getLayout, getMessageType, getMimeType, getNewScanner, getNewScanner, getPaginator, getSimpleManagementUserRoles, getStatus, getTableExport, getTemplateEngineErrorMessage, getTemplateEngineErrorTitle, getText, getText, getTransientFields, getUpdateSetClause, getUpdateSetClause, hasExternalLinks, hasNoColumnsConfig, initialize, initialValue, initValuesSize, isCurrentUserUpdate, isCustomResponse, isNoContentResponse, isNoContentResponseButRoute, isPrecisionInputType, isRetryCall, loginMarker, parseAssociatedEntities, parseUnassociatedEntities, patchInputValue, readSnippetResource, redirectedMarker, refreshUserRoles, registerDisplayField, registerRoutes, render, renderAll, setCurrentEntityDbId, setMessageType, setVar, setVarAll, showLangMenu, showMenu, uniqueFields, uniqueTest, updateDataMethods inherited from class org.nanohttpd.router.RouterNanoHTTPD.DefaultStreamHandler
delete, other, post, put
-
Constructor Details
-
UsersAddHandler
-
UsersAddHandler
-
-
Method Details
-
saveData
Description copied from class:BaseHandlerSave data to DB. Override for add handlers.- Overrides:
saveDatain classDefaultAddHandler- Parameters:
session- HTTP session- Returns:
- response or null, null means success, response's status must be checked and must hold the id of the saved record!
- Throws:
Exception- exception
-
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
-
getAddMandatoryFields
Description copied from class:DefaultAddHandlerGet additional mandatory fields of the table that are not present and mandatory fields in the GUI. They are usually the DB NOT NULL fields. Return the column/value pair within a map. The value must be an object that is representable as a string!- Specified by:
getAddMandatoryFieldsin classDefaultAddHandler- Returns:
- column/value pair map
-
getBeanClass
Description copied from class:DefaultAddHandlerGet bean entity class that has been generated trough PLANT, self-written or null (then null in extract calls too).- Overrides:
getBeanClassin classDefaultAddHandler- Returns:
- bean entity class
-
hasAccess
Description copied from class:BaseHandlerOverwrite this method, to specifically extend handler authorization, e.g. with more app user roles.- Overrides:
hasAccessin classBaseHandler- Parameters:
userSession- user session- Returns:
- true if access is allowed, otherwise false
-
getTitle
Description copied from class:BaseHandlerPage title show left above the navigation area. If not overwritten, the entity name is shown starting with an upper-case letter!- Overrides:
getTitlein classBaseHandler- Parameters:
userSession- user session- Returns:
- page title
-