|
RSE Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.rse.core.AbstractRSESystemType
public abstract class AbstractRSESystemType
Abstract base class holding core functionality of a system type.
Extenders must override IRSESystemType.getSubsystemConfigurationIds()
according to their strategy of finding subsystem configuration id's that
match their system type.
Extenders may override any other method.
Field Summary | |
---|---|
protected Bundle |
definingBundle
|
protected String |
description
|
protected String |
id
|
protected String |
label
|
protected String |
name
|
protected Map |
properties
|
Constructor Summary | |
---|---|
protected |
AbstractRSESystemType()
Default constructor. |
|
AbstractRSESystemType(String id,
String name,
String label,
String description,
Bundle definingBundle)
Constructor for an object representing a system type. |
Method Summary | |
---|---|
IHost |
createNewHostInstance(ISystemProfile profile)
Creates a new IHost object instance. |
boolean |
equals(Object obj)
Checks whether two system types are the same. |
Bundle |
getDefiningBundle()
Returns the bundle which is responsible for the definition of this system type. |
String |
getDescription()
Returns the description of the system type. |
String |
getId()
Returns the id of the system type. |
String |
getLabel()
Returns the translatable label for use in the UI. |
String |
getName()
Returns the name of the system type. |
String |
getProperty(String key)
Returns the property of this system type with the given key. |
int |
hashCode()
Returns the hashCode for this system type. |
boolean |
isEnabled()
Tests whether the system type is currently enabled. |
boolean |
isLocal()
Tests whether the system type refers to the local system. |
boolean |
isWindows()
Tests whether the system type refers to the Windows system. |
boolean |
testProperty(String key,
boolean expectedValue)
Tests whether the given boolean property matches the expected value for this system type. |
String |
toString()
|
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
---|
getAdapter |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.rse.core.IRSESystemType |
---|
getSubsystemConfigurationIds |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Field Detail |
---|
protected String id
protected String name
protected String label
protected String description
protected Bundle definingBundle
protected Map properties
Constructor Detail |
---|
protected AbstractRSESystemType()
public AbstractRSESystemType(String id, String name, String label, String description, Bundle definingBundle)
id
- unique id of this system type. Must be system unique.name
- a name of this system type to be used for internal checks.label
- a user-visible label of this system type.
May be null
and falls back to the name in this case.description
- a user-visible description of this system type.
May be null
and falls back to the label in this case.Method Detail |
---|
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String getId()
IRSESystemType
getId
in interface IRSESystemType
public String getLabel()
IRSESystemType
getLabel
in interface IRSESystemType
null
if not set.public String getName()
IRSESystemType
getName
in interface IRSESystemType
public String getDescription()
IRSESystemType
getDescription
in interface IRSESystemType
public Bundle getDefiningBundle()
IRSESystemType
getDefiningBundle
in interface IRSESystemType
null
if nonepublic String getProperty(String key)
IRSESystemType
null
is returned if there is no such key/value pair.
getProperty
in interface IRSESystemType
key
- the name of the property to return
null
if nonepublic boolean testProperty(String key, boolean expectedValue)
IRSESystemType
com.acme.isFoobarSystem
. Property keys without qualifying
namespace are reserved for RSE internal use.
testProperty
in interface IRSESystemType
key
- the name of the property to returnexpectedValue
- the expected boolean value of the property.
true
if the Property is set on the system type and
matches the expected value. Returns false
if the property
is not set or does not match.public boolean isEnabled()
Implementers of custom system types (which are registered by a SystemTypeProvider) can override this method to provide more advanced enabled checks e.g. based on license availability.
isEnabled
in interface IRSESystemType
true
if the system type is currently enabled, or
false
otherwise.IRSESystemType.isEnabled()
public boolean isLocal()
IRSESystemType
getId().equals(SYSTEMTYPE_LOCAL_ID) || || testProperty(PROPERTY_IS_LOCAL, true)See
IRSESystemType.PROPERTY_IS_LOCAL
for properties expected on
a Local system.
Extenders (contributors of custom system types) may override.
isLocal
in interface IRSESystemType
public boolean isWindows()
IRSESystemType
getId().equals(SYSTEMTYPE_WINDOWS_ID) || isLocal() && System.getProperty("os.name").toLowerCase().startsWith("win") || testProperty(PROPERTY_IS_WINDOWS, true)See
IRSESystemType.PROPERTY_IS_WINDOWS
for properties expected on
a Windows system. This is an "aggregate" property consisting
of several smaller properties like isCaseSensitive. In the
future, we'll want more fine granular properties to check against.
Extenders (contributors of custom system types) may override.
isWindows
in interface IRSESystemType
public IHost createNewHostInstance(ISystemProfile profile)
IRSESystemType
IHost
object instance. This method is
called from SystemHostPool.createHost(IRSESystemType, String, String, String, String, int)
.
createNewHostInstance
in interface IRSESystemType
profile
- The system profile to associate with the host.
IHost
object instance.public String toString()
toString
in class Object
|
RSE Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |