org.kuali.rice.kns.datadictionary.control
Class ControlDefinitionBase

java.lang.Object
  extended by org.kuali.rice.kns.datadictionary.DataDictionaryDefinitionBase
      extended by org.kuali.rice.kns.datadictionary.control.ControlDefinitionBase
All Implemented Interfaces:
Serializable, ControlDefinition, DataDictionaryDefinition, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
ButtonControlDefinition, CheckboxControlDefinition, CurrencyControlDefinition, FileControlDefinition, HiddenControlDefinition, KualiUserControlDefinition, LinkControlDefinition, LookupHiddenControlDefinition, LookupReadonlyControlDefinition, MultivalueControlDefinitionBase, TextareaControlDefinition, TextControlDefinition, WorkflowWorkgroupControlDefinition

public abstract class ControlDefinitionBase
extends DataDictionaryDefinitionBase
implements ControlDefinition

A single HTML control definition in the DataDictionary, which contains information relating to the HTML control used to realize a specific attribute. All types of controls are represented by an instance of this class; you have to call one of the is* methods to figure out which of the other accessors should return useful values.

See Also:
Serialized Form

Field Summary
protected  String businessObjectClass
           
protected  Integer cols
           
protected  boolean datePicker
           
protected  boolean expandedTextArea
           
protected  Boolean includeBlankRow
           
protected  Boolean includeKeyInLabel
           
protected  String keyAttribute
           
protected  String labelAttribute
           
protected  boolean ranged
           
protected  Integer rows
           
protected  String script
           
private static long serialVersionUID
           
protected  Integer size
           
protected  String valuesFinderClass
           
 
Fields inherited from class org.kuali.rice.kns.datadictionary.DataDictionaryDefinitionBase
id
 
Constructor Summary
ControlDefinitionBase()
           
 
Method Summary
 void completeValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass)
          Directly validate simple fields.
 boolean equals(Object object)
           
 String getBusinessObjectClass()
           
 Integer getCols()
           
 Boolean getIncludeBlankRow()
           
 Boolean getIncludeKeyInLabel()
          Gets the flag that indicates if the labels the ValuesFinder class returns should include the key.
 String getKeyAttribute()
           
 String getLabelAttribute()
           
 Integer getRows()
           
 String getScript()
           
 Integer getSize()
           
 String getValuesFinderClass()
           
 boolean hasScript()
           
 boolean isApcSelect()
           
 boolean isButton()
           
 boolean isCheckbox()
           
 boolean isCurrency()
           
 boolean isDatePicker()
           
 boolean isExpandedTextArea()
           
 boolean isFile()
           
 boolean isHidden()
           
 boolean isKualiUser()
           
 boolean isLink()
           
 boolean isLookupHidden()
           
 boolean isLookupReadonly()
           
 boolean isMultiselect()
           
 boolean isRadio()
           
 boolean isRanged()
           
 boolean isSelect()
           
 boolean isText()
           
 boolean isTextarea()
           
 boolean isWorkflowWorkgroup()
           
 void setBusinessObjectClass(String businessObjectClass)
          Used by a PersistableBusinessObjectValuesFinder to automatically query and display a list of business objects as part of a select list or set of radio buttons.
 void setCols(Integer cols)
          Number of columns to display on a text-area widget.
 void setDatePicker(boolean datePicker)
          Whether this control should have a date picker button next to the field.
 void setExpandedTextArea(boolean eTextArea)
          Whether this control should have a expanded text area button next to the field.
 void setIncludeBlankRow(Boolean includeBlankRow)
           
 void setIncludeKeyInLabel(Boolean includeKeyInLabel)
          Whether to include the key in the label for select lists and radio buttons.
 void setKeyAttribute(String keyAttribute)
          Attribute of the given businessObjectClass to use as the value of a select list or set of radio buttons.
 void setLabelAttribute(String labelAttribute)
          Attribute of the given businessObjectClass to use as the displayed label on a select list or set of radio buttons.
 void setRanged(boolean ranged)
          Sets the control as a ranged (from and to) date field if true, or a single date field if false
 void setRows(Integer rows)
          Number of rows to display on a text-area widget.
 void setScript(String script)
          JavaScript script to run when a select control's value is changed.
 void setSize(Integer size)
          Size of a text control.
 void setValuesFinderClass(String valuesFinderClass)
          Sets the Class used to retrieve the complete range of values for radiobutton and select controls.
 
Methods inherited from class org.kuali.rice.kns.datadictionary.DataDictionaryDefinitionBase
afterPropertiesSet, getId, setId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.kns.datadictionary.DataDictionaryDefinition
getId
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

datePicker

protected boolean datePicker

expandedTextArea

protected boolean expandedTextArea

script

protected String script

valuesFinderClass

protected String valuesFinderClass

businessObjectClass

protected String businessObjectClass

keyAttribute

protected String keyAttribute

labelAttribute

protected String labelAttribute

includeBlankRow

protected Boolean includeBlankRow

includeKeyInLabel

protected Boolean includeKeyInLabel

size

protected Integer size

rows

protected Integer rows

cols

protected Integer cols

ranged

protected boolean ranged
Constructor Detail

ControlDefinitionBase

public ControlDefinitionBase()
Method Detail

isDatePicker

public boolean isDatePicker()
Specified by:
isDatePicker in interface ControlDefinition

setDatePicker

public void setDatePicker(boolean datePicker)
Whether this control should have a date picker button next to the field. Valid for text fields.

Specified by:
setDatePicker in interface ControlDefinition
See Also:
ControlDefinition.setDatePicker(boolean)

isExpandedTextArea

public boolean isExpandedTextArea()
Specified by:
isExpandedTextArea in interface ControlDefinition

setExpandedTextArea

public void setExpandedTextArea(boolean eTextArea)
Whether this control should have a expanded text area button next to the field. Valid for textarea fields.

Specified by:
setExpandedTextArea in interface ControlDefinition
See Also:
ControlDefinition.setExpandedTextArea(boolean)

isCheckbox

public boolean isCheckbox()
Specified by:
isCheckbox in interface ControlDefinition
Returns:
true if this ControlDefinition instance represents an HTML checkbox control
See Also:
ControlDefinition.isCheckbox()

isHidden

public boolean isHidden()
Specified by:
isHidden in interface ControlDefinition
Returns:
true if this ControlDefinition instance represents an HTML hidden control
See Also:
ControlDefinition.isHidden()

isRadio

public boolean isRadio()
Specified by:
isRadio in interface ControlDefinition
Returns:
true if this ControlDefinition instance represents an HTML radiobutton control
See Also:
ControlDefinition.isRadio()

isSelect

public boolean isSelect()
Specified by:
isSelect in interface ControlDefinition
Returns:
true if this ControlDefinition instance represents an HTML select control
See Also:
ControlDefinition.isSelect()

isMultiselect

public boolean isMultiselect()
Specified by:
isMultiselect in interface ControlDefinition
Returns:
true if this ControlDefinition instance represents an HTML select control
See Also:
ControlDefinition.isSelect()

isApcSelect

public boolean isApcSelect()
Specified by:
isApcSelect in interface ControlDefinition
Returns:
true if this ControlDefinition instance represents an HTML select control that is tied to an APC rule
See Also:
ControlDefinition.isApcSelect()

isText

public boolean isText()
Specified by:
isText in interface ControlDefinition
Returns:
true if this ControlDefinition instance represents an HTML text control
See Also:
ControlDefinition.isText()

isTextarea

public boolean isTextarea()
Specified by:
isTextarea in interface ControlDefinition
Returns:
true if this ControlDefinition instance represents an HTML textarea control
See Also:
ControlDefinition.isTextarea()

isCurrency

public boolean isCurrency()
Specified by:
isCurrency in interface ControlDefinition
Returns:
true if the ControlDefinition instance represents a currency control
See Also:
ControlDefinition.isCurrency()

isKualiUser

public boolean isKualiUser()
Specified by:
isKualiUser in interface ControlDefinition
Returns:
true if the ControlDefinition instance represents a kualiUser control
See Also:
ControlDefinition.isKualiUser()

isWorkflowWorkgroup

public boolean isWorkflowWorkgroup()
Specified by:
isWorkflowWorkgroup in interface ControlDefinition
Returns:
true if the ControlDefinition instance represents a workflow workgroup control
See Also:
org.kuali.rice.kns.datadictionary.control.ControlDefinition#isWorkgroup()

isFile

public boolean isFile()
Specified by:
isFile in interface ControlDefinition
Returns:
true if this ControlDefinition instance represents an HTML File control
See Also:
ControlDefinition.isFile()

isLookupHidden

public boolean isLookupHidden()
Specified by:
isLookupHidden in interface ControlDefinition
Returns:
true if the ControlDefinition instance represents a lookupHidden control
See Also:
ControlDefinition.isLookupHidden()

isLookupReadonly

public boolean isLookupReadonly()
Specified by:
isLookupReadonly in interface ControlDefinition
Returns:
true if the ControlDefinition instance represents a lookupReadonly control
See Also:
ControlDefinition.isLookupReadonly()

isButton

public boolean isButton()
Specified by:
isButton in interface ControlDefinition
Returns:
true if the ControlDefinition instance represents a button control
See Also:
ControlDefinition.isButton()

isLink

public boolean isLink()
Specified by:
isLink in interface ControlDefinition
Returns:
true if the ControlDefinition instance represents a link control
See Also:
ControlDefinition.isLink()

setValuesFinderClass

public void setValuesFinderClass(String valuesFinderClass)
Description copied from interface: ControlDefinition
Sets the Class used to retrieve the complete range of values for radiobutton and select controls.

Specified by:
setValuesFinderClass in interface ControlDefinition
See Also:
org.kuali.rice.kns.datadictionary.control.ControlDefinition#setKeyValuesFinder(java.lang.String)

getBusinessObjectClass

public String getBusinessObjectClass()
Specified by:
getBusinessObjectClass in interface ControlDefinition
Returns:
the businessObjectClass

setBusinessObjectClass

public void setBusinessObjectClass(String businessObjectClass)
Used by a PersistableBusinessObjectValuesFinder to automatically query and display a list of business objects as part of a select list or set of radio buttons. The keyAttribute, labelAttribute, and includeKeyInLabel are used with this property.

Specified by:
setBusinessObjectClass in interface ControlDefinition
Parameters:
businessObjectClass - the businessObjectClass to set

getIncludeBlankRow

public Boolean getIncludeBlankRow()
Specified by:
getIncludeBlankRow in interface ControlDefinition
Returns:
the includeBlankRow

setIncludeBlankRow

public void setIncludeBlankRow(Boolean includeBlankRow)
Specified by:
setIncludeBlankRow in interface ControlDefinition

getIncludeKeyInLabel

public Boolean getIncludeKeyInLabel()
Description copied from interface: ControlDefinition
Gets the flag that indicates if the labels the ValuesFinder class returns should include the key.

Specified by:
getIncludeKeyInLabel in interface ControlDefinition
Returns:
the includeKeyInLabel

setIncludeKeyInLabel

public void setIncludeKeyInLabel(Boolean includeKeyInLabel)
Whether to include the key in the label for select lists and radio buttons.

Specified by:
setIncludeKeyInLabel in interface ControlDefinition
Parameters:
includeKeyInLabel - whether to include the key with the label to be displayed or not.

getKeyAttribute

public String getKeyAttribute()
Specified by:
getKeyAttribute in interface ControlDefinition
Returns:
the keyAttribute

setKeyAttribute

public void setKeyAttribute(String keyAttribute)
Attribute of the given businessObjectClass to use as the value of a select list or set of radio buttons.

Specified by:
setKeyAttribute in interface ControlDefinition

getLabelAttribute

public String getLabelAttribute()
Specified by:
getLabelAttribute in interface ControlDefinition
Returns:
the labelAttribute

setLabelAttribute

public void setLabelAttribute(String labelAttribute)
Attribute of the given businessObjectClass to use as the displayed label on a select list or set of radio buttons.

Specified by:
setLabelAttribute in interface ControlDefinition

getValuesFinderClass

public String getValuesFinderClass()
Specified by:
getValuesFinderClass in interface ControlDefinition
Returns:
Class used to retrieve the complete range of values for radiobutton and select controls.
See Also:
org.kuali.rice.kns.datadictionary.control.ControlDefinition#getKeyValuesFinder()

setSize

public void setSize(Integer size)
Size of a text control.

Specified by:
setSize in interface ControlDefinition
See Also:
org.kuali.rice.kns.datadictionary.control.ControlDefinition#setSize(int)

getSize

public Integer getSize()
Specified by:
getSize in interface ControlDefinition
Returns:
size parameters for text controls
See Also:
ControlDefinition.getSize()

hasScript

public boolean hasScript()
See Also:
org.kuali.rice.kns.datadictionary.control.ControlDefinition#hasScript()

setRows

public void setRows(Integer rows)
Number of rows to display on a text-area widget.

Specified by:
setRows in interface ControlDefinition
See Also:
org.kuali.rice.kns.datadictionary.control.ControlDefinition#setRows(int)

getRows

public Integer getRows()
Specified by:
getRows in interface ControlDefinition
Returns:
rows parameters for textarea controls
See Also:
ControlDefinition.getRows()

setCols

public void setCols(Integer cols)
Number of columns to display on a text-area widget.

Specified by:
setCols in interface ControlDefinition
See Also:
org.kuali.rice.kns.datadictionary.control.ControlDefinition#setCols(int)

getCols

public Integer getCols()
Specified by:
getCols in interface ControlDefinition
Returns:
cols parameter for textarea controls.
See Also:
ControlDefinition.getCols()

completeValidation

public void completeValidation(Class rootBusinessObjectClass,
                               Class otherBusinessObjectClass)
Directly validate simple fields.

Specified by:
completeValidation in interface DataDictionaryDefinition
Parameters:
rootBusinessObjectClass - Class of the BusinessObjectEntry which ultimately contains this definition
otherBusinessObjectClass - other stuff required to complete validation
See Also:
org.kuali.rice.kns.datadictionary.DataDictionaryDefinition#completeValidation(java.lang.Class, java.lang.Object)

getScript

public String getScript()
Specified by:
getScript in interface ControlDefinition
Returns:
any Script associated with this control
See Also:
ControlDefinition.getScript()

setScript

public void setScript(String script)
JavaScript script to run when a select control's value is changed.

Specified by:
setScript in interface ControlDefinition
See Also:
org.kuali.rice.kns.datadictionary.control.ControlDefinition#setScript()

isRanged

public boolean isRanged()
Specified by:
isRanged in interface ControlDefinition
Returns:
true if the ControlDefinition instance represents a ranged (will render from and to fields) date control
See Also:
ControlDefinition.isRanged()

setRanged

public void setRanged(boolean ranged)
Sets the control as a ranged (from and to) date field if true, or a single date field if false

Parameters:
ranged - boolean true for a ranged control, false for a single date field

equals

public boolean equals(Object object)
Overrides:
equals in class Object
See Also:
Object.equals(Object)


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