org.dasein.attributes.types
Class StringFactory.StringAttribute
java.lang.Object
org.dasein.attributes.DataType<String>
org.dasein.attributes.types.StringFactory.StringAttribute
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- StringFactory
public static class StringFactory.StringAttribute
- extends DataType<String>
- See Also:
- Serialized Form
|
Constructor Summary |
StringFactory.StringAttribute(String grp,
Number idx,
boolean ml,
boolean mv,
boolean req)
|
StringFactory.StringAttribute(String grp,
Number idx,
boolean ml,
boolean mv,
boolean req,
boolean lt)
|
StringFactory.StringAttribute(String grp,
Number idx,
boolean ml,
boolean mv,
boolean req,
String choix)
|
| Methods inherited from class org.dasein.attributes.DataType |
equals, getGroup, getIndex, getName, getParameters, getSize, getTranslatedValue, getValues, hashCode, isMultiLingual, isMultiValued, isRequired |
StringFactory.StringAttribute
public StringFactory.StringAttribute(String grp,
Number idx,
boolean ml,
boolean mv,
boolean req)
StringFactory.StringAttribute
public StringFactory.StringAttribute(String grp,
Number idx,
boolean ml,
boolean mv,
boolean req,
boolean lt)
StringFactory.StringAttribute
public StringFactory.StringAttribute(String grp,
Number idx,
boolean ml,
boolean mv,
boolean req,
String choix)
getChoices
public Collection<String> getChoices()
- Description copied from class:
DataType
- Provides a list of values considered valid for this data type. If any object of the type
governed by this data type is allowed, this method will return
null.
- Specified by:
getChoices in class DataType<String>
- Returns:
- a list of allowed values or
null to allow any value
getFactory
public DataTypeFactory<String> getFactory()
- Specified by:
getFactory in class DataType<String>
- Returns:
- the factory object that owns this data type
getInputType
public DataType.InputType getInputType()
- Specified by:
getInputType in class DataType<String>
- Returns:
- the type of input that a user interface should provide to prompt a user for
a value
getValue
public String getValue(Object val)
- Description copied from class:
DataType
- Implementors will implement this method to convert a raw value into a valid value of
this data type. Implementations should throw an
InvalidAttributeException if
they are unable to interpret the raw value.
- Specified by:
getValue in class DataType<String>
- Parameters:
val - the raw value, such as user input or a string from a persistent store
- Returns:
- a converted value of this data type
isLongtext
public boolean isLongtext()
isValidChoice
public boolean isValidChoice(String str)
- Description copied from class:
DataType
Checks the specified value to see if it is valid for this data type. In general,
implementing classes will check the following:
- that the value is not required in the instance of a
null value
- that the value is a member of the choices provided by
DataType.getChoices()
- any other criteria an implementor might want to validate
- Specified by:
isValidChoice in class DataType<String>
- Parameters:
str - the value being validated
- Returns:
- true if the value is valid for this data type
toString
public String toString()
- Overrides:
toString in class DataType<String>
- Returns:
- a string representation of this data type
Copyright © 2011 enStratus Networks LLC. All Rights Reserved.