org.melati.poem
Class BaseFieldAttributes

Package class diagram package BaseFieldAttributes
java.lang.Object
  extended by org.melati.poem.BaseFieldAttributes
All Implemented Interfaces:
FieldAttributes

public class BaseFieldAttributes
extends Object
implements FieldAttributes

Base class of all Fields. All the fields of a Field except its value.


Constructor Summary
BaseFieldAttributes(FieldAttributes other, boolean nullable)
          Create a new BaseFieldAttributes based upon another, overriding its nullability.
BaseFieldAttributes(FieldAttributes other, PoemType type)
          Create a new BaseFieldAttributes based upon another, but overriding its type.
BaseFieldAttributes(FieldAttributes other, String name)
          Create a new BaseFieldAttributes based upon another, overriding its name.
BaseFieldAttributes(FieldAttributes other, String name, String description)
          Allow the description to vary as well.
BaseFieldAttributes(String name, PoemType type)
          Convenience constructor.
BaseFieldAttributes(String name, String displayName, String description, PoemType type, int width, int height, String renderInfo, boolean indexed, boolean userEditable, boolean userCreateable)
          Full Constructor.
 
Method Summary
 String getDescription()
           
 String getDisplayName()
           
 int getHeight()
           
 boolean getIndexed()
           
 String getName()
           
 String getRenderInfo()
           
 PoemType getType()
           
 boolean getUserCreateable()
           
 boolean getUserEditable()
           
 int getWidth()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseFieldAttributes

public BaseFieldAttributes(String name,
                           String displayName,
                           String description,
                           PoemType type,
                           int width,
                           int height,
                           String renderInfo,
                           boolean indexed,
                           boolean userEditable,
                           boolean userCreateable)
Full Constructor.

Parameters:
name - simple name
displayName - human readable name
description - a short description
type - the PoemType of the new Field
width - how wide input widgets should be
height - how high input widgets should be
renderInfo - the name of a special templet to render this field
indexed - whether the Field is indexed.
userEditable - whether users should be able to modify the value
userCreateable - whether users should be allowed to create new instances

BaseFieldAttributes

public BaseFieldAttributes(String name,
                           PoemType type)
Convenience constructor.

Parameters:
name - used as the name and, capitalised, the display name
type - the Poem datatype

BaseFieldAttributes

public BaseFieldAttributes(FieldAttributes other,
                           PoemType type)
Create a new BaseFieldAttributes based upon another, but overriding its type.

Parameters:
other - the FieldAttributes to clone
type - allows overriding of type

BaseFieldAttributes

public BaseFieldAttributes(FieldAttributes other,
                           String name)
Create a new BaseFieldAttributes based upon another, overriding its name.

Parameters:
other - the FieldAttributes to clone
name - the new name

BaseFieldAttributes

public BaseFieldAttributes(FieldAttributes other,
                           String name,
                           String description)
Allow the description to vary as well.

Parameters:
other - the FieldAttributes to clone
name - the new name
description - the new description

BaseFieldAttributes

public BaseFieldAttributes(FieldAttributes other,
                           boolean nullable)
Create a new BaseFieldAttributes based upon another, overriding its nullability.

Parameters:
other - the FieldAttributes to clone
nullable - the new nullability
Method Detail

getName

public String getName()
Specified by:
getName in interface FieldAttributes
Returns:
the machine name of the field

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface FieldAttributes
Returns:
the human readable name of the field

getDescription

public String getDescription()
Specified by:
getDescription in interface FieldAttributes
Returns:
the longer description of the field

getType

public PoemType getType()
Specified by:
getType in interface FieldAttributes
Returns:
the PoemType of the field

getIndexed

public boolean getIndexed()
Specified by:
getIndexed in interface FieldAttributes
Returns:
whether the field is indexed

getUserEditable

public boolean getUserEditable()
Specified by:
getUserEditable in interface FieldAttributes
Returns:
whether a user may change the field value

getUserCreateable

public boolean getUserCreateable()
Specified by:
getUserCreateable in interface FieldAttributes
Returns:
whether a user may create a field

getWidth

public int getWidth()
Specified by:
getWidth in interface FieldAttributes
Returns:
the width of widget required to display this field

getHeight

public int getHeight()
Specified by:
getHeight in interface FieldAttributes
Returns:
the height of widget to display this field

getRenderInfo

public String getRenderInfo()
Specified by:
getRenderInfo in interface FieldAttributes
Returns:
the name of a special widget templet to display this field


Copyright © 2000-2010 PanEris. All Rights Reserved.