org.opengroupware.jogi.connect.xmlrpc
Class XmlRpcProject
java.lang.Object
java.util.Observable
org.opengroupware.jogi.connect.xmlrpc.XmlRpcBaseDocument
org.opengroupware.jogi.connect.xmlrpc.XmlRpcProject
- All Implemented Interfaces:
- Project
- public class XmlRpcProject
- extends XmlRpcBaseDocument
- implements Project
- Author:
- Werner Schuster (murphee)
Method Summary |
boolean |
assignToProject(Job job)
|
boolean |
assignToProject(Job job,
java.lang.String log_text)
|
Attribute |
attr(java.lang.String path)
|
java.util.List |
attr(java.lang.String[] paths)
|
protected boolean |
callJobFunction(java.lang.String funcName,
Job job,
java.lang.String logtext)
|
boolean |
cd(java.lang.String path)
|
protected boolean |
checkNewContent(java.util.Map new_content)
This method checks whether the provided Map contains a valid
document. |
boolean |
cp(java.lang.String[] files,
java.lang.String target)
|
boolean |
cp(java.lang.String file,
java.lang.String target)
|
java.lang.String |
cwd()
|
boolean |
detachFromProject(Job job)
|
boolean |
detachFromProject(Job job,
java.lang.String log_text)
|
boolean |
exists(java.lang.String file)
|
void |
flush()
|
boolean |
isDir(java.lang.String dir)
|
boolean |
isLink(java.lang.String link)
|
boolean |
ln(java.lang.String source,
java.lang.String target)
|
byte[] |
loadDocumentAsByteArray(java.lang.String path)
|
java.util.List |
ls()
|
java.util.List |
ls(java.lang.String path)
|
java.util.List |
ls(java.lang.String[] paths)
|
boolean |
mkDir(java.lang.String path)
|
boolean |
mkDir(java.lang.String[] paths)
|
boolean |
mv(java.lang.String[] files,
java.lang.String target)
|
boolean |
mv(java.lang.String file,
java.lang.String target)
|
boolean |
newDocument(java.lang.String path,
java.lang.String content,
Attribute attr)
|
boolean |
rm(java.lang.String path)
|
boolean |
rm(java.lang.String[] paths)
|
boolean |
rmDir(java.lang.String path)
|
boolean |
rmDir(java.lang.String[] paths)
|
boolean |
saveDocument(java.lang.String path,
java.lang.String content)
Updates the document with the provided content. |
byte[] |
zipAsByteArray(java.util.List files)
|
java.util.zip.ZipInputStream |
zipAsZipInputStream(java.util.List files)
Zips Files in the project and returns the resulting Zip file as ZipInputStream. |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.opengroupware.jogi.ogo.Project |
getId |
OGO_CALL_JOBS_ASSIGN_TO_PROJECT
public static final java.lang.String OGO_CALL_JOBS_ASSIGN_TO_PROJECT
- See Also:
- Constant Field Values
OGO_CALL_JOBS_DETACH_FROM_PROJECT
public static final java.lang.String OGO_CALL_JOBS_DETACH_FROM_PROJECT
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_CWD
public static final java.lang.String OGO_CALL_PROJECT_CWD
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_CD
public static final java.lang.String OGO_CALL_PROJECT_CD
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_MKDIR
public static final java.lang.String OGO_CALL_PROJECT_MKDIR
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_RMDIR
public static final java.lang.String OGO_CALL_PROJECT_RMDIR
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_LS
public static final java.lang.String OGO_CALL_PROJECT_LS
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_RM
public static final java.lang.String OGO_CALL_PROJECT_RM
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_CP
public static final java.lang.String OGO_CALL_PROJECT_CP
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_MV
public static final java.lang.String OGO_CALL_PROJECT_MV
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_LN
public static final java.lang.String OGO_CALL_PROJECT_LN
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_EXISTS
public static final java.lang.String OGO_CALL_PROJECT_EXISTS
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_ISDIR
public static final java.lang.String OGO_CALL_PROJECT_ISDIR
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_ISLINK
public static final java.lang.String OGO_CALL_PROJECT_ISLINK
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_ATTR
public static final java.lang.String OGO_CALL_PROJECT_ATTR
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_NEW_DOCUMENT
public static final java.lang.String OGO_CALL_PROJECT_NEW_DOCUMENT
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_LOAD_DOCUMENT
public static final java.lang.String OGO_CALL_PROJECT_LOAD_DOCUMENT
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_SAVE_DOCUMENT
public static final java.lang.String OGO_CALL_PROJECT_SAVE_DOCUMENT
- See Also:
- Constant Field Values
OGO_CALL_PROJECT_ZIP
public static final java.lang.String OGO_CALL_PROJECT_ZIP
- See Also:
- Constant Field Values
KEY_NAME
public static final java.lang.String KEY_NAME
- See Also:
- Constant Field Values
KEY_START_DATE
public static final java.lang.String KEY_START_DATE
- See Also:
- Constant Field Values
KEY_END_DATE
public static final java.lang.String KEY_END_DATE
- See Also:
- Constant Field Values
XmlRpcProject
public XmlRpcProject(XmlRpcCaller caller,
java.util.Map contents)
throws OgoException,
ConnectionException
callJobFunction
protected boolean callJobFunction(java.lang.String funcName,
Job job,
java.lang.String logtext)
throws OgoException,
ConnectionException
- Throws:
OgoException
ConnectionException
assignToProject
public boolean assignToProject(Job job)
throws OgoException,
ConnectionException
- Specified by:
assignToProject
in interface Project
- Throws:
OgoException
ConnectionException
detachFromProject
public boolean detachFromProject(Job job)
throws OgoException,
ConnectionException
- Specified by:
detachFromProject
in interface Project
- Throws:
OgoException
ConnectionException
assignToProject
public boolean assignToProject(Job job,
java.lang.String log_text)
throws OgoException,
ConnectionException
- Specified by:
assignToProject
in interface Project
- Throws:
OgoException
ConnectionException
detachFromProject
public boolean detachFromProject(Job job,
java.lang.String log_text)
throws OgoException,
ConnectionException
- Specified by:
detachFromProject
in interface Project
- Throws:
OgoException
ConnectionException
cwd
public java.lang.String cwd()
throws OgoException,
ConnectionException
- Specified by:
cwd
in interface Project
- Throws:
OgoException
ConnectionException
cd
public boolean cd(java.lang.String path)
throws OgoException,
ConnectionException
- Specified by:
cd
in interface Project
- Throws:
OgoException
ConnectionException
ls
public java.util.List ls(java.lang.String[] paths)
throws OgoException,
ConnectionException
- Specified by:
ls
in interface Project
- Throws:
OgoException
ConnectionException
ls
public java.util.List ls(java.lang.String path)
throws OgoException,
ConnectionException
- Specified by:
ls
in interface Project
- Throws:
OgoException
ConnectionException
ls
public java.util.List ls()
throws OgoException,
ConnectionException
- Specified by:
ls
in interface Project
- Throws:
OgoException
ConnectionException
mkDir
public boolean mkDir(java.lang.String[] paths)
throws OgoException,
ConnectionException
- Specified by:
mkDir
in interface Project
- Throws:
OgoException
ConnectionException
mkDir
public boolean mkDir(java.lang.String path)
throws OgoException,
ConnectionException
- Specified by:
mkDir
in interface Project
- Throws:
OgoException
ConnectionException
rmDir
public boolean rmDir(java.lang.String[] paths)
throws OgoException,
ConnectionException
- Specified by:
rmDir
in interface Project
- Throws:
OgoException
ConnectionException
rmDir
public boolean rmDir(java.lang.String path)
throws OgoException,
ConnectionException
- Specified by:
rmDir
in interface Project
- Throws:
OgoException
ConnectionException
attr
public java.util.List attr(java.lang.String[] paths)
throws OgoException,
ConnectionException
- Specified by:
attr
in interface Project
- Throws:
OgoException
ConnectionException
attr
public Attribute attr(java.lang.String path)
throws OgoException,
ConnectionException
- Specified by:
attr
in interface Project
- Throws:
OgoException
ConnectionException
zipAsByteArray
public byte[] zipAsByteArray(java.util.List files)
throws OgoException,
ConnectionException
- Specified by:
zipAsByteArray
in interface Project
- Throws:
OgoException
ConnectionException
zipAsZipInputStream
public java.util.zip.ZipInputStream zipAsZipInputStream(java.util.List files)
throws OgoException,
ConnectionException
- Description copied from interface:
Project
- Zips Files in the project and returns the resulting Zip file as ZipInputStream.
- Specified by:
zipAsZipInputStream
in interface Project
- Throws:
OgoException
ConnectionException
rm
public boolean rm(java.lang.String[] paths)
throws OgoException,
ConnectionException
- Specified by:
rm
in interface Project
- Throws:
OgoException
ConnectionException
rm
public boolean rm(java.lang.String path)
throws OgoException,
ConnectionException
- Specified by:
rm
in interface Project
- Throws:
OgoException
ConnectionException
cp
public boolean cp(java.lang.String[] files,
java.lang.String target)
throws OgoException,
ConnectionException
- Specified by:
cp
in interface Project
- Throws:
OgoException
ConnectionException
cp
public boolean cp(java.lang.String file,
java.lang.String target)
throws OgoException,
ConnectionException
- Specified by:
cp
in interface Project
- Throws:
OgoException
ConnectionException
mv
public boolean mv(java.lang.String[] files,
java.lang.String target)
throws OgoException,
ConnectionException
- Specified by:
mv
in interface Project
- Throws:
OgoException
ConnectionException
mv
public boolean mv(java.lang.String file,
java.lang.String target)
throws OgoException,
ConnectionException
- Specified by:
mv
in interface Project
- Throws:
OgoException
ConnectionException
ln
public boolean ln(java.lang.String source,
java.lang.String target)
throws OgoException,
ConnectionException
- Specified by:
ln
in interface Project
- Throws:
OgoException
ConnectionException
exists
public boolean exists(java.lang.String file)
throws OgoException,
ConnectionException
- Specified by:
exists
in interface Project
- Throws:
OgoException
ConnectionException
isDir
public boolean isDir(java.lang.String dir)
throws OgoException,
ConnectionException
- Specified by:
isDir
in interface Project
- Throws:
OgoException
ConnectionException
isLink
public boolean isLink(java.lang.String link)
throws OgoException,
ConnectionException
- Specified by:
isLink
in interface Project
- Throws:
OgoException
ConnectionException
flush
public void flush()
throws OgoException,
ConnectionException
- Specified by:
flush
in interface Project
- Throws:
OgoException
ConnectionException
newDocument
public boolean newDocument(java.lang.String path,
java.lang.String content,
Attribute attr)
throws OgoException,
ConnectionException
- Specified by:
newDocument
in interface Project
- Throws:
OgoException
ConnectionException
loadDocumentAsByteArray
public byte[] loadDocumentAsByteArray(java.lang.String path)
throws OgoException,
ConnectionException
- Specified by:
loadDocumentAsByteArray
in interface Project
- Throws:
OgoException
ConnectionException
saveDocument
public boolean saveDocument(java.lang.String path,
java.lang.String content)
throws OgoException,
ConnectionException
- Description copied from interface:
Project
- Updates the document with the provided content.
- Specified by:
saveDocument
in interface Project
- Parameters:
path
- content
-
- Returns:
true
ist the document was saved successfully, otherwise
false
- Throws:
OgoException
ConnectionException
checkNewContent
protected boolean checkNewContent(java.util.Map new_content)
- Description copied from class:
XmlRpcBaseDocument
- This method checks whether the provided Map contains a valid
document. If essential parts are missing or are of a wrong type,
this method must return false, otherwise true.
- Specified by:
checkNewContent
in class XmlRpcBaseDocument
- Parameters:
new_content
- The new content for the document.
- Returns:
true
if the content meets all requirements,
otherwise false
.
Copyright © 2003 ogojogi Project, All Rights Reserved.