Package com.dropbox.core.v2.sharing
Class LinkPermissions.Builder
- java.lang.Object
- 
- com.dropbox.core.v2.sharing.LinkPermissions.Builder
 
- 
- Enclosing class:
- LinkPermissions
 
 public static class LinkPermissions.Builder extends java.lang.ObjectBuilder 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 Modifier Constructor Description protectedBuilder(boolean canRevoke, java.util.List<VisibilityPolicy> visibilityPolicies, boolean canSetExpiry, boolean canRemoveExpiry, boolean allowDownload, boolean canAllowDownload, boolean canDisallowDownload, boolean allowComments, boolean teamRestrictsComments)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description LinkPermissionsbuild()Builds an instance ofLinkPermissionsconfigured with this builder's valuesLinkPermissions.BuilderwithAudienceOptions(java.util.List<LinkAudienceOption> audienceOptions)Set value for optional field.LinkPermissions.BuilderwithCanRemovePassword(java.lang.Boolean canRemovePassword)Set value for optional field.LinkPermissions.BuilderwithCanSetPassword(java.lang.Boolean canSetPassword)Set value for optional field.LinkPermissions.BuilderwithCanUseExtendedSharingControls(java.lang.Boolean canUseExtendedSharingControls)Set value for optional field.LinkPermissions.BuilderwithEffectiveAudience(LinkAudience effectiveAudience)Set value for optional field.LinkPermissions.BuilderwithLinkAccessLevel(LinkAccessLevel linkAccessLevel)Set value for optional field.LinkPermissions.BuilderwithRequestedVisibility(RequestedVisibility requestedVisibility)Set value for optional field.LinkPermissions.BuilderwithRequirePassword(java.lang.Boolean requirePassword)Set value for optional field.LinkPermissions.BuilderwithResolvedVisibility(ResolvedVisibility resolvedVisibility)Set value for optional field.LinkPermissions.BuilderwithRevokeFailureReason(SharedLinkAccessFailureReason revokeFailureReason)Set value for optional field.
 
- 
- 
- 
Field Detail- 
canRevokeprotected final boolean canRevoke 
 - 
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 
 - 
resolvedVisibilityprotected ResolvedVisibility resolvedVisibility 
 - 
requestedVisibilityprotected RequestedVisibility requestedVisibility 
 - 
revokeFailureReasonprotected SharedLinkAccessFailureReason revokeFailureReason 
 - 
effectiveAudienceprotected LinkAudience effectiveAudience 
 - 
linkAccessLevelprotected LinkAccessLevel linkAccessLevel 
 - 
audienceOptionsprotected java.util.List<LinkAudienceOption> audienceOptions 
 - 
canSetPasswordprotected java.lang.Boolean canSetPassword 
 - 
canRemovePasswordprotected java.lang.Boolean canRemovePassword 
 - 
requirePasswordprotected java.lang.Boolean requirePassword 
 - 
canUseExtendedSharingControlsprotected java.lang.Boolean canUseExtendedSharingControls 
 
- 
 - 
Constructor Detail- 
Builderprotected Builder(boolean canRevoke, java.util.List<VisibilityPolicy> visibilityPolicies, boolean canSetExpiry, boolean canRemoveExpiry, boolean allowDownload, boolean canAllowDownload, boolean canDisallowDownload, boolean allowComments, boolean teamRestrictsComments)
 
- 
 - 
Method Detail- 
withResolvedVisibilitypublic LinkPermissions.Builder withResolvedVisibility(ResolvedVisibility resolvedVisibility) Set value for optional field.- Parameters:
- 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.
- Returns:
- this builder
 
 - 
withRequestedVisibilitypublic LinkPermissions.Builder withRequestedVisibility(RequestedVisibility requestedVisibility) Set value for optional field.- Parameters:
- 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- LinkPermissions.getResolvedVisibility(). This is shown only if the caller is the link's owner and resolved_visibility is returned instead of effective_audience.
- Returns:
- this builder
 
 - 
withRevokeFailureReasonpublic LinkPermissions.Builder withRevokeFailureReason(SharedLinkAccessFailureReason revokeFailureReason) Set value for optional field.- Parameters:
- revokeFailureReason- The failure reason for revoking the link. This field will only be present if the- LinkPermissions.getCanRevoke()is- false.
- Returns:
- this builder
 
 - 
withEffectiveAudiencepublic LinkPermissions.Builder withEffectiveAudience(LinkAudience effectiveAudience) Set value for optional field.- Parameters:
- effectiveAudience- The type of audience who can benefit from the access level specified by the `link_access_level` field.
- Returns:
- this builder
 
 - 
withLinkAccessLevelpublic LinkPermissions.Builder withLinkAccessLevel(LinkAccessLevel linkAccessLevel) Set value for optional field.- Parameters:
- 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.
- Returns:
- this builder
 
 - 
withAudienceOptionspublic LinkPermissions.Builder withAudienceOptions(java.util.List<LinkAudienceOption> audienceOptions) Set value for optional field.- Parameters:
- audienceOptions- A list of link audience options the user might be able to set as the new audience. Must not contain a- nullitem.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withCanSetPasswordpublic LinkPermissions.Builder withCanSetPassword(java.lang.Boolean canSetPassword) Set value for optional field.- Parameters:
- canSetPassword- Whether the user can set a password for the link.
- Returns:
- this builder
 
 - 
withCanRemovePasswordpublic LinkPermissions.Builder withCanRemovePassword(java.lang.Boolean canRemovePassword) Set value for optional field.- Parameters:
- canRemovePassword- Whether the user can remove the password of the link.
- Returns:
- this builder
 
 - 
withRequirePasswordpublic LinkPermissions.Builder withRequirePassword(java.lang.Boolean requirePassword) Set value for optional field.- Parameters:
- requirePassword- Whether the user is required to provide a password to view the link.
- Returns:
- this builder
 
 - 
withCanUseExtendedSharingControlspublic LinkPermissions.Builder withCanUseExtendedSharingControls(java.lang.Boolean canUseExtendedSharingControls) Set value for optional field.- Parameters:
- canUseExtendedSharingControls- Whether the user can use extended sharing controls, based on their account type.
- Returns:
- this builder
 
 - 
buildpublic LinkPermissions build() Builds an instance ofLinkPermissionsconfigured with this builder's values- Returns:
- new instance of LinkPermissions
 
 
- 
 
-