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

Commit

Permalink
#1 context added
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-conway committed Apr 25, 2016
1 parent 57aa51f commit 3319549
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
*
*/
package org.iplantc.de.publish.mechanism.api;

/**
* Provides callbacks and context from DE publish service to the underlying
* foreground mechanism. This allows the preValidate and synchronous parts of
* the publish methods the ability to manipulate iRODS or call DE based services
* that are selectively exposed.
*
* @author Mike Conway - DICE
*
*/
public interface PublishContext {

/*
* TODO: enumerate appropriate context and callback hooks
*/

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ public interface PublishMechanism {
* @param publishActionDescriptor
* {@link PublishActionDescriptor} that provides the necessary
* context for the mechanism to find and do the publishing.
* @param publishContext
* {@link PublishContext} with callbacks and hooks to call DE and
* iRODS services
* @return {@link PublishResult} That represents the status and any error or
* validation information
*/
public PublishResult preValidate(
final PublishActionDescriptor publishActionDescriptor);
final PublishActionDescriptor publishActionDescriptor,
final PublishContext publishContext);

/**
* This method will be called after success in the <code>preValidate</code>
Expand All @@ -52,12 +56,16 @@ public PublishResult preValidate(
* @param publishActionDescriptor
* {@link PublishDescriptor} with the necessary context for an
* individual publicastion action
* @param publishContext
* {@link PublishContext} with callbacks and hooks to call DE and
* iRODS services
* @return {@link PublishResult} with the result of this publish action. For
* synchronous actions, this may be the failure or completion
* success, for an asynchyronous action, it would represent the
* success or failure in enquing the the publish action.
*/
public PublishResult publish(
final PublishActionDescriptor publishActionDescriptor);
final PublishActionDescriptor publishActionDescriptor,
final PublishContext publishContext);

}

0 comments on commit 3319549

Please sign in to comment.