/** * This method clones all values from <code>this</code> to the passed object. * All data in the parameter object is overwritten! * * @param ret * The target object to clone to. May not be <code>null</code>. */ public void cloneTo (@Nonnull final PDBusinessEntity ret) { ret.m_aNames.setAll (m_aNames); ret.m_sCountryCode = m_sCountryCode; ret.m_sGeoInfo = m_sGeoInfo; ret.m_aIDs.setAll (m_aIDs); ret.m_aWebsiteURIs.setAll (m_aWebsiteURIs); ret.m_aContacts.setAllMapped (m_aContacts, PDContact::getClone); ret.m_sAdditionalInfo = m_sAdditionalInfo; // Identifier are immutable ret.m_aRegistrationDate = m_aRegistrationDate; }
public void setDefaultMenuItemIDs (@Nullable final String... aDefaultMenuItemIDs) { m_aDefaultMenuItemIDs.setAll (aDefaultMenuItemIDs); }
public void setDefaultMenuItemIDs (@Nullable final Iterable <String> aDefaultMenuItemIDs) { m_aDefaultMenuItemIDs.setAll (aDefaultMenuItemIDs); }
public PDBusinessEntity (@Nullable final ICommonsList <PDName> aNames, @Nullable final String sCountryCode, @Nullable final String sGeoInfo, @Nullable final ICommonsList <PDIdentifier> aIDs, @Nullable final ICommonsList <String> aWebsiteURIs, @Nullable final ICommonsList <PDContact> aContacts, @Nullable final String sAdditionalInfo, @Nullable final LocalDate aRegDate) { names ().setAll (aNames); setCountryCode (sCountryCode); setGeoInfo (sGeoInfo); identifiers ().setAll (aIDs); websiteURIs ().setAll (aWebsiteURIs); contacts ().setAllMapped (aContacts, PDContact::getClone); setAdditionalInfo (sAdditionalInfo); setRegistrationDate (aRegDate); }
/** * With properties optional info can be added for the receiving party. If you * want to be AS4 Profile conform you need to add two properties to your * message: originalSender and finalRecipient these two correlate to C1 and * C4. * * @param aEbms3Properties * Properties that should be set in the current user message */ public void setEbms3Properties (@Nullable final ICommonsList <Ebms3Property> aEbms3Properties) { m_aEbms3Properties.setAll (aEbms3Properties); }
@Nonnull public static PDBusinessEntity createBusinessEntity (@Nonnull final PD3BusinessEntityType aBE) { ValueEnforcer.notNull (aBE, "BusinessEntity"); final PDBusinessEntity ret = new PDBusinessEntity (); ret.names ().setAllMapped (aBE.getName (), PD3APIHelper::createName); ret.setCountryCode (aBE.getCountryCode ()); ret.setGeoInfo (aBE.getGeographicalInformation ()); ret.identifiers ().setAllMapped (aBE.getIdentifier (), PD3APIHelper::createIdentifier); ret.websiteURIs ().setAll (aBE.getWebsiteURI ()); ret.contacts ().setAllMapped (aBE.getContact (), PD3APIHelper::createContact); ret.setAdditionalInfo (aBE.getAdditionalInformation ()); ret.setRegistrationDate (aBE.getRegistrationDate ()); return ret; }
@Nonnull public final EChange setX509EncryptionEncryptAttachment (@Nullable final ICommonsList <String> aX509EncryptionEncryptAttachment) { if (EqualsHelper.equals (aX509EncryptionEncryptAttachment, m_aX509EncryptionEncryptAttachment)) return EChange.UNCHANGED; m_aX509EncryptionEncryptAttachment.setAll (aX509EncryptionEncryptAttachment); return EChange.CHANGED; }
@Nonnull public static PDBusinessEntity createBusinessEntity (@Nonnull final PD1BusinessEntityType aBE) { ValueEnforcer.notNull (aBE, "BusinessEntity"); final PDBusinessEntity ret = new PDBusinessEntity (); // No language available ret.names ().add (new PDName (aBE.getName ())); ret.setCountryCode (aBE.getCountryCode ()); ret.setGeoInfo (aBE.getGeographicalInformation ()); ret.identifiers ().setAllMapped (aBE.getIdentifier (), PD1APIHelper::createIdentifier); ret.websiteURIs ().setAll (aBE.getWebsiteURI ()); ret.contacts ().setAllMapped (aBE.getContact (), PD1APIHelper::createContact); ret.setAdditionalInfo (aBE.getAdditionalInformation ()); ret.setRegistrationDate (aBE.getRegistrationDate ()); return ret; }
@Nonnull public InternalErrorEmailSettings setReceiverAddresses (@Nullable final IEmailAddress... aReceiverAddresses) { if (aReceiverAddresses != null && ArrayHelper.containsAnyNullElement (aReceiverAddresses)) throw new IllegalArgumentException ("The array of receiver addresses may not contain any null element!"); m_aReceiverAddresses.setAll (aReceiverAddresses); return this; }
@Nonnull public final EChange setX509SignElement (@Nullable final ICommonsList <String> aX509SignElement) { if (EqualsHelper.equals (aX509SignElement, m_aX509SignElement)) return EChange.UNCHANGED; m_aX509SignElement.setAll (aX509SignElement); return EChange.CHANGED; }
@Nonnull public final EChange setCorrelation (@Nullable final ICommonsList <String> aCorrelation) { // Ensure same type if (EqualsHelper.equals (aCorrelation, m_aCorrelation)) return EChange.UNCHANGED; m_aCorrelation.setAll (aCorrelation); return EChange.CHANGED; }
public void setAny (@Nonnull final Iterable <Object> aAny) { ValueEnforcer.notNull (aAny, "Any"); m_aAny.setAll (aAny); } }
@Nonnull public final EChange setX509SignAttachment (@Nullable final ICommonsList <String> aX509SignAttachment) { if (EqualsHelper.equals (aX509SignAttachment, m_aX509SignAttachment)) return EChange.UNCHANGED; m_aX509SignAttachment.setAll (aX509SignAttachment); return EChange.CHANGED; }
public InternalErrorEmailSettings (@Nonnull final InternalErrorEmailSettings aOther) { ValueEnforcer.notNull (aOther, "Other"); m_aSMTPSettings = aOther.m_aSMTPSettings; m_aSenderAddress = aOther.m_aSenderAddress; m_aReceiverAddresses.setAll (aOther.m_aReceiverAddresses); }
@Nonnull public InternalErrorEmailSettings setReceiverAddresses (@Nullable final Iterable <? extends IEmailAddress> aReceiverAddresses) { if (aReceiverAddresses != null && CollectionHelper.containsAnyNullElement (aReceiverAddresses)) throw new IllegalArgumentException ("The list of receiver addresses may not contain any null element!"); m_aReceiverAddresses.setAll (aReceiverAddresses); return this; }
@Nonnull public final EChange setX509EncryptionEncryptElement (@Nullable final ICommonsList <String> aX509EncryptionEncryptElement) { if (EqualsHelper.equals (aX509EncryptionEncryptElement, m_aX509EncryptionEncryptElement)) return EChange.UNCHANGED; m_aX509EncryptionEncryptElement.setAll (aX509EncryptionEncryptElement); return EChange.CHANGED; }
@Nonnull public EChange setExtensionAsString (@Nullable final String sExtension) { ICommonsList <ExtensionType> aNewExt = null; if (StringHelper.hasText (sExtension)) { // Soft migration :) if (sExtension.charAt (0) == '<') aNewExt = BDXRExtensionConverter.convertXMLToSingleExtension (sExtension); else aNewExt = BDXRExtensionConverter.convert (sExtension); } if (m_aExtensions.equals (aNewExt)) return EChange.UNCHANGED; m_aExtensions.setAll (aNewExt); return EChange.CHANGED; }
@Nonnull public EChange setExtensionAsString (@Nullable final String sExtension) { ICommonsList <ExtensionType> aNewExt = null; if (StringHelper.hasText (sExtension)) { // Soft migration :) if (sExtension.charAt (0) == '<') aNewExt = BDXRExtensionConverter.convertXMLToSingleExtension (sExtension); else aNewExt = BDXRExtensionConverter.convert (sExtension); } if (m_aExtensions.equals (aNewExt)) return EChange.UNCHANGED; m_aExtensions.setAll (aNewExt); return EChange.CHANGED; }
/** * Reload all SPI implementations of {@link IAS4ServletMessageProcessorSPI}. */ public static void reinitProcessors () { final ICommonsList <IAS4ServletMessageProcessorSPI> aProcessorSPIs = ServiceLoaderHelper.getAllSPIImplementations (IAS4ServletMessageProcessorSPI.class); if (aProcessorSPIs.isEmpty ()) LOGGER.warn ("No AS4 message processor is registered. All incoming messages will be discarded!"); else if (LOGGER.isDebugEnabled ()) LOGGER.debug ("Found " + aProcessorSPIs.size () + " AS4 message processors"); s_aRWLock.writeLocked ( () -> s_aProcessors.setAll (aProcessorSPIs)); }
/** * Reload all SPI implementations of * {@link IAS4ServletPullRequestProcessorSPI}. */ public static void reinitProcessors () { final ICommonsList <IAS4ServletPullRequestProcessorSPI> aProcessorSPIs = ServiceLoaderHelper.getAllSPIImplementations (IAS4ServletPullRequestProcessorSPI.class); if (aProcessorSPIs.isEmpty ()) LOGGER.warn ("No AS4 message processor is registered. All incoming pull requests will be discarded!"); else LOGGER.info ("Found " + aProcessorSPIs.size () + " AS4 pull requests processors"); s_aRWLock.writeLocked ( () -> s_aProcessors.setAll (aProcessorSPIs)); }