|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Command
An atomic command that can be executed as part of a task. Commands are logged so that they can be rollbacked if needed. A command is assumed to be atomic - so that if anything goes wrong inside the execute method the command will not be rollbacked - only previous commands are rollbacked. If you need to implement a non atomic command then you should take care yourself of the partial rollback if an error occurs during the execution. The generic T represent the task type where this command can be executed
Method Summary | |
---|---|
String |
getId()
The command id |
void |
initialize(Element element)
Initialize a command parameters from a DOM element. |
boolean |
isPostInstall()
Test if the command must be run at the end in an installation process. |
Command |
run(org.nuxeo.connect.update.task.Task task,
Map<String,String> prefs)
Execute the command and return the inverse command that can be used to rollback. |
void |
validate(org.nuxeo.connect.update.task.Task task,
org.nuxeo.connect.update.ValidationStatus status)
Validate if the command can be safely executed on the running platform. |
void |
writeTo(XmlWriter writer)
Write the command as XML using the given XmlWriter . |
Method Detail |
---|
boolean isPostInstall()
PostInstallCommand
.
String getId()
Command run(org.nuxeo.connect.update.task.Task task, Map<String,String> prefs) throws org.nuxeo.connect.update.PackageException
task
-
org.nuxeo.connect.update.PackageException
void validate(org.nuxeo.connect.update.task.Task task, org.nuxeo.connect.update.ValidationStatus status) throws org.nuxeo.connect.update.PackageException
status
-
org.nuxeo.connect.update.PackageException
void initialize(Element element) throws org.nuxeo.connect.update.PackageException
element
-
org.nuxeo.connect.update.PackageException
void writeTo(XmlWriter writer)
XmlWriter
. This method
will be called by the task to create an uninstall.xml file.
writer
-
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |