Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SPB_Exchange_Repo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Amelin Konstantin
SPB_Exchange_Repo
Commits
26fae532
Commit
26fae532
authored
Oct 23, 2018
by
Amelin Konstantin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change "" on messageNotFound in TradeTemplate
parent
f92fbd09
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
src/main/scala/Main.scala
+1
-1
src/main/scala/templates/RepoTemplate.scala
+0
-0
src/main/scala/templates/TradeTemplate.scala
+8
-9
No files found.
src/main/scala/Main.scala
View file @
26fae532
...
@@ -5,7 +5,7 @@ import templates._
...
@@ -5,7 +5,7 @@ import templates._
object
Main
extends
App
{
object
Main
extends
App
{
implicit
def
templateFactory
(
source
:
Node
)
:
Template
with
Logger
=
{
implicit
def
templateFactory
(
source
:
Node
)
:
Template
with
Logger
=
{
(
source
\
"trade"
).
head
.
child
(
source
\
"trade"
).
head
.
child
.
filter
{
.
filter
{
case
v
:
Elem
=>
true
case
v
:
Elem
=>
true
...
...
src/main/scala/templates/RepoTemplate.scala
View file @
26fae532
This diff is collapsed.
Click to expand it.
src/main/scala/templates/TradeTemplate.scala
View file @
26fae532
...
@@ -52,29 +52,29 @@ abstract class TradeTemplate(source: Node) extends Template(source) {
...
@@ -52,29 +52,29 @@ abstract class TradeTemplate(source: Node) extends Template(source) {
<fpml:partyReference
href
={
get
(
s
\
"
servicingParty
"
,
"
href
"
)
}
/>
<fpml:partyReference
href
={
get
(
s
\
"
servicingParty
"
,
"
href
"
)
}
/>
<fpml:relatedParty>
<fpml:relatedParty>
<fpml:partyReference
href
={
get
(
s
\
"id"
)
}
/>
<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:
type
>
{
get
(
s
\
"
type
"
)
}
</fpml:
type
>
</fpml:relatedParty>
</fpml:relatedParty>
<fpml:timestamps>
<fpml:timestamps>
<fpml:timestamp>
<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>
{
<fpml:value>
{
val
d
=
get
(
source
\
"
trade
"
\
"
nsdSpecificTradeFields
"
\
"
clearedDate
"
)
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
:
value>
</fpml:timestamp>
</fpml:timestamp>
<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>
{
<fpml:value>
{
val
d
=
get
(
source
\
"
trade
"
\
"
nsdSpecificTradeFields
"
\
"
startAgreementDate
"
)
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
:
value>
</fpml:timestamp>
</fpml:timestamp>
<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>
{
<fpml:value>
{
val
d
=
get
(
source
\
"
trade
"
\
"
nsdSpecificTradeFields
"
\
"
endAgreementDate
"
)
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
:
value>
</fpml:timestamp>
</fpml:timestamp>
</fpml:timestamps>
</fpml:timestamps>
...
@@ -84,7 +84,7 @@ abstract class TradeTemplate(source: Node) extends Template(source) {
...
@@ -84,7 +84,7 @@ abstract class TradeTemplate(source: Node) extends Template(source) {
case
v
if
v
==
"PC"
=>
"Partially"
case
v
if
v
==
"PC"
=>
"Partially"
case
v
if
v
==
"OC"
=>
"OneWay"
case
v
if
v
==
"OC"
=>
"OneWay"
case
v
if
v
==
"U"
=>
"Uncollateralized"
case
v
if
v
==
"U"
=>
"Uncollateralized"
case
_
=>
""
case
_
=>
msgNotFound
}
}
}</
fpml
:
collateralizationType>
}</
fpml
:
collateralizationType>
<fpml:collateralPortfolio>
{
get
(
source
\
"
trade
"
\
"
collateral
"
\
"
collateralForm
"
)
}
</fpml:collateralPortfolio>
<fpml:collateralPortfolio>
{
get
(
source
\
"
trade
"
\
"
collateral
"
\
"
collateralForm
"
)
}
</fpml:collateralPortfolio>
...
@@ -123,5 +123,4 @@ abstract class TradeTemplate(source: Node) extends Template(source) {
...
@@ -123,5 +123,4 @@ abstract class TradeTemplate(source: Node) extends Template(source) {
</document>
</document>
</signedDocument>
</signedDocument>
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment