diff --git a/src/main/java/org/ntlab/citrusserver/resources/PublicBooksRest.java b/src/main/java/org/ntlab/citrusserver/resources/PublicBooksRest.java new file mode 100644 index 0000000..92493a7 --- /dev/null +++ b/src/main/java/org/ntlab/citrusserver/resources/PublicBooksRest.java @@ -0,0 +1,47 @@ +package org.ntlab.citrusserver.resources; + +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.MediaType; +import org.ntlab.citrusserver.entities.Book; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Repository; + +import java.util.ArrayList; + +@Path("/public_books") +@Component + +public class PublicBooksRest { + //公開されている本の一覧を返す + @GET + @Produces(MediaType.APPLICATION_JSON) + public ArrayList getAllPublicBooks() { + return null; + } + + //検索条件を指定して本を検索(タイトル ソート可能) + @Path("/search") + @GET + @Produces(MediaType.APPLICATION_JSON) + @Consumes(MediaType.APPLICATION_FORM_URLENCODED) + public ArrayList searchBooksByTitle(@FormParam("search_title") String search_title, @FormParam("sort_by") int sort_by) { + return null; + } + + //検索条件を指定して本を検索(アカウント ソート可能) + @GET + @Produces(MediaType.APPLICATION_JSON) + @Consumes(MediaType.APPLICATION_FORM_URLENCODED) + public ArrayList searchBooksByAccount(@FormParam("search_account_id") String search_account_id, @FormParam("sort_by") int sort_by) { + return null; + } + + //検索条件を指定して本を検索(アカウントとタイトル) + @GET + @Produces(MediaType.APPLICATION_JSON) + @Consumes(MediaType.APPLICATION_FORM_URLENCODED) + public ArrayList searchBooksByTitleAndAccount(@FormParam("search_title") String search_title, @FormParam("search_account_id") String search_account_id) { + return null; + } + +}