|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.adapter.integrations.IntegrationRepositoryTools
public class IntegrationRepositoryTools
This class implements a few common functions. This should be extended if any of these methods are inadequate. This is used to translate between Command inputs (or outputs) and repository items. Created: Wed Aug 28 09:29:24 2002
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
IntegrationRepositoryTools()
|
Method Summary | |
---|---|
protected void |
copyRemoteProperties(MutableRepositoryItem pTargetItem,
java.lang.Object pSourceObject,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pTargetDescriptor,
Command pRemoteCommand)
Copy all of the properties in the source object to the target repository item |
java.lang.Object |
createGetCommandInput(java.lang.String pId,
java.lang.String pExternalIdPropertyName,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor,
Command pGetCommand)
Create the input for the get command. |
java.lang.Object |
createRemoveCommandInput(java.lang.String pId,
java.lang.String pExternalIdPropertyName,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor,
Command pGetCommand)
Create the input for the remove command. |
RepositoryItem |
createRepositoryItem(java.lang.Object pCommandResult,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor,
MutableRepositoryItem pLocalItem,
Command pRemoteCommand)
Given a object, create a repository item out of it. |
RepositoryItem[] |
createRepositoryItems(java.lang.Object pCommandResult,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor,
MutableRepositoryItem pLocalItem,
Command pRemoteCommand)
Given a object, create a repository item out of it. |
protected java.lang.Object |
createRepositoryValue(RepositoryPropertyDescriptor pPropertyDescriptor,
java.lang.String pRemoteValue)
Create an appropriate property value from the given remote value. |
void |
externalIdWasUpdated(atg.adapter.integrations.IntegrationRepository pRepository,
RepositoryItem pItem,
java.lang.String pOldValue,
java.lang.String pNewValue)
Send a scenario message of type IntegrationExternalIdChange when the external id is set for the first time. |
java.lang.Object |
getCommandResultObject(CommandResult pResult)
Get result from the CommandResult. |
java.lang.String |
getExternalIdFromResult(java.lang.Object pResult,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor)
Get the id for the external data. |
java.lang.String |
getMessagePort()
The port that the scenario messages will be sent on |
MessageSourceContext |
getMessageSourceContext()
Return the message source context for this source. |
protected boolean |
handleValue(MutableRepositoryItem pItem,
RepositoryPropertyDescriptor pPropDescriptor,
java.lang.Object pExternalValue,
java.lang.Object pResult,
java.lang.Object pParent,
Command pRemoteCommand)
copy the value into the correct property |
boolean |
isAllowMessageSending()
This class cannot send messages if this is false. |
void |
sendMessage(atg.adapter.integrations.IntegrationRepository pRepository,
atg.adapter.integrations.IntegrationRepositoryMessage pMessage)
Sends an object message out on messagePort |
void |
setAllowMessageSending(boolean pAllowMessageSending)
|
void |
setMessagePort(java.lang.String pMessagePort)
|
void |
setMessageSourceContext(MessageSourceContext pMessageSourceContext)
Set the message source context for this source. |
void |
startMessageSource()
This is called to tell the MessageSource that it may begin sending messages. |
void |
stopMessageSource()
This is called to tell the MessageSource that it should stop sending messages. |
MutableRepositoryItem |
updateExternalId(atg.adapter.integrations.IntegrationRepository pRepository,
MutableRepositoryItem pItem,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor,
java.lang.String pExternalId,
boolean pAllowNewItem)
Update the given repository item with the given external id. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
Constructor Detail |
---|
public IntegrationRepositoryTools()
Method Detail |
---|
public void setMessagePort(java.lang.String pMessagePort)
public java.lang.String getMessagePort()
public java.lang.Object getCommandResultObject(CommandResult pResult)
pResult
- The result of a command.public MutableRepositoryItem updateExternalId(atg.adapter.integrations.IntegrationRepository pRepository, MutableRepositoryItem pItem, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor, java.lang.String pExternalId, boolean pAllowNewItem) throws RepositoryException
pItem
- The item being updatedpItemDescriptor
- The IntegrationRepositoryItemDescriptor for pItempExternalId
- The new external idpAllowNewItem
- If true, then it is possible that a new item will be
created if the item uses external id as the id, and it
is not correct.
RepositoryException
public void externalIdWasUpdated(atg.adapter.integrations.IntegrationRepository pRepository, RepositoryItem pItem, java.lang.String pOldValue, java.lang.String pNewValue) throws RepositoryException
sendScenarioEvents
is true.
pRepository
- The integration repository containing the updated itempItem
- The item whose external id changedpOldValue
- The old value for the external idpNewValue
- The new value for the external id
RepositoryException
public java.lang.String getExternalIdFromResult(java.lang.Object pResult, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor) throws RepositoryException
RepositoryException
public RepositoryItem createRepositoryItem(java.lang.Object pCommandResult, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor, MutableRepositoryItem pLocalItem, Command pRemoteCommand) throws RepositoryException
pCommandResult
- This is the result of the command to retrieve data from the remote systempItemDescriptor
- This is the item descriptor of the item being createdpLocalItem
- This is only relevant during a "getItem". We don't need to get the local item twicepRemoteCommand
- This is the command that retrieved pCommandResult
RepositoryException
public RepositoryItem[] createRepositoryItems(java.lang.Object pCommandResult, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor, MutableRepositoryItem pLocalItem, Command pRemoteCommand) throws RepositoryException
pCommandResult
- This is the result of the command to retrieve data from the remote systempItemDescriptor
- This is the item descriptor of the item being createdpLocalItem
- This is only relevant during a "getItem". We don't need to get the local item twicepRemoteCommand
- This is the command that retrieved pCommandResult
RepositoryException
public java.lang.Object createGetCommandInput(java.lang.String pId, java.lang.String pExternalIdPropertyName, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor, Command pGetCommand)
public java.lang.Object createRemoveCommandInput(java.lang.String pId, java.lang.String pExternalIdPropertyName, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor, Command pGetCommand)
protected void copyRemoteProperties(MutableRepositoryItem pTargetItem, java.lang.Object pSourceObject, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pTargetDescriptor, Command pRemoteCommand) throws RepositoryException
RepositoryException
protected boolean handleValue(MutableRepositoryItem pItem, RepositoryPropertyDescriptor pPropDescriptor, java.lang.Object pExternalValue, java.lang.Object pResult, java.lang.Object pParent, Command pRemoteCommand) throws RepositoryException
pItem
- The item whose property will be updated.pPropDescriptor
- The property that will be updatedpExternalValue
- The new value for the propertypResult
- The object that contained the value.pParent
- the parent of pItem if applicable, usually null
RepositoryException
protected java.lang.Object createRepositoryValue(RepositoryPropertyDescriptor pPropertyDescriptor, java.lang.String pRemoteValue)
pPropertyDescriptor
- The property that will be setpRemoteValue
- The value of the remote data
public void setMessageSourceContext(MessageSourceContext pMessageSourceContext)
setMessageSourceContext
in interface MessageSource
MessageSource
public MessageSourceContext getMessageSourceContext()
public void setAllowMessageSending(boolean pAllowMessageSending)
public boolean isAllowMessageSending()
public void startMessageSource()
startMessageSource
in interface MessageSource
public void stopMessageSource()
stopMessageSource
in interface MessageSource
public void sendMessage(atg.adapter.integrations.IntegrationRepository pRepository, atg.adapter.integrations.IntegrationRepositoryMessage pMessage) throws javax.jms.JMSException
messagePort
pObjectMessage
- the object to be placed in the object message.
javax.jms.JMSException
- is thrown when a failure to send the message occurs. This is
generally a configuration issue.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |