Skip to content

Commit

Permalink
style: README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sitepark-veltrup committed Feb 8, 2024
1 parent 22d614b commit cc5a041
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Add the following Maven dependency to use the API.
</dependency>
```


The starting point of each extension is the interface `com.sitepark.ies.extension.api.Extension`.

```java
Expand All @@ -38,7 +37,6 @@ All extensions that implement this interface will be executed automatically. It

There are several services that can be used via the API. These are provided via port interfaces. You can access these services via dependency injection. All port interfaces that can be used via the API are contained in the package `com.sitepark.ies.extension.api.port`.


For this purpose the constructor must be marked with the annotation `@javax.inject.Inject`.

```java
Expand Down Expand Up @@ -108,7 +106,6 @@ public class MyExtension implements Extension {
}
```


## Inject your own classes

The extension class itself serves only as an entry point. In most cases it makes sense to outsource the logic of the extension into different classes. These classes should also be injected into the extension constructor.
Expand Down Expand Up @@ -146,6 +143,7 @@ public class MyService {
}
}
```

Use `MyService` in `MyExtension`

```java
Expand Down Expand Up @@ -244,7 +242,6 @@ Maven dependency:
</dependency>
```


For this purpose `MyBatisModule` is extended as an injection module and made known to the extension factory.

```java
Expand All @@ -262,6 +259,7 @@ public class MyBatisInjectionModule extends MyBatisModule {
```

Mapper example:

```java
import org.apache.ibatis.annotations.Delete;

Expand Down Expand Up @@ -353,7 +351,6 @@ public class MyServlet extends HttpServlet {

Dependency-injection can also be used here. See also [here](https://github.com/google/guice/wiki/ServletModule#available-injections) for more information.


With the `ServletModule` the servlets are configured.

```java
Expand Down Expand Up @@ -390,9 +387,6 @@ The servlet can then be accessed at the URL https://ies.domain.com/ies3/my.

To keep access to the `ServletRequest` and the `ServletContext`, they can be easily injected.




## GraphQL support

The IES provides a GraphQL endpoint. This is itself also implemented as an extension and can be extended via extensions.
Expand All @@ -401,7 +395,6 @@ Extensions can extend the schema and add resolvers for this endpoint. This funct

To learn how to extend the GraphQL schema please read [here](https://github.com/sitepark/ies-graphql-extension-api#how-to-extend).


# Examples

There is a GitHub project with examples.
Expand Down

0 comments on commit cc5a041

Please sign in to comment.