Remote Systems
v6.4.1

com.ibm.etools.systems.filters.impl
Class SystemFilterPoolReferenceManagerImpl

java.lang.Object
  extended byEObjectImpl
      extended bycom.ibm.etools.systems.references.impl.SystemPersistableReferenceManagerImpl
          extended bycom.ibm.etools.systems.filters.impl.SystemFilterPoolReferenceManagerImpl
All Implemented Interfaces:
SystemFilterPoolReferenceManager, SystemPersistableReferenceManager

public class SystemFilterPoolReferenceManagerImpl
extends SystemPersistableReferenceManagerImpl
implements SystemFilterPoolReferenceManager, SystemPersistableReferenceManager

See Also:
Serialized Form

Field Summary
static String copyright
           
 
Fields inherited from class com.ibm.etools.systems.references.impl.SystemPersistableReferenceManagerImpl
debug, EMPTY_MAP, name, NAME_EDEFAULT, referencingObjectList
 
Constructor Summary
protected SystemFilterPoolReferenceManagerImpl()
          Default constructor.
 
Method Summary
 SystemFilterPoolReference addReferenceToSystemFilterPool(SystemFilterPool filterPool)
          Given a filter pool, create a referencing object and add it to the list.
 int addSystemFilterPoolReference(SystemFilterPoolReference filterPoolReference)
          Add a filter pool referencing object to the list.
protected static SystemFilterPoolReferenceManagerImpl createManager()
           
 SystemFilterPoolReference createSystemFilterPoolReference(SystemFilterPool filterPool)
          Create a filter pool referencing object, but do NOT add it to the list, do NOT call back.
static SystemFilterPoolReferenceManager createSystemFilterPoolReferenceManager(SystemFilterPoolReferenceManagerProvider caller, SystemFilterPoolManagerProvider relatedPoolManagerProvider, IFolder mgrFolder, String name, int savePolicy, SystemFilterNamingPolicy namingPolicy)
          Create a SystemFilterPoolReferenceManager instance.
 Object eGet(EStructuralFeature eFeature, boolean resolve)
           
 NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs)
           
 NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs)
           
 boolean eIsSet(EStructuralFeature eFeature)
           
 void eSet(EStructuralFeature eFeature, Object newValue)
           
protected  EClass eStaticClass()
           
 void eUnset(EStructuralFeature eFeature)
           
 SystemFilterPoolManager[] getAdditionalSystemFilterPoolManagers()
          Get the managers of the master list of filter pools, from which objects in this list reference, but which are not in the list of managers our pool manager supplier gives us.
 SystemFilterPoolManager getDefaultSystemFilterPoolManager()
          Get the default manager of the master list of filter pools, from which objects in this list reference.
static SystemFilterPool getFilterPool(SystemFilterPoolManager[] mgrs, String mgrName, String poolName)
          Utility method to scan across all filter pools in a given named filter pool manager, for a match on a given filter pool name.
static SystemFilterPoolManager getFilterPoolManager(SystemFilterPoolManager[] mgrs, String mgrName)
          Utility method to scan across all filter pool managers for a match on a give name.
 IFolder getFolder()
          Return the folder that this manager is contained in.
 String getFolderPath()
          Return the path of the folder
static String getFolderPath(IFolder folder)
          Return the path of the given folder
 SystemFilterNamingPolicy getNamingPolicy()
          Get the naming policy currently used when saving data to disk.
 SystemFilterPoolReferenceManagerProvider getProvider()
          Get the object which instantiated this instance of the filter pool reference manager.
 SystemFilterPool[] getReferencedSystemFilterPools()
          Return array of filter pools currently referenced by this manager Result will never be null, although it may be an array of length zero.
 SystemFilterPoolReference getReferenceToSystemFilterPool(SystemFilterPool filterPool)
          Given a filter pool, locate the referencing object for it and return it.
protected  String getSaveFileName()
          non-static version.
protected static String getSaveFileName(String fileNameNoSuffix)
          Derive and return the unqualified file name used to store this to disk.
protected  String getSaveFilePathAndName()
          non-static version.
protected static String getSaveFilePathAndName(IFolder mgrFolder, String name, SystemFilterNamingPolicy namingPolicy)
          If saving all info in one file, this returns the fully qualified name of that file, given the unadorned manager name and the prefix (if any) to adorn with.
 SystemFilterPoolManagerProvider getSystemFilterPoolManagerProvider()
          Get the associated master pool manager provider.
 SystemFilterPoolManager[] getSystemFilterPoolManagers()
          Get the managers of the master list of filter pools, from which objects in this list reference.
 int getSystemFilterPoolReferenceCount()
          Return count of referenced filter pools
 Object getSystemFilterPoolReferenceManagerData()
          Return transient data set via setFilterPoolData.
 int getSystemFilterPoolReferencePosition(SystemFilterPoolReference filterPoolRef)
          Return the zero-based position of a SystemFilterPoolReference object within this list
 SystemFilterPoolReference[] getSystemFilterPoolReferences()
          Return array of SystemFilterPoolReference objects.
 SystemFilterReference getSystemFilterReference(SystemFilter filter)
          Create a single filter refererence to a given filter.
 int getSystemFilterReferencePosition(SystemFilter filter)
          Given a filter, return its position within this reference manager when you think of all filter references from all filter pool references as being concatenated
 int getSystemFilterReferencePosition(SystemFilterReference filterRef)
          Given a filter reference, return its position within this reference manager when you think of all filter references from all filter pool references as being concatenated
 SystemFilterReference[] getSystemFilterReferences()
          Concatenate all filter references from all filter pools we reference, into one big list.
protected  void initialize(SystemFilterPoolReferenceManagerProvider caller, IFolder folder, String name, int savePolicy, SystemFilterNamingPolicy namingPolicy)
           
protected  void initialize(SystemFilterPoolReferenceManagerProvider caller, IFolder folder, String name, int savePolicy, SystemFilterNamingPolicy namingPolicy, SystemFilterPoolManagerProvider relatedPoolManagerProvider)
           
 boolean isSystemFilterPoolReferenced(SystemFilterPool filterPool)
          Return true if the given filter pool has a referencing object in this list.
 void moveSystemFilterPoolReference(SystemFilterPoolReference filterPoolRef, int pos)
          Move a given filter pool reference to a given zero-based location Calls back to inform provider of the event
 void moveSystemFilterPoolReferences(SystemFilterPoolReference[] filterPoolRefs, int delta)
          Move existing filter pool references a given number of positions.
 void regenerateReferencedSystemFilterPoolNames()
          Ask each referenced pool for its name, and update it.
 int removeReferenceToSystemFilterPool(SystemFilterPool filterPool)
          Given a filter pool, locate the referencing object for it and remove it from the list.
 int removeSystemFilterPoolReference(SystemFilterPoolReference filterPoolReference, boolean deReference)
          Remove a filter pool referencing object from the list.
 void renameReferenceToSystemFilterPool(SystemFilterPool pool)
          A reference filter pool has been renamed.
 void resetManagerFolder(IFolder newFolder)
          Reset the folder that this manager is contained in.
 void resetSystemFilterPoolReference(SystemFilterPoolReference filterPoolReference, SystemFilterPool newPool)
          Reset the filter pool a reference points to.
 Vector resolveReferencesAfterRestore(SystemFilterPoolManagerProvider relatedPoolMgrProvider, SystemFilterPoolReferenceManagerProvider provider)
          After restoring this from disk, there is only the referenced object name, not the referenced object pointer, for each referencing object.
static SystemFilterPoolReferenceManager restore(SystemFilterPoolReferenceManagerProvider caller, IFolder mgrFolder, String name)
          Restore the filter pools from disk, assuming default for prefix of name.
static SystemFilterPoolReferenceManager restore(SystemFilterPoolReferenceManagerProvider caller, IFolder mgrFolder, String name, SystemFilterNamingPolicy namingPolicy)
          Restore the filter pools from disk.
protected static SystemFilterPoolReferenceManager restoreFromOneFile(IFolder mgrFolder, String name, SystemFilterNamingPolicy namingPolicy)
          Restore filter pools when all are stored in one file
 void save()
          Save all the filter pools to disk.
protected  boolean saveToOneFile()
          Save this reference manager to disk.
 void setDefaultSystemFilterPoolManager(SystemFilterPoolManager mgr)
          Set the default manager of the master list of filter pools, from which objects in this list reference.
 void setName(String name)
          Set the name.
 void setNamingPolicy(SystemFilterNamingPolicy namingPolicy)
          Set the naming policy used when saving data to disk.
 void setProvider(SystemFilterPoolReferenceManagerProvider caller)
          Set the object which instantiated this instance of the filter pool reference manager.
 void setProviderEventNotification(boolean fireEvents)
          Turn off callbacks to the provider until turned on again.
 void setSystemFilterPoolManagerProvider(SystemFilterPoolManagerProvider poolMgrProvider)
          Set the associated master pool manager provider.
 void setSystemFilterPoolReferenceManagerData(Object data)
          This is to set transient data that is subsequently queryable.
 void setSystemFilterPoolReferences(SystemFilterPool[] filterPools, boolean deReference)
          In one shot, set the filter pool references to new references to supplied filter pools.
 void setSystemFilterPoolReferences(SystemFilterPoolReference[] filterPoolReferences, boolean deReference)
          In one shot, set the filter pool references Calls back to inform provider
 String toString()
          Return string identifying this filter
 
Methods inherited from class com.ibm.etools.systems.references.impl.SystemPersistableReferenceManagerImpl
addPathTerminator, addReferencingObject, getName, getReferencedObject, getReferencingObjectCount, getReferencingObjectList, getReferencingObjectPosition, getReferencingObjects, initMOF, internalGetList, invalidateCache, isReferenced, moveReferencingObjectPosition, removeAllReferencingObjects, removeAndDeReferenceAllReferencingObjects, removeAndDeReferenceReferencingObject, removeReferencingObject, resolveReferencesAfterRestore, restore, save, setReferencingObjects, toStringGen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.etools.systems.references.SystemPersistableReferenceManager
addReferencingObject, getName, getReferencedObject, getReferencingObjectCount, getReferencingObjectList, getReferencingObjectPosition, getReferencingObjects, isReferenced, moveReferencingObjectPosition, removeAllReferencingObjects, removeAndDeReferenceAllReferencingObjects, removeAndDeReferenceReferencingObject, removeReferencingObject, resolveReferencesAfterRestore, save, setReferencingObjects
 

Field Detail

copyright

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

SystemFilterPoolReferenceManagerImpl

protected SystemFilterPoolReferenceManagerImpl()
Default constructor. Typically called by MOF factory methods.

Method Detail

eStaticClass

protected EClass eStaticClass()

Overrides:
eStaticClass in class SystemPersistableReferenceManagerImpl

eInverseAdd

public NotificationChain eInverseAdd(InternalEObject otherEnd,
                                     int featureID,
                                     Class baseClass,
                                     NotificationChain msgs)

Overrides:
eInverseAdd in class SystemPersistableReferenceManagerImpl

eInverseRemove

public NotificationChain eInverseRemove(InternalEObject otherEnd,
                                        int featureID,
                                        Class baseClass,
                                        NotificationChain msgs)

Overrides:
eInverseRemove in class SystemPersistableReferenceManagerImpl

eGet

public Object eGet(EStructuralFeature eFeature,
                   boolean resolve)

Overrides:
eGet in class SystemPersistableReferenceManagerImpl

eSet

public void eSet(EStructuralFeature eFeature,
                 Object newValue)

Overrides:
eSet in class SystemPersistableReferenceManagerImpl

eUnset

public void eUnset(EStructuralFeature eFeature)

Overrides:
eUnset in class SystemPersistableReferenceManagerImpl

eIsSet

public boolean eIsSet(EStructuralFeature eFeature)

Overrides:
eIsSet in class SystemPersistableReferenceManagerImpl

createSystemFilterPoolReferenceManager

public static SystemFilterPoolReferenceManager createSystemFilterPoolReferenceManager(SystemFilterPoolReferenceManagerProvider caller,
                                                                                      SystemFilterPoolManagerProvider relatedPoolManagerProvider,
                                                                                      IFolder mgrFolder,
                                                                                      String name,
                                                                                      int savePolicy,
                                                                                      SystemFilterNamingPolicy namingPolicy)
Create a SystemFilterPoolReferenceManager instance.

Parameters:
caller - Objects which instantiate this class should implement the SystemFilterPoolReferenceManagerProvider interface, and pass "this" for this parameter. Given any filter framework object, it is possible to retrieve the caller's object via the getProvider method call.
mgrFolder - the folder that will hold the persisted file. This is used when the save policy is SAVE_POLICY_ONE_FILE_PER_MANAGER. For SAVE_POLICY_NONE, this is not used. If it is used, it is created if it does not already exist.
name - the name of the filter pool reference manager. This is used when the save policy is SAVE_POLICY_ONE_FILE_PER_MANAGER, to deduce the file name.
savePolicy - The save policy for the filter pool references list. One of the following from the SystemFilterConstants interface:
  • SAVE_POLICY_NONE - no files, all save/restore handled elsewhere
  • SAVE_POLICY_ONE_FILE_PER_MANAGER - one file: mgrName.xmi
namingPolicy - The names to use for file and folders when persisting to disk. Pass null to just use the defaults, or if using SAVE_POLICY_NONE.

createManager

protected static SystemFilterPoolReferenceManagerImpl createManager()

initialize

protected void initialize(SystemFilterPoolReferenceManagerProvider caller,
                          IFolder folder,
                          String name,
                          int savePolicy,
                          SystemFilterNamingPolicy namingPolicy,
                          SystemFilterPoolManagerProvider relatedPoolManagerProvider)

initialize

protected void initialize(SystemFilterPoolReferenceManagerProvider caller,
                          IFolder folder,
                          String name,
                          int savePolicy,
                          SystemFilterNamingPolicy namingPolicy)

setSystemFilterPoolManagerProvider

public void setSystemFilterPoolManagerProvider(SystemFilterPoolManagerProvider poolMgrProvider)
Set the associated master pool manager provider. Note the provider typically manages multiple pool managers and we manage references across those.

Specified by:
setSystemFilterPoolManagerProvider in interface SystemFilterPoolReferenceManager

getSystemFilterPoolManagerProvider

public SystemFilterPoolManagerProvider getSystemFilterPoolManagerProvider()
Get the associated master pool manager provider. Note the provider typically manages multiple pool managers and we manage references across those.

Specified by:
getSystemFilterPoolManagerProvider in interface SystemFilterPoolReferenceManager

getSystemFilterPoolManagers

public SystemFilterPoolManager[] getSystemFilterPoolManagers()
Get the managers of the master list of filter pools, from which objects in this list reference.

Specified by:
getSystemFilterPoolManagers in interface SystemFilterPoolReferenceManager

getAdditionalSystemFilterPoolManagers

public SystemFilterPoolManager[] getAdditionalSystemFilterPoolManagers()
Get the managers of the master list of filter pools, from which objects in this list reference, but which are not in the list of managers our pool manager supplier gives us. That is, these are references to filter pools outside the expected list.

Specified by:
getAdditionalSystemFilterPoolManagers in interface SystemFilterPoolReferenceManager
Returns:
null if no unmatched managers found, else an array of such managers.

setDefaultSystemFilterPoolManager

public void setDefaultSystemFilterPoolManager(SystemFilterPoolManager mgr)
Set the default manager of the master list of filter pools, from which objects in this list reference.

Specified by:
setDefaultSystemFilterPoolManager in interface SystemFilterPoolReferenceManager

getDefaultSystemFilterPoolManager

public SystemFilterPoolManager getDefaultSystemFilterPoolManager()
Get the default manager of the master list of filter pools, from which objects in this list reference.

Specified by:
getDefaultSystemFilterPoolManager in interface SystemFilterPoolReferenceManager

getProvider

public SystemFilterPoolReferenceManagerProvider getProvider()
Get the object which instantiated this instance of the filter pool reference manager. This is also available from any filter reference framework object.

Specified by:
getProvider in interface SystemFilterPoolReferenceManager

setProvider

public void setProvider(SystemFilterPoolReferenceManagerProvider caller)
Set the object which instantiated this instance of the filter pool reference manager. This makes it available to retrieve from any filter reference framework object, via the ubiquitous getProvider interface method.

Specified by:
setProvider in interface SystemFilterPoolReferenceManager

setProviderEventNotification

public void setProviderEventNotification(boolean fireEvents)
Turn off callbacks to the provider until turned on again.

Specified by:
setProviderEventNotification in interface SystemFilterPoolReferenceManager

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

setSystemFilterPoolReferenceManagerData

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


getSystemFilterPoolReferenceManagerData

public Object getSystemFilterPoolReferenceManagerData()
Return transient data set via setFilterPoolData.


setName

public void setName(String name)
Set the name. This is an override of mof-generated method in order to potentially rename the disk file for a save policy of SAVE_POLICY_ONE_FILE_PER_MANAGER.

Specified by:
setName in interface SystemPersistableReferenceManager
Overrides:
setName in class SystemPersistableReferenceManagerImpl

regenerateReferencedSystemFilterPoolNames

public void regenerateReferencedSystemFilterPoolNames()
Ask each referenced pool for its name, and update it. Called after the name of the pool or its manager changes.

Specified by:
regenerateReferencedSystemFilterPoolNames in interface SystemFilterPoolReferenceManager

getSystemFilterPoolReferences

public SystemFilterPoolReference[] getSystemFilterPoolReferences()
Return array of SystemFilterPoolReference objects. Result will never be null, although it may be an array of length zero.

Specified by:
getSystemFilterPoolReferences in interface SystemFilterPoolReferenceManager

setSystemFilterPoolReferences

public void setSystemFilterPoolReferences(SystemFilterPoolReference[] filterPoolReferences,
                                          boolean deReference)
In one shot, set the filter pool references

Calls back to inform provider

Specified by:
setSystemFilterPoolReferences in interface SystemFilterPoolReferenceManager
Parameters:
deReference - true to first de-reference all objects in the existing list.

createSystemFilterPoolReference

public SystemFilterPoolReference createSystemFilterPoolReference(SystemFilterPool filterPool)
Create a filter pool referencing object, but do NOT add it to the list, do NOT call back.

Specified by:
createSystemFilterPoolReference in interface SystemFilterPoolReferenceManager

addSystemFilterPoolReference

public int addSystemFilterPoolReference(SystemFilterPoolReference filterPoolReference)
Add a filter pool referencing object to the list.

Specified by:
addSystemFilterPoolReference in interface SystemFilterPoolReferenceManager
Returns:
the new count of referencing objects

resetSystemFilterPoolReference

public void resetSystemFilterPoolReference(SystemFilterPoolReference filterPoolReference,
                                           SystemFilterPool newPool)
Reset the filter pool a reference points to. Called on a move-filter-pool operation

Specified by:
resetSystemFilterPoolReference in interface SystemFilterPoolReferenceManager

removeSystemFilterPoolReference

public int removeSystemFilterPoolReference(SystemFilterPoolReference filterPoolReference,
                                           boolean deReference)
Remove a filter pool referencing object from the list.

Specified by:
removeSystemFilterPoolReference in interface SystemFilterPoolReferenceManager
Parameters:
deReference - true if we want to dereference the referenced object (call removeReference on it)
Returns:
the new count of referencing objects

getSystemFilterPoolReferenceCount

public int getSystemFilterPoolReferenceCount()
Return count of referenced filter pools

Specified by:
getSystemFilterPoolReferenceCount in interface SystemFilterPoolReferenceManager

getSystemFilterPoolReferencePosition

public int getSystemFilterPoolReferencePosition(SystemFilterPoolReference filterPoolRef)
Return the zero-based position of a SystemFilterPoolReference object within this list

Specified by:
getSystemFilterPoolReferencePosition in interface SystemFilterPoolReferenceManager

moveSystemFilterPoolReference

public void moveSystemFilterPoolReference(SystemFilterPoolReference filterPoolRef,
                                          int pos)
Move a given filter pool reference to a given zero-based location Calls back to inform provider of the event

Specified by:
moveSystemFilterPoolReference in interface SystemFilterPoolReferenceManager

moveSystemFilterPoolReferences

public void moveSystemFilterPoolReferences(SystemFilterPoolReference[] filterPoolRefs,
                                           int delta)
Move existing filter pool references a given number of positions. 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.

Calls back to inform provider

Specified by:
moveSystemFilterPoolReferences in interface SystemFilterPoolReferenceManager
Parameters:
filterPoolRefs - Array of SystemFilterPoolReferences to move.

getReferencedSystemFilterPools

public SystemFilterPool[] getReferencedSystemFilterPools()
Return array of filter pools currently referenced by this manager Result will never be null, although it may be an array of length zero.

Specified by:
getReferencedSystemFilterPools in interface SystemFilterPoolReferenceManager

isSystemFilterPoolReferenced

public boolean isSystemFilterPoolReferenced(SystemFilterPool filterPool)
Return true if the given filter pool has a referencing object in this list.

Specified by:
isSystemFilterPoolReferenced in interface SystemFilterPoolReferenceManager

getReferenceToSystemFilterPool

public SystemFilterPoolReference getReferenceToSystemFilterPool(SystemFilterPool filterPool)
Given a filter pool, locate the referencing object for it and return it.

Specified by:
getReferenceToSystemFilterPool in interface SystemFilterPoolReferenceManager
Returns:
the referencing object if found, else null

addReferenceToSystemFilterPool

public SystemFilterPoolReference addReferenceToSystemFilterPool(SystemFilterPool filterPool)
Given a filter pool, create a referencing object and add it to the list. Also add that reference to the filterPool itself, and calls back to provider when done.

Specified by:
addReferenceToSystemFilterPool in interface SystemFilterPoolReferenceManager
Parameters:
filterPool - what to reference
Returns:
the new reference object

removeReferenceToSystemFilterPool

public int removeReferenceToSystemFilterPool(SystemFilterPool filterPool)
Given a filter pool, locate the referencing object for it and remove it from the list. Also removes that reference from the filterPool itself, and calls back to provider when done.

Specified by:
removeReferenceToSystemFilterPool in interface SystemFilterPoolReferenceManager
Returns:
the new count of referencing objects

renameReferenceToSystemFilterPool

public void renameReferenceToSystemFilterPool(SystemFilterPool pool)
A reference filter pool has been renamed. Update our stored name...

Calls back to inform provider

Specified by:
renameReferenceToSystemFilterPool in interface SystemFilterPoolReferenceManager

setSystemFilterPoolReferences

public void setSystemFilterPoolReferences(SystemFilterPool[] filterPools,
                                          boolean deReference)
In one shot, set the filter pool references to new references to supplied filter pools.

Specified by:
setSystemFilterPoolReferences in interface SystemFilterPoolReferenceManager
Parameters:
deReference - true to first de-reference all objects in the existing list.

getSystemFilterReference

public SystemFilterReference getSystemFilterReference(SystemFilter filter)
Create a single filter refererence to a given filter. Needed when a filter is added to a pool, and the GUI is not showing pools but rather all filters in all pool references.

Specified by:
getSystemFilterReference in interface SystemFilterPoolReferenceManager

getSystemFilterReferences

public SystemFilterReference[] getSystemFilterReferences()
Concatenate all filter references from all filter pools we reference, into one big list.

Specified by:
getSystemFilterReferences in interface SystemFilterPoolReferenceManager

getSystemFilterReferencePosition

public int getSystemFilterReferencePosition(SystemFilterReference filterRef)
Given a filter reference, return its position within this reference manager when you think of all filter references from all filter pool references as being concatenated

Specified by:
getSystemFilterReferencePosition in interface SystemFilterPoolReferenceManager

getSystemFilterReferencePosition

public int getSystemFilterReferencePosition(SystemFilter filter)
Given a filter, return its position within this reference manager when you think of all filter references from all filter pool references as being concatenated

Specified by:
getSystemFilterReferencePosition in interface SystemFilterPoolReferenceManager

save

public void save()
          throws Exception
Save all the filter pools to disk. Only called if the save policy is not none.

Specified by:
save in interface SystemFilterPoolReferenceManager
Throws:
Exception

saveToOneFile

protected boolean saveToOneFile()
                         throws Exception
Save this reference manager to disk.

Throws:
Exception

restore

public static SystemFilterPoolReferenceManager restore(SystemFilterPoolReferenceManagerProvider caller,
                                                       IFolder mgrFolder,
                                                       String name,
                                                       SystemFilterNamingPolicy namingPolicy)
                                                throws Exception
Restore the filter pools from disk. After restoration, you must call resolveReferencesAfterRestore!

Parameters:
caller - The object that is calling this, which must implement SystemFilterPoolReferenceManagerProvider
mgrFolder - folder containing filter pool references file.
name - the name of the manager to restore. File name is derived from it when saving to one file.
namingPolicy - to get file name prefix, via getFilterPoolReferenceManagerFileNamePrefix(). Pass null to use default.
Returns:
the restored manager, or null if it does not exist. If anything else went wrong, an exception is thrown.
Throws:
Exception

restore

public static SystemFilterPoolReferenceManager restore(SystemFilterPoolReferenceManagerProvider caller,
                                                       IFolder mgrFolder,
                                                       String name)
                                                throws Exception
Restore the filter pools from disk, assuming default for prefix of name.

Throws:
Exception

restoreFromOneFile

protected static SystemFilterPoolReferenceManager restoreFromOneFile(IFolder mgrFolder,
                                                                     String name,
                                                                     SystemFilterNamingPolicy namingPolicy)
                                                              throws Exception
Restore filter pools when all are stored in one file

Parameters:
mgrFolder - The folder containing the file to restore from.
name - The name of the manager, from which the file name is derived.
namingPolicy - Naming prefix information for persisted data file names.
Throws:
Exception

resolveReferencesAfterRestore

public Vector resolveReferencesAfterRestore(SystemFilterPoolManagerProvider relatedPoolMgrProvider,
                                            SystemFilterPoolReferenceManagerProvider provider)
After restoring this from disk, there is only the referenced object name, not the referenced object pointer, for each referencing object.

This method is called after restore and for each restored object in the list must:

  1. Do what is necessary to find the referenced object, and set the internal reference pointer.
  2. Call addReference(this) on that object so it can maintain it's in-memory list of all referencing objects.
  3. Set the important transient variables

Specified by:
resolveReferencesAfterRestore in interface SystemFilterPoolReferenceManager
Parameters:
provider - the host of this reference manager, so you can later call getProvider
Returns:
A Vector of SystemFilterPoolReferences that were not successfully resolved, or null if all were resolved.

getFilterPool

public static SystemFilterPool getFilterPool(SystemFilterPoolManager[] mgrs,
                                             String mgrName,
                                             String poolName)
Utility method to scan across all filter pools in a given named filter pool manager, for a match on a given filter pool name.

Parameters:
mgrs - The list of filter pool managers to scan for the given filter pool.
mgrName - The name of the manager to restrict the search to

getFilterPoolManager

public static SystemFilterPoolManager getFilterPoolManager(SystemFilterPoolManager[] mgrs,
                                                           String mgrName)
Utility method to scan across all filter pool managers for a match on a give name.

Parameters:
mgrs - The list of filter pool managers to scan for the given name
mgrName - The name of the manager to restrict the search to

getSaveFilePathAndName

protected static String getSaveFilePathAndName(IFolder mgrFolder,
                                               String name,
                                               SystemFilterNamingPolicy namingPolicy)
If saving all info in one file, this returns the fully qualified name of that file, given the unadorned manager name and the prefix (if any) to adorn with.


getSaveFileName

protected static String getSaveFileName(String fileNameNoSuffix)
Derive and return the unqualified file name used to store this to disk. It is unqualified.


getSaveFilePathAndName

protected String getSaveFilePathAndName()
non-static version.


getSaveFileName

protected String getSaveFileName()
non-static version.


getFolder

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

Specified by:
getFolder in interface SystemFilterPoolReferenceManager

resetManagerFolder

public void resetManagerFolder(IFolder newFolder)
Reset the folder that this manager is contained in.

Specified by:
resetManagerFolder in interface SystemFilterPoolReferenceManager

getFolderPath

public String getFolderPath()
Return the path of the folder


getFolderPath

public static String getFolderPath(IFolder folder)
Return the path of the given folder


toString

public String toString()
Description copied from class: SystemPersistableReferenceManagerImpl
Return string identifying this filter

Overrides:
toString in class SystemPersistableReferenceManagerImpl

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.