@ThreadSafe public abstract class AbstractPartnershipFactory extends AbstractDynamicComponent implements IPartnershipFactory
IPartnershipFactory implementation using
PartnershipMap as the underlying data storage object.m_aRWLock| Constructor and Description |
|---|
AbstractPartnershipFactory() |
| Modifier and Type | Method and Description |
|---|---|
com.helger.commons.state.EChange |
addPartnership(Partnership aPartnership)
Add a partnership.
|
com.helger.commons.collection.impl.ICommonsSet<String> |
getAllPartnershipNames() |
com.helger.commons.collection.impl.ICommonsList<Partnership> |
getAllPartnerships() |
Partnership |
getPartnership(Partnership aPartnership)
Get the partnership identified by the provided stub partnership.
|
Partnership |
getPartnershipByName(String sName)
Find an existing partnership by its name.
|
IPartnershipMap |
getPartnershipMap() |
protected void |
markAsChanged()
Callback method that is invoked, when this object is modified.
|
com.helger.commons.state.EChange |
removePartnership(Partnership aPartnership)
Remove the specified partnership.
|
protected void |
setPartnerships(PartnershipMap aPartnerships) |
String |
toString() |
void |
updatePartnership(IMessage aMsg,
boolean bOverwrite)
Looks up and fills in any header info for a specific msg's partnership.
|
void |
updatePartnership(IMessageMDN aMdn,
boolean bOverwrite)
Looks up and fills in any header info for a specific MDN's partnership
|
attrs, equals, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSession, hashCode, initDynamicComponentclone, finalize, getClass, notify, notifyAll, wait, wait, waitattrs, getName, getSession, initDynamicComponent@OverrideOnDemand
@IsLocked(value=WRITE)
protected void markAsChanged()
throws OpenAS2Exception
OpenAS2Exception - In case anything goes wrong@Nonnull @OverridingMethodsMustInvokeSuper public Partnership getPartnership(@Nonnull Partnership aPartnership) throws OpenAS2Exception
IPartnershipFactorygetPartnership in interface IPartnershipFactoryaPartnership - Stub partnership which must contain either a name or a set of sender
and receiver IDs.null.OpenAS2Exception - If no partnership matching the provided stub partnership can be
found.@Nullable public Partnership getPartnershipByName(@Nullable String sName)
IPartnershipFactorygetPartnershipByName in interface IPartnershipFactorysName - The partnership name to be looked up. May be null.null if no such partnership exists.@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsSet<String> getAllPartnershipNames()
getAllPartnershipNames in interface IPartnershipFactorynull
but maybe empty.@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<Partnership> getAllPartnerships()
getAllPartnerships in interface IPartnershipFactorynull but
maybe empty.@Nonnull public IPartnershipMap getPartnershipMap()
protected final void setPartnerships(@Nonnull PartnershipMap aPartnerships) throws OpenAS2Exception
OpenAS2Exception@Nonnull public final com.helger.commons.state.EChange addPartnership(@Nonnull Partnership aPartnership) throws OpenAS2Exception
IPartnershipFactoryaddPartnership in interface IPartnershipFactoryaPartnership - The partnership to be added. May not be null. The name
of the partnership must be unique so that it gets added.EChange.CHANGED if adding was successfully,
EChange.UNCHANGED if the name is already contained.OpenAS2Exception - Generic error@Nonnull public final com.helger.commons.state.EChange removePartnership(@Nonnull Partnership aPartnership) throws OpenAS2Exception
IPartnershipFactoryremovePartnership in interface IPartnershipFactoryaPartnership - The partnership to be removed.EChange.CHANGED if removal was successful,
EChange.UNCHANGED if no such partnership to be removed is
present.OpenAS2Exception - Generic errorpublic final void updatePartnership(@Nonnull IMessage aMsg, boolean bOverwrite) throws OpenAS2Exception
IPartnershipFactoryupdatePartnership in interface IPartnershipFactoryaMsg - The message in which the partnership should be updated. May not be
null and must already contain a partnership with at
least name or sender and receiver IDs.bOverwrite - true to also set the subject of the message with the
subject stored in the partnership.OpenAS2Exception - In case of an errorIPartnershipFactory.getPartnership(Partnership)public final void updatePartnership(@Nonnull IMessageMDN aMdn, boolean bOverwrite) throws OpenAS2Exception
IPartnershipFactoryupdatePartnership in interface IPartnershipFactoryaMdn - The MDN of which the partnership information should be updated. May
not be null and must already contain a partnership with
at least name or sender and receiver IDs.bOverwrite - has no effect currentlyOpenAS2Exception - In case of an errorIPartnershipFactory.getPartnership(Partnership)public String toString()
toString in class AbstractDynamicComponentCopyright © 2013–2019 Philip Helger. All rights reserved.