public static final class DefaultContentMetadata.Builder extends Object
The Default content metadata builder requires at least the name, the size and the media type. The rest of the attributes are set to its default values: <ul> <li> lastModifiedDate defaults to the current date <li> uploadDate defaults to the current date <li> owner defaults to null <li> properties defaults to an empty map </ul>
Modifier and Type | Method and Description |
---|---|
DefaultContentMetadata |
build()
Builds and returns the
DefaultContentMetadata object. |
DefaultContentMetadata.Builder |
lastModifiedDate(Instant date)
Set the last modified date of the content for the content metadata.
|
DefaultContentMetadata.Builder |
mediaType(com.google.common.net.MediaType mediaType)
Set the
MediaType of the content for the content metadata. |
DefaultContentMetadata.Builder |
name(String name)
Set the original file name of the content for the content metadata.
|
DefaultContentMetadata.Builder |
owner(String owner)
Set the owner of the content for the content metadata.
|
DefaultContentMetadata.Builder |
properties(Map<String,String> properties)
Set the properties of the content for the content metadata.
|
DefaultContentMetadata.Builder |
size(long size)
Set the size of the content for the content metadata.
|
DefaultContentMetadata.Builder |
uploadDate(Instant date)
Set the upload date of the content for the content metadata.
|
public DefaultContentMetadata.Builder name(String name)
Set the original file name of the content for the content metadata.
name
- the original file name of the content metadatapublic DefaultContentMetadata.Builder size(long size)
Set the size of the content for the content metadata.
size
- the size of the content metadatapublic DefaultContentMetadata.Builder mediaType(com.google.common.net.MediaType mediaType)
Set the MediaType
of the content for the content metadata.
mediaType
- the media type of the content metadatapublic DefaultContentMetadata.Builder lastModifiedDate(Instant date)
Set the last modified date of the content for the content metadata.
date
- the last modified date of the content metadatapublic DefaultContentMetadata.Builder uploadDate(Instant date)
Set the upload date of the content for the content metadata.
date
- the upload date of the content metadatapublic DefaultContentMetadata.Builder owner(String owner)
Set the owner of the content for the content metadata.
owner
- the owner of the content metadatapublic DefaultContentMetadata.Builder properties(Map<String,String> properties)
Set the properties of the content for the content metadata.
properties
- the properties of the content metadatapublic DefaultContentMetadata build()
Builds and returns the DefaultContentMetadata
object.
IllegalArgumentException
- if the name, size and MediaType
attributes are not setCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.