@Component public class ExternalReferenceManagerImpl extends java.lang.Object implements ExternalReferenceManager
| Constructor and Description |
|---|
ExternalReferenceManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
deactivate(ExternalReference er)
Confirms that the xid and xref values in an XPair belong
to current partner and are of the expected type.
|
ExternalReference |
disable(ExternalReference er)
Disables an external reference
|
ExternalReference |
enable(ExternalReference er) |
ExternalReference |
findByRef(ExternalReferenceType refType,
java.lang.String extRef)
Returns the ExternalReference for a particular entity.
|
ExternalReference |
findByTargetId(ExternalReferenceType refType,
int targetId)
Returns the ExternalReference for a particular database ID.
|
ExternalReference |
findByXid(ExternalReferenceType refType,
int xid)
For internal use only by SDK Manager code.
|
ExternalReference |
findByXinfo(XInfo xinfo)
Returns the ExternalReference for a particular entity
|
java.util.List<ExternalReference> |
findByXrefs(java.util.List<java.lang.String> xRefs,
ExternalReferenceType xRefType) |
ExternalReferenceType |
getRefType(java.lang.String extRef)
Returns an external reference's type
|
int |
getXId(XInfo xinfo) |
boolean |
partnerOwnsXinfo(XInfo xinfo)
Returns whether a partner owns a particular reference
|
ExternalReference |
partnerPersist(int partnerId,
java.lang.String xref) |
ExternalReference |
persist(ExternalReferenceType refType,
java.lang.String xref,
int targetDbid)
Creates an ExternalReference to a particular entity.
|
public ExternalReference persist(ExternalReferenceType refType, java.lang.String xref, int targetDbid) throws NotFoundException, AlreadyExistsException
ExternalReferenceManagerpersist in interface ExternalReferenceManagerrefType - Entity typeNotFoundException - If partnerRef was not foundAlreadyExistsException - If an external reference already exists for this entitypublic ExternalReference partnerPersist(int partnerId, java.lang.String xref) throws AlreadyExistsException
partnerPersist in interface ExternalReferenceManagerAlreadyExistsExceptionpublic ExternalReference findByTargetId(ExternalReferenceType refType, int targetId) throws NotFoundException
ExternalReferenceManagerfindByTargetId in interface ExternalReferenceManagerrefType - External reference typetargetId - Internal database ID of interestNotFoundExceptionpublic ExternalReference findByXinfo(XInfo xinfo) throws NotFoundException
ExternalReferenceManagerfindByXinfo in interface ExternalReferenceManagerxinfo - Contains the external reference info (an xid and xref) to locate
the full referenceNotFoundException - Ifpublic ExternalReference findByRef(ExternalReferenceType refType, java.lang.String extRef) throws NotFoundException
ExternalReferenceManagerfindByRef in interface ExternalReferenceManagerrefType - External reference typeextRef - The external reference (a UUID) of interest.NotFoundException - If a match is not foundpublic ExternalReference findByXid(ExternalReferenceType refType, int xid) throws NotFoundException
ExternalReferenceManagerSDK-based applications that use this method do so at their own peril of sudden and unexpected behavior and errors. :-)
findByXid in interface ExternalReferenceManagerNotFoundExceptionpublic ExternalReferenceType getRefType(java.lang.String extRef) throws NotFoundException
ExternalReferenceManagergetRefType in interface ExternalReferenceManagerextRef - The external reference (a UUID) of interest.NotFoundExceptionpublic boolean partnerOwnsXinfo(XInfo xinfo)
ExternalReferenceManagerpartnerOwnsXinfo in interface ExternalReferenceManagerxinfo - The XPair of interestpublic ExternalReference enable(ExternalReference er) throws NotFoundException
enable in interface ExternalReferenceManagerNotFoundExceptionpublic ExternalReference disable(ExternalReference er) throws NotFoundException
ExternalReferenceManagerdisable in interface ExternalReferenceManagerer - External reference to disableNotFoundException - If the specified External Reference does not existpublic void deactivate(ExternalReference er) throws NotFoundException
ExternalReferenceManagerdeactivate in interface ExternalReferenceManagerNotFoundException - If either the xid or xref are not found, do not belong to the
provided partner reference, or are of the wrong typepublic int getXId(XInfo xinfo)
getXId in interface ExternalReferenceManagerpublic java.util.List<ExternalReference> findByXrefs(java.util.List<java.lang.String> xRefs, ExternalReferenceType xRefType) throws NotFoundException
findByXrefs in interface ExternalReferenceManagerNotFoundException