|
||||||||||
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 org.pentaho.platform.repository.solution.filebased.FileBasedSolutionRepository
public class FileBasedSolutionRepository
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.pentaho.platform.repository.solution.SolutionRepositoryBase |
---|
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 | |
---|---|
FileBasedSolutionRepository()
|
Method Summary | |
---|---|
void |
addPermission(ISolutionFile file,
IPermissionRecipient recipient,
IPermissionMask permission)
Adds to the ACL associated with aFile . |
String |
getActionDefinition(IRuntimeContext runtimeContext,
String actionPath)
|
Document |
getActionDefinitionDocument(IRuntimeContext runtimeContext,
String actionPath)
|
IActionSequence |
getActionSequence(String solutionName,
String actionPath,
String sequenceName,
int localLoggingLevel,
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 file)
Returns the ACL for the given file. |
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 file)
Returns the ACL for the given file. |
String |
getRepositoryName()
|
Document |
getSolutionDocument(String documentPath)
|
Document |
getSolutionDocument(String solutionName,
String actionPath,
String actionName)
|
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 |
getValue(Document doc,
String xPath,
String defaultValue)
|
boolean |
hasAccess(IPermissionRecipient permRecipient,
ISolutionFile file,
int actionOperation)
Checks permission. |
boolean |
hasAccess(ISolutionFile file,
int actionOperation)
No access control is enforced in this implementation. |
void |
init()
|
boolean |
keepFile(ISolutionFile solutionFile,
int actionOperation)
|
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 localSession,
int localLoggingLevel)
Loads or reloads a solution repository after a structure change. |
boolean |
resourceExists(String solutionPath)
Returns a true if the specified resource exists. |
long |
resourceSize(String solutionPath)
Returns the size of the specfied resource. |
void |
setPermissions(ISolutionFile file,
Map<IPermissionRecipient,IPermissionMask> acl)
Replaces the ACL on aFile . |
void |
share(ISolutionFile file,
List<IPermissionRecipient> shareRecipient)
Share file with recipient. |
boolean |
solutionSynchronizationSupported()
|
boolean |
supportsAccessControls()
|
boolean |
synchronizeSolutionWithSolutionSource(IPentahoSession pSession)
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 file,
List<IPermissionRecipient> shareRecipients)
Undoes the share operation. |
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 |
---|
getMessages, setMessages |
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 FileBasedSolutionRepository()
Method Detail |
---|
public void init()
init
in class SolutionRepositoryBase
public ClassLoader getClassLoader(String path)
ISolutionRepository
getClassLoader
in interface ISolutionRepository
public IActionSequence getActionSequence(String solutionName, String actionPath, String sequenceName, int localLoggingLevel, int actionOperation)
ISolutionRepository
null
if the
requested action seqeuence is not found.
getActionSequence
in interface ISolutionRepository
solutionName
- The name of the solution - like the root folderactionPath
- The relative path (from the solution) of where the file is storedsequenceName
- The name of the action sequencelocalLoggingLevel
- The level at which to log messagesactionOperation
- Whether the action sequence is being retrieved for administration or execution
public Document getSolutionDocument(String solutionName, String actionPath, String actionName)
public Document getSolutionDocument(String documentPath)
public String getActionDefinition(IRuntimeContext runtimeContext, String actionPath)
public Document getActionDefinitionDocument(IRuntimeContext runtimeContext, String actionPath)
public void reloadSolutionRepository(IPentahoSession localSession, int localLoggingLevel)
ISolutionRepository
reloadSolutionRepository
in interface ISolutionRepository
localSession
- - The session associated with this solution repositorylocalLoggingLevel
- - The requested level of loggingpublic Document getSolutions(String solutionName, String pathName, int actionOperation, boolean visibleOnly)
ISolutionRepository
getSolutions
in interface ISolutionRepository
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
public Document getSolutions(int actionOperation)
ISolutionRepository
getSolutions
in interface ISolutionRepository
getSolutions
in class SolutionRepositoryBase
actionOperation
- Indicates what the list will be used for - execution or administration
public String getValue(Document doc, String xPath, String defaultValue)
public Document getSolutionStructure(int actionOperation)
ISolutionRepository
getSolutionStructure
in interface ISolutionRepository
public Document getSolutionTree(int actionOperation, ISolutionFilter filter)
getSolutionTree
in interface ISolutionRepository
filter
- an implementation of a ISolutionFilter that determines which files will be returned
public Document getSolutionTree(int actionOperation)
ISolutionRepository
getSolutionTree
in interface ISolutionRepository
public boolean resourceExists(String solutionPath)
ISolutionRepository
resourceExists
in interface ISolutionRepository
solutionPath
- - path to the resource
public long resourceSize(String solutionPath)
ISolutionRepository
resourceSize
in interface ISolutionRepository
solutionPath
- - path to the resource
public String[] getAllActionSequences()
getAllActionSequences
in interface ISolutionRepository
public long getSolutionFileLastModified(String path)
ISolutionRepository
getSolutionFileLastModified
in interface ISolutionRepository
public Document getNavigationUIDocument(String solution, String path, int actionOperation)
ISolutionRepository
getNavigationUIDocument
in interface ISolutionRepository
getNavigationUIDocument
in class SolutionRepositoryBase
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 boolean keepFile(ISolutionFile solutionFile, int actionOperation)
keepFile
in interface ISolutionFilter
public String getRepositoryName()
getRepositoryName
in interface ISolutionRepository
public boolean supportsAccessControls()
supportsAccessControls
in interface ISolutionRepository
public boolean hasAccess(ISolutionFile file, int actionOperation)
hasAccess
in interface ISolutionRepository
file
- domain instance to checkactionOperation
- permission requested (A constant from ISolutionRepository.)
supportsAccessControls
public boolean hasAccess(IPermissionRecipient permRecipient, ISolutionFile file, int actionOperation)
ISolutionRepository
hasAccess
in interface ISolutionRepository
file
- domain instance to checkactionOperation
- permission requested (A constant from ISolutionRepository.)
public int publish(String baseUrl, String path, String fileName, byte[] data, boolean overwrite) throws PentahoAccessControlException
ISolutionRepository
publish
in interface ISolutionRepository
PentahoAccessControlException
public int publish(String baseUrl, String path, String fileName, File f, boolean overwrite) throws PentahoAccessControlException
ISolutionRepository
publish
in interface ISolutionRepository
PentahoAccessControlException
public void share(ISolutionFile file, List<IPermissionRecipient> shareRecipient)
ISolutionRepository
share
in interface ISolutionRepository
file
- file to shareshareRecipient
- the users or roles with which to share (aka share-ees)public void unshare(ISolutionFile file, List<IPermissionRecipient> shareRecipients)
ISolutionRepository
unshare
in interface ISolutionRepository
file
- file to stop sharingshareRecipients
- the users or roles with which to stop sharingpublic void addPermission(ISolutionFile file, IPermissionRecipient recipient, IPermissionMask permission)
ISolutionRepository
aFile
.
addPermission
in interface ISolutionRepository
file
- file whose ACL is to be modifiedrecipient
- recipient of the permissionpermission
- right to an action on this file by this userpublic void setPermissions(ISolutionFile file, Map<IPermissionRecipient,IPermissionMask> acl) throws PentahoAccessControlException
ISolutionRepository
aFile
.
setPermissions
in interface ISolutionRepository
file
- file whose ACL is to be modifiedacl
- new ACL
PentahoAccessControlException
public Map<IPermissionRecipient,IPermissionMask> getPermissions(ISolutionFile file)
ISolutionRepository
getPermissions
in interface ISolutionRepository
file
- file whose ACL is to be returned
public Map<IPermissionRecipient,IPermissionMask> getEffectivePermissions(ISolutionFile file)
ISolutionRepository
getEffectivePermissions
in interface ISolutionRepository
file
- file whose ACL is to be returned
public boolean synchronizeSolutionWithSolutionSource(IPentahoSession pSession)
ISolutionRepository
synchronizeSolutionWithSolutionSource
in interface ISolutionRepository
public boolean solutionSynchronizationSupported()
solutionSynchronizationSupported
in interface ISolutionRepository
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |