1 package org.simantics.scl.commands.internal;
3 import org.simantics.db.RequestProcessor;
4 import org.simantics.db.Resource;
5 import org.simantics.db.exception.DatabaseException;
6 import org.simantics.db.procedure.Procedure;
7 import org.simantics.scl.commands.Command;
9 public class ErrorCommand implements Command {
13 public ErrorCommand(String name) {
18 public Object execute(RequestProcessor processor, Resource model, Object... parameters) throws DatabaseException {
19 throw new DatabaseException("Command " + name + " is not available.");
23 public boolean check(RequestProcessor processor, Resource model,
24 Object... parameters) throws DatabaseException {
29 public void asyncExecute(RequestProcessor processor, Resource model,
30 Object[] parameters, Procedure<Object> procedure) {
31 procedure.exception(new DatabaseException("Command " + name + " is not available."));