public abstract class AbstractController extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractController.PersistAction |
| Modifier and Type | Field and Description |
|---|---|
static String |
FACESREDIRECTTRUE
can be appended to an outcome of an action is a redirect is desired.
|
| Constructor and Description |
|---|
AbstractController() |
| Modifier and Type | Method and Description |
|---|---|
String |
diacriticsKeyBoard()
for use in primefaces keyboard layoutTemplate
|
abstract CrudReadService |
getCrudReadService() |
abstract CrudWriteService |
getCrudWriteService() |
protected javax.security.enterprise.SecurityContext |
getSecurityContext() |
<T extends EntityInterface> |
persist(T edited,
AbstractController.PersistAction persistAction)
Call
#persist(org.fryske_akademy.jpa.EntityInterface, org.fryske_akademy.jsf.util.PersistAction, java.lang.String)
with persisAction + " success" |
<T extends EntityInterface> |
persist(T edited,
AbstractController.PersistAction persistAction,
String successMessage)
|
<T extends EntityInterface> |
persist(T edited,
AbstractController.PersistAction persistAction,
String successMessage,
boolean callHandle)
Calls
CrudWriteService.create(java.io.Serializable), update or
delete, calls JsfUtil.addSuccessMessage(java.lang.String) with
the succesMessage appended with the entity (either converted by
Converter or toString. |
public static final String FACESREDIRECTTRUE
public abstract CrudReadService getCrudReadService()
public abstract CrudWriteService getCrudWriteService()
public <T extends EntityInterface> T persist(T edited, AbstractController.PersistAction persistAction) throws Exception
#persist(org.fryske_akademy.jpa.EntityInterface, org.fryske_akademy.jsf.util.PersistAction, java.lang.String)
with persisAction + " success"T - edited - persistAction - Exceptionpublic <T extends EntityInterface> T persist(T edited, AbstractController.PersistAction persistAction, String successMessage) throws Exception
persist(org.fryske_akademy.jpa.EntityInterface, org.fryske_akademy.jsf.AbstractController.PersistAction, java.lang.String, boolean)
with trueT - edited - persistAction - successMessage - Exceptionpublic <T extends EntityInterface> T persist(T edited, AbstractController.PersistAction persistAction, String successMessage, boolean callHandle) throws Exception
CrudWriteService.create(java.io.Serializable), update or
delete, calls JsfUtil.addSuccessMessage(java.lang.String) with
the succesMessage appended with the entity (either converted by
Converter or toString. In case of an exception, when callHandle
is true, call
JsfUtil.handleException(java.lang.Exception, java.lang.String).edited - persistAction - successMessage - the message with the entity id appendedcallHandle - when true call JsfUtil.handleException(java.lang.Exception, java.lang.String).Exceptionpublic String diacriticsKeyBoard()
protected javax.security.enterprise.SecurityContext getSecurityContext()
Copyright © 2018 Fryske Akademy. All rights reserved.