Package com.helger.as2lib.partner.xml
Interface IPartnershipFactoryWithPartners
-
- All Superinterfaces:
IDynamicComponent
,IPartnershipFactory
- All Known Implementing Classes:
AbstractPartnershipFactoryWithPartners
,SelfFillingXMLPartnershipFactory
,XMLPartnershipFactory
public interface IPartnershipFactoryWithPartners extends IPartnershipFactory
This partnership factory extendsIPartnershipFactory
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addPartner(Partner aNewPartner)
Add a partner.com.helger.commons.collection.impl.ICommonsSet<String>
getAllPartnerNames()
com.helger.commons.collection.impl.ICommonsList<? extends IPartner>
getAllPartners()
IPartner
getPartnerOfName(String sPartnerName)
Get all the partner data of the partner with the given name.com.helger.commons.state.EChange
removePartner(String sPartnerName)
Remove a partner.-
Methods inherited from interface com.helger.as2lib.IDynamicComponent
attrs, getName, getSession, initDynamicComponent
-
Methods inherited from interface com.helger.as2lib.partner.IPartnershipFactory
addPartnership, getAllPartnershipNames, getAllPartnerships, getPartnership, getPartnershipByName, removePartnership, updatePartnership, updatePartnership
-
-
-
-
Method Detail
-
addPartner
void addPartner(@Nonnull Partner aNewPartner) throws AS2Exception
Add a partner.- Parameters:
aNewPartner
- The partner data to be used. May not benull
.- 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 benull
.- 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.
-
-