com.google.appengine.api.files
Class GSFileOptions.GSFileOptionsBuilder
- java.lang.Object
-
- com.google.appengine.api.files.GSFileOptions.GSFileOptionsBuilder
-
- Enclosing class:
- GSFileOptions
public static class GSFileOptions.GSFileOptionsBuilder extends java.lang.ObjectA builder of GSFileOptions.
-
-
Constructor Summary
Constructors Constructor and Description GSFileOptionsBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description GSFileOptions.GSFileOptionsBuilderaddUserMetadata(java.lang.String key, java.lang.String value)Adds user specific metadata that will be added to object headers when served through Google Storage: Each entry will be prefixed with x-goog-meta- when serving out.GSFileOptionsbuild()GSFileOptions.GSFileOptionsBuildersetAcl(java.lang.String acl)Sets the acl of the object.GSFileOptions.GSFileOptionsBuildersetBucket(java.lang.String bucket)Sets the name of the bucket.GSFileOptions.GSFileOptionsBuildersetCacheControl(java.lang.String cacheControl)Sets the cache control for the object.GSFileOptions.GSFileOptionsBuildersetContentDisposition(java.lang.String contentDisposition)Sets the content disposition for the object.GSFileOptions.GSFileOptionsBuildersetContentEncoding(java.lang.String contentEncoding)Sets the content encoding for the object.GSFileOptions.GSFileOptionsBuildersetKey(java.lang.String key)Sets the key of the object.GSFileOptions.GSFileOptionsBuildersetMimeType(java.lang.String mimeType)Sets the mime type of the object.
-
-
-
Method Detail
-
setBucket
public GSFileOptions.GSFileOptionsBuilder setBucket(java.lang.String bucket)
Sets the name of the bucket. Required.- Parameters:
bucket- name of the Google Storage bucket- Returns:
- this for chaining.
-
setKey
public GSFileOptions.GSFileOptionsBuilder setKey(java.lang.String key)
Sets the key of the object. Required.- Parameters:
key- of the Google Storage object- Returns:
- this for chaining.
-
setMimeType
public GSFileOptions.GSFileOptionsBuilder setMimeType(java.lang.String mimeType)
Sets the mime type of the object. If not set, default Google Storage mime type is used when served out of Google Storage. See Content-Type.- Parameters:
mimeType- of the Google Storage object.- Returns:
- this for chaining.
-
setAcl
public GSFileOptions.GSFileOptionsBuilder setAcl(java.lang.String acl)
Sets the acl of the object. If not set, defaults to none (ie, bucket default). See Access Control.- Parameters:
acl- to use for the Google Storage object.- Returns:
- this for chaining.
-
setCacheControl
public GSFileOptions.GSFileOptionsBuilder setCacheControl(java.lang.String cacheControl)
Sets the cache control for the object. If not set, default value is used. See Cache-Control.- Parameters:
cacheControl- to use for the Google Storage object.- Returns:
- this for chaining.
-
setContentEncoding
public GSFileOptions.GSFileOptionsBuilder setContentEncoding(java.lang.String contentEncoding)
Sets the content encoding for the object. If not set, default value is used. See Content-Encoding.- Parameters:
contentEncoding- to use for the Google Storage object.- Returns:
- this for chaining.
-
setContentDisposition
public GSFileOptions.GSFileOptionsBuilder setContentDisposition(java.lang.String contentDisposition)
Sets the content disposition for the object. If not set, default value is used. See Content-Disposition.- Parameters:
contentDisposition- to use for the Google Storage object.- Returns:
- this for chaining.
-
addUserMetadata
public GSFileOptions.GSFileOptionsBuilder addUserMetadata(java.lang.String key, java.lang.String value)
Adds user specific metadata that will be added to object headers when served through Google Storage: Each entry will be prefixed with x-goog-meta- when serving out. For example, if you add a 'foo'->'bar' entry to userMetadata map, it will be served out as a header: x-goog-meta-foo: bar- Parameters:
key-value-- Returns:
- this for chaining.
-
build
public GSFileOptions build()
-
-