Skip to content

Commit 9af2ab4

Browse files
committed
Added the DisplayableComic type for displayable comics [#2292]
* Added a view to load the data into the object. * Added an example builder for the new type. * Added backend services to load the new type. * Added a frontend feature to load the new type. * Removed the old comic detail list feature.
1 parent bb592dc commit 9af2ab4

File tree

98 files changed

+4905
-3287
lines changed

Some content is hidden

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

98 files changed

+4905
-3287
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package org.comixedproject.adaptors.csv;
2+
3+
public class CsvAdaptorException extends Exception {}

comixed-messaging/src/main/java/org/comixedproject/messaging/comicbooks/PublishComicBookRemovalAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
@Log4j2
3636
public class PublishComicBookRemovalAction extends AbstractPublishAction<ComicBook> {
3737
/** Topic which receives comic list removals in real time. */
38-
public static final String COMIC_LIST_REMOVAL_TOPIC = "/topic/comic-book-list.removal";
38+
public static final String COMIC_LIST_REMOVAL_TOPIC = "/topic/comic-list.removal";
3939

4040
/** Topic which receives individual comic removals in real time. */
4141
public static final String COMIC_BOOK_REMOVAL_TOPIC = "/topic/comic-book.%d.removal";

comixed-messaging/src/main/java/org/comixedproject/messaging/comicbooks/PublishComicBookUpdateAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
@Component
3434
@Log4j2
3535
public class PublishComicBookUpdateAction extends AbstractPublishAction<ComicBook> {
36-
public static final String COMIC_LIST_UPDATE_TOPIC = "/topic/comic-book-list.update";
36+
public static final String COMIC_LIST_UPDATE_TOPIC = "/topic/comic-list.update";
3737

3838
/** Topic which receives individual comic updates in real time. */
3939
public static final String COMIC_BOOK_UPDATE_TOPIC = "/topic/comic-book.%d.update";
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
/*
2+
* ComiXed - A digital comic book library management application.
3+
* Copyright (C) 2025, The ComiXed Project
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses>
17+
*/
18+
19+
package org.comixedproject.model.library;
20+
21+
import com.fasterxml.jackson.annotation.JsonView;
22+
import jakarta.persistence.*;
23+
import java.util.Date;
24+
import lombok.Getter;
25+
import lombok.Setter;
26+
import org.comixedproject.model.archives.ArchiveType;
27+
import org.comixedproject.model.comicbooks.ComicState;
28+
import org.comixedproject.model.comicbooks.ComicType;
29+
import org.comixedproject.views.View;
30+
31+
/**
32+
* <code>DisplayableComic</code> represents the details for a comic that can be displayed in a list.
33+
*
34+
* @author Darryl L. Pierce
35+
*/
36+
@Entity
37+
@Table(name = "displayable_comics_view")
38+
public class DisplayableComic {
39+
@Id
40+
@Column(name = "comic_book_id")
41+
@JsonView({View.ComicDetailsView.class})
42+
@Getter
43+
private Long comicBookId;
44+
45+
@Column(name = "comic_detail_id")
46+
@JsonView({View.ComicDetailsView.class})
47+
@Getter
48+
private Long comicDetailId;
49+
50+
@Column(name = "archive_type")
51+
@JsonView({View.ComicDetailsView.class})
52+
@Enumerated(EnumType.STRING)
53+
@Getter
54+
@Setter
55+
private ArchiveType archiveType;
56+
57+
@Column(name = "comic_state")
58+
@JsonView({View.ComicDetailsView.class})
59+
@Enumerated(EnumType.STRING)
60+
@Getter
61+
@Setter
62+
private ComicState comicState;
63+
64+
@Column(name = "is_unscraped")
65+
@JsonView({View.ComicDetailsView.class})
66+
@Getter
67+
@Setter
68+
private Boolean unscraped;
69+
70+
@Column(name = "comic_type")
71+
@JsonView({View.ComicDetailsView.class})
72+
@Enumerated(EnumType.STRING)
73+
@Getter
74+
@Setter
75+
private ComicType comicType;
76+
77+
@Column(name = "publisher")
78+
@JsonView({View.ComicDetailsView.class})
79+
@Getter
80+
@Setter
81+
private String publisher;
82+
83+
@Column(name = "series")
84+
@JsonView({View.ComicDetailsView.class})
85+
@Getter
86+
@Setter
87+
private String series;
88+
89+
@Column(name = "volume")
90+
@JsonView({View.ComicDetailsView.class})
91+
@Getter
92+
@Setter
93+
private String volume;
94+
95+
@Column(name = "issue_number")
96+
@JsonView({View.ComicDetailsView.class})
97+
@Getter
98+
private String issueNumber;
99+
100+
@Column(name = "sortable_issue_number")
101+
@JsonView({View.ComicDetailsView.class})
102+
@Getter
103+
private String sortableIssueNumber;
104+
105+
@Column(name = "title")
106+
@JsonView({View.ComicDetailsView.class})
107+
@Getter
108+
private String title;
109+
110+
@Column(name = "page_count")
111+
@JsonView({View.ComicDetailsView.class})
112+
@Getter
113+
private String pageCount;
114+
115+
@Column(name = "cover_date")
116+
@JsonView({View.ComicDetailsView.class})
117+
@Getter
118+
@Setter
119+
private Date coverDate;
120+
121+
@Column(name = "month_published")
122+
@JsonView({View.ComicDetailsView.class})
123+
@Getter
124+
@Setter
125+
private Integer monthPublished;
126+
127+
@Column(name = "year_published")
128+
@JsonView({View.ComicDetailsView.class})
129+
@Getter
130+
@Setter
131+
private Integer yearPublished;
132+
133+
@Column(name = "store_date")
134+
@JsonView({View.ComicDetailsView.class})
135+
@Getter
136+
private Date storeDate;
137+
138+
@Column(name = "added_date")
139+
@JsonView({View.ComicDetailsView.class})
140+
@Getter
141+
@Setter
142+
private Date addedDate;
143+
}

comixed-model/src/main/java/org/comixedproject/model/net/comicbooks/LoadComicDetailsByIdRequest.java

Lines changed: 0 additions & 40 deletions
This file was deleted.

comixed-model/src/main/java/org/comixedproject/model/net/comicbooks/LoadComicDetailsForReadingListRequest.java renamed to comixed-model/src/main/java/org/comixedproject/model/net/library/LoadComicForListRequest.java

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,25 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with this program. If not, see <http:/www.gnu.org/licenses>
16+
* along with this program. If not, see <http://www.gnu.org/licenses>
1717
*/
1818

19-
package org.comixedproject.model.net.comicbooks;
19+
package org.comixedproject.model.net.library;
2020

2121
import com.fasterxml.jackson.annotation.JsonProperty;
2222
import lombok.AllArgsConstructor;
2323
import lombok.Getter;
2424
import lombok.NoArgsConstructor;
25-
import org.comixedproject.model.comicbooks.ComicDetail;
2625

2726
/**
28-
* <code>LoadComicDetailsForReadingListRequest</code> represents the request payload when loading
29-
* {@link ComicDetail} for a reading list.
27+
* <code>LoadComicForListRequest</code> represents the request body when loading comics for a
28+
* reading list.
3029
*
3130
* @author Darryl L. Pierce
3231
*/
3332
@NoArgsConstructor
3433
@AllArgsConstructor
35-
public class LoadComicDetailsForReadingListRequest {
34+
public class LoadComicForListRequest {
3635
@JsonProperty("pageSize")
3736
@Getter
3837
private int pageSize;
@@ -48,4 +47,20 @@ public class LoadComicDetailsForReadingListRequest {
4847
@JsonProperty("sortDirection")
4948
@Getter
5049
private String sortDirection;
50+
51+
@Override
52+
public String toString() {
53+
return "LoadComicForListRequest{"
54+
+ "pageSize="
55+
+ pageSize
56+
+ ", pageIndex="
57+
+ pageIndex
58+
+ ", sortBy='"
59+
+ sortBy
60+
+ '\''
61+
+ ", sortDirection='"
62+
+ sortDirection
63+
+ '\''
64+
+ '}';
65+
}
5166
}

comixed-model/src/main/java/org/comixedproject/model/net/comicbooks/LoadUnreadComicDetailsRequest.java renamed to comixed-model/src/main/java/org/comixedproject/model/net/library/LoadComicsByReadStateRequest.java

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* ComiXed - A digital comic book library management application.
3-
* Copyright (C) 2023, The ComiXed Project
3+
* Copyright (C) 2025, The ComiXed Project
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
@@ -16,27 +16,22 @@
1616
* along with this program. If not, see <http:/www.gnu.org/licenses>
1717
*/
1818

19-
package org.comixedproject.model.net.comicbooks;
19+
package org.comixedproject.model.net.library;
2020

2121
import com.fasterxml.jackson.annotation.JsonProperty;
2222
import lombok.AllArgsConstructor;
2323
import lombok.Getter;
2424
import lombok.NoArgsConstructor;
25-
import org.comixedproject.model.comicbooks.ComicDetail;
2625

2726
/**
28-
* <code>LoadComicDetailsForTagRequest</code> represents the payload when loading {@link
29-
* ComicDetail} records that are unread by a user.
27+
* <code>LoadComicsByReadStateRequest</code> represents the payload when loading comics by their
28+
* read state.
3029
*
3130
* @author Darryl L. Pierce
3231
*/
3332
@NoArgsConstructor
3433
@AllArgsConstructor
35-
public class LoadUnreadComicDetailsRequest {
36-
@JsonProperty("unreadOnly")
37-
@Getter
38-
private boolean unreadOnly;
39-
34+
public class LoadComicsByReadStateRequest {
4035
@JsonProperty("pageSize")
4136
@Getter
4237
private int pageSize;
@@ -52,4 +47,20 @@ public class LoadUnreadComicDetailsRequest {
5247
@JsonProperty("sortDirection")
5348
@Getter
5449
private String sortDirection;
50+
51+
@Override
52+
public String toString() {
53+
return "LoadComicsByReadStateRequest{"
54+
+ "pageSize="
55+
+ pageSize
56+
+ ", pageIndex="
57+
+ pageIndex
58+
+ ", sortBy='"
59+
+ sortBy
60+
+ '\''
61+
+ ", sortDirection='"
62+
+ sortDirection
63+
+ '\''
64+
+ '}';
65+
}
5566
}

0 commit comments

Comments
 (0)