public class BoxSharedLink extends BoxJSONObject
Modifier and Type | Class and Description |
---|---|
static class |
BoxSharedLink.Access
Enumerates the possible access levels that can be set on a shared link.
|
static class |
BoxSharedLink.Permissions
Contains permissions fields that can be set on a shared link.
|
Constructor and Description |
---|
BoxSharedLink()
Constructs a BoxSharedLink with default settings.
|
BoxSharedLink(String json)
Constructs a BoxSharedLink from a JSON string.
|
Modifier and Type | Method and Description |
---|---|
BoxSharedLink.Access |
getAccess()
Gets the access level of this shared link.
|
long |
getDownloadCount()
Gets the number of times that this shared link has been downloaded.
|
String |
getDownloadURL()
Gets the direct download URL of this shared link.
|
BoxSharedLink.Access |
getEffectiveAccess()
Gets the effective access level of this shared link.
|
boolean |
getIsPasswordEnabled()
Gets whether or not a password is enabled on this shared link.
|
protected JsonObject |
getPendingJSONObject()
Gets a JsonObject containing any pending changes to this object that can be sent back to the Box API.
|
BoxSharedLink.Permissions |
getPermissions()
Gets the permissions associated with this shared link.
|
long |
getPreviewCount()
Gets the number of times that this shared link has been previewed.
|
static String |
getSharedLinkHeaderValue(String sharedLink,
String password) |
Date |
getUnsharedDate()
Gets the time that this shared link will be deactivated.
|
String |
getURL()
Get the URL of this shared link.
|
String |
getVanityName()
Returns vanity name used to create vanity URL.
|
String |
getVanityURL()
Gets the vanity URL of this shared link.
|
void |
setAccess(BoxSharedLink.Access access)
Sets the access level of this shared link.
|
void |
setPassword(String password)
Sets the password of this shared link.
|
void |
setPermissions(BoxSharedLink.Permissions permissions)
Sets the permissions associated with this shared link.
|
void |
setUnsharedDate(Date unsharedDate)
Sets the time that this shared link will be deactivated.
|
void |
setVanityName(String vanityName)
Sets vanity name used to create vanity URL.
|
clearPendingChanges, getJson, getPendingChanges, getPendingChangesAsJsonObject
public BoxSharedLink()
public BoxSharedLink(String json)
json
- the JSON encoded shared link.public String getURL()
public String getDownloadURL()
public String getVanityURL()
public String getVanityName()
public void setVanityName(String vanityName)
vanityName
- Vanity name. Vanity name must be at least 12 characters long.public boolean getIsPasswordEnabled()
public Date getUnsharedDate()
public void setUnsharedDate(Date unsharedDate)
unsharedDate
- the time that this shared link will be deactivated.public long getDownloadCount()
public long getPreviewCount()
public BoxSharedLink.Access getAccess()
public void setAccess(BoxSharedLink.Access access)
access
- the new access level of this shared link.public void setPassword(String password)
password
- the password of this shared link.public BoxSharedLink.Access getEffectiveAccess()
Note there is no setEffectiveAccess metho becaused this cannot be changed via the API
public BoxSharedLink.Permissions getPermissions()
public void setPermissions(BoxSharedLink.Permissions permissions)
permissions
- the new permissions for this shared link.protected JsonObject getPendingJSONObject()
BoxJSONObject
getPendingJSONObject
in class BoxJSONObject
public static String getSharedLinkHeaderValue(String sharedLink, String password)