Class 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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 into
        subject - - current subject
        ft - - filter type to generate condition from
        boundVariables -
        filterType - - filter type name
        permissions - - permissions granted by subject
        bi - - the BindinItem on which the permission is to apply