This repository has been archived by the owner on Jul 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#2 adding sandbox emulator and classpath scanning
- Loading branch information
michael-conway
committed
May 26, 2016
1 parent
e616473
commit 28ff6bb
Showing
6 changed files
with
159 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
...pi/src/main/java/org/iplantc/de/publish/mechanism/api/exception/PublicationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
publisher-api/src/main/java/org/iplantc/de/publish/mechanism/api/exception/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
publisher-sandbox/src/main/java/org/iplantc/de/publish/sandbox/PublisherEmulator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
|
||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
publisher-sandbox/src/main/java/org/iplantc/de/publish/sandbox/SandboxConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
|
||
} |