Class JCRLocalDropboxDrive.DropboxDrive.LocalItem
- java.lang.Object
-
- org.exoplatform.clouddrive.dropbox.JCRLocalDropboxDrive.DropboxDrive.LocalItem
-
- Enclosing class:
- JCRLocalDropboxDrive.DropboxDrive
protected class JCRLocalDropboxDrive.DropboxDrive.LocalItem extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists()Tells if node of this item exists locally.javax.jcr.Nodefetch(JCRLocalDropboxDrive.Changes changes)Fetch the item state from remote side.javax.jcr.NodegetNode()Gets the local node of this item.javax.jcr.Nodemove(JCRLocalDropboxDrive.ItemInfo toItem, JCRLocalDropboxDrive.Changes changes)Move this local item to a location reflecting given remote item and update its state.StringremoveNode()Removes the item node and return its path in local storage (JCR) ornullif nothing found.javax.jcr.Nodeupdate(JCRLocalDropboxDrive.ItemInfo item, JCRLocalDropboxDrive.Changes changes)Update this local item with remote item state.
-
-
-
Method Detail
-
exists
public boolean exists()
Tells if node of this item exists locally.- Returns:
- true, if item exists locally, false otherwise
-
getNode
public javax.jcr.Node getNode()
Gets the local node of this item. If local item doesn't exist, then this method returnsnulland it's possible to call fetch(Changes) to fetch the item state from cloud side or apply existing state from metadata in update(ItemInfo, Changes).- Returns:
- the node, can be
null
-
removeNode
public String removeNode() throws javax.jcr.RepositoryException
Removes the item node and return its path in local storage (JCR) ornullif nothing found.- Returns:
- the string or
nullif nothing removed - Throws:
javax.jcr.RepositoryException- the repository exception
-
update
public javax.jcr.Node update(JCRLocalDropboxDrive.ItemInfo item, JCRLocalDropboxDrive.Changes changes) throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.CloudDriveException
Update this local item with remote item state.- Parameters:
item- the itemchanges- the changes- Returns:
- the node
- Throws:
javax.jcr.RepositoryException- the repository exceptionorg.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exception
-
move
public javax.jcr.Node move(JCRLocalDropboxDrive.ItemInfo toItem, JCRLocalDropboxDrive.Changes changes) throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.CloudDriveException
Move this local item to a location reflecting given remote item and update its state.- Parameters:
toItem- the to itemchanges- the changes- Returns:
- the node
- Throws:
javax.jcr.RepositoryException- the repository exceptionorg.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exception
-
fetch
public javax.jcr.Node fetch(JCRLocalDropboxDrive.Changes changes) throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.CloudDriveException
Fetch the item state from remote side. Method returns a node of the local cloud item at the path ornullif node not found remotely or its dbxPath was changed.- Parameters:
changes- the changes command related to the operation, notnull- Returns:
- the
Nodeinstance of local cloud file ornullif no node updated. - Throws:
javax.jcr.RepositoryException- the repository exceptionorg.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exception
-
-