Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.perspective.model
Class AbstractISeriesResource

java.lang.Object
  extended by com.ibm.etools.iseries.perspective.model.AbstractISeriesResource
All Implemented Interfaces:
IISeriesResourceActionFilter
Direct Known Subclasses:
AbstractISeriesMember, AbstractISeriesParent

public abstract class AbstractISeriesResource
extends Object
implements IISeriesResourceActionFilter

Abstract base class for all iSeries Objects in the iSeries Navigator.
Clients are not expected to implement/subclass this class, or any of its subclasses.

Eclipse IMarkers are used to capture the state of the resource. For memory performance, if the marker instance is null, it means that the resource is ok. If it is not null, then are error has occurred. e.g. For an iSeries Project you can have an error if the Associated library is not specified. Or a status of warning if the build command is not specified.


Field Summary
static int CONTAINER
          Type constant (bit mask value 16) which identifies the AbstractISeriesContainer resource.
static String Copyright
           
static int IFS_CONTAINER
          Type constant (bit mask value 512) which identifies the AbstractISeriesIFSContainer resource.
static int IFS_MEMBER
          Type constant (bit mask value 1024) which identifies the AbstractISeriesIFSMember resource.
static int IFS_ROOT
          Type constant (bit mask value 8) which identifies the AbstractISeriesIFSRoot resource.
static int LOCAL
          Type constant (bit mask value 1) which identifies that this resource exists on locally.
static int LOCAL_AND_REMOTE
          Type constant (bit mask value 2) which identifies that this resource exists both locally and on the remote host.
static int MEMBER
          Type constant (bit mask value 32) which identifies the AbstractISeriesMember resource.
static int NATIVE_LIBRARY
          Type constant (bit mask value 64) which identifies the AbstractISeriesNativeLibrary resource.
static int NATIVE_MEMBER
          Type constant (bit mask value 256) which identifies the AbstractISeriesNativeMember resource.
static int NATIVE_OBJECT
          Type constant (bit mask value 128) which identifies the AbstractISeriesNativeObject resource.
static int NATIVE_ROOT
          Type constant (bit mask value 4) which identifies the AbstractISeriesNativeRoot resource.
static int PROJECT
          Type constant (bit mask value 2) which identifies the AbstractISeriesProject resource.
static int PROJECT_ROOT
          Type constant (bit mask value 1) which identifies the AbstractISeriesProjectRoot resource.
static int REMOTE
          Type constant (bit mask value 4) which identifies that this resource exists only on the remote host.
 
Fields inherited from interface com.ibm.etools.iseries.perspective.model.IISeriesResourceActionFilter
IS_LEAF_OBJECT, IS_LOCAL, IS_NATIVE, IS_SOURCE_FILE, IS_SYNCHRONIZED, METADATA_LEVEL
 
Constructor Summary
AbstractISeriesResource()
           
 
Method Summary
 void accept(IISeriesResourceVisitor visitor)
          Accepts a visitor at this resource.
 Object getAdapter(Class adapter)
          This contains the default implementation for all AbstractiSeriesResource objects.
abstract  IResource getBaseIResource()
          Returns the Eclipse IResource associated with this iSeries object.
abstract  AbstractISeriesProject getISeriesProject()
          Returns the iSeries Project which contains this resource.
 boolean getIsLocal()
          Determines if the isLocal property is true.
 boolean getIsNative()
          Determines if the isNative property is true.
 boolean getIsSynchronized()
          Determines if the isSynchronized property is true.
abstract  int getLocationMask()
          Returns the location of this resource.
The returned int value will be one of the following three static constants defined in this class: LOCAL LOCAL_AND_REMOTE REMOTE
 int getMarkerSeverity()
          Get the maximum severity of all IMarkers on this resource and all of its descendants.
abstract  AbstractISeriesResource getParent()
          Returns the direct parent of the given resource.
 IISeriesPropertiesModel getPropertiesModel()
          Returns the properties model for this resource.
abstract  int getType()
          Returns the type of this resource.
The returned value will be one of static constants defined in this class.
 void refreshPropertiesModel()
          Causes the resource to refresh properties from its persistent form.
 void setIsLocal(boolean aIsLocal)
          Sets the value of the isLocal property.
 void setIsNative(boolean aIsNative)
          Sets the value of the isNative property.
 void setIsSynchronized(boolean aIsSynchronized)
          Sets the value of the isSynchronized property.
abstract  void synchronize()
          Synchronizing at a given level synchronized all the hierarchy below it!
 boolean testAttribute(Object target, String name, String value)
          Returns whether the specific attribute matches the state of the target object.
This method contains a base implementation for all AbstractiSeriesResource objects.
abstract  String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

PROJECT_ROOT

public static final int PROJECT_ROOT
Type constant (bit mask value 1) which identifies the AbstractISeriesProjectRoot resource.

See Also:
getType(), Constant Field Values

PROJECT

public static final int PROJECT
Type constant (bit mask value 2) which identifies the AbstractISeriesProject resource.

See Also:
getType(), Constant Field Values

NATIVE_ROOT

public static final int NATIVE_ROOT
Type constant (bit mask value 4) which identifies the AbstractISeriesNativeRoot resource.

See Also:
getType(), Constant Field Values

IFS_ROOT

public static final int IFS_ROOT
Type constant (bit mask value 8) which identifies the AbstractISeriesIFSRoot resource.

See Also:
getType(), Constant Field Values

CONTAINER

public static final int CONTAINER
Type constant (bit mask value 16) which identifies the AbstractISeriesContainer resource.

See Also:
getType(), Constant Field Values

MEMBER

public static final int MEMBER
Type constant (bit mask value 32) which identifies the AbstractISeriesMember resource.

See Also:
getType(), Constant Field Values

NATIVE_LIBRARY

public static final int NATIVE_LIBRARY
Type constant (bit mask value 64) which identifies the AbstractISeriesNativeLibrary resource.

See Also:
getType(), Constant Field Values

NATIVE_OBJECT

public static final int NATIVE_OBJECT
Type constant (bit mask value 128) which identifies the AbstractISeriesNativeObject resource.

See Also:
getType(), Constant Field Values

NATIVE_MEMBER

public static final int NATIVE_MEMBER
Type constant (bit mask value 256) which identifies the AbstractISeriesNativeMember resource.

See Also:
getType(), Constant Field Values

IFS_CONTAINER

public static final int IFS_CONTAINER
Type constant (bit mask value 512) which identifies the AbstractISeriesIFSContainer resource.

See Also:
getType(), Constant Field Values

IFS_MEMBER

public static final int IFS_MEMBER
Type constant (bit mask value 1024) which identifies the AbstractISeriesIFSMember resource.

See Also:
getType(), Constant Field Values

LOCAL

public static final int LOCAL
Type constant (bit mask value 1) which identifies that this resource exists on locally. ie: it has no remote equivalent.

See Also:
getLocationMask(), Constant Field Values

LOCAL_AND_REMOTE

public static final int LOCAL_AND_REMOTE
Type constant (bit mask value 2) which identifies that this resource exists both locally and on the remote host.

See Also:
getLocationMask(), Constant Field Values

REMOTE

public static final int REMOTE
Type constant (bit mask value 4) which identifies that this resource exists only on the remote host.

See Also:
getLocationMask(), Constant Field Values
Constructor Detail

AbstractISeriesResource

public AbstractISeriesResource()
Method Detail

synchronize

public abstract void synchronize()
Synchronizing at a given level synchronized all the hierarchy below it!


getParent

public abstract AbstractISeriesResource getParent()
Returns the direct parent of the given resource. Subclass implementations may return parent instances of specific type depending on context.


getISeriesProject

public abstract AbstractISeriesProject getISeriesProject()
Returns the iSeries Project which contains this resource. Returns itself for an iSeries project and null for the iSeries Project root.


toString

public abstract String toString()
Overrides:
toString in class Object

getBaseIResource

public abstract IResource getBaseIResource()
Returns the Eclipse IResource associated with this iSeries object. Local AbstractiSeriesResources will have either an IWorkench, IProject, IFolder or an IFile associated with them. An iSeries project will return an IProject. An iseries container will return IFolder only if it is local, otherwise null is returned. Similarly, An iseries container will return IFolder only if it is local, otherwise null is returned. There is one special case with containers. If a container represents an iSeries native "Object", then the retunrned IResource is an IFolder ONLY if the object was an iSeries Source Physical file or Data file. Otherwise and IFile is returned representing the native leaf object. This will happen in the case of a .sav file. Similarly, an iSeries Member will return an


getAdapter

public Object getAdapter(Class adapter)
This contains the default implementation for all AbstractiSeriesResource objects. All iSeries objects implement the Eclipse IAdaptable.


testAttribute

public boolean testAttribute(Object target,
                             String name,
                             String value)
Returns whether the specific attribute matches the state of the target object.
This method contains a base implementation for all AbstractiSeriesResource objects. All IResource objects implement the Eclipse IActionFilter interface through adapters, and so this base implementation delegates to Eclipse to grab the result of this method. Subclasses may override to add more behavior.

Parameters:
target - the target object
name - the attribute name
value - the attriute value
Returns:
true if the attribute matches; false otherwise

getType

public abstract int getType()
Returns the type of this resource.
The returned value will be one of static constants defined in this class.

Returns:
the type of this resource.

getLocationMask

public abstract int getLocationMask()
Returns the location of this resource.
The returned int value will be one of the following three static constants defined in this class: LOCAL LOCAL_AND_REMOTE REMOTE


getIsLocal

public boolean getIsLocal()
Determines if the isLocal property is true.

Returns:
true if the isLocal property is true

setIsLocal

public void setIsLocal(boolean aIsLocal)
Sets the value of the isLocal property.

Parameters:
aIsLocal - the new value of the isLocal property

getIsNative

public boolean getIsNative()
Determines if the isNative property is true.

Returns:
true if the isNative property is true

setIsNative

public void setIsNative(boolean aIsNative)
Sets the value of the isNative property.

Parameters:
aIsNative - the new value of the isNative property

getIsSynchronized

public boolean getIsSynchronized()
Determines if the isSynchronized property is true.

Returns:
true if the isSynchronized property is true

setIsSynchronized

public void setIsSynchronized(boolean aIsSynchronized)
Sets the value of the isSynchronized property.

Parameters:
aIsSynchronized - the new value of the isSynchronized property

accept

public void accept(IISeriesResourceVisitor visitor)
Accepts a visitor at this resource.

Parameters:
visitor - the visitor that will visit this resource.

getPropertiesModel

public IISeriesPropertiesModel getPropertiesModel()
Returns the properties model for this resource. Some resources do not have a properties model. The default implementation returns null.

Returns:
The properties model for this resource or null if the resource does not have a properties model.

refreshPropertiesModel

public void refreshPropertiesModel()
Causes the resource to refresh properties from its persistent form. If the resource does not have a properties model this will do nothing. If the resource has a properties model it may choose to immediately refresh or it may refresh the next time the properties model is retrieved. The default implementation does nothing.


getMarkerSeverity

public int getMarkerSeverity()
Get the maximum severity of all IMarkers on this resource and all of its descendants. If no markers are found, return -1; Convenience method which does NOT ignore timestamp conflicts


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 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.