[Add return error standard and corect xml serialisation
This commit is contained in:
parent
b6def9d2ff
commit
7ab588cb38
@ -26,7 +26,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>kangaroo-and-rabbit</groupId>
|
<groupId>kangaroo-and-rabbit</groupId>
|
||||||
<artifactId>archidata</artifactId>
|
<artifactId>archidata</artifactId>
|
||||||
<version>0.1.3</version>
|
<version>0.3.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -14,6 +14,10 @@ import org.kar.archidata.GlobalConfiguration;
|
|||||||
import org.kar.archidata.SqlWrapper;
|
import org.kar.archidata.SqlWrapper;
|
||||||
import org.kar.archidata.UpdateJwtPublicKey;
|
import org.kar.archidata.UpdateJwtPublicKey;
|
||||||
import org.kar.archidata.api.DataResource;
|
import org.kar.archidata.api.DataResource;
|
||||||
|
import org.kar.archidata.catcher.ExceptionCatcher;
|
||||||
|
import org.kar.archidata.catcher.FailExceptionCatcher;
|
||||||
|
import org.kar.archidata.catcher.InputExceptionCatcher;
|
||||||
|
import org.kar.archidata.catcher.SystemExceptionCatcher;
|
||||||
import org.kar.archidata.db.DBConfig;
|
import org.kar.archidata.db.DBConfig;
|
||||||
import org.kar.archidata.filter.AuthenticationFilter;
|
import org.kar.archidata.filter.AuthenticationFilter;
|
||||||
import org.kar.archidata.filter.CORSFilter;
|
import org.kar.archidata.filter.CORSFilter;
|
||||||
@ -65,6 +69,11 @@ public class WebLauncher {
|
|||||||
rc.register(new CORSFilter());
|
rc.register(new CORSFilter());
|
||||||
// global authentication system
|
// global authentication system
|
||||||
rc.registerClasses(AuthenticationFilter.class);
|
rc.registerClasses(AuthenticationFilter.class);
|
||||||
|
// register exception catcher
|
||||||
|
rc.register(InputExceptionCatcher.class);
|
||||||
|
rc.register(SystemExceptionCatcher.class);
|
||||||
|
rc.register(FailExceptionCatcher.class);
|
||||||
|
rc.register(ExceptionCatcher.class);
|
||||||
// add default resource:
|
// add default resource:
|
||||||
rc.registerClasses(UserResource.class);
|
rc.registerClasses(UserResource.class);
|
||||||
rc.registerClasses(SeriesResource.class);
|
rc.registerClasses(SeriesResource.class);
|
||||||
|
@ -10,12 +10,12 @@ import org.kar.archidata.annotation.SQLTableLinkGeneric;
|
|||||||
import org.kar.archidata.annotation.SQLTableName;
|
import org.kar.archidata.annotation.SQLTableName;
|
||||||
import org.kar.archidata.model.GenericTable;
|
import org.kar.archidata.model.GenericTable;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
|
||||||
@SQLTableName ("media")
|
@SQLTableName ("media")
|
||||||
@SQLIfNotExists
|
@SQLIfNotExists
|
||||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class Media extends GenericTable {
|
public class Media extends GenericTable {
|
||||||
@SQLNotNull
|
@SQLNotNull
|
||||||
@SQLComment("Name of the media (this represent the title)")
|
@SQLComment("Name of the media (this represent the title)")
|
||||||
|
@ -10,12 +10,12 @@ import org.kar.archidata.annotation.SQLTableLinkGeneric;
|
|||||||
import org.kar.archidata.annotation.SQLTableName;
|
import org.kar.archidata.annotation.SQLTableName;
|
||||||
import org.kar.archidata.model.GenericTable;
|
import org.kar.archidata.model.GenericTable;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
|
||||||
@SQLTableName ("season")
|
@SQLTableName ("season")
|
||||||
@SQLIfNotExists
|
@SQLIfNotExists
|
||||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class Season extends GenericTable {
|
public class Season extends GenericTable {
|
||||||
@SQLNotNull
|
@SQLNotNull
|
||||||
@SQLComment("Name of the media (this represent the title)")
|
@SQLComment("Name of the media (this represent the title)")
|
||||||
|
@ -10,12 +10,12 @@ import org.kar.archidata.annotation.SQLTableLinkGeneric;
|
|||||||
import org.kar.archidata.annotation.SQLTableName;
|
import org.kar.archidata.annotation.SQLTableName;
|
||||||
import org.kar.archidata.model.GenericTable;
|
import org.kar.archidata.model.GenericTable;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
|
||||||
@SQLTableName ("series")
|
@SQLTableName ("series")
|
||||||
@SQLIfNotExists
|
@SQLIfNotExists
|
||||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class Series extends GenericTable {
|
public class Series extends GenericTable {
|
||||||
@SQLNotNull
|
@SQLNotNull
|
||||||
@SQLComment("Name of the media (this represent the title)")
|
@SQLComment("Name of the media (this represent the title)")
|
||||||
|
@ -3,19 +3,18 @@ package org.kar.karideo.model;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.kar.archidata.annotation.SQLComment;
|
import org.kar.archidata.annotation.SQLComment;
|
||||||
import org.kar.archidata.annotation.SQLForeignKey;
|
|
||||||
import org.kar.archidata.annotation.SQLIfNotExists;
|
import org.kar.archidata.annotation.SQLIfNotExists;
|
||||||
import org.kar.archidata.annotation.SQLNotNull;
|
import org.kar.archidata.annotation.SQLNotNull;
|
||||||
import org.kar.archidata.annotation.SQLTableLinkGeneric;
|
import org.kar.archidata.annotation.SQLTableLinkGeneric;
|
||||||
import org.kar.archidata.annotation.SQLTableName;
|
import org.kar.archidata.annotation.SQLTableName;
|
||||||
import org.kar.archidata.model.GenericTable;
|
import org.kar.archidata.model.GenericTable;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
|
||||||
@SQLTableName ("type")
|
@SQLTableName ("type")
|
||||||
@SQLIfNotExists
|
@SQLIfNotExists
|
||||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class Type extends GenericTable {
|
public class Type extends GenericTable {
|
||||||
@SQLNotNull
|
@SQLNotNull
|
||||||
@SQLComment("Name of the media (this represent the title)")
|
@SQLComment("Name of the media (this represent the title)")
|
||||||
|
@ -4,11 +4,11 @@ import org.kar.archidata.annotation.SQLIfNotExists;
|
|||||||
import org.kar.archidata.annotation.SQLTableName;
|
import org.kar.archidata.annotation.SQLTableName;
|
||||||
import org.kar.archidata.model.User;
|
import org.kar.archidata.model.User;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
@SQLTableName ("user")
|
@SQLTableName ("user")
|
||||||
@SQLIfNotExists
|
@SQLIfNotExists
|
||||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class UserKarideo extends User {
|
public class UserKarideo extends User {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user