Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GLPI
java-library-glpi
Commits
91ca0dd9
Commit
91ca0dd9
authored
Oct 27, 2017
by
Rafa Hernandez
Committed by
Alexander Salas Bastidas
Nov 01, 2017
Browse files
feat(getSubItems): add string option for itemtype
parent
703db678
Changes
1
Hide whitespace changes
Inline
Side-by-side
glpi/src/main/java/org/glpi/api/GLPI.java
View file @
91ca0dd9
...
...
@@ -521,6 +521,17 @@ public class GLPI extends ServiceGenerator {
});
}
/**
* Return a collection of rows of the sub_itemtype for the identified item.
* @param itemType This are the item type available on GLPI
* @param id unique identifier of the parent itemtype
* @param subItemType This are the item type available on GLPI
* @param callback here your are going to get the asynchronous response
*/
public
void
getSubItems
(
String
itemType
,
String
id
,
String
subItemType
,
final
JsonObjectCallback
callback
)
{
getSubItems
(
new
GetSubItemQuery
(
GLPI
.
this
.
context
),
itemType
,
id
,
subItemType
,
callback
);
}
/**
* Return a collection of rows of the sub_itemtype for the identified item.
* @param itemType This are the item type available on GLPI
...
...
@@ -534,15 +545,26 @@ public class GLPI extends ServiceGenerator {
/**
* Return a collection of rows of the sub_itemtype for the identified item.
* @param options this are the parameters of this endpoint for example expand_dropdowns or get_hateoas
* @param itemType This are the item type available on GLPI
* @param id unique identifier of the parent itemtype
* @param subItemType This are the item type available on GLPI
* @param callback here your are going to get the asynchronous response
*/
public
void
getSubItems
(
GetSubItemQuery
options
,
itemType
itemType
,
String
id
,
itemType
subItemType
,
final
JsonObjectCallback
callback
)
{
getSubItems
(
options
,
itemType
.
name
(),
id
,
subItemType
.
name
(),
callback
);
}
/**
* Return a collection of rows of the sub_itemtype for the identified item.
* @param options this are the parameters of this endpoint for example expand_dropdowns or get_hateoas
* @param itemType This are the item type available on GLPI
* @param id unique identifier of the parent itemtype
* @param subItemType This are the item type available on GLPI
* @param callback here your are going to get the asynchronous response
*/
public
void
getSubItems
(
GetSubItemQuery
options
,
String
itemType
,
String
id
,
String
subItemType
,
final
JsonObjectCallback
callback
)
{
Call
<
JsonObject
>
responseCall
=
interfaces
.
getSubItem
(
getHeader
(),
itemType
.
name
()
,
id
,
subItemType
.
name
()
,
options
.
getQuery
());
Call
<
JsonObject
>
responseCall
=
interfaces
.
getSubItem
(
getHeader
(),
itemType
,
id
,
subItemType
,
options
.
getQuery
());
responseCall
.
enqueue
(
new
Callback
<
JsonObject
>()
{
@Override
public
void
onResponse
(
Call
<
JsonObject
>
call
,
Response
<
JsonObject
>
response
)
{
...
...
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!
Cancel
Please
register
or
sign in
to comment