Sensitive data removed

This commit is contained in:
Giancarlo Panichi 2023-01-18 14:07:08 +01:00
parent 521ffcbdbd
commit 0acac8700c
90 changed files with 1211 additions and 1056 deletions

View File

@ -24,8 +24,8 @@
</fileSets>
<files>
<file>
<source>target/${build.finalName***REMOVED***.${project.packaging***REMOVED***</source>
<outputDirectory>/${artifactId***REMOVED***</outputDirectory>
<source>target/${build.finalName}.${project.packaging}</source>
<outputDirectory>/${artifactId}</outputDirectory>
</file>
</files>

50
pom.xml
View File

@ -19,9 +19,9 @@
<description>data-miner-manager-tester offers test support for dataminer service</description>
<scm>
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId***REMOVED***.git</connection>
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId***REMOVED***.git</developerConnection>
<url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId***REMOVED***</url>
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection>
<url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId}</url>
</scm>
<developers>
@ -37,7 +37,7 @@
</developers>
<properties>
<webappDirectory>${project.build.directory***REMOVED***/${project.build.finalName***REMOVED***</webappDirectory>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<distroDirectory>distro</distroDirectory>
<configDirectory>config</configDirectory>
@ -65,7 +65,7 @@
<maven-war-plugin.version>2.6</maven-war-plugin.version>
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
<KEYS>${env.KEYS***REMOVED***</KEYS>
<KEYS>${env.KEYS}</KEYS>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@ -118,14 +118,14 @@
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version***REMOVED***</version>
<version>${gwt.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version***REMOVED***</version>
<version>${gwt.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
@ -137,7 +137,7 @@
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version***REMOVED***</version>
<version>${gwt.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
@ -162,7 +162,7 @@
<dependency>
<groupId>com.gwtplatform</groupId>
<artifactId>gwtp-mvp-client</artifactId>
<version>${gwtp.version***REMOVED***</version>
<version>${gwtp.version}</version>
<scope>provided</scope>
</dependency>
@ -170,28 +170,28 @@
<dependency>
<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material</artifactId>
<version>${gwt-material.version***REMOVED***</version>
<version>${gwt-material.version}</version>
</dependency>
<dependency>
<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material-themes</artifactId>
<version>${gwt-material.version***REMOVED***</version>
<version>${gwt-material.version}</version>
</dependency>
<dependency>
<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material-addins</artifactId>
<version>${gwt-material.version***REMOVED***</version>
<version>${gwt-material.version}</version>
</dependency>
<dependency>
<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material-table</artifactId>
<version>${gwt-material-table.version***REMOVED***</version>
<version>${gwt-material-table.version}</version>
</dependency>
<!-- DI -->
<dependency>
<groupId>com.google.gwt.inject</groupId>
<artifactId>gin</artifactId>
<version>${gin.version***REMOVED***</version>
<version>${gin.version}</version>
<scope>provided</scope>
</dependency>
@ -346,7 +346,7 @@
<build>
<!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>${webappDirectory***REMOVED***/WEB-INF/classes</outputDirectory>
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
@ -361,16 +361,16 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version***REMOVED***</version>
<version>${gwt.version}</version>
<configuration>
<strict>true</strict>
<testTimeOut>180</testTimeOut>
<mode>htmlunit</mode>
<includes>**/*GwtTest.java</includes>
<logLevel>INFO</logLevel>
<runTarget>${gwt.runTarget***REMOVED***</runTarget>
<hostedWebapp>${webappDirectory***REMOVED***</hostedWebapp>
<module>${gwt.module.name***REMOVED***</module>
<runTarget>${gwt.runTarget}</runTarget>
<hostedWebapp>${webappDirectory}</hostedWebapp>
<module>${gwt.module.name}</module>
</configuration>
<executions>
<execution>
@ -392,8 +392,8 @@
</execution>
</executions>
<configuration>
<webappDirectory>${webappDirectory***REMOVED***</webappDirectory>
<warName>${project.build.finalName***REMOVED***</warName>
<webappDirectory>${webappDirectory}</webappDirectory>
<warName>${project.build.finalName}</warName>
</configuration>
</plugin>
@ -401,11 +401,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<!-- <version>${maven-compiler-plugin.version***REMOVED***</version> -->
<!-- <version>${maven-compiler-plugin.version}</version> -->
<configuration>
<source>${maven.compiler.source***REMOVED***</source>
<target>${maven.compiler.target***REMOVED***</target>
<encoding>${project.build.sourceEncoding***REMOVED***</encoding>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>

View File

@ -3,23 +3,23 @@
<ID></ID>
<Type>Service</Type>
<Profile>
<Description>${project.description***REMOVED***</Description>
<Description>${project.description}</Description>
<Class>PortletsUser</Class>
<Name>${project.name***REMOVED***</Name>
<Name>${project.name}</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Description>${project.description***REMOVED***</Description>
<Name>${project.name***REMOVED***</Name>
<Version>${version***REMOVED***</Version>
<Description>${project.description}</Description>
<Name>${project.name}</Name>
<Version>${version}</Version>
<MavenCoordinates>
<groupId>${project.groupId***REMOVED***</groupId>
<artifactId>${project.artifactId***REMOVED***</artifactId>
<version>${project.version***REMOVED***</version>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
</MavenCoordinates>
<Type>webapplication</Type>
<Files>
<File>${project.build.finalName***REMOVED***.${project.packaging***REMOVED***</File>
<File>${project.build.finalName}.${project.packaging}</File>
</Files>
</Software>
</Packages>

View File

@ -29,5 +29,5 @@ public class ApplicationModule extends AbstractPresenterModule {
bindPresenter(ApplicationPresenter.class, ApplicationPresenter.PresenterView.class, ApplicationView.class,
ApplicationPresenter.PresenterProxy.class);
***REMOVED***
***REMOVED***
}
}

View File

@ -2,7 +2,7 @@ package org.gcube.portlets.user.dataminermanagertester.client.application;
import org.gcube.portlets.user.dataminermanagertester.client.application.menu.MenuPresenter;
import org.gcube.portlets.user.dataminermanagertester.client.rpc.DataMinerTesterServiceAsync;
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.Constants;
import org.gcube.portlets.user.dataminermanagertester.shared.session.UserInfo;
import com.google.gwt.core.shared.GWT;
@ -30,11 +30,11 @@ public class ApplicationPresenter
extends Presenter<ApplicationPresenter.PresenterView, ApplicationPresenter.PresenterProxy>
implements NavigationHandler {
interface PresenterView extends View {
***REMOVED***
}
@ProxyStandard
interface PresenterProxy extends Proxy<ApplicationPresenter> {
***REMOVED***
}
public static final PermanentSlot<MenuPresenter> SLOT_MENU = new PermanentSlot<>();
public static final NestedSlot SLOT_MAIN = new NestedSlot();
@ -49,7 +49,7 @@ public class ApplicationPresenter
this.menuPresenter = menuPresenter;
this.service = service;
callHello();
***REMOVED***
}
@Override
protected void onBind() {
@ -58,12 +58,12 @@ public class ApplicationPresenter
setInSlot(SLOT_MENU, menuPresenter);
addRegisteredHandler(NavigationEvent.getType(), this);
***REMOVED***
}
@Override
protected void onReveal() {
super.onReveal();
***REMOVED***
}
@Override
public void onNavigation(NavigationEvent navigationEvent) {
@ -71,7 +71,7 @@ public class ApplicationPresenter
// PlaceRequest placeRequest=navigationEvent.getRequest();
// placeManager.revealPlace(placeRequest);
***REMOVED***
}
private void callHello() {
/* String groupId= GCubeClientContext.getCurrentContextId(); */
@ -87,16 +87,16 @@ public class ApplicationPresenter
MaterialLoader.loading(false);
GWT.log("Error in Hello: ", caught);
***REMOVED***
}
@Override
public void onSuccess(UserInfo result) {
GWT.log("Hello: " + result.getUsername());
MaterialLoader.loading(false);
***REMOVED***
}
***REMOVED***);
});
***REMOVED***
}
***REMOVED***
}

View File

@ -16,7 +16,7 @@ import com.gwtplatform.mvp.client.ViewImpl;
*/
public class ApplicationView extends ViewImpl implements ApplicationPresenter.PresenterView {
interface Binder extends UiBinder<Widget, ApplicationView> {
***REMOVED***
}
@UiField
HTMLPanel menu;
@ -28,7 +28,7 @@ public class ApplicationView extends ViewImpl implements ApplicationPresenter.Pr
initWidget(uiBinder.createAndBindUi(this));
bindSlot(ApplicationPresenter.SLOT_MENU, menu);
bindSlot(ApplicationPresenter.SLOT_MAIN, main);
***REMOVED***
}
***REMOVED***
}

View File

@ -15,7 +15,7 @@ public class SelectableTextCell extends AbstractCell<String> {
public void render(Context context, String value, SafeHtmlBuilder sb) {
if (value != null) {
sb.appendHtmlConstant("<div unselectable='false' >" + value + "</div>");
***REMOVED***
***REMOVED***
}
}
***REMOVED***
}

View File

@ -12,5 +12,5 @@ public class OperatorsDiffModule extends AbstractPresenterModule {
protected void configure() {
bindPresenter(OperatorsDiffPresenter.class, OperatorsDiffPresenter.PresenterView.class,
OperatorsDiffView.class, OperatorsDiffPresenter.PresenterProxy.class);
***REMOVED***
***REMOVED***
}
}

View File

@ -3,7 +3,7 @@ package org.gcube.portlets.user.dataminermanagertester.client.application.diff;
import org.gcube.portlets.user.dataminermanagertester.client.application.ApplicationPresenter;
import org.gcube.portlets.user.dataminermanagertester.client.place.NameTokens;
import org.gcube.portlets.user.dataminermanagertester.client.rpc.DataMinerTesterServiceAsync;
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.Constants;
import org.gcube.portlets.user.dataminermanagertester.shared.config.DMDiffConfig;
import com.google.gwt.core.shared.GWT;
@ -33,13 +33,13 @@ public class OperatorsDiffPresenter
interface PresenterView extends View, HasUiHandlers<OperatorsDiffUiHandlers> {
void setResult(String result, boolean success);
***REMOVED***
}
@ProxyStandard
@NameToken(NameTokens.DIFF)
@NoGatekeeper
interface PresenterProxy extends ProxyPlace<OperatorsDiffPresenter> {
***REMOVED***
}
private DataMinerTesterServiceAsync service;
@ -50,12 +50,12 @@ public class OperatorsDiffPresenter
this.service = service;
getView().setUiHandlers(this);
***REMOVED***
}
@Override
public void executeDiff(DMDiffConfig operatorsDiffConfig) {
callOperatorsDiff(operatorsDiffConfig);
***REMOVED***
}
private void callOperatorsDiff(DMDiffConfig operatorsDiffConfig) {
MaterialLoader.loading(true);
@ -67,22 +67,22 @@ public class OperatorsDiffPresenter
String result = SafeHtmlUtils.htmlEscape(caught.getLocalizedMessage());
MaterialLoader.loading(false);
getView().setResult(result, false);
***REMOVED***
}
@Override
public void onSuccess(String result) {
MaterialLoader.loading(false);
getView().setResult(result, true);
***REMOVED***
}
***REMOVED***);
});
***REMOVED***
}
private String getToken() {
String token = Window.Location.getParameter(Constants.TOKEN);
GWT.log("Token: " + token);
return token;
***REMOVED***
}
***REMOVED***
}

View File

@ -13,4 +13,4 @@ import com.gwtplatform.mvp.client.UiHandlers;
interface OperatorsDiffUiHandlers extends UiHandlers {
void executeDiff(DMDiffConfig operatorsDiffConfig);
***REMOVED***
}

View File

@ -30,7 +30,7 @@ import gwt.material.design.client.ui.animate.Transition;
class OperatorsDiffView extends ViewWithUiHandlers<OperatorsDiffUiHandlers>
implements OperatorsDiffPresenter.PresenterView {
interface Binder extends UiBinder<Widget, OperatorsDiffView> {
***REMOVED***
}
@UiField
MaterialTextBox dm1;
@ -62,19 +62,19 @@ class OperatorsDiffView extends ViewWithUiHandlers<OperatorsDiffUiHandlers>
protocolType.clear();
for (ProtocolType tType : ProtocolType.values()) {
protocolType.add(tType.getLabel());
***REMOVED***
}
dm1.setAllowBlank(false);
token1.setAllowBlank(false);
dm2.setAllowBlank(false);
token2.setAllowBlank(false);
***REMOVED***
}
@UiHandler("run")
void onClick(ClickEvent e) {
if (!dm1.validate() || !token1.validate() || !dm2.validate() || !token2.validate()) {
return;
***REMOVED***
}
String dm1Value = dm1.getValue();
String token1Value = token1.getValue();
@ -89,7 +89,7 @@ class OperatorsDiffView extends ViewWithUiHandlers<OperatorsDiffUiHandlers>
DMDiffConfig operatorsDiffConfig = new DMDiffConfig(dm1Value, token1Value, dm2Value,
token2Value, protocolValue);
getUiHandlers().executeDiff(operatorsDiffConfig);
***REMOVED***
}
@Override
public void setResult(String resultValue, boolean success) {
@ -99,11 +99,11 @@ class OperatorsDiffView extends ViewWithUiHandlers<OperatorsDiffUiHandlers>
resultIcon.setIconType(IconType.CHECK_CIRCLE);
resultIcon.setBackgroundColor(Color.GREEN);
resultIcon.setIconFontSize(4.0, Unit.EM);
***REMOVED*** else {
} else {
resultIcon.setIconType(IconType.ERROR);
resultIcon.setBackgroundColor(Color.RED);
resultIcon.setIconFontSize(4.0, Unit.EM);
***REMOVED***
}
MaterialAnimation animation = new MaterialAnimation();
animation.setDelay(0);
animation.setDuration(1000);
@ -113,6 +113,6 @@ class OperatorsDiffView extends ViewWithUiHandlers<OperatorsDiffUiHandlers>
result.setLength(resultValue.length());
result.setValue(resultValue);
***REMOVED***
}
***REMOVED***
}

View File

@ -8,5 +8,5 @@ public class HelpModule extends AbstractPresenterModule {
protected void configure() {
bindPresenter(HelpPresenter.class, HelpPresenter.PresenterView.class,
HelpView.class, HelpPresenter.PresenterProxy.class);
***REMOVED***
***REMOVED***
}
}

View File

@ -21,16 +21,16 @@ import com.gwtplatform.mvp.client.proxy.ProxyPlace;
*/
public class HelpPresenter extends Presenter<HelpPresenter.PresenterView, HelpPresenter.PresenterProxy> {
interface PresenterView extends View {
***REMOVED***
}
@ProxyStandard
@NameToken(NameTokens.HELP)
interface PresenterProxy extends ProxyPlace<HelpPresenter> {
***REMOVED***
}
@Inject
HelpPresenter(EventBus eventBus, PresenterView view, PresenterProxy proxy) {
super(eventBus, view, proxy, ApplicationPresenter.SLOT_MAIN);
***REMOVED***
}
***REMOVED***
}

View File

@ -14,11 +14,11 @@ import com.gwtplatform.mvp.client.ViewImpl;
*/
class HelpView extends ViewImpl implements HelpPresenter.PresenterView {
interface Binder extends UiBinder<Widget, HelpView> {
***REMOVED***
}
@Inject
HelpView(Binder uiBinder) {
initWidget(uiBinder.createAndBindUi(this));
***REMOVED***
}
***REMOVED***
}

View File

@ -12,5 +12,5 @@ public class HomeModule extends AbstractPresenterModule {
@Override
protected void configure() {
bindPresenter(HomePresenter.class, HomePresenter.PresenterView.class, HomeView.class, HomePresenter.PresenterProxy.class);
***REMOVED***
***REMOVED***
}
}

View File

@ -24,19 +24,19 @@ import com.gwtplatform.mvp.client.proxy.ProxyPlace;
public class HomePresenter extends Presenter<HomePresenter.PresenterView, HomePresenter.PresenterProxy>
implements HomeUiHandlers {
interface PresenterView extends View, HasUiHandlers<HomePresenter> {
***REMOVED***
}
@ProxyStandard
@NameToken(NameTokens.HOME)
@NoGatekeeper
interface PresenterProxy extends ProxyPlace<HomePresenter> {
***REMOVED***
}
@Inject
HomePresenter(EventBus eventBus, PresenterView view, PresenterProxy proxy) {
super(eventBus, view, proxy, ApplicationPresenter.SLOT_MAIN);
getView().setUiHandlers(this);
***REMOVED***
}
***REMOVED***
}

View File

@ -10,4 +10,4 @@ import com.gwtplatform.mvp.client.UiHandlers;
*/
public interface HomeUiHandlers extends UiHandlers{
***REMOVED***
}

View File

@ -14,10 +14,10 @@ import com.gwtplatform.mvp.client.ViewWithUiHandlers;
*/
public class HomeView extends ViewWithUiHandlers<HomePresenter> implements HomePresenter.PresenterView {
interface Binder extends UiBinder<Widget, HomeView> {
***REMOVED***
}
@Inject
HomeView(Binder uiBinder) {
initWidget(uiBinder.createAndBindUi(this));
***REMOVED***
***REMOVED***
}
}

View File

@ -12,5 +12,5 @@ public class MenuModule extends AbstractPresenterModule {
@Override
protected void configure() {
bindSingletonPresenterWidget(MenuPresenter.class, MenuPresenter.PresenterView.class, MenuView.class);
***REMOVED***
***REMOVED***
}
}

View File

@ -20,28 +20,28 @@ import com.gwtplatform.mvp.client.proxy.NavigationHandler;
public class MenuPresenter extends PresenterWidget<MenuPresenter.PresenterView> implements MenuUiHandlers, NavigationHandler {
interface PresenterView extends View, HasUiHandlers<MenuUiHandlers> {
***REMOVED***
}
@Inject
MenuPresenter(EventBus eventBus, PresenterView view) {
super(eventBus, view);
getView().setUiHandlers(this);
***REMOVED***
}
@Override
protected void onBind() {
super.onBind();
addRegisteredHandler(NavigationEvent.getType(), this);
***REMOVED***
}
@Override
public void setContentPush() {
ContentPushEvent.fire(this);
***REMOVED***
}
@Override
public void onNavigation(NavigationEvent navigationEvent) {
***REMOVED***
}
***REMOVED***
}

View File

@ -11,4 +11,4 @@ import com.gwtplatform.mvp.client.UiHandlers;
interface MenuUiHandlers extends UiHandlers {
void setContentPush();
***REMOVED***
}

View File

@ -20,7 +20,7 @@ import gwt.material.design.client.ui.MaterialSideNavPush;
class MenuView extends ViewWithUiHandlers<MenuUiHandlers> implements MenuPresenter.PresenterView {
interface Binder extends UiBinder<Widget, MenuView> {
***REMOVED***
}
@UiField
MaterialHeader header;
@ -36,6 +36,6 @@ class MenuView extends ViewWithUiHandlers<MenuUiHandlers> implements MenuPresent
sideNav.addOpenedHandler(event -> getUiHandlers().setContentPush());
sideNav.addClosedHandler(event -> getUiHandlers().setContentPush());
***REMOVED***
}
***REMOVED***
}

View File

@ -20,21 +20,21 @@
<m:MaterialSideNavPush ui:field="sideNav" m:id="sidenav"
width="280" withHeader="true" showOnAttach="true">
<!-- <ma:sideprofile.MaterialSideProfile url="{res.sideNavProfileBackground.getSafeUri.asString***REMOVED***">
<m:MaterialImage url="{res.panda.getSafeUri.asString***REMOVED***" /> <m:MaterialLabel
<!-- <ma:sideprofile.MaterialSideProfile url="{res.sideNavProfileBackground.getSafeUri.asString}">
<m:MaterialImage url="{res.panda.getSafeUri.asString}" /> <m:MaterialLabel
text="PandA" textColor="WHITE" /> <m:MaterialLink text="panda@isti.cnr.it"
activates="dropProfile" textColor="WHITE" /> </ma:sideprofile.MaterialSideProfile> -->
<!--
<m:MaterialLink text="Home" iconType="LABEL_OUTLINE"
targetHistoryToken="{tokens.getHome***REMOVED***" /> -->
targetHistoryToken="{tokens.getHome}" /> -->
<m:MaterialLink text="Test" iconType="LABEL_OUTLINE"
targetHistoryToken="{tokens.getTest***REMOVED***" />
targetHistoryToken="{tokens.getTest}" />
<m:MaterialLink text="Batch" iconType="LABEL_OUTLINE"
targetHistoryToken="{tokens.getBatch***REMOVED***" />
targetHistoryToken="{tokens.getBatch}" />
<m:MaterialLink text="Diff" iconType="LABEL_OUTLINE"
targetHistoryToken="{tokens.getDiff***REMOVED***" />
targetHistoryToken="{tokens.getDiff}" />
<m:MaterialLink text="Help" iconType="LABEL_OUTLINE"
targetHistoryToken="{tokens.getHelp***REMOVED***" />
targetHistoryToken="{tokens.getHelp}" />
</m:MaterialSideNavPush>
</m:MaterialPanel>

View File

@ -1,7 +1,7 @@
package org.gcube.portlets.user.dataminermanagertester.client.application.monitor;
import org.gcube.portlets.user.dataminermanagertester.client.application.monitor.MonitorRequestEvent.MonitorRequestEventHandler;
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.Constants;
import com.google.gwt.user.client.Timer;
@ -21,46 +21,46 @@ public class MonitorRequest {
monitor = new Timer() {
public void run() {
executeCommand();
***REMOVED***
***REMOVED***;
}
};
***REMOVED***
}
private void stopMonitor() {
if (monitor.isRunning()) {
monitor.cancel();
***REMOVED***
}
***REMOVED***
}
private void executeCommand() {
MonitorRequestEvent event = new MonitorRequestEvent();
handler.onMonitor(event);
***REMOVED***
}
public void addHandler(MonitorRequestEventHandler handler) {
this.handler = handler;
***REMOVED***
}
public void start() {
startSchedule();
***REMOVED***
}
private void startSchedule() {
// Execute the timer to expire 2 seconds in the future
monitor.schedule(Constants.CLIENT_MONITOR_PERIODMILLIS);
***REMOVED***
}
public void repeat() {
monitor.schedule(Constants.CLIENT_MONITOR_PERIODMILLIS);
***REMOVED***
}
public void stop() {
stopMonitor();
***REMOVED***
}
***REMOVED***
}

View File

@ -20,41 +20,41 @@ public class MonitorRequestEvent extends
public interface MonitorRequestEventHandler extends EventHandler {
void onMonitor(MonitorRequestEvent event);
***REMOVED***
}
public interface HasMonitorRequestEventHandler extends HasHandlers {
public HandlerRegistration addMonitorRequestEventHandler(
MonitorRequestEventHandler handler);
***REMOVED***
}
public MonitorRequestEvent() {
***REMOVED***
}
@Override
protected void dispatch(MonitorRequestEventHandler handler) {
handler.onMonitor(this);
***REMOVED***
}
@Override
public Type<MonitorRequestEventHandler> getAssociatedType() {
return TYPE;
***REMOVED***
}
public static Type<MonitorRequestEventHandler> getType() {
return TYPE;
***REMOVED***
}
public static void fire(HasHandlers source, MonitorRequestEvent event) {
source.fireEvent(event);
***REMOVED***
}
@Override
public String toString() {
return "MonitorRequestEvent []";
***REMOVED***
}
***REMOVED***
}

View File

@ -12,5 +12,5 @@ public class TestBatchConfModule extends AbstractPresenterModule {
protected void configure() {
bindPresenter(TestBatchConfPresenter.class, TestBatchConfPresenter.PresenterView.class,
TestBatchConfView.class, TestBatchConfPresenter.PresenterProxy.class);
***REMOVED***
***REMOVED***
}
}

View File

@ -10,7 +10,7 @@ import org.gcube.portlets.user.dataminermanagertester.client.application.monitor
import org.gcube.portlets.user.dataminermanagertester.client.application.monitor.MonitorRequestEvent.MonitorRequestEventHandler;
import org.gcube.portlets.user.dataminermanagertester.client.place.NameTokens;
import org.gcube.portlets.user.dataminermanagertester.client.rpc.DataMinerTesterServiceAsync;
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.Constants;
import org.gcube.portlets.user.dataminermanagertester.shared.config.DMBatchConfig;
import org.gcube.portlets.user.dataminermanagertester.shared.result.BatchTestResult;
import org.gcube.portlets.user.dataminermanagertester.shared.result.BatchTestRow;
@ -50,13 +50,13 @@ public class TestBatchConfPresenter
void setupOptions();
***REMOVED***
}
@ProxyStandard
@NameToken(NameTokens.BATCH)
@NoGatekeeper
interface PresenterProxy extends ProxyPlace<TestBatchConfPresenter> {
***REMOVED***
}
private DataMinerTesterServiceAsync service;
@ -67,22 +67,22 @@ public class TestBatchConfPresenter
this.service = service;
getView().setUiHandlers(this);
***REMOVED***
}
@Override
protected void onBind() {
super.onBind();
getView().setupOptions();
getView().setupTable();
***REMOVED***
}
@Override
public void executeBatchTest(DMBatchConfig dmBatchConfig) {
if (dmBatchConfig.getTestType() != null && !dmBatchConfig.getTestType().isEmpty()) {
testBatch(dmBatchConfig);
***REMOVED***
}
***REMOVED***
}
private void testBatch(DMBatchConfig dmBatchConfig) {
MaterialLoader.loading(true);
@ -95,20 +95,20 @@ public class TestBatchConfPresenter
StackTraceElement[] trace = caught.getStackTrace();
for (int i = 0; i < trace.length; i++) {
result += SafeHtmlUtils.htmlEscape(trace[i].toString()) + "\n";
***REMOVED***
}
MaterialLoader.loading(false);
getView().setResult(result, false);
***REMOVED***
}
@Override
public void onSuccess(String computationId) {
monitorBatchTest(dmBatchConfig, computationId);
***REMOVED***
}
***REMOVED***);
});
***REMOVED***
}
private void monitorBatchTest(DMBatchConfig dmBatchConfig, String computationId) {
final MonitorRequest monitorRequest = new MonitorRequest();
@ -126,10 +126,10 @@ public class TestBatchConfPresenter
StackTraceElement[] trace = caught.getStackTrace();
for (int i = 0; i < trace.length; i++) {
result += SafeHtmlUtils.htmlEscape(trace[i].toString()) + "\n";
***REMOVED***
}
MaterialLoader.loading(false);
getView().setResult(result, false);
***REMOVED***
}
@Override
public void onSuccess(TaskStatus taskStatus) {
@ -137,33 +137,33 @@ public class TestBatchConfPresenter
switch (taskStatus) {
case COMPLETED:
retrieveBatchTestOutput(dmBatchConfig, computationId);
***REMOVED***
break;
case ERROR:
monitorRequest.stop();
GWT.log("Error test failed");
MaterialLoader.loading(false);
getView().setResult("Error test failed", false);
***REMOVED***
break;
case RUNNING:
case STARTED:
default:
monitorRequest.repeat();
***REMOVED***
***REMOVED***
***REMOVED*** else {
break;
}
} else {
monitorRequest.repeat();
***REMOVED***
***REMOVED***
}
}
***REMOVED***);
***REMOVED***
});
}
***REMOVED***;
};
monitorRequest.addHandler(handler);
monitorRequest.start();
***REMOVED***
}
private void retrieveBatchTestOutput(DMBatchConfig dmBatchConfig, String computationId) {
service.retrieveOutputForBatchTest(getToken(), computationId, new AsyncCallback<BatchTestResult>() {
@ -176,10 +176,10 @@ public class TestBatchConfPresenter
StackTraceElement[] trace = caught.getStackTrace();
for (int i = 0; i < trace.length; i++) {
result += SafeHtmlUtils.htmlEscape(trace[i].toString()) + "\n";
***REMOVED***
}
MaterialLoader.loading(false);
getView().setResult(result, false);
***REMOVED***
}
@Override
public void onSuccess(BatchTestResult batchTestResult) {
@ -192,25 +192,25 @@ public class TestBatchConfPresenter
BatchTestRow batchTestRow;
if (status.compareTo(Status.COMPLETE) == 0) {
batchTestRow = new BatchTestRow(url, status, singleTestResult.getResponse());
***REMOVED*** else {
} else {
Exception e = singleTestResult.getComputationStatus().getError();
batchTestRow = new BatchTestRow(url, status, e.getLocalizedMessage());
***REMOVED***
}
batchTestRows.add(batchTestRow);
***REMOVED***
}
getView().setResultTable(batchTestRows);
***REMOVED***
}
***REMOVED***);
});
***REMOVED***
}
private String getToken() {
String token = Window.Location.getParameter(Constants.TOKEN);
GWT.log("Token: " + token);
return token;
***REMOVED***
}
***REMOVED***
}

View File

@ -13,4 +13,4 @@ import com.gwtplatform.mvp.client.UiHandlers;
interface TestBatchConfUiHandlers extends UiHandlers {
void executeBatchTest(DMBatchConfig dmBatchConfig);
***REMOVED***
}

View File

@ -48,7 +48,7 @@ import gwt.material.design.client.ui.table.cell.WidgetColumn;
class TestBatchConfView extends ViewWithUiHandlers<TestBatchConfUiHandlers>
implements TestBatchConfPresenter.PresenterView {
interface Binder extends UiBinder<Widget, TestBatchConfView> {
***REMOVED***
}
@UiField
MaterialTextArea dms;
@ -80,20 +80,20 @@ class TestBatchConfView extends ViewWithUiHandlers<TestBatchConfUiHandlers>
testType.clear();
for (TestType tType : TestType.values()) {
testType.add(tType.getLabel());
***REMOVED***
}
protocolType.clear();
for (ProtocolType tType : ProtocolType.values()) {
protocolType.add(tType.getLabel());
***REMOVED***
}
dms.setAllowBlank(false);
token.setAllowBlank(false);
***REMOVED***
}
@UiHandler("run")
void onClick(ClickEvent e) {
if (!dms.validate() || !token.validate()) {
return;
***REMOVED***
}
String dmsValue = dms.getValue();
String tokenValue = token.getValue();
@ -110,14 +110,14 @@ class TestBatchConfView extends ViewWithUiHandlers<TestBatchConfUiHandlers>
dmList = new ArrayList<>(Arrays.asList(urlsArray));
dmList.removeAll(Arrays.asList("", null));
***REMOVED*** else {
} else {
dmList = new ArrayList<>();
dmList.add(dmsValue);
***REMOVED***
}
DMBatchConfig dmBatchConfig = new DMBatchConfig(dmList, tokenValue, protocolValue, testTypeValue);
getUiHandlers().executeBatchTest(dmBatchConfig);
***REMOVED***
}
@Override
public void setResult(String resultValue, boolean success) {
@ -127,11 +127,11 @@ class TestBatchConfView extends ViewWithUiHandlers<TestBatchConfUiHandlers>
resultIcon.setIconType(IconType.CHECK_CIRCLE);
resultIcon.setBackgroundColor(Color.GREEN);
resultIcon.setIconFontSize(4.0, Unit.EM);
***REMOVED*** else {
} else {
resultIcon.setIconType(IconType.ERROR);
resultIcon.setBackgroundColor(Color.RED);
resultIcon.setIconFontSize(4.0, Unit.EM);
***REMOVED***
}
MaterialAnimation animation = new MaterialAnimation();
animation.setDelay(0);
animation.setDuration(1000);
@ -142,7 +142,7 @@ class TestBatchConfView extends ViewWithUiHandlers<TestBatchConfUiHandlers>
result.setValue(resultValue);
// result.reinitialize();
***REMOVED***
}
@Override
public void setupTable() {
@ -151,13 +151,13 @@ class TestBatchConfView extends ViewWithUiHandlers<TestBatchConfUiHandlers>
@Override
public String getValue(BatchTestRow batchTestRow) {
return batchTestRow.getUrl();
***REMOVED***
}
@Override
public boolean sortable() {
return true;
***REMOVED***
***REMOVED***;
}
};
dataminerColumn.textAlign(TextAlign.LEFT);
dataminerColumn.styleProperty(StyleName.WHITE_SPACE, "normal");
@ -170,7 +170,7 @@ class TestBatchConfView extends ViewWithUiHandlers<TestBatchConfUiHandlers>
Status status = batchTestRow.getStatus();
if (status == null) {
icon = new MaterialIcon(IconType.ERROR, Color.RED, Color.WHITE);
***REMOVED*** else {
} else {
switch (status) {
case COMPLETE:
icon = new MaterialIcon(IconType.CHECK_CIRCLE, Color.GREEN, Color.WHITE);
@ -185,17 +185,17 @@ class TestBatchConfView extends ViewWithUiHandlers<TestBatchConfUiHandlers>
default:
icon = new MaterialIcon(IconType.REPORT_PROBLEM, Color.YELLOW, Color.WHITE);
break;
***REMOVED***
***REMOVED***
}
}
panel.add(icon);
return panel;
***REMOVED***
}
@Override
public boolean sortable() {
return true;
***REMOVED***
***REMOVED***;
}
};
statusColumn.textAlign(TextAlign.CENTER);
WidgetColumn<BatchTestRow, MaterialPanel> responseColumn = new WidgetColumn<BatchTestRow, MaterialPanel>() {
@ -209,20 +209,20 @@ class TestBatchConfView extends ViewWithUiHandlers<TestBatchConfUiHandlers>
HTMLPanel hpanel = new HTMLPanel(sb.toSafeHtml());
panel.add(hpanel);
return panel;
***REMOVED***
}
@Override
public boolean sortable() {
return true;
***REMOVED***
***REMOVED***;
}
};
responseColumn.textAlign(TextAlign.LEFT);
resultsTable.addColumn("DataMiner", dataminerColumn);
resultsTable.addColumn("Status", statusColumn);
resultsTable.addColumn("Response", responseColumn);
***REMOVED***
}
@Override
public void setResultTable(ArrayList<BatchTestRow> batchTestRows) {
@ -234,18 +234,18 @@ class TestBatchConfView extends ViewWithUiHandlers<TestBatchConfUiHandlers>
if (batchTestRow.getStatus()==null||batchTestRow.getStatus().compareTo(Status.COMPLETE) != 0) {
success = false;
break;
***REMOVED***
***REMOVED***
}
}
if (success) {
resultIcon.setIconType(IconType.CHECK_CIRCLE);
resultIcon.setBackgroundColor(Color.GREEN);
resultIcon.setIconFontSize(4.0, Unit.EM);
***REMOVED*** else {
} else {
resultIcon.setIconType(IconType.ERROR);
resultIcon.setBackgroundColor(Color.RED);
resultIcon.setIconFontSize(4.0, Unit.EM);
***REMOVED***
}
MaterialAnimation animation = new MaterialAnimation();
animation.setDelay(0);
@ -259,7 +259,7 @@ class TestBatchConfView extends ViewWithUiHandlers<TestBatchConfUiHandlers>
resultsTable.getView().refresh();
reload();
***REMOVED***
}
@Override
public void setupOptions() {
@ -270,11 +270,11 @@ class TestBatchConfView extends ViewWithUiHandlers<TestBatchConfUiHandlers>
// Density
resultsTable.setDensity(DisplayDensity.DEFAULT);
***REMOVED***
}
public void reload() {
resultsTable.getView().setRedraw(true);
resultsTable.getView().refresh();
***REMOVED***
}
***REMOVED***
}

View File

@ -12,5 +12,5 @@ public class TestConfModule extends AbstractPresenterModule {
protected void configure() {
bindPresenter(TestConfPresenter.class, TestConfPresenter.PresenterView.class,
TestConfView.class, TestConfPresenter.PresenterProxy.class);
***REMOVED***
***REMOVED***
}
}

View File

@ -8,7 +8,7 @@ import org.gcube.portlets.user.dataminermanagertester.client.application.monitor
import org.gcube.portlets.user.dataminermanagertester.client.application.monitor.MonitorRequestEvent.MonitorRequestEventHandler;
import org.gcube.portlets.user.dataminermanagertester.client.place.NameTokens;
import org.gcube.portlets.user.dataminermanagertester.client.rpc.DataMinerTesterServiceAsync;
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.Constants;
import org.gcube.portlets.user.dataminermanagertester.shared.config.DMConfig;
import org.gcube.portlets.user.dataminermanagertester.shared.config.TestType;
@ -38,13 +38,13 @@ public class TestConfPresenter extends Presenter<TestConfPresenter.PresenterView
interface PresenterView extends View, HasUiHandlers<TestConfUiHandlers> {
void setResult(String result, boolean success);
***REMOVED***
}
@ProxyStandard
@NameToken(NameTokens.TEST)
@NoGatekeeper
interface PresenterProxy extends ProxyPlace<TestConfPresenter> {
***REMOVED***
}
private DataMinerTesterServiceAsync service;
@ -55,7 +55,7 @@ public class TestConfPresenter extends Presenter<TestConfPresenter.PresenterView
this.service = service;
getView().setUiHandlers(this);
***REMOVED***
}
@Override
public void executeTest(DMConfig dmConfig) {
@ -82,10 +82,10 @@ public class TestConfPresenter extends Presenter<TestConfPresenter.PresenterView
default:
break;
***REMOVED***
***REMOVED***
}
}
***REMOVED***
}
private void callGetCapabilities(DMConfig dmConfig) {
MaterialLoader.loading(true);
@ -97,17 +97,17 @@ public class TestConfPresenter extends Presenter<TestConfPresenter.PresenterView
String result = SafeHtmlUtils.htmlEscape(caught.getLocalizedMessage());
MaterialLoader.loading(false);
getView().setResult(result, false);
***REMOVED***
}
@Override
public void onSuccess(String result) {
MaterialLoader.loading(false);
getView().setResult(result, true);
***REMOVED***
}
***REMOVED***);
});
***REMOVED***
}
private void testSimple(DMConfig dmConfig) {
MaterialLoader.loading(true);
@ -120,20 +120,20 @@ public class TestConfPresenter extends Presenter<TestConfPresenter.PresenterView
StackTraceElement[] trace = caught.getStackTrace();
for (int i = 0; i < trace.length; i++) {
result += SafeHtmlUtils.htmlEscape(trace[i].toString()) + "\n";
***REMOVED***
}
MaterialLoader.loading(false);
getView().setResult(result, false);
***REMOVED***
}
@Override
public void onSuccess(ComputationId computationId) {
monitorSimpleTest(dmConfig, computationId);
***REMOVED***
}
***REMOVED***);
});
***REMOVED***
}
private void monitorSimpleTest(DMConfig dmConfig, ComputationId computationId) {
final MonitorRequest monitorRequest = new MonitorRequest();
@ -151,10 +151,10 @@ public class TestConfPresenter extends Presenter<TestConfPresenter.PresenterView
StackTraceElement[] trace = caught.getStackTrace();
for (int i = 0; i < trace.length; i++) {
result += SafeHtmlUtils.htmlEscape(trace[i].toString()) + "\n";
***REMOVED***
}
MaterialLoader.loading(false);
getView().setResult(result, false);
***REMOVED***
}
@Override
public void onSuccess(Status status) {
@ -162,37 +162,37 @@ public class TestConfPresenter extends Presenter<TestConfPresenter.PresenterView
switch (status) {
case COMPLETE:
retrieveSimpleTestOutput(dmConfig, computationId);
***REMOVED***
break;
case CANCELLED:
case FAILED:
monitorRequest.stop();
GWT.log("Error test failed");
MaterialLoader.loading(false);
getView().setResult("Error test failed", false);
***REMOVED***
break;
case RUNNING:
case ACCEPTED:
default:
monitorRequest.repeat();
***REMOVED***
break;
***REMOVED***
***REMOVED*** else {
}
} else {
monitorRequest.repeat();
***REMOVED***
}
***REMOVED***
}
***REMOVED***);
***REMOVED***
});
}
***REMOVED***;
};
monitorRequest.addHandler(handler);
monitorRequest.start();
***REMOVED***
}
private void retrieveSimpleTestOutput(DMConfig dmConfig, ComputationId computationId) {
service.retrieveOutputForSimpleTest(getToken(), dmConfig, computationId, new AsyncCallback<String>() {
@ -205,26 +205,26 @@ public class TestConfPresenter extends Presenter<TestConfPresenter.PresenterView
StackTraceElement[] trace = caught.getStackTrace();
for (int i = 0; i < trace.length; i++) {
result += SafeHtmlUtils.htmlEscape(trace[i].toString()) + "\n";
***REMOVED***
}
MaterialLoader.loading(false);
getView().setResult(result, false);
***REMOVED***
}
@Override
public void onSuccess(String result) {
MaterialLoader.loading(false);
getView().setResult(result, true);
***REMOVED***
}
***REMOVED***);
});
***REMOVED***
}
private String getToken() {
String token = Window.Location.getParameter(Constants.TOKEN);
GWT.log("Token: " + token);
return token;
***REMOVED***
}
***REMOVED***
}

View File

@ -13,4 +13,4 @@ import com.gwtplatform.mvp.client.UiHandlers;
interface TestConfUiHandlers extends UiHandlers {
void executeTest(DMConfig dmConfig);
***REMOVED***
}

View File

@ -30,7 +30,7 @@ import gwt.material.design.client.ui.animate.Transition;
*/
class TestConfView extends ViewWithUiHandlers<TestConfUiHandlers> implements TestConfPresenter.PresenterView {
interface Binder extends UiBinder<Widget, TestConfView> {
***REMOVED***
}
@UiField
MaterialTextBox dm;
@ -59,20 +59,20 @@ class TestConfView extends ViewWithUiHandlers<TestConfUiHandlers> implements Tes
testType.clear();
for (TestType tType : TestType.values()) {
testType.add(tType.getLabel());
***REMOVED***
}
protocolType.clear();
for (ProtocolType tType : ProtocolType.values()) {
protocolType.add(tType.getLabel());
***REMOVED***
}
dm.setAllowBlank(false);
token.setAllowBlank(false);
***REMOVED***
}
@UiHandler("run")
void onClick(ClickEvent e) {
if (!dm.validate() || !token.validate()) {
return;
***REMOVED***
}
String dmValue = dm.getValue();
String tokenValue = token.getValue();
@ -84,7 +84,7 @@ class TestConfView extends ViewWithUiHandlers<TestConfUiHandlers> implements Tes
DMConfig dmConfig = new DMConfig(dmValue, tokenValue, protocolValue,testTypeValue);
getUiHandlers().executeTest(dmConfig);
***REMOVED***
}
@Override
public void setResult(String resultValue, boolean success) {
@ -94,11 +94,11 @@ class TestConfView extends ViewWithUiHandlers<TestConfUiHandlers> implements Tes
resultIcon.setIconType(IconType.CHECK_CIRCLE);
resultIcon.setBackgroundColor(Color.GREEN);
resultIcon.setIconFontSize(4.0, Unit.EM);
***REMOVED*** else {
} else {
resultIcon.setIconType(IconType.ERROR);
resultIcon.setBackgroundColor(Color.RED);
resultIcon.setIconFontSize(4.0, Unit.EM);
***REMOVED***
}
MaterialAnimation animation = new MaterialAnimation();
animation.setDelay(0);
animation.setDuration(1000);
@ -109,6 +109,6 @@ class TestConfView extends ViewWithUiHandlers<TestConfUiHandlers> implements Tes
result.setValue(resultValue);
// result.reinitialize();
***REMOVED***
}
***REMOVED***
}

View File

@ -14,24 +14,24 @@ public class ContentPushEvent extends GwtEvent<ContentPushEvent.ContentPushHandl
public interface ContentPushHandler extends EventHandler {
void onContentPush(ContentPushEvent event);
***REMOVED***
}
public static final Type<ContentPushHandler> TYPE = new Type<>();
public ContentPushEvent() {***REMOVED***
public ContentPushEvent() {}
public static void fire(HasHandlers source) {
source.fireEvent(new ContentPushEvent());
***REMOVED***
}
@Override
public Type<ContentPushHandler> getAssociatedType() {
return TYPE;
***REMOVED***
}
@Override
protected void dispatch(ContentPushHandler handler) {
handler.onContentPush(this);
***REMOVED***
***REMOVED***
}
}

View File

@ -27,16 +27,16 @@ public class CustomRootPresenter extends RootPresenter {
if (root != null) {
GWT.log("Add Panel in Div " + SM_DIV);
root.add(widget);
***REMOVED***
} else {
GWT.log("Add Panel in Root");
RootPanel.get().add(widget);
***REMOVED***
}
***REMOVED***
***REMOVED***
}
}
@Inject
CustomRootPresenter(EventBus eventBus, CustomRootView myRootView) {
super( eventBus, myRootView );
***REMOVED***
***REMOVED***
}
}

View File

@ -36,6 +36,6 @@ public class DataMinerManagerTesterClientModule extends AbstractPresenterModule
bindConstant().annotatedWith(DefaultPlace.class).to(NameTokens.TEST);
bindConstant().annotatedWith(ErrorPlace.class).to(NameTokens.TEST);
bindConstant().annotatedWith(UnauthorizedPlace.class).to(NameTokens.TEST);
***REMOVED***
}
***REMOVED***
}

View File

@ -15,22 +15,22 @@ public class NameTokens {
public static String getHome() {
return HOME;
***REMOVED***
}
public static String getHelp() {
return HELP;
***REMOVED***
}
public static String getTest() {
return TEST;
***REMOVED***
}
public static String getDiff() {
return DIFF;
***REMOVED***
}
public static String getBatch() {
return BATCH;
***REMOVED***
}
***REMOVED***
}

View File

@ -11,5 +11,5 @@ public class TokenParameters {
public static String getId() {
return ID;
***REMOVED***
***REMOVED***
}
}

View File

@ -11,15 +11,15 @@ import com.google.gwt.resources.client.CssResource;
*/
public interface AppResources extends ClientBundle {
interface Normalize extends CssResource {
***REMOVED***
}
interface Style extends CssResource {
String sideNavPBg();
***REMOVED***
}
interface PageTable extends CssResource {
***REMOVED***
}
@ -32,4 +32,4 @@ public interface AppResources extends ClientBundle {
@Source("css/pageTable.gss")
PageTable pageTable();
***REMOVED***
}

View File

@ -16,5 +16,5 @@ public class ResourceLoader {
appResources.style().ensureInjected();
appResources.pageTable().ensureInjected();
***REMOVED***
***REMOVED***
}
}

View File

@ -10,7 +10,7 @@ html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
***REMOVED***
}
/**
* Remove default margin.
@ -18,7 +18,7 @@ html {
body {
margin: 0;
***REMOVED***
}
/* HTML5 display definitions
========================================================================== */
@ -42,7 +42,7 @@ nav,
section,
summary {
display: block;
***REMOVED***
}
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
@ -55,7 +55,7 @@ progress,
video {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
***REMOVED***
}
/**
* Address `[hidden]` styling not present in IE 8/9/10.
@ -65,7 +65,7 @@ video {
[hidden],
template {
display: none;
***REMOVED***
}
/* Links
========================================================================== */
@ -76,7 +76,7 @@ template {
a {
background: transparent;
***REMOVED***
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
@ -87,7 +87,7 @@ a:hover,
button:active,
button:hover {
outline: 0;
***REMOVED***
}
/* Text-level semantics
========================================================================== */
@ -98,7 +98,7 @@ button:hover {
abbr[title] {
border-bottom: 1px dotted;
***REMOVED***
}
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
@ -107,7 +107,7 @@ abbr[title] {
b,
strong {
font-weight: bold;
***REMOVED***
}
/**
* Address styling not present in Safari and Chrome.
@ -115,7 +115,7 @@ strong {
dfn {
font-style: italic;
***REMOVED***
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
@ -125,7 +125,7 @@ dfn {
h1 {
font-size: 2em;
margin: 0.67em 0;
***REMOVED***
}
/**
* Address styling not present in IE 8/9.
@ -134,7 +134,7 @@ h1 {
mark {
background: #ff0;
color: #000;
***REMOVED***
}
/**
* Address inconsistent and variable font size in all browsers.
@ -142,7 +142,7 @@ mark {
small {
font-size: 80%;
***REMOVED***
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
@ -154,15 +154,15 @@ sup {
line-height: 0;
position: relative;
vertical-align: baseline;
***REMOVED***
}
sup {
top: -0.5em;
***REMOVED***
}
sub {
bottom: -0.25em;
***REMOVED***
}
/* Embedded content
========================================================================== */
@ -173,7 +173,7 @@ sub {
img {
border: 0;
***REMOVED***
}
/* Grouping content
========================================================================== */
@ -184,7 +184,7 @@ img {
figure {
margin: 1em 40px;
***REMOVED***
}
/**
* Address differences between Firefox and other browsers.
@ -194,7 +194,7 @@ hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
***REMOVED***
}
/**
* Contain overflow in all browsers.
@ -202,7 +202,7 @@ hr {
pre {
overflow: auto;
***REMOVED***
}
/**
* Address odd `em`-unit font size rendering in all browsers.
@ -214,7 +214,7 @@ pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
***REMOVED***
}
/* Forms
========================================================================== */
@ -239,7 +239,7 @@ textarea {
color: inherit; /* 1 */
font: inherit; /* 2 */
margin: 0; /* 3 */
***REMOVED***
}
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
@ -247,7 +247,7 @@ textarea {
button {
overflow: visible;
***REMOVED***
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
@ -259,7 +259,7 @@ button {
button,
select {
text-transform: none;
***REMOVED***
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
@ -275,7 +275,7 @@ input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
***REMOVED***
}
/**
* Re-set default cursor for disabled elements.
@ -284,7 +284,7 @@ input[type="submit"] {
button[disabled],
html input[disabled] {
cursor: default;
***REMOVED***
}
/**
* Remove inner padding and border in Firefox 4+.
@ -294,7 +294,7 @@ button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
***REMOVED***
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
@ -303,7 +303,7 @@ input::-moz-focus-inner {
input {
line-height: normal;
***REMOVED***
}
/**
* It's recommended that you don't attempt to style these elements.
@ -317,7 +317,7 @@ input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
***REMOVED***
}
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
@ -328,7 +328,7 @@ input[type="radio"] {
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
***REMOVED***
}
/**
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
@ -341,7 +341,7 @@ input[type="search"] {
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
***REMOVED***
}
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
@ -352,7 +352,7 @@ input[type="search"] {
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
***REMOVED***
}
/**
* Define consistent border, margin, and padding.
@ -362,7 +362,7 @@ fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
***REMOVED***
}
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
@ -372,7 +372,7 @@ fieldset {
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
***REMOVED***
}
/**
* Remove default vertical scrollbar in IE 8/9/10/11.
@ -380,7 +380,7 @@ legend {
textarea {
overflow: auto;
***REMOVED***
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
@ -389,7 +389,7 @@ textarea {
optgroup {
font-weight: bold;
***REMOVED***
}
/* Tables
========================================================================== */
@ -401,9 +401,9 @@ optgroup {
table {
border-collapse: collapse;
border-spacing: 0;
***REMOVED***
}
td,
th {
padding: 0;
***REMOVED***
}

View File

@ -6,23 +6,23 @@
#pTable .top-panel {
background-color: white;
color: black;
***REMOVED***
}
/** Tool Panel icons **/
#pTable .top-panel .tool-panel i {
color: #e91e63;
***REMOVED***
}
/** Hovering rows **/
#pTable table tbody tr.data-row:hover {
background: rgba(33, 150, 243, 0.27);
color: #3f3f3f;
***REMOVED***
}
/** Columns **/
#pTable table tbody td:nth-child(3) {
background: #2196f3 !important;
color: #fff;
border-bottom: 2px solid #1976d2;
***REMOVED***
}
/** Table Headers **/
#pTable table thead tr th {
color: #1976d2;
***REMOVED***
}

View File

@ -2,4 +2,4 @@
/*
gwt-sprite: 'sideNavProfileBackground';
background-repeat: repeat; */
***REMOVED***
}

View File

@ -5,7 +5,7 @@ import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStat
import org.gcube.portlets.user.dataminermanagertester.shared.config.DMBatchConfig;
import org.gcube.portlets.user.dataminermanagertester.shared.config.DMConfig;
import org.gcube.portlets.user.dataminermanagertester.shared.config.DMDiffConfig;
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.exception.ServiceException;
import org.gcube.portlets.user.dataminermanagertester.shared.result.BatchTestResult;
import org.gcube.portlets.user.dataminermanagertester.shared.session.UserInfo;
import org.gcube.portlets.user.dataminermanagertester.shared.task.TaskStatus;
@ -37,4 +37,4 @@ public interface DataMinerTesterService extends RemoteService {
public BatchTestResult retrieveOutputForBatchTest(String token, String operationId) throws ServiceException;
***REMOVED***
}

View File

@ -43,4 +43,4 @@ public interface DataMinerTesterServiceAsync {
void retrieveOutputForBatchTest(String token, String operationId, AsyncCallback<BatchTestResult> callback);
***REMOVED***
}

View File

@ -12,8 +12,8 @@ import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import org.gcube.common.portal.PortalContext;
***REMOVED***
***REMOVED***
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -26,22 +26,22 @@ public class DataMinerManagerTester extends GenericPortlet {
private final Logger logger= LoggerFactory.getLogger(GenericPortlet.class);
***REMOVED***
***REMOVED***JSP folder name
***REMOVED***
/**
* JSP folder name
*/
public static final String JSP_FOLDER = "/WEB-INF/jsp/";
***REMOVED***
***REMOVED***
***REMOVED***
/**
*
*/
public static final String VIEW_JSP = JSP_FOLDER + "DataMinerManagerTester_view.jsp";
***REMOVED***
***REMOVED***@param request .
***REMOVED***@param response .
***REMOVED***@throws IOException .
***REMOVED***@throws PortletException .
***REMOVED***
/**
* @param request .
* @param response .
* @throws IOException .
* @throws PortletException .
*/
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
logger.trace("DataMinerManagerTester loading from JSP: "+VIEW_JSP);
@ -52,5 +52,5 @@ public class DataMinerManagerTester extends GenericPortlet {
logger.trace("passing to the render");
PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(VIEW_JSP);
rd.include(request,response);
***REMOVED***
***REMOVED***
}
}

View File

@ -17,10 +17,10 @@ import javax.servlet.ServletContextEvent;
import org.gcube.portlets.user.dataminermanagertester.server.task.TaskInProgress;
import org.gcube.portlets.user.dataminermanagertester.server.task.TaskRequest;
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.Constants;
import org.gcube.portlets.user.dataminermanagertester.shared.task.TaskStatus;
***REMOVED***
***REMOVED***
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -43,21 +43,21 @@ public class DataMinerTesterBatchDaemon implements Runnable {
this.sce = sce;
tasks = new ArrayList<>();
initTimeout();
***REMOVED***
}
private void initTimeout() {
sce.getServletContext().setAttribute(SessionConstants.DATAMINERTESTER_MONITOR_TIME_OUT_PERIODMILLIS,
Long.valueOf(timeout));
retrieveTimeOut();
startThreadPoolTimeoutUpdateTimer();
***REMOVED***
}
public void terminate() {
running = false;
if (threadPoolTimeoutUpdateTimer != null) {
threadPoolTimeoutUpdateTimer.cancel();
***REMOVED***
***REMOVED***
}
}
public void run() {
Queue<TaskRequest> jobQueue = new ConcurrentLinkedQueue<>();
@ -75,7 +75,7 @@ public class DataMinerTesterBatchDaemon implements Runnable {
Future<TaskStatus> futureResult = executorService.submit(accountingClientCallable);
TaskInProgress taskInProgress = new TaskInProgress(new GregorianCalendar(), futureResult);
tasks.add(taskInProgress);
***REMOVED***
}
if (!tasks.isEmpty()) {
ArrayList<TaskInProgress> dones = new ArrayList<>();
@ -83,37 +83,37 @@ public class DataMinerTesterBatchDaemon implements Runnable {
Future<TaskStatus> futureResult = taskInProgress.getFuture();
if (futureResult.isDone()) {
TaskStatus result = null;
***REMOVED***
try {
result = futureResult.get(timeout, TimeUnit.MILLISECONDS);
logger.debug("DataMinerTesterTask: " + result);
***REMOVED*** catch (InterruptedException | ExecutionException e) {
} catch (InterruptedException | ExecutionException e) {
logger.error("DataMinerTesterTask: " + e.getLocalizedMessage(), e);
***REMOVED*** catch (TimeoutException e) {
} catch (TimeoutException e) {
logger.error("DataMinerTesterTask No response after " + timeout + " milliseconds!");
futureResult.cancel(true);
***REMOVED***
}
dones.add(taskInProgress);
***REMOVED*** else {
} else {
GregorianCalendar now = new GregorianCalendar();
long diff = now.getTimeInMillis() - taskInProgress.getStartTime().getTimeInMillis();
if (diff > timeout) {
futureResult.cancel(true);
dones.add(taskInProgress);
***REMOVED***
***REMOVED***
***REMOVED***
}
}
}
tasks.removeAll(dones);
***REMOVED***
***REMOVED***
}
try {
Thread.sleep(Constants.DAEMON_SLEEP_MILLIS);
***REMOVED*** catch (InterruptedException e) {
} catch (InterruptedException e) {
***REMOVED***
}
***REMOVED***
***REMOVED***
}
}
private void retrieveTimeOut() {
long timeo = 0;
@ -126,12 +126,12 @@ public class DataMinerTesterBatchDaemon implements Runnable {
sce.getServletContext().setAttribute(SessionConstants.DATAMINERTESTER_MONITOR_TIME_OUT_PERIODMILLIS,
Long.valueOf(timeout));
***REMOVED***
}
***REMOVED***
}
private void startThreadPoolTimeoutUpdateTimer() {
***REMOVED***
try {
threadPoolTimeoutUpdateTimer = new Timer();
threadPoolTimeoutUpdateTimer.schedule(new TimerTask() {
@ -139,12 +139,12 @@ public class DataMinerTesterBatchDaemon implements Runnable {
public void run() {
logger.debug("ThreadPool request update of timeout");
retrieveTimeOut();
***REMOVED***
***REMOVED***, timeoutUpdate, timeoutUpdate);
***REMOVED***
}
}, timeoutUpdate, timeoutUpdate);
} catch (Throwable e) {
logger.error("Error retrieving thread pool timeout!", e);
return;
***REMOVED***
***REMOVED***
}
}
***REMOVED***
}

View File

@ -10,11 +10,11 @@ import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.portlets.user.dataminermanagertester.server.task.TaskRequest;
import org.gcube.portlets.user.dataminermanagertester.server.task.TaskWrapper;
import org.gcube.portlets.user.dataminermanagertester.server.testbatch.TesterCaller;
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.exception.ServiceException;
import org.gcube.portlets.user.dataminermanagertester.shared.result.BatchTestResult;
import org.gcube.portlets.user.dataminermanagertester.shared.task.TaskStatus;
***REMOVED***
***REMOVED***
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -31,17 +31,17 @@ public class DataMinerTesterCallable implements Callable<TaskStatus> {
super();
this.taskRequest = taskRequest;
logger.debug("DataMinerTesterCallable: " + taskRequest);
***REMOVED***
}
@Override
public TaskStatus call() throws Exception {
***REMOVED***
try {
HttpSession httpSession = taskRequest.getHttpSession();
if (httpSession == null) {
logger.error("Error retrieving HttpSession in DataMinerTesterCallable: is null");
return TaskStatus.ERROR;
***REMOVED***
}
logger.debug("Set SecurityToken: " + taskRequest.getServiceCredentials().getToken());
SecurityTokenProvider.instance.set(taskRequest.getServiceCredentials().getToken());
@ -51,10 +51,10 @@ public class DataMinerTesterCallable implements Callable<TaskStatus> {
BatchTestResult result = null;
***REMOVED***
try {
result = testerCaller.runTest(taskRequest);
***REMOVED*** catch (ServiceException e) {
} catch (ServiceException e) {
TaskWrapper taskWrapper = new TaskWrapper(taskRequest.getOperationId(), TaskStatus.ERROR,
e.getLocalizedMessage());
@ -65,12 +65,12 @@ public class DataMinerTesterCallable implements Callable<TaskStatus> {
taskWrapperMap = new HashMap<>();
SessionUtil.setTaskWrapperMap(httpSession, taskRequest.getServiceCredentials(), taskWrapperMap);
***REMOVED***
}
taskWrapperMap.put(taskWrapper.getOperationId(), taskWrapper);
return TaskStatus.ERROR;
***REMOVED***
}
TaskWrapper taskWrapper = new TaskWrapper(taskRequest.getOperationId(), TaskStatus.COMPLETED,
@ -83,15 +83,15 @@ public class DataMinerTesterCallable implements Callable<TaskStatus> {
taskWrapperMap = new HashMap<>();
SessionUtil.setTaskWrapperMap(httpSession, taskRequest.getServiceCredentials(), taskWrapperMap);
***REMOVED***
}
taskWrapperMap.put(taskWrapper.getOperationId(), taskWrapper);
return TaskStatus.COMPLETED;
***REMOVED***
} catch (Throwable e) {
logger.error("DataMinerTesterDaemon Execute(): " + e.getLocalizedMessage(), e);
return TaskStatus.ERROR;
***REMOVED***
}
***REMOVED***
***REMOVED***
}
}

View File

@ -5,8 +5,8 @@ import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
***REMOVED***
***REMOVED***
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -31,20 +31,20 @@ public class DataMinerTesterListener implements ServletContextListener {
logger.debug("Starting DataMinerTesterBatchDaemon: " + thread);
thread.start();
logger.info("DataMinerTesterBatchDaemon process successfully started.");
***REMOVED***
}
@Override
public void contextDestroyed(ServletContextEvent sce) {
logger.debug("Stopping DataMinerTesterBatchDaemon: " + thread);
if (thread != null) {
dataMinerTesterBatchDaemon.terminate();
***REMOVED***
try {
thread.join();
***REMOVED*** catch (InterruptedException e) {
***REMOVED***
} catch (InterruptedException e) {
}
logger.debug("DataMinerTesterBatchDaemon successfully stopped.");
***REMOVED***
}
***REMOVED***
}
***REMOVED***
}

View File

@ -1,7 +1,7 @@
package org.gcube.portlets.user.dataminermanagertester.server;
import java.util.HashMap;
***REMOVED***
import java.util.List;
import java.util.Queue;
import java.util.UUID;
@ -9,16 +9,16 @@ import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.server.DataMinerService;
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClient;
import org.gcube.data.analysis.dataminermanagercl.server.util.ServiceCredentials;
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus.Status;
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
import org.gcube.portlets.user.dataminermanagertester.client.rpc.DataMinerTesterService;
import org.gcube.portlets.user.dataminermanagertester.server.task.TaskRequest;
import org.gcube.portlets.user.dataminermanagertester.server.task.TaskWrapper;
@ -28,12 +28,12 @@ import org.gcube.portlets.user.dataminermanagertester.shared.config.DMBatchConfi
import org.gcube.portlets.user.dataminermanagertester.shared.config.DMConfig;
import org.gcube.portlets.user.dataminermanagertester.shared.config.DMDiffConfig;
import org.gcube.portlets.user.dataminermanagertester.shared.config.TestType;
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.exception.ServiceException;
import org.gcube.portlets.user.dataminermanagertester.shared.result.BatchTestResult;
import org.gcube.portlets.user.dataminermanagertester.shared.session.UserInfo;
import org.gcube.portlets.user.dataminermanagertester.shared.task.TaskStatus;
***REMOVED***
***REMOVED***
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
@ -48,24 +48,24 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
private static Logger logger = LoggerFactory.getLogger(DataMinerTesterServiceImpl.class);
***REMOVED***
***REMOVED***{@inheritDoc***REMOVED***
***REMOVED***
/**
* {@inheritDoc}
*/
@Override
public void init() throws ServletException {
super.init();
logger.info("DataMiner Tester Service started!");
***REMOVED***
}
***REMOVED***
***REMOVED***
***REMOVED***{@inheritDoc***REMOVED***
***REMOVED***
***REMOVED***
/**
*
* {@inheritDoc}
*
*/
@Override
public UserInfo hello(String token) throws ServiceException {
***REMOVED***
try {
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(this.getThreadLocalRequest(),
token);
logger.debug("hello()");
@ -74,21 +74,21 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
serviceCredentials.getFullName());
logger.debug("UserInfo: " + userInfo);
return userInfo;
***REMOVED***
***REMOVED***
} catch (ServiceException e) {
e.printStackTrace();
throw e;
***REMOVED***
***REMOVED***
} catch (Throwable e) {
e.printStackTrace();
logger.error("Hello(): " + e.getLocalizedMessage(), e);
throw new ServiceException(e.getLocalizedMessage(), e);
***REMOVED***
}
***REMOVED***
}
@Override
public String getCapabilities(String token, DMConfig dmConfig) throws ServiceException {
***REMOVED***
try {
HttpServletRequest httpRequest = this.getThreadLocalRequest();
@SuppressWarnings("unused")
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest, token);
@ -106,22 +106,22 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
for (OperatorsClassification opClass : operatorsClassifications) {
for (Operator op : opClass.getOperators()) {
result.append("Operator[Name=" + op.getName() + "]");
***REMOVED***
***REMOVED***
}
}
return result.toString();
***REMOVED***
***REMOVED***
} catch (ServiceException e) {
logger.error(e.getLocalizedMessage());
throw e;
***REMOVED***
***REMOVED***
} catch (Throwable e) {
logger.error("An error occurred getting the Capabilities: " + e.getLocalizedMessage(), e);
throw new ServiceException(e.getLocalizedMessage(), e);
***REMOVED***
***REMOVED***
}
}
@Override
public String getOperatorsDiff(String token, DMDiffConfig operatorsDiffConfig) throws ServiceException {
***REMOVED***
try {
logger.debug("getOperatorsDiff: dm1=" + operatorsDiffConfig.getDm1() + ", dm2="
+ operatorsDiffConfig.getDm2());
HttpServletRequest httpRequest = this.getThreadLocalRequest();
@ -149,24 +149,24 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
for (OperatorsClassification opClass1 : operatorsClassifications1) {
for (Operator op1 : opClass1.getOperators()) {
boolean op1Found = false;
***REMOVED***
***REMOVED***
for (OperatorsClassification opClass2 : operatorsClassifications2) {
for (Operator op2 : opClass2.getOperators()) {
if (op1.getId().compareTo(op2.getId()) == 0) {
op1Found = true;
***REMOVED***
***REMOVED***
***REMOVED***
break;
}
}
if (op1Found) {
break;
***REMOVED***
}
***REMOVED***
}
if (!op1Found) {
result.append("Op: " + op1.getId() + " \n");
***REMOVED***
***REMOVED***
}
}
***REMOVED***
}
result.append("----------------------------------\n");
result.append("Operators in: " + operatorsDiffConfig.getDm2() + " \n");
@ -174,41 +174,41 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
for (OperatorsClassification opClass2 : operatorsClassifications2) {
for (Operator op2 : opClass2.getOperators()) {
boolean op2Found = false;
***REMOVED***
***REMOVED***
for (OperatorsClassification opClass1 : operatorsClassifications1) {
for (Operator op1 : opClass1.getOperators()) {
if (op2.getId().compareTo(op1.getId()) == 0) {
op2Found = true;
***REMOVED***
***REMOVED***
***REMOVED***
break;
}
}
if (op2Found) {
break;
***REMOVED***
}
***REMOVED***
}
if (!op2Found) {
result.append("Op: " + op2.getId() + " \n");
***REMOVED***
***REMOVED***
}
}
***REMOVED***
}
return result.toString();
***REMOVED***
***REMOVED***
} catch (ServiceException e) {
logger.error(e.getLocalizedMessage());
throw e;
***REMOVED***
***REMOVED***
} catch (Throwable e) {
logger.error("An error occurred getting operators diff: " + e.getLocalizedMessage(), e);
throw new ServiceException(e.getLocalizedMessage(), e);
***REMOVED***
}
***REMOVED***
}
@Override
public ComputationId startSimpleTest(String token, DMConfig dmConfig) throws ServiceException {
***REMOVED***
try {
HttpServletRequest httpRequest = this.getThreadLocalRequest();
@SuppressWarnings("unused")
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest, token);
@ -216,9 +216,9 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
TestType t = null;
if (dmConfig == null || dmConfig.getTestType() == null || dmConfig.getTestType().isEmpty()) {
throw new ServiceException("Invalid test type: " + dmConfig.getTestType());
***REMOVED***
} else {
t = TestType.getTypeFromId(dmConfig.getTestType());
***REMOVED***
}
TestBuilder testBuilder = new TestBuilder();
DMTest dmTest = testBuilder.build(t);
@ -233,7 +233,7 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
if (operator == null) {
logger.error("Operator not found");
throw new ServiceException("Operator: " + dmTest.getId() + " not found");
***REMOVED***
} else {
logger.debug("Operator Name: " + operator.getName() + " (" + operator.getId() + ")");
logger.debug("Operator: " + operator);
List<Parameter> parameters = sClient.getInputParameters(operator);
@ -241,30 +241,30 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
for (Parameter parameter : parameters) {
logger.debug(
"Parameter:[Name=" + parameter.getName() + ", Typology=" + parameter.getTypology() + "]");
***REMOVED***
}
dmTest.createRequest(operator);
logger.debug("Start Computation");
ComputationId computationId = sClient.startComputation(operator);
logger.debug("Started ComputationId: " + computationId);
return computationId;
***REMOVED***
}
***REMOVED***
***REMOVED***
} catch (ServiceException e) {
logger.error(e.getLocalizedMessage());
throw e;
***REMOVED***
} catch (Throwable e) {
logger.error("An error occurred starting simple test: " + e.getLocalizedMessage(), e);
***REMOVED***
e.printStackTrace();
throw new ServiceException(e.getLocalizedMessage(), e);
***REMOVED***
***REMOVED***
}
}
@Override
public Status monitorSimpleTest(String token, DMConfig dmConfig, ComputationId computationId)
throws ServiceException {
***REMOVED***
try {
HttpServletRequest httpRequest = this.getThreadLocalRequest();
@SuppressWarnings("unused")
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest, token);
@ -273,43 +273,43 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
logger.debug("Requesting operation progress");
ComputationStatus computationStatus = null;
***REMOVED***
try {
computationStatus = sClient.getComputationStatus(computationId);
***REMOVED*** catch (Exception e) {
} catch (Exception e) {
logger.error("Error retrieving computation Status:" + e.getLocalizedMessage(), e);
throw new ServiceException("Error retrieving computation Status:" + e.getLocalizedMessage(), e);
***REMOVED***
}
logger.debug("ComputationStatus: " + computationStatus);
if (computationStatus == null) {
logger.error("ComputationStatus is null");
throw new ServiceException("Error retrieving computation Status: ComputationStatus is null");
***REMOVED***
}
Status status = computationStatus.getStatus();
if (status == null) {
logger.error("Status is null");
throw new ServiceException("Error retrieving computation Status: Status is null");
***REMOVED***
}
return status;
// monitoringComputation(computationId, sClient);
***REMOVED***
***REMOVED***
} catch (ServiceException e) {
logger.error(e.getLocalizedMessage());
throw e;
***REMOVED***
} catch (Throwable e) {
logger.error("An error occurred monitoring simple test: " + e.getLocalizedMessage(), e);
***REMOVED***
e.printStackTrace();
throw new ServiceException(e.getLocalizedMessage(), e);
***REMOVED***
***REMOVED***
}
}
@Override
public String retrieveOutputForSimpleTest(String token, DMConfig dmConfig, ComputationId computationId)
throws ServiceException {
***REMOVED***
try {
HttpServletRequest httpRequest = this.getThreadLocalRequest();
@SuppressWarnings("unused")
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest, token);
@ -318,9 +318,9 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
TestType t = null;
if (dmConfig == null || dmConfig.getTestType() == null || dmConfig.getTestType().isEmpty()) {
throw new ServiceException("Invalid test type: " + dmConfig.getTestType());
***REMOVED***
} else {
t = TestType.getTypeFromId(dmConfig.getTestType());
***REMOVED***
}
TestBuilder testBuilder = new TestBuilder();
DMTest dmTest = testBuilder.build(t);
@ -331,24 +331,24 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
if (dmTest.isValidResult(outputData)) {
return dmTest.getResult(outputData);
***REMOVED***
} else {
throw new ServiceException("Invalid output data for test: " + dmTest.getId());
***REMOVED***
}
***REMOVED***
***REMOVED***
} catch (ServiceException e) {
logger.error(e.getLocalizedMessage());
throw e;
***REMOVED***
} catch (Throwable e) {
logger.error("An error occurred monitoring simple test: " + e.getLocalizedMessage(), e);
***REMOVED***
e.printStackTrace();
throw new ServiceException(e.getLocalizedMessage(), e);
***REMOVED***
***REMOVED***
}
}
@Override
public String startBatchTest(String token, DMBatchConfig dmBatchConfig) throws ServiceException {
***REMOVED***
try {
HttpServletRequest httpRequest = this.getThreadLocalRequest();
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest, token);
logger.debug("startBatchTest()");
@ -370,19 +370,19 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
logger.debug("operationId: " + operationId);
return operationId;
***REMOVED***
***REMOVED***
} catch (ServiceException e) {
logger.error(e.getLocalizedMessage());
throw e;
***REMOVED***
} catch (Throwable e) {
logger.error("An error occurred starting batch test: " + e.getLocalizedMessage(), e);
***REMOVED***
e.printStackTrace();
throw new ServiceException(e.getLocalizedMessage(), e);
***REMOVED***
***REMOVED***
}
}
@Override
public TaskStatus monitorBatchTest(String token, String operationId) throws ServiceException {
***REMOVED***
try {
HttpServletRequest httpRequest = this.getThreadLocalRequest();
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest, token);
@ -390,28 +390,28 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
serviceCredentials);
if (taskWrapperMap == null) {
return null;
***REMOVED***
} else {
if (taskWrapperMap.containsKey(operationId)) {
TaskWrapper taskWrapper = taskWrapperMap.get(operationId);
return taskWrapper.getTaskStatus();
***REMOVED*** else {
} else {
return null;
***REMOVED***
***REMOVED***
}
}
***REMOVED***
***REMOVED***
} catch (ServiceException e) {
e.printStackTrace();
throw e;
***REMOVED***
} catch (Throwable e) {
logger.error("MonitorBatchTest(): " + e.getLocalizedMessage(), e);
throw new ServiceException(e.getLocalizedMessage());
***REMOVED***
}
***REMOVED***
}
@Override
public BatchTestResult retrieveOutputForBatchTest(String token, String operationId) throws ServiceException {
***REMOVED***
try {
HttpServletRequest httpRequest = this.getThreadLocalRequest();
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest, token);
logger.debug("retrieveOutputForBatchTest()");
@ -420,23 +420,23 @@ public class DataMinerTesterServiceImpl extends RemoteServiceServlet implements
serviceCredentials);
if (taskWrapperMap == null) {
return null;
***REMOVED***
} else {
if (taskWrapperMap.containsKey(operationId)) {
TaskWrapper taskWrapper = taskWrapperMap.get(operationId);
return taskWrapper.getResult();
***REMOVED*** else {
} else {
return null;
***REMOVED***
***REMOVED***
}
}
***REMOVED***
***REMOVED***
} catch (ServiceException e) {
e.printStackTrace();
throw e;
***REMOVED***
} catch (Throwable e) {
logger.error("RetrieveOutputForBatchTest(): " + e.getLocalizedMessage(), e);
throw new ServiceException(e.getLocalizedMessage());
***REMOVED***
}
***REMOVED***
}
***REMOVED***
}

View File

@ -10,4 +10,4 @@ public class SessionConstants {
public static final String TASK_REQUEST_QUEUE = "TASK_REQUEST_QUEUE";
***REMOVED***
}

View File

@ -17,8 +17,8 @@ import org.gcube.common.portal.PortalContext;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.data.analysis.dataminermanagercl.server.util.ServiceCredentials;
import org.gcube.portlets.user.dataminermanagertester.server.task.TaskWrapper;
***REMOVED***
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.Constants;
import org.gcube.portlets.user.dataminermanagertester.shared.exception.ServiceException;
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
/**
@ -43,13 +43,13 @@ public class SessionUtil {
if (Constants.DEBUG_MODE) {
logger.debug("No credential found in session, use test user!");
/*
***REMOVED***InfoLocale infoLocale = getInfoLocale(httpServletRequest, null);
***REMOVED***Locale locale = new Locale(infoLocale.getLanguage());
***REMOVED***
***REMOVED***ResourceBundle messages = ResourceBundle.getBundle(
***REMOVED***StatAlgoImporterServiceMessagesConstants.TDGWTServiceMessages,
***REMOVED***locale);
***REMOVED***
* InfoLocale infoLocale = getInfoLocale(httpServletRequest, null);
* Locale locale = new Locale(infoLocale.getLanguage());
*
* ResourceBundle messages = ResourceBundle.getBundle(
* StatAlgoImporterServiceMessagesConstants.TDGWTServiceMessages,
* locale);
*/
userName = Constants.DEFAULT_USER;
scope = Constants.DEFAULT_SCOPE;
token = Constants.DEFAULT_TOKEN;
@ -61,7 +61,7 @@ public class SessionUtil {
sCredentials = new ServiceCredentials(userName, scope, token);
***REMOVED*** else {
} else {
logger.debug("Retrieving credential in session!");
PortalContext pContext = PortalContext.getConfiguration();
@ -69,11 +69,11 @@ public class SessionUtil {
SecurityTokenProvider.instance.set(token);
AuthorizationEntry entry;
***REMOVED***
try {
entry = authorizationService().get(token);
***REMOVED*** catch (Exception e) {
} catch (Exception e) {
throw new ServiceException("AuthorizationEntry not found: " + e.getLocalizedMessage(), e);
***REMOVED***
}
scope = entry.getContext();
logger.debug("Set ScopeProvider: " + scope);
@ -83,7 +83,7 @@ public class SessionUtil {
String error = "Error retrieving scope: " + scope;
logger.error(error);
throw new ServiceException(error);
***REMOVED***
}
GCubeUser gCubeUser = pContext.getCurrentUser(httpServletRequest);
@ -91,7 +91,7 @@ public class SessionUtil {
String error = "Error retrieving gCubeUser in scope " + scope + ": " + gCubeUser;
logger.error(error);
throw new ServiceException(error);
***REMOVED***
}
userName = gCubeUser.getUsername();
@ -99,7 +99,7 @@ public class SessionUtil {
String error = "Error retrieving username in scope " + scope + ": " + userName;
logger.error(error);
throw new ServiceException(error);
***REMOVED***
}
token = pContext.getCurrentUserToken(scope, userName);
@ -107,7 +107,7 @@ public class SessionUtil {
String error = "Error retrieving token for " + userName + " in " + scope + ": " + token;
logger.error(error);
throw new ServiceException(error);
***REMOVED***
}
String name = gCubeUser.getFirstName();
String lastName = gCubeUser.getLastName();
@ -123,21 +123,21 @@ public class SessionUtil {
sCredentials = new ServiceCredentials(userName, fullName, name, lastName, email, scope, groupId, groupName,
userAvatarURL, token);
***REMOVED***
}
logger.debug("ServiceCredentials: " + sCredentials);
return sCredentials;
***REMOVED***
}
***REMOVED***
***REMOVED***
***REMOVED***@param httpSession http session
***REMOVED***@param serviceCredentials service credentials
***REMOVED***@return hash map of tasks
***REMOVED***
/**
*
* @param httpSession http session
* @param serviceCredentials service credentials
* @return hash map of tasks
*/
public static HashMap<String, TaskWrapper> getTaskWrapperMap(
HttpSession httpSession,
ServiceCredentials serviceCredentials) {
@ -145,20 +145,20 @@ public class SessionUtil {
HashMap<String, TaskWrapper> taskWrapperMap = (HashMap<String, TaskWrapper>) httpSession
.getAttribute(SessionConstants.TASK_WRAPPER_MAP);
return taskWrapperMap;
***REMOVED***
}
***REMOVED***
***REMOVED***
***REMOVED***@param httpSession session
***REMOVED***@param serviceCredentials service credentials
***REMOVED***@param taskWrapperMap task wrapper map
***REMOVED***
/**
*
* @param httpSession session
* @param serviceCredentials service credentials
* @param taskWrapperMap task wrapper map
*/
public static void setTaskWrapperMap(HttpSession httpSession,
ServiceCredentials serviceCredentials,
HashMap<String, TaskWrapper> taskWrapperMap) {
httpSession.setAttribute(SessionConstants.TASK_WRAPPER_MAP, taskWrapperMap);
return;
***REMOVED***
}
***REMOVED***
}

View File

@ -1,15 +1,15 @@
package org.gcube.portlets.user.dataminermanagertester.server.is;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import org.gcube.common.resources.gcore.ServiceEndpoint;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
import org.gcube.resources.discovery.icclient.ICFactory;
***REMOVED***
***REMOVED***
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -24,7 +24,7 @@ public class InformationSystemUtils {
public static List<String> retrieveServiceAddress(String category,
String name, String scope) throws Exception {
***REMOVED***
try {
if (scope == null || scope.length() == 0)
return new ArrayList<String>();
@ -43,13 +43,13 @@ public class InformationSystemUtils {
return addresses;
***REMOVED***
} catch (Throwable e) {
logger.error("Error in discovery DataMiner Service Endpoint in scope: "
+ scope);
logger.error("Error: " + e.getLocalizedMessage());
***REMOVED***
e.printStackTrace();
throw e;
***REMOVED***
***REMOVED***
}
}
***REMOVED***
}

View File

@ -22,27 +22,27 @@ public class TaskInProgress implements Serializable {
super();
this.startTime = startTime;
this.future = future;
***REMOVED***
}
public Calendar getStartTime() {
return startTime;
***REMOVED***
}
public void setStartTime(Calendar startTime) {
this.startTime = startTime;
***REMOVED***
}
public Future<TaskStatus> getFuture() {
return future;
***REMOVED***
}
public void setFuture(Future<TaskStatus> future) {
this.future = future;
***REMOVED***
}
@Override
public String toString() {
return "TaskInProgress [startTime=" + startTime + ", future=" + future + "]";
***REMOVED***
}
***REMOVED***
}

View File

@ -29,44 +29,44 @@ public class TaskRequest implements Serializable {
this.serviceCredentials = serviceCredentials;
this.dmBatchConfig = dmBatchConfig;
***REMOVED***
}
public String getOperationId() {
return operationId;
***REMOVED***
}
public void setOperationId(String operationId) {
this.operationId = operationId;
***REMOVED***
}
public HttpSession getHttpSession() {
return httpSession;
***REMOVED***
}
public void setHttpSession(HttpSession httpSession) {
this.httpSession = httpSession;
***REMOVED***
}
public ServiceCredentials getServiceCredentials() {
return serviceCredentials;
***REMOVED***
}
public void setServiceCredentials(ServiceCredentials serviceCredentials) {
this.serviceCredentials = serviceCredentials;
***REMOVED***
}
public DMBatchConfig getDmBatchConfig() {
return dmBatchConfig;
***REMOVED***
}
public void setDmBatchConfig(DMBatchConfig dmBatchConfig) {
this.dmBatchConfig = dmBatchConfig;
***REMOVED***
}
@Override
public String toString() {
return "TaskRequest [operationId=" + operationId + ", httpSession=" + httpSession + ", serviceCredentials="
+ serviceCredentials + ", dmBatchConfig=" + dmBatchConfig + "]";
***REMOVED***
}
***REMOVED***
}

View File

@ -25,7 +25,7 @@ public class TaskWrapper implements Serializable {
this.taskStatus = taskStatus;
this.errorMessage = null;
this.result = result;
***REMOVED***
}
public TaskWrapper(String operationId, TaskStatus taskStatus, String errorMessage) {
super();
@ -33,44 +33,44 @@ public class TaskWrapper implements Serializable {
this.taskStatus = taskStatus;
this.errorMessage = errorMessage;
this.result = null;
***REMOVED***
}
public String getOperationId() {
return operationId;
***REMOVED***
}
public void setOperationId(String operationId) {
this.operationId = operationId;
***REMOVED***
}
public TaskStatus getTaskStatus() {
return taskStatus;
***REMOVED***
}
public void setTaskStatus(TaskStatus taskStatus) {
this.taskStatus = taskStatus;
***REMOVED***
}
public BatchTestResult getResult() {
return result;
***REMOVED***
}
public void setResult(BatchTestResult result) {
this.result = result;
***REMOVED***
}
public String getErrorMessage() {
return errorMessage;
***REMOVED***
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
***REMOVED***
}
@Override
public String toString() {
return "TaskWrapper [operationId=" + operationId + ", taskStatus=" + taskStatus + ", errorMessage="
+ errorMessage + ", result=" + result + "]";
***REMOVED***
}
***REMOVED***
}

View File

@ -2,28 +2,28 @@ package org.gcube.portlets.user.dataminermanagertester.server.testbatch;
import java.util.ArrayList;
import java.util.LinkedHashMap;
***REMOVED***
import java.util.List;
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.server.DataMinerService;
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClient;
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus.Status;
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
import org.gcube.portlets.user.dataminermanagertester.server.task.TaskRequest;
import org.gcube.portlets.user.dataminermanagertester.server.testbuild.TestBuilder;
import org.gcube.portlets.user.dataminermanagertester.server.testconfig.DMTest;
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.Constants;
import org.gcube.portlets.user.dataminermanagertester.shared.config.DMBatchConfig;
import org.gcube.portlets.user.dataminermanagertester.shared.config.TestType;
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.exception.ServiceException;
import org.gcube.portlets.user.dataminermanagertester.shared.result.BatchTestResult;
import org.gcube.portlets.user.dataminermanagertester.shared.result.SingleTestResult;
***REMOVED***
***REMOVED***
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -46,9 +46,9 @@ public class TesterCaller {
|| taskRequest.getDmBatchConfig().getTestType() == null
|| taskRequest.getDmBatchConfig().getTestType().isEmpty()) {
throw new ServiceException("Invalid test type: " + taskRequest.getDmBatchConfig().getTestType());
***REMOVED*** else {
} else {
t = TestType.getTypeFromId(taskRequest.getDmBatchConfig().getTestType());
***REMOVED***
}
dmBatchconfig = taskRequest.getDmBatchConfig();
dms = taskRequest.getDmBatchConfig().getDms();
@ -56,50 +56,50 @@ public class TesterCaller {
if (dms == null || dms.isEmpty()) {
logger.error("Invalid urls list");
throw new ServiceException("Invalid urls list");
***REMOVED***
}
BatchTestResult result;
if (t.compareTo(TestType.Capabilities) == 0) {
result = runGetCapabilities();
***REMOVED*** else {
} else {
result = runAlgorithms(t);
***REMOVED***
}
return result;
***REMOVED***
}
private BatchTestResult runGetCapabilities() {
BatchTestResult result;
LinkedHashMap<String, SingleTestResult> testResultMap = new LinkedHashMap<>();
for (String dm : dms) {
***REMOVED***
try {
String url = null;
if (dmBatchconfig.getProtocol() != null && dm != null) {
dm = dm.trim();
url = new String(dmBatchconfig.getProtocol() + "://" + dm + "/wps/");
***REMOVED***
}
SClient sClient = new DataMinerService().getClient(dmBatchconfig.getToken(), url);
List<OperatorsClassification> operatorsClassifications = sClient.getOperatorsClassifications();
***REMOVED***
logger.debug("OperatorsClassifications: " + operatorsClassifications);
String response = new String("Success");
ComputationStatus computationStatus = new ComputationStatus(Status.COMPLETE, 100f);
SingleTestResult singleTestResult = new SingleTestResult(computationStatus, response);
testResultMap.put(dm, singleTestResult);
***REMOVED*** catch (Exception e) {
} catch (Exception e) {
logger.error("Error testing: " + dm);
ComputationStatus computationStatus = new ComputationStatus(e);
SingleTestResult singleTestResult = new SingleTestResult(computationStatus, null);
testResultMap.put(dm, singleTestResult);
***REMOVED***
***REMOVED***
}
}
result = new BatchTestResult(testResultMap);
return result;
***REMOVED***
}
private BatchTestResult runAlgorithms(TestType t) throws ServiceException {
BatchTestResult result;
@ -108,12 +108,12 @@ public class TesterCaller {
LinkedHashMap<String, SingleTestResult> testResultMap = new LinkedHashMap<>();
for (String dm : dms) {
***REMOVED***
try {
String url = null;
if (dmBatchconfig.getProtocol() != null && dm != null) {
dm = dm.trim();
url = new String(dmBatchconfig.getProtocol() + "://" + dm + "/wps/");
***REMOVED***
}
SClient sClient = new DataMinerService().getClient(dmBatchconfig.getToken(), url);
ComputationId computationId = runSingleTest(sClient);
@ -133,24 +133,24 @@ public class TesterCaller {
break;
default:
break;
***REMOVED***
}
SingleTestResult singleTestResult = new SingleTestResult(computationStatus, response);
testResultMap.put(dm, singleTestResult);
***REMOVED*** catch (Exception e) {
} catch (Exception e) {
logger.error("Error testing: " + dm);
ComputationStatus computationStatus = new ComputationStatus(e);
SingleTestResult singleTestResult = new SingleTestResult(computationStatus, null);
testResultMap.put(dm, singleTestResult);
***REMOVED***
***REMOVED***
}
}
result = new BatchTestResult(testResultMap);
return result;
***REMOVED***
}
private ComputationId runSingleTest(SClient sClient) throws ServiceException {
***REMOVED***
try {
List<OperatorsClassification> operatorsClassifications = sClient.getOperatorsClassifications();
logger.debug("OperatorsClassifications: " + operatorsClassifications);
@ -159,7 +159,7 @@ public class TesterCaller {
if (operator == null) {
logger.error("Operator not found");
throw new ServiceException("Operator: " + dmTest.getId() + " not found");
***REMOVED***
} else {
logger.debug("Operator Name: " + operator.getName() + " (" + operator.getId() + ")");
logger.debug("Operator: " + operator);
List<Parameter> parameters = sClient.getInputParameters(operator);
@ -167,47 +167,47 @@ public class TesterCaller {
for (Parameter parameter : parameters) {
logger.debug(
"Parameter:[Name=" + parameter.getName() + ", Typology=" + parameter.getTypology() + "]");
***REMOVED***
}
dmTest.createRequest(operator);
logger.debug("Start Computation");
ComputationId computationId = sClient.startComputation(operator);
logger.debug("Started ComputationId: " + computationId);
return computationId;
***REMOVED***
***REMOVED***
}
} catch (ServiceException e) {
throw e;
***REMOVED***
} catch (Throwable e) {
throw new ServiceException(e.getLocalizedMessage(), e);
***REMOVED***
}
***REMOVED***
}
private ComputationStatus monitorSingleTest(SClient sClient, ComputationId computationId) throws ServiceException {
***REMOVED***
try {
logger.debug("Requesting operation progress");
ComputationStatus computationStatus = null;
Status status = null;
while (status == null || status.compareTo(Status.ACCEPTED) == 0 || status.compareTo(Status.RUNNING) == 0) {
***REMOVED***
try {
computationStatus = sClient.getComputationStatus(computationId);
***REMOVED*** catch (Exception e) {
} catch (Exception e) {
logger.error("Error retrieving computation Status:" + e.getLocalizedMessage(), e);
throw new ServiceException("Error retrieving computation Status:" + e.getLocalizedMessage(), e);
***REMOVED***
}
logger.debug("ComputationStatus: " + computationStatus);
if (computationStatus == null) {
logger.error("ComputationStatus is null");
throw new ServiceException("Error retrieving computation Status: ComputationStatus is null");
***REMOVED***
}
status = computationStatus.getStatus();
if (status == null) {
logger.error("Status is null");
throw new ServiceException("Error retrieving computation Status: Status is null");
***REMOVED*** else {
} else {
switch (status) {
case CANCELLED:
case COMPLETE:
@ -216,43 +216,43 @@ public class TesterCaller {
case ACCEPTED:
case RUNNING:
default:
***REMOVED***
try {
Thread.sleep(Constants.TEST_MONITOR_PERIODMILLIS);
***REMOVED*** catch (InterruptedException e) {
} catch (InterruptedException e) {
***REMOVED***
}
break;
***REMOVED***
***REMOVED***
}
}
***REMOVED***
}
return computationStatus;
***REMOVED***
} catch (ServiceException e) {
logger.error(e.getLocalizedMessage(), e);
throw e;
***REMOVED***
} catch (Throwable e) {
logger.error(e.getLocalizedMessage(), e);
throw new ServiceException(e.getLocalizedMessage(), e);
***REMOVED***
***REMOVED***
}
}
private String retrieveOutputForSingleTest(SClient sClient, ComputationId computationId) throws ServiceException {
***REMOVED***
try {
OutputData outputData = sClient.getOutputDataByComputationId(computationId);
if (dmTest.isValidResult(outputData)) {
return dmTest.getResult(outputData);
***REMOVED***
} else {
throw new ServiceException("Invalid output data for test: " + dmTest.getId());
***REMOVED***
}
***REMOVED***
***REMOVED***
} catch (ServiceException e) {
logger.error(e.getLocalizedMessage());
throw e;
***REMOVED***
} catch (Throwable e) {
logger.error(e.getLocalizedMessage(), e);
throw new ServiceException(e.getLocalizedMessage(), e);
***REMOVED***
***REMOVED***
}
}
***REMOVED***
}

View File

@ -14,7 +14,7 @@ import org.gcube.portlets.user.dataminermanagertester.server.testconfig.RasterDa
import org.gcube.portlets.user.dataminermanagertester.server.testconfig.WebAppPublisherTest;
import org.gcube.portlets.user.dataminermanagertester.server.testconfig.XYExtractorTest;
import org.gcube.portlets.user.dataminermanagertester.shared.config.TestType;
***REMOVED***
import org.gcube.portlets.user.dataminermanagertester.shared.exception.ServiceException;
/**
*
@ -53,9 +53,9 @@ public class TestBuilder {
return new PolygonsToMapTest();
default:
throw new ServiceException("Test not found");
***REMOVED***
***REMOVED*** else {
}
} else {
throw new ServiceException("Test not found");
***REMOVED***
***REMOVED***
***REMOVED***
}
}
}

View File

@ -1,7 +1,7 @@
package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.MapResource;
@ -9,9 +9,9 @@ import org.gcube.data.analysis.dataminermanagercl.shared.data.output.Resource;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.EnumParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
***REMOVED***
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -26,7 +26,7 @@ public class BionymLocalTest implements DMTest {
@Override
public String getId() {
return id;
***REMOVED***
}
@Override
public void createRequest(Operator operator) {
@ -142,7 +142,7 @@ public class BionymLocalTest implements DMTest {
logger.debug("Parameters set: " + parameters);
operator.setOperatorParameters(parameters);
***REMOVED***
}
@Override
public String getResult(OutputData outputData) {
@ -154,13 +154,13 @@ public class BionymLocalTest implements DMTest {
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
result.append("Entry: " + key + " = " + mapResource.getMap().get(key));
***REMOVED***
}
***REMOVED*** else {
} else {
***REMOVED***
}
return result.toString();
***REMOVED***
}
@Override
public boolean isValidResult(OutputData outputData) {
@ -171,14 +171,14 @@ public class BionymLocalTest implements DMTest {
MapResource mapResource = (MapResource) resource;
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
***REMOVED***
}
valid = true;
***REMOVED*** else {
} else {
valid = false;
***REMOVED***
}
return valid;
***REMOVED***
}
***REMOVED***
}

View File

@ -1,7 +1,7 @@
package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.MapResource;
@ -10,9 +10,9 @@ import org.gcube.data.analysis.dataminermanagercl.shared.parameters.EnumParamete
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.FileParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
***REMOVED***
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -28,7 +28,7 @@ public class CMSY2Test implements DMTest {
@Override
public String getId() {
return id;
***REMOVED***
}
@Override
public void createRequest(Operator operator) {
@ -242,7 +242,7 @@ public class CMSY2Test implements DMTest {
operator.setOperatorParameters(parameters);
***REMOVED***
}
@Override
public String getResult(OutputData outputData) {
@ -256,13 +256,13 @@ public class CMSY2Test implements DMTest {
+ mapResource.getMap().get(key));
result.append("Entry: " + key + " = "
+ mapResource.getMap().get(key));
***REMOVED***
}
***REMOVED*** else {
} else {
***REMOVED***
}
return result.toString();
***REMOVED***
}
@Override
public boolean isValidResult(OutputData outputData) {
@ -274,14 +274,14 @@ public class CMSY2Test implements DMTest {
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = "
+ mapResource.getMap().get(key));
***REMOVED***
}
valid=true;
***REMOVED*** else {
} else {
valid=false;
***REMOVED***
}
return valid;
***REMOVED***
}
***REMOVED***
}

View File

@ -1,7 +1,7 @@
package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.MapResource;
@ -9,9 +9,9 @@ import org.gcube.data.analysis.dataminermanagercl.shared.data.output.Resource;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.TabularParameter;
***REMOVED***
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -26,7 +26,7 @@ public class CSquareColumnCreatorTest implements DMTest {
@Override
public String getId() {
return id;
***REMOVED***
}
@Override
public void createRequest(Operator operator) {
@ -65,7 +65,7 @@ public class CSquareColumnCreatorTest implements DMTest {
logger.debug("Parameters set: " + parameters);
operator.setOperatorParameters(parameters);
***REMOVED***
}
@Override
public String getResult(OutputData outputData) {
@ -77,13 +77,13 @@ public class CSquareColumnCreatorTest implements DMTest {
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
result.append("Entry: " + key + " = " + mapResource.getMap().get(key));
***REMOVED***
}
***REMOVED*** else {
} else {
***REMOVED***
}
return result.toString();
***REMOVED***
}
@Override
public boolean isValidResult(OutputData outputData) {
@ -94,14 +94,14 @@ public class CSquareColumnCreatorTest implements DMTest {
MapResource mapResource = (MapResource) resource;
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
***REMOVED***
}
valid = true;
***REMOVED*** else {
} else {
valid = false;
***REMOVED***
}
return valid;
***REMOVED***
}
***REMOVED***
}

View File

@ -3,7 +3,7 @@ package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -17,9 +17,9 @@ import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ColumnListPa
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.TabularParameter;
***REMOVED***
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -34,7 +34,7 @@ public class DBScanTest implements DMTest {
@Override
public String getId() {
return id;
***REMOVED***
}
@Override
public void createRequest(Operator operator) {
@ -71,7 +71,7 @@ public class DBScanTest implements DMTest {
logger.debug("Parameters set: " + parameters);
operator.setOperatorParameters(parameters);
***REMOVED***
}
@Override
public String getResult(OutputData outputData) {
@ -114,16 +114,16 @@ public class DBScanTest implements DMTest {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
result.append("Entry: " + key + " = " + mapResource.getMap().get(key));
break;
***REMOVED***
}
***REMOVED***
}
***REMOVED*** else {
} else {
***REMOVED***
}
return result.toString();
***REMOVED***
}
@Override
public boolean isValidResult(OutputData outputData) {
@ -134,20 +134,20 @@ public class DBScanTest implements DMTest {
MapResource mapResource = (MapResource) resource;
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
***REMOVED***
}
valid = true;
***REMOVED*** else {
} else {
valid = false;
***REMOVED***
}
return valid;
***REMOVED***
}
private String retrieveFileName(String url) {
String fileName = "output";
***REMOVED***
try {
URL urlObj;
urlObj = new URL(url);
@ -159,18 +159,18 @@ public class DBScanTest implements DMTest {
Matcher regexMatcher = regex.matcher(contentDisposition);
if (regexMatcher.find()) {
fileName = regexMatcher.group();
***REMOVED***
}
if (fileName == null || fileName.isEmpty()) {
fileName = "output";
***REMOVED***
}
return fileName;
***REMOVED***
} catch (Throwable e) {
logger.error("Error retrieving file name: " + e.getLocalizedMessage(), e);
return fileName;
***REMOVED***
}
***REMOVED***
}
***REMOVED***
}

View File

@ -1,7 +1,7 @@
package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
/**
*
@ -19,4 +19,4 @@ public interface DMTest {
public String getResult(OutputData outputData);
***REMOVED***
}

View File

@ -1,7 +1,7 @@
package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.MapResource;
@ -12,9 +12,9 @@ import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ListParamete
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.TabularParameter;
***REMOVED***
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -29,7 +29,7 @@ public class FeedForwardAnnTest implements DMTest {
@Override
public String getId() {
return id;
***REMOVED***
}
@Override
public void createRequest(Operator operator) {
@ -77,7 +77,7 @@ public class FeedForwardAnnTest implements DMTest {
operator.setOperatorParameters(parameters);
***REMOVED***
}
@Override
public String getResult(OutputData outputData) {
@ -91,13 +91,13 @@ public class FeedForwardAnnTest implements DMTest {
+ mapResource.getMap().get(key));
result.append("Entry: " + key + " = "
+ mapResource.getMap().get(key));
***REMOVED***
}
***REMOVED*** else {
} else {
***REMOVED***
}
return result.toString();
***REMOVED***
}
@Override
public boolean isValidResult(OutputData outputData) {
@ -109,14 +109,14 @@ public class FeedForwardAnnTest implements DMTest {
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = "
+ mapResource.getMap().get(key));
***REMOVED***
}
valid=true;
***REMOVED*** else {
} else {
valid=false;
***REMOVED***
}
return valid;
***REMOVED***
}
***REMOVED***
}

View File

@ -3,7 +3,7 @@ package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -17,9 +17,9 @@ import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ColumnListPa
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.TabularParameter;
***REMOVED***
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -34,7 +34,7 @@ public class GenericChartsTest implements DMTest {
@Override
public String getId() {
return id;
***REMOVED***
}
@Override
public void createRequest(Operator operator) {
@ -66,7 +66,7 @@ public class GenericChartsTest implements DMTest {
logger.debug("Parameters set: " + parameters);
operator.setOperatorParameters(parameters);
***REMOVED***
}
@Override
public String getResult(OutputData outputData) {
@ -109,16 +109,16 @@ public class GenericChartsTest implements DMTest {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
result.append("Entry: " + key + " = " + mapResource.getMap().get(key));
break;
***REMOVED***
}
***REMOVED***
}
***REMOVED*** else {
} else {
***REMOVED***
}
return result.toString();
***REMOVED***
}
@Override
public boolean isValidResult(OutputData outputData) {
@ -129,20 +129,20 @@ public class GenericChartsTest implements DMTest {
MapResource mapResource = (MapResource) resource;
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
***REMOVED***
}
valid = true;
***REMOVED*** else {
} else {
valid = false;
***REMOVED***
}
return valid;
***REMOVED***
}
private String retrieveFileName(String url) {
String fileName = "output";
***REMOVED***
try {
URL urlObj;
urlObj = new URL(url);
@ -154,18 +154,18 @@ public class GenericChartsTest implements DMTest {
Matcher regexMatcher = regex.matcher(contentDisposition);
if (regexMatcher.find()) {
fileName = regexMatcher.group();
***REMOVED***
}
if (fileName == null || fileName.isEmpty()) {
fileName = "output";
***REMOVED***
}
return fileName;
***REMOVED***
} catch (Throwable e) {
logger.error("Error retrieving file name: " + e.getLocalizedMessage(), e);
return fileName;
***REMOVED***
}
***REMOVED***
}
***REMOVED***
}

View File

@ -1,16 +1,16 @@
package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.MapResource;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.Resource;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
***REMOVED***
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -26,7 +26,7 @@ public class ListDBNameTest implements DMTest {
@Override
public String getId() {
return id;
***REMOVED***
}
@Override
public void createRequest(Operator operator) {
@ -43,7 +43,7 @@ public class ListDBNameTest implements DMTest {
logger.debug("Parameters set: " + parameters);
operator.setOperatorParameters(parameters);
***REMOVED***
}
@Override
public String getResult(OutputData outputData) {
@ -57,13 +57,13 @@ public class ListDBNameTest implements DMTest {
+ mapResource.getMap().get(key));
result.append("Entry: " + key + " = "
+ mapResource.getMap().get(key));
***REMOVED***
}
***REMOVED*** else {
} else {
***REMOVED***
}
return result.toString();
***REMOVED***
}
@Override
public boolean isValidResult(OutputData outputData) {
@ -75,14 +75,14 @@ public class ListDBNameTest implements DMTest {
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = "
+ mapResource.getMap().get(key));
***REMOVED***
}
valid=true;
***REMOVED*** else {
} else {
valid=false;
***REMOVED***
}
return valid;
***REMOVED***
}
***REMOVED***
}

View File

@ -1,16 +1,16 @@
package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.MapResource;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.Resource;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.FileParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
***REMOVED***
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -25,7 +25,7 @@ public class OpenMeshRecostructorGPUTest implements DMTest {
@Override
public String getId() {
return id;
***REMOVED***
}
@Override
public void createRequest(Operator operator) {
@ -42,7 +42,7 @@ public class OpenMeshRecostructorGPUTest implements DMTest {
logger.debug("Parameters set: " + parameters);
operator.setOperatorParameters(parameters);
***REMOVED***
}
@Override
public String getResult(OutputData outputData) {
@ -54,13 +54,13 @@ public class OpenMeshRecostructorGPUTest implements DMTest {
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
result.append("Entry: " + key + " = " + mapResource.getMap().get(key));
***REMOVED***
}
***REMOVED*** else {
} else {
***REMOVED***
}
return result.toString();
***REMOVED***
}
@Override
public boolean isValidResult(OutputData outputData) {
@ -71,14 +71,14 @@ public class OpenMeshRecostructorGPUTest implements DMTest {
MapResource mapResource = (MapResource) resource;
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
***REMOVED***
}
valid = true;
***REMOVED*** else {
} else {
valid = false;
***REMOVED***
}
return valid;
***REMOVED***
}
***REMOVED***
}

View File

@ -3,7 +3,7 @@ package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -18,9 +18,9 @@ import org.gcube.data.analysis.dataminermanagercl.shared.parameters.EnumParamete
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.TabularParameter;
***REMOVED***
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -35,7 +35,7 @@ public class PolygonsToMapTest implements DMTest {
@Override
public String getId() {
return id;
***REMOVED***
}
@Override
public void createRequest(Operator operator) {
@ -82,7 +82,7 @@ public class PolygonsToMapTest implements DMTest {
logger.debug("Parameters set: " + parameters);
operator.setOperatorParameters(parameters);
***REMOVED***
}
@Override
public String getResult(OutputData outputData) {
@ -125,16 +125,16 @@ public class PolygonsToMapTest implements DMTest {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
result.append("Entry: " + key + " = " + mapResource.getMap().get(key));
break;
***REMOVED***
}
***REMOVED***
}
***REMOVED*** else {
} else {
***REMOVED***
}
return result.toString();
***REMOVED***
}
@Override
public boolean isValidResult(OutputData outputData) {
@ -145,20 +145,20 @@ public class PolygonsToMapTest implements DMTest {
MapResource mapResource = (MapResource) resource;
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
***REMOVED***
}
valid = true;
***REMOVED*** else {
} else {
valid = false;
***REMOVED***
}
return valid;
***REMOVED***
}
private String retrieveFileName(String url) {
String fileName = "output";
***REMOVED***
try {
URL urlObj;
urlObj = new URL(url);
@ -170,18 +170,18 @@ public class PolygonsToMapTest implements DMTest {
Matcher regexMatcher = regex.matcher(contentDisposition);
if (regexMatcher.find()) {
fileName = regexMatcher.group();
***REMOVED***
}
if (fileName == null || fileName.isEmpty()) {
fileName = "output";
***REMOVED***
}
return fileName;
***REMOVED***
} catch (Throwable e) {
logger.error("Error retrieving file name: " + e.getLocalizedMessage(), e);
return fileName;
***REMOVED***
}
***REMOVED***
}
***REMOVED***
}

View File

@ -1,7 +1,7 @@
package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.MapResource;
@ -9,9 +9,9 @@ import org.gcube.data.analysis.dataminermanagercl.shared.data.output.Resource;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.FileParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
***REMOVED***
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -27,7 +27,7 @@ public class RasterDataPublisherTest implements DMTest {
@Override
public String getId() {
return id;
***REMOVED***
}
@ -82,7 +82,7 @@ public class RasterDataPublisherTest implements DMTest {
logger.debug("Parameters set: " + parameters);
operator.setOperatorParameters(parameters);
***REMOVED***
}
@Override
public String getResult(OutputData outputData) {
@ -96,13 +96,13 @@ public class RasterDataPublisherTest implements DMTest {
+ mapResource.getMap().get(key));
result.append("Entry: " + key + " = "
+ mapResource.getMap().get(key));
***REMOVED***
}
***REMOVED*** else {
} else {
***REMOVED***
}
return result.toString();
***REMOVED***
}
@Override
public boolean isValidResult(OutputData outputData) {
@ -114,14 +114,14 @@ public class RasterDataPublisherTest implements DMTest {
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = "
+ mapResource.getMap().get(key));
***REMOVED***
}
valid=true;
***REMOVED*** else {
} else {
valid=false;
***REMOVED***
}
return valid;
***REMOVED***
}
***REMOVED***
}

View File

@ -1,16 +1,16 @@
package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.MapResource;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.Resource;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.FileParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
***REMOVED***
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -25,7 +25,7 @@ public class WebAppPublisherTest implements DMTest {
@Override
public String getId() {
return id;
***REMOVED***
}
@Override
public void createRequest(Operator operator) {
@ -42,7 +42,7 @@ public class WebAppPublisherTest implements DMTest {
logger.debug("Parameters set: " + parameters);
operator.setOperatorParameters(parameters);
***REMOVED***
}
@Override
public String getResult(OutputData outputData) {
@ -54,13 +54,13 @@ public class WebAppPublisherTest implements DMTest {
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
result.append("Entry: " + key + " = " + mapResource.getMap().get(key));
***REMOVED***
}
***REMOVED*** else {
} else {
***REMOVED***
}
return result.toString();
***REMOVED***
}
@Override
public boolean isValidResult(OutputData outputData) {
@ -71,14 +71,14 @@ public class WebAppPublisherTest implements DMTest {
MapResource mapResource = (MapResource) resource;
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = " + mapResource.getMap().get(key));
***REMOVED***
}
valid = true;
***REMOVED*** else {
} else {
valid = false;
***REMOVED***
}
return valid;
***REMOVED***
}
***REMOVED***
}

View File

@ -1,16 +1,16 @@
package org.gcube.portlets.user.dataminermanagertester.server.testconfig;
import java.util.ArrayList;
***REMOVED***
import java.util.List;
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.MapResource;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.Resource;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
***REMOVED***
***REMOVED***
***REMOVED***
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -26,7 +26,7 @@ public class XYExtractorTest implements DMTest {
@Override
public String getId() {
return id;
***REMOVED***
}
@Override
@ -91,7 +91,7 @@ public class XYExtractorTest implements DMTest {
logger.debug("Parameters set: " + parameters);
operator.setOperatorParameters(parameters);
***REMOVED***
}
@Override
public String getResult(OutputData outputData) {
@ -105,13 +105,13 @@ public class XYExtractorTest implements DMTest {
+ mapResource.getMap().get(key));
result.append("Entry: " + key + " = "
+ mapResource.getMap().get(key));
***REMOVED***
}
***REMOVED*** else {
} else {
***REMOVED***
}
return result.toString();
***REMOVED***
}
@Override
public boolean isValidResult(OutputData outputData) {
@ -123,14 +123,14 @@ public class XYExtractorTest implements DMTest {
for (String key : mapResource.getMap().keySet()) {
logger.debug("Entry: " + key + " = "
+ mapResource.getMap().get(key));
***REMOVED***
}
valid=true;
***REMOVED*** else {
} else {
valid=false;
***REMOVED***
}
return valid;
***REMOVED***
}
***REMOVED***
}

View File

@ -34,8 +34,8 @@ public class Constants {
public static final int TIME_UPDATE_COMPUTATION_STATUS_PANEL = 5 * 1000;// 7*1000;
public static final String[] ClassificationNames = { "User Perspective" ***REMOVED***;
// "Computation Perspective"***REMOVED***;
public static final String[] ClassificationNames = { "User Perspective" };
// "Computation Perspective"};
public static final String UserClassificationName = ClassificationNames[0];
// public final static String computationClassificationName =
// classificationNames[1];
@ -48,10 +48,10 @@ public class Constants {
public static final String WPSUser = "giancarlo.panichi";
public static final String WPSLanguage = "en-US";
/*
***REMOVED***public static final String WPSToken =
***REMOVED***"4ccc2c35-60c9-4c9b-9800-616538d5d48b"; public static final String
***REMOVED***WPSUser = "gianpaolo.coro";
***REMOVED***
* public static final String WPSToken =
* "4ccc2c35-60c9-4c9b-9800-616538d5d48b"; public static final String
* WPSUser = "gianpaolo.coro";
*/
// DownloadFolderServlet
public static final String DOWNLOAD_FOLDER_SERVLET = "DownloadFolderServlet";
@ -72,4 +72,4 @@ public class Constants {
public static final int DAEMON_SLEEP_MILLIS = 1000;
public static final int TEST_MONITOR_PERIODMILLIS = 3000;
***REMOVED***
}

View File

@ -19,7 +19,7 @@ public class DMBatchConfig implements Serializable {
public DMBatchConfig() {
super();
***REMOVED***
}
public DMBatchConfig(ArrayList<String> dms, String token, String protocol, String testType) {
super();
@ -27,15 +27,15 @@ public class DMBatchConfig implements Serializable {
this.token = token;
this.protocol = protocol;
this.testType = testType;
***REMOVED***
}
public ArrayList<String> getDms() {
return dms;
***REMOVED***
}
public void setDms(ArrayList<String> dms) {
this.dms = dms;
***REMOVED***
}
public ArrayList<String> getDmsUrls() {
ArrayList<String> dmsUrls = new ArrayList<>();
@ -45,40 +45,40 @@ public class DMBatchConfig implements Serializable {
String dmName = dms.get(i);
String url = new String(protocol + "://" + dmName + "/wps/");
dmsUrls.add(url);
***REMOVED***
***REMOVED***
***REMOVED***
}
}
}
return dmsUrls;
***REMOVED***
}
public String getToken() {
return token;
***REMOVED***
}
public void setToken(String token) {
this.token = token;
***REMOVED***
}
public String getProtocol() {
return protocol;
***REMOVED***
}
public void setProtocol(String protocol) {
this.protocol = protocol;
***REMOVED***
}
public String getTestType() {
return testType;
***REMOVED***
}
public void setTestType(String testType) {
this.testType = testType;
***REMOVED***
}
@Override
public String toString() {
return "DMBatchConfig [dms=" + dms + ", token=" + token + ", protocol=" + protocol + ", testType=" + testType
+ "]";
***REMOVED***
}
***REMOVED***
}

View File

@ -18,7 +18,7 @@ public class DMConfig implements Serializable {
public DMConfig() {
super();
***REMOVED***
}
public DMConfig(String dm, String token, String protocol, String testType) {
super();
@ -26,51 +26,51 @@ public class DMConfig implements Serializable {
this.token = token;
this.protocol = protocol;
this.testType = testType;
***REMOVED***
}
public String getDm() {
return dm;
***REMOVED***
}
public void setDm(String dm) {
this.dm = dm;
***REMOVED***
}
public String getDmUrl() {
String url = null;
if (protocol != null && dm != null) {
url = new String(protocol + "://" + dm + "/wps/");
***REMOVED***
}
return url;
***REMOVED***
}
public String getToken() {
return token;
***REMOVED***
}
public void setToken(String token) {
this.token = token;
***REMOVED***
}
public String getProtocol() {
return protocol;
***REMOVED***
}
public void setProtocol(String protocol) {
this.protocol = protocol;
***REMOVED***
}
public String getTestType() {
return testType;
***REMOVED***
}
public void setTestType(String testType) {
this.testType = testType;
***REMOVED***
}
@Override
public String toString() {
return "DMConfig [dm=" + dm + ", token=" + token + ", protocol=" + protocol + ", testType=" + testType + "]";
***REMOVED***
}
***REMOVED***
}

View File

@ -19,7 +19,7 @@ public class DMDiffConfig implements Serializable {
public DMDiffConfig() {
super();
***REMOVED***
}
public DMDiffConfig(String dm1, String token1, String dm2, String token2, String protocol) {
super();
@ -28,68 +28,68 @@ public class DMDiffConfig implements Serializable {
this.dm2 = dm2;
this.token2 = token2;
this.protocol = protocol;
***REMOVED***
}
public String getDm1() {
return dm1;
***REMOVED***
}
public void setDm1(String dm1) {
this.dm1 = dm1;
***REMOVED***
}
public String getDmUrl1() {
String url=null;
if (protocol != null && dm1 != null) {
url = new String(protocol + "://" + dm1 + "/wps/");
***REMOVED***
}
return url;
***REMOVED***
}
public String getToken1() {
return token1;
***REMOVED***
}
public void setToken1(String token1) {
this.token1 = token1;
***REMOVED***
}
public String getDm2() {
return dm2;
***REMOVED***
}
public void setDm2(String dm2) {
this.dm2 = dm2;
***REMOVED***
}
public String getDmUrl2() {
String url=null;
if (protocol != null && dm2 != null) {
url = new String(protocol + "://" + dm2 + "/wps/");
***REMOVED***
}
return url;
***REMOVED***
}
public String getToken2() {
return token2;
***REMOVED***
}
public void setToken2(String token2) {
this.token2 = token2;
***REMOVED***
}
public String getProtocol() {
return protocol;
***REMOVED***
}
public void setProtocol(String protocol) {
this.protocol = protocol;
***REMOVED***
}
@Override
public String toString() {
return "DMDiffConfig [dm1=" + dm1 + ", token1=" + token1 + ", dm2=" + dm2 + ", token2=" + token2 + ", protocol="
+ protocol + "]";
***REMOVED***
}
***REMOVED***
}

View File

@ -11,34 +11,34 @@ public enum ProtocolType {
private ProtocolType(final String id) {
this.id = id;
***REMOVED***
}
private final String id;
@Override
public String toString() {
return id;
***REMOVED***
}
public String getLabel() {
return id;
***REMOVED***
}
public boolean compareId(String identificator) {
if (identificator.compareTo(id) == 0) {
return true;
***REMOVED*** else {
} else {
return false;
***REMOVED***
***REMOVED***
}
}
public static ProtocolType getTypeFromId(String id) {
for (ProtocolType testType : values()) {
if (testType.id.compareToIgnoreCase(id) == 0) {
return testType;
***REMOVED***
***REMOVED***
}
}
return null;
***REMOVED***
}
***REMOVED***
}

View File

@ -15,34 +15,34 @@ public enum TestType {
private TestType(final String id) {
this.id = id;
***REMOVED***
}
private final String id;
@Override
public String toString() {
return id;
***REMOVED***
}
public String getLabel() {
return id;
***REMOVED***
}
public boolean compareId(String identificator) {
if (identificator.compareTo(id) == 0) {
return true;
***REMOVED*** else {
} else {
return false;
***REMOVED***
***REMOVED***
}
}
public static TestType getTypeFromId(String id) {
for (TestType testType : values()) {
if (testType.id.compareToIgnoreCase(id) == 0) {
return testType;
***REMOVED***
***REMOVED***
}
}
return null;
***REMOVED***
}
***REMOVED***
}

View File

@ -13,30 +13,30 @@ public class ServiceException extends Exception {
private static final long serialVersionUID = 2448597554902518518L;
***REMOVED***
***REMOVED***
***REMOVED***
/**
*
*/
public ServiceException() {
super();
***REMOVED***
}
***REMOVED***
***REMOVED***@param message
***REMOVED*** message
***REMOVED***
/**
* @param message
* message
*/
public ServiceException(String message) {
super(message);
***REMOVED***
}
***REMOVED***
***REMOVED***
***REMOVED***@param message
***REMOVED*** message
***REMOVED***@param throwable
***REMOVED*** error
***REMOVED***
/**
*
* @param message
* message
* @param throwable
* error
*/
public ServiceException(String message, Throwable throwable) {
super(message, throwable);
***REMOVED***
}
***REMOVED***
}

View File

@ -17,24 +17,24 @@ public class BatchTestResult implements Serializable {
public BatchTestResult() {
super();
***REMOVED***
}
public BatchTestResult(LinkedHashMap<String, SingleTestResult> testResultMap) {
super();
this.testResultMap = testResultMap;
***REMOVED***
}
public LinkedHashMap<String, SingleTestResult> getTestResultMap() {
return testResultMap;
***REMOVED***
}
public void setTestResultMap(LinkedHashMap<String, SingleTestResult> testResultMap) {
this.testResultMap = testResultMap;
***REMOVED***
}
@Override
public String toString() {
return "BatchTestResult [testResultMap=" + testResultMap + "]";
***REMOVED***
}
***REMOVED***
}

View File

@ -19,42 +19,42 @@ public class BatchTestRow implements Serializable {
public BatchTestRow() {
super();
***REMOVED***
}
public BatchTestRow(String url, Status status, String response) {
super();
this.url = url;
this.status = status;
this.response = response;
***REMOVED***
}
public String getUrl() {
return url;
***REMOVED***
}
public void setUrl(String url) {
this.url = url;
***REMOVED***
}
public Status getStatus() {
return status;
***REMOVED***
}
public void setStatus(Status status) {
this.status = status;
***REMOVED***
}
public String getResponse() {
return response;
***REMOVED***
}
public void setResponse(String response) {
this.response = response;
***REMOVED***
}
@Override
public String toString() {
return "BatchTestRow [url=" + url + ", status=" + status + ", response=" + response + "]";
***REMOVED***
}
***REMOVED***
}

View File

@ -12,42 +12,42 @@ import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStat
*/
public class SingleTestResult implements Serializable {
***REMOVED***
***REMOVED***
***REMOVED***
/**
*
*/
private static final long serialVersionUID = -4779062510507675602L;
private ComputationStatus computationStatus;
private String response;
public SingleTestResult() {
super();
***REMOVED***
}
public SingleTestResult(ComputationStatus computationStatus, String response) {
super();
this.computationStatus = computationStatus;
this.response = response;
***REMOVED***
}
public ComputationStatus getComputationStatus() {
return computationStatus;
***REMOVED***
}
public void setComputationStatus(ComputationStatus computationStatus) {
this.computationStatus = computationStatus;
***REMOVED***
}
public String getResponse() {
return response;
***REMOVED***
}
public void setResponse(String response) {
this.response = response;
***REMOVED***
}
@Override
public String toString() {
return "SingleTestResult [computationStatus=" + computationStatus + ", response=" + response + "]";
***REMOVED***
}
***REMOVED***
}

View File

@ -21,7 +21,7 @@ public class UserInfo implements Serializable {
public UserInfo() {
super();
***REMOVED***
}
public UserInfo(String username, String groupId, String groupName,
String scope, String userEmailAddress, String userFullName) {
@ -32,55 +32,55 @@ public class UserInfo implements Serializable {
this.scope = scope;
this.userEmailAddress = userEmailAddress;
this.userFullName = userFullName;
***REMOVED***
}
public String getUsername() {
return username;
***REMOVED***
}
public void setUsername(String username) {
this.username = username;
***REMOVED***
}
public String getGroupId() {
return groupId;
***REMOVED***
}
public void setGroupId(String groupId) {
this.groupId = groupId;
***REMOVED***
}
public String getGroupName() {
return groupName;
***REMOVED***
}
public void setGroupName(String groupName) {
this.groupName = groupName;
***REMOVED***
}
public String getScope() {
return scope;
***REMOVED***
}
public void setScope(String scope) {
this.scope = scope;
***REMOVED***
}
public String getUserEmailAddress() {
return userEmailAddress;
***REMOVED***
}
public void setUserEmailAddress(String userEmailAddress) {
this.userEmailAddress = userEmailAddress;
***REMOVED***
}
public String getUserFullName() {
return userFullName;
***REMOVED***
}
public void setUserFullName(String userFullName) {
this.userFullName = userFullName;
***REMOVED***
}
@Override
public String toString() {
@ -88,8 +88,8 @@ public class UserInfo implements Serializable {
+ ", groupName=" + groupName + ", scope=" + scope
+ ", userEmailAddress=" + userEmailAddress + ", userFullName="
+ userFullName + "]";
***REMOVED***
}
***REMOVED***
}

View File

@ -12,4 +12,4 @@ public enum TaskStatus {
RUNNING,
COMPLETED,
ERROR;
***REMOVED***
}

View File

@ -10,7 +10,7 @@ html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
***REMOVED***
}
/**
* Remove default margin.
@ -18,7 +18,7 @@ html {
body {
margin: 0;
***REMOVED***
}
/* HTML5 display definitions
========================================================================== */
@ -42,7 +42,7 @@ nav,
section,
summary {
display: block;
***REMOVED***
}
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
@ -55,7 +55,7 @@ progress,
video {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
***REMOVED***
}
/**
* Address `[hidden]` styling not present in IE 8/9/10.
@ -65,7 +65,7 @@ video {
[hidden],
template {
display: none;
***REMOVED***
}
/* Links
========================================================================== */
@ -76,7 +76,7 @@ template {
a {
background: transparent;
***REMOVED***
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
@ -87,7 +87,7 @@ a:hover,
button:active,
button:hover {
outline: 0;
***REMOVED***
}
/* Text-level semantics
========================================================================== */
@ -98,7 +98,7 @@ button:hover {
abbr[title] {
border-bottom: 1px dotted;
***REMOVED***
}
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
@ -107,7 +107,7 @@ abbr[title] {
b,
strong {
font-weight: bold;
***REMOVED***
}
/**
* Address styling not present in Safari and Chrome.
@ -115,7 +115,7 @@ strong {
dfn {
font-style: italic;
***REMOVED***
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
@ -125,7 +125,7 @@ dfn {
h1 {
font-size: 2em;
margin: 0.67em 0;
***REMOVED***
}
/**
* Address styling not present in IE 8/9.
@ -134,7 +134,7 @@ h1 {
mark {
background: #ff0;
color: #000;
***REMOVED***
}
/**
* Address inconsistent and variable font size in all browsers.
@ -142,7 +142,7 @@ mark {
small {
font-size: 80%;
***REMOVED***
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
@ -154,15 +154,15 @@ sup {
line-height: 0;
position: relative;
vertical-align: baseline;
***REMOVED***
}
sup {
top: -0.5em;
***REMOVED***
}
sub {
bottom: -0.25em;
***REMOVED***
}
/* Embedded content
========================================================================== */
@ -173,7 +173,7 @@ sub {
img {
border: 0;
***REMOVED***
}
/* Grouping content
========================================================================== */
@ -184,7 +184,7 @@ img {
figure {
margin: 1em 40px;
***REMOVED***
}
/**
* Address differences between Firefox and other browsers.
@ -194,7 +194,7 @@ hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
***REMOVED***
}
/**
* Contain overflow in all browsers.
@ -202,7 +202,7 @@ hr {
pre {
overflow: auto;
***REMOVED***
}
/**
* Address odd `em`-unit font size rendering in all browsers.
@ -214,7 +214,7 @@ pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
***REMOVED***
}
/* Forms
========================================================================== */
@ -239,7 +239,7 @@ textarea {
color: inherit; /* 1 */
font: inherit; /* 2 */
margin: 0; /* 3 */
***REMOVED***
}
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
@ -247,7 +247,7 @@ textarea {
button {
overflow: visible;
***REMOVED***
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
@ -259,7 +259,7 @@ button {
button,
select {
text-transform: none;
***REMOVED***
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
@ -275,7 +275,7 @@ input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
***REMOVED***
}
/**
* Re-set default cursor for disabled elements.
@ -284,7 +284,7 @@ input[type="submit"] {
button[disabled],
html input[disabled] {
cursor: default;
***REMOVED***
}
/**
* Remove inner padding and border in Firefox 4+.
@ -294,7 +294,7 @@ button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
***REMOVED***
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
@ -303,7 +303,7 @@ input::-moz-focus-inner {
input {
line-height: normal;
***REMOVED***
}
/**
* It's recommended that you don't attempt to style these elements.
@ -317,7 +317,7 @@ input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
***REMOVED***
}
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
@ -328,7 +328,7 @@ input[type="radio"] {
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
***REMOVED***
}
/**
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
@ -341,7 +341,7 @@ input[type="search"] {
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
***REMOVED***
}
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
@ -352,7 +352,7 @@ input[type="search"] {
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
***REMOVED***
}
/**
* Define consistent border, margin, and padding.
@ -362,7 +362,7 @@ fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
***REMOVED***
}
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
@ -372,7 +372,7 @@ fieldset {
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
***REMOVED***
}
/**
* Remove default vertical scrollbar in IE 8/9/10/11.
@ -380,7 +380,7 @@ legend {
textarea {
overflow: auto;
***REMOVED***
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
@ -389,7 +389,7 @@ textarea {
optgroup {
font-weight: bold;
***REMOVED***
}
/* Tables
========================================================================== */
@ -401,9 +401,9 @@ optgroup {
table {
border-collapse: collapse;
border-spacing: 0;
***REMOVED***
}
td,
th {
padding: 0;
***REMOVED***
}

View File

@ -6,23 +6,23 @@
#pTable .top-panel {
background-color: white;
color: black;
***REMOVED***
}
/** Tool Panel icons **/
#pTable .top-panel .tool-panel i {
color: #e91e63;
***REMOVED***
}
/** Hovering rows **/
#pTable table tbody tr.data-row:hover {
background: rgba(33, 150, 243, 0.27);
color: #3f3f3f;
***REMOVED***
}
/** Columns **/
#pTable table tbody td:nth-child(3) {
background: #2196f3 !important;
color: #fff;
border-bottom: 2px solid #1976d2;
***REMOVED***
}
/** Table Headers **/
#pTable table thead tr th {
color: #1976d2;
***REMOVED***
}

View File

@ -2,4 +2,4 @@
/*
gwt-sprite: 'sideNavProfileBackground';
background-repeat: repeat; */
***REMOVED***
}

View File

@ -5,6 +5,6 @@
width: device-width;
scale: 1.0;
maximum-scale: 1.0;
***REMOVED***
}

View File

@ -13,7 +13,7 @@
<style>
:focus {
outline: none;
***REMOVED***
}
</style>
</head>
<body>

View File

@ -29,7 +29,7 @@ Enumeration<String> names=request.getAttributeNames();
while(names.hasMoreElements()){
String name=names.nextElement();
logger.info("Request Header:"+name+"="+request.getAttribute(name));
***REMOVED***
}
long groupId = com.liferay.portal.util.PortalUtil.getScopeGroupId(request);
String username = com.liferay.portal.util.PortalUtil.getUser(request).getScreenName();

View File

@ -0,0 +1,155 @@
package org.gcube.portlets.user.dataminermanagertester;
import static org.junit.Assert.assertTrue;
import java.util.List;
import org.gcube.data.analysis.dataminermanagercl.server.DataMinerService;
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClient;
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
import org.gcube.portlets.user.dataminermanagertester.shared.Constants;
import org.gcube.portlets.user.dataminermanagertester.shared.exception.ServiceException;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TestDataMinerAlgorithmsList {
private String token1 = "";
private String url1 = "";
private String token2 = "";
private String url2 = "";
private static Logger logger = LoggerFactory.getLogger(TestDataMinerAlgorithmsList.class);
/**
*
* List of algorithms in url1
*
*/
@Test
public void operatorsList() {
try {
if (Constants.TEST_ENABLE) {
logger.debug("Test Operators List");
SClient sClient1 = new DataMinerService().getClient(token1, url1);
List<OperatorsClassification> operatorsClassifications = sClient1.getOperatorsClassifications();
logger.debug("OperatorsClassifications: " + operatorsClassifications);
StringBuilder result = new StringBuilder();
result.append("Success\n");
for (OperatorsClassification opClass : operatorsClassifications) {
for (Operator op : opClass.getOperators()) {
result.append("Operator[Name=" + op.getName() + "]");
}
}
logger.debug("Result: " + result.toString());
assertTrue("Succes ", true);
} else {
assertTrue("Test Disable", true);
}
} catch (ServiceException e) {
logger.error(e.getLocalizedMessage());
} catch (Throwable e) {
logger.error("An error occurred getting the Capabilities: " + e.getLocalizedMessage(), e);
e.printStackTrace();
}
}
/**
* List of algorithms in url1 and not in url2
*
*/
@Test
public void operatorDiff() {
try {
if (Constants.TEST_ENABLE) {
logger.debug("Test Operators Diff");
SClient sClient1 = new DataMinerService().getClient(token1, url1);
List<OperatorsClassification> operatorsClassifications1 = sClient1.getOperatorsClassifications();
logger.debug("OperatorsClassifications1: " + operatorsClassifications1);
SClient sClient2 = new DataMinerService().getClient(token2, url2);
List<OperatorsClassification> operatorsClassifications2 = sClient2.getOperatorsClassifications();
logger.debug("OperatorsClassifications2: " + operatorsClassifications2);
logger.debug("----------------------------------");
logger.debug("Operators in: " + url1);
logger.debug("and not in: " + url2);
for (OperatorsClassification opClass1 : operatorsClassifications1) {
for (Operator op1 : opClass1.getOperators()) {
boolean op1Found = false;
for (OperatorsClassification opClass2 : operatorsClassifications2) {
for (Operator op2 : opClass2.getOperators()) {
if (op1.getId().compareTo(op2.getId()) == 0) {
op1Found = true;
break;
}
}
if (op1Found) {
break;
}
}
if (!op1Found) {
logger.debug("Op: " + op1.toString());
}
}
}
logger.debug("----------------------------------");
logger.debug("Operators in: " + url2);
logger.debug("and not in: " + url1);
for (OperatorsClassification opClass2 : operatorsClassifications2) {
for (Operator op2 : opClass2.getOperators()) {
boolean op2Found = false;
for (OperatorsClassification opClass1 : operatorsClassifications1) {
for (Operator op1 : opClass1.getOperators()) {
if (op2.getId().compareTo(op1.getId()) == 0) {
op2Found = true;
break;
}
}
if (op2Found) {
break;
}
}
if (!op2Found) {
logger.debug("Op: " + op2.toString());
}
}
}
assertTrue("Succes ", true);
} else {
assertTrue("Test Disable", true);
}
} catch (ServiceException e) {
logger.error(e.getLocalizedMessage());
} catch (Throwable e) {
logger.error("An error occurred getting operators diff: " + e.getLocalizedMessage(), e);
e.printStackTrace();
}
}
}