public abstract class AbstractCogType extends java.lang.Object implements CogType
CogType that takes care of a few minor
details for you.
Subclasses must call the superclass versions when implementing
the Coggable methods.
Copyright 2006-2009 Partner Software, Inc.
| Constructor and Description |
|---|
AbstractCogType(Cog state) |
AbstractCogType(java.lang.String name,
java.lang.String javaClassName,
java.lang.String controlName,
Cog prototype) |
| Modifier and Type | Method and Description |
|---|---|
Form |
buildForm() |
FormField |
buildFormField()
Builds a FormField based on the control script.
|
Cog |
createNode()
Creates a new node of this type.
|
java.lang.String |
getControlName()
Name of GUI or web control to use to edit this type.
|
protected Script |
getControlScript() |
java.lang.String |
getControlScriptPath()
Path to script that builds control to use to edit this type.
|
java.lang.String |
getJavaClassName()
Name of Java class associated with this type.
|
java.lang.String |
getName()
Name of the type, used for lookups in an
CogSchema. |
Cog |
getPrototype()
Returns the prototype
|
protected java.lang.Object |
runControlScript() |
protected void |
setControlName(java.lang.String controlName)
Sets the controlName
|
protected void |
setControlScript(Script controlScript)
Sets the controlScript
|
protected void |
setControlScriptPath(java.lang.String controlScriptPath)
Sets the controlScriptPath
|
protected void |
setJavaClassName(java.lang.String javaClassName)
Sets the javaClassName
|
protected void |
setName(java.lang.String name)
Sets the name
|
protected void |
setPrototype(Cog prototype)
Sets the prototype
|
Cog |
toCog()
Returns the complete internal state of this object in the form of a
Cog. |
java.lang.String |
toString() |
java.util.List<CogValidationException> |
validate(Cog node)
Validates the given node structure as best it can.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcleanStructureOfpublic AbstractCogType(Cog state)
public AbstractCogType(java.lang.String name,
java.lang.String javaClassName,
java.lang.String controlName,
Cog prototype)
public Cog toCog()
CoggableCog.public java.util.List<CogValidationException> validate(Cog node)
CogTypepublic Cog createNode()
CogTypecreateNode in interface CogTypepublic java.lang.String getName()
CogTypeCogSchema.public java.lang.String getJavaClassName()
CogTypegetJavaClassName in interface CogTypeCogType.getJavaClassName()public java.lang.String getControlName()
CogTypegetControlName in interface CogTypeCogType.getControlName()public java.lang.String getControlScriptPath()
CogTypegetControlScriptPath in interface CogTypeCogType.getControlScriptPath()public java.lang.String toString()
toString in class java.lang.Objectpublic FormField buildFormField()
CogTypebuildFormField in interface CogTypepublic Form buildForm()
protected java.lang.Object runControlScript()
protected Script getControlScript()
public Cog getPrototype()
protected void setName(java.lang.String name)
name - The name to setprotected void setPrototype(Cog prototype)
prototype - The prototype to setprotected void setJavaClassName(java.lang.String javaClassName)
javaClassName - The javaClassName to setprotected void setControlName(java.lang.String controlName)
controlName - The controlName to setprotected void setControlScriptPath(java.lang.String controlScriptPath)
controlScriptPath - The controlScriptPath to setprotected void setControlScript(Script controlScript)
controlScript - The controlScript to set