Skip to content

Commit

Permalink
Ctd
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed May 5, 2022
1 parent 2156c69 commit e2d8191
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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");
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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);
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 ()
Expand Down

0 comments on commit e2d8191

Please sign in to comment.