public class CloudFileAction extends Object
false and the caller code should apply default logic for the file. PasteManageComponent and MoveNodeManageComponent
(state of ECMS 4.0.4).| Modifier and Type | Field and Description |
|---|---|
protected javax.jcr.Node |
destNode
The dest node.
|
protected String |
destPath
The dest path.
|
protected String |
destWorkspace
The dest path.
|
protected String[] |
emptyParams
The empty params.
|
protected javax.jcr.Node |
link
The link.
|
protected static org.exoplatform.services.log.Log |
LOG
The Constant LOG.
|
protected boolean |
move
The move.
|
protected Set<javax.jcr.Node> |
srcNodes
Set of source nodes for the operation.
|
protected org.exoplatform.ecm.webui.component.explorer.UIJCRExplorer |
uiExplorer
The ui explorer.
|
| Constructor and Description |
|---|
CloudFileAction(org.exoplatform.ecm.webui.component.explorer.UIJCRExplorer uiExplorer)
Instantiates a new cloud file action.
|
| Modifier and Type | Method and Description |
|---|---|
CloudFileAction |
addSource(javax.jcr.Node srcNode)
Add source file (target file).
|
CloudFileAction |
addSource(String srcInfo)
Add source file path (path to target file).
|
CloudFileAction |
addSource(String srcWorkspace,
String srcPath)
Add source file by its wokrspace name and path.
|
boolean |
apply()
Apply an action for all added source files: move, copy or link from source to destination.
|
javax.jcr.Node |
getDestinationNode()
Node of already set destination or
null if not yet set. |
String |
getDestinationWorkspace()
Workspace of already set destination or
null if not yet set. |
String |
getDestonationPath()
Path of already set destination or
null if not yet set. |
javax.jcr.Node |
getLink()
Return symlink-node created by
apply() method if it returned true. |
protected javax.jcr.Node |
getNodeByInfo(String pathInfo,
boolean giveTarget)
Gets the node by info.
|
protected javax.jcr.Node |
getNodeByPath(String workspace,
String path,
boolean giveTarget)
Gets the node by path.
|
CloudFileAction |
move()
Link behaviour as instead of "move" operation.
|
void |
rollback()
Rollback the symlink at its destination in JCR.
|
CloudFileAction |
setDestination(javax.jcr.Node destNode)
Set link destination node.
|
CloudFileAction |
setDestination(String destInfo)
Set path of link destination.
|
protected static final org.exoplatform.services.log.Log LOG
protected final String[] emptyParams
protected final org.exoplatform.ecm.webui.component.explorer.UIJCRExplorer uiExplorer
protected final Set<javax.jcr.Node> srcNodes
protected String destWorkspace
protected String destPath
protected javax.jcr.Node destNode
protected javax.jcr.Node link
protected boolean move
public CloudFileAction(org.exoplatform.ecm.webui.component.explorer.UIJCRExplorer uiExplorer)
uiExplorer - the ui explorerpublic CloudFileAction addSource(javax.jcr.Node srcNode)
srcNode - Nodepublic CloudFileAction addSource(String srcInfo) throws Exception
public CloudFileAction addSource(String srcWorkspace, String srcPath) throws Exception
public CloudFileAction setDestination(javax.jcr.Node destNode) throws Exception
destNode - NodeException - the exceptionpublic CloudFileAction setDestination(String destInfo) throws Exception
public CloudFileAction move()
public javax.jcr.Node getLink()
apply() method if it returned true. This method has
sense only after calling the mentioned method, otherwise this method returns null.Node or null if link not yet created or creation wasn't successful.public String getDestinationWorkspace()
null if not yet set.Stringpublic String getDestonationPath()
null if not yet set.Stringpublic javax.jcr.Node getDestinationNode()
null if not yet set.Nodepublic void rollback()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - the repository exceptionpublic boolean apply()
throws CloudFileActionException,
Exception
true if all sources were linked in destination successfully, false
otherwise. If nothing applied return false also.CloudFileActionException - if destination cannot be created locally, this exception will contain
detailed message and a internationalized text for WebUI application.Exception - the exceptionprotected javax.jcr.Node getNodeByInfo(String pathInfo, boolean giveTarget) throws Exception
pathInfo - the path infogiveTarget - the give targetException - the exceptionCopyright © 2003–2016 eXo Platform SAS. All rights reserved.