com.ibm.workplace.wcm.api
Interface NumericComponent

All Superinterfaces:
ContentComponent, WCMApiObject

public interface NumericComponent
extends ContentComponent

Represents a Number component.

A NumericComponent is a ContentComponent and cannot be stored as a separate entity in the repository.

A NumericComponent can contain Number. This interface provides methods to retrieve and set the Number contained within this component.

note: since v6.0.0, a NumericComponent is referred to as an "Number Element" in the Authoring UI.

See Also:
ContentComponent

Field Summary
static int TYPE_DOUBLE
          Type constant indicating that the Number returned will be a double.
static int TYPE_INTEGER
          Type constant indicating that the Number returned will be an integer.
 
Method Summary
 DocumentType<? extends NumericComponent> getDocumentType()
          Returns the DocumentType of the ContentComponent.
 java.lang.Number getNumber()
          Returns the Number contained in this component as a Number.
 int getNumberType()
          Returns the number type of this NumberComponent.
 void setNumber(java.lang.Number number)
          Sets the Number contained in this NumericComponent.
 void setNumberType(int numberType)
          Sets the Number Type contained in this NumericComponent.
 
Methods inherited from interface com.ibm.workplace.wcm.api.ContentComponent
getContainer, getName, getTitleTextProviderKey, getTitleTextProviderName, setTitleTextProviderKey, setTitleTextProviderName
 

Field Detail

TYPE_INTEGER

static final int TYPE_INTEGER
Type constant indicating that the Number returned will be an integer.

See Also:
Constant Field Values

TYPE_DOUBLE

static final int TYPE_DOUBLE
Type constant indicating that the Number returned will be a double.

See Also:
Constant Field Values
Method Detail

getDocumentType

DocumentType<? extends NumericComponent> getDocumentType()
Description copied from interface: ContentComponent
Returns the DocumentType of the ContentComponent.

Specified by:
getDocumentType in interface ContentComponent
Returns:
the type
See Also:
ContentComponent.getDocumentType()

getNumber

java.lang.Number getNumber()
Returns the Number contained in this component as a Number.

Returns null if the Number is not set.

Returns:
the Number

setNumber

void setNumber(java.lang.Number number)
               throws com.ibm.workplace.wcm.api.exceptions.OperationFailedException
Sets the Number contained in this NumericComponent.

Note. This method replaces any existing Number in this component.

Parameters:
number - the Number
Throws:
com.ibm.workplace.wcm.api.exceptions.OperationFailedException - if the Number argument is null or the Number could not be set

getNumberType

int getNumberType()
Returns the number type of this NumberComponent.

Returns the default value NumericComponent.TYPE_INTEGER if the new number type has been set.

Returns:
the number type

setNumberType

void setNumberType(int numberType)
                   throws com.ibm.workplace.wcm.api.exceptions.OperationFailedException
Sets the Number Type contained in this NumericComponent.

Valid values are:

  • TYPE_INTEGER - Number type integer
  • TYPE_DOUBLE - Number type double

Parameters:
numberType - the number type to be set
Throws:
com.ibm.workplace.wcm.api.exceptions.OperationFailedException - if an invalid type was specified