|
RSE Release 3.0 |
|||||||||
| 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.model.DummyHost
public class DummyHost
A DummyHost is used as a placeholder during the construction of hosts by wizards.
| Field Summary | |
|---|---|
protected String |
_hostName
|
protected IRSESystemType |
_systemType
|
| Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
|---|
NO_CHILDREN |
| Constructor Summary | |
|---|---|
DummyHost(String hostName,
IRSESystemType systemType)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
addPropertySet(IPropertySet set)
Adds an existing property set to this container. |
boolean |
addPropertySets(IPropertySet[] sets)
Adds a number of existing property sets to this container. |
void |
beginRestore()
|
void |
clearLocalDefaultUserId()
Clear the local default user Id so next query will return the value from the preference store. |
boolean |
commit()
Request a persistence manager to persist this object. |
boolean |
compareUserIds(String userId1,
String userId2)
Compare two userIds taking case sensitivity into account. |
IPropertySet |
createPropertySet(String name)
Creates a new property set of a particular name in this container. |
IPropertySet |
createPropertySet(String name,
String description)
Creates a new property set of a particular name and description in this container. |
void |
deletingHost()
Notification method called when this connection is being deleted. |
void |
endRestore()
|
String |
getAliasName()
Get the unique user-visible connection name. |
IConnectorService[] |
getConnectorServices()
Returns all the connector services currently configured for this host |
String |
getDefaultEncoding(boolean checkRemote)
Returns the default encoding of the host. |
String |
getDefaultUserId()
Return the default user Id for this host. |
String |
getDescription()
Return the description of this host. |
boolean |
getForceUserIdToUpperCase()
Query whether the default userId is to be uppercased. |
String |
getHostName()
Get the host name or IP address. |
ISystemHostPool |
getHostPool()
Set the parent connection pool this is owned by. |
String |
getLocalDefaultUserId()
Return the local default user Id without resolving up the food chain. |
String |
getName()
|
IRSEPersistableContainer[] |
getPersistableChildren()
Retrieves the children of this object in the persistence containment hierarchy. |
IRSEPersistableContainer |
getPersistableParent()
Retrieve the parent of this object in the persistence containment hierarchy. |
IPropertySet |
getPropertySet(String name)
Retrieves a particular property set by its name. |
IPropertySet[] |
getPropertySets()
Retrieves an array all property sets known to this container. |
ISubSystem[] |
getSubSystems()
Return the subsystem instances under this connection. |
ISystemProfile |
getSystemProfile()
Return the system profile that owns this connection |
String |
getSystemProfileName()
Return the name of the system profile that owns this connection FIXME Check how this is different from getSystemProfile().getName() |
IRSESystemType |
getSystemType()
Get the system type. |
boolean |
isDirty()
An object is dirty if a change has been made to it that requires it to be persisted. |
boolean |
isOffline()
Returns the value of the 'Offline' attribute. |
boolean |
isPromptable()
Check if this host is promptable. |
boolean |
isTainted()
An object is tainted if it contains an object that is dirty somewhere in its containment hierarchy. |
boolean |
removePropertySet(String name)
Removes a particular property set from this container. |
void |
renamingSystemProfile(String oldName,
String newName)
Notification method called when this connection's profile is being renamed. |
void |
setAliasName(String value)
Set the unique user-visible connection name. |
void |
setDefaultEncoding(String encoding,
boolean fromRemote)
Set the default encoding of the host. |
void |
setDefaultUserId(String value)
Intercept of setDefaultUserId so we can force it to uppercase. |
void |
setDescription(String value)
Set the description of this host. |
void |
setDirty(boolean flag)
An object is dirty if a change has been made to it that requires it to be persisted. |
void |
setHostName(String value)
Set the host name or IP address. |
void |
setHostPool(ISystemHostPool pool)
Set the parent connection pool this is owned by. |
void |
setOffline(boolean value)
Specify if this connection is offline or not. |
void |
setPromptable(boolean value)
Set the promptable attribute. |
void |
setSystemType(IRSESystemType value)
Set the system type. |
void |
setTainted(boolean flag)
Sets the tainted attribute for this object. |
void |
setWasRestored(boolean flag)
Sets the restored state of the object. |
boolean |
wasRestored()
An object was restored if it originated from a persistent form. |
| Methods inherited from class org.eclipse.core.runtime.PlatformObject |
|---|
getAdapter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Field Detail |
|---|
protected String _hostName
protected IRSESystemType _systemType
| Constructor Detail |
|---|
public DummyHost(String hostName,
IRSESystemType systemType)
hostName - name of the dummy hostsystemType - sytem type. May be null.| Method Detail |
|---|
public ISystemProfile getSystemProfile()
IHost
getSystemProfile in interface IHostpublic String getSystemProfileName()
IHost
getSystemProfileName in interface IHostpublic void setHostPool(ISystemHostPool pool)
IHost
setHostPool in interface IHostpublic ISystemHostPool getHostPool()
IHost
getHostPool in interface IHostpublic ISubSystem[] getSubSystems()
IHostISystemRegistry.getSubSystems(IHost)
getSubSystems in interface IHostpublic String getLocalDefaultUserId()
IHost
getLocalDefaultUserId in interface IHostIHost.getDefaultUserId()public void clearLocalDefaultUserId()
IHostSame as calling setDefaultUserId(null)
clearLocalDefaultUserId in interface IHostIHost.setDefaultUserId(String)public void deletingHost()
IHostWhat we need to do is delete our entry in the preference store for our default userId.
deletingHost in interface IHost
public void renamingSystemProfile(String oldName,
String newName)
IHostImplementations must not fork off other threads in the implementation of this method, since the old and new profiles will be locked during the rename operation so deadlock could occur when another thread tries to access theprofile during the time of rename ongoing.
What we need to do is rename our entry in the preference store for our default userId.
renamingSystemProfile in interface IHostpublic boolean getForceUserIdToUpperCase()
IHost
getForceUserIdToUpperCase in interface IHosttrue if the user id is to be uppercased.
public boolean compareUserIds(String userId1,
String userId2)
IHost
compareUserIds in interface IHostuserId1 - first id to compareuserId2 - second id to comparepublic IRSESystemType getSystemType()
IHost
getSystemType in interface IHostpublic void setSystemType(IRSESystemType value)
IHost
setSystemType in interface IHostvalue - The new value of the SystemType attributepublic String getAliasName()
IHost
getAliasName in interface IHostpublic void setAliasName(String value)
IHost
setAliasName in interface IHostvalue - The new value of the AliasName attributepublic String getHostName()
IHost
getHostName in interface IHostpublic void setHostName(String value)
IHost
setHostName in interface IHostvalue - The new value of the HostName attributepublic String getDescription()
IHost
getDescription in interface IHostgetDescription in interface IRSEModelObjectpublic void setDescription(String value)
IHost
setDescription in interface IHostvalue - The new value of the Description attributepublic String getDefaultUserId()
IHostFurther, it is possible that there is no default user id. If so, this method will go to the preference store and will try to get the default user Id per this connection's system type.
This is all transparent to the caller though.
getDefaultUserId in interface IHostpublic void setDefaultUserId(String value)
IHost
setDefaultUserId in interface IHostvalue - The new value of the DefaultUserId attributepublic boolean isPromptable()
IHost
isPromptable in interface IHostpublic void setPromptable(boolean value)
IHost
setPromptable in interface IHostvalue - The new value of the Promptable attributepublic boolean isOffline()
IHostQuery if this connection is offline or not. If so, there is no live connection. Subsystems decide how much to enable while offline. It is up to each subsystem to honor this flag.
isOffline in interface IHostIHost.setOffline(boolean)public void setOffline(boolean value)
IHost
setOffline in interface IHostvalue - the new value of the 'Offline' attribute.IHost.isOffline()public IConnectorService[] getConnectorServices()
IHost
getConnectorServices in interface IHostpublic String getName()
getName in interface IRSEModelObjectpublic IPropertySet[] getPropertySets()
IPropertySetContainer
getPropertySets in interface IPropertySetContainerpublic IPropertySet getPropertySet(String name)
IPropertySetContainer
getPropertySet in interface IPropertySetContainername - the name of the property set.
public IPropertySet createPropertySet(String name,
String description)
IPropertySetContainerIRSEPersistableContainer. The
IRSEPersistableContainer.commit() method must then be used to
commit any changes into persistent storage.
createPropertySet in interface IPropertySetContainername - the name of the property set.description - the description (usually already localized) for this
property set.
public IPropertySet createPropertySet(String name)
IPropertySetContainerIRSEPersistableContainer. The
IRSEPersistableContainer.commit() method must then be used to
commit any changes into persistent storage.
createPropertySet in interface IPropertySetContainername - the name of the property set.
public boolean addPropertySet(IPropertySet set)
IPropertySetContainer
addPropertySet in interface IPropertySetContainerset - the property set to be added.
public boolean addPropertySets(IPropertySet[] sets)
IPropertySetContainer
addPropertySets in interface IPropertySetContainersets - the sets to be added
IPropertySetContainer.addPropertySet(IPropertySet)public boolean removePropertySet(String name)
IPropertySetContainer
removePropertySet in interface IPropertySetContainername - the name of the property set to be removed
public boolean isDirty()
IRSEPersistableContainer
isDirty in interface IRSEPersistableContainerpublic void setDirty(boolean flag)
IRSEPersistableContainerAn object is dirty if a change has been made to it that requires it to be persisted. Objects should usually mark themselves dirty when a persistable change is made. However, there may be a need to mark related objects dirty as well.
Persistable changes are:
A rename may also cause a parent to be marked dirty if the parent refers to the child by name.
Setting this value to false should be done only in the persistence manager after the object has been written to the DOM.
Marking an object as dirty must cause it and all of its ancestors in the persistence hierarchy to be marked as tainted.
setDirty in interface IRSEPersistableContainerflag - true if the object must be persisted.public boolean commit()
IRSEPersistableContainer
commit in interface IRSEPersistableContainerpublic boolean wasRestored()
IRSEPersistableContainer
wasRestored in interface IRSEPersistableContainerpublic void setWasRestored(boolean flag)
IRSEPersistableContainer
setWasRestored in interface IRSEPersistableContainerflag - true if the object was restored.public IRSEPersistableContainer getPersistableParent()
IRSEPersistableContainer
getPersistableParent in interface IRSEPersistableContainerpublic IRSEPersistableContainer[] getPersistableChildren()
IRSEPersistableContainer
getPersistableChildren in interface IRSEPersistableContainerIRSEPersistableContainer.NO_CHILDREN.public boolean isTainted()
IRSEPersistableContainer
isTainted in interface IRSEPersistableContainerpublic void beginRestore()
public void endRestore()
public void setTainted(boolean flag)
IRSEPersistableContainer
setTainted in interface IRSEPersistableContainerflag - the tainted state of the object.public String getDefaultEncoding(boolean checkRemote)
IHost
If fromRemote is false, returns an encoding preference
specified locally without querying the remote system (for example,
an encoding set by a user).
If fromRemote is true, it first checks to see if there is
a local "overriding" encoding set by the client without querying the
remote system, and if such a "local" encoding preference does not exist,
returns the encoding that was set by the client by querying a remote system.
getDefaultEncoding in interface IHostcheckRemote - false to get the encoding that was
obtained by the client by not querying the remote system,
true to also check the encoding, if needed, that was
set by the client after querying a remote system.
null if
no encoding was set.IHost.setDefaultEncoding(String, boolean)
public void setDefaultEncoding(String encoding,
boolean fromRemote)
IHostThis method can only be called when no subsystem is connected. The client has to obtain the encoding either by querying the remote system, or by some other means (for example, set by a user).
setDefaultEncoding in interface IHostencoding - the encoding of the host, or null
to erase the current encoding.fromRemote - true if the encoding is set by the
client after querying the remote system, or false
otherwise (e.g. setting a local user preference).IHost.getDefaultEncoding(boolean)
|
RSE Release 3.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||