Skip to content

Commit

Permalink
Merge branch 'docs/cleanup-4.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
matusmacik committed Feb 26, 2024
2 parents 47e9135 + 3511a9f commit 063b053
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
24 changes: 11 additions & 13 deletions docs/interfaces/midpoint-client-java/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The client library is designed to access midPoint functionality in a location-in
E.g. this library can be used to access midPoint functionality from a third-party application, command-line tool, simple web form and so on.

The client library is modeled in a way that reflects the structure of midPoint xref:/midpoint/reference/interfaces/rest/[REST API]. But the idea is that this library is location-independent and transport-independent.
Therefore it can be theoretically implemented as a REST client, SOAP client or even as a thin wrapper library using local Java calls.
Therefore, it can be theoretically implemented as a REST client, SOAP client or even as a thin wrapper library using local Java calls.

[NOTE]
.Partially implemented
Expand All @@ -24,7 +24,7 @@ This feature is partially implemented. But there are some parts that are not com

== Design

The Java REST client library is composed from the library interface and implementation.
The Java REST client library is composed of the library interface and implementation.
The applications should only access the library interface, allowing several implementations on the client library.
This may be very useful during evolution of the client library for several reasons.
Firstly the underlying technology will evolve.
Expand All @@ -39,6 +39,10 @@ image::client-architecture.png[]
Structure and overall approach of the client library quite closely follows the structure of web resources in midPoint xref:/midpoint/reference/interfaces/rest/[REST API].


== Download

You can fork your copy of the source code on link:https://github.com/Evolveum/midpoint-client-java[github]

== Client Library Usage Examples

The client library is designed as a _fluent API_. This is a very elegant and readable way how to structure Java APIs.
Expand Down Expand Up @@ -118,17 +122,17 @@ But only the "verb" methods will indicate network errors and "business" errors s
All the "verb" methods (get, post, delete) should return a "clean" return value if the invocation was successful (e.g. UserType, List<UserType>, etc.) If the invocation fails then an exception is thrown.
The exception should contain xref:/midpoint/architecture/concepts/operation-result/[OperationResult] structure inside them.

TODO: explain fetchResult for lists

TODO: what about validate?
// TODO: explain fetchResult for lists
//
// TODO: what about validate?


==== Unification of Error Handling

The object-based operations should end with invocation of a method based on the HTTP verbs such as .get(), .post(), .delete(). This is the invocation that does the actual work.
All the invocations before that (users(), oid(...), etc.) are just setting up the "context" for the invocation.
But it is the get() or post() at the end that does the work.
Therefore it should be possible to "prepare" the invocation and then pass that to a common code that handles all the network errors (e.g. retries, error logging, etc):
Therefore, it should be possible to "prepare" the invocation and then pass that to a common code that handles all the network errors (e.g. retries, error logging, etc):

[source,java]
----
Expand Down Expand Up @@ -218,12 +222,6 @@ TODO: thread safety

== Implementation


=== Source Code

Source code is on github: link:https://github.com/Evolveum/midpoint-client-java[https://github.com/Evolveum/midpoint-client-java]


=== Evolution and compatibility

The client library is maintained together with midPoint.
Expand Down Expand Up @@ -276,4 +274,4 @@ Stabilization, final release, full compatibility.

== See Also

* xref:/midpoint/reference/interfaces/rest/[REST API]
* xref:/midpoint/reference/interfaces/rest/[REST API]
8 changes: 0 additions & 8 deletions docs/interfaces/rest/endpoints/nodes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ present in midPoint. This is apparent in the operations which are available for

-- TODO

// - xref:/midpoint/reference/interfaces/rest/operations/create-op-rest/[Create Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/get-op-rest/[Get Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/search-op-rest/[Search Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/modify-op-rest/[Modify Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/delete-op-rest/[Delete Operation]
// - xref:/midpoint/reference/interfaces/rest/operations/generate-and-validate-concrete-op-rest/[Generate and Validate Operations]


== JSON Example

Example output of information regarding a specific Node object. Metadata is usually a part
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/rest/operations/create-op-rest.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ include::../../rest/concepts/raw/outcome.adoc[]

== Examples

1. xref:/midpoint/reference/interfaces/rest/operations/examples/create-object/[Create object]
include::../operations/examples/raw/create-user-jack.adoc[]

== See Also
- xref:/midpoint/reference/interfaces/rest/concepts/media-types-rest/[Supported Media Types]
Expand Down

0 comments on commit 063b053

Please sign in to comment.