ref 8541: StatisticalAlgorithmImporter - Support Java 8 compatibility

https://support.d4science.org/issues/8541

Updated to support Java 8 compatibility

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/github-connector@148621 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2017-05-12 15:38:47 +00:00
parent 5cfedadc44
commit 6044205964
41 changed files with 244 additions and 276 deletions

View File

@ -1,19 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/github-connector-1.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/github-connector-1.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry including="**/*.java" kind="src" path="src/main/resources"/> <classpathentry excluding="**" kind="src" output="target/github-connector-1.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> <classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry including="**/*.java" kind="src" path="src/test/resources"/> <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
@ -26,5 +34,5 @@
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/github-connector-1.3.0-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/github-connector-1.4.0-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -1,4 +1,8 @@
<ReleaseNotes> <ReleaseNotes>
<Changeset component="org.gcube.portlets.widgets.githubconnector.1-4-0"
date="2017-06-12">
<Change>Support Java 8 compatibility [ticket #8541]</Change>
</Changeset>
<Changeset component="org.gcube.portlets.widgets.githubconnector.1-3-0" <Changeset component="org.gcube.portlets.widgets.githubconnector.1-3-0"
date="2017-02-15"> date="2017-02-15">
<Change>Updated PortalContext support[ticket #6279]</Change> <Change>Updated PortalContext support[ticket #6279]</Change>

33
pom.xml
View File

@ -12,7 +12,7 @@
<groupId>org.gcube.portlets.widgets</groupId> <groupId>org.gcube.portlets.widgets</groupId>
<artifactId>github-connector</artifactId> <artifactId>github-connector</artifactId>
<version>1.3.0-SNAPSHOT</version> <version>1.4.0-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<description>github-connector</description> <description>github-connector</description>
@ -40,8 +40,9 @@
<configDirectory>config</configDirectory> <configDirectory>config</configDirectory>
<!-- Java Version --> <!-- Java -->
<javaVersion>1.7</javaVersion> <maven.compiler.source>1.7</maven.compiler.source>
<!-- GWT configuration --> <!-- GWT configuration -->
<gwtVersion>2.7.0</gwtVersion> <gwtVersion>2.7.0</gwtVersion>
@ -183,14 +184,10 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- GCube Widgets <!-- GCube Widgets <dependency> <groupId>org.gcube.portlets.user</groupId>
<dependency> <artifactId>gcube-widgets</artifactId> <scope>compile</scope> </dependency> -->
<groupId>org.gcube.portlets.user</groupId>
<artifactId>gcube-widgets</artifactId>
<scope>compile</scope>
</dependency> -->
<!-- Storage --> <!-- Storage -->
<dependency> <dependency>
<groupId>org.gcube.contentmanagement</groupId> <groupId>org.gcube.contentmanagement</groupId>
@ -347,21 +344,12 @@
</plugin> </plugin>
<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${javaVersion}</source>
<target>${javaVersion}</target>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>2.2</version>
<configuration> <configuration>
<descriptors> <descriptors>
<descriptor>${distroDirectory}/descriptor.xml</descriptor> <descriptor>${distroDirectory}/descriptor.xml</descriptor>
@ -381,7 +369,8 @@
</plugins> </plugins>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--> <!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin> <plugin>
<groupId>org.eclipse.m2e</groupId> <groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId> <artifactId>lifecycle-mapping</artifactId>

View File

@ -12,8 +12,8 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubConnectorController { public class GitHubConnectorController {

View File

@ -20,7 +20,7 @@ import com.google.gwt.user.client.ui.TextBox;
/** /**
* *
* @author Giancarlo Panichi * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubConnectorCredentialCard extends WizardCard { public class GitHubConnectorCredentialCard extends WizardCard {

View File

@ -10,7 +10,7 @@ import com.google.gwt.core.shared.GWT;
/** /**
* *
* @author Giancarlo Panichi * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubConnectorManager implements EntryPoint { public class GitHubConnectorManager implements EntryPoint {

View File

@ -28,8 +28,8 @@ import com.google.gwt.user.client.ui.TextBox;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubConnectorRepositorySelectionCard extends WizardCard { public class GitHubConnectorRepositorySelectionCard extends WizardCard {

View File

@ -8,8 +8,8 @@ import com.google.gwt.user.client.Timer;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubConnectorWizard extends WizardWindow { public class GitHubConnectorWizard extends WizardWindow {

View File

@ -6,8 +6,8 @@ import com.google.gwt.resources.client.ImageResource;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface GCResources extends ClientBundle { public interface GCResources extends ClientBundle {

View File

@ -7,8 +7,8 @@ import com.google.gwt.resources.client.CssResource;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface WizardCSS extends CssResource { public interface WizardCSS extends CssResource {

View File

@ -14,7 +14,7 @@ import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
/** /**
* *
* @author Giancarlo Panichi * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
@RemoteServiceRelativePath("githubconnectorservice") @RemoteServiceRelativePath("githubconnectorservice")

View File

@ -13,7 +13,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
/** /**
* *
* @author Giancarlo Panichi * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface GitHubConnectorServiceAsync { public interface GitHubConnectorServiceAsync {

View File

@ -11,8 +11,8 @@ import com.google.gwt.user.client.ui.HTML;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class AlertDialog extends DialogBox implements ClickHandler { public class AlertDialog extends DialogBox implements ClickHandler {

View File

@ -4,8 +4,8 @@ import com.google.gwt.core.client.Callback;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GWTMessages { public class GWTMessages {

View File

@ -14,8 +14,8 @@ import com.google.gwt.user.client.ui.HTML;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class WaitDialog extends DialogBox { public class WaitDialog extends DialogBox {

View File

@ -10,8 +10,8 @@ import com.google.gwt.user.client.ui.SimplePanel;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class SimpleWizardCard extends WizardCard { public class SimpleWizardCard extends WizardCard {

View File

@ -17,8 +17,8 @@ import com.google.gwt.user.client.ui.Widget;
/** /**
* *
* @author "Giancarlo Panichi" * @author Giancarlo Panichi
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class WizardCard extends SimplePanel { public class WizardCard extends SimplePanel {

View File

@ -5,7 +5,7 @@ import com.google.gwt.i18n.client.Messages;
/** /**
* *
* @author giancarlo * @author giancarlo
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public interface WizardMessages extends Messages { public interface WizardMessages extends Messages {

View File

@ -37,8 +37,8 @@ import com.google.gwt.user.client.ui.Widget;
/** /**
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEventHandler { public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEventHandler {
@ -73,11 +73,10 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
// protected FillToolItem fillSpacingCardMoveToolBar; // protected FillToolItem fillSpacingCardMoveToolBar;
protected WizardMessages msgs; protected WizardMessages msgs;
protected DeckPanel deckPanel; protected DeckPanel deckPanel;
private Node closeEventTarget = null; private Node closeEventTarget = null;
private int zIndex=-1; private int zIndex = -1;
/** /**
* Create a new Wizard Window with the specified title. * Create a new Wizard Window with the specified title.
@ -102,17 +101,10 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
deckPanel = new DeckPanel(); deckPanel = new DeckPanel();
backButton = new Button("<div><img class='" backButton = new Button("<div><img class='" + GCResources.INSTANCE.wizardCSS().getWizardPreviousButtonIcon()
+ GCResources.INSTANCE.wizardCSS() + "' src='" + GCResources.INSTANCE.wizardPrevious24().getSafeUri().asString() + "'/>" + "<span class='"
.getWizardPreviousButtonIcon() + GCResources.INSTANCE.wizardCSS().getWizardPreviousButtonText() + "'>" + msgs.buttonBackLabel()
+ "' src='" + "</span>" + "</div>");
+ GCResources.INSTANCE.wizardPrevious24().getSafeUri()
.asString()
+ "'/>"
+ "<span class='"
+ GCResources.INSTANCE.wizardCSS()
.getWizardPreviousButtonText() + "'>"
+ msgs.buttonBackLabel() + "</span>" + "</div>");
backButton.setEnabled(false); backButton.setEnabled(false);
backButton.setTabIndex(1001); backButton.setTabIndex(1001);
@ -163,15 +155,14 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
} }
private void initHandler() { private void initHandler() {
resizeHandlerRegistration = Window resizeHandlerRegistration = Window.addResizeHandler(new ResizeHandler() {
.addResizeHandler(new ResizeHandler() {
@Override @Override
public void onResize(ResizeEvent event) { public void onResize(ResizeEvent event) {
center(); center();
} }
}); });
} }
@ -184,7 +175,6 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
this.originalTitle = title; this.originalTitle = title;
} }
/** /**
* Shows the next available card. * Shows the next available card.
*/ */
@ -279,7 +269,7 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
/** /**
* Returns the number of available cards. * Returns the number of available cards.
* *
* @return * @return the number of available cards
*/ */
public int getCardStackSize() { public int getCardStackSize() {
return cardStack.size(); return cardStack.size();
@ -288,7 +278,7 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
/** /**
* Returns the current active card. * Returns the current active card.
* *
* @return * @return active card position
*/ */
public int getCurrentCard() { public int getCurrentCard() {
int index = deckPanel.getVisibleWidget(); int index = deckPanel.getVisibleWidget();
@ -309,13 +299,10 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
* Sets the label of next button to "Finish" value * Sets the label of next button to "Finish" value
*/ */
public void setNextButtonToFinish() { public void setNextButtonToFinish() {
nextButton.setHTML("<div><span class='" nextButton.setHTML("<div><span class='" + GCResources.INSTANCE.wizardCSS().getWizardNextButtonText() + "'>"
+ GCResources.INSTANCE.wizardCSS().getWizardNextButtonText() + msgs.buttonFinishLabel() + "</span>" + "<img class='"
+ "'>" + msgs.buttonFinishLabel() + "</span>" + "<img class='" + GCResources.INSTANCE.wizardCSS().getWizardNextButtonIcon() + "'" + " src='"
+ GCResources.INSTANCE.wizardCSS().getWizardNextButtonIcon() + GCResources.INSTANCE.wizardGo24().getSafeUri().asString() + "'/></div>");
+ "'" + " src='"
+ GCResources.INSTANCE.wizardGo24().getSafeUri().asString()
+ "'/></div>");
// nextButton.setIcon(GCResources.INSTANCE.wizardGo()); // nextButton.setIcon(GCResources.INSTANCE.wizardGo());
// nextButton.setIconAlign(IconAlign.RIGHT); // nextButton.setIconAlign(IconAlign.RIGHT);
/* /*
@ -327,13 +314,10 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
} }
public void setNextButtonToDefault() { public void setNextButtonToDefault() {
nextButton.setHTML("<div><span class='" nextButton.setHTML("<div><span class='" + GCResources.INSTANCE.wizardCSS().getWizardNextButtonText() + "'>"
+ GCResources.INSTANCE.wizardCSS().getWizardNextButtonText() + msgs.buttonNextLabel() + "</span>" + "<img class='"
+ "'>" + msgs.buttonNextLabel() + "</span>" + "<img class='" + GCResources.INSTANCE.wizardCSS().getWizardNextButtonIcon() + "'" + " src='"
+ GCResources.INSTANCE.wizardCSS().getWizardNextButtonIcon() + GCResources.INSTANCE.wizardNext24().getSafeUri().asString() + "'/></div>");
+ "'" + " src='"
+ GCResources.INSTANCE.wizardNext24().getSafeUri().asString()
+ "'/></div>");
} }
/** /**
@ -402,6 +386,7 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
* Set the card list. * Set the card list.
* *
* @param cards * @param cards
* set the card list
*/ */
public void setCards(ArrayList<WizardCard> cards) { public void setCards(ArrayList<WizardCard> cards) {
for (WizardCard card : cards) { for (WizardCard card : cards) {
@ -477,6 +462,7 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
* Sets visible next button. * Sets visible next button.
* *
* @param visible * @param visible
* true if next button is visible
*/ */
protected void setNextButtonVisible(boolean visible) { protected void setNextButtonVisible(boolean visible) {
nextButton.setVisible(visible); nextButton.setVisible(visible);
@ -486,6 +472,7 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
* Sets visible back button. * Sets visible back button.
* *
* @param visible * @param visible
* true if back button is visible
*/ */
protected void setBackButtonVisible(boolean visible) { protected void setBackButtonVisible(boolean visible) {
backButton.setVisible(visible); backButton.setVisible(visible);
@ -516,20 +503,16 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
public ArrayList<WizardCard> getCardStack() { public ArrayList<WizardCard> getCardStack() {
return cardStack; return cardStack;
} }
public void showErrorAndHide(final String title, final String message) { public void showErrorAndHide(final String title, final String message) {
showErrorAndHide(title, message, showErrorAndHide(title, message, new Throwable());
new Throwable());
} }
public void showErrorAndHide(final String title, final String message, final Throwable throwable) {
public void showErrorAndHide(final String title, final String message, final WizardEvent event = new WizardEvent(WizardEventType.Failed);
final Throwable throwable) {
final WizardEvent event=new WizardEvent(WizardEventType.Failed);
event.setErrorMessage(message); event.setErrorMessage(message);
event.setException(new Exception(throwable)); event.setException(new Exception(throwable));
GWTMessages.alert(title, message, getZIndex(), new Callback<Void, Void>() { GWTMessages.alert(title, message, getZIndex(), new Callback<Void, Void>() {
@Override @Override
@ -550,24 +533,15 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
} }
private void addToolIcon() { private void addToolIcon() {
// get the "dialogTopRight" class td // get the "dialogTopRight" class td
Element dialogTopRight = getCellElement(0, 2); Element dialogTopRight = getCellElement(0, 2);
// close button image html // close button image html
dialogTopRight.setInnerHTML("<div class='" dialogTopRight.setInnerHTML("<div class='" + GCResources.INSTANCE.wizardCSS().getWizardToolButtonText() + "'>"
+ GCResources.INSTANCE.wizardCSS().getWizardToolButtonText() + "<img src='" + GCResources.INSTANCE.toolButtonClose20().getSafeUri().asString() + "' class='"
+ "'>" + GCResources.INSTANCE.wizardCSS().getWizardToolButtonIcon() + "' /></div>");
+ "<img src='"
+ GCResources.INSTANCE.toolButtonClose20().getSafeUri()
.asString() + "' class='"
+ GCResources.INSTANCE.wizardCSS().getWizardToolButtonIcon()
+ "' /></div>");
// set the event target // set the event target
closeEventTarget = dialogTopRight.getChild(0).getChild(0); closeEventTarget = dialogTopRight.getChild(0).getChild(0);
@ -577,9 +551,8 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
protected void onPreviewNativeEvent(NativePreviewEvent event) { protected void onPreviewNativeEvent(NativePreviewEvent event) {
NativeEvent nativeEvent = event.getNativeEvent(); NativeEvent nativeEvent = event.getNativeEvent();
if (!event.isCanceled() && (event.getTypeInt() == Event.ONCLICK) if (!event.isCanceled() && (event.getTypeInt() == Event.ONCLICK) && isCloseEvent(nativeEvent)) {
&& isCloseEvent(nativeEvent)) { final WizardEvent wizardEvent = new WizardEvent(WizardEventType.Aborted);
final WizardEvent wizardEvent=new WizardEvent(WizardEventType.Aborted);
fireEvent(wizardEvent); fireEvent(wizardEvent);
this.hide(); this.hide();
} }
@ -601,15 +574,14 @@ public class WizardWindow extends DialogBox implements WizardEvent.HasWizardEven
} }
public void setZIndex(int zIndex) { public void setZIndex(int zIndex) {
this.zIndex=zIndex; this.zIndex = zIndex;
getGlassElement().getStyle().setZIndex(zIndex); getGlassElement().getStyle().setZIndex(zIndex);
getElement().getStyle().setZIndex(zIndex+1); getElement().getStyle().setZIndex(zIndex + 1);
} }
public int getZIndex(){ public int getZIndex() {
return zIndex; return zIndex;
} }
} }

View File

@ -9,8 +9,8 @@ import com.google.gwt.event.shared.HasHandlers;
* Wizard Event * Wizard Event
* *
* *
* @author "Giancarlo Panichi" <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class WizardEvent extends GwtEvent<WizardEvent.WizardEventHandler> { public class WizardEvent extends GwtEvent<WizardEvent.WizardEventHandler> {

View File

@ -5,17 +5,13 @@ import java.util.List;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public enum WizardEventType { public enum WizardEventType {
Completed("Completed"), Failed("Failed"), Aborted("Aborted"), Background( Completed("Completed"), Failed("Failed"), Aborted("Aborted"), Background("Background");
"Background");
/**
* @param text
*/
private WizardEventType(final String id) { private WizardEventType(final String id) {
this.id = id; this.id = id;
} }
@ -35,11 +31,6 @@ public enum WizardEventType {
return id; return id;
} }
/**
*
* @param id
* @return
*/
public static WizardEventType getTypeFromId(String id) { public static WizardEventType getTypeFromId(String id) {
if (id == null || id.isEmpty()) if (id == null || id.isEmpty())
return null; return null;

View File

@ -18,7 +18,7 @@ import org.slf4j.LoggerFactory;
/** /**
* *
* @author giancarlo * @author giancarlo
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubConnectorPortlet extends GenericPortlet { public class GitHubConnectorPortlet extends GenericPortlet {

View File

@ -19,8 +19,8 @@ import com.google.gwt.user.server.rpc.RemoteServiceServlet;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
@SuppressWarnings("serial") @SuppressWarnings("serial")

View File

@ -18,8 +18,8 @@ import org.gcube.vomanagement.usermanagement.model.GCubeUser;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
@ -30,11 +30,12 @@ public class SessionUtil {
/** /**
* *
* @param httpServletRequest * @param httpServletRequest
* @return * http servlet request
* @throws TDGWTServiceException * @return service credentials
* @throws ServiceException
* service exception
*/ */
public static ServiceCredentials getServiceCredentials( public static ServiceCredentials getServiceCredentials(HttpServletRequest httpServletRequest)
HttpServletRequest httpServletRequest)
throws ServiceException { throws ServiceException {
return getServiceCredentials(httpServletRequest, null); return getServiceCredentials(httpServletRequest, null);
} }
@ -42,12 +43,14 @@ public class SessionUtil {
/** /**
* *
* @param httpServletRequest * @param httpServletRequest
* http service request
* @param scopeGroupId * @param scopeGroupId
* @return * scope group id
* @throws TDGWTServiceException * @return service credentials
* @throws ServiceException
* service exception
*/ */
public static ServiceCredentials getServiceCredentials( public static ServiceCredentials getServiceCredentials(HttpServletRequest httpServletRequest, String scopeGroupId)
HttpServletRequest httpServletRequest, String scopeGroupId)
throws ServiceException { throws ServiceException {
ServiceCredentials sCredentials = null; ServiceCredentials sCredentials = null;
@ -105,8 +108,7 @@ public class SessionUtil {
GCubeUser gCubeUser = pContext.getCurrentUser(httpServletRequest); GCubeUser gCubeUser = pContext.getCurrentUser(httpServletRequest);
if (gCubeUser == null) { if (gCubeUser == null) {
String error = "Error retrieving gCubeUser in scope " + scope String error = "Error retrieving gCubeUser in scope " + scope + ": " + gCubeUser;
+ ": " + gCubeUser;
logger.error(error); logger.error(error);
throw new ServiceException(error); throw new ServiceException(error);
} }
@ -114,8 +116,7 @@ public class SessionUtil {
userName = gCubeUser.getUsername(); userName = gCubeUser.getUsername();
if (userName == null || userName.isEmpty()) { if (userName == null || userName.isEmpty()) {
String error = "Error retrieving username in scope " + scope String error = "Error retrieving username in scope " + scope + ": " + userName;
+ ": " + userName;
logger.error(error); logger.error(error);
throw new ServiceException(error); throw new ServiceException(error);
} }
@ -123,8 +124,7 @@ public class SessionUtil {
token = pContext.getCurrentUserToken(scope, userName); token = pContext.getCurrentUserToken(scope, userName);
if (token == null || token.isEmpty()) { if (token == null || token.isEmpty()) {
String error = "Error retrieving token for " + userName String error = "Error retrieving token for " + userName + " in " + scope + ": " + token;
+ " in " + scope + ": " + token;
logger.error(error); logger.error(error);
throw new ServiceException(error); throw new ServiceException(error);
} }
@ -168,16 +168,14 @@ public class SessionUtil {
} else { } else {
groupId = String.valueOf(pContext groupId = String.valueOf(pContext.getCurrentGroupId(httpServletRequest));
.getCurrentGroupId(httpServletRequest));
groupName = pContext.getCurrentGroupName(httpServletRequest); groupName = pContext.getCurrentGroupName(httpServletRequest);
} }
sCredentials = new ServiceCredentials(userName, fullName, name, sCredentials = new ServiceCredentials(userName, fullName, name, lastName, email, scope, groupId, groupName,
lastName, email, scope, groupId, groupName, userAvatarURL, userAvatarURL, token);
token);
} }
logger.info("ServiceCredentials: " + sCredentials); logger.info("ServiceCredentials: " + sCredentials);
@ -185,5 +183,4 @@ public class SessionUtil {
return sCredentials; return sCredentials;
} }
} }

View File

@ -24,8 +24,8 @@ import org.slf4j.LoggerFactory;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitConnectorService { public class GitConnectorService {
@ -37,8 +37,8 @@ public class GitConnectorService {
/** /**
* *
* @param userName * @param userName user name
* @param gitHubCredential * @param gitHubCredential github credential
*/ */
public GitConnectorService(String userName, GitHubCredential gitHubCredential) { public GitConnectorService(String userName, GitHubCredential gitHubCredential) {
this.userName = userName; this.userName = userName;

View File

@ -12,44 +12,36 @@ import org.gcube.portlets.widgets.githubconnector.shared.git.data.GitHubUser;
/** /**
* *
* @author Giancarlo Panichi * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubRepositoryBuilder { public class GitHubRepositoryBuilder {
private static Logger logger = Logger private static Logger logger = Logger.getLogger(GitHubRepositoryBuilder.class);
.getLogger(GitHubRepositoryBuilder.class);
/** /**
* *
* @param repository * @param repository
* @return * repository
* @return github repository
* @throws ServiceException * @throws ServiceException
* service exception
*/ */
public static GitHubRepository build(Repository repository) public static GitHubRepository build(Repository repository) throws ServiceException {
throws ServiceException {
try { try {
if (repository != null) { if (repository != null) {
if (repository.getOwner() != null) { if (repository.getOwner() != null) {
GitHubUser gitHubUser = new GitHubUser(repository GitHubUser gitHubUser = new GitHubUser(repository.getOwner().getId(),
.getOwner().getId(), repository.getOwner() repository.getOwner().getName(), repository.getOwner().getLogin(),
.getName(), repository.getOwner().getLogin(), repository.getOwner().getCompany(), repository.getOwner().getLocation(),
repository.getOwner().getCompany(), repository repository.getOwner().getUrl(), repository.getOwner().getEmail());
.getOwner().getLocation(), repository
.getOwner().getUrl(), repository.getOwner()
.getEmail());
GitHubRepository gitHubRepository = new GitHubRepository( GitHubRepository gitHubRepository = new GitHubRepository(repository.getId(), repository.getName(),
repository.getId(), repository.getName(), gitHubUser, repository.getDescription(), repository.getGitUrl(), repository.getWatchers(),
gitHubUser, repository.getDescription(), repository.getCreatedAt(), repository.getUpdatedAt());
repository.getGitUrl(), repository.getWatchers(),
repository.getCreatedAt(),
repository.getUpdatedAt());
return gitHubRepository; return gitHubRepository;
} else { } else {
logger.error("Invalid owner for repository: " logger.error("Invalid owner for repository: " + repository.getName());
+ repository.getName()); throw new ServiceException("Invalid owner for repository: " + repository.getName());
throw new ServiceException("Invalid owner for repository: "
+ repository.getName());
} }
} else { } else {
logger.error("Invalid repository: null"); logger.error("Invalid repository: null");
@ -67,11 +59,12 @@ public class GitHubRepositoryBuilder {
/** /**
* *
* @param repositories * @param repositories
* @return * list of repositories
* @return list of github repository
* @throws ServiceException * @throws ServiceException
* service exception
*/ */
public static ArrayList<GitHubRepository> build( public static ArrayList<GitHubRepository> build(List<Repository> repositories) throws ServiceException {
List<Repository> repositories) throws ServiceException {
if (repositories != null) { if (repositories != null) {
ArrayList<GitHubRepository> gitHubRepositories = new ArrayList<>(); ArrayList<GitHubRepository> gitHubRepositories = new ArrayList<>();
for (Repository repository : repositories) { for (Repository repository : repositories) {

View File

@ -19,8 +19,8 @@ import org.gcube.portlets.widgets.githubconnector.shared.exception.ServiceExcept
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class StorageUtil { public class StorageUtil {
@ -30,11 +30,13 @@ public class StorageUtil {
/** /**
* *
* @param user * @param user
* user
* @param itemId * @param itemId
* item id
* @throws ServiceException * @throws ServiceException
* service exception
*/ */
public static void deleteItem(String user, String itemId) public static void deleteItem(String user, String itemId) throws ServiceException {
throws ServiceException {
Workspace ws; Workspace ws;
try { try {
logger.debug("User: " + user + ", ItemId:" + itemId); logger.debug("User: " + user + ", ItemId:" + itemId);
@ -43,8 +45,7 @@ public class StorageUtil {
ws.removeItems(itemId); ws.removeItems(itemId);
return; return;
} catch (InsufficientPrivilegesException } catch (InsufficientPrivilegesException | WorkspaceFolderNotFoundException | InternalErrorException
| WorkspaceFolderNotFoundException | InternalErrorException
| HomeNotFoundException | ItemNotFoundException e) { | HomeNotFoundException | ItemNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
throw new ServiceException(e.getLocalizedMessage(), e); throw new ServiceException(e.getLocalizedMessage(), e);
@ -52,71 +53,74 @@ public class StorageUtil {
} }
} }
/** /**
* *
* @param user * @param user
* user
* @param destinationFolderId * @param destinationFolderId
* destination folder id
* @param folderName * @param folderName
* folder name
* @param folderDescription * @param folderDescription
* @return * folder description
* @return folder id
* @throws ServiceException * @throws ServiceException
* service exception
*/ */
public static String createFolderOnWorkspace(String user, public static String createFolderOnWorkspace(String user, String destinationFolderId, String folderName,
String destinationFolderId, String folderName,
String folderDescription) throws ServiceException { String folderDescription) throws ServiceException {
try { try {
logger.debug("CreateFolderOnWorkspace: [User=" + user logger.debug("CreateFolderOnWorkspace: [User=" + user + ", FolderId:" + destinationFolderId
+ ", FolderId:" + destinationFolderId + ", folderName=" + ", folderName=" + folderName + ", folderDescription=" + folderDescription + "]");
+ folderName + ", folderDescription=" + folderDescription
+ "]");
Workspace ws = HomeLibrary.getUserWorkspace(user); Workspace ws = HomeLibrary.getUserWorkspace(user);
WorkspaceFolder workspaceFolder=ws.createFolder(folderName, folderDescription, destinationFolderId); WorkspaceFolder workspaceFolder = ws.createFolder(folderName, folderDescription, destinationFolderId);
return workspaceFolder.getId(); return workspaceFolder.getId();
} catch (WorkspaceFolderNotFoundException | InternalErrorException | HomeNotFoundException
} catch (WorkspaceFolderNotFoundException | InternalErrorException | InsufficientPrivilegesException | ItemAlreadyExistException | WrongDestinationException
| HomeNotFoundException | InsufficientPrivilegesException | ItemAlreadyExistException | WrongDestinationException | ItemNotFoundException e) { | ItemNotFoundException e) {
logger.error("CreateFolderOnWorkspace: " + e.getLocalizedMessage()); logger.error("CreateFolderOnWorkspace: " + e.getLocalizedMessage());
e.printStackTrace(); e.printStackTrace();
throw new ServiceException(e.getLocalizedMessage(), e); throw new ServiceException(e.getLocalizedMessage(), e);
} }
} }
/** /**
* *
* @param user * @param user
* user
* @param destinationFolderId * @param destinationFolderId
* destination folder id
* @param fileName * @param fileName
* file name
* @param fileDescription * @param fileDescription
* @param mimeType * file description
* @param is * @param is
* @return * input stream
* @return file id
* @throws ServiceException * @throws ServiceException
* service exception
*/ */
public static String saveOnWorkspace(String user, public static String saveOnWorkspace(String user, String destinationFolderId, String fileName,
String destinationFolderId, String fileName, String fileDescription, InputStream is) throws ServiceException {
String fileDescription, InputStream is)
throws ServiceException {
try { try {
logger.debug("saveOnWorkspace: [User=" + user + ", FolderId:" logger.debug("saveOnWorkspace: [User=" + user + ", FolderId:" + destinationFolderId + ", fileName="
+ destinationFolderId + ", fileName=" + fileName + fileName + ", fileDescription=" + fileDescription + "]");
+ ", fileDescription=" + fileDescription + "]");
Workspace ws = HomeLibrary.getUserWorkspace(user); Workspace ws = HomeLibrary.getUserWorkspace(user);
WorkspaceItem workspaceItem = ws.getItem(destinationFolderId); WorkspaceItem workspaceItem = ws.getItem(destinationFolderId);
if (workspaceItem.isFolder()) { if (workspaceItem.isFolder()) {
ExternalFile externalfile = ws.createExternalFile(fileName, ExternalFile externalfile = ws.createExternalFile(fileName, fileDescription, null, is,
fileDescription, null, is, destinationFolderId); destinationFolderId);
return externalfile.getId(); return externalfile.getId();
} else { } else {
throw new ServiceException("Invalid destination folder!"); throw new ServiceException("Invalid destination folder!");
} }
} catch (WorkspaceFolderNotFoundException | InternalErrorException } catch (WorkspaceFolderNotFoundException | InternalErrorException | HomeNotFoundException
| HomeNotFoundException | InsufficientPrivilegesException | InsufficientPrivilegesException | ItemAlreadyExistException | WrongDestinationException
| ItemAlreadyExistException | WrongDestinationException
| ItemNotFoundException e) { | ItemNotFoundException e) {
logger.error("SaveOnWorkspace: " + e.getLocalizedMessage()); logger.error("SaveOnWorkspace: " + e.getLocalizedMessage());
e.printStackTrace(); e.printStackTrace();

View File

@ -4,8 +4,8 @@ import java.io.Serializable;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class ServiceCredentials implements Serializable { public class ServiceCredentials implements Serializable {

View File

@ -3,7 +3,7 @@ package org.gcube.portlets.widgets.githubconnector.shared;
/** /**
* *
* @author Giancarlo Panichi * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class Constants { public class Constants {

View File

@ -5,11 +5,10 @@ package org.gcube.portlets.widgets.githubconnector.shared.exception;
* *
* *
* @author Giancarlo Panichi * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class ExpiredSessionServiceException extends public class ExpiredSessionServiceException extends ServiceException {
ServiceException {
private static final long serialVersionUID = -4831171355042165166L; private static final long serialVersionUID = -4831171355042165166L;
@ -22,6 +21,7 @@ public class ExpiredSessionServiceException extends
/** /**
* @param message * @param message
* message
*/ */
public ExpiredSessionServiceException(String message) { public ExpiredSessionServiceException(String message) {
super(message); super(message);
@ -30,10 +30,12 @@ public class ExpiredSessionServiceException extends
/** /**
* *
* @param message * @param message
* @param t * message
* @param throwable
* throwable
*/ */
public ExpiredSessionServiceException(String message, Throwable t) { public ExpiredSessionServiceException(String message, Throwable throwable) {
super(message, t); super(message, throwable);
} }
} }

View File

@ -5,16 +5,14 @@ package org.gcube.portlets.widgets.githubconnector.shared.exception;
/** /**
* *
* @author "Giancarlo Panichi" * @author Giancarlo Panichi
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class ServiceException extends Exception { public class ServiceException extends Exception {
private static final long serialVersionUID = -2255657546267656458L; private static final long serialVersionUID = -2255657546267656458L;
/** /**
* *
*/ */
@ -24,15 +22,21 @@ public class ServiceException extends Exception {
/** /**
* @param message * @param message
* message
*/ */
public ServiceException(String message) { public ServiceException(String message) {
super(message); super(message);
} }
/**
public ServiceException(String message,Throwable t) { *
super(message,t); * @param message
* message
* @param throwable
* throwable
*/
public ServiceException(String message, Throwable throwable) {
super(message, throwable);
} }
} }

View File

@ -6,8 +6,8 @@ import org.gcube.portlets.widgets.githubconnector.shared.git.data.credential.Git
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubCloneSession implements Serializable { public class GitHubCloneSession implements Serializable {
@ -20,25 +20,29 @@ public class GitHubCloneSession implements Serializable {
public GitHubCloneSession() { public GitHubCloneSession() {
super(); super();
} }
/** /**
* *
* @param destinationFolderId * @param destinationFolderId
* destination folder id
*/ */
public GitHubCloneSession(String destinationFolderId) { public GitHubCloneSession(String destinationFolderId) {
super(); super();
this.destinationFolderId = destinationFolderId; this.destinationFolderId = destinationFolderId;
} }
/** /**
* *
* @param destinationFolderId * @param destinationFolderId
* destination folder id
* @param gitHubCredential * @param gitHubCredential
* git hub credential
* @param repositoryOwner * @param repositoryOwner
* repository owner
* @param repositoryName * @param repositoryName
* repository name
*/ */
public GitHubCloneSession(String destinationFolderId, public GitHubCloneSession(String destinationFolderId, GitHubCredential gitHubCredential, String repositoryOwner,
GitHubCredential gitHubCredential, String repositoryOwner,
String repositoryName) { String repositoryName) {
super(); super();
this.destinationFolderId = destinationFolderId; this.destinationFolderId = destinationFolderId;
@ -81,12 +85,9 @@ public class GitHubCloneSession implements Serializable {
@Override @Override
public String toString() { public String toString() {
return "GitHubCloneSession [destinationFolderId=" + destinationFolderId return "GitHubCloneSession [destinationFolderId=" + destinationFolderId + ", gitHubCredential="
+ ", gitHubCredential=" + gitHubCredential + gitHubCredential + ", repositoryOwner=" + repositoryOwner + ", repositoryName=" + repositoryName
+ ", repositoryOwner=" + repositoryOwner + ", repositoryName=" + "]";
+ repositoryName + "]";
} }
} }

View File

@ -6,7 +6,7 @@ import java.util.Date;
/** /**
* *
* @author Giancarlo Panichi * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubRepository implements Serializable { public class GitHubRepository implements Serializable {

View File

@ -5,7 +5,7 @@ import java.io.Serializable;
/** /**
* *
* @author Giancarlo Panichi * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubUser implements Serializable { public class GitHubUser implements Serializable {

View File

@ -4,8 +4,8 @@ import java.io.Serializable;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubCredential implements Serializable { public class GitHubCredential implements Serializable {

View File

@ -3,7 +3,7 @@ package org.gcube.portlets.widgets.githubconnector.shared.git.data.credential;
/** /**
* *
* @author Giancarlo Panichi * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubCredentialAnonymous extends GitHubCredential { public class GitHubCredentialAnonymous extends GitHubCredential {

View File

@ -2,8 +2,8 @@ package org.gcube.portlets.widgets.githubconnector.shared.git.data.credential;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubCredentialLogin extends GitHubCredential { public class GitHubCredentialLogin extends GitHubCredential {

View File

@ -2,8 +2,8 @@ package org.gcube.portlets.widgets.githubconnector.shared.git.data.credential;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubCredentialOAuth2 extends GitHubCredential { public class GitHubCredentialOAuth2 extends GitHubCredential {

View File

@ -4,7 +4,7 @@ package org.gcube.portlets.widgets.githubconnector.shared.git.data.credential;
/** /**
* *
* @author Giancarlo Panichi * @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public enum GitHubCredentialType { public enum GitHubCredentialType {

View File

@ -4,8 +4,8 @@ import java.io.Serializable;
/** /**
* *
* @author giancarlo email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class UserInfo implements Serializable { public class UserInfo implements Serializable {
@ -26,15 +26,20 @@ public class UserInfo implements Serializable {
/** /**
* *
* @param username * @param username
* user name
* @param groupId * @param groupId
* group id
* @param groupName * @param groupName
* group name
* @param scope * @param scope
* @param scopeName * scope
* @param userEmailAddress * @param userEmailAddress
* email
* @param userFullName * @param userFullName
* full name
*/ */
public UserInfo(String username, String groupId, String groupName, public UserInfo(String username, String groupId, String groupName, String scope, String userEmailAddress,
String scope, String userEmailAddress, String userFullName) { String userFullName) {
super(); super();
this.username = username; this.username = username;
this.groupId = groupId; this.groupId = groupId;
@ -94,10 +99,8 @@ public class UserInfo implements Serializable {
@Override @Override
public String toString() { public String toString() {
return "UserInfo [username=" + username + ", groupId=" + groupId return "UserInfo [username=" + username + ", groupId=" + groupId + ", groupName=" + groupName + ", scope="
+ ", groupName=" + groupName + ", scope=" + scope + scope + ", userEmailAddress=" + userEmailAddress + ", userFullName=" + userFullName + "]";
+ ", userEmailAddress=" + userEmailAddress + ", userFullName="
+ userFullName + "]";
} }
} }

View File

@ -23,8 +23,8 @@ import org.slf4j.LoggerFactory;
/** /**
* *
* @author Giancarlo Panichi email: <a * @author Giancarlo Panichi
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> *
* *
*/ */
public class GitHubConnectorTest extends TestCase { public class GitHubConnectorTest extends TestCase {