Remote Systems
v6.4.1

com.ibm.etools.systems.filters
Interface SystemFilterPoolManager

All Known Implementing Classes:
SystemFilterPoolManagerImpl

public interface SystemFilterPoolManager


Field Summary
static String copyright
           
 
Method Summary
 SystemFilterString addSystemFilterString(SystemFilter filter, String newString)
          Append a new filter string to the given filter's list Does the following: Adds the filter string to the in-memory cache Saves parent filter pool to disk.
 SystemFilterString addSystemFilterString(SystemFilter filter, String newString, int position)
          Insert a new filter string to the given filter's list, at the given zero-based position Does the following: Adds the filter string to the in-memory cache Saves parent filter pool to disk.
 boolean areStringsCaseSensitive()
           
 SystemFilter copySystemFilter(SystemFilterPool targetPool, SystemFilter oldFilter, String newName)
          Copy a system filter to a pool in this or another filter manager.
 SystemFilterPool copySystemFilterPool(SystemFilterPoolManager targetMgr, SystemFilterPool pool, String newName)
          Copy the specified filter pool from this manager to this manager or another manager.
 void copySystemFilterPools(SystemFilterPoolManager targetMgr)
          Copy all filter pools from this manager to another manager.
 SystemFilterString copySystemFilterString(SystemFilter targetFilter, SystemFilterString oldFilterString)
          Copy a system filter string to a filter in this or another filter pool manager.
 SystemFilter createSystemFilter(SystemFilterContainer parent, String aliasName, Vector filterStrings)
          Creates a new system filter within the given filter container (either a filter pool, or a filter).
 SystemFilter createSystemFilter(SystemFilterContainer parent, String aliasName, Vector filterStrings, String type)
          Creates a new system filter that is typed.
 SystemFilter createSystemFilter(SystemFilterContainer parent, String aliasName, Vector filterStrings, String type, boolean promptable)
          Creates a new system filter that is typed and promptable Same as createSystemFilter(SystemFilterContainer, String ,Vector, String) but takes a boolean indicating if it is promptable.
 SystemFilterPool createSystemFilterPool(String name, boolean isDeletable)
          Create a new filter pool.
 void deleteAllSystemFilterPools()
          Delete all existing filter pools.
 boolean deleteSystemFilter(SystemFilter filter)
          Delete an existing system filter.
 void deleteSystemFilterPool(SystemFilterPool pool)
          Delete a given filter pool.
 SystemFilterPool getFirstDefaultSystemFilterPool()
          Return the first pool that has the default attribute set to true.
 IFolder getFolder()
          Return the folder that this manager is contained in.
 String getName()
          Return the name of this manager.
 SystemFilterNamingPolicy getNamingPolicy()
          Get the naming policy currently used when saving data to disk.
 EList getPools()
           
 SystemFilterPoolManagerProvider getProvider()
          Return the caller which instantiated the filter pool manager
 SystemFilterPool getSystemFilterPool(String name)
          Given a filter pool name, return that filter pool object.
 Object getSystemFilterPoolManagerData()
          Return transient data set via setFilterPoolDataManager.
 String[] getSystemFilterPoolNames()
          Get array of filter pool names currently existing.
 Vector getSystemFilterPoolNamesVector()
          Get vector of filter pool names currently existing.
 SystemFilterPool[] getSystemFilterPools()
          Return array of SystemFilterPools managed by this manager.
 int getSystemFilterPosition(SystemFilter filter)
          Return the zero-based position of a SystemFilter object within its container
 int getSystemFilterStringPosition(SystemFilterString filterString)
          Return the zero-based position of a SystemFilterString object within its filter
 boolean isSetSupportsDuplicateFilterStrings()
           
 boolean isSingleFilterStringOnly()
          Returns the value of the 'Single Filter String Only' attribute
 boolean isStringsCaseSensitive()
           
 boolean isSupportsDuplicateFilterStrings()
           
 boolean isSupportsNestedFilters()
           
 SystemFilter moveSystemFilter(SystemFilterPool targetPool, SystemFilter oldFilter, String newName)
          Move a system filter to a pool in this or another filter manager.
 SystemFilterPool moveSystemFilterPool(SystemFilterPoolManager targetMgr, SystemFilterPool oldPool, String newName)
          Move the specified filter pool from this manager to another manager.
 void moveSystemFilters(SystemFilter[] filters, int delta)
          Move existing filters a given number of positions in the same container.
 SystemFilterString moveSystemFilterString(SystemFilter targetFilter, SystemFilterString oldFilterString)
          Move a system filter string to a filter in this or another filter pool manager.
 void moveSystemFilterStrings(SystemFilterString[] filterStrings, int delta)
          Move existing filter strings a given number of positions in the same filter If the delta is negative, they are all moved up by the given amount.
 void orderSystemFilters(SystemFilterPool pool, String[] names)
          Order filters according to user preferences.
 boolean preTestRenameFilterPool(SystemFilterPool pool)
          Pre-test if we are going to run into any trouble renaming any of the files or folders used to persist a filter pool.
 boolean removeSystemFilterString(SystemFilter filter, int position)
          Remove a filter string from the given filter's list, given its zero-based position Does the following: Removes the filter string from the in-memory cache Saves parent filter pool to disk.
 boolean removeSystemFilterString(SystemFilter filter, String oldString)
          Delete a filter string from the given filter's list Does the following: Removes the filter string from the in-memory cache Saves parent filter pool to disk.
 boolean removeSystemFilterString(SystemFilter filter, SystemFilterString filterString)
          Remove a filter string from this filter's list, given its SystemFilterString object.
 void renameSystemFilter(SystemFilter filter, String newName)
          Renames a filter.
 void renameSystemFilterPool(SystemFilterPool pool, String newName)
          Rename a given filter pool.
 void resetManagerFolder(IFolder newFolder)
          Reset the manager folder
 void save()
          Save all the filter pools to disk.
 void save(SystemFilterPool pool)
          Save the given filter pool to disk.
 void setName(String name)
          Set the name of this manager.
 void setNamingPolicy(SystemFilterNamingPolicy namingPolicy)
          Set the naming policy used when saving data to disk.
 void setProvider(SystemFilterPoolManagerProvider caller)
          Set the caller instance which instantiated the filter pool manager.
 void setSingleFilterStringOnly(boolean value)
          Sets the value of the 'Single Filter String Only' attribute
 void setStringsCaseSensitive(boolean value)
           
 void setSupportsDuplicateFilterStrings(boolean supports)
          Set attribute indicating if filters managed by this manager support duplicate filter strings, by default.
 void setSupportsNestedFilters(boolean supports)
          Set attribute indicating if filter pools managed by this manager support nested filters, by default.
 void setSystemFilterPoolManagerData(Object data)
          This is to set transient data that is subsequently queryable.
 void setSystemFilterType(SystemFilter filter, String newType)
          Sets a filter's type.
 boolean supportsDuplicateFilterStrings()
          Return attribute indicating if filters managed by this manager support nested duplicate filter strings.
 boolean supportsNestedFilters()
          Return attribute indicating if filter pools managed by this manager support nested filters.
 void suspendCallbacks(boolean suspend)
          Suspend callbacks to the provider
 void unsetSupportsDuplicateFilterStrings()
           
 void updateSystemFilter(SystemFilter filter, String newName, String[] strings)
          Updates a filter.
 void updateSystemFilterString(SystemFilterString filterString, String newValue)
          Update a filter string's string vale Does the following: Update the filter string in the in-memory cache Saves parent filter pool to disk.
 boolean wasRestored()
          Return false if the instantiation of this filter pool manager resulting in a new manager versus a restoration
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Method Detail

getProvider

public SystemFilterPoolManagerProvider getProvider()
Return the caller which instantiated the filter pool manager


setProvider

public void setProvider(SystemFilterPoolManagerProvider caller)
Set the caller instance which instantiated the filter pool manager. This is only recorded to enable getProvider from any filter framework object.


setSystemFilterPoolManagerData

public void setSystemFilterPoolManagerData(Object data)
This is to set transient data that is subsequently queryable.


getSystemFilterPoolManagerData

public Object getSystemFilterPoolManagerData()
Return transient data set via setFilterPoolDataManager.


setNamingPolicy

public void setNamingPolicy(SystemFilterNamingPolicy namingPolicy)
Set the naming policy used when saving data to disk.

See Also:
SystemFilterNamingPolicy

getNamingPolicy

public SystemFilterNamingPolicy getNamingPolicy()
Get the naming policy currently used when saving data to disk.

See Also:
SystemFilterNamingPolicy

resetManagerFolder

public void resetManagerFolder(IFolder newFolder)
Reset the manager folder


getName

public String getName()
Return the name of this manager. This matches the name of the folder, which is the parent of the individual filter pool folders.


setName

public void setName(String name)
Set the name of this manager.


supportsNestedFilters

public boolean supportsNestedFilters()
Return attribute indicating if filter pools managed by this manager support nested filters.


supportsDuplicateFilterStrings

public boolean supportsDuplicateFilterStrings()
Return attribute indicating if filters managed by this manager support nested duplicate filter strings.


setSupportsNestedFilters

public void setSupportsNestedFilters(boolean supports)
Set attribute indicating if filter pools managed by this manager support nested filters, by default.


setSupportsDuplicateFilterStrings

public void setSupportsDuplicateFilterStrings(boolean supports)
Set attribute indicating if filters managed by this manager support duplicate filter strings, by default.


isStringsCaseSensitive

public boolean isStringsCaseSensitive()
Returns:
The value of the StringsCaseSensitive attribute Are filter strings in this filter case sensitive?

areStringsCaseSensitive

public boolean areStringsCaseSensitive()
Returns:
The value of the StringsCaseSensitive attribute Are filter strings in this filter case sensitive? Same as isStringsCaseSensitive()

wasRestored

public boolean wasRestored()
Return false if the instantiation of this filter pool manager resulting in a new manager versus a restoration


getSystemFilterPoolNames

public String[] getSystemFilterPoolNames()
Get array of filter pool names currently existing.


getSystemFilterPoolNamesVector

public Vector getSystemFilterPoolNamesVector()
Get vector of filter pool names currently existing.


getSystemFilterPools

public SystemFilterPool[] getSystemFilterPools()
Return array of SystemFilterPools managed by this manager.


getSystemFilterPool

public SystemFilterPool getSystemFilterPool(String name)
Given a filter pool name, return that filter pool object. If not found, returns null.


getFirstDefaultSystemFilterPool

public SystemFilterPool getFirstDefaultSystemFilterPool()
Return the first pool that has the default attribute set to true. If none found, returns null.


createSystemFilterPool

public SystemFilterPool createSystemFilterPool(String name,
                                               boolean isDeletable)
                                        throws Exception
Create a new filter pool. Inherits the following attributes from this manager:

If a pool of this name already exists, null will be returned.

Depending on the save policy, a new folder to hold the pool may be created. Its name will be derived from the pool name.

If the operation is successful, the pool will be saved to disk.

If this operation fails unexpectedly, an exception will be thrown.

Throws:
Exception

deleteSystemFilterPool

public void deleteSystemFilterPool(SystemFilterPool pool)
                            throws Exception
Delete a given filter pool. Dependending on the save policy, the appropriate file or folder on disk will also be deleted.

Does the following:

Parameters:
pool - The filter pool object to physically delete
Throws:
Exception

deleteAllSystemFilterPools

public void deleteAllSystemFilterPools()
Delete all existing filter pools. Call this when you are about to delete this manager, say.


preTestRenameFilterPool

public boolean preTestRenameFilterPool(SystemFilterPool pool)
                                throws Exception
Pre-test if we are going to run into any trouble renaming any of the files or folders used to persist a filter pool.

Throws:
Exception

renameSystemFilterPool

public void renameSystemFilterPool(SystemFilterPool pool,
                                   String newName)
                            throws Exception
Rename a given filter pool. Dependending on the save policy, the appropriate file or folder on disk will also be renamed.

Does the following:

Parameters:
pool - The filter pool object to physically rename
newName - The new name to give the pool
Throws:
Exception

copySystemFilterPool

public SystemFilterPool copySystemFilterPool(SystemFilterPoolManager targetMgr,
                                             SystemFilterPool pool,
                                             String newName)
                                      throws Exception
Copy the specified filter pool from this manager to this manager or another manager.

Does the following:

Parameters:
targetMgr - The target manager to copy our filter pool to. Can be this manager, but target pool name must be unique.
pool - The filter pool to copy
newName - The new name to give the copied pool
Returns:
the new copy of the copied system filter pool
Throws:
Exception

copySystemFilterPools

public void copySystemFilterPools(SystemFilterPoolManager targetMgr)
                           throws Exception
Copy all filter pools from this manager to another manager.

Does the following:

Parameters:
targetMgr - The target manager to copy our filter pools to
Throws:
Exception

moveSystemFilterPool

public SystemFilterPool moveSystemFilterPool(SystemFilterPoolManager targetMgr,
                                             SystemFilterPool oldPool,
                                             String newName)
                                      throws Exception
Move the specified filter pool from this manager to another manager.

Does the following:

Parameters:
targetMgr - The target manager to move our filter pool to. Cannot be this manager.
oldPool - The filter pool to move
newName - The new name to give the moved pool
Returns:
the new copy of the moved system filter pool
Throws:
Exception

createSystemFilter

public SystemFilter createSystemFilter(SystemFilterContainer parent,
                                       String aliasName,
                                       Vector filterStrings)
                                throws Exception
Creates a new system filter within the given filter container (either a filter pool, or a filter). This creates the filter, and then saves the filter pool.

Calls back to provider to inform of the event (filterEventFilterCreated)

Parameters:
parent - The parent which is either a SystemFilterPool or a SystemFilter
aliasName - The name to give the new filter. Must be unique for this pool.
filterStrings - The list of String objects that represent the filter strings.
Throws:
Exception

createSystemFilter

public SystemFilter createSystemFilter(SystemFilterContainer parent,
                                       String aliasName,
                                       Vector filterStrings,
                                       String type)
                                throws Exception
Creates a new system filter that is typed. Same as createSystemFilter(SystemFilterContainer, String, Vector) but takes a filter type as an additional parameter.

A filter's type is an arbitrary string that is not interpreted or used by the base framework. This is for use entirely by tools who wish to support multiple types of filters and be able to launch unique actions per type, say.

Parameters:
parent - The parent which is either a SystemFilterPool or a SystemFilter
aliasName - The name to give the new filter. Must be unique for this pool.
filterStrings - The list of String objects that represent the filter strings.
type - The type of this filter
Throws:
Exception

createSystemFilter

public SystemFilter createSystemFilter(SystemFilterContainer parent,
                                       String aliasName,
                                       Vector filterStrings,
                                       String type,
                                       boolean promptable)
                                throws Exception
Creates a new system filter that is typed and promptable Same as createSystemFilter(SystemFilterContainer, String ,Vector, String) but takes a boolean indicating if it is promptable.

A promptable filter is one in which the user is prompted for information at expand time. There is no base filter framework support for this, but tools can query this attribute and do their own thing at expand time.

Parameters:
parent - The parent which is either a SystemFilterPool or a SystemFilter
aliasName - The name to give the new filter. Must be unique for this pool.
filterStrings - The list of String objects that represent the filter strings.
type - The type of this filter
promptable - Pass true if this is a promptable filter
Throws:
Exception

deleteSystemFilter

public boolean deleteSystemFilter(SystemFilter filter)
                           throws Exception
Delete an existing system filter. Does the following:

Throws:
Exception

renameSystemFilter

public void renameSystemFilter(SystemFilter filter,
                               String newName)
                        throws Exception
Renames a filter. This is better than filter.setName(String newName) as it saves the parent pool to disk.

Does the following:

Throws:
Exception

updateSystemFilter

public void updateSystemFilter(SystemFilter filter,
                               String newName,
                               String[] strings)
                        throws Exception
Updates a filter. This is better than doing it directly as it saves it to disk.

Does the following:

Throws:
Exception

setSystemFilterType

public void setSystemFilterType(SystemFilter filter,
                                String newType)
                         throws Exception
Sets a filter's type. This is better than calling filter.setType(String) directly as it saves the filter to disk after.

A filter's type is an arbitrary string that is not interpreted or used by the base framework. This is for use entirely by tools who wish to support multiple types of filters and be able to launch unique actions per type, say.

Throws:
Exception

copySystemFilter

public SystemFilter copySystemFilter(SystemFilterPool targetPool,
                                     SystemFilter oldFilter,
                                     String newName)
                              throws Exception
Copy a system filter to a pool in this or another filter manager.

Throws:
Exception

getSystemFilterPosition

public int getSystemFilterPosition(SystemFilter filter)
Return the zero-based position of a SystemFilter object within its container


moveSystemFilter

public SystemFilter moveSystemFilter(SystemFilterPool targetPool,
                                     SystemFilter oldFilter,
                                     String newName)
                              throws Exception
Move a system filter to a pool in this or another filter manager. Does this by first copying the filter, and only if successful, deleting the old copy.

Throws:
Exception

moveSystemFilters

public void moveSystemFilters(SystemFilter[] filters,
                              int delta)
                       throws Exception
Move existing filters a given number of positions in the same container. If the delta is negative, they are all moved up by the given amount. If positive, they are all moved down by the given amount.

Does the following:

Parameters:
filters - Array of SystemFilters to move.
Throws:
Exception

orderSystemFilters

public void orderSystemFilters(SystemFilterPool pool,
                               String[] names)
                        throws Exception
Order filters according to user preferences.

While the framework has all the code necessary to arrange filters and save/restore that arrangement, you may choose to use preferences instead of this support. In this case, call this method and pass in the saved and sorted filter name list.

Called by someone after restore.

Throws:
Exception

addSystemFilterString

public SystemFilterString addSystemFilterString(SystemFilter filter,
                                                String newString)
                                         throws Exception
Append a new filter string to the given filter's list

Does the following:

Throws:
Exception

addSystemFilterString

public SystemFilterString addSystemFilterString(SystemFilter filter,
                                                String newString,
                                                int position)
                                         throws Exception
Insert a new filter string to the given filter's list, at the given zero-based position

Does the following:

Throws:
Exception

removeSystemFilterString

public boolean removeSystemFilterString(SystemFilter filter,
                                        SystemFilterString filterString)
                                 throws Exception
Remove a filter string from this filter's list, given its SystemFilterString object.

Does the following:

Returns:
true if the given string existed and hence was deleted.
Throws:
Exception

removeSystemFilterString

public boolean removeSystemFilterString(SystemFilter filter,
                                        String oldString)
                                 throws Exception
Delete a filter string from the given filter's list

Does the following:

Returns:
true if given string was found and hence was deleted.
Throws:
Exception

removeSystemFilterString

public boolean removeSystemFilterString(SystemFilter filter,
                                        int position)
                                 throws Exception
Remove a filter string from the given filter's list, given its zero-based position

Does the following:

Returns:
true if a string existed at the given position and hence was deleted.
Throws:
Exception

updateSystemFilterString

public void updateSystemFilterString(SystemFilterString filterString,
                                     String newValue)
                              throws Exception
Update a filter string's string vale

Does the following:

Throws:
Exception

getSystemFilterStringPosition

public int getSystemFilterStringPosition(SystemFilterString filterString)
Return the zero-based position of a SystemFilterString object within its filter


copySystemFilterString

public SystemFilterString copySystemFilterString(SystemFilter targetFilter,
                                                 SystemFilterString oldFilterString)
                                          throws Exception
Copy a system filter string to a filter in this or another filter pool manager.

Throws:
Exception

moveSystemFilterString

public SystemFilterString moveSystemFilterString(SystemFilter targetFilter,
                                                 SystemFilterString oldFilterString)
                                          throws Exception
Move a system filter string to a filter in this or another filter pool manager. Does this by doing a copy operation, then if successful doing a delete operation.

Throws:
Exception

moveSystemFilterStrings

public void moveSystemFilterStrings(SystemFilterString[] filterStrings,
                                    int delta)
                             throws Exception
Move existing filter strings a given number of positions in the same filter If the delta is negative, they are all moved up by the given amount. If positive, they are all moved down by the given amount.

Does the following:

Parameters:
filterStrings - Array of SystemFilterStrings to move.
Throws:
Exception

suspendCallbacks

public void suspendCallbacks(boolean suspend)
Suspend callbacks to the provider


save

public void save()
          throws Exception
Save all the filter pools to disk. Uses the save policy specified in this manager's factory method.

Throws:
Exception

save

public void save(SystemFilterPool pool)
          throws Exception
Save the given filter pool to disk. Exactly the scope of the save will depend on this manager's save policy. For example, if the policy is one file per manager, then all pools are saved to disk.

Throws:
Exception

getFolder

public IFolder getFolder()
Return the folder that this manager is contained in.


isSupportsNestedFilters

public boolean isSupportsNestedFilters()
Returns:
The value of the SupportsNestedFilters attribute

setStringsCaseSensitive

public void setStringsCaseSensitive(boolean value)
Parameters:
value - The new value of the StringsCaseSensitive attribute

getPools

public EList getPools()
Returns:
The list of Pools references

isSupportsDuplicateFilterStrings

public boolean isSupportsDuplicateFilterStrings()
Returns:
The value of the SupportsDuplicateFilterStrings attribute

unsetSupportsDuplicateFilterStrings

public void unsetSupportsDuplicateFilterStrings()

isSetSupportsDuplicateFilterStrings

public boolean isSetSupportsDuplicateFilterStrings()
Returns:
true if the SupportsDuplicateFilterStrings attribute has been set

isSingleFilterStringOnly

public boolean isSingleFilterStringOnly()
Returns the value of the 'Single Filter String Only' attribute.

If the meaning of the 'Single Filter String Only' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Single Filter String Only' attribute.
See Also:
setSingleFilterStringOnly(boolean), FiltersPackage.getSystemFilterPoolManager_SingleFilterStringOnly()

setSingleFilterStringOnly

public void setSingleFilterStringOnly(boolean value)
Sets the value of the 'Single Filter String Only' attribute.

Parameters:
value - the new value of the 'Single Filter String Only' attribute.
See Also:
isSingleFilterStringOnly()

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.