public class StorageController extends BizController
BizController.SaveHelper
Constructor and Description |
---|
StorageController() |
Modifier and Type | Method and Description |
---|---|
void |
autocompleteObjects(sirius.web.http.WebContext ctx,
String bucketName)
Provides an autocomplete for objects within a bucket.
|
void |
deleteObject(sirius.web.http.WebContext ctx,
String bucketName,
String objectKey)
Deletes the object in the given bucket with the given id.
|
void |
downloadPhysicalObject(sirius.web.http.WebContext ctx,
String bucket,
String authHash,
String physicalFileKey)
Actually delivers a physical object.
|
void |
editObject(sirius.web.http.WebContext ctx,
String bucketName,
String objectKey)
Provides a detai view for an object within a bucket.
|
void |
listBuckets(sirius.web.http.WebContext ctx)
Lists all buckets visible to the current user.
|
void |
listObjects(sirius.web.http.WebContext ctx,
String bucketName)
Lists all objects of the given bucket.
|
void |
unreferenceObject(sirius.web.http.WebContext ctx,
String bucketName,
String objectKey)
Removes the reference binding for the given object.
|
void |
uploadObject(sirius.web.http.WebContext ctx,
sirius.web.services.JSONStructuredOutput out,
String bucketName,
sirius.web.http.InputStreamHandler upload)
Uploads a new file / object to a bucket
|
void |
uploadObject(sirius.web.http.WebContext ctx,
sirius.web.services.JSONStructuredOutput out,
String bucketName,
String objectId,
sirius.web.http.InputStreamHandler upload)
Uploads new contents for the given file.
|
void |
uploadObjectForReference(sirius.web.http.WebContext ctx,
sirius.web.services.JSONStructuredOutput out,
String bucketName,
String reference,
sirius.web.http.InputStreamHandler upload)
Uploads an object for a reference (unique entity name).
|
assertNotNew, assertTenant, find, findForTenant, getBaseUrl, load, load, load, prepareSave, setOrVerify, tryFind, tryFindForTenant, validate
public void listBuckets(sirius.web.http.WebContext ctx)
ctx
- the request to handlepublic void listObjects(sirius.web.http.WebContext ctx, String bucketName)
ctx
- the request to handlebucketName
- the bucket to listpublic void autocompleteObjects(sirius.web.http.WebContext ctx, String bucketName)
ctx
- the request to handlebucketName
- the name of the bucket to search inpublic void editObject(sirius.web.http.WebContext ctx, String bucketName, String objectKey)
ctx
- the reuqest to handlebucketName
- the name of the bucket in which the object residesobjectKey
- the key of the objectpublic void uploadObject(sirius.web.http.WebContext ctx, sirius.web.services.JSONStructuredOutput out, String bucketName, sirius.web.http.InputStreamHandler upload)
ctx
- the reqest to handleout
- the response to the AJAX callbucketName
- the name of the bucket to upload toupload
- the data being uploadedpublic void uploadObject(sirius.web.http.WebContext ctx, sirius.web.services.JSONStructuredOutput out, String bucketName, String objectId, sirius.web.http.InputStreamHandler upload)
ctx
- the reqest to handleout
- the response to the AJAX callbucketName
- the name of the bucket to upload toobjectId
- the id of the object for replaceupload
- the upload to handlepublic void uploadObjectForReference(sirius.web.http.WebContext ctx, sirius.web.services.JSONStructuredOutput out, String bucketName, String reference, sirius.web.http.InputStreamHandler upload)
If an object for this reference already exists, it is updated, otherwise a new one is created. xx
ctx
- the request to handleout
- the response to the AJAX callbucketName
- the bucket name to put the object intoreference
- the reference for which an object is uploadedupload
- the content of the uploadpublic void deleteObject(sirius.web.http.WebContext ctx, String bucketName, String objectKey)
ctx
- the request to handlebucketName
- the bucket in which the object residesobjectKey
- the unique object keypublic void unreferenceObject(sirius.web.http.WebContext ctx, String bucketName, String objectKey)
ctx
- the request to handlebucketName
- the bucket in which the object residesobjectKey
- the unique object keypublic void downloadPhysicalObject(sirius.web.http.WebContext ctx, String bucket, String authHash, String physicalFileKey)
This is the handler of the download URLS which are generated by default. The content is actually delivered by the
PhysicalStorageEngine
.
ctx
- the request to handlebucket
- the bucket containing the objectauthHash
- the authentication hash which ensures accessphysicalFileKey
- the physical object to downloadCopyright © 2018. All rights reserved.