|
RSE Release 2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.rse.core.model.RSEPersistableObject
org.eclipse.rse.core.model.PropertySetContainer
org.eclipse.rse.core.model.RSEModelObject
org.eclipse.rse.internal.references.SystemReferencedObject
org.eclipse.rse.internal.core.filters.SystemFilter
org.eclipse.rse.core.filters.SystemFilterSimple
public class SystemFilterSimple
A lightweight override of the full-fledged persistable implementation of SystemFilter. This class replaces the heavy-weight MOF implementations with simple non-MOF implementations.
This flavour of SystemFilter implementation is for those cases where a simple in-memory SystemFilter is needed temporarily, perhaps to populate a GUI widget say, and the filter does not need to be savable/restorable. As a result there is no mof, and no need for a parent SystemFilterPool or SystemFilterPoolManager. The class is small, simple and directly instantiable.
This simple implementation does not support:
| Field Summary | |
|---|---|
protected HashMap |
cachedContents
|
protected boolean |
isStale
|
| Fields inherited from class org.eclipse.rse.internal.core.filters.SystemFilter |
|---|
_parentFilter, debug, default_, DEFAULT_EDEFAULT, filterStringArray, filterStringObjectArray, filterStringVector, NAME_EDEFAULT, nestedFilters, NON_CHANGABLE_EDEFAULT, NON_DELETABLE_EDEFAULT, NON_RENAMABLE_EDEFAULT, nonChangable, nonDeletable, nonRenamable, PROMPTABLE_EDEFAULT, RELATIVE_ORDER_EDEFAULT, relativeOrder, release, RELEASE_EDEFAULT, SINGLE_FILTER_STRING_ONLY_EDEFAULT, singleFilterStringOnly, strings, STRINGS_CASE_SENSITIVE_EDEFAULT, STRINGS_NON_CHANGABLE_EDEFAULT, stringsCaseSensitive, stringsNonChangable, SUPPORTS_DUPLICATE_FILTER_STRINGS_EDEFAULT, SUPPORTS_NESTED_FILTERS_EDEFAULT, supportsDuplicateFilterStrings, supportsNestedFilters, TYPE_EDEFAULT |
| Fields inherited from class org.eclipse.rse.internal.references.SystemReferencedObject |
|---|
helper |
| Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
|---|
NO_CHILDREN |
| Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
|---|
NO_CHILDREN |
| Constructor Summary | |
|---|---|
SystemFilterSimple(String name)
Constructor for SystemFilterSimpleImpl |
|
| Method Summary | |
|---|---|
ISystemFilterString |
addFilterString(String newString)
Append a new filter string to this filter's list. |
ISystemFilterString |
addFilterString(String newString,
int position)
Insert a new filter string to this filter's list, at the given zero-based position. |
boolean |
areStringsCaseSensitive()
Are filter strings in this filter case sensitive? |
void |
clone(ISystemFilter targetFilter)
Clones a given filter to the given target filter. |
Object[] |
getChildren()
Return the children of this filter. |
Object[] |
getContents(ISystemContentsType contentsType)
Returns all the contents of the object (combining results of all filters |
String |
getFilterString()
Get the single filter string. |
int |
getFilterStringCount()
Return how many filter strings are defined in this filter. |
String[] |
getFilterStrings()
Return filter strings as an array of String objects. |
Vector |
getFilterStringsVector()
Return filter strings as a Vector of String objects |
String |
getName()
Get the filter's name |
List |
getNestedFilters()
Overridden to return null |
Object |
getParent()
Get the parent as set in setParent(Object) |
ISystemFilter |
getParentFilter()
Overridden to return null |
ISystemFilterPoolManagerProvider |
getProvider()
Overridden to return null |
int |
getRelativeOrder()
Overridden to return -1 |
IFile |
getSaveFile()
Overridden to return null |
String |
getSaveFileName()
Overridden to return null |
List |
getStrings()
Overridden to return null |
ISystemFilter |
getSystemFilter(String aliasName)
Overridden to return null |
int |
getSystemFilterCount()
Overridden to return 0 |
Vector |
getSystemFilterNames()
Overridden to return null |
ISystemFilterPoolManager |
getSystemFilterPoolManager()
Overridden to return null |
ISystemFilter[] |
getSystemFilters()
Overridden to return null |
ISystemFilterString[] |
getSystemFilterStrings()
Get this filter's filter string objects as an array. |
Vector |
getSystemFiltersVector()
Overridden to return null |
String |
getType()
Get the filter's type |
boolean |
hasChildren()
Returns true if this filter has any filter strings |
boolean |
hasContents(ISystemContentsType contentsType)
Returns whether the object has contents of a particular type. |
protected void |
invalidateCache()
Clear internal cache so it will be rebuilt on next request. |
boolean |
isDefault()
Overridden to return false |
boolean |
isNested()
Return true if this filter is a nested filter or not. |
boolean |
isPromptable()
Is this a special filter that prompts the user when it is expanded? |
boolean |
isStale()
Indicates whether the cached object is stale |
boolean |
isStringsCaseSensitive()
Are filter strings in this filter case sensitive? |
boolean |
isTransient()
Return true if this a transient or simple filter that is only created temporary "on the fly" and not intended to be saved or part of the filter framework. |
void |
markStale(boolean isStale)
Marks the object as stale or not |
void |
markStale(boolean isStale,
boolean clearCache)
Marks the object as stale or not |
void |
moveSystemFilterString(int pos,
ISystemFilterString filterString)
Move a given filter string to a given zero-based location. |
ISystemFilterString |
removeFilterString(int position)
Remove a filter string from this filter's list, given its zero-based position |
boolean |
removeFilterString(ISystemFilterString filterString)
Remove a filter string from this filter's list, given its SystemFilterString object. |
ISystemFilterString |
removeFilterString(String oldString)
Delete a filter string from this filter's list. |
void |
save()
Overridden to do nothing |
void |
setContents(ISystemContentsType type,
Object[] cachedContents)
Cache contents of a certain type. |
void |
setDefault(boolean value)
Overridden to do nothing |
void |
setFilterString(String filterString)
Set the single filter string |
void |
setFilterStrings(String[] newStrings)
Set all the filter strings for this filter. |
void |
setFilterStrings(Vector newStrings)
Set all the filter strings for this filter. |
void |
setName(String name)
Set the filter's name |
void |
setParent(Object parent)
Set the parent. |
void |
setParentFilter(ISystemFilter l)
Overridden to do nothing |
void |
setPromptable(boolean promptable)
Is this a special filter that prompts the user when it is expanded? |
void |
setRelativeOrder(int value)
Overridden to do nothing |
void |
setStringsCaseSensitive(boolean value)
Specify if filter strings in this filter are case sensitive. |
void |
setSupportsNestedFilters(boolean value)
Overridden to do nothing |
void |
setType(String type)
Set the filter's type |
boolean |
supportsNestedFilters()
Does this support nested filters? |
void |
updateFilterString(ISystemFilterString filterString,
String newValue)
Update a new filter string's string value. |
| Methods inherited from class org.eclipse.rse.internal.core.filters.SystemFilter |
|---|
addPathTerminator, addSystemFilter, cloneSystemFilter, commit, copySystemFilterString, createSystemFilter, deleteSystemFilter, getAdapter, getDescription, getFilterStringObjectsVector, getNamingPolicy, getParentFilterContainer, getParentFilterPool, getPersistableChildren, getPersistableParent, getRelease, getRootSaveFileName, getRootSaveFileName, getSystemFilterPool, getSystemFilterPosition, getSystemFilterString, getTypeGen, initializeFilterStrings, internalGetFilters, isNonChangable, isNonDeletable, isNonRenamable, isSetSingleFilterStringOnly, isSetStringsCaseSensitive, isSingleFilterStringOnly, isSingleFilterStringOnlyGen, isStringsNonChangable, isSupportsDuplicateFilterStrings, isSupportsNestedFilters, moveSystemFilter, renameSystemFilter, restore, setNonChangable, setNonDeletable, setNonRenamable, setParentFilterPool, setRelease, setSingleFilterStringOnly, setStringsNonChangable, setSupportsDuplicateFilterStrings, supportsDuplicateFilterStrings, toString, unsetSingleFilterStringOnly, unsetStringsCaseSensitive, updateSystemFilter |
| Methods inherited from class org.eclipse.rse.internal.references.SystemReferencedObject |
|---|
addReference, getReferenceCount, getReferencingObjects, removeAllReferences, removeReference |
| Methods inherited from class org.eclipse.rse.core.model.PropertySetContainer |
|---|
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
| Methods inherited from class org.eclipse.rse.core.model.RSEPersistableObject |
|---|
compareStrings, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.rse.core.references.IRSEBaseReferencedObject |
|---|
addReference, getReferenceCount, getReferencingObjects, removeAllReferences, removeReference |
| Methods inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
|---|
isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
| Methods inherited from interface org.eclipse.rse.core.model.IPropertySetContainer |
|---|
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
| Methods inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
|---|
isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
| Field Detail |
|---|
protected boolean isStale
protected HashMap cachedContents
| Constructor Detail |
|---|
public SystemFilterSimple(String name)
| Method Detail |
|---|
protected void invalidateCache()
org.eclipse.rse.internal.core.filters.SystemFilter
invalidateCache in class org.eclipse.rse.internal.core.filters.SystemFilterpublic boolean isTransient()
We always return true
isTransient in interface ISystemFilterisTransient in class org.eclipse.rse.internal.core.filters.SystemFilterSystemFilterSimplepublic void clone(ISystemFilter targetFilter)
clone in interface ISystemFilterclone in class org.eclipse.rse.internal.core.filters.SystemFiltertargetFilter - new filter into which we copy all our datapublic void setFilterString(String filterString)
public String getFilterString()
public void setParent(Object parent)
public Object getParent()
public void setName(String name)
setName in interface ISystemFiltersetName in class org.eclipse.rse.internal.core.filters.SystemFiltername - the new value of the 'Name' attribute.ISystemFilter.getName()public String getName()
getName in interface ISystemFiltergetName in interface IRSEModelObjectgetName in class org.eclipse.rse.internal.core.filters.SystemFilterISystemFilter.setName(String)public void setType(String type)
setType in interface ISystemFiltersetType in class org.eclipse.rse.internal.core.filters.SystemFiltertype - the new value of the 'Type' attribute.ISystemFilter.getType()public String getType()
getType in interface ISystemFiltergetType in class org.eclipse.rse.internal.core.filters.SystemFilterISystemFilter.setType(String)public void setStringsCaseSensitive(boolean value)
setStringsCaseSensitive in interface ISystemFiltersetStringsCaseSensitive in class org.eclipse.rse.internal.core.filters.SystemFiltervalue - The new value of the StringsCaseSensitive attributeISystemFilter.isSetStringsCaseSensitive(),
ISystemFilter.unsetStringsCaseSensitive(),
ISystemFilter.isStringsCaseSensitive()public boolean isStringsCaseSensitive()
isStringsCaseSensitive in interface ISystemFilterisStringsCaseSensitive in class org.eclipse.rse.internal.core.filters.SystemFilterISystemFilter.isSetStringsCaseSensitive(),
ISystemFilter.unsetStringsCaseSensitive(),
ISystemFilter.setStringsCaseSensitive(boolean)public boolean areStringsCaseSensitive()
areStringsCaseSensitive in interface ISystemFilterContainerareStringsCaseSensitive in class org.eclipse.rse.internal.core.filters.SystemFilterpublic void setPromptable(boolean promptable)
setPromptable in interface ISystemFiltersetPromptable in class org.eclipse.rse.internal.core.filters.SystemFilterpromptable - the new value of the 'Promptable' attribute.ISystemFilter.isPromptable()public boolean isPromptable()
isPromptable in interface ISystemFilterisPromptable in class org.eclipse.rse.internal.core.filters.SystemFilterISystemFilter.setPromptable(boolean)public String[] getFilterStrings()
getFilterStrings in interface ISystemFiltergetFilterStrings in class org.eclipse.rse.internal.core.filters.SystemFilterpublic Vector getFilterStringsVector()
getFilterStringsVector in interface ISystemFiltergetFilterStringsVector in class org.eclipse.rse.internal.core.filters.SystemFilterpublic int getFilterStringCount()
getFilterStringCount in interface ISystemFiltergetFilterStringCount in class org.eclipse.rse.internal.core.filters.SystemFilterpublic void setFilterStrings(Vector newStrings)
setFilterStrings in interface ISystemFiltersetFilterStrings in class org.eclipse.rse.internal.core.filters.SystemFilternewStrings - Vector of String objectspublic void setFilterStrings(String[] newStrings)
setFilterStrings in interface ISystemFiltersetFilterStrings in class org.eclipse.rse.internal.core.filters.SystemFilternewStrings - array of String objectspublic ISystemFilterString addFilterString(String newString)
addFilterString in interface ISystemFilteraddFilterString in class org.eclipse.rse.internal.core.filters.SystemFilternewString - the string to append
public ISystemFilterString addFilterString(String newString,
int position)
addFilterString in interface ISystemFilteraddFilterString in class org.eclipse.rse.internal.core.filters.SystemFilternewString - the string from which to construct the filter string to be added.position - the zero-based position at which to add the string.public ISystemFilterString removeFilterString(String oldString)
removeFilterString in interface ISystemFilterremoveFilterString in class org.eclipse.rse.internal.core.filters.SystemFilteroldString - the string to remove
public ISystemFilterString removeFilterString(int position)
removeFilterString in interface ISystemFilterremoveFilterString in class org.eclipse.rse.internal.core.filters.SystemFilterposition - the position of the filter string.
public Object[] getChildren()
getChildren in class org.eclipse.rse.internal.core.filters.SystemFilterpublic boolean hasChildren()
hasChildren in class org.eclipse.rse.internal.core.filters.SystemFilterpublic ISystemFilterString[] getSystemFilterStrings()
getSystemFilterStrings in interface ISystemFiltergetSystemFilterStrings in class org.eclipse.rse.internal.core.filters.SystemFilterpublic void setSupportsNestedFilters(boolean value)
setSupportsNestedFilters in interface ISystemFiltersetSupportsNestedFilters in class org.eclipse.rse.internal.core.filters.SystemFiltervalue - the new value of the 'Supports Nested Filters' attribute.ISystemFilter.isSupportsNestedFilters()public boolean supportsNestedFilters()
supportsNestedFilters in class org.eclipse.rse.internal.core.filters.SystemFilterpublic boolean isNested()
isNested in interface ISystemFilterisNested in class org.eclipse.rse.internal.core.filters.SystemFilter
public void updateFilterString(ISystemFilterString filterString,
String newValue)
updateFilterString in interface ISystemFilterupdateFilterString in class org.eclipse.rse.internal.core.filters.SystemFilterfilterString - the string update.newValue - the new value of that string.public boolean removeFilterString(ISystemFilterString filterString)
removeFilterString in interface ISystemFilterremoveFilterString in class org.eclipse.rse.internal.core.filters.SystemFilterfilterString - the filterString to be removed.
public void moveSystemFilterString(int pos,
ISystemFilterString filterString)
moveSystemFilterString in interface ISystemFiltermoveSystemFilterString in class org.eclipse.rse.internal.core.filters.SystemFilterpos - the new position of this filter stringfilterString - the filter string to movepublic void setRelativeOrder(int value)
setRelativeOrder in interface ISystemFiltersetRelativeOrder in class org.eclipse.rse.internal.core.filters.SystemFiltervalue - the new value of the 'Relative Order' attribute.ISystemFilter.getRelativeOrder()public int getRelativeOrder()
getRelativeOrder in interface ISystemFiltergetRelativeOrder in class org.eclipse.rse.internal.core.filters.SystemFilterISystemFilter.setRelativeOrder(int)public void setDefault(boolean value)
setDefault in interface ISystemFiltersetDefault in class org.eclipse.rse.internal.core.filters.SystemFiltervalue - the new value of the 'Default' attribute.ISystemFilter.isDefault()public boolean isDefault()
isDefault in interface ISystemFilterisDefault in class org.eclipse.rse.internal.core.filters.SystemFilterISystemFilter.setDefault(boolean)public void setParentFilter(ISystemFilter l)
setParentFilter in interface ISystemFiltersetParentFilter in class org.eclipse.rse.internal.core.filters.SystemFilterl - the new value of the 'Parent Filter' container reference.ISystemFilter.getParentFilter()public ISystemFilter getParentFilter()
getParentFilter in interface ISystemFiltergetParentFilter in class org.eclipse.rse.internal.core.filters.SystemFilterISystemFilter.setParentFilter(ISystemFilter),
ISystemFilter.getNestedFilters()public Vector getSystemFilterNames()
getSystemFilterNames in interface ISystemFilterContainergetSystemFilterNames in class org.eclipse.rse.internal.core.filters.SystemFilterpublic List getNestedFilters()
getNestedFilters in interface ISystemFiltergetNestedFilters in class org.eclipse.rse.internal.core.filters.SystemFilterISystemFilter.getParentFilter()public Vector getSystemFiltersVector()
getSystemFiltersVector in interface ISystemFilterContainergetSystemFiltersVector in class org.eclipse.rse.internal.core.filters.SystemFilterpublic ISystemFilter[] getSystemFilters()
getSystemFilters in interface ISystemFilterContainergetSystemFilters in class org.eclipse.rse.internal.core.filters.SystemFilterpublic int getSystemFilterCount()
getSystemFilterCount in interface ISystemFilterContainergetSystemFilterCount in class org.eclipse.rse.internal.core.filters.SystemFilterpublic List getStrings()
getStrings in interface ISystemFiltergetStrings in class org.eclipse.rse.internal.core.filters.SystemFilterpublic ISystemFilter getSystemFilter(String aliasName)
getSystemFilter in interface ISystemFilterContainergetSystemFilter in class org.eclipse.rse.internal.core.filters.SystemFilteraliasName - unique aliasName (case insensitive) to search on.
public ISystemFilterPoolManagerProvider getProvider()
getProvider in interface ISystemFiltergetProvider in class org.eclipse.rse.internal.core.filters.SystemFilterpublic ISystemFilterPoolManager getSystemFilterPoolManager()
getSystemFilterPoolManager in interface ISystemFilterContainergetSystemFilterPoolManager in class org.eclipse.rse.internal.core.filters.SystemFilterpublic IFile getSaveFile()
public String getSaveFileName()
public void save()
throws Exception
Exception
public void setContents(ISystemContentsType type,
Object[] cachedContents)
type - the contents type.cachedContents - the contents to cache.public Object[] getContents(ISystemContentsType contentsType)
ISystemContainer
getContents in interface ISystemContainercontentsType - type of contents
ISystemContainer.getContents(org.eclipse.rse.core.model.ISystemContentsType)public boolean hasContents(ISystemContentsType contentsType)
ISystemContainer
hasContents in interface ISystemContainercontentsType - type of contents
true if the object has contents, false otherwise.ISystemContainer.hasContents(org.eclipse.rse.core.model.ISystemContentsType)public boolean isStale()
ISystemContainer
isStale in interface ISystemContainerISystemContainer.isStale()public void markStale(boolean isStale)
ISystemContainer
markStale in interface ISystemContainerisStale - whether the object is to be marked stale or notISystemContainer.markStale(boolean)
public void markStale(boolean isStale,
boolean clearCache)
ISystemContainer
markStale in interface ISystemContainerisStale - whether the object is to be marked stale or notclearCache - indicates whether or not to clear the cacheISystemContainer.markStale(boolean)
|
RSE Release 2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||