|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.rse.internal.references.SystemPersistableReferenceManager
org.eclipse.rse.filters.SystemFilterPoolReferenceManager
| Field Summary |
|---|
| Fields inherited from class org.eclipse.rse.internal.references.SystemPersistableReferenceManager |
|---|
debug, EMPTY_MAP, name, NAME_EDEFAULT, referencingObjectList |
| Constructor Summary | |
|---|---|
SystemFilterPoolReferenceManager()
Default constructor. |
|
| Method Summary | |
|---|---|
ISystemFilterPoolReference |
addReferenceToSystemFilterPool(ISystemFilterPool filterPool)
Given a filter pool, create a referencing object and add it to the list. |
ISystemFilterPoolReference |
addReferenceToSystemFilterPool(ISystemFilterPoolManager filterPoolManager,
String filterPoolName)
Given a filter pool name, create a referencing object and add it to the list. |
int |
addSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference)
Add a filter pool referencing object to the list. |
protected static SystemFilterPoolReferenceManager |
createManager()
|
static ISystemFilterPoolReferenceManager |
createSystemFilterPoolReferenceManager(ISystemFilterPoolReferenceManagerProvider caller,
ISystemFilterPoolManagerProvider relatedPoolManagerProvider,
IFolder mgrFolder,
String name,
int savePolicy,
IRSEFilterNamingPolicy namingPolicy)
A factory method to create a SystemFilterPoolReferenceManager instance. |
ISystemFilterPoolManager[] |
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. |
ISystemFilterPoolManager |
getDefaultSystemFilterPoolManager()
Get the default manager of the master list of filter pools, from which objects in this list reference. |
static ISystemFilterPool |
getFilterPool(ISystemFilterPoolManager[] 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 ISystemFilterPoolManager |
getFilterPoolManager(ISystemFilterPoolManager[] 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()
|
static String |
getFolderPath(IFolder folder)
|
IRSEFilterNamingPolicy |
getNamingPolicy()
Get the naming policy currently used when saving data to disk. |
ISystemFilterPoolReferenceManagerProvider |
getProvider()
Get the object which instantiated this instance of the filter pool reference manager. |
ISystemFilterPool[] |
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. |
ISystemFilterPoolReference |
getReferenceToSystemFilterPool(ISystemFilterPool filterPool)
Given a filter pool, locate the referencing object for it and return it. |
protected String |
getSaveFileName()
|
protected static String |
getSaveFileName(String fileNameNoSuffix)
Appends the correct extension to the file name where this manager is saved. |
protected String |
getSaveFilePathAndName()
|
protected static String |
getSaveFilePathAndName(IFolder mgrFolder,
String name,
IRSEFilterNamingPolicy 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. |
ISystemFilterPoolManagerProvider |
getSystemFilterPoolManagerProvider()
Get the associated master pool manager provider. |
ISystemFilterPoolManager[] |
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()
|
int |
getSystemFilterPoolReferencePosition(ISystemFilterPoolReference filterPoolRef)
Return the zero-based position of a SystemFilterPoolReference object within this list |
ISystemFilterPoolReference[] |
getSystemFilterPoolReferences()
Return array of SystemFilterPoolReference objects. |
ISystemFilterReference |
getSystemFilterReference(ISubSystem subSystem,
ISystemFilter filter)
Create a single filter refererence to a given filter. |
int |
getSystemFilterReferencePosition(ISubSystem subSystem,
ISystemFilter 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(ISystemFilterReference 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. |
ISystemFilterReference[] |
getSystemFilterReferences(ISubSystem subSystem)
Concatenate all filter references from all filter pools we reference, into one big list. |
protected void |
initialize(ISystemFilterPoolReferenceManagerProvider caller,
IFolder folder,
String name,
int savePolicy,
IRSEFilterNamingPolicy namingPolicy)
|
protected void |
initialize(ISystemFilterPoolReferenceManagerProvider caller,
IFolder folder,
String name,
int savePolicy,
IRSEFilterNamingPolicy namingPolicy,
ISystemFilterPoolManagerProvider relatedPoolManagerProvider)
|
boolean |
isSystemFilterPoolReferenced(ISystemFilterPool filterPool)
Return true if the given filter pool has a referencing object in this list. |
void |
moveSystemFilterPoolReference(ISystemFilterPoolReference filterPoolRef,
int pos)
Move a given filter pool reference to a given zero-based location. |
void |
moveSystemFilterPoolReferences(ISystemFilterPoolReference[] 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(ISystemFilterPool filterPool)
Given a filter pool, locate the referencing object for it and remove it from the list. |
int |
removeSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference,
boolean deReference)
Remove a filter pool referencing object from the list. |
void |
renameReferenceToSystemFilterPool(ISystemFilterPool pool)
A referenced filter pool has been renamed. |
void |
resetManagerFolder(IFolder newFolder)
Set the folder that this manager is contained in. |
void |
resetSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference,
ISystemFilterPool newPool)
Reset the filter pool a reference points to. |
Vector |
resolveReferencesAfterRestore(ISystemFilterPoolManagerProvider relatedPoolMgrProvider,
ISystemFilterPoolReferenceManagerProvider provider)
After restoring this from disk, there is only the referenced object name, not the referenced object pointer, for each referencing object. |
static ISystemFilterPoolReferenceManager |
restore(ISystemFilterPoolReferenceManagerProvider caller,
IFolder mgrFolder,
String name)
Restore the filter pools from disk, assuming default for a naming policy. |
static ISystemFilterPoolReferenceManager |
restore(ISystemFilterPoolReferenceManagerProvider caller,
IFolder mgrFolder,
String name,
IRSEFilterNamingPolicy namingPolicy)
Restore the filter pools from disk. |
protected static ISystemFilterPoolReferenceManager |
restoreFromOneFile(IFolder mgrFolder,
String name,
IRSEFilterNamingPolicy 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(ISystemFilterPoolManager 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(IRSEFilterNamingPolicy namingPolicy)
Set the naming policy used when saving data to disk. |
void |
setProvider(ISystemFilterPoolReferenceManagerProvider caller)
Set the object which instantiated this instance of the filter pool reference manager. |
void |
setProviderEventNotification(boolean fireEvents)
Turn callbacks to the provider either off or on. |
void |
setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider poolMgrProvider)
Set the associated master pool manager provider. |
void |
setSystemFilterPoolReferenceManagerData(Object data)
This is to set transient data that is subsequently queryable. |
void |
setSystemFilterPoolReferences(ISystemFilterPool[] filterPools,
boolean deReference)
In one shot, set the filter pool references to new references to supplied filter pools. |
void |
setSystemFilterPoolReferences(ISystemFilterPoolReference[] filterPoolReferences,
boolean deReference)
In one shot, set the filter pool references. |
String |
toString()
Return string identifying this filter |
| Methods inherited from class org.eclipse.rse.internal.references.SystemPersistableReferenceManager |
|---|
addPathTerminator, addReferencingObject, getName, getReferencedObject, getReferencingObjectCount, getReferencingObjectList, getReferencingObjectPosition, getReferencingObjects, 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 |
| Constructor Detail |
public SystemFilterPoolReferenceManager()
| Method Detail |
public static ISystemFilterPoolReferenceManager createSystemFilterPoolReferenceManager(ISystemFilterPoolReferenceManagerProvider caller,
ISystemFilterPoolManagerProvider relatedPoolManagerProvider,
IFolder mgrFolder,
String name,
int savePolicy,
IRSEFilterNamingPolicy namingPolicy)
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.relatedPoolManagerProvider - The managers that owns the master list of filter pools that
this manager will contain references to.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:
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.
protected static SystemFilterPoolReferenceManager createManager()
protected void initialize(ISystemFilterPoolReferenceManagerProvider caller,
IFolder folder,
String name,
int savePolicy,
IRSEFilterNamingPolicy namingPolicy,
ISystemFilterPoolManagerProvider relatedPoolManagerProvider)
protected void initialize(ISystemFilterPoolReferenceManagerProvider caller,
IFolder folder,
String name,
int savePolicy,
IRSEFilterNamingPolicy namingPolicy)
public void setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider poolMgrProvider)
setSystemFilterPoolManagerProvider in interface ISystemFilterPoolReferenceManagerpoolMgrProvider - the factory (provider) for the filter pool managers that this
reference manager provides services topublic ISystemFilterPoolManagerProvider getSystemFilterPoolManagerProvider()
ISystemFilterPoolReferenceManager
getSystemFilterPoolManagerProvider in interface ISystemFilterPoolReferenceManagerpublic ISystemFilterPoolManager[] getSystemFilterPoolManagers()
ISystemFilterPoolReferenceManager
getSystemFilterPoolManagers in interface ISystemFilterPoolReferenceManagerpublic ISystemFilterPoolManager[] getAdditionalSystemFilterPoolManagers()
ISystemFilterPoolReferenceManager
getAdditionalSystemFilterPoolManagers in interface ISystemFilterPoolReferenceManagerpublic void setDefaultSystemFilterPoolManager(ISystemFilterPoolManager mgr)
setDefaultSystemFilterPoolManager in interface ISystemFilterPoolReferenceManagermgr - the filter pool manager that is the default pool manager.public ISystemFilterPoolManager getDefaultSystemFilterPoolManager()
ISystemFilterPoolReferenceManager
getDefaultSystemFilterPoolManager in interface ISystemFilterPoolReferenceManagerpublic ISystemFilterPoolReferenceManagerProvider getProvider()
ISystemFilterPoolReferenceManager
getProvider in interface ISystemFilterPoolReferenceManagerpublic void setProvider(ISystemFilterPoolReferenceManagerProvider caller)
setProvider in interface ISystemFilterPoolReferenceManagercaller - the factory that created this instance.public void setProviderEventNotification(boolean fireEvents)
setProviderEventNotification in interface ISystemFilterPoolReferenceManagerfireEvents - true if events are to be fired to the provider object, false if not.public void setNamingPolicy(IRSEFilterNamingPolicy namingPolicy)
namingPolicy - the naming policy - no longer used.IRSEFilterNamingPolicypublic IRSEFilterNamingPolicy getNamingPolicy()
IRSEFilterNamingPolicypublic void setSystemFilterPoolReferenceManagerData(Object data)
data - the data associated with this pool reference manager.public Object getSystemFilterPoolReferenceManagerData()
public void setName(String name)
setName in interface IRSEBasePersistableReferenceManagername - the name of this reference manager.public void regenerateReferencedSystemFilterPoolNames()
regenerateReferencedSystemFilterPoolNames in interface ISystemFilterPoolReferenceManagerpublic ISystemFilterPoolReference[] getSystemFilterPoolReferences()
ISystemFilterPoolReferenceManager
getSystemFilterPoolReferences in interface ISystemFilterPoolReferenceManager
public void setSystemFilterPoolReferences(ISystemFilterPoolReference[] filterPoolReferences,
boolean deReference)
setSystemFilterPoolReferences in interface ISystemFilterPoolReferenceManagerfilterPoolReferences - an array of filter pool reference objects to set the list to.deReference - true to first de-reference all objects in the existing list.public int addSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference)
addSystemFilterPoolReference in interface ISystemFilterPoolReferenceManagerfilterPoolReference - a reference to add to this manager
public void resetSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference,
ISystemFilterPool newPool)
resetSystemFilterPoolReference in interface ISystemFilterPoolReferenceManagerfilterPoolReference - the reference to fix upnewPool - the new pool to reference
public int removeSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference,
boolean deReference)
removeSystemFilterPoolReference in interface ISystemFilterPoolReferenceManagerfilterPoolReference - the reference to removedeReference - true if we want to dereference the referenced object (call removeReference on it)
public int getSystemFilterPoolReferenceCount()
ISystemFilterPoolReferenceManager
getSystemFilterPoolReferenceCount in interface ISystemFilterPoolReferenceManagerpublic int getSystemFilterPoolReferencePosition(ISystemFilterPoolReference filterPoolRef)
ISystemFilterPoolReferenceManager
getSystemFilterPoolReferencePosition in interface ISystemFilterPoolReferenceManagerfilterPoolRef - the filter pool reference to search for
public void moveSystemFilterPoolReference(ISystemFilterPoolReference filterPoolRef,
int pos)
moveSystemFilterPoolReference in interface ISystemFilterPoolReferenceManagerfilterPoolRef - the reference to movepos - the new position at which to move it. References at that position and beyond are
moved up in the list.
public void moveSystemFilterPoolReferences(ISystemFilterPoolReference[] filterPoolRefs,
int delta)
moveSystemFilterPoolReferences in interface ISystemFilterPoolReferenceManagerfilterPoolRefs - Array of SystemFilterPoolReferences to move.delta - the amount by which to move these references.public ISystemFilterPool[] getReferencedSystemFilterPools()
ISystemFilterPoolReferenceManager
getReferencedSystemFilterPools in interface ISystemFilterPoolReferenceManagerpublic boolean isSystemFilterPoolReferenced(ISystemFilterPool filterPool)
ISystemFilterPoolReferenceManager
isSystemFilterPoolReferenced in interface ISystemFilterPoolReferenceManagerfilterPool - the filter pool to test to see if we have a reference to it
public ISystemFilterPoolReference getReferenceToSystemFilterPool(ISystemFilterPool filterPool)
getReferenceToSystemFilterPool in interface ISystemFilterPoolReferenceManagerfilterPool - the filter pool we are testing for a reference
public ISystemFilterPoolReference addReferenceToSystemFilterPool(ISystemFilterPool filterPool)
ISystemFilterPoolReferenceManagerCalls back to inform provider
addReferenceToSystemFilterPool in interface ISystemFilterPoolReferenceManager
public ISystemFilterPoolReference addReferenceToSystemFilterPool(ISystemFilterPoolManager filterPoolManager,
String filterPoolName)
ISystemFilterPoolReferenceManagerCalls back to inform provider
addReferenceToSystemFilterPool in interface ISystemFilterPoolReferenceManagerfilterPoolManager - the manager that can be used to resolve the reference.filterPoolName - the name of the filter pool being referenced.
public int removeReferenceToSystemFilterPool(ISystemFilterPool filterPool)
removeReferenceToSystemFilterPool in interface ISystemFilterPoolReferenceManagerfilterPool - the filter pool whose references we are to remove
public void renameReferenceToSystemFilterPool(ISystemFilterPool pool)
renameReferenceToSystemFilterPool in interface ISystemFilterPoolReferenceManagerpool - the pool that has just been renamed
public void setSystemFilterPoolReferences(ISystemFilterPool[] filterPools,
boolean deReference)
setSystemFilterPoolReferences in interface ISystemFilterPoolReferenceManagerfilterPools - of filter pool objects to create references fordeReference - true to first de-reference all objects in the existing list.
public ISystemFilterReference getSystemFilterReference(ISubSystem subSystem,
ISystemFilter filter)
getSystemFilterReference in interface ISystemFilterPoolReferenceManagersubSystem - the subsystem that uses this reference managerfilter - the new filter that is being added
public ISystemFilterReference[] getSystemFilterReferences(ISubSystem subSystem)
getSystemFilterReferences in interface ISystemFilterPoolReferenceManagersubSystem - the subsystem for which this manager is providing filter pool reference management
public int getSystemFilterReferencePosition(ISystemFilterReference filterRef)
getSystemFilterReferencePosition in interface ISystemFilterPoolReferenceManagerfilterRef - the reference to locate
public int getSystemFilterReferencePosition(ISubSystem subSystem,
ISystemFilter filter)
getSystemFilterReferencePosition in interface ISystemFilterPoolReferenceManagersubSystem - the subsystem in which to located the filterfilter - the filter to locate
public void save()
throws Exception
save in interface ISystemFilterPoolReferenceManagerException
protected boolean saveToOneFile()
throws Exception
Exception
public static ISystemFilterPoolReferenceManager restore(ISystemFilterPoolReferenceManagerProvider caller,
IFolder mgrFolder,
String name,
IRSEFilterNamingPolicy namingPolicy)
throws Exception
caller - The object that is calling this, which must implement SystemFilterPoolReferenceManagerProvidermgrFolder - 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.
Exception - if anything else went wrong
public static ISystemFilterPoolReferenceManager restore(ISystemFilterPoolReferenceManagerProvider caller,
IFolder mgrFolder,
String name)
throws Exception
caller - The object that is calling this, which must implement SystemFilterPoolReferenceManagerProvidermgrFolder - 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.
Exception - if anything else went wrong
protected static ISystemFilterPoolReferenceManager restoreFromOneFile(IFolder mgrFolder,
String name,
IRSEFilterNamingPolicy namingPolicy)
throws Exception
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.
Exception - if anything else went wrong
public Vector resolveReferencesAfterRestore(ISystemFilterPoolManagerProvider relatedPoolMgrProvider,
ISystemFilterPoolReferenceManagerProvider provider)
This method is called after restore and for each restored object in the list must:
resolveReferencesAfterRestore in interface ISystemFilterPoolReferenceManagerrelatedPoolMgrProvider - the filter pool manager provider that created the filter pools we reference
(usually a subsystem configuration)provider - the host of this reference manager, so you can later call getProvider
public static ISystemFilterPool getFilterPool(ISystemFilterPoolManager[] mgrs,
String mgrName,
String poolName)
mgrs - The list of filter pool managers to scan for the given filter pool.mgrName - The name of the manager to restrict the search topoolName - The name of the filter pool as stored on disk. It may be qualified somehow
to incorporate the manager name too.
public static ISystemFilterPoolManager getFilterPoolManager(ISystemFilterPoolManager[] mgrs,
String mgrName)
mgrs - The list of filter pool managers to scan for the given namemgrName - The name of the manager to restrict the search to
protected static String getSaveFilePathAndName(IFolder mgrFolder,
String name,
IRSEFilterNamingPolicy namingPolicy)
mgrFolder - The folder in which to save a reference manager.name - The name of the file for a filter pool reference manager.namingPolicy - The naming policy for a filter pool reference manager
protected static String getSaveFileName(String fileNameNoSuffix)
fileNameNoSuffix - the file name sans suffix.
protected String getSaveFilePathAndName()
protected String getSaveFileName()
public IFolder getFolder()
ISystemFilterPoolReferenceManager
getFolder in interface ISystemFilterPoolReferenceManagerpublic void resetManagerFolder(IFolder newFolder)
resetManagerFolder in interface ISystemFilterPoolReferenceManagernewFolder - the new folderpublic String getFolderPath()
public static String getFolderPath(IFolder folder)
folder - the folder to find the path for
public String toString()
org.eclipse.rse.internal.references.SystemPersistableReferenceManager
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||