public class FileAction<A extends FileAction> extends Action<A>
Rule.RuleMatcher| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
baseDir |
protected java.util.Set<java.lang.String> |
files |
ALL_METHODS, configMap, description, excludeMatchers, excludeOn, includeMatchers, includeOn, log, name, order, params| Constructor and Description |
|---|
FileAction() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canServe(java.lang.String filePath) |
void |
doGet(Request req,
Response res)
Handle an HTTP GET.
|
protected java.io.InputStream |
findStream(java.lang.String filePath) |
java.lang.String |
getBaseDir() |
java.util.Set<java.lang.String> |
getFiles() |
protected void |
serveFile(Request req,
Response res) |
protected void |
serveFile(Request req,
Response res,
java.lang.String filePath,
boolean filterMode) |
FileAction |
withBaseDir(java.lang.String baseDir) |
FileAction |
withFiles(java.lang.String... files) |
configureOp, doDelete, doPatch, doPost, doPut, getFullIncludePaths, getIncludePaths, isDecoration, joinPaths, joinPaths0, run, run0, withDecorationafterWiringComplete, checkLazyConfig, compareTo, doLazyConfig, getAllExcludePaths, getAllIncludeMethods, getAllIncludePaths, getDefaultIncludeMatchers, getDescription, getExcludeMatchers, getIncludeMatchers, getName, getOrder, getParams, match, match, matches, matches, toString, withDescription, withExcludeOn, withExcludeOn, withIncludeOn, withIncludeOn, withName, withOrder, withParam, withParamsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddResponse, addResponse, beautifyTag, buildOperation, documentOpDelete, documentOperationSchema, documentOpFind, documentOpGet, documentOpPatch, documentOpPost, documentOpPut, documentOpRelated, documentParam, documentQueryParams, documentRequestSchema, documentResourceSchema, documentResponseSchema, findOp, getDescription, getSchemaRef, hasParam, hook_documentOp, newComponentRefSchema, newHrefSchema, newTypeSchema, removeReadOnlyPropertiesprotected java.lang.String baseDir
protected java.util.Set<java.lang.String> files
public void doGet(Request req, Response res) throws ApiException
ActionOverride run() to handle all requests or override this method with your business logic specifically for a GET request
doGet in class Action<A extends FileAction>req - the request to runres - the response to populateApiExceptionprotected void serveFile(Request req, Response res, java.lang.String filePath, boolean filterMode)
protected java.io.InputStream findStream(java.lang.String filePath)
public boolean canServe(java.lang.String filePath)
public java.lang.String getBaseDir()
public FileAction withBaseDir(java.lang.String baseDir)
public java.util.Set<java.lang.String> getFiles()
public FileAction withFiles(java.lang.String... files)
Copyright © 2023 Rocket Partners, LLC. All rights reserved.