Class PlainSwapEditorHandler
java.lang.Object
net.finmath.smartcontract.product.xml.PlainSwapEditorHandler
Class that handles incoming requests for generating and interacting with plain swaps descriptors coming from the editor.
The API exposed by this class is not definitive and may be subject to changes without notice.
- Version:
- alpha.1
- Author:
- Luca Bressan
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of possible choices for the swap legs. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final BigIntegerstatic final Stringstatic final BigInteger -
Constructor Summary
ConstructorsConstructorDescriptionPlainSwapEditorHandler(PlainSwapOperationRequest plainSwapOperationRequest, String templateXml, String schemaPath, String projectVersion) Returns the plain swap editor handler. -
Method Summary
Modifier and TypeMethodDescriptionGetter method for the JAXB representation of the contractReturns the SDCmL string associated with this plain swap handler.getSchedule(PlainSwapEditorHandler.LegSelector legSelector, String marketData) Returns a list of cashflow periods representing the payment streams involved in the plain swap described.getSchedule(PlainSwapEditorHandler.LegSelector legSelector, MarketDataSet marketData) Returns a list of cashflow periods representing the payment streams involved in the plain swap described.
-
Field Details
-
DEFAULT_FIXED_PERIOD
- See Also:
-
DEFAULT_FLOATING_PERIOD
- See Also:
-
DEFAULT_FIXED_PERIOD_MULTIPLIER
-
DEFAULT_FLOATING_PERIOD_MULTIPLIER
-
-
Constructor Details
-
PlainSwapEditorHandler
public PlainSwapEditorHandler(PlainSwapOperationRequest plainSwapOperationRequest, String templateXml, String schemaPath, String projectVersion) throws IOException, SAXException, jakarta.xml.bind.JAXBException, DatatypeConfigurationException Returns the plain swap editor handler.- Parameters:
plainSwapOperationRequest- the JSON request that contains the editor info.templateXml- path for the SDCmL template XML to be usedschemaPath- path for the SDCmL validation schema- Throws:
IOException- when loading settings files fails.SAXException- when validation of the generated contract fails.jakarta.xml.bind.JAXBException- when marshalling/unmarshalling of a SDCmL object/file fails.DatatypeConfigurationException- when conversion of dates to the FPmL specifications fails.
-
-
Method Details
-
getContractAsXmlString
Returns the SDCmL string associated with this plain swap handler.- Returns:
- the SDCmL document
-
getContract
Getter method for the JAXB representation of the contract- Returns:
- the contract object
-
getSchedule
public List<CashflowPeriod> getSchedule(PlainSwapEditorHandler.LegSelector legSelector, String marketData) throws IOException, CloneNotSupportedException Returns a list of cashflow periods representing the payment streams involved in the plain swap described.- Parameters:
legSelector- the leg for which the schedule should be calculated.marketData- the market data used for calibration of the model used for the payments' calculation.- Returns:
- the payment schedule.
- Throws:
IOExceptionCloneNotSupportedException
-
getSchedule
public List<CashflowPeriod> getSchedule(PlainSwapEditorHandler.LegSelector legSelector, MarketDataSet marketData) throws IOException, CloneNotSupportedException Returns a list of cashflow periods representing the payment streams involved in the plain swap described.- Parameters:
legSelector- the leg for which the schedule should be calculated.marketData- the market data used for calibration of the model used for the payments' calculation.- Returns:
- the payment schedule.
- Throws:
IOExceptionCloneNotSupportedException
-