Package de.terrestris.shoguncore.web
Class AbstractWebController<E extends PersistentObject,D extends GenericHibernateDao<E,java.lang.Integer>,S extends AbstractCrudService<E,D>>
- java.lang.Object
-
- de.terrestris.shoguncore.web.AbstractWebController<E,D,S>
-
- Direct Known Subclasses:
AbstractRestController,ApplicationController,FileController,LayerController,ModuleController,PluginController,TreeNodeController,UserController,WpsParameterController
public abstract class AbstractWebController<E extends PersistentObject,D extends GenericHibernateDao<E,java.lang.Integer>,S extends AbstractCrudService<E,D>> extends java.lang.ObjectThis abstract controller class provides basic web controller functionality: A logger and a service.- Author:
- Daniel Koch
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.LoggerLOGThe LOGGER instance (that will be available in all subclasses)protected SserviceTheAbstractCrudServicefor this controller.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractWebController(java.lang.Class<E> entityClass)Constructor that sets the concrete entity class for the controller.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Class<E>getEntityClass()SgetService()abstract voidsetService(S service)Subclasses must implement this class and annotate it withAutowiredandQualifier!
-
-
-
Field Detail
-
LOG
protected final org.apache.logging.log4j.Logger LOG
The LOGGER instance (that will be available in all subclasses)
-
service
protected S extends AbstractCrudService<E,D> service
TheAbstractCrudServicefor this controller.
-
-
Constructor Detail
-
AbstractWebController
protected AbstractWebController(java.lang.Class<E> entityClass)
Constructor that sets the concrete entity class for the controller. Subclasses MUST call this constructor.
-
-
Method Detail
-
setService
public abstract void setService(S service)
Subclasses must implement this class and annotate it withAutowiredandQualifier!- Parameters:
service- the service to set
-
getService
public S getService()
- Returns:
- the service
-
getEntityClass
public java.lang.Class<E> getEntityClass()
- Returns:
- the entityClass
-
-