|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.platform.engine.core.system.PentahoBase org.pentaho.platform.engine.services.PentahoMessenger org.pentaho.platform.repository.solution.SolutionRepositoryBase
public abstract class SolutionRepositoryBase
Nested Class Summary | |
---|---|
static class |
SolutionRepositoryBase.ActionSequenceResourceWrapper
|
Field Summary |
---|
Fields inherited from class org.pentaho.platform.engine.core.system.PentahoBase |
---|
EMPTYLOGID, LOGID_MASK1, LOGID_MASK2, LOGID_SEPARATOR |
Fields inherited from interface org.pentaho.platform.api.repository.ISolutionRepository |
---|
ACTION_ADMIN, ACTION_CREATE, ACTION_DELETE, ACTION_EXECUTE, ACTION_SHARE, ACTION_SUBSCRIBE, ACTION_UPDATE, FILE_ADD_FAILED, FILE_ADD_INVALID_PUBLISH_PASSWORD, FILE_ADD_INVALID_USER_CREDENTIALS, FILE_ADD_SUCCESSFUL, FILE_EXISTS, INDEX_FILENAME, SEPARATOR |
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 | |
---|---|
SolutionRepositoryBase()
|
Method Summary | |
---|---|
int |
addSolutionFile(String baseUrl,
String path,
String fileName,
byte[] data,
boolean overwrite)
Adds a solution to the solution repository defined by the url that is built by concatenating baseUrl, path, and fileName. |
int |
addSolutionFile(String baseUrl,
String path,
String fileName,
File f,
boolean overwrite)
Adds a solution to the solution repository defined by the url that is built by concatenating baseUrl, path, and fileName. |
ISolutionFile |
createFolder(File newFolder)
This method creates a new folder in the Repository |
ISolutionFile |
getFileByPath(String path)
|
Document |
getFullSolutionTree(int actionOperation,
ISolutionFilter filter)
|
String |
getLocaleString(String key,
String baseName,
String baseFilePath)
|
ISolutionFile |
getLocalizedFile(ISolutionFile resourceFile)
|
String |
getLocalizedFileProperty(ISolutionFile resourceFile,
String key)
This method retrieves a locale aware value given a key and a file. |
Log |
getLogger()
|
Document |
getNavigationUIDocument(String solution,
String path,
int actionOperation)
Get an XML document that describes the structure of the solution repository. |
byte[] |
getResourceAsBytes(IActionSequenceResource actionResource,
boolean getLocalizedResource)
See getResourceInputBytes(String solutionPath). |
byte[] |
getResourceAsBytes(String solutionPath,
boolean getLocalizedResource)
See getResourceInputBytes(String solutionPath). |
Document |
getResourceAsDocument(IActionSequenceResource actionResource)
See getResourceInputStream(IActionResource actionResource). |
Document |
getResourceAsDocument(String solutionPath)
See getResourceInputStream(String solutionPath). |
String |
getResourceAsString(IActionSequenceResource actionResource)
See getResourceInputStream(IActionResource actionResource). |
String |
getResourceAsString(String solutionPath)
See getResourceInputStream(String solutionPath). |
IPentahoStreamSource |
getResourceDataSource(IActionSequenceResource actionResource)
See getResourceInputStream(IActionResource actionResource). |
IPentahoStreamSource |
getResourceDataSource(String solutionPath)
See getResourceInputStream(String solutionPath). |
InputStream |
getResourceInputStream(IActionSequenceResource actionResource,
boolean getLocalizedResource)
Given a IActionResource this method returns a InputStream that references the content of the actionResource. |
InputStream |
getResourceInputStream(String solutionPath,
boolean getLocalizedResource)
Returns an InputStream that contains the data of the resource defined by the solutionPath. |
Reader |
getResourceReader(IActionSequenceResource actionResource)
See getResourceInputStream(IActionResource actionResource). |
Reader |
getResourceReader(String solutionPath)
See getResourceInputStream(String solutionPath). |
ISolutionFile |
getRootFolder()
|
ISolutionFile |
getSolutionFile(IActionSequenceResource actionResource)
|
Document |
getSolutions(int actionOperation)
Gets an XML Document representing all the solutions and all the files within all the solutions |
String |
getXSLName(Document document,
String solution,
String inputXSLName)
Interprets the XSL name coming in against the document to see if there are any repository-specific changes based on display type associated with the XSL name |
void |
init()
|
void |
init(IPentahoSession pentahoSession)
NOTE regarding old code: the cacheManager cannot be cached, because it is possible that the SolutionRepository implementation has a scope that is longer lived than the cacheManager. |
static boolean |
isSystemPath(String path)
|
static boolean |
isSystemTmpPath(String path)
Returns true if the path is the tmp directory in the system solution. |
void |
localizeDoc(Node document,
ISolutionFile file)
|
boolean |
removeSolutionFile(String solutionPath)
|
boolean |
removeSolutionFile(String solution,
String path,
String fileName)
this is the file based removeSolutionFile, used by subclasses |
void |
resetRepository()
Clears cached data for ALL users |
Methods inherited from class org.pentaho.platform.engine.services.PentahoMessenger |
---|
debug, debug, error, error, fatal, fatal, getMessages, getUserString, info, info, setMessages, trace, trace, warn, warn |
Methods inherited from class org.pentaho.platform.engine.core.system.PentahoBase |
---|
genLogIdFromInfo, genLogIdFromInfo, genLogIdFromSession, getLoggingLevel, getLogId, getObjectName, setLoggingLevel, setLogId |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.pentaho.platform.api.repository.ISolutionRepository |
---|
addPermission, getActionSequence, getAllActionSequences, getClassLoader, getEffectivePermissions, getMessages, getPermissions, getRepositoryName, getSolutionFileLastModified, getSolutions, getSolutionStructure, getSolutionTree, getSolutionTree, hasAccess, hasAccess, publish, publish, reloadSolutionRepository, resourceExists, resourceSize, setMessages, setPermissions, share, solutionSynchronizationSupported, supportsAccessControls, synchronizeSolutionWithSolutionSource, unshare |
Methods inherited from interface org.pentaho.platform.api.engine.ILogger |
---|
debug, debug, error, error, fatal, fatal, getLoggingLevel, info, info, setLoggingLevel, trace, trace, warn, warn |
Constructor Detail |
---|
public SolutionRepositoryBase()
Method Detail |
---|
public Log getLogger()
getLogger
in class PentahoBase
public void init()
public void init(IPentahoSession pentahoSession)
init
in interface IPentahoInitializer
init
in interface ISolutionRepository
pentahoSession
- The current user sessionpublic ISolutionFile getLocalizedFile(ISolutionFile resourceFile)
public ISolutionFile getFileByPath(String path)
getFileByPath
in interface ISolutionRepository
path
- the solution path to the desired resource
public static boolean isSystemPath(String path)
public static boolean isSystemTmpPath(String path)
public InputStream getResourceInputStream(IActionSequenceResource actionResource, boolean getLocalizedResource) throws FileNotFoundException
ISolutionRepository
getResourceInputStream
in interface ISolutionRepository
actionResource
- - resource to create a stream for.getLocalizedResource
- - flag to use to check if we should attempt to get a localized version of the resource
FileNotFoundException
public void localizeDoc(Node document, ISolutionFile file)
localizeDoc
in interface ISolutionRepository
public String getLocaleString(String key, String baseName, String baseFilePath)
public InputStream getResourceInputStream(String solutionPath, boolean getLocalizedResource) throws FileNotFoundException
ISolutionRepository
getResourceInputStream
in interface ISolutionRepository
solutionPath
- - location of a resource.
FileNotFoundException
public Reader getResourceReader(IActionSequenceResource actionResource) throws FileNotFoundException, IOException
ISolutionRepository
getResourceReader
in interface ISolutionRepository
FileNotFoundException
IOException
public Reader getResourceReader(String solutionPath) throws FileNotFoundException, IOException
ISolutionRepository
getResourceReader
in interface ISolutionRepository
FileNotFoundException
IOException
public String getResourceAsString(IActionSequenceResource actionResource) throws IOException
ISolutionRepository
getResourceAsString
in interface ISolutionRepository
IOException
public String getResourceAsString(String solutionPath) throws IOException
ISolutionRepository
getResourceAsString
in interface ISolutionRepository
IOException
public byte[] getResourceAsBytes(IActionSequenceResource actionResource, boolean getLocalizedResource) throws IOException
ISolutionRepository
getResourceAsBytes
in interface ISolutionRepository
IOException
public byte[] getResourceAsBytes(String solutionPath, boolean getLocalizedResource) throws IOException
ISolutionRepository
getResourceAsBytes
in interface ISolutionRepository
IOException
public IPentahoStreamSource getResourceDataSource(IActionSequenceResource actionResource) throws FileNotFoundException
ISolutionRepository
getResourceDataSource
in interface ISolutionRepository
FileNotFoundException
public IPentahoStreamSource getResourceDataSource(String solutionPath) throws FileNotFoundException
ISolutionRepository
getResourceDataSource
in interface ISolutionRepository
FileNotFoundException
public Document getResourceAsDocument(String solutionPath) throws IOException
ISolutionRepository
getResourceAsDocument
in interface ISolutionRepository
IOException
public Document getResourceAsDocument(IActionSequenceResource actionResource) throws IOException
ISolutionRepository
getResourceAsDocument
in interface ISolutionRepository
IOException
public Document getSolutions(int actionOperation)
ISolutionRepository
getSolutions
in interface ISolutionRepository
actionOperation
- Indicates what the list will be used for - execution or administration
public void resetRepository()
resetRepository
in interface ISolutionRepository
public ISolutionFile getRootFolder()
getRootFolder
in interface ISolutionRepository
public String getXSLName(Document document, String solution, String inputXSLName)
ISolutionRepository
getXSLName
in interface ISolutionRepository
public Document getNavigationUIDocument(String solution, String path, int actionOperation)
ISolutionRepository
getNavigationUIDocument
in interface ISolutionRepository
solution
- String The name of the solution. If this is empty (null or ""), and path
is empty, return the root of the document. Otherwise return a document that
starts at the node specified by the solution and path in the solutionpath
- String The path of the interested folder. See notes for
parameter solution.actionOperation
- String
public int addSolutionFile(String baseUrl, String path, String fileName, File f, boolean overwrite)
ISolutionRepository
addSolutionFile
in interface ISolutionRepository
public int addSolutionFile(String baseUrl, String path, String fileName, byte[] data, boolean overwrite)
ISolutionRepository
addSolutionFile
in interface ISolutionRepository
public boolean removeSolutionFile(String solutionPath)
removeSolutionFile
in interface ISolutionRepository
public boolean removeSolutionFile(String solution, String path, String fileName)
removeSolutionFile
in interface ISolutionRepository
public Document getFullSolutionTree(int actionOperation, ISolutionFilter filter)
getFullSolutionTree
in interface ISolutionRepository
public ISolutionFile getSolutionFile(IActionSequenceResource actionResource)
getSolutionFile
in interface ISolutionRepository
public ISolutionFile createFolder(File newFolder) throws IOException
ISolutionRepository
createFolder
in interface ISolutionRepository
newFolder
- The File that points to the new folder to create
IOException
public String getLocalizedFileProperty(ISolutionFile resourceFile, String key)
ISolutionRepository
getLocalizedFileProperty
in interface ISolutionRepository
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |