|
IBM Rational Software Modeler Release 6.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.xtools.ras.profile.management.artifact.filter.AbstractCaseSensitiveFilterImpl
com.ibm.xtools.ras.profile.management.artifact.filter.AbstractArtifactAttributeFilterImpl
Abstract class that provides the ability to filter on the String
attribute of an Artifact. The class provides all
functionality related to the matching algorithm and case sensitivity. The
derived client class need only focus on overriding the abstract
ArtifactAttributeFilterImpl.getArtifactAttribute(Artifact)
method.
IArtifactFilter,
ICaseSensitiveArtifactFilter| Constructor Summary | |
AbstractArtifactAttributeFilterImpl(String methodName)
Constructs the AbstractArtifactAttributeFilterImpl
with the name of the method to invoke on the Artifact |
|
AbstractArtifactAttributeFilterImpl(String methodName,
Object filterObject)
Constructs the AbstractArtifactAttributeFilterImpl
with the name of the method to invoke on the Artifact |
|
AbstractArtifactAttributeFilterImpl(String methodName,
Object filterObject,
boolean caseSensitive)
Constructs the AbstractArtifactAttributeFilterImpl
with name of the method to invoke on the Artifact and a
case sensitivity indicator. |
|
| Method Summary | |
protected abstract boolean |
compare(Object theAttribute,
Object filterObject)
Compares the attribute of the current Artifact being
filtered against the filter object. |
protected abstract boolean |
compareIgnoreCase(Object theAttribute,
Object filterObject)
Compares the attribute of the current Artifact being
filtered against the filter object. |
protected Object |
getArtifactAttribute(Artifact theArtifact)
Retrieves the attribute from the Artifact using the method
that was looked up through reflection. |
protected Class |
getArtifactClass()
This is the class that will be used to look up the method name to invoke on the Artifact. |
Object |
getFilterObject()
Retrieves the Object that is used to compare against
during the filtering process. |
String |
getMethodName()
Retrieves the name of the method that will be invoked on the Artifact that is used to retrieve an attribute of the
Artifact during filtering. |
boolean |
matches(Artifact theArtifact)
Determines if the attribute filter string matches the Artifact propety returned by a call to
ArtifactAttributeFilterImpl.getArtifactAttribute(Artifact).
|
void |
setFilterObject(Object filterObject)
Sets the Object that is used to compare against during the
filtering process. |
void |
setMethodName(String methodName)
Sets the name of the method that will be invoked on the Artifact that is used to retrieve an attribute of the
Artifact during filtering. |
| Methods inherited from class com.ibm.xtools.ras.profile.management.artifact.filter.AbstractCaseSensitiveFilterImpl |
isCaseSensitive, setCaseSensitive |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ibm.xtools.ras.profile.management.artifact.filter.ICaseSensitiveArtifactFilter |
isCaseSensitive, setCaseSensitive |
| Constructor Detail |
public AbstractArtifactAttributeFilterImpl(String methodName)
throws SecurityException,
NoSuchMethodException,
NullPointerException
AbstractArtifactAttributeFilterImpl
with the name of the method to invoke on the Artifact
methodName - the name of the method to invoke on the Artifact
NoSuchMethodException - -
if a matching method is not found or if the method name is
"NullPointerException - -
if method name is null
SecurityException - -
if access to the information is denied.
public AbstractArtifactAttributeFilterImpl(String methodName,
Object filterObject)
throws SecurityException,
NoSuchMethodException,
NullPointerException
AbstractArtifactAttributeFilterImpl
with the name of the method to invoke on the Artifact
methodName - the name of the method to invoke on the ArtifactfilterObject - the Object that is used to compare against
during the filtering process. It can be null
NoSuchMethodException - -
if a matching method is not found or if the method name is
"NullPointerException - -
if method name is null
SecurityException - -
if access to the information is denied.
public AbstractArtifactAttributeFilterImpl(String methodName,
Object filterObject,
boolean caseSensitive)
throws SecurityException,
NoSuchMethodException,
NullPointerException
AbstractArtifactAttributeFilterImpl
with name of the method to invoke on the Artifact and a
case sensitivity indicator.
methodName - the name of the method to invoke on the ArtifactfilterObject - the Object that is used to compare against
during the filtering process. It can be nullcaseSensitive - indicates if the filter should operate in a case sensitive
manner
NoSuchMethodException - -
if a matching method is not found or if the method name is
"NullPointerException - -
if method name is null
SecurityException - -
if access to the information is denied.| Method Detail |
public String getMethodName()
IArtifactAttributeFilterArtifact that is used to retrieve an attribute of the
Artifact during filtering.
getMethodName in interface IArtifactAttributeFilterArtifact
public void setMethodName(String methodName)
throws SecurityException,
NoSuchMethodException,
NullPointerException
IArtifactAttributeFilterArtifact that is used to retrieve an attribute of the
Artifact during filtering. This should be the name of a
public method that does not take any parameters. It should
also return some form of an Object.
setMethodName in interface IArtifactAttributeFiltermethodName - the name of the method that will be invoked on the
Artifact
NoSuchMethodException - -
if a matching method is not found or if the method name is
"NullPointerException - -
if method name is null
SecurityException - -
if access to the information is denied.public Object getFilterObject()
IArtifactAttributeFilterObject that is used to compare against
during the filtering process.
getFilterObject in interface IArtifactAttributeFilterObject that is used to compare against during
the filtering process.public void setFilterObject(Object filterObject)
IArtifactAttributeFilterObject that is used to compare against during the
filtering process. This Object can be null
providing the ability to filter for Artifact instances
that have a particular attribute set to null.
setFilterObject in interface IArtifactAttributeFilterfilterObject - the Object that is used to compare against
during the filtering process. It can be nullprotected Class getArtifactClass()
Artifact. This can be overridden by derived
classes to provided access to methods that are only available on a
derived object. This method should be used cautiously however since there
is no guarantee that all Artifact instances that pass
through the filter will be of the derived type. If this method is
overridden then
ArtifactAttributeFilterImpl.getArtifactAttribute(Artifact)
should probably be as well. It's in this method where the invocation
actually occurs.
Class of the Artifactpublic boolean matches(Artifact theArtifact)
Artifact propety returned by a call to
ArtifactAttributeFilterImpl.getArtifactAttribute(Artifact).
This methods also supports the null case. If
getArtifactAttribute() returns null, a
comparison is made to also see if the filter string is null.
This allows the client to filter for Artifact instances
that have null String attributes.
matches in interface IArtifactFiltertheArtifact - to compare against the filter criteria
true if the Artifact matches the
filter criteriaIArtifactFilter.matches(com.ibm.xtools.ras.profile.defauld.defaultprofile.Artifact)protected Object getArtifactAttribute(Artifact theArtifact)
Artifact using the method
that was looked up through reflection. If the attribute doesn't exist or
the invocation of the client specified method fails, null
is returned.
theArtifact - to retrieve the attribute from
Object or null.
protected abstract boolean compare(Object theAttribute,
Object filterObject)
Artifact being
filtered against the filter object. If appropriate the comparison should
be down in a case sensitive manner.
theAttribute - of the current Artifact in the filtering
process.filterObject - the Object to compare against.
true if the two objects are equal
protected abstract boolean compareIgnoreCase(Object theAttribute,
Object filterObject)
Artifact being
filtered against the filter object. If appropriate the comparison should
be down in a manner that ignores case.
theAttribute - of the current Artifact in the filtering
process.filterObject - the Object to compare against.
true if the two objects are equal
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.