org.decisiondeck.jmcda.persist.xmcda2
Class XMCDADecisionMakers

java.lang.Object
  extended by org.decisiondeck.jmcda.persist.xmcda2.utils.XMCDAHelper
      extended by org.decisiondeck.jmcda.persist.xmcda2.utils.XMCDAHelperWithVarious
          extended by org.decisiondeck.jmcda.persist.xmcda2.XMCDADecisionMakers

public class XMCDADecisionMakers
extends XMCDAHelperWithVarious

Methods for reading and writing decision makers informations from and to XMCDA fragments.


Constructor Summary
XMCDADecisionMakers()
          Creates a new object which will use the default error management strategy XMCDAErrorsManager.ErrorManagement.THROW.
XMCDADecisionMakers(XMCDAErrorsManager errorsManager)
          Creates a new object delegating error management to the given error manager in case of unexpected data read.
 
Method Summary
 Set<DecisionMaker> read(XMethodParameters xMethodParameters)
           Retrieves the set of decision makers found in the given fragment.
 XMethodParameters write(Set<DecisionMaker> dms)
          Retrieves an XMCDA fragment representing the given set of decision makers.
 
Methods inherited from class org.decisiondeck.jmcda.persist.xmcda2.utils.XMCDAHelper
error, getStrategy, setStrategy
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMCDADecisionMakers

public XMCDADecisionMakers()
Creates a new object which will use the default error management strategy XMCDAErrorsManager.ErrorManagement.THROW.


XMCDADecisionMakers

public XMCDADecisionMakers(XMCDAErrorsManager errorsManager)
Creates a new object delegating error management to the given error manager in case of unexpected data read.

Parameters:
errorsManager - not null.
Method Detail

write

public XMethodParameters write(Set<DecisionMaker> dms)
Retrieves an XMCDA fragment representing the given set of decision makers. The written information order matches the iteration order of the given set.

Parameters:
dms - not null.
Returns:
not null.

read

public Set<DecisionMaker> read(XMethodParameters xMethodParameters)
                        throws InvalidInputException

Retrieves the set of decision makers found in the given fragment.

This method expects the decision makers to have a label set. In case of unexpected data, an exception is thrown if this object follows the XMCDAErrorsManager.ErrorManagement.THROW strategy, otherwise, non conforming informations will be skipped.

Parameters:
xMethodParameters - not null.
Returns:
null iff the given fragment contains an XValue that is not a label and this object does not follows the XMCDAErrorsManager.ErrorManagement.THROW strategy.
Throws:
InvalidInputException - iff the given fragment contains a XValue that is not a label and this object follows the XMCDAErrorsManager.ErrorManagement.THROW strategy.


Copyright © 2011. All Rights Reserved.