Package com.dropbox.core.v2.sharing
Class LinkPermissions
- java.lang.Object
- 
- com.dropbox.core.v2.sharing.LinkPermissions
 
- 
 public class LinkPermissions extends java.lang.Object
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classLinkPermissions.BuilderBuilder forLinkPermissions.
 - 
Field SummaryFields Modifier and Type Field Description protected booleanallowCommentsprotected booleanallowDownloadprotected java.util.List<LinkAudienceOption>audienceOptionsprotected booleancanAllowDownloadprotected booleancanDisallowDownloadprotected booleancanRemoveExpiryprotected java.lang.BooleancanRemovePasswordprotected booleancanRevokeprotected booleancanSetExpiryprotected java.lang.BooleancanSetPasswordprotected java.lang.BooleancanUseExtendedSharingControlsprotected LinkAudienceeffectiveAudienceprotected LinkAccessLevellinkAccessLevelprotected RequestedVisibilityrequestedVisibilityprotected java.lang.BooleanrequirePasswordprotected ResolvedVisibilityresolvedVisibilityprotected SharedLinkAccessFailureReasonrevokeFailureReasonprotected booleanteamRestrictsCommentsprotected java.util.List<VisibilityPolicy>visibilityPolicies
 - 
Constructor SummaryConstructors Constructor Description LinkPermissions(boolean canRevoke, java.util.List<VisibilityPolicy> visibilityPolicies, boolean canSetExpiry, boolean canRemoveExpiry, boolean allowDownload, boolean canAllowDownload, boolean canDisallowDownload, boolean allowComments, boolean teamRestrictsComments)NoneLinkPermissions(boolean canRevoke, java.util.List<VisibilityPolicy> visibilityPolicies, boolean canSetExpiry, boolean canRemoveExpiry, boolean allowDownload, boolean canAllowDownload, boolean canDisallowDownload, boolean allowComments, boolean teamRestrictsComments, ResolvedVisibility resolvedVisibility, RequestedVisibility requestedVisibility, SharedLinkAccessFailureReason revokeFailureReason, LinkAudience effectiveAudience, LinkAccessLevel linkAccessLevel, java.util.List<LinkAudienceOption> audienceOptions, java.lang.Boolean canSetPassword, java.lang.Boolean canRemovePassword, java.lang.Boolean requirePassword, java.lang.Boolean canUseExtendedSharingControls)UsenewBuilder(boolean,java.util.List<com.dropbox.core.v2.sharing.VisibilityPolicy>,boolean,boolean,boolean,boolean,boolean,boolean,boolean)to create instances of this class without specifying values for all optional fields.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)booleangetAllowComments()Whether comments are enabled for the linked file.booleangetAllowDownload()Whether the link can be downloaded or not.java.util.List<LinkAudienceOption>getAudienceOptions()A list of link audience options the user might be able to set as the new audience.booleangetCanAllowDownload()Whether the user can allow downloads via the link.booleangetCanDisallowDownload()Whether the user can disallow downloads via the link.booleangetCanRemoveExpiry()Whether the user can remove the expiry of the link.java.lang.BooleangetCanRemovePassword()Whether the user can remove the password of the link.booleangetCanRevoke()Whether the caller can revoke the shared link.booleangetCanSetExpiry()Whether the user can set the expiry settings of the link.java.lang.BooleangetCanSetPassword()Whether the user can set a password for the link.java.lang.BooleangetCanUseExtendedSharingControls()Whether the user can use extended sharing controls, based on their account type.LinkAudiencegetEffectiveAudience()The type of audience who can benefit from the access level specified by the `link_access_level` field.LinkAccessLevelgetLinkAccessLevel()The access level that the link will grant to its users.RequestedVisibilitygetRequestedVisibility()The shared link's requested visibility.java.lang.BooleangetRequirePassword()Whether the user is required to provide a password to view the link.ResolvedVisibilitygetResolvedVisibility()The current visibility of the link after considering the shared links policies of the the team (in case the link's owner is part of a team) and the shared folder (in case the linked file is part of a shared folder).SharedLinkAccessFailureReasongetRevokeFailureReason()The failure reason for revoking the link.booleangetTeamRestrictsComments()Whether the team has disabled commenting globally.java.util.List<VisibilityPolicy>getVisibilityPolicies()A list of policies that the user might be able to set for the visibility.inthashCode()static LinkPermissions.BuildernewBuilder(boolean canRevoke, java.util.List<VisibilityPolicy> visibilityPolicies, boolean canSetExpiry, boolean canRemoveExpiry, boolean allowDownload, boolean canAllowDownload, boolean canDisallowDownload, boolean allowComments, boolean teamRestrictsComments)Returns a new builder for creating an instance of this class.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
 
- 
- 
- 
Field Detail- 
resolvedVisibilityprotected final ResolvedVisibility resolvedVisibility 
 - 
requestedVisibilityprotected final RequestedVisibility requestedVisibility 
 - 
canRevokeprotected final boolean canRevoke 
 - 
revokeFailureReasonprotected final SharedLinkAccessFailureReason revokeFailureReason 
 - 
effectiveAudienceprotected final LinkAudience effectiveAudience 
 - 
linkAccessLevelprotected final LinkAccessLevel linkAccessLevel 
 - 
visibilityPoliciesprotected final java.util.List<VisibilityPolicy> visibilityPolicies 
 - 
canSetExpiryprotected final boolean canSetExpiry 
 - 
canRemoveExpiryprotected final boolean canRemoveExpiry 
 - 
allowDownloadprotected final boolean allowDownload 
 - 
canAllowDownloadprotected final boolean canAllowDownload 
 - 
canDisallowDownloadprotected final boolean canDisallowDownload 
 - 
allowCommentsprotected final boolean allowComments 
 - 
teamRestrictsCommentsprotected final boolean teamRestrictsComments 
 - 
audienceOptionsprotected final java.util.List<LinkAudienceOption> audienceOptions 
 - 
canSetPasswordprotected final java.lang.Boolean canSetPassword 
 - 
canRemovePasswordprotected final java.lang.Boolean canRemovePassword 
 - 
requirePasswordprotected final java.lang.Boolean requirePassword 
 - 
canUseExtendedSharingControlsprotected final java.lang.Boolean canUseExtendedSharingControls 
 
- 
 - 
Constructor Detail- 
LinkPermissionspublic LinkPermissions(boolean canRevoke, java.util.List<VisibilityPolicy> visibilityPolicies, boolean canSetExpiry, boolean canRemoveExpiry, boolean allowDownload, boolean canAllowDownload, boolean canDisallowDownload, boolean allowComments, boolean teamRestrictsComments, ResolvedVisibility resolvedVisibility, RequestedVisibility requestedVisibility, SharedLinkAccessFailureReason revokeFailureReason, LinkAudience effectiveAudience, LinkAccessLevel linkAccessLevel, java.util.List<LinkAudienceOption> audienceOptions, java.lang.Boolean canSetPassword, java.lang.Boolean canRemovePassword, java.lang.Boolean requirePassword, java.lang.Boolean canUseExtendedSharingControls)UsenewBuilder(boolean,java.util.List<com.dropbox.core.v2.sharing.VisibilityPolicy>,boolean,boolean,boolean,boolean,boolean,boolean,boolean)to create instances of this class without specifying values for all optional fields.- Parameters:
- canRevoke- Whether the caller can revoke the shared link.
- visibilityPolicies- A list of policies that the user might be able to set for the visibility. Must not contain a- nullitem and not be- null.
- canSetExpiry- Whether the user can set the expiry settings of the link. This refers to the ability to create a new expiry and modify an existing expiry.
- canRemoveExpiry- Whether the user can remove the expiry of the link.
- allowDownload- Whether the link can be downloaded or not.
- canAllowDownload- Whether the user can allow downloads via the link. This refers to the ability to remove a no-download restriction on the link.
- canDisallowDownload- Whether the user can disallow downloads via the link. This refers to the ability to impose a no-download restriction on the link.
- allowComments- Whether comments are enabled for the linked file. This takes the team commenting policy into account.
- teamRestrictsComments- Whether the team has disabled commenting globally.
- resolvedVisibility- The current visibility of the link after considering the shared links policies of the the team (in case the link's owner is part of a team) and the shared folder (in case the linked file is part of a shared folder). This field is shown only if the caller has access to this info (the link's owner always has access to this data). For some links, an effective_audience value is returned instead.
- requestedVisibility- The shared link's requested visibility. This can be overridden by the team and shared folder policies. The final visibility, after considering these policies, can be found in- getResolvedVisibility(). This is shown only if the caller is the link's owner and resolved_visibility is returned instead of effective_audience.
- revokeFailureReason- The failure reason for revoking the link. This field will only be present if the- getCanRevoke()is- false.
- effectiveAudience- The type of audience who can benefit from the access level specified by the `link_access_level` field.
- linkAccessLevel- The access level that the link will grant to its users. A link can grant additional rights to a user beyond their current access level. For example, if a user was invited as a viewer to a file, and then opens a link with `link_access_level` set to `editor`, then they will gain editor privileges. The `link_access_level` is a property of the link, and does not depend on who is calling this API. In particular, `link_access_level` does not take into account the API caller's current permissions to the content.
- audienceOptions- A list of link audience options the user might be able to set as the new audience. Must not contain a- nullitem.
- canSetPassword- Whether the user can set a password for the link.
- canRemovePassword- Whether the user can remove the password of the link.
- requirePassword- Whether the user is required to provide a password to view the link.
- canUseExtendedSharingControls- Whether the user can use extended sharing controls, based on their account type.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
LinkPermissionspublic LinkPermissions(boolean canRevoke, java.util.List<VisibilityPolicy> visibilityPolicies, boolean canSetExpiry, boolean canRemoveExpiry, boolean allowDownload, boolean canAllowDownload, boolean canDisallowDownload, boolean allowComments, boolean teamRestrictsComments)NoneThe default values for unset fields will be used. - Parameters:
- canRevoke- Whether the caller can revoke the shared link.
- visibilityPolicies- A list of policies that the user might be able to set for the visibility. Must not contain a- nullitem and not be- null.
- canSetExpiry- Whether the user can set the expiry settings of the link. This refers to the ability to create a new expiry and modify an existing expiry.
- canRemoveExpiry- Whether the user can remove the expiry of the link.
- allowDownload- Whether the link can be downloaded or not.
- canAllowDownload- Whether the user can allow downloads via the link. This refers to the ability to remove a no-download restriction on the link.
- canDisallowDownload- Whether the user can disallow downloads via the link. This refers to the ability to impose a no-download restriction on the link.
- allowComments- Whether comments are enabled for the linked file. This takes the team commenting policy into account.
- teamRestrictsComments- Whether the team has disabled commenting globally.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 
- 
 - 
Method Detail- 
getCanRevokepublic boolean getCanRevoke() Whether the caller can revoke the shared link.- Returns:
- value for this field.
 
 - 
getVisibilityPoliciespublic java.util.List<VisibilityPolicy> getVisibilityPolicies() A list of policies that the user might be able to set for the visibility.- Returns:
- value for this field, never null.
 
 - 
getCanSetExpirypublic boolean getCanSetExpiry() Whether the user can set the expiry settings of the link. This refers to the ability to create a new expiry and modify an existing expiry.- Returns:
- value for this field.
 
 - 
getCanRemoveExpirypublic boolean getCanRemoveExpiry() Whether the user can remove the expiry of the link.- Returns:
- value for this field.
 
 - 
getAllowDownloadpublic boolean getAllowDownload() Whether the link can be downloaded or not.- Returns:
- value for this field.
 
 - 
getCanAllowDownloadpublic boolean getCanAllowDownload() Whether the user can allow downloads via the link. This refers to the ability to remove a no-download restriction on the link.- Returns:
- value for this field.
 
 - 
getCanDisallowDownloadpublic boolean getCanDisallowDownload() Whether the user can disallow downloads via the link. This refers to the ability to impose a no-download restriction on the link.- Returns:
- value for this field.
 
 - 
getAllowCommentspublic boolean getAllowComments() Whether comments are enabled for the linked file. This takes the team commenting policy into account.- Returns:
- value for this field.
 
 - 
getTeamRestrictsCommentspublic boolean getTeamRestrictsComments() Whether the team has disabled commenting globally.- Returns:
- value for this field.
 
 - 
getResolvedVisibilitypublic ResolvedVisibility getResolvedVisibility() The current visibility of the link after considering the shared links policies of the the team (in case the link's owner is part of a team) and the shared folder (in case the linked file is part of a shared folder). This field is shown only if the caller has access to this info (the link's owner always has access to this data). For some links, an effective_audience value is returned instead.- Returns:
- value for this field, or nullif not present.
 
 - 
getRequestedVisibilitypublic RequestedVisibility getRequestedVisibility() The shared link's requested visibility. This can be overridden by the team and shared folder policies. The final visibility, after considering these policies, can be found ingetResolvedVisibility(). This is shown only if the caller is the link's owner and resolved_visibility is returned instead of effective_audience.- Returns:
- value for this field, or nullif not present.
 
 - 
getRevokeFailureReasonpublic SharedLinkAccessFailureReason getRevokeFailureReason() The failure reason for revoking the link. This field will only be present if thegetCanRevoke()isfalse.- Returns:
- value for this field, or nullif not present.
 
 - 
getEffectiveAudiencepublic LinkAudience getEffectiveAudience() The type of audience who can benefit from the access level specified by the `link_access_level` field.- Returns:
- value for this field, or nullif not present.
 
 - 
getLinkAccessLevelpublic LinkAccessLevel getLinkAccessLevel() The access level that the link will grant to its users. A link can grant additional rights to a user beyond their current access level. For example, if a user was invited as a viewer to a file, and then opens a link with `link_access_level` set to `editor`, then they will gain editor privileges. The `link_access_level` is a property of the link, and does not depend on who is calling this API. In particular, `link_access_level` does not take into account the API caller's current permissions to the content.- Returns:
- value for this field, or nullif not present.
 
 - 
getAudienceOptionspublic java.util.List<LinkAudienceOption> getAudienceOptions() A list of link audience options the user might be able to set as the new audience.- Returns:
- value for this field, or nullif not present.
 
 - 
getCanSetPasswordpublic java.lang.Boolean getCanSetPassword() Whether the user can set a password for the link.- Returns:
- value for this field, or nullif not present.
 
 - 
getCanRemovePasswordpublic java.lang.Boolean getCanRemovePassword() Whether the user can remove the password of the link.- Returns:
- value for this field, or nullif not present.
 
 - 
getRequirePasswordpublic java.lang.Boolean getRequirePassword() Whether the user is required to provide a password to view the link.- Returns:
- value for this field, or nullif not present.
 
 - 
getCanUseExtendedSharingControlspublic java.lang.Boolean getCanUseExtendedSharingControls() Whether the user can use extended sharing controls, based on their account type.- Returns:
- value for this field, or nullif not present.
 
 - 
newBuilderpublic static LinkPermissions.Builder newBuilder(boolean canRevoke, java.util.List<VisibilityPolicy> visibilityPolicies, boolean canSetExpiry, boolean canRemoveExpiry, boolean allowDownload, boolean canAllowDownload, boolean canDisallowDownload, boolean allowComments, boolean teamRestrictsComments) Returns a new builder for creating an instance of this class.- Parameters:
- canRevoke- Whether the caller can revoke the shared link.
- visibilityPolicies- A list of policies that the user might be able to set for the visibility. Must not contain a- nullitem and not be- null.
- canSetExpiry- Whether the user can set the expiry settings of the link. This refers to the ability to create a new expiry and modify an existing expiry.
- canRemoveExpiry- Whether the user can remove the expiry of the link.
- allowDownload- Whether the link can be downloaded or not.
- canAllowDownload- Whether the user can allow downloads via the link. This refers to the ability to remove a no-download restriction on the link.
- canDisallowDownload- Whether the user can disallow downloads via the link. This refers to the ability to impose a no-download restriction on the link.
- allowComments- Whether comments are enabled for the linked file. This takes the team commenting policy into account.
- teamRestrictsComments- Whether the team has disabled commenting globally.
- Returns:
- builder for this class.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
toStringMultilinepublic java.lang.String toStringMultiline() Returns a String representation of this object formatted for easier readability.The returned String may contain newlines. - Returns:
- Formatted, multiline String representation of this object
 
 
- 
 
-