Skip to content
This repository has been archived by the owner on Jul 3, 2018. It is now read-only.

Commit

Permalink
#2 adding sandbox emulator and classpath scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-conway committed May 26, 2016
1 parent e616473 commit 28ff6bb
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 3 deletions.
2 changes: 1 addition & 1 deletion publisher-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<artifactId>publisher-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>publisher framework for DE - API</name>
<name>publisher api</name>
<dependencies>
<dependency>
<groupId>org.irods.jargon</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/**
*
*/
package org.iplantc.de.publish.mechanism.api.exception;

import org.irods.jargon.core.exception.JargonException;

/**
* General exception in publication
*
* @author Mike Conway - DICE
*
*/
public class PublicationException extends JargonException {

/**
*
*/
private static final long serialVersionUID = -1724154819199402955L;

/**
* @param message
*/
public PublicationException(String message) {
super(message);
}

/**
* @param cause
*/
public PublicationException(Throwable cause) {
super(cause);
}

/**
* @param message
* @param cause
*/
public PublicationException(String message, Throwable cause) {
super(message, cause);
}

/**
* @param cause
* @param underlyingIRODSExceptionCode
*/
public PublicationException(Throwable cause,
int underlyingIRODSExceptionCode) {
super(cause, underlyingIRODSExceptionCode);
}

/**
* @param message
* @param underlyingIRODSExceptionCode
*/
public PublicationException(String message, int underlyingIRODSExceptionCode) {
super(message, underlyingIRODSExceptionCode);
}

/**
* @param message
* @param cause
* @param underlyingIRODSExceptionCode
*/
public PublicationException(String message, Throwable cause,
int underlyingIRODSExceptionCode) {
super(message, cause, underlyingIRODSExceptionCode);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Exceptions arising from publication
* @author Mike Conway - DICE
*
*/
package org.iplantc.de.publish.mechanism.api.exception;
9 changes: 7 additions & 2 deletions publisher-sandbox/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@
<artifactId>publisher-sandbox</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>publisher framework for DE - API</name>
<name>publisher sandbox</name>
<dependencies>
<dependency>
<groupId>org.iplantc.de</groupId>
<artifactId>publisher-api</artifactId>
<version>${project.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.10</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/**
*
*/
package org.iplantc.de.publish.sandbox;

import org.iplantc.de.publish.mechanism.api.exception.PublicationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Black box host of publishing mechanisms for testing and validation purposes
*
* @author Mike Conway - DICE
*
*/
public class PublisherEmulator {

private SandboxConfiguration sandboxConfiguration;

public static final Logger log = LoggerFactory
.getLogger(PublisherEmulator.class);

/**
* Default (no values) constructor, note that sandboxConfiguration must be
* provided, and init() must be called
*/
public PublisherEmulator() {

}

/**
* @return the sandboxConfiguration
*/
public SandboxConfiguration getSandboxConfiguration() {
return sandboxConfiguration;
}

/**
* @param sandboxConfiguration
* the sandboxConfiguration to set
*/
public void setSandboxConfiguration(
SandboxConfiguration sandboxConfiguration) {
this.sandboxConfiguration = sandboxConfiguration;
}

/**
* Initialize publisher based on (required) sandbox configuration
*
* @throws PublicationException
*/
public void init() throws PublicationException {
log.info("init()");
if (sandboxConfiguration == null) {
throw new PublicationException(
"init() cannot be called, no provided sandboxConfiguration");
}

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
*
*/
package org.iplantc.de.publish.sandbox;

/**
* Configuration information for sandbox
*
* @author Mike Conway - DICE
*
*/
public class SandboxConfiguration {

}

0 comments on commit 28ff6bb

Please sign in to comment.