Interface IPartnershipFactoryWithPartners

All Superinterfaces:
IDynamicComponent, IPartnershipFactory
All Known Implementing Classes:
AbstractPartnershipFactoryWithPartners, SelfFillingXMLPartnershipFactory, XMLPartnershipFactory

public interface IPartnershipFactoryWithPartners extends IPartnershipFactory
This partnership factory extends IPartnershipFactory by adding "partners". This can be used for providing certain fixed value on a per-partner basis (e.g. email address or X509 certificate alias to the key store) without having redundancy data in all partnerships.
Author:
Philip Helger
  • Method Details

    • addPartner

      void addPartner(@Nonnull Partner aNewPartner) throws AS2Exception
      Add a partner.
      Parameters:
      aNewPartner - The partner data to be used. May not be null.
      Throws:
      AS2Exception - Generic error
    • removePartner

      @Nonnull com.helger.commons.state.EChange removePartner(@Nullable String sPartnerName) throws AS2Exception
      Remove a partner.
      Parameters:
      sPartnerName - The name of the partner to be removed.
      Returns:
      EChange.CHANGED if the partner was successfully removed, EChange.UNCHANGED if no such partner exists.
      Throws:
      AS2Exception - Generic error
    • getPartnerOfName

      @Nullable IPartner getPartnerOfName(@Nullable String sPartnerName)
      Get all the partner data of the partner with the given name.
      Parameters:
      sPartnerName - Partner name to search. May be null.
      Returns:
      null if no such partner exists.
    • getAllPartnerNames

      @Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsSet<String> getAllPartnerNames()
      Returns:
      A set with all contained partner names. Never null but maybe empty.
    • getAllPartners

      @Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsList<? extends IPartner> getAllPartners()
      Returns:
      An (unordered) list of all contained partner data.