Package com.independentsoft.office.odf

# Class ContentValidation

java.lang.Object
com.independentsoft.office.odf.ContentValidation

public class ContentValidation extends Object
Represents a validation rule for table cell content.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContentValidation()`
  Initializes a new instance of the ContentValidation class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ContentValidation`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `String`
  `getBaseCellAddress()`
  Gets the address of the base cell for relative addresses in formulas that occur within a condition.
  `String`
  `getCondition()`
  Gets the condition that determines whether a cell content is valid in regard to a validation rule or not.
  `DisplayListType`
  `getDisplayListType()`
  Specifies whether a list of values that occurs within a condition is displayed in the UI wile entering a cell value.
  `ErrorMessage`
  `getErrorMessage()`
  Gets the message to display if a user tries to enter invalid content into a cell.
  `HelpMessage`
  `getHelpMessage()`
  Gets the message to display if a user selects a cell.
  `String`
  `getName()`
  Gets the name of a content validation rule.
  `boolean`
  `isAllowEmptyCell()`
  Specifies whether a cell can be empty.
  `void`
  `setAllowEmptyCell​(boolean allowEmptyCell)`
  Specifies whether a cell can be empty.
  `void`
  `setBaseCellAddress​(String baseCellAddress)`
  Sets the address of the base cell for relative addresses in formulas that occur within a condition.
  `void`
  `setCondition​(String condition)`
  Sets the condition that determines whether a cell content is valid in regard to a validation rule or not.
  `void`
  `setDisplayListType​(DisplayListType displayListType)`
  Specifies whether a list of values that occurs within a condition is displayed in the UI wile entering a cell value.
  `void`
  `setErrorMessage​(ErrorMessage errorMessage)`
  Sets the message to display if a user tries to enter invalid content into a cell.
  `void`
  `setHelpMessage​(HelpMessage helpMessage)`
  Sets the message to display if a user selects a cell.
  `void`
  `setName​(String name)`
  Sets the name of a content validation rule.
  `String`
  `toString()`
  Converts the value of the current ContentValidation object to its equivalent string representation.

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ContentValidation

    public ContentValidation()
    Initializes a new instance of the ContentValidation class.

- ## Method Details

  - ### clone

    public ContentValidation clone()
    Creates a new object that is a deep copy of the current instance.
    Overrides:
      `clone` in class `Object`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

    public String toString()
    Converts the value of the current ContentValidation object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getName

    public String getName()
    Gets the name of a content validation rule. It is used to reference the validation rule from the cell the rule should applied.
    Returns:
      the name

  - ### setName

    public void setName​(String name)
    Sets the name of a content validation rule. It is used to reference the validation rule from the cell the rule should applied.
    Parameters:
      `name` - the new name

  - ### getCondition

    public String getCondition()
    Gets the condition that determines whether a cell content is valid in regard to a validation rule or not.
    Returns:
      the condition

  - ### setCondition

    public void setCondition​(String condition)
    Sets the condition that determines whether a cell content is valid in regard to a validation rule or not.
    Parameters:
      `condition` - the new condition

  - ### getBaseCellAddress

    public String getBaseCellAddress()
    Gets the address of the base cell for relative addresses in formulas that occur within a condition. This attribute is only necessary when the condition contains a formula. The value of this attribute shall be an absolute cell address that contains a table name.
    Returns:
      the base cell address

  - ### setBaseCellAddress

    public void setBaseCellAddress​(String baseCellAddress)
    Sets the address of the base cell for relative addresses in formulas that occur within a condition. This attribute is only necessary when the condition contains a formula. The value of this attribute shall be an absolute cell address that contains a table name.
    Parameters:
      `baseCellAddress` - the new base cell address

  - ### isAllowEmptyCell

    public boolean isAllowEmptyCell()
    Specifies whether a cell can be empty. The default value for this attribute is true.
    Returns:
      true, if is allow empty cell

  - ### setAllowEmptyCell

    public void setAllowEmptyCell​(boolean allowEmptyCell)
    Specifies whether a cell can be empty. The default value for this attribute is true.
    Parameters:
      `allowEmptyCell` - the new allow empty cell

  - ### getDisplayListType

    public DisplayListType getDisplayListType()
    Specifies whether a list of values that occurs within a condition is displayed in the UI wile entering a cell value.
    Returns:
      the display list type

  - ### setDisplayListType

    public void setDisplayListType​(DisplayListType displayListType)
    Specifies whether a list of values that occurs within a condition is displayed in the UI wile entering a cell value.
    Parameters:
      `displayListType` - the new display list type

  - ### getHelpMessage

    public HelpMessage getHelpMessage()
    Gets the message to display if a user selects a cell.
    Returns:
      the help message

  - ### setHelpMessage

    public void setHelpMessage​(HelpMessage helpMessage)
    Sets the message to display if a user selects a cell.
    Parameters:
      `helpMessage` - the new help message

  - ### getErrorMessage

    public ErrorMessage getErrorMessage()
    Gets the message to display if a user tries to enter invalid content into a cell.
    Returns:
      the error message

  - ### setErrorMessage

    public void setErrorMessage​(ErrorMessage errorMessage)
    Sets the message to display if a user tries to enter invalid content into a cell.
    Parameters:
      `errorMessage` - the new error message