Skip to content

Commit 95a67b7

Browse files
Added Pagination for rust and dotnet services, build rust-service, build dotnet-service
1 parent af660c3 commit 95a67b7

45 files changed

Lines changed: 13362 additions & 58 deletions

Some content is hidden

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

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,5 @@ docker/producer*
7474
docker/schema-registry-values.yaml
7575
docker/kafka-values.yaml
7676
docker/schema.yml
77-
qodana.yaml
77+
qodana.yaml
78+
closure-service/

android-webapp/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ android {
1717

1818
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1919

20-
buildConfigField "String", "BASE_URL", "\"${System.getenv('BASE_URL') ?: 'http://192.168.1.26:8080/'}\""
20+
buildConfigField "String", "BASE_URL", "\"${System.getenv('BASE_URL') ?: 'https://spendingbetter.com/'}\""
2121
}
2222

2323
buildTypes {
2424
release {
2525
minifyEnabled false
2626
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
27-
buildConfigField "String", "BASE_URL", "\"${System.getenv('BASE_URL') ?: 'http://localhost:8080/'}\""
27+
buildConfigField "String", "BASE_URL", "\"${System.getenv('BASE_URL') ?: 'https://spendingbetter.com/'}\""
2828
}
2929
debug {
30-
buildConfigField "String", "BASE_URL", "\"${System.getenv('BASE_URL') ?: 'http://192.168.1.26:8080/'}\""
30+
buildConfigField "String", "BASE_URL", "\"${System.getenv('BASE_URL') ?: 'https://spendingbetter.com/'}\""
3131
}
3232
}
3333

android-webapp/app/src/main/AndroidManifest.xml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
<category android:name="android.intent.category.DEFAULT" />
5555
<category android:name="android.intent.category.BROWSABLE" />
5656
<data
57-
android:scheme="http"
58-
android:host="192.168.1.26"
59-
android:port="8080"
57+
android:scheme="https"
58+
android:host="spendingbetter.com"
59+
android:port="443"
6060
android:path="/android/oauth2/callback" />
6161
</intent-filter>
6262
</activity>
@@ -144,6 +144,34 @@
144144
android:label="Stock"
145145
android:theme="@style/Theme.AndroidWebapp.NoActionBar"
146146
android:parentActivityName=".ui.StockListActivity" />
147+
148+
<activity
149+
android:name=".ui.PostListActivity"
150+
android:exported="false"
151+
android:label="Posts"
152+
android:theme="@style/Theme.AndroidWebapp.NoActionBar"
153+
android:parentActivityName=".ui.DashboardActivity" />
154+
155+
<activity
156+
android:name=".ui.PostFormActivity"
157+
android:exported="false"
158+
android:label="Post"
159+
android:theme="@style/Theme.AndroidWebapp.NoActionBar"
160+
android:parentActivityName=".ui.PostListActivity" />
161+
162+
<activity
163+
android:name=".ui.TaskListActivity"
164+
android:exported="false"
165+
android:label="Tasks"
166+
android:theme="@style/Theme.AndroidWebapp.NoActionBar"
167+
android:parentActivityName=".ui.DashboardActivity" />
168+
169+
<activity
170+
android:name=".ui.TaskFormActivity"
171+
android:exported="false"
172+
android:label="Task"
173+
android:theme="@style/Theme.AndroidWebapp.NoActionBar"
174+
android:parentActivityName=".ui.TaskListActivity" />
147175
</application>
148176

149177
</manifest>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.springboot.android.api;
2+
3+
import com.springboot.android.model.PageResponse;
4+
import com.springboot.android.model.Post;
5+
6+
import retrofit2.Call;
7+
import retrofit2.http.Body;
8+
import retrofit2.http.DELETE;
9+
import retrofit2.http.GET;
10+
import retrofit2.http.POST;
11+
import retrofit2.http.PUT;
12+
import retrofit2.http.Path;
13+
import retrofit2.http.Query;
14+
15+
public interface PostService {
16+
@GET("api/posts")
17+
Call<PageResponse<Post>> getPosts(@Query("page") int page, @Query("size") int size);
18+
19+
@GET("api/posts/{id}")
20+
Call<Post> getPost(@Path("id") Long id);
21+
22+
@POST("api/posts")
23+
Call<Post> createPost(@Body Post post);
24+
25+
@PUT("api/posts/{id}")
26+
Call<Post> updatePost(@Path("id") Long id, @Body Post post);
27+
28+
@DELETE("api/posts/{id}")
29+
Call<Void> deletePost(@Path("id") Long id);
30+
}

android-webapp/app/src/main/java/com/springboot/android/api/StockService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.springboot.android.api;
22

3+
import com.springboot.android.model.PageResponse;
34
import com.springboot.android.model.Stock;
45

56
import java.util.List;
@@ -16,7 +17,7 @@
1617
public interface StockService {
1718

1819
@GET("api/stocks")
19-
Call<List<Stock>> getStocks(
20+
Call<PageResponse<Stock>> getStocks(
2021
@Query("page") int page,
2122
@Query("size") int size
2223
);
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.springboot.android.api;
2+
3+
import com.springboot.android.model.PageResponse;
4+
import com.springboot.android.model.Task;
5+
6+
import retrofit2.Call;
7+
import retrofit2.http.Body;
8+
import retrofit2.http.DELETE;
9+
import retrofit2.http.GET;
10+
import retrofit2.http.POST;
11+
import retrofit2.http.PUT;
12+
import retrofit2.http.Path;
13+
import retrofit2.http.Query;
14+
15+
public interface TaskService {
16+
@GET("api/tasks")
17+
Call<PageResponse<Task>> getTasks(@Query("page") int page, @Query("size") int size);
18+
19+
@GET("api/tasks/{id}")
20+
Call<Task> getTask(@Path("id") Long id);
21+
22+
@POST("api/tasks")
23+
Call<Task> createTask(@Body Task task);
24+
25+
@PUT("api/tasks/{id}")
26+
Call<Task> updateTask(@Path("id") Long id, @Body Task task);
27+
28+
@DELETE("api/tasks/{id}")
29+
Call<Void> deleteTask(@Path("id") Long id);
30+
}

android-webapp/app/src/main/java/com/springboot/android/api/WarehouseService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.springboot.android.api;
22

3+
import com.springboot.android.model.PageResponse;
34
import com.springboot.android.model.Warehouse;
45

56
import java.util.List;
@@ -16,7 +17,7 @@
1617
public interface WarehouseService {
1718

1819
@GET("api/warehouses")
19-
Call<List<Warehouse>> getWarehouses(
20+
Call<PageResponse<Warehouse>> getWarehouses(
2021
@Query("page") int page,
2122
@Query("size") int size
2223
);
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
package com.springboot.android.model;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import java.util.List;
5+
6+
public class Post {
7+
@SerializedName("id")
8+
private Long id;
9+
10+
@SerializedName("name")
11+
private String name;
12+
13+
// Excluded to avoid circular reference
14+
// @SerializedName("tasks")
15+
private transient List<Task> tasks;
16+
17+
@SerializedName("createdByUser")
18+
private String createdByUser;
19+
20+
@SerializedName("createdDate")
21+
private String createdDate;
22+
23+
@SerializedName("lastModifiedByUser")
24+
private String lastModifiedByUser;
25+
26+
@SerializedName("lastModifiedDate")
27+
private String lastModifiedDate;
28+
29+
public Post() {
30+
}
31+
32+
public Post(Long id, String name) {
33+
this.id = id;
34+
this.name = name;
35+
}
36+
37+
public Long getId() {
38+
return id;
39+
}
40+
41+
public void setId(Long id) {
42+
this.id = id;
43+
}
44+
45+
public String getName() {
46+
return name;
47+
}
48+
49+
public void setName(String name) {
50+
this.name = name;
51+
}
52+
53+
public List<Task> getTasks() {
54+
return tasks;
55+
}
56+
57+
public void setTasks(List<Task> tasks) {
58+
this.tasks = tasks;
59+
}
60+
61+
public String getCreatedByUser() {
62+
return createdByUser;
63+
}
64+
65+
public void setCreatedByUser(String createdByUser) {
66+
this.createdByUser = createdByUser;
67+
}
68+
69+
public String getCreatedDate() {
70+
return createdDate;
71+
}
72+
73+
public void setCreatedDate(String createdDate) {
74+
this.createdDate = createdDate;
75+
}
76+
77+
public String getLastModifiedByUser() {
78+
return lastModifiedByUser;
79+
}
80+
81+
public void setLastModifiedByUser(String lastModifiedByUser) {
82+
this.lastModifiedByUser = lastModifiedByUser;
83+
}
84+
85+
public String getLastModifiedDate() {
86+
return lastModifiedDate;
87+
}
88+
89+
public void setLastModifiedDate(String lastModifiedDate) {
90+
this.lastModifiedDate = lastModifiedDate;
91+
}
92+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
package com.springboot.android.model;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
public class Task {
6+
@SerializedName("id")
7+
private Long id;
8+
9+
@SerializedName("name")
10+
private String name;
11+
12+
@SerializedName("description")
13+
private String description;
14+
15+
// Excluded to avoid circular reference
16+
// @SerializedName("post")
17+
private transient Post post;
18+
19+
@SerializedName("createdByUser")
20+
private String createdByUser;
21+
22+
@SerializedName("createdDate")
23+
private String createdDate;
24+
25+
@SerializedName("lastModifiedByUser")
26+
private String lastModifiedByUser;
27+
28+
@SerializedName("lastModifiedDate")
29+
private String lastModifiedDate;
30+
31+
public Task() {
32+
}
33+
34+
public Task(Long id, String name, String description) {
35+
this.id = id;
36+
this.name = name;
37+
this.description = description;
38+
}
39+
40+
public Long getId() {
41+
return id;
42+
}
43+
44+
public void setId(Long id) {
45+
this.id = id;
46+
}
47+
48+
public String getName() {
49+
return name;
50+
}
51+
52+
public void setName(String name) {
53+
this.name = name;
54+
}
55+
56+
public String getDescription() {
57+
return description;
58+
}
59+
60+
public void setDescription(String description) {
61+
this.description = description;
62+
}
63+
64+
public Post getPost() {
65+
return post;
66+
}
67+
68+
public void setPost(Post post) {
69+
this.post = post;
70+
}
71+
72+
public String getCreatedByUser() {
73+
return createdByUser;
74+
}
75+
76+
public void setCreatedByUser(String createdByUser) {
77+
this.createdByUser = createdByUser;
78+
}
79+
80+
public String getCreatedDate() {
81+
return createdDate;
82+
}
83+
84+
public void setCreatedDate(String createdDate) {
85+
this.createdDate = createdDate;
86+
}
87+
88+
public String getLastModifiedByUser() {
89+
return lastModifiedByUser;
90+
}
91+
92+
public void setLastModifiedByUser(String lastModifiedByUser) {
93+
this.lastModifiedByUser = lastModifiedByUser;
94+
}
95+
96+
public String getLastModifiedDate() {
97+
return lastModifiedDate;
98+
}
99+
100+
public void setLastModifiedDate(String lastModifiedDate) {
101+
this.lastModifiedDate = lastModifiedDate;
102+
}
103+
}

0 commit comments

Comments
 (0)