[DEV] correct json serialization
This commit is contained in:
parent
0ea9895024
commit
fd6de65759
@ -22,7 +22,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>
|
||||||
|
|
||||||
|
@ -21,6 +21,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.filter.AuthenticationFilter;
|
import org.kar.archidata.filter.AuthenticationFilter;
|
||||||
import org.kar.archidata.filter.CORSFilter;
|
import org.kar.archidata.filter.CORSFilter;
|
||||||
import org.kar.archidata.filter.OptionFilter;
|
import org.kar.archidata.filter.OptionFilter;
|
||||||
@ -66,6 +70,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(AlbumResource.class);
|
rc.registerClasses(AlbumResource.class);
|
||||||
|
@ -12,17 +12,15 @@ CREATE TABLE `node` (
|
|||||||
) AUTO_INCREMENT=10;
|
) AUTO_INCREMENT=10;
|
||||||
*/
|
*/
|
||||||
import java.sql.Date;
|
import java.sql.Date;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.kar.archidata.annotation.SQLIfNotExists;
|
import org.kar.archidata.annotation.SQLIfNotExists;
|
||||||
import org.kar.archidata.annotation.SQLTableName;
|
import org.kar.archidata.annotation.SQLTableName;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
|
||||||
@SQLTableName ("album")
|
@SQLTableName ("album")
|
||||||
@SQLIfNotExists
|
@SQLIfNotExists
|
||||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class Album extends NodeSmall {
|
public class Album extends NodeSmall {
|
||||||
public Date publication = null;
|
public Date publication = null;
|
||||||
}
|
}
|
||||||
|
@ -17,13 +17,13 @@ import org.kar.archidata.annotation.SQLIfNotExists;
|
|||||||
import org.kar.archidata.annotation.SQLLimitSize;
|
import org.kar.archidata.annotation.SQLLimitSize;
|
||||||
import org.kar.archidata.annotation.SQLTableName;
|
import org.kar.archidata.annotation.SQLTableName;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
import java.sql.Date;
|
import java.sql.Date;
|
||||||
|
|
||||||
@SQLTableName ("artist")
|
@SQLTableName ("artist")
|
||||||
@SQLIfNotExists
|
@SQLIfNotExists
|
||||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class Artist extends NodeSmall {
|
public class Artist extends NodeSmall {
|
||||||
@SQLLimitSize(256)
|
@SQLLimitSize(256)
|
||||||
public String firstName = null;
|
public String firstName = null;
|
||||||
|
@ -12,16 +12,14 @@ CREATE TABLE `node` (
|
|||||||
) AUTO_INCREMENT=10;
|
) AUTO_INCREMENT=10;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
|
|
||||||
import org.kar.archidata.annotation.SQLIfNotExists;
|
import org.kar.archidata.annotation.SQLIfNotExists;
|
||||||
import org.kar.archidata.annotation.SQLTableName;
|
import org.kar.archidata.annotation.SQLTableName;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
@SQLTableName ("gender")
|
@SQLTableName ("gender")
|
||||||
@SQLIfNotExists
|
@SQLIfNotExists
|
||||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class Gender extends NodeSmall {
|
public class Gender extends NodeSmall {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
|
||||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class MediaSmall {
|
public class MediaSmall {
|
||||||
public class MediaStreamProperty {
|
public class MediaStreamProperty {
|
||||||
public Long id;
|
public Long id;
|
||||||
|
@ -18,6 +18,9 @@ import org.kar.archidata.annotation.SQLLimitSize;
|
|||||||
import org.kar.archidata.annotation.SQLTableLinkGeneric;
|
import org.kar.archidata.annotation.SQLTableLinkGeneric;
|
||||||
import org.kar.archidata.model.GenericTable;
|
import org.kar.archidata.model.GenericTable;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class NodeSmall extends GenericTable {
|
public class NodeSmall extends GenericTable {
|
||||||
@SQLLimitSize(256)
|
@SQLLimitSize(256)
|
||||||
public String name = null;
|
public String name = null;
|
||||||
|
@ -18,11 +18,11 @@ import org.kar.archidata.annotation.SQLIfNotExists;
|
|||||||
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 com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
@SQLTableName ("playlist")
|
@SQLTableName ("playlist")
|
||||||
@SQLIfNotExists
|
@SQLIfNotExists
|
||||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class Playlist extends NodeSmall {
|
public class Playlist extends NodeSmall {
|
||||||
@SQLTableLinkGeneric
|
@SQLTableLinkGeneric
|
||||||
public List<Long> tracks = null;
|
public List<Long> tracks = null;
|
||||||
|
@ -18,11 +18,11 @@ import org.kar.archidata.annotation.SQLIfNotExists;
|
|||||||
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 com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
@SQLTableName ("track")
|
@SQLTableName ("track")
|
||||||
@SQLIfNotExists
|
@SQLIfNotExists
|
||||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class Track extends NodeSmall {
|
public class Track extends NodeSmall {
|
||||||
public Long genderId = null;
|
public Long genderId = null;
|
||||||
public Long albumId = null;
|
public Long albumId = null;
|
||||||
|
@ -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 UserKarusic extends User {
|
public class UserKarusic extends User {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="generic-page">
|
<div class="generic-page">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
Karideo Settings
|
Karusic Settings
|
||||||
</div>
|
</div>
|
||||||
<div class="fill-all colomn_mutiple">
|
<div class="fill-all colomn_mutiple">
|
||||||
Global settings.
|
Global settings.
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ArianeService } from 'app/service';
|
import { ArianeService } from 'app/service';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-settings',
|
selector: 'app-settings',
|
||||||
templateUrl: './settings.html',
|
templateUrl: './settings.html',
|
||||||
@ -19,7 +21,6 @@ export class SettingsScene implements OnInit {
|
|||||||
private arianeService: ArianeService) {
|
private arianeService: ArianeService) {
|
||||||
// nothing to do.
|
// nothing to do.
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.error(`MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM`);
|
console.error(`MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM`);
|
||||||
console.error(`get parameter update: ${this.page}`);
|
console.error(`get parameter update: ${this.page}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user