org.eclipse.wst.common.frameworks.datamodel
Interface IDataModelOperation

All Superinterfaces:
org.eclipse.core.commands.operations.IUndoableOperation
All Known Implementing Classes:
AbstractDataModelOperation

public interface IDataModelOperation
extends org.eclipse.core.commands.operations.IUndoableOperation

IDataModelOperation defines an IDataModel driven undoable operation. Every IDataModelOperation may be extended by third party clients using the extended operation framework.

This interface is not intended to be implemented by clients. Clients should subclass AbstractDataModelOperation.

Since:
1.0
See Also:
IDataModel

Method Summary
 IDataModel getDataModel()
           Returns this operation's IDataModel.
 IEnvironment getEnvironment()
          Returns the IEvironment set in setEnvironment(IEnvironment)}
 java.lang.String getID()
           Returns the unique operation id.
 int getOperationExecutionFlags()
           Returns the OperationExecutionFlags used for executing this Operation as a workspace job.
 org.eclipse.core.runtime.jobs.ISchedulingRule getSchedulingRule()
           Returns the ISchedulingRule used for executing this job using IWorkspace.run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor).
 void setDataModel(IDataModel model)
           Sets the IDataModel for this operation.
 void setEnvironment(IEnvironment environment)
           The framework will set the environment on this operation before it is executed.
 void setID(java.lang.String id)
           Sets the unique operation id.
 
Methods inherited from interface org.eclipse.core.commands.operations.IUndoableOperation
addContext, canExecute, canRedo, canUndo, dispose, execute, getContexts, getLabel, hasContext, redo, removeContext, undo
 

Method Detail

setID

void setID(java.lang.String id)

Sets the unique operation id. Typically, clients should not invoke this method.

Parameters:
id - the unique operation id

getID

java.lang.String getID()

Returns the unique operation id.

Returns:
the unique operation id

setDataModel

void setDataModel(IDataModel model)

Sets the IDataModel for this operation.

Parameters:
model - the IDataModel used to run this operation

getDataModel

IDataModel getDataModel()

Returns this operation's IDataModel.

Returns:
this operation's IDataModel.

getSchedulingRule

org.eclipse.core.runtime.jobs.ISchedulingRule getSchedulingRule()

Returns the ISchedulingRule used for executing this job using IWorkspace.run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor). If null is returned, then IWorkspace.getRoot() is used as the ISchedulingRule during execution.

Returns:
the ISchedulingRule
See Also:
getOperationExecutionFlags(), IWorkspace.run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor)

getOperationExecutionFlags

int getOperationExecutionFlags()

Returns the OperationExecutionFlags used for executing this Operation as a workspace job. IWorkspace.run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor).

Returns:
the OperationExecutionFlags
See Also:
getSchedulingRule()

setEnvironment

void setEnvironment(IEnvironment environment)

The framework will set the environment on this operation before it is executed. The operation can then use the environment to report status, log information, and access resources in an environment neutral way.

Parameters:
environment - the IEnvironment to set.

getEnvironment

IEnvironment getEnvironment()
Returns the IEvironment set in setEnvironment(IEnvironment)}

Returns:
the set IEnvironment
See Also:
setEnvironment(IEnvironment)