org.ow2.petals.component.framework.api.util
Class MtomUtil.MtomMapping

java.lang.Object
  extended by org.ow2.petals.component.framework.api.util.MtomUtil.MtomMapping
Enclosing class:
MtomUtil

public static class MtomUtil.MtomMapping
extends Object

A bean that describes a mapping of attachments associated with a Petals message.

An instance of this class aims at:


Constructor Summary
MtomUtil.MtomMapping()
          Constructor.
 
Method Summary
 Map<String,DataHandler> getContentIdToDataHandler()
           
 Set<String> getOrphanContentIds()
           
 List<DataHandler> getOrphanDataHandlers()
           
 String toString()
          This method build a message indicating the listing of orphan data handler's name, orphan content ID and the map associating content ID to DataHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MtomUtil.MtomMapping

public MtomUtil.MtomMapping()
Constructor.

Method Detail

getContentIdToDataHandler

public Map<String,DataHandler> getContentIdToDataHandler()
Returns:
a map associating a content ID (as specified in the XOP's cid) and a data handler.

This map is never null, but can be empty.


getOrphanContentIds

public Set<String> getOrphanContentIds()
Returns:
the list of content IDs for which no data handler was found.

This list is never null, but can be empty.
Every missing data handler implies there is an error, something is missing in the pay-load.


getOrphanDataHandlers

public List<DataHandler> getOrphanDataHandlers()
Returns:
the list of data handlers that are not associated with a content ID.

This list is never null, but can be empty.
Every orphan data handler implies there is an error on the client side (SwA attachments are part of the pay-load). But this should not prevent the processing from being done. This method aims at describing the coherence of the pay-load with the attachments (and can be used for logging reasons).


toString

public String toString()
This method build a message indicating the listing of orphan data handler's name, orphan content ID and the map associating content ID to DataHandler.

Overrides:
toString in class Object


Copyright © 2005-2012 Petals Link (EBM Websourcing). All Rights Reserved.