|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Provides MIL UCS-related features.
To get a MILUCSManager instance, call the
MILFactory.getUCSManager(), as shown here:
MILFactory milFactory = MILFactory.getMILFactory();
//...
MILUCSManager milFactory = MILFactory.getUCSManager();
This interface can save or modify datain UCS for the MIL interactions that you create.
Once you have saved a MILInteraction, you can use the MILUCSManager to
retrieve this interaction with this ID.
You can also get interactions from the UCS database by creating a MILUCSFindCondition
object
setting conditions for finding specific interactions. The following code snippet illustrates
how to create this object and manage the find result.
//Creating a condition for finding thirdPartyMedia interactions
//of type Inbound having an IN_PROCESS status and created by the current application.
MILUCSFindCondition ucsFindCondition =
ucsManager.createFindCondition(MILUCSInteractionStatus.IN_PROCESS,
"Inbound", "thirdPartyMedia"));
//Setting additional parameters
ApplicationInfo appInfo = omsdkConnector.getApplicationInfo();
ucsFindCondition.setSubmittedBy(appInfo.getApplicationName());
//Finding interactions
Collection mCollection = ucsManager.findPending(ucsFindCondition);
//Displaying interactions
Iterator mIterator = mCollection.iterator();
while(mIterator.hasNext()){
MILInteraction interaction = (MILInteraction) mIterator.next();
System.out.println("Found: "+interaction.getID();
}
| Method Summary | |
MILUCSFindCondition |
createFindCondition(MILUCSInteractionStatus status,
java.lang.String type,
java.lang.String mediaType)
Creates the search condition to use with the findPending(com.genesyslab.omsdk.mil.MILUCSFindCondition) method. |
void |
deleteInteraction(java.lang.String interactionId)
Deletes the specified interaction from UCS. |
java.util.Collection |
findPending(MILUCSFindCondition condition)
Finds interactions in UCS and returns their IDs. |
MILInteraction |
getInteraction(java.lang.String interactionId)
Gets the interaction data associated with this interaction ID. |
java.lang.String |
saveInteraction(MILInteraction interaction)
Saves all data of the specified interaction in UCS, except MILISInteractionProperties. |
void |
stopProcessing(java.lang.String interactionId,
java.lang.String reason)
Changes the UCS status of an interaction to STOPPED. |
| Method Detail |
public java.lang.String saveInteraction(MILInteraction interaction)
throws MILRequestFailedException
MILISInteractionProperties.
If the interaction was already saved once, or if the interaction was retrieved
by calling the getInteraction() method, only some of the
MILUCSInteractionParameters are saved.
If the interaction was neither saved or retrieved, and if you set an ID that already belongs to a UCS interaction, this method throws an exception.
interaction - the interaction to be saved.
MILRequestFailedException - exception thrown if UCS rejects the request,
or if read-only properties, such as SubmittedBy or TenantId, were changed since: getInteraction(java.lang.String).
public void deleteInteraction(java.lang.String interactionId)
throws MILRequestFailedException
interactionId - ID of the interaction to be deleted.
MILRequestFailedException - Exception thrown if no interaction
with this ID is found in UCS, or if the request fails for some other reason.
public void stopProcessing(java.lang.String interactionId,
java.lang.String reason)
throws MILRequestFailedException
STOPPED.
interactionId - ID of the interaction to be stopped.reason - The reason for stopping this interaction.
MILRequestFailedException - Exception thrown if no interaction with this ID is found in UCS.
public MILUCSFindCondition createFindCondition(MILUCSInteractionStatus status,
java.lang.String type,
java.lang.String mediaType)
findPending(com.genesyslab.omsdk.mil.MILUCSFindCondition) method.
Mandatory parameters of the condition are passed in this method.
Set other conditions using setXXX methods of the returned object.
status - status of the interactions.type - interactionType of the interactions.mediaType - mediaType of the interactions.
public java.util.Collection findPending(MILUCSFindCondition condition)
throws MILRequestFailedException
condition - condition defining the interactions to be found.
Collection of interaction IDs, as a String.
MILRequestFailedException - Exception thrown if the request fails.MILUCSFindCondition
public MILInteraction getInteraction(java.lang.String interactionId)
throws MILRequestFailedException
Note: A call to this method does not fill in all MIL interaction parameters.
interactionId - the interaction to be found.
MILRequestFailedException - Exception thrown if the request fails
or if no interaction corresponds to the interaction ID.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||