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
UPHRH-lms-service
Commits
c6a2ac59
Commit
c6a2ac59
authored
2 years ago
by
Jayaprakash n
Browse files
Options
Download
Patches
Plain Diff
Issue #LR-325 feat: Refactoring of SB Lern Batch Service - DialCode Dependency
parent
ad1dc4df
release-5.2.1
helmchart
release-5.2.0
release-5.2.0_RC2
release-5.2.0_RC1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
course-mw/course-actors-common/src/main/java/org/sunbird/learner/actors/qrcodedownload/QRCodeDownloadManager.java
+3
-4
.../learner/actors/qrcodedownload/QRCodeDownloadManager.java
with
3 additions
and
4 deletions
+3
-4
course-mw/course-actors-common/src/main/java/org/sunbird/learner/actors/qrcodedownload/QRCodeDownloadManager.java
+
3
−
4
View file @
c6a2ac59
...
...
@@ -26,7 +26,7 @@ public class QRCodeDownloadManager {
put
(
JsonKey
.
CONTENT_TYPE
,
JsonKey
.
CONTENT_TYPE
);
}
};
private
static
int
SEARCH_CONTENTS_LIMIT
=
Integer
.
parseInt
(
StringUtils
.
isNotBlank
(
ProjectUtil
.
getConfigValue
(
JsonKey
.
SUNBIRD_QRCODE_COURSES_LIMIT
))
?
ProjectUtil
.
getConfigValue
(
JsonKey
.
SUNBIRD_QRCODE_COURSES_LIMIT
)
:
"2000"
);
private
static
final
int
SEARCH_CONTENTS_LIMIT
=
Integer
.
parseInt
(
StringUtils
.
isNotBlank
(
ProjectUtil
.
getConfigValue
(
JsonKey
.
SUNBIRD_QRCODE_COURSES_LIMIT
))
?
ProjectUtil
.
getConfigValue
(
JsonKey
.
SUNBIRD_QRCODE_COURSES_LIMIT
)
:
"2000"
);
/**
* Search call to Learning Platform composite search engine
...
...
@@ -40,8 +40,7 @@ public class QRCodeDownloadManager {
public
Map
<
String
,
Object
>
searchCourses
(
RequestContext
requestContext
,
Map
<
String
,
Object
>
requestMap
,
Map
<
String
,
String
>
headers
)
throws
UnirestException
{
String
request
=
prepareSearchRequest
(
requestContext
,
requestMap
);
Map
<
String
,
Object
>
searchResponse
=
ContentSearchUtil
.
searchContentSync
(
requestContext
,
null
,
request
,
headers
);
return
searchResponse
;
return
ContentSearchUtil
.
searchContentSync
(
requestContext
,
null
,
request
,
headers
);
}
/**
...
...
@@ -97,7 +96,7 @@ public class QRCodeDownloadManager {
* @param dialCodes
* @return
*/
public
Map
<
String
,
String
>
getQRCodeImageURLs
(
Set
dialCodes
,
String
channel
)
{
public
Map
<
String
,
String
>
getQRCodeImageURLs
(
Set
<
String
>
dialCodes
,
String
channel
)
{
Map
<
String
,
String
>
headers
=
new
HashMap
<>();
String
params
=
"{\"request\": {\"search\":{\"identifier\": [\""
+
String
.
join
(
"\",\""
,
dialCodes
)+
"\"]}}}"
;
try
{
...
...
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