X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.commands%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcommands%2FCommand.java;h=bc35f645e46d82b33334f96f6e5c952c11d911e7;hb=1dfeb7d5c49b1391cd9d877e1eddab18995cb151;hp=4ea05bc072293c5a1d001a07c54bb825ad6a078c;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.commands/src/org/simantics/scl/commands/Command.java b/bundles/org.simantics.scl.commands/src/org/simantics/scl/commands/Command.java index 4ea05bc07..bc35f645e 100644 --- a/bundles/org.simantics.scl.commands/src/org/simantics/scl/commands/Command.java +++ b/bundles/org.simantics.scl.commands/src/org/simantics/scl/commands/Command.java @@ -1,31 +1,31 @@ -package org.simantics.scl.commands; - -import org.simantics.db.RequestProcessor; -import org.simantics.db.Resource; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.procedure.Procedure; - -/** - * Command object represents a UI-operation that makes changes to the database. - * - * @author Hannu Niemistö - */ -public interface Command { - /** - * Checks that parameter values satisfy conditions needed for execution of the command. - * It is not necessary to give all the parameters that are given to commit-method. In that - * case this function makes just a partial checking of the given parameters. - */ - boolean check(RequestProcessor processor, Resource model, Object ... parameters) throws DatabaseException; - - /** - * Tries to execute the command. - */ - Object execute(RequestProcessor processor, Resource model, Object ... parameters) throws DatabaseException; - - /** - * Tries to execute the command asynchronously. - */ - void asyncExecute(RequestProcessor processor, Resource model, Object[] parameters, - Procedure procedure); -} +package org.simantics.scl.commands; + +import org.simantics.db.RequestProcessor; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.procedure.Procedure; + +/** + * Command object represents a UI-operation that makes changes to the database. + * + * @author Hannu Niemistö + */ +public interface Command { + /** + * Checks that parameter values satisfy conditions needed for execution of the command. + * It is not necessary to give all the parameters that are given to commit-method. In that + * case this function makes just a partial checking of the given parameters. + */ + boolean check(RequestProcessor processor, Resource model, Object ... parameters) throws DatabaseException; + + /** + * Tries to execute the command. + */ + Object execute(RequestProcessor processor, Resource model, Object ... parameters) throws DatabaseException; + + /** + * Tries to execute the command asynchronously. + */ + void asyncExecute(RequestProcessor processor, Resource model, Object[] parameters, + Procedure procedure); +}