public class TransformationProperty extends java.lang.Object implements ITransformationProperty
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
A_DELIMITERS
Define the XML attribute for the property delimiters.
|
protected static java.lang.String |
A_DESCRIPTION
Define the XML attribute for the property description.
|
protected static java.lang.String |
A_ID
Define the XML attribute for the property ID.
|
protected static java.lang.String |
A_MAX_VALUES
Define the XML attribute for the property max values.
|
protected static java.lang.String |
A_METATYPE
Define the XML attribute for the property metatype.
|
protected static java.lang.String |
A_METATYPE_DATA
Define the XML attribute for the property metatype.
|
protected static java.lang.String |
A_NAME
Define the XML attribute for the property name.
|
protected static java.lang.String |
A_READONLY
Define the XML attribute for the property read-only flag.
|
protected static java.lang.String |
A_VALUE
Define the XML attribute for the property value(s).
|
Constructor and Description |
---|
TransformationProperty(org.eclipse.core.runtime.IConfigurationElement element)
Configuration Element Constructor for a Transformation Property
|
TransformationProperty(java.lang.String id,
java.lang.String name,
java.lang.Object value,
boolean readOnly)
Constructor for single valued "string" properties
|
TransformationProperty(java.lang.String id,
java.lang.String name,
java.lang.String description,
java.lang.Object value,
boolean readOnly,
java.lang.String metatype,
java.lang.String metatypeData,
int maxValues,
java.lang.String delimiters)
Complete Constructor for a Transformation Property
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Return the description of the property
|
java.lang.String |
getId()
Return the identifier of the property
|
int |
getMaxValues()
Return the maximum nubmer of values for the property.
|
java.lang.String |
getMetatype()
Return the metatype of the property
|
java.lang.String |
getMetatypeData()
Return the data for the metatype of the property
|
AbstractMetatypeDataManager |
getMetatypeDataManager()
Returns the metatype data manager for this property.
|
java.lang.String |
getName()
Return the name of the property
|
java.lang.Object |
getUnresolvedValue()
Return the value of the property
|
java.lang.Object |
getValidValue(java.lang.Object obj)
If the given object is not a valid value for this property, a valid
value based on the given object is returned.
|
java.lang.Object |
getValue()
Return the value of the property
|
boolean |
isReadOnly()
Return the read-only attribute of the property
|
boolean |
isValid()
Determine if the property is valid
|
org.eclipse.core.runtime.IStatus |
isValidValue(java.lang.Object obj)
Determines if the given object is a valid value for this property.
|
static java.lang.Object |
loadPropertyClass(org.eclipse.core.runtime.IConfigurationElement element,
java.lang.String propertyElementName,
java.lang.String propertyId)
Iterates over all the elements of the type specified by
propertyElementName that are contained in the given element and searches
for one with an id that matches propertyId.
|
void |
setValue(java.lang.Object newValue)
Set the single value of this property.
|
void |
setValues(java.lang.Object[] newValues)
Set the values associated with this property.
|
java.lang.String |
toString()
Return a printable version of the property.
|
protected static final java.lang.String A_DELIMITERS
protected static final java.lang.String A_DESCRIPTION
protected static final java.lang.String A_ID
protected static final java.lang.String A_MAX_VALUES
protected static final java.lang.String A_METATYPE
protected static final java.lang.String A_METATYPE_DATA
protected static final java.lang.String A_NAME
protected static final java.lang.String A_READONLY
protected static final java.lang.String A_VALUE
public TransformationProperty(org.eclipse.core.runtime.IConfigurationElement element)
element
- the Eclipse configuration elementpublic TransformationProperty(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.Object value, boolean readOnly, java.lang.String metatype, java.lang.String metatypeData, int maxValues, java.lang.String delimiters)
id
- the property identifiername
- the property namedescription
- the property descriptionvalue
- the default/initial valuereadOnly
- whether the value can be changed in the transformmetatype
- the metatype for the propertymetatypeData
- the data associated with the metatype for the propertymaxValues
- the maximum number of valuesdelimiters
- delimiter characters if property is a listpublic TransformationProperty(java.lang.String id, java.lang.String name, java.lang.Object value, boolean readOnly)
id
- the property identifiername
- the property namevalue
- the default/initial valuereadOnly
- whether the value can be changed in the transformpublic java.lang.String getName()
getName
in interface ITransformationItem
public java.lang.String getId()
getId
in interface ITransformationItem
public java.lang.String getDescription()
getDescription
in interface ITransformationItem
public int getMaxValues()
getMaxValues
in interface ITransformationProperty
public java.lang.String getMetatype()
getMetatype
in interface ITransformationProperty
public java.lang.String getMetatypeData()
getMetatypeData
in interface ITransformationProperty
public java.lang.Object getValue()
getValue
in interface ITransformationProperty
public java.lang.Object getUnresolvedValue()
public boolean isReadOnly()
isReadOnly
in interface ITransformationProperty
public java.lang.String toString()
toString
in class java.lang.Object
public void setValue(java.lang.Object newValue)
newValue
- the new value to be setpublic void setValues(java.lang.Object[] newValues)
newValues
- an array of new valuespublic boolean isValid()
public org.eclipse.core.runtime.IStatus isValidValue(java.lang.Object obj)
obj
- The object to test.public java.lang.Object getValidValue(java.lang.Object obj)
obj
- The object to test.public AbstractMetatypeDataManager getMetatypeDataManager()
public static java.lang.Object loadPropertyClass(org.eclipse.core.runtime.IConfigurationElement element, java.lang.String propertyElementName, java.lang.String propertyId) throws org.eclipse.core.runtime.CoreException
element
- The configuration element from the manifest that contains
the elements to search.propertyElementName
- The name of the type of elements to search.propertyId
- The property id to match in the searched elements.org.eclipse.core.runtime.CoreException
- If there was a problem loading or instantiating
the class.