Skip to content

Commit

Permalink
added position to bookmark (#10)
Browse files Browse the repository at this point in the history
* added position to bookmark

* feat: fix log and remove modifiers

* fix: assertion
  • Loading branch information
JordenReuter authored Sep 25, 2024
1 parent c3c9b79 commit 2325ee2
Show file tree
Hide file tree
Showing 10 changed files with 129 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,158 +12,158 @@ h| Version

| https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-core.html[Link]
|
| 0.26.0
| 0.30.0

| onecx-tenant

| https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-tenant.html[Link]
| https://github.com/onecx/onecx-quarkus/blob/0.26.0/docs/modules/onecx-quarkus/pages/includes/onecx-tenant.adoc[Link]
| 0.26.0
| https://github.com/onecx/onecx-quarkus/blob/0.30.0/docs/modules/onecx-quarkus/pages/includes/onecx-tenant.adoc[Link]
| 0.30.0

| quarkus-oidc

| https://quarkus.io/guides/security-oidc-bearer-token-authentication-tutorial[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-oidc.adoc[Link]
| 3.13.2
| 3.14.4
| tkit-quarkus-rest-context
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-rest-context.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest-context.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest-context.adoc[Link]
| 2.32.0
| tkit-quarkus-jpa-tenant
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-jpa-tenant.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa-tenant.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa-tenant.adoc[Link]
| 2.32.0
| tkit-quarkus-data-import
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-data-import.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-data-import.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-data-import.adoc[Link]
| 2.32.0
| tkit-quarkus-jpa
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-jpa.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa.adoc[Link]
| 2.32.0
| tkit-quarkus-log-cdi
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-cdi.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
| 2.32.0
| tkit-quarkus-log-rs
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-rs.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
| 2.32.0
| tkit-quarkus-log-json
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-json.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
| 2.32.0
| tkit-quarkus-rest
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-rest.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest.adoc[Link]
| 2.32.0
| quarkus-arc
| https://quarkus.io/guides/cdi-reference[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-arc.adoc[Link]
| 3.13.2
| 3.14.4
| quarkus-liquibase
| https://quarkus.io/guides/liquibase[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-liquibase.adoc[Link]
| 3.13.2
| 3.14.4
| quarkus-smallrye-health
| https://quarkus.io/guides/smallrye-health[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-smallrye-health.adoc[Link]
| 3.13.2
| 3.14.4
| quarkus-micrometer-registry-prometheus
| https://quarkus.io/guides/telemetry-micrometer[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-micrometer-registry-prometheus.adoc[Link]
| 3.13.2
| 3.14.4
| quarkus-hibernate-orm
| https://quarkus.io/guides/hibernate-orm[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-hibernate-orm.adoc[Link]
| 3.13.2
| 3.14.4
| quarkus-rest
| https://quarkus.io/guides/rest[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-rest.adoc[Link]
| 3.13.2
| 3.14.4
| quarkus-rest-jackson
| https://quarkus.io/guides/rest-json[Link]
|
| 3.13.2
| 3.14.4
| quarkus-jdbc-postgresql
| https://quarkus.io/guides/datasource[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-jdbc-postgresql.adoc[Link]
| 3.13.2
| 3.14.4
| quarkus-smallrye-openapi
| https://quarkus.io/guides/openapi-swaggerui[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-smallrye-openapi.adoc[Link]
| 3.13.2
| 3.14.4
| quarkus-hibernate-validator
| https://quarkus.io/guides/validation[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-hibernate-validator.adoc[Link]
| 3.13.2
| 3.14.4
| quarkus-opentelemetry
| https://quarkus.io/guides/opentelemetry[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-opentelemetry.adoc[Link]
| 3.13.2
| 3.14.4
| tkit-quarkus-security
| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-security.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link]
| 2.32.0
| quarkus-container-image-docker
| https://quarkus.io/guides/container-image[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-container-image-docker.adoc[Link]
| 3.13.2
| 3.14.4
| onecx-security
|
|
| 0.26.0
| 0.30.0
| quarkus-smallrye-context-propagation
|
|
| 3.13.2
| 3.14.4
|===
32 changes: 17 additions & 15 deletions docs/modules/onecx-bookmark-svc/pages/onecx-bookmark-svc.adoc
Original file line number Diff line number Diff line change
@@ -1,63 +1,65 @@

:summaryTableId: onecx-bookmark-svc
[.configuration-legend]
icon:lock[title=Fixed at build time] Configuration property fixed at build time - All other configuration properties are overridable at runtime
[.configuration-reference.searchable, cols="80,.^10,.^10"]
|===

h|[[onecx-bookmark-svc_configuration]]link:#onecx-bookmark-svc_configuration[Configuration property]

h|[.header-title]##Configuration property##
h|Type
h|Default

a| [[onecx-bookmark-svc_onecx-bookmark-default-enabled]]`link:#onecx-bookmark-svc_onecx-bookmark-default-enabled[onecx.bookmark.default.enabled]`

a| [[onecx-bookmark-svc_onecx-bookmark-default-enabled]] [.property-path]##`onecx.bookmark.default.enabled`##

[.description]
--
Enable or disable default bookmark


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++ONECX_BOOKMARK_DEFAULT_ENABLED+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++ONECX_BOOKMARK_DEFAULT_ENABLED+++`
endif::add-copy-button-to-env-var[]
--|boolean
--
|boolean
|`false`


a| [[onecx-bookmark-svc_onecx-bookmark-default-url]]`link:#onecx-bookmark-svc_onecx-bookmark-default-url[onecx.bookmark.default.url]`

a| [[onecx-bookmark-svc_onecx-bookmark-default-url]] [.property-path]##`onecx.bookmark.default.url`##

[.description]
--
Default bookmark URL


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++ONECX_BOOKMARK_DEFAULT_URL+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++ONECX_BOOKMARK_DEFAULT_URL+++`
endif::add-copy-button-to-env-var[]
--|string
--
|string
|`https://github.com/onecx`


a| [[onecx-bookmark-svc_onecx-bookmark-product-item-id]]`link:#onecx-bookmark-svc_onecx-bookmark-product-item-id[onecx.bookmark.product-item-id]`

a| [[onecx-bookmark-svc_onecx-bookmark-product-item-id]] [.property-path]##`onecx.bookmark.product-item-id`##

[.description]
--
Default bookmark URL


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++ONECX_BOOKMARK_PRODUCT_ITEM_ID+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++ONECX_BOOKMARK_PRODUCT_ITEM_ID+++`
endif::add-copy-button-to-env-var[]
--|string
--
|string
|`PRODUCT_BASE_DOC_URL`

|===
|===


:!summaryTableId:
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,6 @@ public class Bookmark extends TraceableEntity {
@Enumerated(EnumType.STRING)
private Scope scope;

@Column(name = "POSITION", nullable = false)
private Integer position;
}
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
// package org.tkit.onecx.bookmark.rs.internal.log;
package org.tkit.onecx.bookmark.rs.internal.log;

// import java.util.List;
import java.util.List;

// import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.context.ApplicationScoped;

// import org.tkit.quarkus.log.cdi.LogParam;
import org.tkit.quarkus.log.cdi.LogParam;

// import gen.org.tkit.onecx.bookmark.rs.internal.model.BookmarkSearchCriteriaDTO;
// import gen.org.tkit.onecx.bookmark.rs.internal.model.CreateBookmarkDTO;
// import gen.org.tkit.onecx.bookmark.rs.internal.model.UpdateBookmarkDTO;
import gen.org.tkit.onecx.bookmark.rs.internal.model.BookmarkSearchCriteriaDTO;
import gen.org.tkit.onecx.bookmark.rs.internal.model.CreateBookmarkDTO;
import gen.org.tkit.onecx.bookmark.rs.internal.model.UpdateBookmarkDTO;

// @ApplicationScoped
// public class InternalLogParam implements LogParam {
@ApplicationScoped
public class InternalLogParam implements LogParam {

// @Override
// public List<Item> getClasses() {
// return List.of(
// item(10, CreateBookmarkDTO.class, x -> {
// CreateBookmarkDTO d = (CreateBookmarkDTO) x;
// return CreateBookmarkDTO.class.getSimpleName() + "[" + d.getProductName() + "," + d.getItemId() + "]";
// }),
// item(10, UpdateBookmarkDTO.class, x -> {
// UpdateBookmarkDTO d = (UpdateBookmarkDTO) x;
// return UpdateBookmarkDTO.class.getSimpleName() + "[" + d.getProductName() + "," + d.getItemId() + "]";
// }),
// item(10, BookmarkSearchCriteriaDTO.class, x -> {
// BookmarkSearchCriteriaDTO d = (BookmarkSearchCriteriaDTO) x;
// return BookmarkSearchCriteriaDTO.class.getSimpleName() + "[" + d.getPageNumber() + ","
// + d.getPageSize()
// + "]";
// }));
// }
// }
@Override
public List<Item> getClasses() {
return List.of(
item(10, CreateBookmarkDTO.class, x -> {
CreateBookmarkDTO d = (CreateBookmarkDTO) x;
return CreateBookmarkDTO.class.getSimpleName() + "[" + d.getProductName() + "," + d.getAppId() + "]";
}),
item(10, UpdateBookmarkDTO.class, x -> {
UpdateBookmarkDTO d = (UpdateBookmarkDTO) x;
return UpdateBookmarkDTO.class.getSimpleName() + "[" + d.getDisplayName() + "]";
}),
item(10, BookmarkSearchCriteriaDTO.class, x -> {
BookmarkSearchCriteriaDTO d = (BookmarkSearchCriteriaDTO) x;
return BookmarkSearchCriteriaDTO.class.getSimpleName() + "[" + d.getPageNumber() + ","
+ d.getPageSize()
+ "]";
}));
}
}
12 changes: 12 additions & 0 deletions src/main/openapi/onecx-bookmark-internal-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ components:
- appId
- scope
- workspaceName
- position
type: object
properties:
id:
Expand Down Expand Up @@ -201,6 +202,9 @@ components:
enum:
- PRIVATE
- PUBLIC
position:
format: int32
type: integer
BookmarkPageResult:
type: object
properties:
Expand Down Expand Up @@ -231,6 +235,7 @@ components:
- workspaceName
- productName
- scope
- position
type: object
properties:
displayName:
Expand Down Expand Up @@ -258,17 +263,24 @@ components:
enum:
- PRIVATE
- PUBLIC
position:
format: int32
type: integer
UpdateBookmark:
required:
- displayName
- modificationCount
- position
type: object
properties:
modificationCount:
format: int32
type: integer
displayName:
type: string
position:
format: int32
type: integer
ProblemDetailResponse:
type: object
properties:
Expand Down
Loading

0 comments on commit 2325ee2

Please sign in to comment.