org.kuali.rice.kew.api.document.attribute
Class DocumentAttributeFactory

java.lang.Object
  extended by org.kuali.rice.kew.api.document.attribute.DocumentAttributeFactory

public class DocumentAttributeFactory
extends Object

A factory that helps with creation of new DocumentAttribute instances as well as translation to concrete instances from a DocumentAttributeContract

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
DocumentAttributeFactory()
           
 
Method Summary
static DocumentAttributeDateTime createDateTimeAttribute(String name, Calendar calendar)
           
static DocumentAttributeDateTime createDateTimeAttribute(String name, Date value)
           
static DocumentAttributeDateTime createDateTimeAttribute(String name, org.joda.time.DateTime value)
           
static DocumentAttributeDateTime createDateTimeAttribute(String name, long instant)
           
static DocumentAttributeDecimal createDecimalAttribute(String name, BigDecimal value)
           
static DocumentAttributeDecimal createDecimalAttribute(String name, Number number)
           
static DocumentAttributeInteger createIntegerAttribute(String name, BigInteger value)
           
static DocumentAttributeInteger createIntegerAttribute(String name, Number number)
           
static DocumentAttributeString createStringAttribute(String name, 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

DocumentAttributeFactory

public DocumentAttributeFactory()
Method Detail

createStringAttribute

public static DocumentAttributeString createStringAttribute(String name,
                                                            String value)

createDateTimeAttribute

public static DocumentAttributeDateTime createDateTimeAttribute(String name,
                                                                org.joda.time.DateTime value)

createDateTimeAttribute

public static DocumentAttributeDateTime createDateTimeAttribute(String name,
                                                                Date value)

createDateTimeAttribute

public static DocumentAttributeDateTime createDateTimeAttribute(String name,
                                                                long instant)

createDateTimeAttribute

public static DocumentAttributeDateTime createDateTimeAttribute(String name,
                                                                Calendar calendar)

createDecimalAttribute

public static DocumentAttributeDecimal createDecimalAttribute(String name,
                                                              BigDecimal value)

createDecimalAttribute

public static DocumentAttributeDecimal createDecimalAttribute(String name,
                                                              Number number)

createIntegerAttribute

public static DocumentAttributeInteger createIntegerAttribute(String name,
                                                              BigInteger value)

createIntegerAttribute

public static DocumentAttributeInteger createIntegerAttribute(String name,
                                                              Number number)

loadContractIntoBuilder

public static DocumentAttribute.AbstractBuilder<?> loadContractIntoBuilder(DocumentAttributeContract contract)
Loads the given DocumentAttributeContract into the appropriate builder instance based on the type of the given contract implementation.

Parameters:
contract - the contract to load into a builder
Returns:
an implementation of DocumentAttribute.AbstractBuilder which handles instance of the given contract
Throws:
IllegalArgumentException - if the given contract is null
IllegalArgumentException - if a builder implementation could not be determined into which to load the given contract implementation


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