org.pentaho.platform.repository.solution
Class SolutionRepositoryServiceImpl

java.lang.Object
  extended by org.pentaho.platform.repository.solution.SolutionRepositoryServiceImpl
All Implemented Interfaces:
ISolutionRepositoryService
Direct Known Subclasses:
SolutionRepositoryServiceImplFast

public class SolutionRepositoryServiceImpl
extends Object
implements ISolutionRepositoryService


Constructor Summary
SolutionRepositoryServiceImpl()
           
 
Method Summary
 boolean createFolder(IPentahoSession userSession, String solution, String path, String name, String desc)
          This method creates a folder along with it's index.xml file.
 boolean delete(IPentahoSession userSession, String solution, String path, String name)
          This method will delete a file from the ISolutionRepository and respects IPentahoAclEntry.PERM_DELETE.
 String getAclXml(String solution, String path, String filename, IPentahoSession userSession)
          Gets ACLs based on a solution repository file.
 Document getSolutionRepositoryDoc(IPentahoSession session, String[] filters)
           
 Document getSolutionRepositoryFileDetails(IPentahoSession session, String fullPath)
          Returns an XML snippet consisting of a single file element.
 void setAcl(String solution, String path, String filename, String strAclXml, IPentahoSession userSession)
          Sets the ACL Xml for a particular file in the solution repository
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SolutionRepositoryServiceImpl

public SolutionRepositoryServiceImpl()
Method Detail

delete

public 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.

Specified by:
delete in interface ISolutionRepositoryService
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 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.

Specified by:
createFolder in interface ISolutionRepositoryService
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
Specified by:
getSolutionRepositoryDoc in interface ISolutionRepositoryService
Throws:
ParserConfigurationException

getSolutionRepositoryFileDetails

public Document getSolutionRepositoryFileDetails(IPentahoSession session,
                                                 String fullPath)
                                          throws ParserConfigurationException
Returns an XML snippet consisting of a single file element. The file element is the same as would have been returned by getSolutionRepositoryDoc.

Specified by:
getSolutionRepositoryFileDetails in interface ISolutionRepositoryService
Parameters:
session - current session
Returns:
doc
Throws:
ParserConfigurationException

setAcl

public void setAcl(String solution,
                   String path,
                   String filename,
                   String strAclXml,
                   IPentahoSession userSession)
            throws SolutionRepositoryServiceException,
                   IOException,
                   PentahoAccessControlException
Sets the ACL Xml for a particular file in the solution repository

Specified by:
setAcl in interface ISolutionRepositoryService
Parameters:
solution -
path -
filename -
strAclXml -
userSession -
Throws:
SolutionRepositoryServiceException
IOException
PentahoAccessControlException

getAclXml

public String getAclXml(String solution,
                        String path,
                        String filename,
                        IPentahoSession userSession)
                 throws SolutionRepositoryServiceException,
                        IOException
Gets ACLs based on a solution repository file.

Specified by:
getAclXml in interface ISolutionRepositoryService
Parameters:
userSession -
Returns:
acl xml
Throws:
SolutionRepositoryServiceException
IOException