org.pentaho.platform.web.servlet
Class SolutionRepositoryService

java.lang.Object
  extended by HttpServlet
      extended by org.pentaho.platform.web.servlet.ServletBase
          extended by org.pentaho.platform.web.servlet.SolutionRepositoryService
All Implemented Interfaces:
ILogger

public class SolutionRepositoryService
extends ServletBase


Field Summary
 
Fields inherited from class org.pentaho.platform.web.servlet.ServletBase
debug
 
Fields inherited from interface org.pentaho.platform.api.engine.ILogger
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN
 
Constructor Summary
SolutionRepositoryService()
           
 
Method Summary
static boolean createFolder(IPentahoSession userSession, String solution, String path, String name, String desc)
          This method creates a folder along with it's index.xml file.
static boolean delete(IPentahoSession userSession, String solution, String path, String name)
          This method will delete a file from the ISolutionRepository and respects IPentahoAclEntry.PERM_DELETE.
 Log getLogger()
           
static SAXParserFactory getSAXParserFactory()
          Get a SAX Parser Factory NOTE: Need sax parser factory per thread for thread safety.
 Document getSolutionRepositoryDoc(IPentahoSession session, String[] filters)
           
 
Methods inherited from class org.pentaho.platform.web.servlet.ServletBase
debug, debug, error, error, fatal, fatal, getLoggingLevel, getObjectName, info, info, setLoggingLevel, trace, trace, warn, warn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SolutionRepositoryService

public SolutionRepositoryService()
Method Detail

getLogger

public Log getLogger()
Specified by:
getLogger in class ServletBase

delete

public static boolean delete(IPentahoSession userSession,
                             String solution,
                             String path,
                             String name)
                      throws IOException
This method will delete a file from the ISolutionRepository and respects IPentahoAclEntry.PERM_DELETE.

Parameters:
userSession - An IPentahoSession for the user requesting the delete operation
solution - The name of the solution, such as 'steel-wheels'
path - The path within the solution to the file/folder to be deleted (does not include the file/folder itself)
name - The name of the file or folder which will be deleted in the given solution/path
Returns:
Success of the delete operation is returned
Throws:
IOException

createFolder

public static boolean createFolder(IPentahoSession userSession,
                                   String solution,
                                   String path,
                                   String name,
                                   String desc)
                            throws IOException
This method creates a folder along with it's index.xml file. This method also verifies that the user has PERM_CREATE permissions before creating the folder.

Parameters:
userSession - the current user
solution - the solution path
path - the folder path
name - the name of the new folder
desc - the description of the new folder
Returns:
true if success
Throws:
IOException

getSolutionRepositoryDoc

public Document getSolutionRepositoryDoc(IPentahoSession session,
                                         String[] filters)
                                  throws ParserConfigurationException
Throws:
ParserConfigurationException

getSAXParserFactory

public static SAXParserFactory getSAXParserFactory()
Get a SAX Parser Factory NOTE: Need sax parser factory per thread for thread safety. See: http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/SAXParserFactory.html

Returns: