diff --git a/pom.xml b/pom.xml index 3753986..5b5334b 100644 --- a/pom.xml +++ b/pom.xml @@ -27,10 +27,10 @@ 1.19.2 4.1.0 7.6.16.v20140903 - 4.0.0-RC2 + 4.0.2 no.difi.vefa - 0.9.7 + 1.0.4 1.2.1 diff --git a/ringo-domain/src/main/java/no/sr/ringo/ObjectMother.java b/ringo-domain/src/main/java/no/sr/ringo/ObjectMother.java index 66a213e..feae794 100644 --- a/ringo-domain/src/main/java/no/sr/ringo/ObjectMother.java +++ b/ringo-domain/src/main/java/no/sr/ringo/ObjectMother.java @@ -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() { diff --git a/ringo-persistence-jdbc-impl/src/main/java/no/sr/ringo/message/PeppolMessageRepositoryImpl.java b/ringo-persistence-jdbc-impl/src/main/java/no/sr/ringo/message/PeppolMessageRepositoryImpl.java index 0f7de24..e97a706 100644 --- a/ringo-persistence-jdbc-impl/src/main/java/no/sr/ringo/message/PeppolMessageRepositoryImpl.java +++ b/ringo-persistence-jdbc-impl/src/main/java/no/sr/ringo/message/PeppolMessageRepositoryImpl.java @@ -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) { diff --git a/ringo-persistence-jdbc-impl/src/main/java/no/sr/ringo/persistence/jdbc/util/DatabaseHelper.java b/ringo-persistence-jdbc-impl/src/main/java/no/sr/ringo/persistence/jdbc/util/DatabaseHelper.java index 51ef63d..5212db0 100644 --- a/ringo-persistence-jdbc-impl/src/main/java/no/sr/ringo/persistence/jdbc/util/DatabaseHelper.java +++ b/ringo-persistence-jdbc-impl/src/main/java/no/sr/ringo/persistence/jdbc/util/DatabaseHelper.java @@ -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()); diff --git a/ringo-persistence-jdbc-impl/src/test/java/no/sr/ringo/persistence/ArtifactPathComputerTest.java b/ringo-persistence-jdbc-impl/src/test/java/no/sr/ringo/persistence/ArtifactPathComputerTest.java index 3a13577..229973d 100644 --- a/ringo-persistence-jdbc-impl/src/test/java/no/sr/ringo/persistence/ArtifactPathComputerTest.java +++ b/ringo-persistence-jdbc-impl/src/test/java/no/sr/ringo/persistence/ArtifactPathComputerTest.java @@ -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; } diff --git a/ringo-persistence-jdbc-impl/src/test/java/no/sr/ringo/persistence/jdbc/MessageRepositoryH2ImplTest.java b/ringo-persistence-jdbc-impl/src/test/java/no/sr/ringo/persistence/jdbc/MessageRepositoryH2ImplTest.java index 41addf8..09b4f95 100644 --- a/ringo-persistence-jdbc-impl/src/test/java/no/sr/ringo/persistence/jdbc/MessageRepositoryH2ImplTest.java +++ b/ringo-persistence-jdbc-impl/src/test/java/no/sr/ringo/persistence/jdbc/MessageRepositoryH2ImplTest.java @@ -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)); } diff --git a/ringo-standalone/src/main/java/no.sr.ringo/Main.java b/ringo-standalone/src/main/java/no/sr/ringo/Main.java similarity index 100% rename from ringo-standalone/src/main/java/no.sr.ringo/Main.java rename to ringo-standalone/src/main/java/no/sr/ringo/Main.java diff --git a/ringo-standalone/src/main/java/no.sr.ringo/guice/OxalisOutboundModule.java b/ringo-standalone/src/main/java/no/sr/ringo/guice/OxalisOutboundModule.java similarity index 100% rename from ringo-standalone/src/main/java/no.sr.ringo/guice/OxalisOutboundModule.java rename to ringo-standalone/src/main/java/no/sr/ringo/guice/OxalisOutboundModule.java diff --git a/ringo-standalone/src/main/java/no.sr.ringo/guice/RingoServiceModule.java b/ringo-standalone/src/main/java/no/sr/ringo/guice/RingoServiceModule.java similarity index 100% rename from ringo-standalone/src/main/java/no.sr.ringo/guice/RingoServiceModule.java rename to ringo-standalone/src/main/java/no/sr/ringo/guice/RingoServiceModule.java diff --git a/ringo-standalone/src/main/java/no.sr.ringo/oxalis/DummySender.java b/ringo-standalone/src/main/java/no/sr/ringo/oxalis/DummySender.java similarity index 100% rename from ringo-standalone/src/main/java/no.sr.ringo/oxalis/DummySender.java rename to ringo-standalone/src/main/java/no/sr/ringo/oxalis/DummySender.java diff --git a/ringo-standalone/src/main/java/no.sr.ringo/oxalis/OxalisDocumentSender.java b/ringo-standalone/src/main/java/no/sr/ringo/oxalis/OxalisDocumentSender.java similarity index 99% rename from ringo-standalone/src/main/java/no.sr.ringo/oxalis/OxalisDocumentSender.java rename to ringo-standalone/src/main/java/no/sr/ringo/oxalis/OxalisDocumentSender.java index 757d0ee..fe84882 100644 --- a/ringo-standalone/src/main/java/no.sr.ringo/oxalis/OxalisDocumentSender.java +++ b/ringo-standalone/src/main/java/no/sr/ringo/oxalis/OxalisDocumentSender.java @@ -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; @@ -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() ); diff --git a/ringo-standalone/src/main/java/no.sr.ringo/oxalis/PeppolDocumentSender.java b/ringo-standalone/src/main/java/no/sr/ringo/oxalis/PeppolDocumentSender.java similarity index 100% rename from ringo-standalone/src/main/java/no.sr.ringo/oxalis/PeppolDocumentSender.java rename to ringo-standalone/src/main/java/no/sr/ringo/oxalis/PeppolDocumentSender.java diff --git a/ringo-standalone/src/main/java/no.sr.ringo/parser/CommandLineParser.java b/ringo-standalone/src/main/java/no/sr/ringo/parser/CommandLineParser.java similarity index 100% rename from ringo-standalone/src/main/java/no.sr.ringo/parser/CommandLineParser.java rename to ringo-standalone/src/main/java/no/sr/ringo/parser/CommandLineParser.java diff --git a/ringo-standalone/src/main/java/no.sr.ringo/parser/ParserResult.java b/ringo-standalone/src/main/java/no/sr/ringo/parser/ParserResult.java similarity index 100% rename from ringo-standalone/src/main/java/no.sr.ringo/parser/ParserResult.java rename to ringo-standalone/src/main/java/no/sr/ringo/parser/ParserResult.java diff --git a/ringo-standalone/src/main/java/no.sr.ringo/usecase/QueuedMessageSenderResult.java b/ringo-standalone/src/main/java/no/sr/ringo/usecase/QueuedMessageSenderResult.java similarity index 100% rename from ringo-standalone/src/main/java/no.sr.ringo/usecase/QueuedMessageSenderResult.java rename to ringo-standalone/src/main/java/no/sr/ringo/usecase/QueuedMessageSenderResult.java diff --git a/ringo-standalone/src/main/java/no.sr.ringo/usecase/SendQueuedMessagesUseCase.java b/ringo-standalone/src/main/java/no/sr/ringo/usecase/SendQueuedMessagesUseCase.java similarity index 100% rename from ringo-standalone/src/main/java/no.sr.ringo/usecase/SendQueuedMessagesUseCase.java rename to ringo-standalone/src/main/java/no/sr/ringo/usecase/SendQueuedMessagesUseCase.java diff --git a/ringo-test/src/main/java/no/difi/ringo/tools/PersistenceObjectMother.java b/ringo-test/src/main/java/no/difi/ringo/tools/PersistenceObjectMother.java index 6bec833..9124c0f 100644 --- a/ringo-test/src/main/java/no/difi/ringo/tools/PersistenceObjectMother.java +++ b/ringo-test/src/main/java/no/difi/ringo/tools/PersistenceObjectMother.java @@ -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() { diff --git a/server/src/main/java/no/sr/ringo/account/RegisterUseCase.java b/server/src/main/java/no/sr/ringo/account/RegisterUseCase.java index 3cf2950..f592c6a 100644 --- a/server/src/main/java/no/sr/ringo/account/RegisterUseCase.java +++ b/server/src/main/java/no/sr/ringo/account/RegisterUseCase.java @@ -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 diff --git a/server/src/main/java/no/sr/ringo/message/SearchParams.java b/server/src/main/java/no/sr/ringo/message/SearchParams.java index d91a7a4..2049dd2 100644 --- a/server/src/main/java/no/sr/ringo/message/SearchParams.java +++ b/server/src/main/java/no/sr/ringo/message/SearchParams.java @@ -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); } }