public class NinjaController extends Object implements Controller
Handles all requests required to render the web-pages.
| Constructor and Description |
|---|
NinjaController() |
| Modifier and Type | Method and Description |
|---|---|
void |
api(WebContext ctx)
Handles requests to /ui/api
|
void |
bucket(WebContext ctx,
String bucketName)
Handles requests to /ui/[bucketName]
This will list the contents of the bucket.
|
void |
deleteBucket(WebContext ctx,
String bucket)
Handles requests to /ui/[bucketName]/delete
This will delete the given bucket and list the remaining.
|
void |
deleteObject(WebContext ctx,
String bucketName,
String id)
Handles requests to /ui/[bucketName]/[object]/delete
This will delete the given object and list the remaining.
|
void |
index(WebContext ctx)
Handles requests to /
|
void |
license(WebContext ctx)
Handles requests to /ui/license
|
void |
log(WebContext ctx)
Handles requests to /ui/log
|
void |
makePrivate(WebContext ctx,
String bucket)
Handles requests to /ui/[bucketName]/makePrivate
This will make the given bucket private and list its contents.
|
void |
makePublic(WebContext ctx,
String bucket)
Handles requests to /ui/[bucketName]/makePublic
This will make the given bucket public and list its contents.
|
void |
object(WebContext ctx,
String bucketName,
String id)
Handles requests to /ui/[bucketName]/[object]
This will start a download of the requested object.
|
void |
onError(WebContext ctx,
HandledException error) |
void |
uploadFile(WebContext ctx,
String bucket)
Handles manual object uploads
|
public void onError(WebContext ctx, HandledException error)
onError in interface Controllerpublic void index(WebContext ctx)
ctx - the context describing the current requestpublic void license(WebContext ctx)
ctx - the context describing the current requestpublic void api(WebContext ctx)
ctx - the context describing the current requestpublic void log(WebContext ctx)
ctx - the context describing the current requestpublic void bucket(WebContext ctx, String bucketName)
This will list the contents of the bucket.
ctx - the context describing the current requestbucketName - name of the bucket to showpublic void object(WebContext ctx, String bucketName, String id)
This will start a download of the requested object. No access checks will be performed.
ctx - the context describing the current requestbucketName - name of the bucket to showid - the name of the object to fetchpublic void uploadFile(WebContext ctx, String bucket)
ctx - the context describing the current requestbucket - the name of the target bucketpublic void deleteBucket(WebContext ctx, String bucket)
This will delete the given bucket and list the remaining.
ctx - the context describing the current requestbucket - name of the bucket to deletepublic void deleteObject(WebContext ctx, String bucketName, String id)
This will delete the given object and list the remaining.
ctx - the context describing the current requestbucketName - name of the bucket which contains the object to deleteid - name of the object to deletepublic void makePublic(WebContext ctx, String bucket)
This will make the given bucket public and list its contents.
ctx - the context describing the current requestbucket - name of the bucket to make publicpublic void makePrivate(WebContext ctx, String bucket)
This will make the given bucket private and list its contents.
ctx - the context describing the current requestbucket - name of the bucket to make privateCopyright © 2016. All rights reserved.