|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.clouddrive.ecms.symlink.CloudFileSymlink
public class CloudFileSymlink
Support of Cloud Drive files moving and copying in ECMS. If not a cloud file then this helper return
false and the caller code should apply default logic for the file.
Code parts of this class based on original PasteManageComponent and MoveNodeManageComponent
(state of ECMS
4.0.4).
Created by The eXo Platform SAS.
| Field Summary | |
|---|---|
protected javax.jcr.Node |
destNode
|
protected String |
destPath
|
protected String |
destWorkspace
|
protected javax.jcr.Node |
link
|
protected boolean |
move
|
protected Set<javax.jcr.Node> |
srcNodes
Set of source nodes for the operation. |
protected org.exoplatform.ecm.webui.component.explorer.UIJCRExplorer |
uiExplorer
|
| Constructor Summary | |
|---|---|
CloudFileSymlink(org.exoplatform.ecm.webui.component.explorer.UIJCRExplorer uiExplorer)
|
|
| Method Summary | |
|---|---|
CloudFileSymlink |
addSource(javax.jcr.Node srcNode)
Add source file (target file). |
CloudFileSymlink |
addSource(String srcInfo)
Add source file path (path to target file). |
CloudFileSymlink |
addSource(String srcWorkspace,
String srcPath)
Add source file by its wokrspace name and path. |
boolean |
create()
Create links in destination folder for all added source files. |
protected boolean |
create(javax.jcr.Node srcNode)
|
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 create() method if it returned true. |
protected javax.jcr.Node |
getNodeByInfo(String pathInfo)
|
protected javax.jcr.Node |
getNodeByPath(String workspace,
String path)
|
CloudFileSymlink |
move()
Link behaviour as instead of "move" operation. |
CloudFileSymlink |
setDestination(javax.jcr.Node destNode)
Set link destination node. |
CloudFileSymlink |
setDestination(String destInfo)
Set path of link destination. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public CloudFileSymlink(org.exoplatform.ecm.webui.component.explorer.UIJCRExplorer uiExplorer)
| Method Detail |
|---|
public CloudFileSymlink addSource(javax.jcr.Node srcNode)
srcNode - Node
public CloudFileSymlink addSource(String srcInfo)
throws Exception
srcInfo - String in format of portal request ObjectId, see
UIWorkingArea.FILE_EXPLORER_URL_SYNTAX
Exception - if cannot find node by given path
public CloudFileSymlink addSource(String srcWorkspace,
String srcPath)
throws Exception
srcWorkspace - StringsrcPath - String
Exception
public CloudFileSymlink setDestination(javax.jcr.Node destNode)
throws Exception
destNode - Node
Exception
public CloudFileSymlink setDestination(String destInfo)
throws Exception
destInfo - String in format of portal request ObjectId, see
UIWorkingArea.FILE_EXPLORER_URL_SYNTAX
Exception - if cannot find node by given path or cannot read its metadatapublic CloudFileSymlink move()
public javax.jcr.Node getLink()
create() 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.
Node
public boolean create()
throws CloudFileSymlinkException,
Exception
true if all added links created successfully, false otherwise. If
nothing added return false also.
CloudFileSymlinkException - if link cannot be created logical, this exception will contain detailed
message and a internationalized text for WebUI application.
Exception
protected boolean create(javax.jcr.Node srcNode)
throws CloudFileSymlinkException,
Exception
CloudFileSymlinkException
Exception
protected javax.jcr.Node getNodeByInfo(String pathInfo)
throws Exception
Exception
protected javax.jcr.Node getNodeByPath(String workspace,
String path)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||