|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kew.api.document.attribute.DocumentAttributeFactory
public class DocumentAttributeFactory
A factory that helps with creation of new DocumentAttribute
instances as well as translation to concrete
instances from a DocumentAttributeContract
Constructor Summary | |
---|---|
DocumentAttributeFactory()
|
Method Summary | |
---|---|
static DocumentAttributeDateTime |
createDateTimeAttribute(String name,
Calendar value)
Constructs a document attribute containing date/time data from the given attribute name and Calendar
object. |
static DocumentAttributeDateTime |
createDateTimeAttribute(String name,
Date value)
Constructs a document attribute containing date/time data from the given attribute name and Date object. |
static DocumentAttributeDateTime |
createDateTimeAttribute(String name,
org.joda.time.DateTime value)
Constructs a document attribute containing date/time data from the given attribute name and DateTime
object. |
static DocumentAttributeDateTime |
createDateTimeAttribute(String name,
long instant)
Constructs a document attribute containing date/time data from the given attribute name and a numeric long representing the number of milliseconds from 1970-01-01T00:00:00Z in the default time zone. |
static DocumentAttributeDecimal |
createDecimalAttribute(String name,
BigDecimal value)
Constructs a document attribute containing real number data from the given attribute name and BigDecimal
object. |
static DocumentAttributeDecimal |
createDecimalAttribute(String name,
Number value)
Constructs a document attribute containing real number data from the given attribute name and Number
object. |
static DocumentAttributeInteger |
createIntegerAttribute(String name,
BigInteger value)
Constructs a document attribute containing integer number data from the given attribute name and BigInteger object. |
static DocumentAttributeInteger |
createIntegerAttribute(String name,
Number value)
Constructs a document attribute containing integer number data from the given attribute name and Number
object. |
static DocumentAttributeString |
createStringAttribute(String name,
String value)
Constructs a document attribute containing character data from the given attribute name and String value. |
static DocumentAttribute.AbstractBuilder<?> |
loadContractIntoBuilder(DocumentAttributeContract contract)
Loads the given DocumentAttributeContract into the appropriate builder instance based on the type of the
given contract implementation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocumentAttributeFactory()
Method Detail |
---|
public static DocumentAttributeString createStringAttribute(String name, String value)
String
value.
name
- the name of the attribute to construct, must not be a null or blank valuevalue
- the value of the attribute as a String
DocumentAttributeString
representing the document attribute
IllegalArgumentException
- if name is a null or blank valuepublic static DocumentAttributeDateTime createDateTimeAttribute(String name, org.joda.time.DateTime value)
DateTime
object.
name
- the name of the attribute to construct, must not be a null or blank valuevalue
- the value of the attribute as a DateTime
DocumentAttributeDateTime
representing the document attribute
IllegalArgumentException
- if name is a null or blank valuepublic static DocumentAttributeDateTime createDateTimeAttribute(String name, Date value)
Date
object.
name
- the name of the attribute to construct, must not be a null or blank valuevalue
- the value of the attribute as a Date
DocumentAttributeDateTime
representing the document attribute
IllegalArgumentException
- if name is a null or blank valuepublic static DocumentAttributeDateTime createDateTimeAttribute(String name, long instant)
name
- the name of the attribute to construct, must not be a null or blank valueinstant
- the instant value represented as milliseconds from 1970-01-01T00:00:00Z
DocumentAttributeDateTime
representing the document attribute
IllegalArgumentException
- if name is a null or blank valuepublic static DocumentAttributeDateTime createDateTimeAttribute(String name, Calendar value)
Calendar
object.
name
- the name of the attribute to construct, must not be a null or blank valuevalue
- the value of the attribute as a Calendar
DocumentAttributeDateTime
representing the document attribute
IllegalArgumentException
- if name is a null or blank valuepublic static DocumentAttributeDecimal createDecimalAttribute(String name, BigDecimal value)
BigDecimal
object.
name
- the name of the attribute to construct, must not be a null or blank valuevalue
- the value of the attribute as a BigDecimal
DocumentAttributeDecimal
representing the document attribute
IllegalArgumentException
- if name is a null or blank valuepublic static DocumentAttributeDecimal createDecimalAttribute(String name, Number value)
Number
object. The given number is first translated to a BigDecimal
using Number.doubleValue()
.
name
- the name of the attribute to construct, must not be a null or blank valuevalue
- the value of the attribute as a Number
DocumentAttributeDecimal
representing the document attribute
IllegalArgumentException
- if name is a null or blank valuepublic static DocumentAttributeInteger createIntegerAttribute(String name, BigInteger value)
BigInteger
object.
name
- the name of the attribute to construct, must not be a null or blank valuevalue
- the value of the attribute as a BigInteger
DocumentAttributeInteger
representing the document attribute
IllegalArgumentException
- if name is a null or blank valuepublic static DocumentAttributeInteger createIntegerAttribute(String name, Number value)
Number
object. The given number is first translated to a BigInteger
using Number.longValue()
.
name
- the name of the attribute to construct, must not be a null or blank valuevalue
- the value of the attribute as a Number
DocumentAttributeInteger
representing the document attribute
IllegalArgumentException
- if name is a null or blank valuepublic static DocumentAttribute.AbstractBuilder<?> loadContractIntoBuilder(DocumentAttributeContract contract)
DocumentAttributeContract
into the appropriate builder instance based on the type of the
given contract implementation.
contract
- the contract to load into a builder
DocumentAttribute.AbstractBuilder
which handles instance of the given
contract
IllegalArgumentException
- if the given contract is null
IllegalArgumentException
- if a builder implementation could not be determined into which to load the given
contract implementation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |