|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.bundle.Controller
org.torweg.pulse.component.core.accesscontrol.admin.AbstractAccessControlEditor
public abstract class AbstractAccessControlEditor
Base-class to derive access-control-editors from. Provides utility-methods.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller |
|---|
Controller.AlwaysRun |
| Field Summary | |
|---|---|
protected static org.slf4j.Logger |
LOGGER
the Logger. |
| Constructor Summary | |
|---|---|
AbstractAccessControlEditor()
|
|
| Method Summary | |
|---|---|
protected org.hibernate.criterion.Criterion |
buildCriterionFromRequest(ServiceRequest request,
java.lang.String parameterName,
java.lang.String propertyName)
builds Restrictions.ilike from request-parameter for given
property-name with MatchMode.ANYWHERE. |
protected org.hibernate.criterion.Criterion |
buildIdCriterionFromRequest(ServiceRequest request)
builds Restrictions.idEq from request. |
protected org.hibernate.Criteria |
buildLoadAssorterCriteria(ServiceRequest request,
boolean unasoc,
org.hibernate.Session s,
java.util.List<java.lang.Long> ids,
java.lang.Class<? extends AbstractBasicEntity> clazz)
builds the Criteria for the assorter to load the joined
entities. |
protected org.hibernate.Criteria |
buildLoadAssorterCriteria(ServiceRequest request,
boolean unasoc,
org.hibernate.Session s,
java.lang.Long id,
java.lang.Class<? extends AbstractBasicEntity> clazz,
java.lang.String alias)
builds the Criteria for the assorter to load the contained
entities. |
protected java.lang.String |
getReqParamIgnoreEmptyValue(ServiceRequest request,
java.lang.String parameterName)
returns the parameter-value or "", null if request-parameter
parameterName is null. |
protected java.lang.String |
getReqParamOrNullIfValueEmpty(ServiceRequest request,
java.lang.String parameterName)
returns the parameter-value; null if request-parameter
parameterName is null or "". |
protected net.sf.json.JSONArray |
loadAssorterData(ServiceRequest request,
java.lang.Class<? extends AbstractBasicEntity> clazz,
java.lang.String alias)
Loads the assorter-data for the contained entities. |
protected net.sf.json.JSONArray |
loadAssorterData(ServiceRequest request,
org.hibernate.Session s,
java.lang.Class<? extends AbstractAccessControlObject> clazz,
java.util.List<java.lang.Long> ids)
Loads the assorter-data for the joined entities. |
protected long |
processCriteriaForPaging(ServiceRequest request,
org.hibernate.Criteria criteria)
returns the total number of results for the current criteria as integer and applies paging-start/limit to the criteria. |
protected java.util.List<java.lang.Object> |
retrieveAssorterObjects(java.lang.String identifier, ServiceRequest request,
java.lang.String clazz,
org.hibernate.Session s)
|
| Methods inherited from class org.torweg.pulse.bundle.Controller |
|---|
getAlwaysRun, isAlwaysRun, setAlwaysRun |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.slf4j.Logger LOGGER
| Constructor Detail |
|---|
public AbstractAccessControlEditor()
| Method Detail |
|---|
protected final net.sf.json.JSONArray loadAssorterData(ServiceRequest request,
java.lang.Class<? extends AbstractBasicEntity> clazz,
java.lang.String alias)
request - the ServiceRequestclazz - the Class<? extends AbstractBasicEntity>alias - the alias to be used
JSONArray with the data
protected final net.sf.json.JSONArray loadAssorterData(ServiceRequest request,
org.hibernate.Session s,
java.lang.Class<? extends AbstractAccessControlObject> clazz,
java.util.List<java.lang.Long> ids)
request - the ServiceRequests - the hibernateTM-Sessionclazz - the Class<? extends AbstractAccessControlObject>ids - the ids
JSONArray
protected final org.hibernate.Criteria buildLoadAssorterCriteria(ServiceRequest request,
boolean unasoc,
org.hibernate.Session s,
java.lang.Long id,
java.lang.Class<? extends AbstractBasicEntity> clazz,
java.lang.String alias)
Criteria for the assorter to load the contained
entities.
request - the current ServiceRequestunasoc - true to retrieve criteria for loading of
Class<? extends AbstractBasicEntity>s,
false for criteria for loading of UN-associated
Class<?
extends AbstractBasicEntity>ss - the current Sessionid - the idclazz - the Class<? extends AbstractBasicEntity>alias - the field in the clazz
Criteria
protected final org.hibernate.Criteria buildLoadAssorterCriteria(ServiceRequest request,
boolean unasoc,
org.hibernate.Session s,
java.util.List<java.lang.Long> ids,
java.lang.Class<? extends AbstractBasicEntity> clazz)
Criteria for the assorter to load the joined
entities.
request - the current ServiceRequestunasoc - true to retrieve criteria for loading of associated
Class<? extends AbstractBasicEntity>s,
false for criteria for loading of UN-associated
Class<? extends AbstractBasicEntity>ss - the current Sessionids - the idsclazz - the Class<? extends AbstractBasicEntity>
Criteria
protected final java.util.List<java.lang.Object> retrieveAssorterObjects(java.lang.String identifier, ServiceRequest request,
java.lang.String clazz,
org.hibernate.Session s)
identifier - further identifies the request-parameter to look forrequest - the current ServiceRequestclazz - the class to loads - the current Session
protected final org.hibernate.criterion.Criterion buildCriterionFromRequest(ServiceRequest request,
java.lang.String parameterName,
java.lang.String propertyName)
Restrictions.ilike from request-parameter for given
property-name with MatchMode.ANYWHERE.
request - the current ServiceRequestparameterName - the name of the request-parameterpropertyName - the name of the property
Criterion if request-parameter name != '' or null, null
otherwiseprotected final org.hibernate.criterion.Criterion buildIdCriterionFromRequest(ServiceRequest request)
Restrictions.idEq from request.
request - the current ServiceRequest
Criterion if request-parameter id != '' or null, null
otherwise
protected final long processCriteriaForPaging(ServiceRequest request,
org.hibernate.Criteria criteria)
request - the current ServiceRequestcriteria - the criteria
protected final java.lang.String getReqParamOrNullIfValueEmpty(ServiceRequest request,
java.lang.String parameterName)
null if request-parameter
parameterName is null or "".
request - the current ServiceRequestparameterName - the name of the request-parameter
null if request-parameter
parameterName is null or ""
protected final java.lang.String getReqParamIgnoreEmptyValue(ServiceRequest request,
java.lang.String parameterName)
null if request-parameter
parameterName is null.
request - the current ServiceRequestparameterName - the name of the request-parameter
null if request-parameter
parameterName is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||