File tree Expand file tree Collapse file tree 15 files changed +183
-17
lines changed
api/src/main/java/com/jfrog/bintray/client/api
impl/src/main/java/com/jfrog/bintray/client/impl/model Expand file tree Collapse file tree 15 files changed +183
-17
lines changed Original file line number Diff line number Diff line change 11package com .jfrog .bintray .client .api .details ;
22
33import com .jfrog .bintray .client .api .ObjectMapperHelper ;
4- import org .codehaus .jackson .annotate .JsonCreator ;
5- import org .codehaus .jackson .annotate .JsonIgnore ;
6- import org .codehaus .jackson .annotate .JsonIgnoreProperties ;
7- import org .codehaus .jackson .annotate .JsonProperty ;
4+ import org .codehaus .jackson .annotate .*;
85import org .codehaus .jackson .map .ObjectMapper ;
96import org .joda .time .DateTime ;
107
8+ import java .util .HashMap ;
119import java .util .List ;
10+ import java .util .Map ;
1211
1312/**
1413 * This class is used to serialize and deserialize the needed json to
@@ -70,10 +69,22 @@ public class PackageDetails {
7069 private List <String > systemIds ;
7170 @ JsonProperty (value = "vcs_url" )
7271 private String vcsUrl ;
73-
7472 @ JsonIgnore
7573 private List <Attribute > attributes ;
7674
75+ //All other props that don't have specific fields
76+ private Map <String , Object > other = new HashMap <>();
77+
78+ @ JsonAnySetter
79+ public void set (String name , Object value ) {
80+ other .put (name , value );
81+ }
82+
83+ @ JsonAnyGetter
84+ public Map <String , Object > other () {
85+ return other ;
86+ }
87+
7788 @ JsonCreator
7889 public PackageDetails () {
7990 }
Original file line number Diff line number Diff line change 11package com .jfrog .bintray .client .api .details ;
22
33import com .jfrog .bintray .client .api .ObjectMapperHelper ;
4- import org .codehaus .jackson .annotate .JsonIgnore ;
5- import org .codehaus .jackson .annotate .JsonIgnoreProperties ;
6- import org .codehaus .jackson .annotate .JsonProperty ;
4+ import org .codehaus .jackson .annotate .*;
75import org .codehaus .jackson .map .ObjectMapper ;
86import org .joda .time .DateTime ;
97
8+ import java .util .HashMap ;
109import java .util .List ;
10+ import java .util .Map ;
1111
1212/**
1313 * This class is used to serialize and deserialize the needed json to
@@ -40,6 +40,19 @@ public class ProductDetails {
4040 @ JsonProperty (value = "sign_url_expiry" )
4141 Integer signUrlExpiry ;
4242
43+ //All other props that don't have specific fields
44+ private Map <String , Object > other = new HashMap <>();
45+
46+ @ JsonAnySetter
47+ public void set (String name , Object value ) {
48+ other .put (name , value );
49+ }
50+
51+ @ JsonAnyGetter
52+ public Map <String , Object > other () {
53+ return other ;
54+ }
55+
4356 public String getName () {
4457 return name ;
4558 }
Original file line number Diff line number Diff line change 11package com .jfrog .bintray .client .api .details ;
22
33import com .jfrog .bintray .client .api .ObjectMapperHelper ;
4- import org .codehaus .jackson .annotate .JsonIgnore ;
5- import org .codehaus .jackson .annotate .JsonIgnoreProperties ;
6- import org .codehaus .jackson .annotate .JsonProperty ;
4+ import org .codehaus .jackson .annotate .*;
75import org .codehaus .jackson .map .ObjectMapper ;
86import org .joda .time .DateTime ;
97
8+ import java .util .HashMap ;
109import java .util .List ;
10+ import java .util .Map ;
1111
1212/**
1313 * This class is used to serialize and deserialize the needed json to
@@ -42,6 +42,19 @@ public class RepositoryDetails {
4242 @ JsonIgnore
4343 Boolean updateExisting ; //Property is not used in the Bintray API but Artifactory uses is in it's Bintray integration
4444
45+ //All other props that don't have specific fields
46+ private Map <String , Object > other = new HashMap <>();
47+
48+ @ JsonAnySetter
49+ public void set (String name , Object value ) {
50+ other .put (name , value );
51+ }
52+
53+ @ JsonAnyGetter
54+ public Map <String , Object > other () {
55+ return other ;
56+ }
57+
4558 public static ObjectMapper getObjectMapper () {
4659 return ObjectMapperHelper .get ();
4760 }
Original file line number Diff line number Diff line change 11package com .jfrog .bintray .client .api .details ;
22
33import com .jfrog .bintray .client .api .ObjectMapperHelper ;
4+ import org .codehaus .jackson .annotate .JsonAnyGetter ;
5+ import org .codehaus .jackson .annotate .JsonAnySetter ;
46import org .codehaus .jackson .annotate .JsonIgnoreProperties ;
57import org .codehaus .jackson .annotate .JsonProperty ;
68import org .codehaus .jackson .map .ObjectMapper ;
79import org .joda .time .DateTime ;
810
11+ import java .util .HashMap ;
912import java .util .List ;
13+ import java .util .Map ;
1014
1115/**
1216 * This class is used to serialize and deserialize the needed json to
@@ -35,6 +39,19 @@ public class SubjectDetails {
3539 @ JsonProperty ("quota_used_bytes" )
3640 Long quotaUsedBytes ;
3741
42+ //All other props that don't have specific fields
43+ private Map <String , Object > other = new HashMap <>();
44+
45+ @ JsonAnySetter
46+ public void set (String name , Object value ) {
47+ other .put (name , value );
48+ }
49+
50+ @ JsonAnyGetter
51+ public Map <String , Object > other () {
52+ return other ;
53+ }
54+
3855 public static ObjectMapper getObjectMapper () {
3956 return ObjectMapperHelper .get ();
4057 }
Original file line number Diff line number Diff line change 11package com .jfrog .bintray .client .api .details ;
22
33import com .jfrog .bintray .client .api .ObjectMapperHelper ;
4- import org .codehaus .jackson .annotate .JsonIgnore ;
5- import org .codehaus .jackson .annotate .JsonIgnoreProperties ;
6- import org .codehaus .jackson .annotate .JsonProperty ;
4+ import org .codehaus .jackson .annotate .*;
75import org .codehaus .jackson .map .ObjectMapper ;
86import org .joda .time .DateTime ;
97
8+ import java .util .HashMap ;
109import java .util .List ;
10+ import java .util .Map ;
1111
1212/**
1313 * This class is used to serialize and deserialize the needed json to
@@ -54,6 +54,19 @@ public class VersionDetails {
5454 @ JsonProperty ("vcs_tag" )
5555 private String vcsTag ;
5656
57+ //All other props that don't have specific fields
58+ private Map <String , Object > other = new HashMap <>();
59+
60+ @ JsonAnySetter
61+ public void set (String name , Object value ) {
62+ other .put (name , value );
63+ }
64+
65+ @ JsonAnyGetter
66+ public Map <String , Object > other () {
67+ return other ;
68+ }
69+
5770 public VersionDetails () {
5871
5972 }
Original file line number Diff line number Diff line change @@ -38,4 +38,6 @@ public interface Pkg {
3838 List <String > linkedToRepos ();
3939
4040 List <String > systemIds ();
41+
42+ Object getFieldByKey (String key );
4143}
Original file line number Diff line number Diff line change @@ -24,4 +24,6 @@ public interface Product {
2424 List <String > getPackages ();
2525
2626 List <String > getVersions ();
27+
28+ Object getFieldByKey (String key );
2729}
Original file line number Diff line number Diff line change @@ -13,11 +13,19 @@ public interface Repository {
1313
1414 String getOwner ();
1515
16+ String getType ();
17+
18+ Boolean isPrivate ();
19+
20+ Boolean isPremium ();
21+
1622 String getDesc ();
1723
1824 List <String > getLabels ();
1925
2026 DateTime getCreated ();
2127
2228 Integer getPackageCount ();
29+
30+ Object getFieldByKey (String key );
2331}
Original file line number Diff line number Diff line change @@ -24,4 +24,6 @@ public interface Subject {
2424 DateTime getRegistered ();
2525
2626 Long getQuotaUsedBytes ();
27+
28+ Object getFieldByKey (String key );
2729}
Original file line number Diff line number Diff line change @@ -32,4 +32,6 @@ public interface Version {
3232 Integer ordinal ();
3333
3434 String vcsTag ();
35+
36+ Object getFieldByKey (String key );
3537}
You can’t perform that action at this time.
0 commit comments