|
||||||||||
| 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 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()
|
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)
|
Document |
getFullSolutionTree(int actionOperation,
ISolutionFilter filter)
|
String |
getLocalizedFileProperty(ISolutionFile resourceFile,
String key)
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 |
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)
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)
|
long |
getSolutionFileLastModified(String path)
Returns a long that represents the last time this file was modified |
Document |
getSolutions(int actionOperation)
Gets an XML Document representing all the solutions and all the files within all the solutions |
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 |
Document |
getSolutionStructure(int actionOperation)
Returns an XML document that represents the parent/child relationship of the current solution repository |
Document |
getSolutionTree(int actionOperation)
Returns an XML document that defines the entire solution tree. |
Document |
getSolutionTree(int actionOperation,
ISolutionFilter filter)
|
String |
getXSLName(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(IPermissionRecipient permRecipient,
ISolutionFile aFile,
int actionOperation)
Checks permission. |
boolean |
hasAccess(ISolutionFile aFile,
int actionOperation)
Checks permission. |
void |
init(IPentahoSession session)
Initializes the solution repository with the user session |
void |
localizeDoc(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. |
long |
resourceSize(String solutionPath)
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. |
void |
unshare(ISolutionFile aFile,
List<IPermissionRecipient> shareRecipients)
Undoes the share operation. |
| 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
| 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 sessionDocument getSolutions(int actionOperation)
actionOperation - Indicates what the list will be used for - execution or administration
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
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 -
long getSolutionFileLastModified(String path)
path - ClassLoader getClassLoader(String path)
path -
Document getFullSolutionTree(int actionOperation,
ISolutionFilter filter)
Document getSolutionTree(int actionOperation)
actionOperation -
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
long resourceSize(String solutionPath)
solutionPath - - path to the resource
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(String solutionPath,
boolean getLocalizedResource)
throws FileNotFoundException
solutionPath - - location of a resource.
FileNotFoundException
Reader getResourceReader(IActionSequenceResource actionResource)
throws FileNotFoundException,
IOException
actionResource -
FileNotFoundException
IOException
Reader getResourceReader(String solutionPath)
throws FileNotFoundException,
IOException
solutionPath -
FileNotFoundException
IOException
String getResourceAsString(IActionSequenceResource actionResource)
throws IOException
actionResource -
IOException
String getResourceAsString(String solutionPath)
throws IOException
solutionPath -
IOException
byte[] getResourceAsBytes(String solutionPath,
boolean getLocalizedResource)
throws IOException
solutionPath -
IOException
byte[] getResourceAsBytes(IActionSequenceResource actionResource,
boolean getLocalizedResource)
throws IOException
solutionPath -
IOException
IPentahoStreamSource getResourceDataSource(String solutionPath)
throws FileNotFoundException
solutionPath -
FileNotFoundException
IPentahoStreamSource getResourceDataSource(IActionSequenceResource actionResource)
throws FileNotFoundException
solutionPath -
FileNotFoundException
Document getResourceAsDocument(String solutionPath)
throws IOException
solutionPath -
IOException
Document getResourceAsDocument(IActionSequenceResource actionResource)
throws IOException
solutionPath -
IOExceptionString[] getAllActionSequences()
void setMessages(List messages)
messages - a List that String messages will be appended toList getMessages()
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 - String
String getXSLName(Document doc,
String solution,
String inputXSLName)
doc - inputXSLName -
void resetRepository()
ISolutionFile getFileByPath(String path)
path - the solution path to the desired resource
ISolutionFile getRootFolder()
void localizeDoc(Node document,
ISolutionFile file)
boolean supportsAccessControls()
ISolutionFile getSolutionFile(IActionSequenceResource actionResource)
ISolutionFile createFolder(File newFolder)
throws IOException
newFolder - The File that points to the new folder to create
IOException
boolean hasAccess(IPermissionRecipient permRecipient,
ISolutionFile aFile,
int actionOperation)
aFile - domain instance to checkactionOperation - permission requested (A constant from ISolutionRepository.)
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)
void unshare(ISolutionFile aFile,
List<IPermissionRecipient> shareRecipients)
aFile - file to stop sharingshareRecipients - the users or roles with which to stop sharing
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 user
void setPermissions(ISolutionFile aFile,
Map<IPermissionRecipient,IPermissionMask> acl)
throws PentahoAccessControlException
aFile.
aFile - file whose ACL is to be modifiedacl - new ACL
PentahoAccessControlExceptionMap<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 -
UnsupportedOperationExceptionboolean solutionSynchronizationSupported()
String getLocalizedFileProperty(ISolutionFile resourceFile,
String key)
path - the solution path to the desired resource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||