diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java
index 8751c6c7741..d1a320015c6 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java
@@ -15,10 +15,10 @@
********************************************************************************/
package org.eclipse.rse.core.filters;
+
import org.eclipse.rse.core.model.IRSEModelObject;
import org.eclipse.rse.core.references.IRSEPersistableReferencedObject;
-
/**
* This interface represents a system filter pool, which is a means of
* grouping filters.
@@ -28,88 +28,97 @@ import org.eclipse.rse.core.references.IRSEPersistableReferencedObject;
/**
* @lastgen interface SystemFilterPool extends SystemPersistableReferencedObject, SystemFilterContainer {}
*/
-public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISystemFilterContainer, IRSEModelObject
-{
+public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISystemFilterContainer, IRSEModelObject {
// external methods
- /**
- * Return the caller which instantiated the filter pool manager overseeing this filter framework instance
- */
- public ISystemFilterPoolManagerProvider getProvider();
- /**
- * Set the naming policy used when saving data to disk.
- * @see org.eclipse.rse.core.filters.IRSEFilterNamingPolicy
- */
- public void setNamingPolicy(IRSEFilterNamingPolicy namingPolicy);
- /**
- * Get the naming policy currently used when saving data to disk.
- * @see org.eclipse.rse.core.filters.IRSEFilterNamingPolicy
- */
- public IRSEFilterNamingPolicy getNamingPolicy();
- /**
- * Does this filter support nested filters?
- */
- public boolean supportsNestedFilters();
- /**
- * Does this support duplicate filter strings? Calls mof-generated isSupportsDuplicateFilterStrings.
- */
- public boolean supportsDuplicateFilterStrings();
- /**
+ /**
+ * Return the caller which instantiated the filter pool manager overseeing this filter framework instance
+ */
+ public ISystemFilterPoolManagerProvider getProvider();
+
+ /**
+ * Set the naming policy used when saving data to disk.
+ * @see org.eclipse.rse.core.filters.IRSEFilterNamingPolicy
+ */
+ public void setNamingPolicy(IRSEFilterNamingPolicy namingPolicy);
+
+ /**
+ * Get the naming policy currently used when saving data to disk.
+ * @see org.eclipse.rse.core.filters.IRSEFilterNamingPolicy
+ */
+ public IRSEFilterNamingPolicy getNamingPolicy();
+
+ /**
+ * Does this filter support nested filters?
+ */
+ public boolean supportsNestedFilters();
+
+ /**
+ * Does this support duplicate filter strings? Calls mof-generated isSupportsDuplicateFilterStrings.
+ */
+ public boolean supportsDuplicateFilterStrings();
+
+ /**
* @return The value of the StringsCaseSensitive attribute
* Are filter strings in this filter case sensitive?
* If not set locally, queries the parent filter pool manager's atttribute.
*/
public boolean isStringsCaseSensitive();
- /**
- * Set the filter pool manager.
- */
- public void setSystemFilterPoolManager(ISystemFilterPoolManager mgr);
- /**
- * Return the filter pool manager managing this collection of filter pools and their filters.
- */
- public ISystemFilterPoolManager getSystemFilterPoolManager();
+ /**
+ * Set the filter pool manager.
+ */
+ public void setSystemFilterPoolManager(ISystemFilterPoolManager mgr);
+
+ /**
+ * Return the filter pool manager managing this collection of filter pools and their filters.
+ */
+ public ISystemFilterPoolManager getSystemFilterPoolManager();
+
/**
* This is to set transient data that is queryable via getFilterPoolData
*/
public void setSystemFilterPoolData(Object data);
+
/**
* Return transient data set via setFilterPoolData.
*/
public Object getSystemFilterPoolData();
- /**
- * Clone this filter pools' attributes and filters into another filter pool.
- * Assumes the core attributes were already set when filter pool was created:
- *
- * - Name
- *
- Deletable
- *
- Supports nested filters
- *
- Manager
- *
- * Attributes we clone:
- *
- * - Data
- *
- Type
- *
- Default
- *
- */
- public void cloneSystemFilterPool(ISystemFilterPool targetPool)
- throws Exception;
- /**
- * Copy a system filter to this or another filter pool.
- */
- public ISystemFilter copySystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName)
- 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.
- */
- public void orderSystemFilters(String[] names);
- /**
+
+ /**
+ * Clone this filter pools' attributes and filters into another filter pool.
+ * Assumes the core attributes were already set when filter pool was created:
+ *
+ * - Name
+ *
- Deletable
+ *
- Supports nested filters
+ *
- Manager
+ *
+ * Attributes we clone:
+ *
+ * - Data
+ *
- Type
+ *
- Default
+ *
+ */
+ public void cloneSystemFilterPool(ISystemFilterPool targetPool) throws Exception;
+
+ /**
+ * Copy a system filter to this or another filter pool.
+ */
+ public ISystemFilter copySystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName) 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.
+ */
+ public void orderSystemFilters(String[] names);
+
+ /**
* Set the save file policy. See constants in SystemFilterConstants. One of:
*
* - SAVE_POLICY_ONE_FILE_PER_POOL
@@ -117,18 +126,16 @@ public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISys
*
* This method is called by the SystemFilterPoolManager.
*/
- public void setSavePolicy(int policy);
+ public void setSavePolicy(int policy);
-
public String getId();
-
+
/**
* @generated This field/method will be replaced during code generation
* @return The value of the Name attribute
*/
String getName();
-
/**
* @generated This field/method will be replaced during code generation
* @param value The new value of the Name attribute
@@ -247,9 +254,6 @@ public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISys
* @see #isSetSingleFilterStringOnly()
* @see #unsetSingleFilterStringOnly()
* @see #setSingleFilterStringOnly(boolean)
- * @see org.eclipse.rse.filters.FiltersPackage#getSystemFilterPool_SingleFilterStringOnly()
- * @model unsettable="true"
- * @generated
*/
boolean isSingleFilterStringOnly();
@@ -298,9 +302,6 @@ public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISys
*
* @return the value of the 'Owning Parent Name' attribute.
* @see #setOwningParentName(String)
- * @see org.eclipse.rse.filters.FiltersPackage#getSystemFilterPool_OwningParentName()
- * @model
- * @generated
*/
String getOwningParentName();
@@ -324,9 +325,6 @@ public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISys
*
* @return the value of the 'Non Renamable' attribute.
* @see #setNonRenamable(boolean)
- * @see org.eclipse.rse.filters.FiltersPackage#getSystemFilterPool_NonRenamable()
- * @model
- * @generated
*/
boolean isNonRenamable();
@@ -340,9 +338,5 @@ public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISys
*/
void setNonRenamable(boolean value);
- public ISystemFilterPool createSystemFilterPool(
- String name,
- boolean allowNestedFilters,
- boolean isDeletable,
- boolean tryToRestore);
+ public ISystemFilterPool createSystemFilterPool(String name, boolean allowNestedFilters, boolean isDeletable, boolean tryToRestore);
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java
index 617c2da5622..86688ac0ad1 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java
@@ -15,15 +15,12 @@
********************************************************************************/
package org.eclipse.rse.core.filters;
+
import java.util.Vector;
import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.persistance.IRSEPersistableContainer;
-
-
-
-
/**
* A filter pool manager manages filter pools.
*
@@ -80,62 +77,65 @@ import org.eclipse.rse.core.persistance.IRSEPersistableContainer;
/**
* @lastgen interface SystemFilterPoolManager {}
*/
-public interface ISystemFilterPoolManager extends IRSEPersistableContainer
-{
- // ---------------------------------
- // ATTRIBUTE METHODS
- // ---------------------------------
- /**
- * Return the caller which instantiated the filter pool manager
- */
- public ISystemFilterPoolManagerProvider getProvider();
-
- /**
- * Return the owning profile for this provider
- */
- public ISystemProfile getSystemProfile();
-
- /**
- * Set the caller instance which instantiated the filter pool manager.
- * This is only recorded to enable getProvider from any filter framework object.
- */
- public void setProvider(ISystemFilterPoolManagerProvider caller);
+public interface ISystemFilterPoolManager extends IRSEPersistableContainer {
+ // ---------------------------------
+ // ATTRIBUTE METHODS
+ // ---------------------------------
+ /**
+ * Return the caller which instantiated the filter pool manager
+ */
+ public ISystemFilterPoolManagerProvider getProvider();
+
+ /**
+ * Return the owning profile for this provider
+ */
+ public ISystemProfile getSystemProfile();
+
+ /**
+ * Set the caller instance which instantiated the filter pool manager.
+ * This is only recorded to enable getProvider from any filter framework object.
+ */
+ public void setProvider(ISystemFilterPoolManagerProvider caller);
/**
* This is to set transient data that is subsequently queryable.
*/
public void setSystemFilterPoolManagerData(Object data);
+
/**
* Return transient data set via setFilterPoolDataManager.
*/
- public Object getSystemFilterPoolManagerData();
- /**
- * Return the name of this manager.
- * This matches the name of the folder, which is the parent of the individual filter pool folders.
- */
+ public Object getSystemFilterPoolManagerData();
+
+ /**
+ * Return the name of this manager.
+ * This matches the name of the folder, which is the parent of the individual filter pool folders.
+ */
public String getName();
-/**
- * Set the name of this manager.
- */
+ /**
+ * Set the name of this manager.
+ */
public void setName(String name);
- /**
- * Return attribute indicating if filter pools managed by this manager support nested filters.
- */
- public boolean supportsNestedFilters();
- /**
- * Return attribute indicating if filters managed by this manager support nested duplicate filter strings.
- */
- public boolean supportsDuplicateFilterStrings();
/**
- * Set attribute indicating if filter pools managed by this manager support nested filters, by default.
- */
+ * Return attribute indicating if filter pools managed by this manager support nested filters.
+ */
+ public boolean supportsNestedFilters();
+
+ /**
+ * Return attribute indicating if filters managed by this manager support nested duplicate filter strings.
+ */
+ public boolean supportsDuplicateFilterStrings();
+
+ /**
+ * Set attribute indicating if filter pools managed by this manager support nested filters, by default.
+ */
public void setSupportsNestedFilters(boolean supports);
/**
- * Set attribute indicating if filters managed by this manager support duplicate filter strings, by default.
- */
+ * Set attribute indicating if filters managed by this manager support duplicate filter strings, by default.
+ */
public void setSupportsDuplicateFilterStrings(boolean supports);
/**
@@ -151,425 +151,415 @@ public interface ISystemFilterPoolManager extends IRSEPersistableContainer
*/
public boolean areStringsCaseSensitive();
- /**
- * Return false if the instantiation of this filter pool manager resulting in a new manager versus a restoration
- */
- public boolean wasRestored();
-
- // ---------------------------------
- // FILTER POOL METHODS
- // ---------------------------------
- /**
- * Get array of filter pool names currently existing.
- */
- public String[] getSystemFilterPoolNames();
- /**
- * Get vector of filter pool names currently existing.
- */
- public Vector getSystemFilterPoolNamesVector();
+ /**
+ * Return false if the instantiation of this filter pool manager resulting in a new manager versus a restoration
+ */
+ public boolean wasRestored();
- /**
- * Return array of SystemFilterPools managed by this manager.
- */
- public ISystemFilterPool[] getSystemFilterPools();
-
- /**
- * Given a filter pool name, return that filter pool object.
- * If not found, returns null.
- */
- public ISystemFilterPool getSystemFilterPool(String name);
+ // ---------------------------------
+ // FILTER POOL METHODS
+ // ---------------------------------
+ /**
+ * Get array of filter pool names currently existing.
+ */
+ public String[] getSystemFilterPoolNames();
- /**
- * Return the first pool that has the default attribute set to true.
- * If none found, returns null.
- */
- public ISystemFilterPool getFirstDefaultSystemFilterPool();
-
- /**
- * Create a new filter pool.
- * Inherits the following attributes from this manager:
- *
- * - data ... the transient data to be associated with every filter pool and filter
- *
- supportsNestedFilters ... whether filters in the pool can themselves contain filters
- *
- *
- * 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.
- */
- public ISystemFilterPool createSystemFilterPool(String name, boolean isDeletable)
- throws Exception;
+ /**
+ * Get vector of filter pool names currently existing.
+ */
+ public Vector getSystemFilterPoolNamesVector();
- /**
- * Delete a given filter pool. Dependending on the save policy, the
- * appropriate file or folder on disk will also be deleted.
- *
- * Does the following:
- *
- * - Removes all references
- *
- Removes pool object from in-memory model
- *
- Removes folder from disk for policies of one folder per pool
- *
- Removes file from disk for policy of one file per pool
- *
- Saves model to disk for policy of one file per manager
- *
- Invalidates in-memory caches
- *
- Calls back to inform caller of this event
- *
- * @param pool The filter pool object to physically delete
- */
- public void deleteSystemFilterPool(ISystemFilterPool pool)
- throws Exception;
+ /**
+ * Return array of SystemFilterPools managed by this manager.
+ */
+ public ISystemFilterPool[] getSystemFilterPools();
- /**
- * Delete all existing filter pools. Call this when you are about to delete this manager, say.
- */
- public void deleteAllSystemFilterPools();
+ /**
+ * Given a filter pool name, return that filter pool object.
+ * If not found, returns null.
+ */
+ public ISystemFilterPool getSystemFilterPool(String name);
- /**
- * Pre-test if we are going to run into any trouble renaming any of the files or folders
- * used to persist a filter pool.
- * @return true if everything seems ok, false if a file/folder is in use.
- */
- public boolean preTestRenameFilterPool(ISystemFilterPool pool) 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:
- *
- * - Renames referencing objects
- *
- Renames pool object in the in-memory model
- *
- Renames folder on disk for policies of one folder per pool
- *
- Renames file on disk for policy of one file per pool
- *
- Saves model to disk for policy of one file per manager
- *
- Invalidates in-memory caches
- *
- * @param pool The filter pool object to physically rename
- * @param newName The new name to give the pool
- */
- public void renameSystemFilterPool(ISystemFilterPool pool, String newName)
- throws Exception;
+ /**
+ * Return the first pool that has the default attribute set to true.
+ * If none found, returns null.
+ */
+ public ISystemFilterPool getFirstDefaultSystemFilterPool();
- /**
- * Copy the specified filter pool from this manager to this manager or another manager.
- *
- * Does the following:
- *
- * - Clones all filters within the pool
- *
- Clones all filter strings within each filter
- *
- Asks target manager to save to disk
- *
- Calls back to target manager provider, unless callbacks are suspended
- *
- * @param targetMgr The target manager to copy our filter pool to. Can be this manager, but target pool name must be unique.
- * @param pool The filter pool to copy
- * @param newName The new name to give the copied pool
- * @return the new copy of the copied system filter pool
- */
- public ISystemFilterPool copySystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool pool, String newName)
- throws Exception;
-
- /**
- * Copy all filter pools from this manager to another manager.
- *
- * Does the following:
- *
- * - Clones all filter pools
- *
- Clones all filters within each pool
- *
- Clones all filter strings within each filter
- *
- Asks target manager to save to disk
- *
- Does not callback to caller to fire events, assumes caller doesn't want to know
- *
- * @param targetMgr The target manager to copy our filter pools to
- */
- public void copySystemFilterPools(ISystemFilterPoolManager targetMgr)
- throws Exception;
+ /**
+ * Create a new filter pool.
+ * Inherits the following attributes from this manager:
+ *
+ * - data ... the transient data to be associated with every filter pool and filter
+ *
- supportsNestedFilters ... whether filters in the pool can themselves contain filters
+ *
+ *
+ * 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.
+ */
+ public ISystemFilterPool createSystemFilterPool(String name, boolean isDeletable) throws Exception;
- /**
- * Move the specified filter pool from this manager to another manager.
- *
- * Does the following:
- *
- * - Performs a {@link #copySystemFilterPool(ISystemFilterPoolManager, ISystemFilterPool, String) copySystemFilterPool} operation.
- *
- If copy is successful, updates all references to reference the new copy.
- *
- If copy is successful, deletes original filter pool in this manager
- *
- If this final delete fails, deletes the copied version and restore original references
- *
- Asks target manager to save to disk
- *
- Saves this manager to disk
- *
- Calls back to both targer manager provider and this manager provider, unless callbacks are suspended
- *
- * @param targetMgr The target manager to move our filter pool to. Cannot be this manager.
- * @param oldPool The filter pool to move
- * @param newName The new name to give the moved pool
- * @return the new copy of the moved system filter pool
- */
- public ISystemFilterPool moveSystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool oldPool, String newName)
- throws Exception;
-
- // ---------------------------------
- // FILTER METHODS
- // ---------------------------------
- /**
- * 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)
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent,
- String aliasName, Vector filterStrings)
- throws Exception;
- /**
- * Creates a new system filter that is typed.
- * Same as {@link #createSystemFilter(ISystemFilterContainer, 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.
- *
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- * @param type The type of this filter
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent,
- String aliasName, Vector filterStrings, String type)
- throws Exception;
- /**
- * Creates a new system filter that is typed and promptable
- * Same as {@link #createSystemFilter(ISystemFilterContainer, 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.
- *
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param aliasName The name to give the new filter. Must be unique for this pool.
- * @param filterStrings The list of String objects that represent the filter strings.
- * @param type The type of this filter
- * @param promptable Pass true if this is a promptable filter
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent,
- String aliasName, Vector filterStrings, String type, boolean promptable)
- 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:
+ *
+ * - Removes all references
+ *
- Removes pool object from in-memory model
+ *
- Removes folder from disk for policies of one folder per pool
+ *
- Removes file from disk for policy of one file per pool
+ *
- Saves model to disk for policy of one file per manager
+ *
- Invalidates in-memory caches
+ *
- Calls back to inform caller of this event
+ *
+ * @param pool The filter pool object to physically delete
+ */
+ public void deleteSystemFilterPool(ISystemFilterPool pool) throws Exception;
- /**
- * Delete an existing system filter.
- * Does the following:
- *
- * - Removes filter from its parent in memory.
- *
- If appropriate for the save policy, deletes the filter's file from disk.
- *
- Save the SystemFilterPool which direct or indirectly contains the filter.
- *
- Calls back to provider to inform of the event (filterEventFilterDelete)
- *
- */
- public boolean deleteSystemFilter(ISystemFilter filter)
- throws Exception;
- /**
- * Renames a filter. This is better than filter.setName(String newName) as it
- * saves the parent pool to disk.
- *
- * Does the following:
- *
- * - Renames the object in the in-memory cache
- *
- If appropriate for the save policy, rename's the filter's file on disk.
- *
- Save parent filter pool's in-memory object to disk.
- *
- Calls back to provider to inform of the event (filterEventFilterRenamed)
- *
- */
- public void renameSystemFilter(ISystemFilter filter, String newName)
- throws Exception;
+ /**
+ * Delete all existing filter pools. Call this when you are about to delete this manager, say.
+ */
+ public void deleteAllSystemFilterPools();
- /**
- * Updates a filter. This is better than doing it directly as it saves it to disk.
- *
- * Does the following:
- *
- * - Updates the object in the in-memory cache
- *
- Save parent filter pool's in-memory object to disk.
- *
- Calls back to provider to inform of the event (filterEventFilterUpdated). Will be two callbacks if the name is changed ((filterEventFilterRenamed)
- *
- */
- public void updateSystemFilter(ISystemFilter filter, String newName, String[] strings)
- 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.
+ * @return true if everything seems ok, false if a file/folder is in use.
+ */
+ public boolean preTestRenameFilterPool(ISystemFilterPool pool) 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.
- * @param parent The parent which is either a SystemFilterPool or a SystemFilter
- * @param type The type of this filter
- */
- public void setSystemFilterType(ISystemFilter filter, String newType)
- 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:
+ *
+ * - Renames referencing objects
+ *
- Renames pool object in the in-memory model
+ *
- Renames folder on disk for policies of one folder per pool
+ *
- Renames file on disk for policy of one file per pool
+ *
- Saves model to disk for policy of one file per manager
+ *
- Invalidates in-memory caches
+ *
+ * @param pool The filter pool object to physically rename
+ * @param newName The new name to give the pool
+ */
+ public void renameSystemFilterPool(ISystemFilterPool pool, String newName) throws Exception;
- /**
- * Copy a system filter to a pool in this or another filter manager.
- */
- public ISystemFilter copySystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName)
- throws Exception;
-
- /**
- * Return the zero-based position of a SystemFilter object within its container
- */
- public int getSystemFilterPosition(ISystemFilter filter);
+ /**
+ * Copy the specified filter pool from this manager to this manager or another manager.
+ *
+ * Does the following:
+ *
+ * - Clones all filters within the pool
+ *
- Clones all filter strings within each filter
+ *
- Asks target manager to save to disk
+ *
- Calls back to target manager provider, unless callbacks are suspended
+ *
+ * @param targetMgr The target manager to copy our filter pool to. Can be this manager, but target pool name must be unique.
+ * @param pool The filter pool to copy
+ * @param newName The new name to give the copied pool
+ * @return the new copy of the copied system filter pool
+ */
+ public ISystemFilterPool copySystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool pool, 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.
- */
- public ISystemFilter moveSystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName)
- 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:
- *
- * - After the move, the pool containing the filter is saved to disk.
- *
- Calls back to provider to inform of the event (filterEventFiltersRePositioned)
- *
- * @param filters Array of SystemFilters to move.
- * @param newPosition new zero-based position for the filters
- */
- public void moveSystemFilters(ISystemFilter filters[], int delta)
- throws Exception;
+ /**
+ * Copy all filter pools from this manager to another manager.
+ *
+ * Does the following:
+ *
+ * - Clones all filter pools
+ *
- Clones all filters within each pool
+ *
- Clones all filter strings within each filter
+ *
- Asks target manager to save to disk
+ *
- Does not callback to caller to fire events, assumes caller doesn't want to know
+ *
+ * @param targetMgr The target manager to copy our filter pools to
+ */
+ public void copySystemFilterPools(ISystemFilterPoolManager targetMgr) 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.
- */
- public void orderSystemFilters(ISystemFilterPool pool, String[] names) throws Exception;
+ /**
+ * Move the specified filter pool from this manager to another manager.
+ *
+ * Does the following:
+ *
+ * - Performs a {@link #copySystemFilterPool(ISystemFilterPoolManager, ISystemFilterPool, String) copySystemFilterPool} operation.
+ *
- If copy is successful, updates all references to reference the new copy.
+ *
- If copy is successful, deletes original filter pool in this manager
+ *
- If this final delete fails, deletes the copied version and restore original references
+ *
- Asks target manager to save to disk
+ *
- Saves this manager to disk
+ *
- Calls back to both targer manager provider and this manager provider, unless callbacks are suspended
+ *
+ * @param targetMgr The target manager to move our filter pool to. Cannot be this manager.
+ * @param oldPool The filter pool to move
+ * @param newName The new name to give the moved pool
+ * @return the new copy of the moved system filter pool
+ */
+ public ISystemFilterPool moveSystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool oldPool, String newName) throws Exception;
- // -------------------------------
- // SYSTEM FILTER STRING METHODS...
- // -------------------------------
- /**
- * 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.
- *
- Calls back to provider to inform it of this event (filterEventFilterStringCreated)
- *
- */
- public ISystemFilterString addSystemFilterString(ISystemFilter filter, String newString) throws Exception;
- /**
- * 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.
- *
- Calls back to provider to inform it of this event (filterEventFilterStringCreated)
- *
- */
- public ISystemFilterString addSystemFilterString(ISystemFilter filter, String newString, int position) throws Exception;
- /**
- * Remove a filter string from this filter's list, given its SystemFilterString object.
- *
- * Does the following:
- *
- * - Removes the filter string from the in-memory cache
- *
- Saves parent filter pool to disk.
- *
- Calls back to provider to inform it of this event (filterEventFilterStringDeleted)
- *
- * @return true if the given string existed and hence was deleted.
- */
- public boolean removeSystemFilterString(ISystemFilter filter, ISystemFilterString filterString) throws Exception;
- /**
- * 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.
- *
- Calls back to provider to inform it of this event (filterEventFilterStringDeleted)
- *
- * @return true if given string was found and hence was deleted.
- */
- public boolean removeSystemFilterString(ISystemFilter filter, String oldString) throws Exception;
- /**
- * 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.
- *
- Calls back to provider to inform it of this event (filterEventFilterStringDeleted)
- *
- * @return true if a string existed at the given position and hence was deleted.
- */
- public boolean removeSystemFilterString(ISystemFilter filter, int position) throws Exception;
- /**
- * 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.
- *
- Calls back to provider to inform it of this event (filterEventFilterStringUpdated)
- *
- */
- public void updateSystemFilterString(ISystemFilterString filterString, String newValue) throws Exception;
- /**
- * Return the zero-based position of a SystemFilterString object within its filter
- */
- public int getSystemFilterStringPosition(ISystemFilterString filterString);
- /**
- * Copy a system filter string to a filter in this or another filter pool manager.
- */
- public ISystemFilterString copySystemFilterString(ISystemFilter targetFilter, ISystemFilterString 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.
- */
- public ISystemFilterString moveSystemFilterString(ISystemFilter targetFilter, ISystemFilterString oldFilterString)
- 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:
- *
- * - After the move, the filter pool containing the filter containing the filter strings is saved to disk.
- *
- Calls back to provider to inform of the event (filterEventFilterStringsRePositioned)
- *
- * @param filterStrings Array of SystemFilterStrings to move.
- * @param newPosition new zero-based position for the filter strings
- */
- public void moveSystemFilterStrings(ISystemFilterString filterStrings[], int delta)
- throws Exception;
+ // ---------------------------------
+ // FILTER METHODS
+ // ---------------------------------
+ /**
+ * 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)
+ * @param parent The parent which is either a SystemFilterPool or a SystemFilter
+ * @param aliasName The name to give the new filter. Must be unique for this pool.
+ * @param filterStrings The list of String objects that represent the filter strings.
+ */
+ public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, Vector filterStrings) throws Exception;
- // -----------------------------------
- // SUSPEND/RESUME CALLBACKS METHODS...
- // -----------------------------------
- /**
- * Suspend callbacks to the provider
- */
- public void suspendCallbacks(boolean suspend);
+ /**
+ * Creates a new system filter that is typed.
+ * Same as {@link #createSystemFilter(ISystemFilterContainer, 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.
+ *
+ * @param parent The parent which is either a SystemFilterPool or a SystemFilter
+ * @param aliasName The name to give the new filter. Must be unique for this pool.
+ * @param filterStrings The list of String objects that represent the filter strings.
+ * @param type The type of this filter
+ */
+ public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, Vector filterStrings, String type) throws Exception;
-
+ /**
+ * Creates a new system filter that is typed and promptable
+ * Same as {@link #createSystemFilter(ISystemFilterContainer, 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.
+ *
+ * @param parent The parent which is either a SystemFilterPool or a SystemFilter
+ * @param aliasName The name to give the new filter. Must be unique for this pool.
+ * @param filterStrings The list of String objects that represent the filter strings.
+ * @param type The type of this filter
+ * @param promptable Pass true if this is a promptable filter
+ */
+ public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, Vector filterStrings, String type, boolean promptable) throws Exception;
- /**
+ /**
+ * Delete an existing system filter.
+ * Does the following:
+ *
+ * - Removes filter from its parent in memory.
+ *
- If appropriate for the save policy, deletes the filter's file from disk.
+ *
- Save the SystemFilterPool which direct or indirectly contains the filter.
+ *
- Calls back to provider to inform of the event (filterEventFilterDelete)
+ *
+ */
+ public boolean deleteSystemFilter(ISystemFilter filter) throws Exception;
+
+ /**
+ * Renames a filter. This is better than filter.setName(String newName) as it
+ * saves the parent pool to disk.
+ *
+ * Does the following:
+ *
+ * - Renames the object in the in-memory cache
+ *
- If appropriate for the save policy, rename's the filter's file on disk.
+ *
- Save parent filter pool's in-memory object to disk.
+ *
- Calls back to provider to inform of the event (filterEventFilterRenamed)
+ *
+ */
+ public void renameSystemFilter(ISystemFilter filter, String newName) throws Exception;
+
+ /**
+ * Updates a filter. This is better than doing it directly as it saves it to disk.
+ *
+ * Does the following:
+ *
+ * - Updates the object in the in-memory cache
+ *
- Save parent filter pool's in-memory object to disk.
+ *
- Calls back to provider to inform of the event (filterEventFilterUpdated). Will be two callbacks if the name is changed ((filterEventFilterRenamed)
+ *
+ */
+ public void updateSystemFilter(ISystemFilter filter, String newName, String[] strings) 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.
+ * @param filter The parent which is either a SystemFilter
+ * @param newType The type of this filter
+ */
+ public void setSystemFilterType(ISystemFilter filter, String newType) throws Exception;
+
+ /**
+ * Copy a system filter to a pool in this or another filter manager.
+ */
+ public ISystemFilter copySystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName) throws Exception;
+
+ /**
+ * Return the zero-based position of a SystemFilter object within its container
+ */
+ public int getSystemFilterPosition(ISystemFilter filter);
+
+ /**
+ * 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.
+ */
+ public ISystemFilter moveSystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName) 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:
+ *
+ * - After the move, the pool containing the filter is saved to disk.
+ *
- Calls back to provider to inform of the event (filterEventFiltersRePositioned)
+ *
+ * @param filters Array of SystemFilters to move.
+ * @param delta the amount by which to move the filters
+ */
+ public void moveSystemFilters(ISystemFilter filters[], int delta) 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.
+ */
+ public void orderSystemFilters(ISystemFilterPool pool, String[] names) throws Exception;
+
+ // -------------------------------
+ // SYSTEM FILTER STRING METHODS...
+ // -------------------------------
+ /**
+ * 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.
+ *
- Calls back to provider to inform it of this event (filterEventFilterStringCreated)
+ *
+ */
+ public ISystemFilterString addSystemFilterString(ISystemFilter filter, String newString) throws Exception;
+
+ /**
+ * 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.
+ *
- Calls back to provider to inform it of this event (filterEventFilterStringCreated)
+ *
+ */
+ public ISystemFilterString addSystemFilterString(ISystemFilter filter, String newString, int position) throws Exception;
+
+ /**
+ * Remove a filter string from this filter's list, given its SystemFilterString object.
+ *
+ * Does the following:
+ *
+ * - Removes the filter string from the in-memory cache
+ *
- Saves parent filter pool to disk.
+ *
- Calls back to provider to inform it of this event (filterEventFilterStringDeleted)
+ *
+ * @return true if the given string existed and hence was deleted.
+ */
+ public boolean removeSystemFilterString(ISystemFilter filter, ISystemFilterString filterString) throws Exception;
+
+ /**
+ * 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.
+ *
- Calls back to provider to inform it of this event (filterEventFilterStringDeleted)
+ *
+ * @return true if given string was found and hence was deleted.
+ */
+ public boolean removeSystemFilterString(ISystemFilter filter, String oldString) throws Exception;
+
+ /**
+ * 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.
+ *
- Calls back to provider to inform it of this event (filterEventFilterStringDeleted)
+ *
+ * @return true if a string existed at the given position and hence was deleted.
+ */
+ public boolean removeSystemFilterString(ISystemFilter filter, int position) throws Exception;
+
+ /**
+ * 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.
+ *
- Calls back to provider to inform it of this event (filterEventFilterStringUpdated)
+ *
+ */
+ public void updateSystemFilterString(ISystemFilterString filterString, String newValue) throws Exception;
+
+ /**
+ * Return the zero-based position of a SystemFilterString object within its filter
+ */
+ public int getSystemFilterStringPosition(ISystemFilterString filterString);
+
+ /**
+ * Copy a system filter string to a filter in this or another filter pool manager.
+ */
+ public ISystemFilterString copySystemFilterString(ISystemFilter targetFilter, ISystemFilterString 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.
+ */
+ public ISystemFilterString moveSystemFilterString(ISystemFilter targetFilter, ISystemFilterString oldFilterString) 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:
+ *
+ * - After the move, the filter pool containing the filter containing the filter strings is saved to disk.
+ *
- Calls back to provider to inform of the event (filterEventFilterStringsRePositioned)
+ *
+ * @param filterStrings Array of SystemFilterStrings to move.
+ * @param delta the amount by which to move the filters
+ */
+ public void moveSystemFilterStrings(ISystemFilterString filterStrings[], int delta) throws Exception;
+
+ // -----------------------------------
+ // SUSPEND/RESUME CALLBACKS METHODS...
+ // -----------------------------------
+ /**
+ * Suspend callbacks to the provider
+ */
+ public void suspendCallbacks(boolean suspend);
+
+ /**
* @generated This field/method will be replaced during code generation
* @return The value of the SupportsNestedFilters attribute
*/
@@ -615,9 +605,6 @@ public interface ISystemFilterPoolManager extends IRSEPersistableContainer
*
* @return the value of the 'Single Filter String Only' attribute.
* @see #setSingleFilterStringOnly(boolean)
- * @see org.eclipse.rse.filters.FiltersPackage#getSystemFilterPoolManager_SingleFilterStringOnly()
- * @model
- * @generated
*/
boolean isSingleFilterStringOnly();