diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 6e80039..b257af7 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/pom.xml b/pom.xml index c79975c..37007dd 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ 2.7.0 distro - 1.8 + 1.7 1.8 @@ -98,8 +98,15 @@ org.gcube.common authorization-client [2.0.0-SNAPSHOT, 3-0-0-SNAPSHOT) + provided + + + org.gcube.common.portal + portal-manager + provided + diff --git a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/WsTaskExecutorWidget.gwt.xml b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/WsTaskExecutorWidget.gwt.xml index 64df3c2..f3766d2 100644 --- a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/WsTaskExecutorWidget.gwt.xml +++ b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/WsTaskExecutorWidget.gwt.xml @@ -6,7 +6,7 @@ - + diff --git a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/client/WsTaskExecutorWidget.java b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/client/WsTaskExecutorWidget.java index 42a1f0f..7f02125 100644 --- a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/client/WsTaskExecutorWidget.java +++ b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/client/WsTaskExecutorWidget.java @@ -118,6 +118,8 @@ public class WsTaskExecutorWidget { if(folder==null || folder.getFolderId()==null) throw new Exception("Invalid parameter folder null"); + GWT.log("Qui"); + MonitorFolderTaskExecutionStatusView monitor = viewManager.getMonitor(folder); diff --git a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/client/rpc/WsTaskExecutorWidgetService.java b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/client/rpc/WsTaskExecutorWidgetService.java index e30b8be..7071570 100644 --- a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/client/rpc/WsTaskExecutorWidgetService.java +++ b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/client/rpc/WsTaskExecutorWidgetService.java @@ -3,7 +3,9 @@ package org.gcube.portlets.widgets.wstaskexecutor.client.rpc; import java.util.List; import org.gcube.common.workspacetaskexecutor.shared.TaskParameterType; +import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskComputation; import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskConfiguration; +import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskExecutionStatus; import org.gcube.common.workspacetaskexecutor.shared.exception.ItemNotConfiguredException; import org.gcube.portlets.widgets.wstaskexecutor.shared.GcubeScope; @@ -28,12 +30,25 @@ public interface WsTaskExecutorWidgetService extends RemoteService { */ List getListOfScopesForLoggedUser() throws Exception; + /** + * Monitor task execution status. + * + * @param configuration the configuration + * @param taskComputation the task computation + * @return the task execution status + * @throws Exception the exception + */ + TaskExecutionStatus monitorTaskExecutionStatus( + TaskConfiguration configuration, TaskComputation taskComputation) throws Exception; + + /** * Check item task configurations. * * @param itemId the item id * @return the list - * @throws ItemNotConfiguredException, Exception + * @throws ItemNotConfiguredException the item not configured exception + * @throws Exception the exception */ List checkItemTaskConfigurations(String itemId) throws ItemNotConfiguredException, Exception; diff --git a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/client/view/WsTaskExecutorWidgetViewManager.java b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/client/view/WsTaskExecutorWidgetViewManager.java index 8b98681..1193635 100644 --- a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/client/view/WsTaskExecutorWidgetViewManager.java +++ b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/client/view/WsTaskExecutorWidgetViewManager.java @@ -108,8 +108,8 @@ public class WsTaskExecutorWidgetViewManager { * @param taskEventsListeners the task events listeners */ public void showMonitorTaskStatusFor( - WsFolder folder, - final TaskConfiguration configuration, TaskComputation taskComputation, List taskEventsListeners) { + final WsFolder folder, + final TaskConfiguration configuration, final TaskComputation taskComputation, final List taskEventsListeners) { GWT.log("showMonitorSyncToFolder for folder: "+folder.getFolderId()); diff --git a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/server/WsTaskExecutorWidgetServiceImpl.java b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/server/WsTaskExecutorWidgetServiceImpl.java index 9f1c882..f23ca02 100644 --- a/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/server/WsTaskExecutorWidgetServiceImpl.java +++ b/src/main/java/org/gcube/portlets/widgets/wstaskexecutor/server/WsTaskExecutorWidgetServiceImpl.java @@ -7,7 +7,9 @@ import java.util.List; import org.gcube.common.portal.PortalContext; import org.gcube.common.workspacetaskexecutor.dataminer.WorkspaceDataMinerTaskExecutor; import org.gcube.common.workspacetaskexecutor.shared.TaskParameterType; +import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskComputation; import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskConfiguration; +import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskExecutionStatus; import org.gcube.common.workspacetaskexecutor.shared.exception.ItemNotConfiguredException; import org.gcube.common.workspacetaskexecutor.shared.exception.WorkspaceFolderLocked; import org.gcube.common.workspacetaskexecutor.util.EncrypterUtil; @@ -64,6 +66,7 @@ public class WsTaskExecutorWidgetServiceImpl extends RemoteServiceServlet implem private WorkspaceDataMinerTaskExecutor getTaskExecutor(){ GCubeUser user = PortalContextUtil.getUserLogged(this.getThreadLocalRequest()); + logger.trace("Found user "+user+ "in portal context util"); WorkspaceDataMinerTaskExecutor exec = WorkspaceDataMinerTaskExecutor.getInstance(); exec.withOwner(user.getUsername()); return exec; @@ -164,7 +167,7 @@ public class WsTaskExecutorWidgetServiceImpl extends RemoteServiceServlet implem @Override public List checkItemTaskConfigurations(String itemId) throws Exception { - WorkspaceDataMinerTaskExecutor exec = WorkspaceDataMinerTaskExecutor.getInstance(); + WorkspaceDataMinerTaskExecutor exec = getTaskExecutor(); List confs = null; try { confs = exec.checkItemConfigurations(itemId); @@ -216,8 +219,20 @@ public class WsTaskExecutorWidgetServiceImpl extends RemoteServiceServlet implem public List getAvailableParameterTypes() throws Exception { - WorkspaceDataMinerTaskExecutor exec = WorkspaceDataMinerTaskExecutor.getInstance(); + WorkspaceDataMinerTaskExecutor exec = getTaskExecutor(); return exec.getParameterTypes(); } + /* (non-Javadoc) + * @see org.gcube.portlets.widgets.wstaskexecutor.client.rpc.WsTaskExecutorWidgetService#monitorTaskExecutionStatus(org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskConfiguration, org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskComputation) + */ + @Override + public TaskExecutionStatus monitorTaskExecutionStatus( + TaskConfiguration configuration, TaskComputation taskComputation) + throws Exception { + + // TODO Auto-generated method stub + return null; + } + } diff --git a/src/main/resources/org/gcube/portlets/widgets/wstaskexecutor/WsTaskExecutorWidget.gwt.xml b/src/main/resources/org/gcube/portlets/widgets/wstaskexecutor/WsTaskExecutorWidget.gwt.xml index 64df3c2..f3766d2 100644 --- a/src/main/resources/org/gcube/portlets/widgets/wstaskexecutor/WsTaskExecutorWidget.gwt.xml +++ b/src/main/resources/org/gcube/portlets/widgets/wstaskexecutor/WsTaskExecutorWidget.gwt.xml @@ -6,7 +6,7 @@ - + diff --git a/target/profile.xml b/target/profile.xml deleted file mode 100644 index 739deec..0000000 --- a/target/profile.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - Library - - The workspace-task-executor-widget is a widget to execute data miner's algorithms from gCube Workspace - PortletsWidgets - ws-task-executor-widget - 1.0.0 - - - ws-task-executor-widget - 0.1.0-SNAPSHOT - - org.gcube.portlets.widgets - ws-task-executor-widget - 0.1.0-SNAPSHOT - - - ws-task-executor-widget-0.1.0-SNAPSHOT.jar - - - - -