From 9ebd37788d488bb76a5eb23f3cc9082c6c696afa Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 3 Apr 2025 10:29:56 +0200 Subject: [PATCH] [FIX] ready to deploy on maven central --- pom.xml | 40 +++++++++---------- .../kar/archidata/annotation/DataNotRead.java | 2 +- .../apiGenerator/ApiInputOptional.java | 16 +++++--- .../apiGenerator/ApiTypeScriptProgress.java | 11 ++--- .../kar/archidata/dataAccess/DBAccess.java | 6 +-- .../kar/archidata/dataAccess/DataAccess.java | 7 ---- .../addOnMongo/DataAccessAddOn.java | 15 +------ .../dataAccess/addOnSQL/DataAccessAddOn.java | 9 +++-- .../archidata/migration/MigrationEngine.java | 2 +- .../migration/MigrationInterface.java | 2 +- 10 files changed, 47 insertions(+), 63 deletions(-) diff --git a/pom.xml b/pom.xml index 4e7f14c..ae3bd80 100644 --- a/pom.xml +++ b/pom.xml @@ -4,6 +4,8 @@ org.atria-soft archidata 0.26.3-SNAPSHOT + Wrapper to manage a simple interface for REST project to bind MySQL, SQLite or mongoDB. + https://github.com/kangaroo-and-rabbit/archidata Mozilla Public License 2.0 @@ -26,12 +28,6 @@ scm:git:git://github.com/kangaroo-and-rabbit/archidata.git scm:git:ssh:github.com/kangaroo-and-rabbit/archidata.git - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - @@ -253,7 +249,7 @@ attach-sources - jar + jar-no-fork @@ -296,10 +292,14 @@ org.apache.maven.plugins maven-javadoc-plugin 3.3.0 - - private - true - + + + attach-javadocs + + jar + + + @@ -364,25 +364,23 @@ 1.6 + sign-artifacts + verify sign - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.3.0 + org.sonatype.central + central-publishing-maven-plugin + 0.7.0 + true - public + central - + diff --git a/src/org/kar/archidata/annotation/DataNotRead.java b/src/org/kar/archidata/annotation/DataNotRead.java index eb9e538..d4ab107 100644 --- a/src/org/kar/archidata/annotation/DataNotRead.java +++ b/src/org/kar/archidata/annotation/DataNotRead.java @@ -20,7 +20,7 @@ import java.lang.annotation.Target; * - When a field is annotated with @DataNotRead, it will not be included in the * default data retrieval process from the database. * - To override this behavior and read all columns, including those marked with - * @DataNotRead, the query must include the option ReadAllColumn. + * `@DataNotRead`, the query must include the option ReadAllColumn. * *

Example: *

{@code
diff --git a/src/org/kar/archidata/annotation/apiGenerator/ApiInputOptional.java b/src/org/kar/archidata/annotation/apiGenerator/ApiInputOptional.java
index c280b80..6e3b6bd 100644
--- a/src/org/kar/archidata/annotation/apiGenerator/ApiInputOptional.java
+++ b/src/org/kar/archidata/annotation/apiGenerator/ApiInputOptional.java
@@ -22,7 +22,8 @@ import java.lang.annotation.Target;
  *   more flexible API designs where certain inputs can be omitted.
  *
  * 

Example: - *

{@code
+ *
+ * {@code
  * public class AlbumService {
  *
  *     @POST
@@ -39,7 +40,8 @@ import java.lang.annotation.Target;
  *         // some code
  *     }
  * }
- * }
+ * } + * * * Note: @FormDataParam must be allway at the last position. * @@ -47,7 +49,8 @@ import java.lang.annotation.Target; * marked as optional, allowing the client to omit them when calling the API. * *

Generated TypeScript code example: - *

{@code
+ *
+ * {@code
  * //Add a cover on a specific album
  * export function uploadCover({
  *     restConfig,
@@ -64,10 +67,11 @@ import java.lang.annotation.Target;
  *         uri?: string, // element is optional
  *     },
  *     callbacks?: RESTCallbacks,
- * }): Promise { ...
- * }
+ * }): Promise { ... } + * } * - * The generated TypeScript function reflects the optional nature of the form data parameters. + * + * The generated TypeScript function reflects the optional nature of the form data parameters */ @Target({ ElementType.PARAMETER }) @Retention(RetentionPolicy.RUNTIME) diff --git a/src/org/kar/archidata/annotation/apiGenerator/ApiTypeScriptProgress.java b/src/org/kar/archidata/annotation/apiGenerator/ApiTypeScriptProgress.java index b9f57b8..4ae3c11 100644 --- a/src/org/kar/archidata/annotation/apiGenerator/ApiTypeScriptProgress.java +++ b/src/org/kar/archidata/annotation/apiGenerator/ApiTypeScriptProgress.java @@ -25,7 +25,7 @@ import java.lang.annotation.Target; * the older XMLHttpRequest interface is utilized. * *

Example: - *

{@code
+ * {@code
  * public class SeasonService {
  *
  *     @POST
@@ -41,13 +41,13 @@ import java.lang.annotation.Target;
  *         // Upload logic
  *     }
  * }
- * }
+ * } * * In this example, the uploadCover method will generate a client-side API * with progress tracking capabilities using XMLHttpRequest. * *

Generated TypeScript code example: - *

{@code
+ * {@code
  * export function uploadCover({
  *        restConfig,
  *        params,
@@ -62,8 +62,9 @@ import java.lang.annotation.Target;
  *        file: File,
  *    },
  *    callbacks?: RESTCallbacks,
- * }): Promise {...
- * }
+ * }): Promise {...} + * } + * * */ @Target({ ElementType.PARAMETER, ElementType.METHOD }) diff --git a/src/org/kar/archidata/dataAccess/DBAccess.java b/src/org/kar/archidata/dataAccess/DBAccess.java index 5c7be2f..853126e 100644 --- a/src/org/kar/archidata/dataAccess/DBAccess.java +++ b/src/org/kar/archidata/dataAccess/DBAccess.java @@ -185,7 +185,8 @@ public abstract class DBAccess implements Closeable { /** @param * @param data * @param id - * @param filterValue + * @param updateColomn + * @param option * @return the affected rows. * @throws Exception */ public long update( @@ -300,8 +301,7 @@ public abstract class DBAccess implements Closeable { /** Delete items with the specific condition and some options. If the Entity is manage as a softDeleted model, then it is flag as removed (if not already done before). * @param clazz Data model that might remove element. - * @param condition Condition to remove elements. - * @param options (Optional) Options of the request. + * @param option (Optional) Options of the request. * @return Number of element that is removed. */ public long deleteWhere(final Class clazz, final QueryOption... option) throws Exception { final String hasDeletedFieldName = AnnotationTools.getDeletedFieldName(clazz); diff --git a/src/org/kar/archidata/dataAccess/DataAccess.java b/src/org/kar/archidata/dataAccess/DataAccess.java index 09eef67..7e99fd9 100644 --- a/src/org/kar/archidata/dataAccess/DataAccess.java +++ b/src/org/kar/archidata/dataAccess/DataAccess.java @@ -111,12 +111,6 @@ public class DataAccess { } } - /** @param - * @param data - * @param id - * @param filterValue - * @return the affected rows. - * @throws Exception */ public static long update( final T data, final ID_TYPE id, @@ -225,7 +219,6 @@ public class DataAccess { /** Delete items with the specific condition and some options. If the Entity is manage as a softDeleted model, then it is flag as removed (if not already done before). * @param clazz Data model that might remove element. - * @param condition Condition to remove elements. * @param options (Optional) Options of the request. * @return Number of element that is removed. */ public static long deleteWhere(final Class clazz, final QueryOption... options) throws Exception { diff --git a/src/org/kar/archidata/dataAccess/addOnMongo/DataAccessAddOn.java b/src/org/kar/archidata/dataAccess/addOnMongo/DataAccessAddOn.java index d3e1dbc..af23a55 100644 --- a/src/org/kar/archidata/dataAccess/addOnMongo/DataAccessAddOn.java +++ b/src/org/kar/archidata/dataAccess/addOnMongo/DataAccessAddOn.java @@ -26,12 +26,6 @@ public interface DataAccessAddOn { * @return True of the field is manage by the current Add-on. */ boolean isCompatibleField(Field elem); - /** Insert data in the specific field (the field must be in the current db, otherwiise it does not work at all. - * @param ps DB statement interface. - * @param data The date to inject. - * @param iii The index of injection - * @return the new index of injection in case of multiple value management - * @throws SQLException */ void insertData( final DBAccessMorphia ioDb, final Field field, @@ -65,14 +59,7 @@ public interface DataAccessAddOn { throws Exception, SQLException, IllegalArgumentException, IllegalAccessException; /** Create associated table of the specific element. - * @param tableName - * @param elem - * @param mainTableBuilder - * @param ListOtherTables - * @param createIfNotExist - * @param createDrop - * @param fieldId - * @throws Exception */ + */ void createTables( String tableName, final Field primaryField, diff --git a/src/org/kar/archidata/dataAccess/addOnSQL/DataAccessAddOn.java b/src/org/kar/archidata/dataAccess/addOnSQL/DataAccessAddOn.java index 8b80c55..710407f 100644 --- a/src/org/kar/archidata/dataAccess/addOnSQL/DataAccessAddOn.java +++ b/src/org/kar/archidata/dataAccess/addOnSQL/DataAccessAddOn.java @@ -31,10 +31,9 @@ public interface DataAccessAddOn { boolean isCompatibleField(Field elem); /** Insert data in the specific field (the field must be in the current db, otherwiise it does not work at all. - * @param ps DB statement interface. + * @param ioDb DB statement interface. * @param data The date to inject. * @param iii The index of injection - * @return the new index of injection in case of multiple value management * @throws SQLException */ void insertData(final DBAccessSQL ioDb, PreparedStatement ps, final Field field, Object data, CountInOut iii) throws Exception, SQLException, IllegalArgumentException, IllegalAccessException; @@ -76,9 +75,11 @@ public interface DataAccessAddOn { /** Create associated table of the specific element. * @param tableName - * @param elem + * @param primaryField + * @param field * @param mainTableBuilder - * @param ListOtherTables + * @param preActionList + * @param postActionList * @param createIfNotExist * @param createDrop * @param fieldId diff --git a/src/org/kar/archidata/migration/MigrationEngine.java b/src/org/kar/archidata/migration/MigrationEngine.java index d22d78e..d1d587c 100644 --- a/src/org/kar/archidata/migration/MigrationEngine.java +++ b/src/org/kar/archidata/migration/MigrationEngine.java @@ -172,7 +172,7 @@ public class MigrationEngine { /** Process the automatic migration of the system * @param config SQL connection for the migration - * @throws IOException Error if access on the DB */ + * @throws MigrationException Error if access on the DB */ @SuppressFBWarnings({ "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING", "SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" }) public void migrateErrorThrow(final DbConfig config) throws MigrationException { diff --git a/src/org/kar/archidata/migration/MigrationInterface.java b/src/org/kar/archidata/migration/MigrationInterface.java index 1243f38..85a05d7 100644 --- a/src/org/kar/archidata/migration/MigrationInterface.java +++ b/src/org/kar/archidata/migration/MigrationInterface.java @@ -13,7 +13,7 @@ public interface MigrationInterface { * @param log Stored data in the BDD for the migration progression. * @param migration Migration post data on each step... * @return true if migration is finished. */ - boolean applyMigration(DBAccess entry, StringBuilder log, Migration model) throws Exception; + boolean applyMigration(DBAccess entry, StringBuilder log, Migration migration) throws Exception; /** Remove a migration the system to the previous version. * @param entry DB interface for the migration.