Remote Systems
v6.4.1

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

java.lang.Object
  extended byEObjectImpl
      extended bycom.ibm.etools.systems.references.impl.SystemReferencingObjectImpl
          extended bycom.ibm.etools.systems.filters.impl.SystemFilterReferenceImpl
All Implemented Interfaces:
IAdaptable, ISystemContainer, ISystemReferencingObject, SystemFilterContainerReference, SystemFilterReference, SystemReferencingObject

public class SystemFilterReferenceImpl
extends SystemReferencingObjectImpl
implements IAdaptable, SystemFilterReference, SystemReferencingObject

See Also:
Serialized Form

Field Summary
protected  HashMap cachedContents
           
static String copyright
           
protected  boolean isStale
           
protected  boolean persistent
           
static boolean PERSISTENT_NO
           
static boolean PERSISTENT_YES
           
 
Fields inherited from class com.ibm.etools.systems.references.impl.SystemReferencingObjectImpl
helper, referenceBroken
 
Constructor Summary
protected SystemFilterReferenceImpl()
          Constructor.
 
Method Summary
static SystemFilterReference createSystemFilterReference(SystemFilterContainerReference parent, SystemFilter filter, boolean persistent)
          Create a new instance of this class.
protected  EClass eStaticClass()
           
 Object getAdapter(Class adapterType)
          This is the method required by the IAdaptable interface.
 Object[] getContents(ISystemContentsType contentsType)
          Returns all the contents of the object (combining results of all filters
 SystemFilterReference getExistingSystemFilterReference(SystemFilter filter)
          Return an existing reference to a given system filter.
 int getFilterCount()
          Return count of the number of filters in the referenced pool or filter
 SystemFilterPoolReferenceManager getFilterPoolReferenceManager()
          Return the reference manager which is managing this filter reference framework object.
 String getName()
          Return the name of the SystemFilter or SystemFilterPool that we reference.
 SystemFilterContainerReference getParent()
          The parent will either by a SystemFilterPoolReference or a SystemFilterReference.
 SystemFilterPoolReference getParentSystemFilterReferencePool()
          If this is a reference to a nested filter, the parent is the reference to the nested filter's parent.
 SystemFilterPoolReferenceManagerProvider getProvider()
          Return the object which instantiated the pool reference manager object.
 SystemFilter getReferencedFilter()
          Return the filter to which we reference...
 ISystemReferencedObject getReferencedObject()
          Get the object which we reference.
 SystemFilterContainer getReferencedSystemFilterContainer()
          Return the object to which we hold a reference.
 SystemFilterReference getSystemFilterReference(SystemFilter filter)
          Create a single filter refererence to a given filter.
 SystemFilterReference[] getSystemFilterReferences()
          Build and return an array of SystemFilterReference objects.
 int getSystemFilterStringCount()
          Return the number of filter strings in the referenced filter
 SystemFilterStringReference getSystemFilterStringReference(SystemFilterString filterString)
          Create a single filter string refererence to a given filter string
 SystemFilterStringReference[] getSystemFilterStringReferences()
          Get the filter strings contained by this filter.
 boolean hasContents(ISystemContentsType contentsType)
          Returns whether the object has contents of a particular type.
 boolean hasFilters()
          Return true if the referenced pool or filter has filters.
 boolean isStale()
          Indicates whether the cached object is stale
 void markStale(boolean isStale)
          Marks the object as stale or not
 int removeReference()
          Fastpath to getReferencedObject().removeReference(this).
 void setContents(ISystemContentsType type, Object[] cachedContents)
           
 void setParent(SystemFilterContainerReference parent)
          If this is a reference to a nested filter, the parent is the reference to the nested filter's parent.
 void setReferencedFilter(SystemFilter filter)
          Set the filter to which we reference...
 void setReferencedObject(ISystemReferencedObject obj)
          Set the object to which we reference.
 String toString()
          Override of Object method.
 
Methods inherited from class com.ibm.etools.systems.references.impl.SystemReferencingObjectImpl
isReferenceBroken, setReferenceBroken
 
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.ISystemReferencingObject
isReferenceBroken, setReferenceBroken
 

Field Detail

persistent

protected boolean persistent

isStale

protected boolean isStale

cachedContents

protected HashMap cachedContents

copyright

public static final String copyright
See Also:
Constant Field Values

PERSISTENT_YES

public static final boolean PERSISTENT_YES
See Also:
Constant Field Values

PERSISTENT_NO

public static final boolean PERSISTENT_NO
See Also:
Constant Field Values
Constructor Detail

SystemFilterReferenceImpl

protected SystemFilterReferenceImpl()
Constructor. Typically called by MOF.

Method Detail

eStaticClass

protected EClass eStaticClass()

Overrides:
eStaticClass in class SystemReferencingObjectImpl

createSystemFilterReference

public static SystemFilterReference createSystemFilterReference(SystemFilterContainerReference parent,
                                                                SystemFilter filter,
                                                                boolean persistent)
Create a new instance of this class.

Parameters:
parent - The SystemFilterReference or SystemFilterPoolReference object that we are a child of.
filter - The master object to be referenced.
persistent - Whether we should formally register our reference with the target filter or not.

getFilterPoolReferenceManager

public SystemFilterPoolReferenceManager getFilterPoolReferenceManager()
Return the reference manager which is managing this filter reference framework object.

Specified by:
getFilterPoolReferenceManager in interface SystemFilterReference

getProvider

public SystemFilterPoolReferenceManagerProvider getProvider()
Return the object which instantiated the pool reference manager object. Makes it easy to get back to the point of origin, given any filter reference framework object

Specified by:
getProvider in interface SystemFilterReference

setParent

public void setParent(SystemFilterContainerReference parent)
If this is a reference to a nested filter, the parent is the reference to the nested filter's parent. Else, it is the reference to the parent filter pool


getParent

public SystemFilterContainerReference getParent()
The parent will either by a SystemFilterPoolReference or a SystemFilterReference.

Specified by:
getParent in interface SystemFilterReference

getReferencedFilter

public SystemFilter getReferencedFilter()
Return the filter to which we reference...

Specified by:
getReferencedFilter in interface SystemFilterReference

setReferencedFilter

public void setReferencedFilter(SystemFilter filter)
Set the filter to which we reference...

Specified by:
setReferencedFilter in interface SystemFilterReference

getParentSystemFilterReferencePool

public SystemFilterPoolReference getParentSystemFilterReferencePool()
If this is a reference to a nested filter, the parent is the reference to the nested filter's parent. Else, it is the reference to the parent filter pool

Specified by:
getParentSystemFilterReferencePool in interface SystemFilterReference

getAdapter

public Object getAdapter(Class adapterType)
This is the method required by the IAdaptable interface. Given an adapter class type, return an object castable to the type, or null if this is not possible.

Specified by:
getAdapter in interface IAdaptable

getReferencedSystemFilterContainer

public SystemFilterContainer getReferencedSystemFilterContainer()
Return the object to which we hold a reference. This is either SystemFilter or SystemFilterPool. Since both implement SystemFilterContainer, that is what we return.

Of course, this is a generic method, and in our case it is always true that we only hold a SystemFilter. Hence, this is the same as calling getReferenceFilter and casting the result.

Specified by:
getReferencedSystemFilterContainer in interface SystemFilterContainerReference

getSystemFilterReferences

public SystemFilterReference[] getSystemFilterReferences()
Build and return an array of SystemFilterReference objects. Each object is created new. There is one for each of the filters in the reference SystemFilter or SystemFilterPool. For performance reasons, we will cache this array and only return a fresh one if something changes in the underlying filter list.

Specified by:
getSystemFilterReferences in interface SystemFilterContainerReference

getSystemFilterReference

public SystemFilterReference getSystemFilterReference(SystemFilter filter)
Create a single filter refererence to a given filter. If there already is a reference to this filter, it is returned. If not, a new reference is created and appended to the end of the existing filter reference array.

Specified by:
getSystemFilterReference in interface SystemFilterContainerReference
See Also:
getExistingSystemFilterReference(SystemFilter)

getExistingSystemFilterReference

public SystemFilterReference getExistingSystemFilterReference(SystemFilter filter)
Return an existing reference to a given system filter. If no reference currently exists to this filter, returns null.

Specified by:
getExistingSystemFilterReference in interface SystemFilterContainerReference
See Also:
getSystemFilterReference(SystemFilter)

hasFilters

public boolean hasFilters()
Return true if the referenced pool or filter has filters.

Specified by:
hasFilters in interface SystemFilterContainerReference

getFilterCount

public int getFilterCount()
Return count of the number of filters in the referenced pool or filter

Specified by:
getFilterCount in interface SystemFilterContainerReference

getName

public String getName()
Return the name of the SystemFilter or SystemFilterPool that we reference. For such objects this is what we show in the GUI.

Specified by:
getName in interface SystemFilterContainerReference

toString

public String toString()
Override of Object method. Turn this filter in an outputable string


getSystemFilterStringCount

public int getSystemFilterStringCount()
Return the number of filter strings in the referenced filter

Specified by:
getSystemFilterStringCount in interface SystemFilterReference

getSystemFilterStringReferences

public SystemFilterStringReference[] getSystemFilterStringReferences()
Get the filter strings contained by this filter. But get references to each, not the masters.

Specified by:
getSystemFilterStringReferences in interface SystemFilterReference

getSystemFilterStringReference

public SystemFilterStringReference getSystemFilterStringReference(SystemFilterString filterString)
Create a single filter string refererence to a given filter string

Specified by:
getSystemFilterStringReference in interface SystemFilterReference

setReferencedObject

public void setReferencedObject(ISystemReferencedObject obj)
Set the object to which we reference. Override of inherited

Specified by:
setReferencedObject in interface ISystemReferencingObject
Overrides:
setReferencedObject in class SystemReferencingObjectImpl
See Also:
ISystemReferencingObject.setReferencedObject(ISystemReferencedObject)

getReferencedObject

public ISystemReferencedObject getReferencedObject()
Get the object which we reference. Override of inherited

Specified by:
getReferencedObject in interface ISystemReferencingObject
Overrides:
getReferencedObject in class SystemReferencingObjectImpl
See Also:
ISystemReferencingObject.getReferencedObject()

removeReference

public int removeReference()
Fastpath to getReferencedObject().removeReference(this).

Specified by:
removeReference in interface ISystemReferencingObject
Overrides:
removeReference in class SystemReferencingObjectImpl
Returns:
new reference count of master object
See Also:
ISystemReferencingObject.removeReference()

hasContents

public boolean hasContents(ISystemContentsType contentsType)
Description copied from interface: ISystemContainer
Returns whether the object has contents of a particular type.

Specified by:
hasContents in interface ISystemContainer
Parameters:
contentsType - type of contents
Returns:
true if the object has contents, false otherwise.

getContents

public Object[] getContents(ISystemContentsType contentsType)
Description copied from interface: ISystemContainer
Returns all the contents of the object (combining results of all filters

Specified by:
getContents in interface ISystemContainer
Parameters:
contentsType - type of contents
Returns:
an array of contents.

setContents

public void setContents(ISystemContentsType type,
                        Object[] cachedContents)
Specified by:
setContents in interface SystemFilterReference

isStale

public boolean isStale()
Description copied from interface: ISystemContainer
Indicates whether the cached object is stale

Specified by:
isStale in interface ISystemContainer
Returns:
whether the container is stale

markStale

public void markStale(boolean isStale)
Description copied from interface: ISystemContainer
Marks the object as stale or not

Specified by:
markStale in interface ISystemContainer
Parameters:
isStale - whether the object is to be marked stale or not

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.