[FIX] ready to deploy on maven central
This commit is contained in:
parent
8dde49adff
commit
9ebd37788d
40
pom.xml
40
pom.xml
@ -4,6 +4,8 @@
|
|||||||
<groupId>org.atria-soft</groupId>
|
<groupId>org.atria-soft</groupId>
|
||||||
<artifactId>archidata</artifactId>
|
<artifactId>archidata</artifactId>
|
||||||
<version>0.26.3-SNAPSHOT</version>
|
<version>0.26.3-SNAPSHOT</version>
|
||||||
|
<description>Wrapper to manage a simple interface for REST project to bind MySQL, SQLite or mongoDB.</description>
|
||||||
|
<url>https://github.com/kangaroo-and-rabbit/archidata</url>
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
<name>Mozilla Public License 2.0</name>
|
<name>Mozilla Public License 2.0</name>
|
||||||
@ -26,12 +28,6 @@
|
|||||||
<connection>scm:git:git://github.com/kangaroo-and-rabbit/archidata.git</connection>
|
<connection>scm:git:git://github.com/kangaroo-and-rabbit/archidata.git</connection>
|
||||||
<developerConnection>scm:git:ssh:github.com/kangaroo-and-rabbit/archidata.git</developerConnection>
|
<developerConnection>scm:git:ssh:github.com/kangaroo-and-rabbit/archidata.git</developerConnection>
|
||||||
</scm>
|
</scm>
|
||||||
<distributionManagement>
|
|
||||||
<repository>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
|
||||||
</repository>
|
|
||||||
</distributionManagement>
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -253,7 +249,7 @@
|
|||||||
<execution>
|
<execution>
|
||||||
<id>attach-sources</id>
|
<id>attach-sources</id>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>jar</goal>
|
<goal>jar-no-fork</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
@ -296,10 +292,14 @@
|
|||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>3.3.0</version>
|
<version>3.3.0</version>
|
||||||
<configuration>
|
<executions>
|
||||||
<show>private</show>
|
<execution>
|
||||||
<nohelp>true</nohelp>
|
<id>attach-javadocs</id>
|
||||||
</configuration>
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Check the style of the code -->
|
<!-- Check the style of the code -->
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -364,25 +364,23 @@
|
|||||||
<version>1.6</version>
|
<version>1.6</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
<id>sign-artifacts</id>
|
||||||
|
<phase>verify</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>sign</goal>
|
<goal>sign</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
<!-- Generate Java-docs As Part Of Project Reports -->
|
|
||||||
<reporting>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.sonatype.central</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>central-publishing-maven-plugin</artifactId>
|
||||||
<version>3.3.0</version>
|
<version>0.7.0</version>
|
||||||
|
<extensions>true</extensions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<show>public</show>
|
<publishingServerId>central</publishingServerId>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</reporting>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
@ -20,7 +20,7 @@ import java.lang.annotation.Target;
|
|||||||
* - When a field is annotated with @DataNotRead, it will not be included in the
|
* - When a field is annotated with @DataNotRead, it will not be included in the
|
||||||
* default data retrieval process from the database.
|
* default data retrieval process from the database.
|
||||||
* - To override this behavior and read all columns, including those marked with
|
* - 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.
|
||||||
*
|
*
|
||||||
* <p>Example:
|
* <p>Example:
|
||||||
* <pre>{@code
|
* <pre>{@code
|
||||||
|
@ -22,7 +22,8 @@ import java.lang.annotation.Target;
|
|||||||
* more flexible API designs where certain inputs can be omitted.
|
* more flexible API designs where certain inputs can be omitted.
|
||||||
*
|
*
|
||||||
* <p>Example:
|
* <p>Example:
|
||||||
* <pre>{@code
|
*
|
||||||
|
* {@code
|
||||||
* public class AlbumService {
|
* public class AlbumService {
|
||||||
*
|
*
|
||||||
* @POST
|
* @POST
|
||||||
@ -39,7 +40,8 @@ import java.lang.annotation.Target;
|
|||||||
* // some code
|
* // some code
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* }</pre>
|
* }
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* Note: @FormDataParam must be allway at the last position.
|
* 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.
|
* marked as optional, allowing the client to omit them when calling the API.
|
||||||
*
|
*
|
||||||
* <p>Generated TypeScript code example:
|
* <p>Generated TypeScript code example:
|
||||||
* <pre>{@code
|
*
|
||||||
|
* {@code
|
||||||
* //Add a cover on a specific album
|
* //Add a cover on a specific album
|
||||||
* export function uploadCover({
|
* export function uploadCover({
|
||||||
* restConfig,
|
* restConfig,
|
||||||
@ -64,10 +67,11 @@ import java.lang.annotation.Target;
|
|||||||
* uri?: string, // element is optional
|
* uri?: string, // element is optional
|
||||||
* },
|
* },
|
||||||
* callbacks?: RESTCallbacks,
|
* callbacks?: RESTCallbacks,
|
||||||
* }): Promise<Album> { ...
|
* }): Promise<Album> { ... }
|
||||||
* }</pre>
|
* }
|
||||||
*
|
*
|
||||||
* 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 })
|
@Target({ ElementType.PARAMETER })
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@ -25,7 +25,7 @@ import java.lang.annotation.Target;
|
|||||||
* the older XMLHttpRequest interface is utilized.
|
* the older XMLHttpRequest interface is utilized.
|
||||||
*
|
*
|
||||||
* <p>Example:
|
* <p>Example:
|
||||||
* <pre>{@code
|
* {@code
|
||||||
* public class SeasonService {
|
* public class SeasonService {
|
||||||
*
|
*
|
||||||
* @POST
|
* @POST
|
||||||
@ -41,13 +41,13 @@ import java.lang.annotation.Target;
|
|||||||
* // Upload logic
|
* // Upload logic
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* }</pre>
|
* }
|
||||||
*
|
*
|
||||||
* In this example, the uploadCover method will generate a client-side API
|
* In this example, the uploadCover method will generate a client-side API
|
||||||
* with progress tracking capabilities using XMLHttpRequest.
|
* with progress tracking capabilities using XMLHttpRequest.
|
||||||
*
|
*
|
||||||
* <p>Generated TypeScript code example:
|
* <p>Generated TypeScript code example:
|
||||||
* <pre>{@code
|
* {@code
|
||||||
* export function uploadCover({
|
* export function uploadCover({
|
||||||
* restConfig,
|
* restConfig,
|
||||||
* params,
|
* params,
|
||||||
@ -62,8 +62,9 @@ import java.lang.annotation.Target;
|
|||||||
* file: File,
|
* file: File,
|
||||||
* },
|
* },
|
||||||
* callbacks?: RESTCallbacks,
|
* callbacks?: RESTCallbacks,
|
||||||
* }): Promise<Season> {...
|
* }): Promise<Season> {...}
|
||||||
* }</pre>
|
* }
|
||||||
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Target({ ElementType.PARAMETER, ElementType.METHOD })
|
@Target({ ElementType.PARAMETER, ElementType.METHOD })
|
||||||
|
@ -185,7 +185,8 @@ public abstract class DBAccess implements Closeable {
|
|||||||
/** @param <T>
|
/** @param <T>
|
||||||
* @param data
|
* @param data
|
||||||
* @param id
|
* @param id
|
||||||
* @param filterValue
|
* @param updateColomn
|
||||||
|
* @param option
|
||||||
* @return the affected rows.
|
* @return the affected rows.
|
||||||
* @throws Exception */
|
* @throws Exception */
|
||||||
public <T, ID_TYPE> long update(
|
public <T, ID_TYPE> 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).
|
/** 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 clazz Data model that might remove element.
|
||||||
* @param condition Condition to remove elements.
|
* @param option (Optional) Options of the request.
|
||||||
* @param options (Optional) Options of the request.
|
|
||||||
* @return Number of element that is removed. */
|
* @return Number of element that is removed. */
|
||||||
public long deleteWhere(final Class<?> clazz, final QueryOption... option) throws Exception {
|
public long deleteWhere(final Class<?> clazz, final QueryOption... option) throws Exception {
|
||||||
final String hasDeletedFieldName = AnnotationTools.getDeletedFieldName(clazz);
|
final String hasDeletedFieldName = AnnotationTools.getDeletedFieldName(clazz);
|
||||||
|
@ -111,12 +111,6 @@ public class DataAccess {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @param <T>
|
|
||||||
* @param data
|
|
||||||
* @param id
|
|
||||||
* @param filterValue
|
|
||||||
* @return the affected rows.
|
|
||||||
* @throws Exception */
|
|
||||||
public static <T, ID_TYPE> long update(
|
public static <T, ID_TYPE> long update(
|
||||||
final T data,
|
final T data,
|
||||||
final ID_TYPE id,
|
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).
|
/** 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 clazz Data model that might remove element.
|
||||||
* @param condition Condition to remove elements.
|
|
||||||
* @param options (Optional) Options of the request.
|
* @param options (Optional) Options of the request.
|
||||||
* @return Number of element that is removed. */
|
* @return Number of element that is removed. */
|
||||||
public static long deleteWhere(final Class<?> clazz, final QueryOption... options) throws Exception {
|
public static long deleteWhere(final Class<?> clazz, final QueryOption... options) throws Exception {
|
||||||
|
@ -26,12 +26,6 @@ public interface DataAccessAddOn {
|
|||||||
* @return True of the field is manage by the current Add-on. */
|
* @return True of the field is manage by the current Add-on. */
|
||||||
boolean isCompatibleField(Field elem);
|
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(
|
void insertData(
|
||||||
final DBAccessMorphia ioDb,
|
final DBAccessMorphia ioDb,
|
||||||
final Field field,
|
final Field field,
|
||||||
@ -65,14 +59,7 @@ public interface DataAccessAddOn {
|
|||||||
throws Exception, SQLException, IllegalArgumentException, IllegalAccessException;
|
throws Exception, SQLException, IllegalArgumentException, IllegalAccessException;
|
||||||
|
|
||||||
/** Create associated table of the specific element.
|
/** 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(
|
void createTables(
|
||||||
String tableName,
|
String tableName,
|
||||||
final Field primaryField,
|
final Field primaryField,
|
||||||
|
@ -31,10 +31,9 @@ public interface DataAccessAddOn {
|
|||||||
boolean isCompatibleField(Field elem);
|
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.
|
/** 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 data The date to inject.
|
||||||
* @param iii The index of injection
|
* @param iii The index of injection
|
||||||
* @return the new index of injection in case of multiple value management
|
|
||||||
* @throws SQLException */
|
* @throws SQLException */
|
||||||
void insertData(final DBAccessSQL ioDb, PreparedStatement ps, final Field field, Object data, CountInOut iii)
|
void insertData(final DBAccessSQL ioDb, PreparedStatement ps, final Field field, Object data, CountInOut iii)
|
||||||
throws Exception, SQLException, IllegalArgumentException, IllegalAccessException;
|
throws Exception, SQLException, IllegalArgumentException, IllegalAccessException;
|
||||||
@ -76,9 +75,11 @@ public interface DataAccessAddOn {
|
|||||||
|
|
||||||
/** Create associated table of the specific element.
|
/** Create associated table of the specific element.
|
||||||
* @param tableName
|
* @param tableName
|
||||||
* @param elem
|
* @param primaryField
|
||||||
|
* @param field
|
||||||
* @param mainTableBuilder
|
* @param mainTableBuilder
|
||||||
* @param ListOtherTables
|
* @param preActionList
|
||||||
|
* @param postActionList
|
||||||
* @param createIfNotExist
|
* @param createIfNotExist
|
||||||
* @param createDrop
|
* @param createDrop
|
||||||
* @param fieldId
|
* @param fieldId
|
||||||
|
@ -172,7 +172,7 @@ public class MigrationEngine {
|
|||||||
|
|
||||||
/** Process the automatic migration of the system
|
/** Process the automatic migration of the system
|
||||||
* @param config SQL connection for the migration
|
* @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",
|
@SuppressFBWarnings({ "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING",
|
||||||
"SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" })
|
"SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" })
|
||||||
public void migrateErrorThrow(final DbConfig config) throws MigrationException {
|
public void migrateErrorThrow(final DbConfig config) throws MigrationException {
|
||||||
|
@ -13,7 +13,7 @@ public interface MigrationInterface {
|
|||||||
* @param log Stored data in the BDD for the migration progression.
|
* @param log Stored data in the BDD for the migration progression.
|
||||||
* @param migration Migration post data on each step...
|
* @param migration Migration post data on each step...
|
||||||
* @return true if migration is finished. */
|
* @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.
|
/** Remove a migration the system to the previous version.
|
||||||
* @param entry DB interface for the migration.
|
* @param entry DB interface for the migration.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user