org.kuali.rice.kns.uif.modifier
Class ComparableInfo

java.lang.Object
  extended by org.kuali.rice.kns.uif.modifier.ComparableInfo
All Implemented Interfaces:
Serializable, org.springframework.core.Ordered

public class ComparableInfo
extends Object
implements Serializable, Ordered

Provides configuration for comparing an object with another object

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:
CompareFieldCreateModifier, Serialized Form

Field Summary
 
Fields inherited from interface org.kuali.rice.kns.uif.core.Ordered
INITIAL_ORDER_VALUE
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
ComparableInfo()
           
 
Method Summary
 String getBindingObjectPath()
          Returns the path (from the form) for the object to compare to
 String getHeaderText()
          Text that should display on the header for the compare group
 String getIdSuffix()
          Specifies an id suffix to use for the generated comparison fields
 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 groups
 boolean isReadOnly()
          Indicates whether the compare group should be read-only
 void setBindingObjectPath(String bindingObjectPath)
          Setter for the path to the compare object
 void setHeaderText(String headerText)
          Setter for the compare group header text
 void setIdSuffix(String idSuffix)
          Setter for the id prefix to use for the generated comparison components
 void setOrder(int order)
          Setter for the compare object order
 void setReadOnly(boolean readOnly)
          Setter for the read-only indicator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComparableInfo

public ComparableInfo()
Method Detail

getBindingObjectPath

public String getBindingObjectPath()
Returns the path (from the form) for the object to compare to

When 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:
String path to the compare object

setBindingObjectPath

public void setBindingObjectPath(String bindingObjectPath)
Setter for the path to the compare object

Parameters:
bindingObjectPath -

getHeaderText

public String getHeaderText()
Text that should display on the header for the compare group

In 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:
String header text

setHeaderText

public void setHeaderText(String headerText)
Setter for the compare group header text

Parameters:
headerText -

isReadOnly

public boolean isReadOnly()
Indicates whether the compare group should be read-only

Returns:
boolean 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 groups

For 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:
getOrder in interface org.springframework.core.Ordered
See Also:
Ordered.getOrder()

setOrder

public void setOrder(int order)
Setter for the compare object order

Parameters:
order -
See Also:
org.springframework.core.Ordered.getOrder()

getIdSuffix

public String getIdSuffix()
Specifies an id suffix to use for the generated comparison fields

For 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:
String id suffix for comparison group

setIdSuffix

public void setIdSuffix(String idSuffix)
Setter for the id prefix to use for the generated comparison components

Parameters:
idSuffix -


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.