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