@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.
|
boolean |
equals(Object o) |
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() |
int |
hashCode() |
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, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSession, initDynamicComponentclone, finalize, getClass, notify, notifyAll, wait, wait, waitattrs, getName, getSession, initDynamicComponent@OverrideOnDemand
@IsLocked(value=WRITE)
protected void markAsChanged()
throws AS2Exception
AS2Exception - In case anything goes wrong@Nonnull @OverridingMethodsMustInvokeSuper public Partnership getPartnership(@Nonnull Partnership aPartnership) throws AS2Exception
IPartnershipFactorygetPartnership in interface IPartnershipFactoryaPartnership - Stub partnership which must contain either a name or a set of sender
and receiver IDs.null.AS2Exception - 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 AS2Exception
AS2Exception@Nonnull public final com.helger.commons.state.EChange addPartnership(@Nonnull Partnership aPartnership) throws AS2Exception
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.AS2Exception - Generic error@Nonnull public final com.helger.commons.state.EChange removePartnership(@Nonnull Partnership aPartnership) throws AS2Exception
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.AS2Exception - Generic errorpublic void updatePartnership(@Nonnull IMessage aMsg, boolean bOverwrite) throws AS2Exception
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.AS2Exception - In case of an errorIPartnershipFactory.getPartnership(Partnership)public final void updatePartnership(@Nonnull IMessageMDN aMdn, boolean bOverwrite) throws AS2Exception
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 currentlyAS2Exception - In case of an errorIPartnershipFactory.getPartnership(Partnership)public boolean equals(Object o)
equals in class AbstractDynamicComponentpublic int hashCode()
hashCode in class AbstractDynamicComponentpublic String toString()
toString in class AbstractDynamicComponentCopyright © 2013–2022 Philip Helger. All rights reserved.