Package de.businesscode.bcdui.wrs.load
Class SubjectSettings2Sql
java.lang.Object
de.businesscode.bcdui.wrs.load.SubjectSettings2Sql
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionSubjectSettings2Sql
(BindingSet bindingSet, WrqInfo wrqInfo, List<Element> boundVariables, String wrqAlias, String sqlAlias) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
generateCondition
(StringBuilder subjectSettingsClause, org.apache.shiro.subject.Subject subject, SubjectFilterType ft, List<Element> boundVariables, String filterType, Set<String> permissions, BindingItem bi) generates single condition like "col in ('a','b','c')"Returns a where clause based on the SubjectFilters of the BindingSet and the current Subject's permissions
-
Constructor Details
-
SubjectSettings2Sql
public SubjectSettings2Sql(BindingSet bindingSet, WrqInfo wrqInfo, List<Element> boundVariables, String wrqAlias, String sqlAlias) throws BindingNotFoundException - Throws:
BindingNotFoundException
-
-
Method Details
-
getCondition
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(StringBuilder subjectSettingsClause, org.apache.shiro.subject.Subject subject, SubjectFilterType ft, List<Element> boundVariables, String filterType, Set<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
-