|
TPTP 4.6.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.tptp.filtertype.extension.sample.filter.definitions.SampleFilterAttribute
public class SampleFilterAttribute
This defines a sample filter attribute. It is kept simple and also to display that attribute can be rather dynamic. The user can construct any WhereExpression from the operator/value pair they wish for the filter. The operators in this sample are "Package starts with..." and "Package ends with...". This filter attribute basically would return packages that start with or end with the given value. The user cannot enter a value with a '*' character, this is shown in the validate method.
| Constructor Summary | |
|---|---|
SampleFilterAttribute(java.lang.String _id)
The constructor sets the id, this id must be unique from the others in the advanced tab. |
|
| Method Summary | |
|---|---|
java.lang.String |
defaultValue()
Returns the default value associated with this attribute. |
java.lang.String |
displayText()
Returns the display text that will be visible in the advanced tab UI when adding/removing/editing attributes. |
java.lang.String |
getOperator(WhereExpression whereExpression)
Returns the displayable/editable operator that will be in the advanced tab UI, for the given WhereExpression associated with this IFilterAttribute(matched by id). |
java.lang.String |
getValue(WhereExpression whereExpression)
Returns the displayable/editable value that will be in the advanced tab UI, for the given WhereExpression associated with this IFilterAttribute(matched by id). |
WhereExpression |
getWhereExpression(java.lang.String operator,
java.lang.String value)
Returns the WhereExpression associated with the given displayable operator and displayable value for this attribute. |
java.lang.String |
id()
Returns the unique ID, associated with this attribute. |
java.lang.String[] |
operators()
Returns the set of operators associated with this attribute, these operators are Strings that are also displayable. |
java.lang.String |
validate(java.lang.String operator,
java.lang.String value)
Validates that the input data is valid for the given displayable operator and displayable value. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SampleFilterAttribute(java.lang.String _id)
_id - | Method Detail |
|---|
public java.lang.String id()
IFilterAttribute
id in interface IFilterAttributeIFilterAttribute.id()public java.lang.String displayText()
IFilterAttribute
displayText in interface IFilterAttributeIFilterAttribute.displayText()
public java.lang.String validate(java.lang.String operator,
java.lang.String value)
IFilterAttribute
validate in interface IFilterAttributeoperator - a String, the operator in the input that will be validated, this String would
be among the Strings returned in the method operators()value - a String, the value in the input that will be validated
IFilterAttribute.validate(java.lang.String, java.lang.String)public java.lang.String[] operators()
IFilterAttribute
operators in interface IFilterAttributeIFilterAttribute.operators()
public WhereExpression getWhereExpression(java.lang.String operator,
java.lang.String value)
IFilterAttribute
getWhereExpression in interface IFilterAttributeoperator - a String, the operator to construct the WhereExpression from, this String would
be among the Strings returned in the method operators()value - a String, the value to construct the WhereExpression from
IFilterAttribute.getWhereExpression(java.lang.String, java.lang.String)public java.lang.String getValue(WhereExpression whereExpression)
IFilterAttribute
getValue in interface IFilterAttributewhereExpression - a WhereExpression associated with this attribute
IFilterAttribute.getValue(org.eclipse.hyades.models.hierarchy.extensions.WhereExpression)public java.lang.String getOperator(WhereExpression whereExpression)
IFilterAttribute
getOperator in interface IFilterAttributewhereExpression - a WhereExpression associated with this attribute
IFilterAttribute.getOperator(org.eclipse.hyades.models.hierarchy.extensions.WhereExpression)public java.lang.String defaultValue()
IFilterAttribute
defaultValue in interface IFilterAttributeIFilterAttribute.defaultValue()
|
TPTP 4.6.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||