diff --git a/dcng-core/src/main/java/com/helger/dcng/core/regrep/DcngRegRepHelper.java b/dcng-core/src/main/java/com/helger/dcng/core/regrep/DcngRegRepHelperIteration1.java similarity index 94% rename from dcng-core/src/main/java/com/helger/dcng/core/regrep/DcngRegRepHelper.java rename to dcng-core/src/main/java/com/helger/dcng/core/regrep/DcngRegRepHelperIteration1.java index 7f3e881..6e67feb 100644 --- a/dcng-core/src/main/java/com/helger/dcng/core/regrep/DcngRegRepHelper.java +++ b/dcng-core/src/main/java/com/helger/dcng/core/regrep/DcngRegRepHelperIteration1.java @@ -48,11 +48,11 @@ * @author Philip Helger */ @Immutable -public final class DcngRegRepHelper +public final class DcngRegRepHelperIteration1 { - private static final Logger LOGGER = LoggerFactory.getLogger (DcngRegRepHelper.class); + private static final Logger LOGGER = LoggerFactory.getLogger (DcngRegRepHelperIteration1.class); - private DcngRegRepHelper () + private DcngRegRepHelperIteration1 () {} @Nonnull @@ -145,7 +145,7 @@ public static QueryResponse wrapInQueryResponse (final String sDPID, final Strin } @Nonnull - public static byte [] wrapInRegRepIteration1 (@Nonnull final String sContentID, @Nonnull final byte [] aXMLBytes) + public static byte [] wrapInRegRep (@Nonnull final String sContentID, @Nonnull final byte [] aXMLBytes) { ValueEnforcer.notNull (sContentID, "ContentID"); ValueEnforcer.notNull (aXMLBytes, "XMLBytes"); @@ -160,12 +160,12 @@ public static QueryResponse wrapInQueryResponse (final String sDPID, final Strin // TODO if (sContentID.contains ("Request")) { - final QueryRequest aRRReq = DcngRegRepHelper.wrapInQueryRequest ("who", "cares", "person"); + final QueryRequest aRRReq = DcngRegRepHelperIteration1.wrapInQueryRequest ("who", "cares", "person"); aRegRepPayload = RegRep4Writer.queryRequest ().setFormattedOutput (true).getAsBytes (aRRReq); } else { - final QueryResponse aRRResp = DcngRegRepHelper.wrapInQueryResponse ("no", "body"); + final QueryResponse aRRResp = DcngRegRepHelperIteration1.wrapInQueryResponse ("no", "body"); aRegRepPayload = RegRep4Writer.queryResponse ().setFormattedOutput (true).getAsBytes (aRRResp); } return aRegRepPayload; diff --git a/dcng-core/src/test/java/com/helger/dcng/regrep/DcngRegRepHelperTest.java b/dcng-core/src/test/java/com/helger/dcng/regrep/DcngRegRepHelperTest.java index 6cccb66..7c8fcfd 100644 --- a/dcng-core/src/test/java/com/helger/dcng/regrep/DcngRegRepHelperTest.java +++ b/dcng-core/src/test/java/com/helger/dcng/regrep/DcngRegRepHelperTest.java @@ -22,14 +22,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.helger.dcng.core.regrep.DcngRegRepHelper; +import com.helger.dcng.core.regrep.DcngRegRepHelperIteration1; import com.helger.regrep.RegRep4Reader; import com.helger.regrep.RegRep4Writer; import com.helger.regrep.query.QueryRequest; import com.helger.regrep.query.QueryResponse; /** - * Test class for class {@link DcngRegRepHelper}. + * Test class for class {@link DcngRegRepHelperIteration1}. * * @author Philip Helger */ @@ -40,7 +40,7 @@ public final class DcngRegRepHelperTest @Test public void testRequest () { - final QueryRequest q = DcngRegRepHelper.wrapInQueryRequest ("dcid", "dcname", "pid"); + final QueryRequest q = DcngRegRepHelperIteration1.wrapInQueryRequest ("dcid", "dcname", "pid"); assertNotNull (q); final byte [] b = RegRep4Writer.queryRequest ().getAsBytes (q); assertNotNull (b); @@ -54,7 +54,7 @@ public void testRequest () @Test public void testResponse () { - final QueryResponse q = DcngRegRepHelper.wrapInQueryResponse ("dpid", "dpname"); + final QueryResponse q = DcngRegRepHelperIteration1.wrapInQueryResponse ("dpid", "dpname"); assertNotNull (q); final byte [] b = RegRep4Writer.queryResponse ().getAsBytes (q); assertNotNull (b); diff --git a/dcng-web-api/src/main/java/com/helger/dcng/webapi/as4/ApiPostLookupAndSend.java b/dcng-web-api/src/main/java/com/helger/dcng/webapi/as4/ApiPostLookupAndSend.java index 4d2f02d..7d1e22a 100644 --- a/dcng-web-api/src/main/java/com/helger/dcng/webapi/as4/ApiPostLookupAndSend.java +++ b/dcng-web-api/src/main/java/com/helger/dcng/webapi/as4/ApiPostLookupAndSend.java @@ -35,7 +35,7 @@ import com.helger.dcng.api.rest.DCNGPayload; import com.helger.dcng.api.rest.DcngRestJAXB; import com.helger.dcng.core.api.DcngApiHelper; -import com.helger.dcng.core.regrep.DcngRegRepHelper; +import com.helger.dcng.core.regrep.DcngRegRepHelperIteration1; import com.helger.dcng.webapi.ApiParamException; import com.helger.dcng.webapi.helper.AbstractDcngApiInvoker; import com.helger.dcng.webapi.helper.CommonApiInvoker; @@ -151,7 +151,7 @@ public static IJsonObject perform (@Nonnull final IParticipantIdentifier aSender { if (nIndex == 0) { - final byte [] aRegRepPayload = DcngRegRepHelper.wrapInRegRepIteration1 (aPayload.getContentID (), + final byte [] aRegRepPayload = DcngRegRepHelperIteration1.wrapInRegRep (aPayload.getContentID (), aPayload.getValue ()); // RegRep should be first diff --git a/dcng-web-api/src/main/java/com/helger/dcng/webapi/as4/ApiPostSend.java b/dcng-web-api/src/main/java/com/helger/dcng/webapi/as4/ApiPostSend.java index 424f700..bd6f603 100644 --- a/dcng-web-api/src/main/java/com/helger/dcng/webapi/as4/ApiPostSend.java +++ b/dcng-web-api/src/main/java/com/helger/dcng/webapi/as4/ApiPostSend.java @@ -35,7 +35,7 @@ import com.helger.dcng.api.rest.DCNGPayload; import com.helger.dcng.api.rest.DcngRestJAXB; import com.helger.dcng.core.api.DcngApiHelper; -import com.helger.dcng.core.regrep.DcngRegRepHelper; +import com.helger.dcng.core.regrep.DcngRegRepHelperIteration1; import com.helger.dcng.webapi.ApiParamException; import com.helger.dcng.webapi.helper.AbstractDcngApiInvoker; import com.helger.dcng.webapi.helper.CommonApiInvoker; @@ -90,7 +90,7 @@ public IJsonObject invokeAPI (@Nonnull final IAPIDescriptor aAPIDescriptor, { if (nIndex == 0) { - final byte [] aRegRepPayload = DcngRegRepHelper.wrapInRegRepIteration1 (aPayload.getContentID (), aPayload.getValue ()); + final byte [] aRegRepPayload = DcngRegRepHelperIteration1.wrapInRegRep (aPayload.getContentID (), aPayload.getValue ()); // RegRep should be first aMessage.addPayload (MEPayload.builder ()