Repository: eclipse/microprofile-lra
Pull request #138 (2019-04-12 17:33:48)

issue137 Remove package org.eclipse.microprofile.lra.client from the API
#137 


Patch:
diff --git a/api/src/main/java/org/eclipse/microprofile/lra/annotation/Status.java b/api/src/main/java/org/eclipse/microprofile/lra/annotation/Status.java
index b00081c..5b4460e 100644
--- a/api/src/main/java/org/eclipse/microprofile/lra/annotation/Status.java
+++ b/api/src/main/java/org/eclipse/microprofile/lra/annotation/Status.java
@@ -46,14 +46,6 @@ import java.lang.annotation.Target;
  * report <em>404 Not Found</em> HTTP status code. This enables the
  * participant to free up resources.
  *
- * If this status method is invoked before either of the <em>@Compensate</em>
- * or <em>@Complete</em> methods have been called then the participant
- * should report that it does not yet have a status using a JAX-RS
- * exception mapper that maps to a <em>412 Precondition Failed</em> HTTP
- * status code (such as
- * {@link org.eclipse.microprofile.lra.client.IllegalLRAStateException}
- * but any exception that maps to 412 will do).
- *
  * The id of the currently running LRA can be obtained by inspecting the
  * incoming JAX-RS headers.
  *
diff --git a/spec/src/main/asciidoc/microprofile-lra-spec.adoc b/spec/src/main/asciidoc/microprofile-lra-spec.adoc
index 5dfe927..95cbd87 100644
--- a/spec/src/main/asciidoc/microprofile-lra-spec.adoc
+++ b/spec/src/main/asciidoc/microprofile-lra-spec.adoc
@@ -763,13 +763,6 @@ If the participant has already responded successfully to an `@Compensate`
 or `@Complete` method invocation then it MAY report `404 Not Found`
 HTTP status code. This enables the participant to free up resources.
 
-If this status method is invoked before either of the `@Compensate` or
-`@Complete` methods have been called then the participant should report
-that it does not yet have a status using a JAX-RS exception mapper that
-maps to a `412 Precondition Failed` HTTP status code (such as
-<<source-IllegalLRAStateException,IllegalLRAStateException>>)
-(https://github.com/eclipse/microprofile-lra/blob/master/api/src/main/java/org/eclipse/microprofile/lra/client/IllegalLRAStateException.java[github link]).
-
 [[forgetting-an-lra]]
 ==== Forgetting an LRA
 
@@ -913,13 +906,6 @@ include::{sourcedir}/org/eclipse/microprofile/lra/annotation/Complete.java[Leave
 ----
 <<<
 
-=== IllegalLRAStateException
-[[source-IllegalLRAStateException]]
-----
-include::{sourcedir}/org/eclipse/microprofile/lra/client/IllegalLRAStateException.java[IllegalLRAStateException]
-----
-<<<
-
 === ParticipantStatus
 [[source-ParticipantStatus]]
 ----
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/LRAClientOps.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/LRAClientOps.java
index 82e81c4..567b4d3 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/LRAClientOps.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/LRAClientOps.java
@@ -20,7 +20,7 @@
 package org.eclipse.microprofile.lra.tck;
 
 import org.eclipse.microprofile.lra.annotation.ws.rs.LRA;
-import org.eclipse.microprofile.lra.client.GenericLRAException;
+import org.eclipse.microprofile.lra.tck.participant.api.GenericLRAException;
 
 import javax.ws.rs.client.Entity;
 import javax.ws.rs.client.Invocation;
diff --git a/api/src/main/java/org/eclipse/microprofile/lra/client/GenericLRAException.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/GenericLRAException.java
similarity index 96%
rename from api/src/main/java/org/eclipse/microprofile/lra/client/GenericLRAException.java
rename to tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/GenericLRAException.java
index 91eca6f..43bbabf 100644
--- a/api/src/main/java/org/eclipse/microprofile/lra/client/GenericLRAException.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/GenericLRAException.java
@@ -18,7 +18,7 @@
  * limitations under the License.
  *******************************************************************************/
 
-package org.eclipse.microprofile.lra.client;
+package org.eclipse.microprofile.lra.tck.participant.api;
 
 import javax.ws.rs.WebApplicationException;
 import java.net.URI;
diff --git a/api/src/main/java/org/eclipse/microprofile/lra/client/IllegalLRAStateException.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/IllegalLRAStateException.java
similarity index 96%
rename from api/src/main/java/org/eclipse/microprofile/lra/client/IllegalLRAStateException.java
rename to tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/IllegalLRAStateException.java
index f14b551..3d7a347 100644
--- a/api/src/main/java/org/eclipse/microprofile/lra/client/IllegalLRAStateException.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/IllegalLRAStateException.java
@@ -17,7 +17,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  *******************************************************************************/
-package org.eclipse.microprofile.lra.client;
+package org.eclipse.microprofile.lra.tck.participant.api;
 
 import javax.ws.rs.WebApplicationException;
 
diff --git a/api/src/main/java/org/eclipse/microprofile/lra/client/InvalidLRAIdException.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/InvalidLRAIdException.java
similarity index 97%
rename from api/src/main/java/org/eclipse/microprofile/lra/client/InvalidLRAIdException.java
rename to tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/InvalidLRAIdException.java
index 694bd25..c1ba297 100644
--- a/api/src/main/java/org/eclipse/microprofile/lra/client/InvalidLRAIdException.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/InvalidLRAIdException.java
@@ -17,7 +17,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  *******************************************************************************/
-package org.eclipse.microprofile.lra.client;
+package org.eclipse.microprofile.lra.tck.participant.api;
 
 import javax.ws.rs.WebApplicationException;
 
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraController.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraController.java
index 0f3d56b..76209cf 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraController.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraController.java
@@ -20,8 +20,6 @@
 package org.eclipse.microprofile.lra.tck.participant.api;
 
 import org.eclipse.microprofile.lra.annotation.Forget;
-import org.eclipse.microprofile.lra.client.GenericLRAException;
-import org.eclipse.microprofile.lra.client.InvalidLRAIdException;
 import org.eclipse.microprofile.lra.tck.LRAClientOps;
 import org.eclipse.microprofile.lra.tck.participant.activity.Activity;
 import org.eclipse.microprofile.lra.tck.participant.activity.ActivityStorage;
@@ -31,7 +29,6 @@ import org.eclipse.microprofile.lra.annotation.Complete;
 import org.eclipse.microprofile.lra.annotation.ws.rs.Leave;
 import org.eclipse.microprofile.lra.annotation.ws.rs.NestedLRA;
 import org.eclipse.microprofile.lra.annotation.Status;
-import org.eclipse.microprofile.lra.client.IllegalLRAStateException;
 import org.eclipse.microprofile.lra.annotation.ParticipantStatus;
 
 import javax.enterprise.context.ApplicationScoped;
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/NonParticipatingTckResource.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/NonParticipatingTckResource.java
index 4b9f03a..8c96b39 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/NonParticipatingTckResource.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/NonParticipatingTckResource.java
@@ -21,7 +21,6 @@ package org.eclipse.microprofile.lra.tck.participant.api;
 
 import org.eclipse.microprofile.lra.annotation.ws.rs.LRA;
 import org.eclipse.microprofile.lra.annotation.ws.rs.NestedLRA;
-import org.eclipse.microprofile.lra.client.InvalidLRAIdException;
 import org.eclipse.microprofile.lra.tck.LRAClientOps;
 
 import javax.enterprise.context.ApplicationScoped;
diff --git a/api/src/main/java/org/eclipse/microprofile/lra/client/UnknowableException.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/UnknowableException.java
similarity index 95%
rename from api/src/main/java/org/eclipse/microprofile/lra/client/UnknowableException.java
rename to tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/UnknowableException.java
index 6673135..f1ca96e 100644
--- a/api/src/main/java/org/eclipse/microprofile/lra/client/UnknowableException.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/UnknowableException.java
@@ -17,7 +17,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  *******************************************************************************/
-package org.eclipse.microprofile.lra.client;
+package org.eclipse.microprofile.lra.tck.participant.api;
 
 import java.net.URI;
 
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/Util.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/Util.java
index 2138acc..b879df9 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/Util.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/Util.java
@@ -39,7 +39,6 @@ import org.eclipse.microprofile.lra.annotation.Complete;
 import org.eclipse.microprofile.lra.annotation.Forget;
 import org.eclipse.microprofile.lra.annotation.ws.rs.Leave;
 import org.eclipse.microprofile.lra.annotation.Status;
-import org.eclipse.microprofile.lra.client.GenericLRAException;
 
 
 public class Util {


Test patch:
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java
index 16f0d77..c6606ea 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java
@@ -51,7 +51,7 @@ import javax.ws.rs.client.Entity;
 import javax.ws.rs.client.WebTarget;
 import javax.ws.rs.core.Response;
 
-import org.eclipse.microprofile.lra.client.GenericLRAException;
+import org.eclipse.microprofile.lra.tck.participant.api.GenericLRAException;
 import org.eclipse.microprofile.lra.tck.participant.api.NoLRAController;
 import org.eclipse.microprofile.lra.tck.participant.api.Util;
 import org.jboss.arquillian.container.test.api.Deployment;