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

All Known Implementing Classes:
AbstractDataModelOperation

public interface IDataModelOperation

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.
 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.
 

Method Detail

setID

public 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

public java.lang.String getID()

Returns the unique operation id.

Returns:
the unique operation id

setDataModel

public void setDataModel(IDataModel model)

Sets the IDataModel for this operation.

Parameters:
model - the IDataModel used to run this operation

getDataModel

public IDataModel getDataModel()

Returns this operation's IDataModel.

Returns:
this operation's IDataModel.

getSchedulingRule

public 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

public 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(), IWorkspace#run(org.eclipse.core.resources.IWorkspaceRunnable, ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor)

setEnvironment

public 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

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

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