Package com.helger.as2lib.partner.xml
Interface IPartnershipFactoryWithPartners
- All Superinterfaces:
IDynamicComponent
,IPartnershipFactory
- All Known Implementing Classes:
AbstractPartnershipFactoryWithPartners
,SelfFillingXMLPartnershipFactory
,XMLPartnershipFactory
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 Summary
Modifier and TypeMethodDescriptionvoid
addPartner
(Partner aNewPartner) Add a partner.com.helger.commons.collection.impl.ICommonsSet<String>
com.helger.commons.collection.impl.ICommonsList<? extends 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 Details
-
addPartner
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
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.
-
getAllPartners
@Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsList<? extends IPartner> getAllPartners()- Returns:
- An (unordered) list of all contained partner data.
-