Package de.businesscode.bcdui.wrs.load
Class SubjectSettings2Sql
- java.lang.Object
-
- de.businesscode.bcdui.wrs.load.SubjectSettings2Sql
-
- All Implemented Interfaces:
SqlConditionGenerator
public class SubjectSettings2Sql extends java.lang.Object implements SqlConditionGenerator
Returns a where clause based on the SubjectFilters of the BindingSet and the current Subject's permissions Initially taken from WrsSqlGenerator. For change history see there We are instantiated per SQL generation for a SubjectFilters
-
-
Constructor Summary
Constructors Constructor Description SubjectSettings2Sql(BindingSet bindingSet, WrqInfo wrqInfo, java.util.List<org.w3c.dom.Element> boundVariables, java.lang.String wrqAlias, java.lang.String sqlAlias)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
generateCondition(java.lang.StringBuilder subjectSettingsClause, org.apache.shiro.subject.Subject subject, SubjectFilterType ft, java.util.List<org.w3c.dom.Element> boundVariables, java.lang.String filterType, java.util.Set<java.lang.String> permissions, BindingItem bi)
generates single condition like "col in ('a','b','c')"java.lang.String
getCondition()
Returns a where clause based on the SubjectFilters of the BindingSet and the current Subject's permissions
-
-
-
Constructor Detail
-
SubjectSettings2Sql
public SubjectSettings2Sql(BindingSet bindingSet, WrqInfo wrqInfo, java.util.List<org.w3c.dom.Element> boundVariables, java.lang.String wrqAlias, java.lang.String sqlAlias) throws BindingNotFoundException
- Throws:
BindingNotFoundException
-
-
Method Detail
-
getCondition
public java.lang.String getCondition() throws BindingException
Returns a where clause based on the SubjectFilters of the BindingSet and the current Subject's permissions- Specified by:
getCondition
in interfaceSqlConditionGenerator
- Returns:
- additional condition or empty string
- Throws:
BindingException
-
generateCondition
protected void generateCondition(java.lang.StringBuilder subjectSettingsClause, org.apache.shiro.subject.Subject subject, SubjectFilterType ft, java.util.List<org.w3c.dom.Element> boundVariables, java.lang.String filterType, java.util.Set<java.lang.String> permissions, BindingItem bi)
generates single condition like "col in ('a','b','c')"- Parameters:
subjectSettingsClause
- - to generate condition intosubject
- - current subjectft
- - filter type to generate condition fromboundVariables
-filterType
- - filter type namepermissions
- - permissions granted by subjectbi
- - the BindinItem on which the permission is to apply
-
-