Package com.helger.as2lib.partner.xml
Class SelfFillingXMLPartnershipFactory
java.lang.Object
com.helger.as2lib.AbstractDynamicComponent
com.helger.as2lib.partner.AbstractPartnershipFactory
com.helger.as2lib.partner.xml.AbstractPartnershipFactoryWithPartners
com.helger.as2lib.partner.xml.XMLPartnershipFactory
com.helger.as2lib.partner.xml.SelfFillingXMLPartnershipFactory
- All Implemented Interfaces:
IDynamicComponent
,IPartnershipFactory
,IRefreshablePartnershipFactory
,IPartnershipFactoryWithPartners
A special
XMLPartnershipFactory
that adds a new partnership if it is
not yet existing.- Author:
- Philip Helger
-
Field Summary
Fields inherited from class com.helger.as2lib.partner.xml.XMLPartnershipFactory
ATTR_DISABLE_BACKUP, ATTR_FILENAME
Fields inherited from class com.helger.as2lib.AbstractDynamicComponent
m_aRWLock
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetPartnership
(Partnership aPartnership) Get the partnership identified by the provided stub partnership.protected void
onBeforeAddPartnership
(Partnership aPartnership) Callback method that is invoked every time a new partnership is automatically added.Methods inherited from class com.helger.as2lib.partner.xml.XMLPartnershipFactory
getFilename, initDynamicComponent, isDisableBackup, load, loadPartner, loadPartnerIDs, loadPartnership, loadPartnershipAttributes, refreshPartnershipFactory, setDisableBackup, setFilename, storePartnership
Methods inherited from class com.helger.as2lib.partner.xml.AbstractPartnershipFactoryWithPartners
addPartner, equals, getAllPartnerNames, getAllPartners, getPartnerMap, getPartnerOfName, hashCode, removePartner, setPartners
Methods inherited from class com.helger.as2lib.partner.AbstractPartnershipFactory
addPartnership, getAllPartnershipNames, getAllPartnerships, getPartnershipByName, getPartnershipMap, markAsChanged, removePartnership, setPartnerships, toString, updatePartnership, updatePartnership
Methods inherited from class com.helger.as2lib.AbstractDynamicComponent
attrs, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSession
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.helger.as2lib.IDynamicComponent
attrs, getName, getSession
Methods inherited from interface com.helger.as2lib.partner.IPartnershipFactory
addPartnership, getAllPartnershipNames, getAllPartnerships, getPartnershipByName, removePartnership, updatePartnership, updatePartnership
-
Constructor Details
-
SelfFillingXMLPartnershipFactory
public SelfFillingXMLPartnershipFactory()
-
-
Method Details
-
onBeforeAddPartnership
@OverrideOnDemand @OverridingMethodsMustInvokeSuper protected void onBeforeAddPartnership(@Nonnull Partnership aPartnership) throws AS2Exception Callback method that is invoked every time a new partnership is automatically added. This method is called BEFORE the main add-process is started.- Parameters:
aPartnership
- The partnership that will be added. Nevernull
.- Throws:
AS2Exception
- In case of an error.
-
getPartnership
Description copied from interface:IPartnershipFactory
Get the partnership identified by the provided stub partnership.- Specified by:
getPartnership
in interfaceIPartnershipFactory
- Overrides:
getPartnership
in classAbstractPartnershipFactory
- Parameters:
aPartnership
- Stub partnership which must contain either a name or a set of sender and receiver IDs.- Returns:
- The Partnership as stored in this factory. Never
null
. - Throws:
AS2Exception
- If no partnership matching the provided stub partnership can be found.
-