|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRuntimeWorkingCopy
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.
If the client of this working copy calls loadAdapter(), a new instance of the delegate (RuntimeDelegate) will be created to help this working copy. This delegate instance will be used as long as this working copy exists.
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 |
---|
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 Valuesstatic final java.lang.String PROPERTY_NAME
addPropertyChangeListener(PropertyChangeListener)
,
removePropertyChangeListener(PropertyChangeListener)
,
Constant Field Valuesstatic final java.lang.String PROPERTY_LOCATION
addPropertyChangeListener(PropertyChangeListener)
,
removePropertyChangeListener(PropertyChangeListener)
,
Constant Field ValuesMethod Detail |
---|
void setName(java.lang.String name)
The name should be appropriate for the current locale.
name
- a displayable nameIRuntime.getName()
void setReadOnly(boolean readOnly)
readOnly
- true
to set this runtime to be marked
read only, and false
to unsetboolean isDirty()
true
if this working copy has unsaved
changes, and false
otherwisevoid 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)
void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- a property change listeneraddPropertyChangeListener(PropertyChangeListener)
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 nonevoid setLocation(IPath path)
path
- the location of this runtime, or null
if noneIRuntime.getLocation()
void setStub(boolean stub)
stub
- true
if this runtime is a stub, and
false
otherwiseIRuntime 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.
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 |