Skip to content

Commit 27335ea

Browse files
authored
Merge pull request #90 from reshmabidikar/pojos-for-plugin-api
POJOs for plugin-api
2 parents a7ea000 + 33aa89e commit 27335ea

72 files changed

Lines changed: 8019 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,26 @@
185185
</exclusion>
186186
</exclusions>
187187
</dependency>
188+
<dependency>
189+
<groupId>org.kill-bill.billing.plugin</groupId>
190+
<artifactId>killbill-plugin-api-catalog</artifactId>
191+
<scope>provided</scope>
192+
</dependency>
188193
<dependency>
189194
<groupId>org.kill-bill.billing.plugin</groupId>
190195
<artifactId>killbill-plugin-api-control</artifactId>
191196
<scope>provided</scope>
192197
</dependency>
198+
<dependency>
199+
<groupId>org.kill-bill.billing.plugin</groupId>
200+
<artifactId>killbill-plugin-api-currency</artifactId>
201+
<scope>provided</scope>
202+
</dependency>
203+
<dependency>
204+
<groupId>org.kill-bill.billing.plugin</groupId>
205+
<artifactId>killbill-plugin-api-entitlement</artifactId>
206+
<scope>provided</scope>
207+
</dependency>
193208
<dependency>
194209
<groupId>org.kill-bill.billing.plugin</groupId>
195210
<artifactId>killbill-plugin-api-invoice</artifactId>
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/*
2+
* Generated by https://github.com/killbill/api-pojos. Do not edit!
3+
*
4+
* Copyright 2022-2022 The Billing Project, LLC
5+
*
6+
* The Billing Project licenses this file to you under the Apache License,
7+
* version 2.0 (the "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at:
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15+
* License for the specific language governing permissions and limitations
16+
* under the License.
17+
*/
18+
19+
package org.killbill.billing.catalog.plugin.api.boilerplate.plugin;
20+
21+
import com.fasterxml.jackson.annotation.JsonGetter;
22+
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
23+
import java.util.Arrays;
24+
import java.util.Objects;
25+
import org.joda.time.DateTime;
26+
import org.killbill.billing.catalog.plugin.api.CatalogPluginApi;
27+
import org.killbill.billing.catalog.plugin.api.VersionedPluginCatalog;
28+
import org.killbill.billing.payment.api.PluginProperty;
29+
import org.killbill.billing.util.callcontext.TenantContext;
30+
31+
@JsonDeserialize( builder = CatalogPluginApiImp.Builder.class )
32+
public class CatalogPluginApiImp implements CatalogPluginApi {
33+
34+
35+
public CatalogPluginApiImp(final CatalogPluginApiImp that) {
36+
}
37+
protected CatalogPluginApiImp(final CatalogPluginApiImp.Builder<?> builder) {
38+
}
39+
protected CatalogPluginApiImp() { }
40+
@Override
41+
public VersionedPluginCatalog getVersionedPluginCatalog(final Iterable<PluginProperty> properties, final TenantContext context) {
42+
throw new UnsupportedOperationException("getVersionedPluginCatalog(java.lang.Iterable<org.killbill.billing.payment.api.PluginProperty>, org.killbill.billing.util.callcontext.TenantContext) must be implemented.");
43+
}
44+
@Override
45+
public DateTime getLatestCatalogVersion(final Iterable<PluginProperty> properties, final TenantContext context) {
46+
throw new UnsupportedOperationException("getLatestCatalogVersion(java.lang.Iterable<org.killbill.billing.payment.api.PluginProperty>, org.killbill.billing.util.callcontext.TenantContext) must be implemented.");
47+
}
48+
@Override
49+
public boolean equals(final Object o) {
50+
if ( this == o ) {
51+
return true;
52+
}
53+
if ( ( o == null ) || ( this.getClass() != o.getClass() ) ) {
54+
return false;
55+
}
56+
return true;
57+
}
58+
@Override
59+
public int hashCode() {
60+
int result = 1;
61+
return result;
62+
}
63+
@Override
64+
public String toString() {
65+
final StringBuffer sb = new StringBuffer(this.getClass().getSimpleName());
66+
sb.append("{");
67+
sb.append("}");
68+
return sb.toString();
69+
}
70+
71+
@SuppressWarnings("unchecked")
72+
public static class Builder<T extends CatalogPluginApiImp.Builder<T>> {
73+
74+
75+
public Builder() { }
76+
public Builder(final Builder that) {
77+
}
78+
public T source(final CatalogPluginApi that) {
79+
return (T) this;
80+
}
81+
protected Builder validate() {
82+
return this;
83+
}
84+
public CatalogPluginApiImp build() {
85+
return new CatalogPluginApiImp(this.validate());
86+
}
87+
}
88+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Generated by https://github.com/killbill/api-pojos. Do not edit!
3+
*
4+
* Copyright 2022-2022 The Billing Project, LLC
5+
*
6+
* The Billing Project licenses this file to you under the Apache License,
7+
* version 2.0 (the "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at:
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15+
* License for the specific language governing permissions and limitations
16+
* under the License.
17+
*/
18+
19+
package org.killbill.billing.catalog.plugin.api.boilerplate.plugin;
20+
21+
import com.fasterxml.jackson.databind.module.SimpleModule;
22+
23+
public class Module extends SimpleModule {
24+
public Module(){
25+
this.setAbstractTypes(new Resolver());
26+
}
27+
@Override
28+
public String getModuleName(){
29+
return "org.killbill.billing.catalog.plugin.api.boilerplate.plugin";
30+
}
31+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Generated by https://github.com/killbill/api-pojos. Do not edit!
3+
*
4+
* Copyright 2022-2022 The Billing Project, LLC
5+
*
6+
* The Billing Project licenses this file to you under the Apache License,
7+
* version 2.0 (the "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at:
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15+
* License for the specific language governing permissions and limitations
16+
* under the License.
17+
*/
18+
19+
package org.killbill.billing.catalog.plugin.api.boilerplate.plugin;
20+
21+
import com.fasterxml.jackson.databind.module.SimpleAbstractTypeResolver;
22+
import org.killbill.billing.catalog.plugin.api.CatalogPluginApi;
23+
import org.killbill.billing.catalog.plugin.api.StandalonePluginCatalog;
24+
import org.killbill.billing.catalog.plugin.api.VersionedPluginCatalog;
25+
26+
public class Resolver extends SimpleAbstractTypeResolver {
27+
public Resolver(){
28+
this.addMapping(CatalogPluginApi.class, CatalogPluginApiImp.class);
29+
this.addMapping(StandalonePluginCatalog.class, StandalonePluginCatalogImp.class);
30+
this.addMapping(VersionedPluginCatalog.class, VersionedPluginCatalogImp.class);
31+
}
32+
}

0 commit comments

Comments
 (0)