Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies to Oxalis and vefa-peppol #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
<jersey.version>1.19.2</jersey.version>
<guice.version>4.1.0</guice.version>
<jetty.version>7.6.16.v20140903</jetty.version>
<oxalis.version>4.0.0-RC2</oxalis.version>
<oxalis.version>4.0.2</oxalis.version>

<vefa.peppol.groupId>no.difi.vefa</vefa.peppol.groupId>
<vefa.peppol.version>0.9.7</vefa.peppol.version>
<vefa.peppol.version>1.0.4</vefa.peppol.version>
<logback.version>1.2.1</logback.version>
</properties>

Expand Down
8 changes: 4 additions & 4 deletions ringo-domain/src/main/java/no/sr/ringo/ObjectMother.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ private static String getTestPassword() {
}

public static ParticipantIdentifier getTestParticipantIdForSMPLookup() {
return new ParticipantIdentifier(RingoConstant.NORWEGIAN_PEPPOL_PARTICIPANT_PREFIX +RingoConstant.DIFI_ORG_NO);
return ParticipantIdentifier.of(RingoConstant.NORWEGIAN_PEPPOL_PARTICIPANT_PREFIX +RingoConstant.DIFI_ORG_NO);
}

public static ParticipantIdentifier getTestParticipantIdForConsumerReceiver() {
return new ParticipantIdentifier("9999:01029400470");
return ParticipantIdentifier.of("9999:01029400470");
}

public static ParticipantIdentifier getTestParticipantId() {
return new ParticipantIdentifier(RingoConstant.NORWEGIAN_PEPPOL_PARTICIPANT_PREFIX +RingoConstant.DUMMY_ORG_NO);
return ParticipantIdentifier.of(RingoConstant.NORWEGIAN_PEPPOL_PARTICIPANT_PREFIX +RingoConstant.DUMMY_ORG_NO);
}

public static ParticipantIdentifier getAdamsParticipantId() {
return new ParticipantIdentifier(RingoConstant.NORWEGIAN_PEPPOL_PARTICIPANT_PREFIX +"988890081");
return ParticipantIdentifier.of(RingoConstant.NORWEGIAN_PEPPOL_PARTICIPANT_PREFIX +"988890081");
}

public static final DocumentTypeIdentifier getDocumentIdForBisInvoice() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public void updateOutBoundMessageDeliveryDateAndUuid(MessageNumber msgNo, URI re
PreparedStatement ps = con.prepareStatement(sql);
ps.setTimestamp(1, new Timestamp(delivered.getTime()));
ps.setString(2, remoteAP != null ? remoteAP.toString() : null);
ps.setString(3, transmissionIdentifier.getValue());
ps.setString(3, transmissionIdentifier.getIdentifier());
ps.setLong(4, msgNo.toLong());
ps.executeUpdate();
} catch (SQLException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ public MessageNumber createSampleEntry(MessageMetaDataImpl tmd) {
ps.setString(7, tmd.getPeppolHeader().getPeppolChannelId() != null ?
tmd.getPeppolHeader().getPeppolChannelId().stringValue() : null);
ps.setString(8, tmd.getReceptionId().stringValue());
ps.setString(9, tmd.getTransmissionId() != null ? tmd.getTransmissionId().getValue() : null);
ps.setString(9, tmd.getTransmissionId() != null ? tmd.getTransmissionId().getIdentifier() : null);
ps.setString(10, tmd.getSbdhInstanceIdentifier() != null ?
tmd.getSbdhInstanceIdentifier().getValue() : null);
tmd.getSbdhInstanceIdentifier().getIdentifier() : null);
ps.setString(11, tmd.getPeppolHeader().getPeppolDocumentTypeId().getIdentifier());
ps.setString(12, tmd.getPeppolHeader().getProcessIdentifier().getIdentifier());
ps.setString(13, tmd.getPayloadUri().toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void testNormalizeFilename() throws Exception {

ArtifactPathComputer.FileRepoKey sampleMetadata() {
UUID uuid = UUID.randomUUID();
ArtifactPathComputer.FileRepoKey fileRepoKey = new ArtifactPathComputer.FileRepoKey(no.sr.ringo.transport.TransferDirection.IN, new ReceptionId(), new ParticipantIdentifier("9908:976098897"),new ParticipantIdentifier("9908:976098897"),new Date());
ArtifactPathComputer.FileRepoKey fileRepoKey = new ArtifactPathComputer.FileRepoKey(no.sr.ringo.transport.TransferDirection.IN, new ReceptionId(), ParticipantIdentifier.of("9908:976098897"),ParticipantIdentifier.of("9908:976098897"),new Date());
return fileRepoKey;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class MessageRepositoryH2ImplTest {
@Test
public void findAccountByParticipantId() {
MessageRepositoryH2Impl repo = (MessageRepositoryH2Impl) messageDbmsRepository;
AccountId accountId = repo.srAccountIdForReceiver(new ParticipantIdentifier("9908:976098897"));
AccountId accountId = repo.srAccountIdForReceiver(ParticipantIdentifier.of("9908:976098897"));
assertEquals(accountId.toInteger(), Integer.valueOf(1));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import no.difi.oxalis.outbound.transmission.TransmissionRequestBuilder;
import no.sr.ringo.common.RingoConstants;
import no.sr.ringo.message.MessageMetaData;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -46,7 +47,7 @@ public TransmissionReceipt sendDocument(MessageMetaData messageMetaData, String
// Write the transmission id and where the message was delivered
final String msg = String.format("Message sent to %s using %s was assigned transmissionId : %s\n",
transmissionRequest.getEndpoint().getAddress().toString(),
transmissionRequest.getEndpoint().getTransportProfile().getValue(),
transmissionRequest.getEndpoint().getTransportProfile().getIdentifier(),
transmissionResponse.getTransmissionIdentifier()
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ public static ParticipantIdentifier getTestParticipantIdForSMPLookup() {
}

public static ParticipantIdentifier getTestParticipantIdForConsumerReceiver() {
return new ParticipantIdentifier("9999:01029400470");
return ParticipantIdentifier.of("9999:01029400470");
}

public static ParticipantIdentifier getTestParticipantId() {
return new ParticipantIdentifier("9908:976098897");
return ParticipantIdentifier.of("9908:976098897");
}

public static ParticipantIdentifier getAdamsParticipantId() {
return new ParticipantIdentifier("9908:988890081");
return ParticipantIdentifier.of("9908:988890081");
}

public static final DocumentTypeIdentifier getDocumentIdForBisInvoice() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public RegistrationProcessResult registerUser(final RegistrationData registratio

// of account entry and account_receiver entry (only if registering in SMP)
//Prefix given orgNo with 9908
ParticipantIdentifier participantId = registrationData.isRegisterSmp() ? new ParticipantIdentifier(RingoConstant.NORWEGIAN_PEPPOL_PARTICIPANT_PREFIX + registrationData.getOrgNo()) : null;
ParticipantIdentifier participantId = registrationData.isRegisterSmp() ? ParticipantIdentifier.of(RingoConstant.NORWEGIAN_PEPPOL_PARTICIPANT_PREFIX + registrationData.getOrgNo()) : null;
Account storedAccount = accountRepository.createAccount(account, participantId);

// Encrypts/hashes the password
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/no/sr/ringo/message/SearchParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private ParticipantIdentifier parseParticipantId(String participantId) {
if (participantIdWithoutQuotes == null || participantIdWithoutQuotes.trim().length() == 0) {
return null;
} else {
return new ParticipantIdentifier(participantIdWithoutQuotes);
return ParticipantIdentifier.of(participantIdWithoutQuotes);
}
}

Expand Down