org.squashtest.csp.tm.domain.customfield
Class CustomField

java.lang.Object
  extended by org.squashtest.csp.tm.domain.customfield.CustomField
Direct Known Subclasses:
SingleSelectField

@Entity
public class CustomField
extends Object

Author:
Gregory Fouquet

Field Summary
protected  String code
           
protected static String CODE_REGEXP
           
protected  String defaultValue
           
protected  Long id
           
protected  InputType inputType
           
protected  String label
           
protected static int MAX_CODE_SIZE
           
protected static int MIN_CODE_SIZE
           
protected  String name
           
protected  boolean optional
           
 
Constructor Summary
protected CustomField()
          For ORM purposes.
  CustomField(InputType inputType)
           
 
Method Summary
 void accept(CustomFieldVisitor visitor)
           
 String getCode()
           
 String getDefaultValue()
           
 Long getId()
           
 InputType getInputType()
           
 String getLabel()
           
 String getName()
           
 boolean isOptional()
           
 void setCode(String code)
           
 void setDefaultValue(String defaultValue)
           
 void setLabel(String label)
           
 void setName(String name)
           
 void setOptional(boolean optional)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CODE_REGEXP

protected static final String CODE_REGEXP
See Also:
Constant Field Values

MIN_CODE_SIZE

protected static final int MIN_CODE_SIZE
See Also:
Constant Field Values

MAX_CODE_SIZE

protected static final int MAX_CODE_SIZE
See Also:
Constant Field Values

id

protected Long id

name

@NotBlank
@Size(min=0,
      max=255)
protected String name

label

@NotBlank
@Size(min=0,
      max=255)
protected String label

optional

protected boolean optional

defaultValue

@Size(min=0,
      max=255)
protected String defaultValue

inputType

@NotNull
protected InputType inputType

code

@NotBlank
@Size(min=1,
      max=30)
@Pattern(regexp="^[A-Za-z0-9_]*$")
protected String code
Constructor Detail

CustomField

protected CustomField()
For ORM purposes.


CustomField

public CustomField(@NotNull
                   InputType inputType)
Method Detail

getName

public String getName()

setName

public void setName(String name)

getLabel

public String getLabel()

setLabel

public void setLabel(String label)

isOptional

public boolean isOptional()

setOptional

public void setOptional(boolean optional)

getDefaultValue

public String getDefaultValue()

setDefaultValue

public void setDefaultValue(String defaultValue)

getId

public Long getId()

getInputType

public InputType getInputType()

getCode

public String getCode()

setCode

public void setCode(String code)

accept

public void accept(CustomFieldVisitor visitor)


Copyright © 2010-2012 Henix, henix.fr. All Rights Reserved.