Remote Systems
v6.4.1

com.ibm.etools.systems.core.resources
Class SystemRemoteMarker

java.lang.Object
  extended bycom.ibm.etools.systems.core.resources.SystemRemoteMarker
All Implemented Interfaces:
ISystemRemoteMarker

public class SystemRemoteMarker
extends Object
implements ISystemRemoteMarker

This class is an internal implementation of the ISystemRemoteMarker interface. It is not intended to be implemented by clients.


Field Summary
static String Copyright
           
protected  long id
          The marker id.
protected  ISystemRemoteResource resource
          Resource with which this marker is associated.
 
Fields inherited from interface com.ibm.etools.systems.core.resources.ISystemRemoteMarker
EXTENSION_POINT_ID
 
Constructor Summary
SystemRemoteMarker(ISystemRemoteResource resource, long id)
          Constructor for SystemRemoteMarker.
 
Method Summary
 void delete()
          Deletes this marker from its associated resource.
 boolean equals(Object object)
          Tests this marker for equality with the given object.
 boolean exists()
          Returns whether this marker exists.
 Object getAttribute(String attributeName)
          Returns the attribute with the given name.
 boolean getAttribute(String attributeName, boolean defaultValue)
          Returns the boolean-valued attribute with the given name.
 int getAttribute(String attributeName, int defaultValue)
          Returns the integer-valued attribute with the given name.
 String getAttribute(String attributeName, String defaultValue)
          Returns the string-valued attribute with the given name.
 Map getAttributes()
          Returns a map with all the attributes for the marker.
 Object[] getAttributes(String[] attributeNames)
          Returns the attributes with the given names.
 long getCreationTime()
          Returns the time at which this marker was created.
 long getId()
          Returns the id of the marker.
 ISystemRemoteResource getResource()
          Returns the resource with which this marker is associated.
 String getType()
          Returns the type of this marker.
 boolean isSubtypeOf(String superType)
          Returns whether the type of this marker is considered to be a subtype of the given marker type.
 void setAttribute(String attributeName, boolean value)
          Sets the boolean-valued attribute with the given name.
 void setAttribute(String attributeName, int value)
          Sets the integer-valued attribute with the given name.
 void setAttribute(String attributeName, Object value)
          Sets the attribute with the given name.
 void setAttributes(Map attributes)
          Sets the attributes for this marker to be the ones contained in the given table.
 void setAttributes(String[] attributeNames, Object[] values)
          Sets the given attribute key-value pairs on this marker.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

resource

protected ISystemRemoteResource resource
Resource with which this marker is associated.


id

protected long id
The marker id.

Constructor Detail

SystemRemoteMarker

public SystemRemoteMarker(ISystemRemoteResource resource,
                          long id)
Constructor for SystemRemoteMarker.

Method Detail

delete

public void delete()
Description copied from interface: ISystemRemoteMarker
Deletes this marker from its associated resource. This method has no effect if this marker does not exist.

Specified by:
delete in interface ISystemRemoteMarker
See Also:
ISystemRemoteMarker.delete()

equals

public boolean equals(Object object)
Description copied from interface: ISystemRemoteMarker
Tests this marker for equality with the given object. Two markers are equal if and only if their id and resource info are both equal.

Specified by:
equals in interface ISystemRemoteMarker
See Also:
ISystemRemoteMarker.equals(Object)

exists

public boolean exists()
Description copied from interface: ISystemRemoteMarker
Returns whether this marker exists. A marker exists if its resource info exists and has a marker with the marker's id.

Specified by:
exists in interface ISystemRemoteMarker
Returns:
true if this marker exists, otherwise false
See Also:
ISystemRemoteMarker.exists()

getAttribute

public Object getAttribute(String attributeName)
Description copied from interface: ISystemRemoteMarker
Returns the attribute with the given name. The result is an instance of one of the following classes: String, Integer, or Boolean. Returns null if the attribute is undefined.

Specified by:
getAttribute in interface ISystemRemoteMarker
Parameters:
attributeName - the name of the attribute
Returns:
the value, or null if the attribute is undefined.
See Also:
ISystemRemoteMarker.getAttribute(String)

getAttribute

public int getAttribute(String attributeName,
                        int defaultValue)
Description copied from interface: ISystemRemoteMarker
Returns the integer-valued attribute with the given name. Returns the given default value if the attribute is undefined. or the marker does not exist or is not an integer value.

Specified by:
getAttribute in interface ISystemRemoteMarker
Parameters:
attributeName - the name of the attribute
defaultValue - the value to use if no value is found
Returns:
the value or the default value if no value was found.
See Also:
ISystemRemoteMarker.getAttribute(String, int)

getAttribute

public String getAttribute(String attributeName,
                           String defaultValue)
Description copied from interface: ISystemRemoteMarker
Returns the string-valued attribute with the given name. Returns the given default value if the attribute is undefined or the marker does not exist or is not a string value.

Specified by:
getAttribute in interface ISystemRemoteMarker
Parameters:
attributeName - the name of the attribute
defaultValue - the value to use if no value is found
Returns:
the value or the default value if no value was found.
See Also:
ISystemRemoteMarker.getAttribute(String, String)

getAttribute

public boolean getAttribute(String attributeName,
                            boolean defaultValue)
Description copied from interface: ISystemRemoteMarker
Returns the boolean-valued attribute with the given name. Returns the given default value if the attribute is undefined or the marker does not exist or is not a boolean value.

Specified by:
getAttribute in interface ISystemRemoteMarker
Parameters:
attributeName - the name of the attribute
defaultValue - the value to use if no value is found
Returns:
the value or the default value if no value was found.
See Also:
ISystemRemoteMarker.getAttribute(String, boolean)

getAttributes

public Map getAttributes()
Description copied from interface: ISystemRemoteMarker
Returns a map with all the attributes for the marker. If the marker has no attributes then null is returned.

Specified by:
getAttributes in interface ISystemRemoteMarker
Returns:
a map of attribute keys and values (key type : String value type : String, Integer, or Boolean) or null.
See Also:
ISystemRemoteMarker.getAttributes()

getAttributes

public Object[] getAttributes(String[] attributeNames)
Description copied from interface: ISystemRemoteMarker
Returns the attributes with the given names. The result is an an array whose elements correspond to the elements of the given attribute name array. Each element is null or an instance of one of the following classes: String, Integer, or Boolean.

Specified by:
getAttributes in interface ISystemRemoteMarker
Parameters:
attributeNames - the names of the attributes
Returns:
the values of the given attributes.
See Also:
ISystemRemoteMarker.getAttributes(String[])

getCreationTime

public long getCreationTime()
Description copied from interface: ISystemRemoteMarker
Returns the time at which this marker was created.

Specified by:
getCreationTime in interface ISystemRemoteMarker
Returns:
the difference, measured in milliseconds, between the time at which this marker was created and midnight, January 1, 1970 UTC.
See Also:
ISystemRemoteMarker.getCreationTime()

getId

public long getId()
Description copied from interface: ISystemRemoteMarker
Returns the id of the marker. The id of a marker is unique relative to the resource with which the marker is associated. Marker ids are not globally unique.

Specified by:
getId in interface ISystemRemoteMarker
Returns:
the id of the marker
See Also:
ISystemRemoteMarker.getId()

getResource

public ISystemRemoteResource getResource()
Description copied from interface: ISystemRemoteMarker
Returns the resource with which this marker is associated.

Specified by:
getResource in interface ISystemRemoteMarker
Returns:
the remote resource with which this marker is associated
See Also:
ISystemRemoteMarker.getResource()

getType

public String getType()
Description copied from interface: ISystemRemoteMarker
Returns the type of this marker.

Specified by:
getType in interface ISystemRemoteMarker
Returns:
the type of this marker
See Also:
ISystemRemoteMarker.getType()

isSubtypeOf

public boolean isSubtypeOf(String superType)
Description copied from interface: ISystemRemoteMarker
Returns whether the type of this marker is considered to be a subtype of the given marker type.

Specified by:
isSubtypeOf in interface ISystemRemoteMarker
Returns:
boolean trueif the marker's type is the same as (or a subtype of) the given type.
See Also:
ISystemRemoteMarker.isSubtypeOf(String)

setAttribute

public void setAttribute(String attributeName,
                         int value)
Description copied from interface: ISystemRemoteMarker
Sets the integer-valued attribute with the given name.

Specified by:
setAttribute in interface ISystemRemoteMarker
Parameters:
attributeName - the name of the attribute
value - the value
See Also:
ISystemRemoteMarker.setAttribute(String, int)

setAttribute

public void setAttribute(String attributeName,
                         Object value)
Description copied from interface: ISystemRemoteMarker
Sets the attribute with the given name. The value must be null or an instance of one of the following classes: String, Integer, or Boolean. If the value is null, the attribute is considered to be undefined.

Specified by:
setAttribute in interface ISystemRemoteMarker
Parameters:
attributeName - the name of the attribute
value - the value, or null if the attribute is to be undefined
See Also:
ISystemRemoteMarker.setAttribute(String, Object)

setAttribute

public void setAttribute(String attributeName,
                         boolean value)
Description copied from interface: ISystemRemoteMarker
Sets the boolean-valued attribute with the given name.

Specified by:
setAttribute in interface ISystemRemoteMarker
Parameters:
attributeName - the name of the attribute
value - the value
See Also:
ISystemRemoteMarker.setAttribute(String, boolean)

setAttributes

public void setAttributes(String[] attributeNames,
                          Object[] values)
Description copied from interface: ISystemRemoteMarker
Sets the given attribute key-value pairs on this marker. The values must be null or an instance of one of the following classes: String, Integer, or Boolean. If a value is null, the new value of the attribute is considered to be undefined.

Specified by:
setAttributes in interface ISystemRemoteMarker
Parameters:
attributeNames - an array of attribute names
values - an array of attribute values
See Also:
ISystemRemoteMarker.setAttributes(String[], Object[])

setAttributes

public void setAttributes(Map attributes)
Description copied from interface: ISystemRemoteMarker
Sets the attributes for this marker to be the ones contained in the given table. The values must be an instance of one of the following classes: String, Integer, or Boolean. Attributes previously set on the marker but not included in the given map are considered to be removals. Setting the given map to be null is equivalent to removing all marker attributes.

Specified by:
setAttributes in interface ISystemRemoteMarker
Parameters:
attributes - a map of attribute names to attribute values (key type : String value type : String, Integer, or Boolean) or null
See Also:
ISystemRemoteMarker.setAttributes(Map)

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.