1 /* This file is part of the project "Hilbert II" - http://www.qedeq.org" target="alexandria_uri">http://www.qedeq.org 2 * 3 * Copyright 2000-2014, Michael Meyling <mime@qedeq.org>. 4 * 5 * "Hilbert II" is free software; you can redistribute 6 * it and/or modify it under the terms of the GNU General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 */ 15 16 package org.qedeq.kernel.bo.service.basis; 17 18 import org.qedeq.kernel.bo.module.InternalModuleServiceCall; 19 import org.qedeq.kernel.se.common.ServiceCompleteness; 20 import org.qedeq.kernel.se.visitor.InterruptException; 21 22 23 24 /** 25 * Represents a plugin execution. 26 * 27 * @author Michael Meyling 28 */ 29 public interface ModuleServicePluginExecutor extends ServiceCompleteness { 30 31 /** 32 * Execute plugin. 33 * 34 * @param call Service call. 35 * @param data Process execution data. 36 * @return Plugin specific resulting object. Might be <code>null</code>. 37 * @throws InterruptException User canceled execution. 38 */ 39 public Object executePlugin(final InternalModuleServiceCall call, final Object data) throws InterruptException; 40 41 /** 42 * Get percentage of currently running plugin execution. 43 * 44 * @return Number between 0 and 100. 45 */ 46 public double getVisitPercentage(); 47 48 /** 49 * Get description of currently taken action. 50 * 51 * @return We are doing this currently. 52 */ 53 public String getLocationDescription(); 54 55 /** 56 * Was the execution interrupted by the user? 57 * 58 * @return The execution was interrupted. 59 */ 60 public boolean getInterrupted(); 61 62 }