|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISolutionRepository
Defines methods for getting information out of a location holding the Pentaho solutions.
Field Summary | |
---|---|
static int |
ACTION_ADMIN
|
static int |
ACTION_CREATE
|
static int |
ACTION_DELETE
|
static int |
ACTION_EXECUTE
|
static int |
ACTION_SHARE
|
static int |
ACTION_SUBSCRIBE
|
static int |
ACTION_UPDATE
|
static int |
FILE_ADD_FAILED
|
static int |
FILE_ADD_INVALID_PUBLISH_PASSWORD
|
static int |
FILE_ADD_INVALID_USER_CREDENTIALS
|
static int |
FILE_ADD_SUCCESSFUL
|
static int |
FILE_EXISTS
|
static java.lang.String |
INDEX_FILENAME
|
static java.lang.String |
REPOSITORY_SERVICE_CACHE_REGION
|
static char |
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 |
Method Summary | |
---|---|
void |
addPermission(ISolutionFile aFile,
IPermissionRecipient recipient,
IPermissionMask permission)
Adds to the ACL associated with aFile . |
int |
addSolutionFile(java.lang.String baseUrl,
java.lang.String path,
java.lang.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(java.lang.String baseUrl,
java.lang.String path,
java.lang.String fileName,
java.io.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(java.io.File newFolder)
This method creates a new folder in the Repository |
IActionSequence |
getActionSequence(java.lang.String solutionName,
java.lang.String actionPath,
java.lang.String actionName,
int loggingLevel,
int actionOperation)
Retrieves the action sequence from the repository. |
java.lang.String[] |
getAllActionSequences()
Deprecated. |
java.lang.String[] |
getAllActionSequences(int actionOperation)
An array of Strings where each string is the fully qualified path of every *.xaction contained in the repository. |
java.lang.ClassLoader |
getClassLoader(java.lang.String path)
Returns an appropriate class loader for a specific path |
java.util.Map<IPermissionRecipient,IPermissionMask> |
getEffectivePermissions(ISolutionFile aFile)
Returns the ACL for the given file. |
ISolutionFile |
getFileByPath(java.lang.String path)
Deprecated. use getSolutionFile(String, int) |
org.dom4j.Document |
getFullSolutionTree(int actionOperation,
ISolutionFilter filter)
|
org.dom4j.Document |
getFullSolutionTree(int actionOperation,
ISolutionFilter filter,
ISolutionFile startFile)
|
java.lang.String |
getLocalizedFileProperty(ISolutionFile resourceFile,
java.lang.String key)
Deprecated. |
java.lang.String |
getLocalizedFileProperty(ISolutionFile resourceFile,
java.lang.String key,
int actionOperation)
This method retrieves a locale aware value given a key and a file. |
java.util.List |
getMessages()
Return the message list, if any, that all log messages generated by this Solution Repository are being appended to |
org.dom4j.Document |
getNavigationUIDocument(java.lang.String solution,
java.lang.String path,
int actionOperation)
Get an XML document that describes the structure of the solution repository. |
java.util.Map<IPermissionRecipient,IPermissionMask> |
getPermissions(ISolutionFile aFile)
Returns the ACL for the given file. |
java.lang.String |
getRepositoryName()
|
byte[] |
getResourceAsBytes(IActionSequenceResource actionResource,
boolean getLocalizedResource)
Deprecated. |
byte[] |
getResourceAsBytes(IActionSequenceResource actionResource,
boolean getLocalizedResource,
int actionOperation)
See getResourceInputBytes(String solutionPath). |
byte[] |
getResourceAsBytes(java.lang.String solutionPath,
boolean getLocalizedResource)
Deprecated. |
byte[] |
getResourceAsBytes(java.lang.String solutionPath,
boolean getLocalizedResource,
int actionOperation)
See getResourceInputBytes(String solutionPath). |
org.dom4j.Document |
getResourceAsDocument(IActionSequenceResource actionResource)
Deprecated. |
org.dom4j.Document |
getResourceAsDocument(IActionSequenceResource actionResource,
int actionOperation)
See getResourceInputStream(IActionResource actionResource). |
org.dom4j.Document |
getResourceAsDocument(java.lang.String solutionPath)
Deprecated. |
org.dom4j.Document |
getResourceAsDocument(java.lang.String solutionPath,
int actionOperation)
See getResourceInputStream(String solutionPath). |
java.lang.String |
getResourceAsString(IActionSequenceResource actionResource)
Deprecated. |
java.lang.String |
getResourceAsString(IActionSequenceResource actionResource,
int actionOperation)
See getResourceInputStream(IActionResource actionResource). |
java.lang.String |
getResourceAsString(java.lang.String solutionPath)
Deprecated. |
java.lang.String |
getResourceAsString(java.lang.String solutionPath,
int actionOperation)
See getResourceInputStream(String solutionPath). |
org.pentaho.commons.connection.IPentahoStreamSource |
getResourceDataSource(IActionSequenceResource actionResource)
Deprecated. |
org.pentaho.commons.connection.IPentahoStreamSource |
getResourceDataSource(IActionSequenceResource actionResource,
int actionOperation)
See getResourceInputStream(IActionResource actionResource). |
org.pentaho.commons.connection.IPentahoStreamSource |
getResourceDataSource(java.lang.String solutionPath)
Deprecated. |
org.pentaho.commons.connection.IPentahoStreamSource |
getResourceDataSource(java.lang.String solutionPath,
int actionOperation)
See getResourceInputStream(String solutionPath). |
java.io.InputStream |
getResourceInputStream(IActionSequenceResource actionResource,
boolean getLocalizedResource)
Deprecated. |
java.io.InputStream |
getResourceInputStream(IActionSequenceResource actionResource,
boolean getLocalizedResource,
int actionOperation)
Given a IActionResource this method returns a InputStream that references the content of the actionResource. |
java.io.InputStream |
getResourceInputStream(java.lang.String solutionPath,
boolean getLocalizedResource)
Deprecated. |
java.io.InputStream |
getResourceInputStream(java.lang.String solutionPath,
boolean getLocalizedResource,
int actionOperation)
Returns an InputStream that contains the data of the resource defined by the solutionPath. |
java.io.Reader |
getResourceReader(IActionSequenceResource actionResource)
Deprecated. |
java.io.Reader |
getResourceReader(IActionSequenceResource actionResource,
int actionOperation)
See getResourceInputStream(IActionResource actionResource). |
java.io.Reader |
getResourceReader(java.lang.String solutionPath)
Deprecated. |
java.io.Reader |
getResourceReader(java.lang.String solutionPath,
int actionOperation)
See getResourceInputStream(String solutionPath). |
ISolutionFile |
getRootFolder(int actionOperation)
|
ISolutionFile |
getSolutionFile(IActionSequenceResource actionResource)
Deprecated. |
ISolutionFile |
getSolutionFile(IActionSequenceResource actionResource,
int actionOperation)
|
ISolutionFile |
getSolutionFile(java.lang.String path)
Deprecated. |
ISolutionFile |
getSolutionFile(java.lang.String path,
int actionOperation)
|
long |
getSolutionFileLastModified(java.lang.String path)
Deprecated. |
long |
getSolutionFileLastModified(java.lang.String path,
int actionOperation)
Returns a long that represents the last time this file was modified |
org.dom4j.Document |
getSolutions(int actionOperation)
Gets an XML Document representing all the solutions and all the files within all the solutions |
org.dom4j.Document |
getSolutions(java.lang.String solutionName,
java.lang.String pathName,
int actionOperation,
boolean visibleOnly)
Gets an XML Document representing all the files within a certain path within a solution |
org.dom4j.Document |
getSolutionStructure(int actionOperation)
Returns an XML document that represents the parent/child relationship of the current solution repository |
org.dom4j.Document |
getSolutionTree(int actionOperation)
Returns an XML document that defines the entire solution tree. |
org.dom4j.Document |
getSolutionTree(int actionOperation,
ISolutionFilter filter)
|
java.lang.String |
getXSLName(org.dom4j.Document doc,
java.lang.String solution,
java.lang.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 |
boolean |
hasAccess(ISolutionFile aFile,
int actionOperation)
Checks permission. |
void |
init(IPentahoSession session)
Initializes the solution repository with the user session |
void |
localizeDoc(org.dom4j.Node document,
ISolutionFile file)
|
int |
publish(java.lang.String baseUrl,
java.lang.String path,
java.lang.String fileName,
byte[] data,
boolean overwrite)
Put a file into the solution repo. |
int |
publish(java.lang.String baseUrl,
java.lang.String path,
java.lang.String fileName,
java.io.File f,
boolean overwrite)
Put a file into the solution repo. |
void |
reloadSolutionRepository(IPentahoSession session,
int loggingLevel)
Loads or reloads a solution repository after a structure change. |
boolean |
removeSolutionFile(java.lang.String solutionPath)
|
boolean |
removeSolutionFile(java.lang.String solution,
java.lang.String path,
java.lang.String fileName)
Removes the file (fileName) from the path defined by the solution and path. |
void |
resetRepository()
This method resets the caches used by the solution repository. |
boolean |
resourceExists(java.lang.String solutionPath)
Returns a true if the specified resource exists. |
boolean |
resourceExists(java.lang.String solutionPath,
int actionOperation)
Returns a true if the specified resource exists. |
long |
resourceSize(java.lang.String solutionPath)
Returns the size of the specfied resource. |
long |
resourceSize(java.lang.String solutionPath,
int actionOperation)
Returns the size of the specfied resource. |
void |
setMessages(java.util.List messages)
Allows the caller to provide a List that will contain all log messages generated by the Solution Repository represented by this interface |
void |
setPermissions(ISolutionFile aFile,
java.util.Map<IPermissionRecipient,IPermissionMask> acl)
Replaces the ACL on aFile . |
void |
share(ISolutionFile aFile,
java.util.List<IPermissionRecipient> shareRecipients)
Share file with recipient. |
boolean |
solutionSynchronizationSupported()
|
boolean |
supportsAccessControls()
|
boolean |
synchronizeSolutionWithSolutionSource(IPentahoSession session)
For ISolutionRepository implementations that have a source and a destination (for example, DBBasedSolutionRepository which has a file-system source and a DB destination) this is the entry point that allows synchronization. |
Methods inherited from interface org.pentaho.platform.api.engine.ILogger |
---|
debug, debug, error, error, fatal, fatal, getLoggingLevel, info, info, setLoggingLevel, trace, trace, warn, warn |
Field Detail |
---|
static final int ACTION_EXECUTE
static final int ACTION_ADMIN
static final int ACTION_SUBSCRIBE
static final int ACTION_CREATE
static final int ACTION_UPDATE
static final int ACTION_DELETE
static final int ACTION_SHARE
static final int FILE_EXISTS
static final int FILE_ADD_FAILED
static final int FILE_ADD_SUCCESSFUL
static final int FILE_ADD_INVALID_PUBLISH_PASSWORD
static final int FILE_ADD_INVALID_USER_CREDENTIALS
static final java.lang.String INDEX_FILENAME
static final char SEPARATOR
static final java.lang.String REPOSITORY_SERVICE_CACHE_REGION
Method Detail |
---|
IActionSequence getActionSequence(java.lang.String solutionName, java.lang.String actionPath, java.lang.String actionName, int loggingLevel, int actionOperation)
null
if the
requested action seqeuence is not found.
solutionName
- The name of the solution - like the root folderactionPath
- The relative path (from the solution) of where the file is storedactionName
- The name of the action sequenceloggingLevel
- The level at which to log messagesactionOperation
- Whether the action sequence is being retrieved for administration or execution
void init(IPentahoSession session)
session
- The current user sessionorg.dom4j.Document getSolutions(int actionOperation)
actionOperation
- Indicates what the list will be used for - execution or administration
org.dom4j.Document getSolutions(java.lang.String solutionName, java.lang.String pathName, int actionOperation, boolean visibleOnly)
solutionName
- The name of the solution to getpathName
- The path from which to retrieveactionOperation
- Indicates what the list will be used for - execution or administration
org.dom4j.Document getSolutionStructure(int actionOperation)
actionOperation
-
void reloadSolutionRepository(IPentahoSession session, int loggingLevel)
session
- - The session associated with this solution repositoryloggingLevel
- - The requested level of loggingjava.lang.String getRepositoryName()
boolean removeSolutionFile(java.lang.String solution, java.lang.String path, java.lang.String fileName)
solution
- path
- fileName
-
boolean removeSolutionFile(java.lang.String solutionPath)
int addSolutionFile(java.lang.String baseUrl, java.lang.String path, java.lang.String fileName, java.io.File f, boolean overwrite)
baseUrl
- path
- fileName
- fi
- overwrite
-
int addSolutionFile(java.lang.String baseUrl, java.lang.String path, java.lang.String fileName, byte[] data, boolean overwrite)
baseUrl
- path
- fileName
- data
- overwrite
-
@Deprecated long getSolutionFileLastModified(java.lang.String path)
path
- long getSolutionFileLastModified(java.lang.String path, int actionOperation)
path
- actionOperation
- - Type of action operation to be performedjava.lang.ClassLoader getClassLoader(java.lang.String path)
path
-
org.dom4j.Document getFullSolutionTree(int actionOperation, ISolutionFilter filter)
org.dom4j.Document getFullSolutionTree(int actionOperation, ISolutionFilter filter, ISolutionFile startFile)
org.dom4j.Document getSolutionTree(int actionOperation)
actionOperation
-
org.dom4j.Document getSolutionTree(int actionOperation, ISolutionFilter filter)
actionOperation
- filter
- an implementation of a ISolutionFilter that determines which files will be returned
boolean resourceExists(java.lang.String solutionPath)
solutionPath
- - path to the resource
boolean resourceExists(java.lang.String solutionPath, int actionOperation)
solutionPath
- - path to the resourceactionOperation
- - Type of action operation to be performed
long resourceSize(java.lang.String solutionPath)
solutionPath
- - path to the resource
long resourceSize(java.lang.String solutionPath, int actionOperation)
solutionPath
- - path to the resourceactionOperation
- - Type of action operation to be performed
@Deprecated java.io.InputStream getResourceInputStream(IActionSequenceResource actionResource, boolean getLocalizedResource) throws java.io.FileNotFoundException
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
java.io.FileNotFoundException
java.io.InputStream getResourceInputStream(IActionSequenceResource actionResource, boolean getLocalizedResource, int actionOperation) throws java.io.FileNotFoundException
actionResource
- - resource to create a stream for.getLocalizedResource
- - flag to use to check if we should attempt to get a localized version of the resourceactionOperation
- - Type of action operation to be performed
java.io.FileNotFoundException
@Deprecated java.io.InputStream getResourceInputStream(java.lang.String solutionPath, boolean getLocalizedResource) throws java.io.FileNotFoundException
solutionPath
- - location of a resource.
java.io.FileNotFoundException
java.io.InputStream getResourceInputStream(java.lang.String solutionPath, boolean getLocalizedResource, int actionOperation) throws java.io.FileNotFoundException
solutionPath
- - location of a resource.actionOperation
- - Type of action operation to be performed
java.io.FileNotFoundException
@Deprecated java.io.Reader getResourceReader(IActionSequenceResource actionResource) throws java.io.FileNotFoundException, java.io.IOException
actionResource
-
java.io.FileNotFoundException
java.io.IOException
java.io.Reader getResourceReader(IActionSequenceResource actionResource, int actionOperation) throws java.io.FileNotFoundException, java.io.IOException
actionResource
- actionOperation
- - Type of action operation to be performed
java.io.FileNotFoundException
java.io.IOException
@Deprecated java.io.Reader getResourceReader(java.lang.String solutionPath) throws java.io.FileNotFoundException, java.io.IOException
solutionPath
-
java.io.FileNotFoundException
java.io.IOException
java.io.Reader getResourceReader(java.lang.String solutionPath, int actionOperation) throws java.io.FileNotFoundException, java.io.IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
java.io.FileNotFoundException
java.io.IOException
@Deprecated java.lang.String getResourceAsString(IActionSequenceResource actionResource) throws java.io.IOException
actionResource
-
java.io.IOException
java.lang.String getResourceAsString(IActionSequenceResource actionResource, int actionOperation) throws java.io.IOException
actionResource
- actionOperation
- - Type of action operation to be performed
java.io.IOException
@Deprecated java.lang.String getResourceAsString(java.lang.String solutionPath) throws java.io.IOException
solutionPath
-
java.io.IOException
java.lang.String getResourceAsString(java.lang.String solutionPath, int actionOperation) throws java.io.IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
java.io.IOException
@Deprecated byte[] getResourceAsBytes(java.lang.String solutionPath, boolean getLocalizedResource) throws java.io.IOException
solutionPath
-
java.io.IOException
byte[] getResourceAsBytes(java.lang.String solutionPath, boolean getLocalizedResource, int actionOperation) throws java.io.IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
java.io.IOException
@Deprecated byte[] getResourceAsBytes(IActionSequenceResource actionResource, boolean getLocalizedResource) throws java.io.IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
java.io.IOException
byte[] getResourceAsBytes(IActionSequenceResource actionResource, boolean getLocalizedResource, int actionOperation) throws java.io.IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
java.io.IOException
@Deprecated org.pentaho.commons.connection.IPentahoStreamSource getResourceDataSource(java.lang.String solutionPath) throws java.io.FileNotFoundException
solutionPath
-
java.io.FileNotFoundException
org.pentaho.commons.connection.IPentahoStreamSource getResourceDataSource(java.lang.String solutionPath, int actionOperation) throws java.io.FileNotFoundException
solutionPath
- actionOperation
- - Type of action operation to be performed
java.io.FileNotFoundException
@Deprecated org.pentaho.commons.connection.IPentahoStreamSource getResourceDataSource(IActionSequenceResource actionResource) throws java.io.FileNotFoundException
solutionPath
-
java.io.FileNotFoundException
org.pentaho.commons.connection.IPentahoStreamSource getResourceDataSource(IActionSequenceResource actionResource, int actionOperation) throws java.io.FileNotFoundException
solutionPath
- actionOperation
- - Type of action operation to be performed
java.io.FileNotFoundException
@Deprecated org.dom4j.Document getResourceAsDocument(java.lang.String solutionPath) throws java.io.IOException
solutionPath
-
java.io.IOException
org.dom4j.Document getResourceAsDocument(java.lang.String solutionPath, int actionOperation) throws java.io.IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
java.io.IOException
@Deprecated org.dom4j.Document getResourceAsDocument(IActionSequenceResource actionResource) throws java.io.IOException
solutionPath
-
java.io.IOException
org.dom4j.Document getResourceAsDocument(IActionSequenceResource actionResource, int actionOperation) throws java.io.IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
java.io.IOException
@Deprecated java.lang.String[] getAllActionSequences()
java.lang.String[] getAllActionSequences(int actionOperation)
actionOperation
- - Type of action operation to be performed
void setMessages(java.util.List messages)
messages
- a List that String messages will be appended tojava.util.List getMessages()
org.dom4j.Document getNavigationUIDocument(java.lang.String solution, java.lang.String path, int actionOperation)
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
- - Type of action operation to be performed
java.lang.String getXSLName(org.dom4j.Document doc, java.lang.String solution, java.lang.String inputXSLName)
doc
- inputXSLName
-
void resetRepository()
ISolutionFile getRootFolder(int actionOperation)
actionOperation
- - Type of action operation to be performed
void localizeDoc(org.dom4j.Node document, ISolutionFile file)
boolean supportsAccessControls()
@Deprecated ISolutionFile getSolutionFile(java.lang.String path)
path
- actionOperation
- - Type of action operation to be performed
Defaults action operation to execute
ISolutionFile getSolutionFile(java.lang.String path, int actionOperation)
path
- actionOperation
- - Type of action operation to be performed
@Deprecated ISolutionFile getSolutionFile(IActionSequenceResource actionResource)
path
-
ISolutionFile getSolutionFile(IActionSequenceResource actionResource, int actionOperation)
actionResource
- actionOperation
- - Type of action operation to be performed
ISolutionFile createFolder(java.io.File newFolder) throws java.io.IOException
newFolder
- The File that points to the new folder to create
java.io.IOException
boolean hasAccess(ISolutionFile aFile, int actionOperation)
aFile
- domain instance to checkactionOperation
- permission requested (A constant from ISolutionRepository.)
void share(ISolutionFile aFile, java.util.List<IPermissionRecipient> shareRecipients)
aFile
- file to shareshareRecipients
- the users or roles with which to share (aka share-ees)int publish(java.lang.String baseUrl, java.lang.String path, java.lang.String fileName, byte[] data, boolean overwrite) throws PentahoAccessControlException
baseUrl
- path
- fileName
- data
- overwrite
-
PentahoAccessControlException
int publish(java.lang.String baseUrl, java.lang.String path, java.lang.String fileName, java.io.File f, boolean overwrite) throws PentahoAccessControlException
baseUrl
- path
- fileName
- f
- overwrite
-
PentahoAccessControlException
void addPermission(ISolutionFile aFile, IPermissionRecipient recipient, IPermissionMask permission)
aFile
.
aFile
- file whose ACL is to be modifiedrecipient
- recipient of the permissionpermission
- right to an action on this file by this uservoid setPermissions(ISolutionFile aFile, java.util.Map<IPermissionRecipient,IPermissionMask> acl) throws PentahoAccessControlException
aFile
.
aFile
- file whose ACL is to be modifiedacl
- new ACL
PentahoAccessControlException
java.util.Map<IPermissionRecipient,IPermissionMask> getPermissions(ISolutionFile aFile)
aFile
- file whose ACL is to be returned
java.util.Map<IPermissionRecipient,IPermissionMask> getEffectivePermissions(ISolutionFile aFile)
aFile
- file whose ACL is to be returned
boolean synchronizeSolutionWithSolutionSource(IPentahoSession session) throws java.lang.UnsupportedOperationException
session
-
java.lang.UnsupportedOperationException
boolean solutionSynchronizationSupported()
@Deprecated java.lang.String getLocalizedFileProperty(ISolutionFile resourceFile, java.lang.String key)
path
- the solution path to the desired resource
java.lang.String getLocalizedFileProperty(ISolutionFile resourceFile, java.lang.String key, int actionOperation)
resourceFile
- key
- actionOperation
- - Type of action operation to be performed
@Deprecated ISolutionFile getFileByPath(java.lang.String path)
getSolutionFile(String, int)
path
- the solution path to the desired resource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |