|
||||||||||
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 String |
INDEX_FILENAME
|
static 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(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 |
IActionSequence |
getActionSequence(String solutionName,
String actionPath,
String actionName,
int loggingLevel,
int actionOperation)
Retrieves the action sequence from the repository. |
String[] |
getAllActionSequences()
Deprecated. |
String[] |
getAllActionSequences(int actionOperation)
An array of Strings where each string is the fully qualified path of every *.xaction contained in the repository. |
ClassLoader |
getClassLoader(String path)
Returns an appropriate class loader for a specific path |
Map<IPermissionRecipient,IPermissionMask> |
getEffectivePermissions(ISolutionFile aFile)
Returns the ACL for the given file. |
ISolutionFile |
getFileByPath(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)
|
String |
getLocalizedFileProperty(ISolutionFile resourceFile,
String key)
Deprecated. |
String |
getLocalizedFileProperty(ISolutionFile resourceFile,
String key,
int actionOperation)
This method retrieves a locale aware value given a key and a file. |
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(String solution,
String path,
int actionOperation)
Get an XML document that describes the structure of the solution repository. |
Map<IPermissionRecipient,IPermissionMask> |
getPermissions(ISolutionFile aFile)
Returns the ACL for the given file. |
String |
getRepositoryName()
|
byte[] |
getResourceAsBytes(IActionSequenceResource actionResource,
boolean getLocalizedResource)
Deprecated. |
byte[] |
getResourceAsBytes(IActionSequenceResource actionResource,
boolean getLocalizedResource,
int actionOperation)
See getResourceInputBytes(String solutionPath). |
byte[] |
getResourceAsBytes(String solutionPath,
boolean getLocalizedResource)
Deprecated. |
byte[] |
getResourceAsBytes(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(String solutionPath)
Deprecated. |
org.dom4j.Document |
getResourceAsDocument(String solutionPath,
int actionOperation)
See getResourceInputStream(String solutionPath). |
String |
getResourceAsString(IActionSequenceResource actionResource)
Deprecated. |
String |
getResourceAsString(IActionSequenceResource actionResource,
int actionOperation)
See getResourceInputStream(IActionResource actionResource). |
String |
getResourceAsString(String solutionPath)
Deprecated. |
String |
getResourceAsString(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(String solutionPath)
Deprecated. |
org.pentaho.commons.connection.IPentahoStreamSource |
getResourceDataSource(String solutionPath,
int actionOperation)
See getResourceInputStream(String solutionPath). |
InputStream |
getResourceInputStream(IActionSequenceResource actionResource,
boolean getLocalizedResource)
Deprecated. |
InputStream |
getResourceInputStream(IActionSequenceResource actionResource,
boolean getLocalizedResource,
int actionOperation)
Given a IActionResource this method returns a InputStream that references the content of the actionResource. |
InputStream |
getResourceInputStream(String solutionPath,
boolean getLocalizedResource)
Deprecated. |
InputStream |
getResourceInputStream(String solutionPath,
boolean getLocalizedResource,
int actionOperation)
Returns an InputStream that contains the data of the resource defined by the solutionPath. |
Reader |
getResourceReader(IActionSequenceResource actionResource)
Deprecated. |
Reader |
getResourceReader(IActionSequenceResource actionResource,
int actionOperation)
See getResourceInputStream(IActionResource actionResource). |
Reader |
getResourceReader(String solutionPath)
Deprecated. |
Reader |
getResourceReader(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(String path)
Deprecated. |
ISolutionFile |
getSolutionFile(String path,
int actionOperation)
|
long |
getSolutionFileLastModified(String path)
Deprecated. |
long |
getSolutionFileLastModified(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(String solutionName,
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)
|
String |
getXSLName(org.dom4j.Document doc,
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 |
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(String baseUrl,
String path,
String fileName,
byte[] data,
boolean overwrite)
Put a file into the solution repo. |
int |
publish(String baseUrl,
String path,
String fileName,
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(String solutionPath)
|
boolean |
removeSolutionFile(String solution,
String path,
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(String solutionPath)
Returns a true if the specified resource exists. |
boolean |
resourceExists(String solutionPath,
int actionOperation)
Returns a true if the specified resource exists. |
long |
resourceSize(String solutionPath)
Returns the size of the specfied resource. |
long |
resourceSize(String solutionPath,
int actionOperation)
Returns the size of the specfied resource. |
void |
setMessages(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,
Map<IPermissionRecipient,IPermissionMask> acl)
Replaces the ACL on aFile . |
void |
share(ISolutionFile aFile,
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 String INDEX_FILENAME
static final char SEPARATOR
static final String REPOSITORY_SERVICE_CACHE_REGION
Method Detail |
---|
IActionSequence getActionSequence(String solutionName, String actionPath, 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(String solutionName, 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 loggingString getRepositoryName()
boolean removeSolutionFile(String solution, String path, String fileName)
solution
- path
- fileName
-
boolean removeSolutionFile(String solutionPath)
int addSolutionFile(String baseUrl, String path, String fileName, File f, boolean overwrite)
baseUrl
- path
- fileName
- fi
- overwrite
-
int addSolutionFile(String baseUrl, String path, String fileName, byte[] data, boolean overwrite)
baseUrl
- path
- fileName
- data
- overwrite
-
@Deprecated long getSolutionFileLastModified(String path)
path
- long getSolutionFileLastModified(String path, int actionOperation)
path
- actionOperation
- - Type of action operation to be performedClassLoader getClassLoader(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(String solutionPath)
solutionPath
- - path to the resource
boolean resourceExists(String solutionPath, int actionOperation)
solutionPath
- - path to the resourceactionOperation
- - Type of action operation to be performed
long resourceSize(String solutionPath)
solutionPath
- - path to the resource
long resourceSize(String solutionPath, int actionOperation)
solutionPath
- - path to the resourceactionOperation
- - Type of action operation to be performed
@Deprecated InputStream getResourceInputStream(IActionSequenceResource actionResource, boolean getLocalizedResource) throws 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
FileNotFoundException
InputStream getResourceInputStream(IActionSequenceResource actionResource, boolean getLocalizedResource, int actionOperation) throws 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
FileNotFoundException
@Deprecated InputStream getResourceInputStream(String solutionPath, boolean getLocalizedResource) throws FileNotFoundException
solutionPath
- - location of a resource.
FileNotFoundException
InputStream getResourceInputStream(String solutionPath, boolean getLocalizedResource, int actionOperation) throws FileNotFoundException
solutionPath
- - location of a resource.actionOperation
- - Type of action operation to be performed
FileNotFoundException
@Deprecated Reader getResourceReader(IActionSequenceResource actionResource) throws FileNotFoundException, IOException
actionResource
-
FileNotFoundException
IOException
Reader getResourceReader(IActionSequenceResource actionResource, int actionOperation) throws FileNotFoundException, IOException
actionResource
- actionOperation
- - Type of action operation to be performed
FileNotFoundException
IOException
@Deprecated Reader getResourceReader(String solutionPath) throws FileNotFoundException, IOException
solutionPath
-
FileNotFoundException
IOException
Reader getResourceReader(String solutionPath, int actionOperation) throws FileNotFoundException, IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
FileNotFoundException
IOException
@Deprecated String getResourceAsString(IActionSequenceResource actionResource) throws IOException
actionResource
-
IOException
String getResourceAsString(IActionSequenceResource actionResource, int actionOperation) throws IOException
actionResource
- actionOperation
- - Type of action operation to be performed
IOException
@Deprecated String getResourceAsString(String solutionPath) throws IOException
solutionPath
-
IOException
String getResourceAsString(String solutionPath, int actionOperation) throws IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
IOException
@Deprecated byte[] getResourceAsBytes(String solutionPath, boolean getLocalizedResource) throws IOException
solutionPath
-
IOException
byte[] getResourceAsBytes(String solutionPath, boolean getLocalizedResource, int actionOperation) throws IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
IOException
@Deprecated byte[] getResourceAsBytes(IActionSequenceResource actionResource, boolean getLocalizedResource) throws IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
IOException
byte[] getResourceAsBytes(IActionSequenceResource actionResource, boolean getLocalizedResource, int actionOperation) throws IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
IOException
@Deprecated org.pentaho.commons.connection.IPentahoStreamSource getResourceDataSource(String solutionPath) throws FileNotFoundException
solutionPath
-
FileNotFoundException
org.pentaho.commons.connection.IPentahoStreamSource getResourceDataSource(String solutionPath, int actionOperation) throws FileNotFoundException
solutionPath
- actionOperation
- - Type of action operation to be performed
FileNotFoundException
@Deprecated org.pentaho.commons.connection.IPentahoStreamSource getResourceDataSource(IActionSequenceResource actionResource) throws FileNotFoundException
solutionPath
-
FileNotFoundException
org.pentaho.commons.connection.IPentahoStreamSource getResourceDataSource(IActionSequenceResource actionResource, int actionOperation) throws FileNotFoundException
solutionPath
- actionOperation
- - Type of action operation to be performed
FileNotFoundException
@Deprecated org.dom4j.Document getResourceAsDocument(String solutionPath) throws IOException
solutionPath
-
IOException
org.dom4j.Document getResourceAsDocument(String solutionPath, int actionOperation) throws IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
IOException
@Deprecated org.dom4j.Document getResourceAsDocument(IActionSequenceResource actionResource) throws IOException
solutionPath
-
IOException
org.dom4j.Document getResourceAsDocument(IActionSequenceResource actionResource, int actionOperation) throws IOException
solutionPath
- actionOperation
- - Type of action operation to be performed
IOException
@Deprecated String[] getAllActionSequences()
String[] getAllActionSequences(int actionOperation)
actionOperation
- - Type of action operation to be performed
void setMessages(List messages)
messages
- a List that String messages will be appended toList getMessages()
org.dom4j.Document getNavigationUIDocument(String solution, 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
String getXSLName(org.dom4j.Document doc, String solution, 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(String path)
path
- actionOperation
- - Type of action operation to be performed
Defaults action operation to execute
ISolutionFile getSolutionFile(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(File newFolder) throws IOException
newFolder
- The File that points to the new folder to create
IOException
boolean hasAccess(ISolutionFile aFile, int actionOperation)
aFile
- domain instance to checkactionOperation
- permission requested (A constant from ISolutionRepository.)
void share(ISolutionFile aFile, List<IPermissionRecipient> shareRecipients)
aFile
- file to shareshareRecipients
- the users or roles with which to share (aka share-ees)int publish(String baseUrl, String path, String fileName, byte[] data, boolean overwrite) throws PentahoAccessControlException
baseUrl
- path
- fileName
- data
- overwrite
-
PentahoAccessControlException
int publish(String baseUrl, String path, String fileName, 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, Map<IPermissionRecipient,IPermissionMask> acl) throws PentahoAccessControlException
aFile
.
aFile
- file whose ACL is to be modifiedacl
- new ACL
PentahoAccessControlException
Map<IPermissionRecipient,IPermissionMask> getPermissions(ISolutionFile aFile)
aFile
- file whose ACL is to be returned
Map<IPermissionRecipient,IPermissionMask> getEffectivePermissions(ISolutionFile aFile)
aFile
- file whose ACL is to be returned
boolean synchronizeSolutionWithSolutionSource(IPentahoSession session) throws UnsupportedOperationException
session
-
UnsupportedOperationException
boolean solutionSynchronizationSupported()
@Deprecated String getLocalizedFileProperty(ISolutionFile resourceFile, String key)
path
- the solution path to the desired resource
String getLocalizedFileProperty(ISolutionFile resourceFile, String key, int actionOperation)
resourceFile
- key
- actionOperation
- - Type of action operation to be performed
@Deprecated ISolutionFile getFileByPath(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 |