org.opengroupware.jogi.ogo
Interface Project

All Known Implementing Classes:
XmlRpcProject

public interface Project

Represents an OpenGroupware.org Project. A project is a file store on the OpenGroupware.org server. It provides a root directory under which the files belonging to the project can be arranged (in directories). Thus the Project class offers a filesystem-like interface to the projects, with commands similar to the Unix file commands (eg. ls, rm, ...).

Author:
Andreas Rath (teddius) , 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)
           
 boolean cd(java.lang.String path)
           
 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()
           
 java.lang.String getId()
           
 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.
 

Method Detail

assignToProject

public boolean assignToProject(Job job)
                        throws OgoException,
                               ConnectionException
Throws:
OgoException
ConnectionException

detachFromProject

public boolean detachFromProject(Job job)
                          throws OgoException,
                                 ConnectionException
Throws:
OgoException
ConnectionException

assignToProject

public boolean assignToProject(Job job,
                               java.lang.String log_text)
                        throws OgoException,
                               ConnectionException
Throws:
OgoException
ConnectionException

detachFromProject

public boolean detachFromProject(Job job,
                                 java.lang.String log_text)
                          throws OgoException,
                                 ConnectionException
Throws:
OgoException
ConnectionException

cwd

public java.lang.String cwd()
                     throws OgoException,
                            ConnectionException
Throws:
OgoException
ConnectionException

cd

public boolean cd(java.lang.String path)
           throws OgoException,
                  ConnectionException
Throws:
OgoException
ConnectionException

ls

public java.util.List ls(java.lang.String[] paths)
                  throws OgoException,
                         ConnectionException
Throws:
OgoException
ConnectionException

ls

public java.util.List ls(java.lang.String path)
                  throws OgoException,
                         ConnectionException
Throws:
OgoException
ConnectionException

ls

public java.util.List ls()
                  throws OgoException,
                         ConnectionException
Throws:
OgoException
ConnectionException

mkDir

public boolean mkDir(java.lang.String[] paths)
              throws OgoException,
                     ConnectionException
Throws:
OgoException
ConnectionException

mkDir

public boolean mkDir(java.lang.String path)
              throws OgoException,
                     ConnectionException
Throws:
OgoException
ConnectionException

rmDir

public boolean rmDir(java.lang.String[] paths)
              throws OgoException,
                     ConnectionException
Throws:
OgoException
ConnectionException

rmDir

public boolean rmDir(java.lang.String path)
              throws OgoException,
                     ConnectionException
Throws:
OgoException
ConnectionException

attr

public java.util.List attr(java.lang.String[] paths)
                    throws OgoException,
                           ConnectionException
Throws:
OgoException
ConnectionException

attr

public Attribute attr(java.lang.String path)
               throws OgoException,
                      ConnectionException
Throws:
OgoException
ConnectionException

getId

public java.lang.String getId()
                       throws OgoException,
                              ConnectionException
Throws:
OgoException
ConnectionException

zipAsByteArray

public byte[] zipAsByteArray(java.util.List files)
                      throws OgoException,
                             ConnectionException
Throws:
OgoException
ConnectionException

zipAsZipInputStream

public java.util.zip.ZipInputStream zipAsZipInputStream(java.util.List files)
                                                 throws OgoException,
                                                        ConnectionException
Zips Files in the project and returns the resulting Zip file as ZipInputStream.

Throws:
OgoException
ConnectionException

rm

public boolean rm(java.lang.String[] paths)
           throws OgoException,
                  ConnectionException
Throws:
OgoException
ConnectionException

rm

public boolean rm(java.lang.String path)
           throws OgoException,
                  ConnectionException
Throws:
OgoException
ConnectionException

cp

public boolean cp(java.lang.String[] files,
                  java.lang.String target)
           throws OgoException,
                  ConnectionException
Throws:
OgoException
ConnectionException

cp

public boolean cp(java.lang.String file,
                  java.lang.String target)
           throws OgoException,
                  ConnectionException
Throws:
OgoException
ConnectionException

mv

public boolean mv(java.lang.String[] files,
                  java.lang.String target)
           throws OgoException,
                  ConnectionException
Throws:
OgoException
ConnectionException

mv

public boolean mv(java.lang.String file,
                  java.lang.String target)
           throws OgoException,
                  ConnectionException
Throws:
OgoException
ConnectionException

ln

public boolean ln(java.lang.String source,
                  java.lang.String target)
           throws OgoException,
                  ConnectionException
Throws:
OgoException
ConnectionException

exists

public boolean exists(java.lang.String file)
               throws OgoException,
                      ConnectionException
Throws:
OgoException
ConnectionException

isDir

public boolean isDir(java.lang.String dir)
              throws OgoException,
                     ConnectionException
Throws:
OgoException
ConnectionException

isLink

public boolean isLink(java.lang.String link)
               throws OgoException,
                      ConnectionException
Throws:
OgoException
ConnectionException

flush

public void flush()
           throws OgoException,
                  ConnectionException
Throws:
OgoException
ConnectionException

newDocument

public boolean newDocument(java.lang.String path,
                           java.lang.String content,
                           Attribute attr)
                    throws OgoException,
                           ConnectionException
Throws:
OgoException
ConnectionException

loadDocumentAsByteArray

public byte[] loadDocumentAsByteArray(java.lang.String path)
                               throws OgoException,
                                      ConnectionException
Throws:
OgoException
ConnectionException

saveDocument

public boolean saveDocument(java.lang.String path,
                            java.lang.String content)
                     throws OgoException,
                            ConnectionException
Updates the document with the provided content.

Parameters:
path -
content -
Returns:
true ist the document was saved successfully, otherwise false
Throws:
OgoException
ConnectionException


Copyright © 2003 ogojogi Project, All Rights Reserved.