public static class DXFile.Builder extends DXDataObject.Builder<DXFile.Builder,DXFile>
DXFile
object. To obtain an instance, call
DXFile.newFile()
.createParents, details, env, folder, hidden, name, project, properties, tags, types
Modifier and Type | Method and Description |
---|---|
DXFile |
build()
Creates the file.
|
protected DXFile.Builder |
getThisInstance()
Returns the builder object.
|
DXFile.Builder |
setMediaType(String mediaType)
Sets the Internet Media Type of the file to be created.
|
DXFile.Builder |
upload(byte[] data)
Uploads the data in the specified byte array to the file to be created.
|
DXFile.Builder |
upload(InputStream data)
Uploads the data in the specified stream to the file to be created.
|
addTags, addTypes, checkAndFixParameters, getNewObjectId, putAllProperties, putProperty, setDetails, setFolder, setFolder, setName, setProject, setVisibility
public DXFile build()
build
in class DXDataObject.Builder<DXFile.Builder,DXFile>
DXFile
object corresponding to the newly created objectprotected DXFile.Builder getThisInstance()
DXDataObject.Builder
This abstract method is implemented by the Builder methods so that common methods can get an instance of the subclass for chaining purposes.
getThisInstance
in class DXDataObject.Builder<DXFile.Builder,DXFile>
public DXFile.Builder setMediaType(String mediaType)
mediaType
- Internet Media TypeBuilder
objectpublic DXFile.Builder upload(byte[] data)
data
- data to be uploadedBuilder
objectpublic DXFile.Builder upload(InputStream data)
data
- stream containing data to be uploadedBuilder
objectCopyright © 2023. All Rights Reserved.