Commit 26fae532 by Amelin Konstantin

change "" on messageNotFound in TradeTemplate

parent f92fbd09
......@@ -5,7 +5,7 @@ import templates._
object Main extends App {
implicit def templateFactory(source: Node): Template with Logger= {
implicit def templateFactory(source: Node): Template with Logger = {
(source \ "trade").head.child
.filter {
case v: Elem => true
......
......@@ -52,29 +52,29 @@ abstract class TradeTemplate(source: Node) extends Template(source) {
<fpml:partyReference href={ get(s \ "servicingParty", "href") } />
<fpml:relatedParty>
<fpml:partyReference href={ get(s \ "id") } />
<fpml:role>{ if (get(s \ "id").mkString != msgNotFound) "Client" else ""}</fpml:role>
<fpml:role>{ if (get(s \ "id").mkString != msgNotFound) "Client" else msgNotFound}</fpml:role>
<fpml:type>{ get(s \ "type") }</fpml:type>
</fpml:relatedParty>
<fpml:timestamps>
<fpml:timestamp>
<fpml:type>{ if (get(source \ "trade" \ "nsdSpecificTradeFields" \ "clearedDate").mkString != msgNotFound) "InClearingPool" else ""}</fpml:type>
<fpml:type>{ if (get(source \ "trade" \ "nsdSpecificTradeFields" \ "clearedDate").mkString != msgNotFound) "InClearingPool" else msgNotFound}</fpml:type>
<fpml:value>{
val d = get(source \ "trade" \ "nsdSpecificTradeFields" \ "clearedDate")
if (d.mkString != msgNotFound) d + "T00:00:00" else ""
if (d.mkString != msgNotFound) d + "T00:00:00" else msgNotFound
}</fpml:value>
</fpml:timestamp>
<fpml:timestamp>
<fpml:type>{ if (get(source \ "trade" \ "nsdSpecificTradeFields" \ "startAgreementDate").mkString != msgNotFound) "InPortfolio" else ""}</fpml:type>
<fpml:type>{ if (get(source \ "trade" \ "nsdSpecificTradeFields" \ "startAgreementDate").mkString != msgNotFound) "InPortfolio" else msgNotFound}</fpml:type>
<fpml:value>{
val d = get(source \ "trade" \ "nsdSpecificTradeFields" \ "startAgreementDate")
if (d.mkString != msgNotFound) d + "T00:00:00" else ""
if (d.mkString != msgNotFound) d + "T00:00:00" else msgNotFound
}</fpml:value>
</fpml:timestamp>
<fpml:timestamp>
<fpml:type>{ if (get(source \ "trade" \ "nsdSpecificTradeFields" \ "endAgreementDate").mkString != msgNotFound) "OutPortfolio" else ""}</fpml:type>
<fpml:type>{ if (get(source \ "trade" \ "nsdSpecificTradeFields" \ "endAgreementDate").mkString != msgNotFound) "OutPortfolio" else msgNotFound}</fpml:type>
<fpml:value>{
val d = get(source \ "trade" \ "nsdSpecificTradeFields" \ "endAgreementDate")
if (d.mkString != msgNotFound) d + "T00:00:00" else ""
if (d.mkString != msgNotFound) d + "T00:00:00" else msgNotFound
}</fpml:value>
</fpml:timestamp>
</fpml:timestamps>
......@@ -84,7 +84,7 @@ abstract class TradeTemplate(source: Node) extends Template(source) {
case v if v == "PC" => "Partially"
case v if v == "OC" => "OneWay"
case v if v == "U" => "Uncollateralized"
case _ => ""
case _ => msgNotFound
}
}</fpml:collateralizationType>
<fpml:collateralPortfolio>{ get(source \ "trade" \ "collateral" \ "collateralForm") }</fpml:collateralPortfolio>
......@@ -123,5 +123,4 @@ abstract class TradeTemplate(source: Node) extends Template(source) {
</document>
</signedDocument>
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment