public class BoxFile.Info extends BoxItem.Info
Constructor and Description |
---|
Info()
Constructs an empty Info object.
|
Info(JsonObject jsonObject)
Constructs an Info object using an already parsed JSON object.
|
Info(String json)
Constructs an Info object by parsing information from a JSON string.
|
Modifier and Type | Method and Description |
---|---|
long |
getCommentCount()
Gets the number of comments on the file.
|
String |
getExtension()
Gets the extension suffix of the file, excluding the dot.
|
boolean |
getIsPackage()
Gets whether or not the file is an OSX package.
|
boolean |
getIsWatermarked()
Gets flag indicating whether this file is Watermarked.
|
BoxLock |
getLock()
Gets the lock of the file.
|
Metadata |
getMetadata(String templateName,
String scope)
Gets the metadata on this file associated with a specified scope and template.
|
EnumSet<BoxFile.Permission> |
getPermissions()
Gets the permissions that the current user has on the file.
|
URL |
getPreviewLink()
Gets the current expiring preview link.
|
BoxFile |
getResource()
Gets the resource associated with this Info.
|
String |
getSha1()
Gets the SHA1 hash of the file.
|
BoxFileVersion |
getVersion()
Gets the current version details of the file.
|
String |
getVersionNumber()
Gets the current version number of the file.
|
protected void |
parseJSONMember(JsonObject.Member member)
Invoked with a JSON member whenever this object is updated or created from a JSON object.
|
getCollections, getContentCreatedAt, getContentModifiedAt, getCreatedAt, getCreatedBy, getDescription, getEtag, getItemStatus, getModifiedAt, getModifiedBy, getName, getOwnedBy, getParent, getPathCollection, getPurgedAt, getSequenceID, getSharedLink, getSize, getTags, getTrashedAt, setCollections, setDescription, setName, setSharedLink
getID
clearPendingChanges, getPendingChanges, getPendingChangesAsJsonObject
public Info()
public Info(String json)
json
- the JSON string to parse.public Info(JsonObject jsonObject)
jsonObject
- the parsed JSON object.public BoxFile getResource()
BoxResource.Info
getResource
in class BoxResource.Info
public String getVersionNumber()
public long getCommentCount()
public EnumSet<BoxFile.Permission> getPermissions()
public String getExtension()
public boolean getIsPackage()
public BoxFileVersion getVersion()
public URL getPreviewLink()
public boolean getIsWatermarked()
public Metadata getMetadata(String templateName, String scope)
templateName
- the metadata template type name.scope
- the scope of the template (usually "global" or "enterprise").protected void parseJSONMember(JsonObject.Member member)
BoxJSONObject
Subclasses should override this method in order to parse any JSON members it knows about. This method is a no-op by default.
parseJSONMember
in class BoxItem.Info
member
- the JSON member to be parsed.