Class PetstoreConsoleResource
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.apache.juneau.rest.server.servlet.RestServlet
org.apache.juneau.rest.server.servlet.BasicRestServlet
org.apache.juneau.petstore.console.PetstoreConsolePage
org.apache.juneau.petstore.console.PetstoreConsoleResource
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable,BasicUniversalConfig,DefaultConfig,DefaultHtmlConfig
Root of the petstore admin console, mounted at
/console beside the /petstore API and sharing its
PetStore.
Every page renders through base.ftlh (the <@console> chrome and nav tree).
Example:
<#-- base.ftlh --> <@console brand="Juneau Petstore"> <@navigation><@node id="store" label="Store" href="/console/store"/> ... </@navigation> <@main/> </@console>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.rest.server.servlet.RestServlet
RestServlet.Builder<R extends RestServlet,SELF extends RestServlet.Builder<R, SELF>>, RestServlet.DefaultBuilder<R extends RestServlet> -
Field Summary
Fields inherited from class org.apache.juneau.petstore.console.PetstoreConsolePage
PAGE_HEADER, TEMPLATESFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionindex(RestRequest req) GET /consoleredirects to the store dashboard.voidscript(RestResponse res) Servespetstore.js, the shared page scriptbase.ftlhloads after the toolkit on every page.Methods inherited from class org.apache.juneau.petstore.console.PetstoreConsolePage
builder, freemarker, store, twinMethods inherited from class org.apache.juneau.rest.server.servlet.RestServlet
builder, createAuthenticator, destroy, doLog, getContext, getPath, getPaths, getRequest, getResponse, getRestBuilder, init, log, log, service, setContextMethods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, isSensitiveHeader, serviceMethods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
PetstoreConsoleResource
public PetstoreConsoleResource()
-
-
Method Details
-
index
GET /consoleredirects to the store dashboard.- Parameters:
req- The request.- Returns:
- A 303 to
/console/store.
-
script
Servespetstore.js, the shared page scriptbase.ftlhloads after the toolkit on every page.- Parameters:
res- The response.- Throws:
IOException- If the bundled script can't be read.
-