Class SharedFolderMetadata

java.lang.Object
com.dropbox.core.v2.sharing.SharedFolderMetadataBase
com.dropbox.core.v2.sharing.SharedFolderMetadata

public class SharedFolderMetadata extends SharedFolderMetadataBase
The metadata which includes basic information about the shared folder.
  • Field Details

    • linkMetadata

      @Nullable protected final SharedContentLinkMetadata linkMetadata
    • name

      @Nonnull protected final String name
    • permissions

      @Nullable protected final List<FolderPermission> permissions
    • policy

      @Nonnull protected final FolderPolicy policy
    • previewUrl

      @Nonnull protected final String previewUrl
    • sharedFolderId

      @Nonnull protected final String sharedFolderId
    • timeInvited

      @Nonnull protected final Date timeInvited
    • accessInheritance

      @Nonnull protected final AccessInheritance accessInheritance
    • folderId

      @Nullable protected final String folderId
  • Constructor Details

    • SharedFolderMetadata

      public SharedFolderMetadata(@Nonnull AccessLevel accessType, boolean isInsideTeamFolder, boolean isTeamFolder, @Nonnull String name, @Nonnull FolderPolicy policy, @Nonnull String previewUrl, @Nonnull String sharedFolderId, @Nonnull Date timeInvited, @Nullable List<String> ownerDisplayNames, @Nullable Team ownerTeam, @Nullable String parentSharedFolderId, @Nullable String pathDisplay, @Nullable String pathLower, @Nullable String parentFolderName, @Nullable SharedContentLinkMetadata linkMetadata, @Nullable List<FolderPermission> permissions, @Nonnull AccessInheritance accessInheritance, @Nullable String folderId)
      The metadata which includes basic information about the shared folder.

      Use newBuilder(com.dropbox.core.v2.sharing.AccessLevel,boolean,boolean,java.lang.String,com.dropbox.core.v2.sharing.FolderPolicy,java.lang.String,java.lang.String,java.util.Date) to create instances of this class without specifying values for all optional fields.

      Parameters:
      accessType - The current user's access level for this shared folder. Must not be null.
      isInsideTeamFolder - Whether this folder is inside of a team folder.
      isTeamFolder - Whether this folder is a team folder.
      name - The name of the this shared folder. Must not be null.
      policy - Policies governing this shared folder. Must not be null.
      previewUrl - URL for displaying a web preview of the shared folder. Must not be null.
      sharedFolderId - The ID of the shared folder. Must match pattern "[-_0-9a-zA-Z:]+" and not be null.
      timeInvited - Timestamp indicating when the current user was invited to this shared folder. Must not be null.
      ownerDisplayNames - The display names of the users that own the folder. If the folder is part of a team folder, the display names of the team admins are also included. Absent if the owner display names cannot be fetched. Must not contain a null item.
      ownerTeam - The team that owns the folder. This field is not present if the folder is not owned by a team.
      parentSharedFolderId - The ID of the parent shared folder. This field is present only if the folder is contained within another shared folder. Must match pattern "[-_0-9a-zA-Z:]+".
      pathDisplay - The full path of this shared folder. Absent for unmounted folders.
      pathLower - The lower-cased full path of this shared folder. Absent for unmounted folders.
      parentFolderName - Display name for the parent folder.
      linkMetadata - The metadata of the shared content link to this shared folder. Absent if there is no link on the folder. This is for an unreleased feature so it may not be returned yet.
      permissions - Actions the current user may perform on the folder and its contents. The set of permissions corresponds to the FolderActions in the request. Must not contain a null item.
      accessInheritance - Whether the folder inherits its members from its parent. Must not be null.
      folderId - The ID of the content. Must have length of at least 4 and match pattern "id:.+".
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • SharedFolderMetadata

      public SharedFolderMetadata(@Nonnull AccessLevel accessType, boolean isInsideTeamFolder, boolean isTeamFolder, @Nonnull String name, @Nonnull FolderPolicy policy, @Nonnull String previewUrl, @Nonnull String sharedFolderId, @Nonnull Date timeInvited)
      The metadata which includes basic information about the shared folder.

      The default values for unset fields will be used.

      Parameters:
      accessType - The current user's access level for this shared folder. Must not be null.
      isInsideTeamFolder - Whether this folder is inside of a team folder.
      isTeamFolder - Whether this folder is a team folder.
      name - The name of the this shared folder. Must not be null.
      policy - Policies governing this shared folder. Must not be null.
      previewUrl - URL for displaying a web preview of the shared folder. Must not be null.
      sharedFolderId - The ID of the shared folder. Must match pattern "[-_0-9a-zA-Z:]+" and not be null.
      timeInvited - Timestamp indicating when the current user was invited to this shared folder. Must not be null.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getAccessType

      @Nonnull public AccessLevel getAccessType()
      The current user's access level for this shared folder.
      Overrides:
      getAccessType in class SharedFolderMetadataBase
      Returns:
      value for this field, never null.
    • getIsInsideTeamFolder

      public boolean getIsInsideTeamFolder()
      Whether this folder is inside of a team folder.
      Overrides:
      getIsInsideTeamFolder in class SharedFolderMetadataBase
      Returns:
      value for this field.
    • getIsTeamFolder

      public boolean getIsTeamFolder()
      Whether this folder is a team folder.
      Overrides:
      getIsTeamFolder in class SharedFolderMetadataBase
      Returns:
      value for this field.
    • getName

      @Nonnull public String getName()
      The name of the this shared folder.
      Returns:
      value for this field, never null.
    • getPolicy

      @Nonnull public FolderPolicy getPolicy()
      Policies governing this shared folder.
      Returns:
      value for this field, never null.
    • getPreviewUrl

      @Nonnull public String getPreviewUrl()
      URL for displaying a web preview of the shared folder.
      Returns:
      value for this field, never null.
    • getSharedFolderId

      @Nonnull public String getSharedFolderId()
      The ID of the shared folder.
      Returns:
      value for this field, never null.
    • getTimeInvited

      @Nonnull public Date getTimeInvited()
      Timestamp indicating when the current user was invited to this shared folder.
      Returns:
      value for this field, never null.
    • getOwnerDisplayNames

      @Nullable public List<String> getOwnerDisplayNames()
      The display names of the users that own the folder. If the folder is part of a team folder, the display names of the team admins are also included. Absent if the owner display names cannot be fetched.
      Overrides:
      getOwnerDisplayNames in class SharedFolderMetadataBase
      Returns:
      value for this field, or null if not present.
    • getOwnerTeam

      @Nullable public Team getOwnerTeam()
      The team that owns the folder. This field is not present if the folder is not owned by a team.
      Overrides:
      getOwnerTeam in class SharedFolderMetadataBase
      Returns:
      value for this field, or null if not present.
    • getParentSharedFolderId

      @Nullable public String getParentSharedFolderId()
      The ID of the parent shared folder. This field is present only if the folder is contained within another shared folder.
      Overrides:
      getParentSharedFolderId in class SharedFolderMetadataBase
      Returns:
      value for this field, or null if not present.
    • getPathDisplay

      @Nullable public String getPathDisplay()
      The full path of this shared folder. Absent for unmounted folders.
      Overrides:
      getPathDisplay in class SharedFolderMetadataBase
      Returns:
      value for this field, or null if not present.
    • getPathLower

      @Nullable public String getPathLower()
      The lower-cased full path of this shared folder. Absent for unmounted folders.
      Overrides:
      getPathLower in class SharedFolderMetadataBase
      Returns:
      value for this field, or null if not present.
    • getParentFolderName

      @Nullable public String getParentFolderName()
      Display name for the parent folder.
      Overrides:
      getParentFolderName in class SharedFolderMetadataBase
      Returns:
      value for this field, or null if not present.
    • getLinkMetadata

      @Nullable public SharedContentLinkMetadata getLinkMetadata()
      The metadata of the shared content link to this shared folder. Absent if there is no link on the folder. This is for an unreleased feature so it may not be returned yet.
      Returns:
      value for this field, or null if not present.
    • getPermissions

      @Nullable public List<FolderPermission> getPermissions()
      Actions the current user may perform on the folder and its contents. The set of permissions corresponds to the FolderActions in the request.
      Returns:
      value for this field, or null if not present.
    • getAccessInheritance

      @Nonnull public AccessInheritance getAccessInheritance()
      Whether the folder inherits its members from its parent.
      Returns:
      value for this field, or null if not present. Defaults to AccessInheritance.INHERIT.
    • getFolderId

      @Nullable public String getFolderId()
      The ID of the content.
      Returns:
      value for this field, or null if not present.
    • newBuilder

      public static SharedFolderMetadata.Builder newBuilder(AccessLevel accessType, boolean isInsideTeamFolder, boolean isTeamFolder, String name, FolderPolicy policy, String previewUrl, String sharedFolderId, Date timeInvited)
      Returns a new builder for creating an instance of this class.
      Parameters:
      accessType - The current user's access level for this shared folder. Must not be null.
      isInsideTeamFolder - Whether this folder is inside of a team folder.
      isTeamFolder - Whether this folder is a team folder.
      name - The name of the this shared folder. Must not be null.
      policy - Policies governing this shared folder. Must not be null.
      previewUrl - URL for displaying a web preview of the shared folder. Must not be null.
      sharedFolderId - The ID of the shared folder. Must match pattern "[-_0-9a-zA-Z:]+" and not be null.
      timeInvited - Timestamp indicating when the current user was invited to this shared folder. Must not be null.
      Returns:
      builder for this class.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class SharedFolderMetadataBase
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class SharedFolderMetadataBase
    • toString

      public String toString()
      Overrides:
      toString in class SharedFolderMetadataBase
    • toStringMultiline

      public String toStringMultiline()
      Returns a String representation of this object formatted for easier readability.

      The returned String may contain newlines.

      Overrides:
      toStringMultiline in class SharedFolderMetadataBase
      Returns:
      Formatted, multiline String representation of this object