Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Krishna Vemulavada
/
vera_2.1_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
547cf5c2
authored
Dec 29, 2016
by
Kunj
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fixed - Catalogue categories and catalogue Items is not showing images.
parent
2e0fe6d9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
21 deletions
app/src/main/java/com/vsoft/uoflservicenow/api/interfaces/CatalogueCategoryApi.java
app/src/main/java/com/vsoft/uoflservicenow/api/interfaces/CatalogueCategoryItemApi.java
app/src/main/java/com/vsoft/uoflservicenow/api/managers/CatalogueApiManager.java
app/src/main/java/com/vsoft/uoflservicenow/api/managers/CatalogueItemApiManager.java
app/src/main/java/com/vsoft/uoflservicenow/utils/Constants.java
app/src/main/java/com/vsoft/uoflservicenow/api/interfaces/CatalogueCategoryApi.java
View file @
547cf5c2
...
...
@@ -16,9 +16,7 @@ import retrofit2.http.Query;
public
interface
CatalogueCategoryApi
{
// Get Catalogue API
@GET
(
Constants
.
URL_GET_CATALOGUE
)
Call
<
ResponseBody
>
getCatalogue
(
@Query
(
Constants
.
URL_PARAM_SYSPRM_QUERY
)
String
sysparmQuery
,
@Query
(
Constants
.
URL_PARAM_SYSPRM_FIELDS
)
String
sysParmFields
,
@Query
(
Constants
.
URL_PARAM_SYSPRM_DISPLAY_VALUE
)
String
sysParmDisplayValue
);
Call
<
ResponseBody
>
getCatalogue
(
@Query
(
Constants
.
URL_PARAM_SYS_ID
)
String
sysId
);
// Get Catalogue Order API
@GET
(
Constants
.
URL_GET_CATALOGUE_ORDER
)
...
...
app/src/main/java/com/vsoft/uoflservicenow/api/interfaces/CatalogueCategoryItemApi.java
View file @
547cf5c2
...
...
@@ -16,9 +16,7 @@ import retrofit2.http.Query;
public
interface
CatalogueCategoryItemApi
{
// Get Catalogue Item API
@GET
(
Constants
.
URL_GET_CATALOGUE_ITEM
)
Call
<
ResponseBody
>
getCatalogueItem
(
@Query
(
Constants
.
URL_PARAM_SYSPRM_QUERY
)
String
sysparmQuery
,
@Query
(
Constants
.
URL_PARAM_SYSPRM_FIELDS
)
String
sysParmFields
,
@Query
(
Constants
.
URL_PARAM_SYSPRM_DISPLAY_VALUE
)
String
sysParmDisplayValue
);
Call
<
ResponseBody
>
getCatalogueItem
(
@Query
(
Constants
.
URL_PARAM_SYS_ID
)
String
sysId
);
}
app/src/main/java/com/vsoft/uoflservicenow/api/managers/CatalogueApiManager.java
View file @
547cf5c2
...
...
@@ -44,11 +44,6 @@ public class CatalogueApiManager {
public
static
void
getCatalogues
(
Context
context
,
final
GetCatalogueApiListener
listener
)
{
CatalogueLog
.
d
(
"CatalogueApiManager: getCatalogues: "
);
StringBuilder
stringBuilder
=
new
StringBuilder
();
stringBuilder
.
append
(
Catalogue
.
Json
.
URL_PARAM_CATALOGUE_SYSPRM_QUERY_VALUE
);
stringBuilder
.
append
(
"=e0d08b13c3330100c8b837659bba8fb4"
);
stringBuilder
.
append
(
"^active=true"
);
CatalogueLog
.
d
(
"CatalogueApiManager: getCatalogues: request parameter: "
+
stringBuilder
.
toString
());
String
accessToken
=
PrefManager
.
getSharedPref
(
context
,
PrefManager
.
PREFERENCE_ACCESS_TOKEN
);
if
(
accessToken
.
isEmpty
())
{
...
...
@@ -56,7 +51,7 @@ public class CatalogueApiManager {
return
;
}
final
Retrofit
retrofit
=
RestClient
.
getInitializedRestAdapter
(
accessToken
);
Call
<
ResponseBody
>
call
=
retrofit
.
create
(
CatalogueCategoryApi
.
class
).
getCatalogue
(
stringBuilder
.
toString
(),
"sys_id,title,description,homepage_image"
,
"true
"
);
Call
<
ResponseBody
>
call
=
retrofit
.
create
(
CatalogueCategoryApi
.
class
).
getCatalogue
(
"e0d08b13c3330100c8b837659bba8fb4
"
);
try
{
//Retrofit synchronous call
Response
<
ResponseBody
>
response
=
call
.
execute
();
...
...
app/src/main/java/com/vsoft/uoflservicenow/api/managers/CatalogueItemApiManager.java
View file @
547cf5c2
...
...
@@ -40,12 +40,6 @@ public class CatalogueItemApiManager {
public
static
void
getCatalogueItems
(
Context
context
,
String
catalogueSysId
,
GetCatalogueItemApiListener
listener
)
{
CatalogueLog
.
d
(
"CatalogueItemApiManager: getCatalogueItems: "
);
StringBuilder
stringBuilder
=
new
StringBuilder
();
stringBuilder
.
append
(
CatalogueItem
.
Json
.
URL_PARAM_CATALOGUE_SYSPRM_QUERY_VALUE
);
stringBuilder
.
append
(
"="
);
stringBuilder
.
append
(
catalogueSysId
);
stringBuilder
.
append
(
"^active=true"
);
CatalogueLog
.
d
(
"CatalogueItemApiManager: getCatalogueItems: request parameter: "
+
stringBuilder
.
toString
());
String
accessToken
=
PrefManager
.
getSharedPref
(
context
,
PrefManager
.
PREFERENCE_ACCESS_TOKEN
);
if
(
accessToken
.
isEmpty
())
{
...
...
@@ -53,7 +47,7 @@ public class CatalogueItemApiManager {
return
;
}
final
Retrofit
retrofit
=
RestClient
.
getInitializedRestAdapter
(
accessToken
);
Call
<
ResponseBody
>
call
=
retrofit
.
create
(
CatalogueCategoryItemApi
.
class
).
getCatalogueItem
(
stringBuilder
.
toString
(),
"sys_id,short_description,name,description,icon"
,
"true"
);
Call
<
ResponseBody
>
call
=
retrofit
.
create
(
CatalogueCategoryItemApi
.
class
).
getCatalogueItem
(
catalogueSysId
);
try
{
//Retrofit synchronous call
Response
<
ResponseBody
>
response
=
call
.
execute
();
...
...
app/src/main/java/com/vsoft/uoflservicenow/utils/Constants.java
View file @
547cf5c2
...
...
@@ -130,11 +130,11 @@ public class Constants {
public
static
final
String
URL_REFRESH_LOGIN
=
URL_POST_LOGIN_ITEM
;
/*Catalogue Category API */
public
static
final
String
URL_GET_CATALOGUE
=
API_PATH
+
"sc_
category"
;
public
static
final
String
URL_GET_CATALOGUE
=
DOMAIN
+
"api/uno33/uofl_mobile/
category"
;
public
static
final
String
URL_GET_CATALOGUE_ORDER
=
DOMAIN
+
"api/uno33/uofl_mobile/catalohhome"
;
/*Catalogue Category Items API */
public
static
final
String
URL_GET_CATALOGUE_ITEM
=
API_PATH
+
"sc_cat
_item"
;
public
static
final
String
URL_GET_CATALOGUE_ITEM
=
DOMAIN
+
"api/uno33/uofl_mobile/catalog
_item"
;
/*Variable form API */
public
static
final
String
URL_GET_VARIABLE
=
"/api/uno33/uofl_mobile/variables"
;
...
...
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