Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
lern-data-pipeline
Commits
963eed26
Commit
963eed26
authored
2 years ago
by
aimansharief
Browse files
Options
Download
Patches
Plain Diff
LR-269 #LERN data-pipeline CSP changes
parent
d8899568
release-5.0.1
github/fork/rahulbowade/release-5.0.1-collection-certificate-generator-debug
release-5.0.1_RC2
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms-jobs/credential-generator/certificate-processor/src/main/scala/org/sunbird/incredible/JsonKeys.scala
+1
-0
...ssor/src/main/scala/org/sunbird/incredible/JsonKeys.scala
lms-jobs/credential-generator/collection-certificate-generator/src/main/scala/org/sunbird/job/certgen/functions/NotifierFunction.scala
+4
-3
.../org/sunbird/job/certgen/functions/NotifierFunction.scala
with
5 additions
and
3 deletions
+5
-3
lms-jobs/credential-generator/certificate-processor/src/main/scala/org/sunbird/incredible/JsonKeys.scala
+
1
−
0
View file @
963eed26
...
...
@@ -123,4 +123,5 @@ object JsonKeys {
val
EXPIRY_DATE
:
String
=
"expiryDate"
val
ISSUER_NAME
:
String
=
"issuerName"
val
EDATA
=
"edata"
val
STATE_IMAGE_URL
=
"stateImageUrl"
}
This diff is collapsed.
Click to expand it.
lms-jobs/credential-generator/collection-certificate-generator/src/main/scala/org/sunbird/job/certgen/functions/NotifierFunction.scala
+
4
−
3
View file @
963eed26
...
...
@@ -8,6 +8,7 @@ import org.apache.flink.api.common.typeinfo.TypeInformation
import
org.apache.flink.configuration.Configuration
import
org.apache.flink.streaming.api.functions.ProcessFunction
import
org.slf4j.LoggerFactory
import
org.sunbird.incredible.JsonKeys
import
org.sunbird.job.certgen.task.CertificateGeneratorConfig
import
org.sunbird.job.exception.InvalidEventException
import
org.sunbird.job.util.
{
CassandraUtil
,
HttpUtil
,
ScalaJsonUtil
}
...
...
@@ -60,11 +61,11 @@ class NotifierFunction(config: CertificateGeneratorConfig, httpUtil: HttpUtil, @
logger
.
info
(
"notification template is present in the cert-templates object {}"
,
certTemplate
.
get
(
metaData
.
templateId
).
containsKey
(
config
.
notifyTemplate
))
val
notifyTemplate
=
getNotifyTemplateFromRes
(
certTemplate
.
get
(
metaData
.
templateId
))
if
(
notifyTemplate
!=
null
&&
notifyTemplate
.
containsKey
(
"stateImageUrl"
))
{
val
placeholderUrl
=
notifyTemplate
.
getOrElse
(
"stateImageUrl"
,
""
)
if
(
notifyTemplate
!=
null
&&
notifyTemplate
.
containsKey
(
JsonKeys
.
STATE_IMAGE_URL
))
{
val
placeholderUrl
=
notifyTemplate
.
getOrElse
(
JsonKeys
.
STATE_IMAGE_URL
,
""
)
if
(
placeholderUrl
!=
null
){
val
replacedUrl
=
placeholderUrl
.
replace
(
config
.
cloudStoreBasePathPlaceholder
,
config
.
cloudStoreBasePath
)
notifyTemplate
.
replace
(
"stateImageUrl"
,
placeholderUrl
,
replacedUrl
)
notifyTemplate
.
replace
(
JsonKeys
.
STATE_IMAGE_URL
,
placeholderUrl
,
replacedUrl
)
}
}
val
request
=
mutable
.
Map
[
String
,
AnyRef
](
"request"
->
(
notifyTemplate
++
mutable
.
Map
[
String
,
AnyRef
](
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets