|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ISiteOperation
This object describe an operation on a site that may modify site resources.
Operations are executed by the site controller through an operation handler.
This approach allows to redefine the operation handling at the site level.
Thus, each type of site may define its own type of operations and its own handlers
or may share operation and handlers with other type of sites.
Operation -> handler asociations are registered at the site controller level
ISiteController#registerOperationHandler()
Site operations may support:
ISiteOperationListener.aboutToPerformOperation(ISiteOperation)
ISiteController
ISiteController.addOperationListener(ISiteOperationListener)
ISiteController.addOperationListener(ISiteOperationListener)
getFlags()
Operations should be lightweight objects because they may be stored temporarly in an undo/redo queue by an Undo manager.
ISiteController#registerOperationHandler(),
ISiteController.addOperationListener(ISiteOperationListener),
ISiteController#execute(ISiteResource, String, java.util.List)| Field Summary | |
|---|---|
static int |
ANY
|
static int |
ASYNCHRONOUS
|
static java.lang.String |
COPY
|
static java.lang.String |
CREATE
|
static java.lang.String |
DELETE
|
static java.lang.String |
EDIT
|
static int |
HISTORY_ENABLED
|
static java.lang.String |
MOVE
|
static int |
NONE
|
static java.lang.String |
PUBLISH
|
static int |
RESTRICTED
|
static java.lang.String |
SUBMIT
|
static int |
UNDOABLE
|
| Method Summary | |
|---|---|
void |
clearFlag(int flag)
Clear the given flag (set the corresponding bit to 0) |
void |
execute()
Execute the operation. |
int |
getFlags()
Get the supported actions on the operation as a bit mask. |
ISiteOperation |
getInverseOperation()
Get the inverse operation. |
org.eclipse.core.runtime.IProgressMonitor |
getProgressMonitor()
Get the progress monitor used by this operation or null if none |
ISiteOperationStatus |
getStatus()
Get the operation status If the operation was not executed the status is null |
java.lang.String |
getType()
Get the operation type |
boolean |
isAsynchronous()
Tests whther the operation should be exectued asynchronously |
boolean |
isFlagSet(int flag)
Tests if the given flag is set (the corresponding bit is 1) |
boolean |
isHistoryEnabled()
Test whether ot nmot the operation should be logged |
boolean |
isRestricted()
Test whether security checks should be done before executing the operation |
boolean |
isUndoable()
Test whether the operation may be undoed. |
void |
setAsynchronous(boolean val)
Set the asynchornous flag. |
void |
setFlag(int flag)
Set the given flag (set the corresponding bit to 1) |
void |
setFlags(int flags)
Set the supported actioons on the operation |
void |
setHistoryEnabled(boolean val)
Set the history enabled flag |
void |
setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor monitor)
Set the progress monitor to be used by the operation |
void |
setRestricted(boolean val)
Set the security check flag. |
void |
setStatus(ISiteOperationStatus status)
Set the operation status |
void |
setUndoable(boolean val)
Set the undoable flag. |
| Field Detail |
|---|
static final java.lang.String CREATE
static final java.lang.String DELETE
static final java.lang.String EDIT
static final java.lang.String COPY
static final java.lang.String MOVE
static final java.lang.String PUBLISH
static final java.lang.String SUBMIT
static final int NONE
static final int ASYNCHRONOUS
static final int UNDOABLE
static final int RESTRICTED
static final int HISTORY_ENABLED
static final int ANY
| Method Detail |
|---|
java.lang.String getType()
void execute()
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException - if an error occursISiteOperationStatus getStatus()
void setStatus(ISiteOperationStatus status)
status - the status to setorg.eclipse.core.runtime.IProgressMonitor getProgressMonitor()
void setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor monitor)
ISiteOperation getInverseOperation()
int getFlags()
NONE this means operation
void setFlags(int flags)
flags - the bit mask of supported actionsboolean isAsynchronous()
void setAsynchronous(boolean val)
val - true if operation should be executed asynchronously, false otherwiseboolean isRestricted()
void setRestricted(boolean val)
val - true if the operation should be checked for right permissions before
being executed or false otherwiseboolean isUndoable()
void setUndoable(boolean val)
getInverseOperation()
val - true if operation can be undoed, false otherwiseboolean isHistoryEnabled()
void setHistoryEnabled(boolean val)
val - true to enable history logs, false otherwisevoid setFlag(int flag)
flag - the flag to setvoid clearFlag(int flag)
flag - the flag to clearboolean isFlagSet(int flag)
flag - the flag to test
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||