-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IVIS-46: - Add chapter use API methods. - Fix Quick start chapter.
- Loading branch information
1 parent
846fe2d
commit 31d63dc
Showing
6 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...create_ivis_server_client_application.rst → ...nstall_ivis_server_client_application.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Use api methods | ||
=============== | ||
|
||
.. important:: | ||
|
||
You can use API method only if admin check permission for that method for client and user (result it is a cross of permissions). | ||
|
||
First you need get iVIS service factory from request. | ||
|
||
.. code-block:: java | ||
HttpServletRequest request = ... ; // get HttpServletRequest | ||
IvisServiceFactory ivisServiceFactory = IvisOAuth2Utils.getServiceFactory(request); | ||
.. note:: | ||
|
||
If service factory invokes first time it wil create service factory in user session context. | ||
|
||
Next uses exist IvisServiceFactory instance need get service for specific entity. | ||
|
||
.. code-block:: java | ||
//for example you need ApplicationService | ||
ApplicationService applicationService = ivisServiceFactory.getService(ApplicationService.class); | ||
And then just invoke API methods like Java methods. | ||
|
||
.. code-block:: java | ||
List<Application> allApplications = applicationService.findAll(); | ||
.. tip:: | ||
|
||
How to know what concrete method needs? Just see service interface methods: name, in parameters and return type. | ||
|
||
|
||
|
||
|