Class JCRLocalDropboxDrive.MetadataInfo
- java.lang.Object
-
- org.exoplatform.clouddrive.dropbox.JCRLocalDropboxDrive.MetadataInfo
-
- Direct Known Subclasses:
JCRLocalDropboxDrive.DeletedInfo,JCRLocalDropboxDrive.ItemInfo,JCRLocalDropboxDrive.UnknownInfo
- Enclosing class:
- JCRLocalDropboxDrive
protected abstract class JCRLocalDropboxDrive.MetadataInfo extends Object
Dropbox item helper to extract info from its metadata object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classJCRLocalDropboxDrive.MetadataInfo.ParentInfoHierarchical parent info (without item ID inJCRLocalDropboxDrive.MetadataInfo.ParentInfo.getId()).
-
Constructor Summary
Constructors Modifier Constructor Description protectedMetadataInfo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract JCRLocalDropboxDrive.FileInfoasFile()As file.protected abstract JCRLocalDropboxDrive.FolderInfoasFolder()As folder.protected abstract JCRLocalDropboxDrive.ItemInfoasItem()As item.protected StringgetName()Gets the name (in lower case as in SDK path).protected StringgetParentPath()Gets the parent path (in lower case as used in SDK).protected StringgetParentPathDisplay()Gets the parent path display.protected abstract StringgetPath()Gets the lower path.protected abstract StringgetPathDisplay()Gets the display path.protected abstract StringgetTitle()Gets the title displayed to users.protected abstract booleanisDeleted()Checks if is deleted.protected abstract booleanisFile()Checks if is file.protected abstract booleanisFolder()Checks if is folder.protected abstract booleanisItem()Checks if is item.protected booleanisRoot()Checks if is root.protected JCRLocalDropboxDrive.MetadataInfo.ParentInfoparent()Return a location of this item parent (but w/o item ID).protected String[]splitPath(String path)Split given Dropbox path on parent path and a name.
-
-
-
Method Detail
-
splitPath
protected String[] splitPath(String path)
Split given Dropbox path on parent path and a name.- Parameters:
path- the path- Returns:
- the arrays of strings with parent path and name, parent can be
nullif it's root
-
getParentPathDisplay
protected final String getParentPathDisplay()
Gets the parent path display.- Returns:
- the parent path display
-
getParentPath
protected final String getParentPath()
Gets the parent path (in lower case as used in SDK).- Returns:
- the parent path in lower case
-
getName
protected final String getName()
Gets the name (in lower case as in SDK path). It can differ withgetTitle().- Returns:
- the name
-
parent
protected JCRLocalDropboxDrive.MetadataInfo.ParentInfo parent()
Return a location of this item parent (but w/o item ID). This method should be used with limitation, only for back-lookup purpose where searching existing local ancestor node by Dropbox path. ThisJCRLocalDropboxDrive.ItemInfocannot be used for saving in local storage!- Returns:
- the
JCRLocalDropboxDrive.MetadataInfo.ParentInfoinstance
-
asFile
protected abstract JCRLocalDropboxDrive.FileInfo asFile()
As file.- Returns:
- the file info
-
asFolder
protected abstract JCRLocalDropboxDrive.FolderInfo asFolder()
As folder.- Returns:
- the folder info
-
asItem
protected abstract JCRLocalDropboxDrive.ItemInfo asItem()
As item.- Returns:
- the item info
-
isRoot
protected final boolean isRoot()
Checks if is root.- Returns:
- true, if is root
-
isFolder
protected abstract boolean isFolder()
Checks if is folder.- Returns:
- true, if is folder or root of the drive
-
isFile
protected abstract boolean isFile()
Checks if is file.- Returns:
- true, if is file
-
isItem
protected abstract boolean isItem()
Checks if is item.- Returns:
- true, if is item
-
isDeleted
protected abstract boolean isDeleted()
Checks if is deleted.- Returns:
- true, if is deleted
-
getTitle
protected abstract String getTitle()
Gets the title displayed to users.- Returns:
- the title
-
getPath
protected abstract String getPath()
Gets the lower path.- Returns:
- the lower path
-
getPathDisplay
protected abstract String getPathDisplay()
Gets the display path.- Returns:
- the display path
-
-