Class AbstractCommand
- java.lang.Object
-
- org.jbpm.designer.web.server.menu.connector.commands.AbstractCommand
-
- Direct Known Subclasses:
MakeDirCommand
,MakeFileCommand
,OpenCommand
,PasteCommand
,RemoveAssetCommand
,RenameCommand
,UploadCommand
public abstract class AbstractCommand extends Object
-
-
Constructor Summary
Constructors Constructor Description AbstractCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
_checkName(String n)
void
addParams(org.json.JSONObject retObj)
protected void
checkAlreadyExists(IDiagramProfile profile, String fileName, String current)
protected void
checkUploadFile(String fileName, ByteArrayOutputStream os)
protected void
checkUploadSizes(int uploadSizeOctets)
protected Map<String,Object>
getAssetInfo(IDiagramProfile profile, Asset asset)
List<Map<String,Object>>
getCdc(IDiagramProfile profile, String path, boolean tree)
Map<String,Object>
getCwd(IDiagramProfile profile, String path, boolean tree)
protected Map<String,Object>
getDirectoryInfo(IDiagramProfile profile, Directory dir)
Map<String,Object>
getTree(IDiagramProfile profile, String path, boolean tree)
org.json.JSONObject
listContent(IDiagramProfile profile, String target, String current, boolean tree)
org.json.JSONObject
makeDirectory(IDiagramProfile profile, String current, String name, boolean tree)
org.json.JSONObject
makeFile(IDiagramProfile profile, String current, String name, boolean tree)
org.json.JSONObject
moveDirectoryOrAsset(IDiagramProfile profile, String name, String target, String current, boolean tree)
org.json.JSONObject
pasteDirectoriesOrAssets(IDiagramProfile profile, String current, List<String> targets, String cut, String dst, String src, boolean tree)
org.json.JSONObject
removeAssets(IDiagramProfile profile, String current, List<String> targets, boolean tree)
org.json.JSONObject
uploadFiles(IDiagramProfile profile, String current, List<org.apache.commons.fileupload.FileItemStream> listFiles, List<ByteArrayOutputStream> listFileStreams, boolean tree)
-
-
-
Method Detail
-
listContent
public org.json.JSONObject listContent(IDiagramProfile profile, String target, String current, boolean tree) throws Exception
- Throws:
Exception
-
pasteDirectoriesOrAssets
public org.json.JSONObject pasteDirectoriesOrAssets(IDiagramProfile profile, String current, List<String> targets, String cut, String dst, String src, boolean tree) throws Exception
- Throws:
Exception
-
moveDirectoryOrAsset
public org.json.JSONObject moveDirectoryOrAsset(IDiagramProfile profile, String name, String target, String current, boolean tree) throws Exception
- Throws:
Exception
-
removeAssets
public org.json.JSONObject removeAssets(IDiagramProfile profile, String current, List<String> targets, boolean tree) throws Exception
- Throws:
Exception
-
uploadFiles
public org.json.JSONObject uploadFiles(IDiagramProfile profile, String current, List<org.apache.commons.fileupload.FileItemStream> listFiles, List<ByteArrayOutputStream> listFileStreams, boolean tree) throws Exception
- Throws:
Exception
-
makeDirectory
public org.json.JSONObject makeDirectory(IDiagramProfile profile, String current, String name, boolean tree) throws Exception
- Throws:
Exception
-
makeFile
public org.json.JSONObject makeFile(IDiagramProfile profile, String current, String name, boolean tree) throws Exception
- Throws:
Exception
-
getTree
public Map<String,Object> getTree(IDiagramProfile profile, String path, boolean tree) throws Exception
- Throws:
Exception
-
getCdc
public List<Map<String,Object>> getCdc(IDiagramProfile profile, String path, boolean tree) throws Exception
- Throws:
Exception
-
getCwd
public Map<String,Object> getCwd(IDiagramProfile profile, String path, boolean tree) throws Exception
- Throws:
Exception
-
getDirectoryInfo
protected Map<String,Object> getDirectoryInfo(IDiagramProfile profile, Directory dir)
-
getAssetInfo
protected Map<String,Object> getAssetInfo(IDiagramProfile profile, Asset asset)
-
checkUploadFile
protected void checkUploadFile(String fileName, ByteArrayOutputStream os) throws Exception
- Throws:
Exception
-
checkAlreadyExists
protected void checkAlreadyExists(IDiagramProfile profile, String fileName, String current) throws Exception
- Throws:
Exception
-
checkUploadSizes
protected void checkUploadSizes(int uploadSizeOctets) throws Exception
- Throws:
Exception
-
_checkName
public boolean _checkName(String n)
-
-