Class ComparableInfo
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,Ordered,org.springframework.core.Ordered
Used with a comparison view (such as in maintenance documents edit mode) where two objects with the same properties are compared. This class configures the object paths for the objects that will be compared, and has additional configuration for the generated comparison group
All comparison objects must have the same fields and collection rows
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCodeFields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the path (from the form) for the object to compare toSpecifies an id suffix to use for the generated comparison fieldsText that should display on the header for the compare groupintgetOrder()Sets the order value that will be used to determine where the compare group should be placed in relation to the other compare groupsbooleanIndicates whether this comparable group's field values should include therenderOnComparableModifiercontext variable when this comparable is used to modify an existing componentbooleanIndicates whether this comparable group's field values should be compared to when highlighting changes of values between comparables (versions)booleanIndicates whether the fields in this comparable group should be highlighted if their values defer from the comparable group marked for comparisonbooleanIndicates whether the compare group should be read-onlyvoidsetBindingObjectPath(String bindingObjectPath) Setter for the path to the compare objectvoidsetComparableId(String comparableId) Setter for the id prefix to use for the generated comparison componentsvoidsetCompareToForFieldRender(boolean compareToForFieldRender) Setter for the use comparable group values forrenderOnComparableModifiercontext variablevoidsetCompareToForValueChange(boolean compareToForValueChange) Setter for the use comparable group values for comparison indicatorvoidsetHeaderText(String headerText) Setter for the compare group header textvoidsetHighlightValueChange(boolean highlightValueChange) Setter for the highlight comparable field value changed indicatorvoidsetOrder(int order) Setter for the compare object ordervoidsetReadOnly(boolean readOnly) Setter for the read-only indicatorMethods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
-
Constructor Details
-
ComparableInfo
public ComparableInfo()
-
-
Method Details
-
getBindingObjectPath
Returns the path (from the form) for the object to compare toWhen a comparison view is rendered, a group will be rendered for each comparison object using the fields defined on the view. This gives the path to one of the comparison objects
e.g. For maintenance documents the compare object paths would be document.newMaintainableObject.businessObject and document.oldMaintainableObject.businessObject
- Returns:
- path to the compare object
-
setBindingObjectPath
Setter for the path to the compare object- Parameters:
bindingObjectPath-
-
getHeaderText
Text that should display on the header for the compare groupIn the comparison view each compare group can be labeled, this gives the text that should be used for that label. For example in the maintenance view the compare record is labeled 'Old' to indicate it is the old version of the record
- Returns:
- header text
-
setHeaderText
Setter for the compare group header text- Parameters:
headerText-
-
isReadOnly
public boolean isReadOnly()Indicates whether the compare group should be read-only- Returns:
- true if the group should be read-only, false if edits are allowed
-
setReadOnly
public void setReadOnly(boolean readOnly) Setter for the read-only indicator- Parameters:
readOnly-
-
getOrder
public int getOrder()Sets the order value that will be used to determine where the compare group should be placed in relation to the other compare groupsFor example if the compare groups are being rendered from left to right in columns, a lower order value would be placed to the left of a compare group with a higher order value
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- See Also:
-
setOrder
public void setOrder(int order) Setter for the compare object order -
getComparableId
Specifies an id suffix to use for the generated comparison fieldsFor the given string, all components created for the comparison group will contain the string on their id. This can be helpful for scripting. If not given, the items will receive a default id suffix
- Returns:
- id suffix for comparison group
-
setComparableId
Setter for the id prefix to use for the generated comparison components- Parameters:
comparableId-
-
isCompareToForValueChange
public boolean isCompareToForValueChange()Indicates whether this comparable group's field values should be compared to when highlighting changes of values between comparables (versions)- Returns:
- true if this comparable group should be used for comparison, false if not
- See Also:
-
setCompareToForValueChange
public void setCompareToForValueChange(boolean compareToForValueChange) Setter for the use comparable group values for comparison indicator- Parameters:
compareToForValueChange-
-
isCompareToForFieldRender
public boolean isCompareToForFieldRender()Indicates whether this comparable group's field values should include therenderOnComparableModifiercontext variable when this comparable is used to modify an existing componentThis is especially useful when defining a
Uif-ActionFieldthat needs to appear on the new side of a maintenance document. Marking this as true on the ComparableInfo will make it push therenderOnComparableModifiercontext variable, holding the same value as this variable, making it easier to determine whether the field should be rendered based on whether this ComparableInfo is being applied.- Returns:
- true if this comparable group should be used for
the
renderOnComparableModifiercontext variable, false if not
-
setCompareToForFieldRender
public void setCompareToForFieldRender(boolean compareToForFieldRender) Setter for the use comparable group values forrenderOnComparableModifiercontext variable- Parameters:
compareToForFieldRender-
-
isHighlightValueChange
public boolean isHighlightValueChange()Indicates whether the fields in this comparable group should be highlighted if their values defer from the comparable group marked for comparison- Returns:
- true if the comparable fields should be highlighted, false if they should not be highlighted (no comparison will be performed)
- See Also:
-
setHighlightValueChange
public void setHighlightValueChange(boolean highlightValueChange) Setter for the highlight comparable field value changed indicator- Parameters:
highlightValueChange-
-