Francesco Mangiacrapa 2018-05-08 14:56:18 +00:00
parent a766c281a3
commit 8d9212b927
9 changed files with 49 additions and 35 deletions

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 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.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=1.7

View File

@ -29,7 +29,7 @@
<gwtVersion>2.7.0</gwtVersion> <gwtVersion>2.7.0</gwtVersion>
<distroDirectory>distro</distroDirectory> <distroDirectory>distro</distroDirectory>
<!-- GWT needs at least java 1.6 --> <!-- GWT needs at least java 1.6 -->
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<!-- <additionalparam>-Xdoclint:none</additionalparam> --> <!-- <additionalparam>-Xdoclint:none</additionalparam> -->
@ -98,8 +98,15 @@
<groupId>org.gcube.common</groupId> <groupId>org.gcube.common</groupId>
<artifactId>authorization-client</artifactId> <artifactId>authorization-client</artifactId>
<version>[2.0.0-SNAPSHOT, 3-0-0-SNAPSHOT)</version> <version>[2.0.0-SNAPSHOT, 3-0-0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency> </dependency>
<!-- PORTAL MANAGER -->
<dependency>
<groupId>org.gcube.common.portal</groupId>
<artifactId>portal-manager</artifactId>
<scope>provided</scope>
</dependency>
<!-- LOGGER --> <!-- LOGGER -->

View File

@ -6,7 +6,7 @@
<!-- Inherit the default GWT style sheet. You can change --> <!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting --> <!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. --> <!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' /> <!-- <inherits name='com.google.gwt.user.theme.standard.Standard' /> -->
<inherits name="com.github.gwtbootstrap.Bootstrap" /> <inherits name="com.github.gwtbootstrap.Bootstrap" />
<inherits name="org.gcube.common.workspacetaskexecutor.WorkspaceTaskExecutor" /> <inherits name="org.gcube.common.workspacetaskexecutor.WorkspaceTaskExecutor" />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> --> <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->

View File

@ -118,6 +118,8 @@ public class WsTaskExecutorWidget {
if(folder==null || folder.getFolderId()==null) if(folder==null || folder.getFolderId()==null)
throw new Exception("Invalid parameter folder null"); throw new Exception("Invalid parameter folder null");
GWT.log("Qui");
MonitorFolderTaskExecutionStatusView monitor = viewManager.getMonitor(folder); MonitorFolderTaskExecutionStatusView monitor = viewManager.getMonitor(folder);

View File

@ -3,7 +3,9 @@ package org.gcube.portlets.widgets.wstaskexecutor.client.rpc;
import java.util.List; import java.util.List;
import org.gcube.common.workspacetaskexecutor.shared.TaskParameterType; 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.TaskConfiguration;
import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskExecutionStatus;
import org.gcube.common.workspacetaskexecutor.shared.exception.ItemNotConfiguredException; import org.gcube.common.workspacetaskexecutor.shared.exception.ItemNotConfiguredException;
import org.gcube.portlets.widgets.wstaskexecutor.shared.GcubeScope; import org.gcube.portlets.widgets.wstaskexecutor.shared.GcubeScope;
@ -28,12 +30,25 @@ public interface WsTaskExecutorWidgetService extends RemoteService {
*/ */
List<GcubeScope> getListOfScopesForLoggedUser() throws Exception; List<GcubeScope> 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. * Check item task configurations.
* *
* @param itemId the item id * @param itemId the item id
* @return the list * @return the list
* @throws ItemNotConfiguredException, Exception * @throws ItemNotConfiguredException the item not configured exception
* @throws Exception the exception
*/ */
List<TaskConfiguration> checkItemTaskConfigurations(String itemId) throws ItemNotConfiguredException, Exception; List<TaskConfiguration> checkItemTaskConfigurations(String itemId) throws ItemNotConfiguredException, Exception;

View File

@ -108,8 +108,8 @@ public class WsTaskExecutorWidgetViewManager {
* @param taskEventsListeners the task events listeners * @param taskEventsListeners the task events listeners
*/ */
public void showMonitorTaskStatusFor( public void showMonitorTaskStatusFor(
WsFolder folder, final WsFolder folder,
final TaskConfiguration configuration, TaskComputation taskComputation, List<TaskCompletedNotificationListner> taskEventsListeners) { final TaskConfiguration configuration, final TaskComputation taskComputation, final List<TaskCompletedNotificationListner> taskEventsListeners) {
GWT.log("showMonitorSyncToFolder for folder: "+folder.getFolderId()); GWT.log("showMonitorSyncToFolder for folder: "+folder.getFolderId());

View File

@ -7,7 +7,9 @@ import java.util.List;
import org.gcube.common.portal.PortalContext; import org.gcube.common.portal.PortalContext;
import org.gcube.common.workspacetaskexecutor.dataminer.WorkspaceDataMinerTaskExecutor; import org.gcube.common.workspacetaskexecutor.dataminer.WorkspaceDataMinerTaskExecutor;
import org.gcube.common.workspacetaskexecutor.shared.TaskParameterType; 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.TaskConfiguration;
import org.gcube.common.workspacetaskexecutor.shared.dataminer.TaskExecutionStatus;
import org.gcube.common.workspacetaskexecutor.shared.exception.ItemNotConfiguredException; import org.gcube.common.workspacetaskexecutor.shared.exception.ItemNotConfiguredException;
import org.gcube.common.workspacetaskexecutor.shared.exception.WorkspaceFolderLocked; import org.gcube.common.workspacetaskexecutor.shared.exception.WorkspaceFolderLocked;
import org.gcube.common.workspacetaskexecutor.util.EncrypterUtil; import org.gcube.common.workspacetaskexecutor.util.EncrypterUtil;
@ -64,6 +66,7 @@ public class WsTaskExecutorWidgetServiceImpl extends RemoteServiceServlet implem
private WorkspaceDataMinerTaskExecutor getTaskExecutor(){ private WorkspaceDataMinerTaskExecutor getTaskExecutor(){
GCubeUser user = PortalContextUtil.getUserLogged(this.getThreadLocalRequest()); GCubeUser user = PortalContextUtil.getUserLogged(this.getThreadLocalRequest());
logger.trace("Found user "+user+ "in portal context util");
WorkspaceDataMinerTaskExecutor exec = WorkspaceDataMinerTaskExecutor.getInstance(); WorkspaceDataMinerTaskExecutor exec = WorkspaceDataMinerTaskExecutor.getInstance();
exec.withOwner(user.getUsername()); exec.withOwner(user.getUsername());
return exec; return exec;
@ -164,7 +167,7 @@ public class WsTaskExecutorWidgetServiceImpl extends RemoteServiceServlet implem
@Override @Override
public List<TaskConfiguration> checkItemTaskConfigurations(String itemId) throws Exception { public List<TaskConfiguration> checkItemTaskConfigurations(String itemId) throws Exception {
WorkspaceDataMinerTaskExecutor exec = WorkspaceDataMinerTaskExecutor.getInstance(); WorkspaceDataMinerTaskExecutor exec = getTaskExecutor();
List<TaskConfiguration> confs = null; List<TaskConfiguration> confs = null;
try { try {
confs = exec.checkItemConfigurations(itemId); confs = exec.checkItemConfigurations(itemId);
@ -216,8 +219,20 @@ public class WsTaskExecutorWidgetServiceImpl extends RemoteServiceServlet implem
public List<TaskParameterType> getAvailableParameterTypes() public List<TaskParameterType> getAvailableParameterTypes()
throws Exception { throws Exception {
WorkspaceDataMinerTaskExecutor exec = WorkspaceDataMinerTaskExecutor.getInstance(); WorkspaceDataMinerTaskExecutor exec = getTaskExecutor();
return exec.getParameterTypes(); 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;
}
} }

View File

@ -6,7 +6,7 @@
<!-- Inherit the default GWT style sheet. You can change --> <!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting --> <!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. --> <!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' /> <!-- <inherits name='com.google.gwt.user.theme.standard.Standard' /> -->
<inherits name="com.github.gwtbootstrap.Bootstrap" /> <inherits name="com.github.gwtbootstrap.Bootstrap" />
<inherits name="org.gcube.common.workspacetaskexecutor.WorkspaceTaskExecutor" /> <inherits name="org.gcube.common.workspacetaskexecutor.WorkspaceTaskExecutor" />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> --> <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID></ID>
<Type>Library</Type>
<Profile>
<Description>The workspace-task-executor-widget is a widget to execute data miner's algorithms from gCube Workspace</Description>
<Class>PortletsWidgets</Class>
<Name>ws-task-executor-widget</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Name>ws-task-executor-widget</Name>
<Version>0.1.0-SNAPSHOT</Version>
<MavenCoordinates>
<groupId>org.gcube.portlets.widgets</groupId>
<artifactId>ws-task-executor-widget</artifactId>
<version>0.1.0-SNAPSHOT</version>
</MavenCoordinates>
<Files>
<File>ws-task-executor-widget-0.1.0-SNAPSHOT.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>