|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A working copy runtime object used for formulating changes
to a runtime instance (IRuntime
). Changes made on a
working copy do not occur (and are not persisted) until a
save() is performed.
This interface is not intended to be implemented by clients.
IRuntime
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_LOCATION
Property change name (value "location") used when the location of the runtime changes. |
static java.lang.String |
PROPERTY_NAME
Property change name (value "name") used when the name of the runtime changes. |
static int |
SAVE_CONFLICT
Status code (value 1) returned from the save() method when the save failed with force set to false because the runtime has
been modified and saved since this working copy was created. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a property change listener to this runtime. |
IRuntime |
getOriginal()
Returns the runtime instance that this working copy is associated with. |
boolean |
isDirty()
Returns whether this working copy has unsaved changes. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a property change listener from this runtime. |
IRuntime |
save(boolean force,
IProgressMonitor monitor)
Commits the changes made in this working copy. |
void |
setLocation(IPath path)
Sets the absolute path in the local file system to the root of the runtime, typically the installation directory. |
void |
setName(java.lang.String name)
Sets the displayable name for this runtime. |
void |
setReadOnly(boolean readOnly)
Sets or unsets whether this runtime is marked as read only. |
void |
setStub(boolean stub)
Returns whether this runtime is a stub (used for compilation only) or a full runtime. |
Methods inherited from interface org.eclipse.wst.server.core.IRuntime |
---|
createWorkingCopy, delete, getAdapter, getId, getLocation, getName, getRuntimeType, isReadOnly, isStub, isWorkingCopy, loadAdapter, validate |
Field Detail |
public static final int SAVE_CONFLICT
false
because the runtime has
been modified and saved since this working copy was created.
save(boolean, IProgressMonitor)
,
Constant Field Valuespublic static final java.lang.String PROPERTY_NAME
addPropertyChangeListener(PropertyChangeListener)
,
removePropertyChangeListener(PropertyChangeListener)
,
Constant Field Valuespublic static final java.lang.String PROPERTY_LOCATION
addPropertyChangeListener(PropertyChangeListener)
,
removePropertyChangeListener(PropertyChangeListener)
,
Constant Field ValuesMethod Detail |
public void setName(java.lang.String name)
The name should be appropriate for the current locale.
name
- a displayable nameIRuntime.getName()
public void setReadOnly(boolean readOnly)
readOnly
- true
to set this runtime to be marked
read only, and false
to unsetpublic boolean isDirty()
true
if this working copy has unsaved
changes, and false
otherwisepublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Once registered, a listener starts receiving notification of property changes to this runtime. The listener continues to receive notifications until it is removed. Has no effect if an identical listener is already registered.
listener
- a property change listenerremovePropertyChangeListener(PropertyChangeListener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- a property change listeneraddPropertyChangeListener(PropertyChangeListener)
public IRuntime getOriginal()
For a runtime working copy created by a call to
IRuntime.createWorkingCopy()
,
this.getOriginal()
returns the original
runtime object. For a runtime working copy just created by
a call to IRuntimeType.createRuntime(String, IProgressMonitor)
,
this.getOriginal()
returns null
.
null
if nonepublic void setLocation(IPath path)
path
- the location of this runtime, or null
if noneIRuntime.getLocation()
public void setStub(boolean stub)
stub
- true
if this runtime is a stub, and
false
otherwisepublic IRuntime save(boolean force, IProgressMonitor monitor) throws CoreException
If there an existing runtime instance with a matching id and runtime type, this will change the runtime instance accordingly. The returned runtime will be the same runtime this is returned from getOriginal(), after the changes have been applied. Otherwise, this method will return a newly created runtime.
Runtimes can be saved even when they have invalid properties. It is the clients responsibility to call validate() or check the properties before saving.[issue: What is lifecycle for RuntimeWorkingCopyDelegate associated with this working copy?]
force
- true
to force the save, or false
otherwisemonitor
- a progress monitor, or null
if progress
reporting and cancellation are not desired
CoreException
- if the save could not be completedSAVE_CONFLICT
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |