com.partnersoft.cog
Class CogEnumeratedType

java.lang.Object
  extended by com.partnersoft.cog.AbstractCogType
      extended by com.partnersoft.cog.CogEnumeratedType
All Implemented Interfaces:
Coggable, CogType, Immutable

public class CogEnumeratedType
extends AbstractCogType

Describes Cogs that must be selected from a list of predefined choices.

Copyright 2005-2009 Partner Software, Inc.

Version:
$Id: CogEnumeratedType.java 2328 2010-01-06 15:38:22Z paul $
Author:
Paul Reavis, Russell Cagle

Constructor Summary
CogEnumeratedType(Cog state)
           
CogEnumeratedType(java.lang.String name, java.lang.String className, java.lang.String controlName, java.lang.String defaultValue, java.lang.Iterable<java.lang.String> values)
           
CogEnumeratedType(java.lang.String name, java.lang.String className, java.lang.String controlName, java.lang.String defaultValue, java.lang.String... values)
           
 
Method Summary
 void cleanStructureOf(Cog node)
          Cleans the given node structure as best as it can based on available information.
 java.util.List<java.lang.String> getValues()
           
 Cog toCog()
          Returns the complete internal state of this object in the form of a Cog.
 java.util.List<CogValidationException> validate(Cog node)
          Validates the given node structure as best it can.
 
Methods inherited from class com.partnersoft.cog.AbstractCogType
createNode, getControlName, getJavaClassName, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CogEnumeratedType

public CogEnumeratedType(Cog state)

CogEnumeratedType

public CogEnumeratedType(java.lang.String name,
                         java.lang.String className,
                         java.lang.String controlName,
                         java.lang.String defaultValue,
                         java.lang.Iterable<java.lang.String> values)

CogEnumeratedType

public CogEnumeratedType(java.lang.String name,
                         java.lang.String className,
                         java.lang.String controlName,
                         java.lang.String defaultValue,
                         java.lang.String... values)
Method Detail

cleanStructureOf

public void cleanStructureOf(Cog node)
Description copied from interface: CogType
Cleans the given node structure as best as it can based on available information. This typically involves setting the datatypes of children nodes.


validate

public java.util.List<CogValidationException> validate(Cog node)
Description copied from interface: CogType
Validates the given node structure as best it can.

Specified by:
validate in interface CogType
Overrides:
validate in class AbstractCogType
Parameters:
node - node to validate

toCog

public Cog toCog()
Description copied from interface: Coggable
Returns the complete internal state of this object in the form of a Cog.

Specified by:
toCog in interface Coggable
Overrides:
toCog in class AbstractCogType
Returns:
Cog representing the internal state of this object

getValues

public java.util.List<java.lang.String> getValues()