Class SubjectFilterOnWriteCallback
java.lang.Object
de.businesscode.bcdui.binding.write.WriteProcessingCallback
de.businesscode.bcdui.binding.write.SubjectFilterOnWriteCallback
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
-
Nested Class Summary
Nested classes/interfaces inherited from class de.businesscode.bcdui.binding.write.WriteProcessingCallback
WriteProcessingCallback.ROW_TYPE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<BindingItem>
protected boolean
protected List<de.businesscode.bcdui.binding.write.SubjectFilterOnWriteCallback.EnforcedBi>
protected org.apache.shiro.subject.Subject
Fields inherited from class de.businesscode.bcdui.binding.write.WriteProcessingCallback
bindingSet
-
Constructor Summary
ConstructorsConstructorDescriptionEvaluate the SubjectFilter defined and translate it into the enforced BindingItems -
Method Summary
Modifier and TypeMethodDescriptionvoid
endDataRow
(WriteProcessingCallback.ROW_TYPE rowType, List<String> cValues, List<String> oValues) Each row must have an allowed value for each enforcedBis setvoid
endHeader
(List<BindingItem> columns, List<Integer> columnTypes, Collection<String> keyColumnNames) .Methods inherited from class de.businesscode.bcdui.binding.write.WriteProcessingCallback
getParams, getValueBean, indexOf, initialize, setBindingSet, setParams, setValueBean
-
Field Details
-
enforcedBis
protected List<de.businesscode.bcdui.binding.write.SubjectFilterOnWriteCallback.EnforcedBi> enforcedBis -
subject
protected org.apache.shiro.subject.Subject subject -
columns
-
conIsAnd
protected boolean conIsAnd
-
-
Constructor Details
-
SubjectFilterOnWriteCallback
Evaluate the SubjectFilter defined and translate it into the enforced BindingItems- Parameters:
con
-
-
-
Method Details
-
endHeader
public void endHeader(List<BindingItem> columns, List<Integer> columnTypes, Collection<String> keyColumnNames) throws Exception . Make sure the Wrq contains all enforcedBis- Overrides:
endHeader
in classWriteProcessingCallback
- Throws:
Exception
-
endDataRow
public void endDataRow(WriteProcessingCallback.ROW_TYPE rowType, List<String> cValues, List<String> oValues) throws Exception Each row must have an allowed value for each enforcedBis set- Overrides:
endDataRow
in classWriteProcessingCallback
- Parameters:
rowType
- depending on the rowtype cValues and oValues change semantics, i.e: wrs:C in wrs:I vs wrs:C in wrs:McValues
- list of values of wrs:C columnsoValues
- list of values of wrs:O columns- Throws:
Exception
-