Class SubjectFilterOnWriteCallback


  • public class SubjectFilterOnWriteCallback
    extends WriteProcessingCallback
    Enforce SubjectFilters on write This callback is registered if SubjectFilters are declared for a BindingSet It applies its ruled for writing It does currently not support nested filter expressions (only flat AND or OR) and only '=' for comparison
    • Field Detail

      • enforcedBis

        protected java.util.List<de.businesscode.bcdui.binding.write.SubjectFilterOnWriteCallback.EnforcedBi> enforcedBis
      • subject

        protected org.apache.shiro.subject.Subject subject
      • columns

        protected java.util.List<BindingItem> columns
      • conIsAnd

        protected boolean conIsAnd
    • Constructor Detail

      • SubjectFilterOnWriteCallback

        public SubjectFilterOnWriteCallback​(Connective con)
        Evaluate the SubjectFilter defined and translate it into the enforced BindingItems
        Parameters:
        con -
    • Method Detail

      • endHeader

        public void endHeader​(java.util.List<BindingItem> columns,
                              java.util.List<java.lang.Integer> columnTypes,
                              java.util.Collection<java.lang.String> keyColumnNames)
                       throws java.lang.Exception
        Make sure the Wrq contains all enforcedBis
        Overrides:
        endHeader in class WriteProcessingCallback
        Throws:
        java.lang.Exception
      • endDataRow

        public void endDataRow​(WriteProcessingCallback.ROW_TYPE rowType,
                               java.util.List<java.lang.String> cValues,
                               java.util.List<java.lang.String> oValues)
                        throws java.lang.Exception
        Each row must have an allowed value for each enforcedBis set
        Overrides:
        endDataRow in class WriteProcessingCallback
        Parameters:
        rowType - depending on the rowtype cValues and oValues change semantics, i.e: wrs:C in wrs:I vs wrs:C in wrs:M
        cValues - list of values of wrs:C columns
        oValues - list of values of wrs:O columns
        Throws:
        java.lang.Exception