Package com.dropbox.core.v2.sharing
Class FolderPolicy
- java.lang.Object
-
- com.dropbox.core.v2.sharing.FolderPolicy
-
public class FolderPolicy extends java.lang.Object
A set of policies governing membership and privileges for a shared folder.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FolderPolicy.Builder
Builder forFolderPolicy
.
-
Field Summary
Fields Modifier and Type Field Description protected AclUpdatePolicy
aclUpdatePolicy
protected MemberPolicy
memberPolicy
protected MemberPolicy
resolvedMemberPolicy
protected SharedLinkPolicy
sharedLinkPolicy
protected ViewerInfoPolicy
viewerInfoPolicy
-
Constructor Summary
Constructors Constructor Description FolderPolicy(AclUpdatePolicy aclUpdatePolicy, SharedLinkPolicy sharedLinkPolicy)
A set of policies governing membership and privileges for a shared folder.FolderPolicy(AclUpdatePolicy aclUpdatePolicy, SharedLinkPolicy sharedLinkPolicy, MemberPolicy memberPolicy, MemberPolicy resolvedMemberPolicy, ViewerInfoPolicy viewerInfoPolicy)
A set of policies governing membership and privileges for a shared folder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
AclUpdatePolicy
getAclUpdatePolicy()
Who can add and remove members from this shared folder.MemberPolicy
getMemberPolicy()
Who can be a member of this shared folder, as set on the folder itself.MemberPolicy
getResolvedMemberPolicy()
Who can be a member of this shared folder, taking into account both the folder and the team-wide policy.SharedLinkPolicy
getSharedLinkPolicy()
Who links can be shared with.ViewerInfoPolicy
getViewerInfoPolicy()
Who can enable/disable viewer info for this shared folder.int
hashCode()
static FolderPolicy.Builder
newBuilder(AclUpdatePolicy aclUpdatePolicy, SharedLinkPolicy sharedLinkPolicy)
Returns a new builder for creating an instance of this class.java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
memberPolicy
@Nullable protected final MemberPolicy memberPolicy
-
resolvedMemberPolicy
@Nullable protected final MemberPolicy resolvedMemberPolicy
-
aclUpdatePolicy
@Nonnull protected final AclUpdatePolicy aclUpdatePolicy
-
sharedLinkPolicy
@Nonnull protected final SharedLinkPolicy sharedLinkPolicy
-
viewerInfoPolicy
@Nullable protected final ViewerInfoPolicy viewerInfoPolicy
-
-
Constructor Detail
-
FolderPolicy
public FolderPolicy(@Nonnull AclUpdatePolicy aclUpdatePolicy, @Nonnull SharedLinkPolicy sharedLinkPolicy, @Nullable MemberPolicy memberPolicy, @Nullable MemberPolicy resolvedMemberPolicy, @Nullable ViewerInfoPolicy viewerInfoPolicy)
A set of policies governing membership and privileges for a shared folder.Use
newBuilder(com.dropbox.core.v2.sharing.AclUpdatePolicy,com.dropbox.core.v2.sharing.SharedLinkPolicy)
to create instances of this class without specifying values for all optional fields.- Parameters:
aclUpdatePolicy
- Who can add and remove members from this shared folder. Must not benull
.sharedLinkPolicy
- Who links can be shared with. Must not benull
.memberPolicy
- Who can be a member of this shared folder, as set on the folder itself. The effective policy may differ from this value if the team-wide policy is more restrictive. Present only if the folder is owned by a team.resolvedMemberPolicy
- Who can be a member of this shared folder, taking into account both the folder and the team-wide policy. This value may differ from that of member_policy if the team-wide policy is more restrictive than the folder policy. Present only if the folder is owned by a team.viewerInfoPolicy
- Who can enable/disable viewer info for this shared folder.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
FolderPolicy
public FolderPolicy(@Nonnull AclUpdatePolicy aclUpdatePolicy, @Nonnull SharedLinkPolicy sharedLinkPolicy)
A set of policies governing membership and privileges for a shared folder.The default values for unset fields will be used.
- Parameters:
aclUpdatePolicy
- Who can add and remove members from this shared folder. Must not benull
.sharedLinkPolicy
- Who links can be shared with. Must not benull
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
-
Method Detail
-
getAclUpdatePolicy
@Nonnull public AclUpdatePolicy getAclUpdatePolicy()
Who can add and remove members from this shared folder.- Returns:
- value for this field, never
null
.
-
getSharedLinkPolicy
@Nonnull public SharedLinkPolicy getSharedLinkPolicy()
Who links can be shared with.- Returns:
- value for this field, never
null
.
-
getMemberPolicy
@Nullable public MemberPolicy getMemberPolicy()
Who can be a member of this shared folder, as set on the folder itself. The effective policy may differ from this value if the team-wide policy is more restrictive. Present only if the folder is owned by a team.- Returns:
- value for this field, or
null
if not present.
-
getResolvedMemberPolicy
@Nullable public MemberPolicy getResolvedMemberPolicy()
Who can be a member of this shared folder, taking into account both the folder and the team-wide policy. This value may differ from that of member_policy if the team-wide policy is more restrictive than the folder policy. Present only if the folder is owned by a team.- Returns:
- value for this field, or
null
if not present.
-
getViewerInfoPolicy
@Nullable public ViewerInfoPolicy getViewerInfoPolicy()
Who can enable/disable viewer info for this shared folder.- Returns:
- value for this field, or
null
if not present.
-
newBuilder
public static FolderPolicy.Builder newBuilder(AclUpdatePolicy aclUpdatePolicy, SharedLinkPolicy sharedLinkPolicy)
Returns a new builder for creating an instance of this class.- Parameters:
aclUpdatePolicy
- Who can add and remove members from this shared folder. Must not benull
.sharedLinkPolicy
- Who links can be shared with. Must not benull
.- Returns:
- builder for this class.
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringMultiline
public 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
-
-