public interface IUnifiedRepository
RepositoryFile
.Modifier and Type | Field and Description |
---|---|
static String |
SYSTEM_FOLDER |
Modifier and Type | Method and Description |
---|---|
boolean |
canUnlockFile(Serializable fileId)
Returns
true if the current user can unlock the file. |
void |
copyFile(Serializable fileId,
String destAbsPath,
String versionMessage)
Copies file.
|
RepositoryFile |
createFile(Serializable parentFolderId,
RepositoryFile file,
IRepositoryFileData data,
RepositoryFileAcl acl,
String versionMessage)
Creates a file.
|
RepositoryFile |
createFile(Serializable parentFolderId,
RepositoryFile file,
IRepositoryFileData data,
String versionMessage)
Creates a file.
|
RepositoryFile |
createFolder(Serializable parentFolderId,
RepositoryFile file,
RepositoryFileAcl acl,
String versionMessage)
Creates a folder.
|
RepositoryFile |
createFolder(Serializable parFolderId,
RepositoryFile file,
String versionMessage)
Creates a folder.
|
void |
deleteFile(Serializable fileId,
boolean permanent,
String versionMessage)
Deletes a file.
|
void |
deleteFile(Serializable fileId,
String versionMessage)
Deletes a file in a recoverable manner.
|
void |
deleteFileAtVersion(Serializable fileId,
Serializable versionId)
Permanently deletes a specific version of a file.
|
void |
deleteLocalePropertiesForFile(RepositoryFile repositoryFile,
String locale) |
RepositoryFileAcl |
getAcl(Serializable fileId)
Returns ACL for file.
|
default List<RepositoryFile> |
getAllDeletedFiles()
Gets all deleted files.
|
List<Locale> |
getAvailableLocalesForFile(RepositoryFile repositoryFile) |
List<Locale> |
getAvailableLocalesForFileById(Serializable fileId) |
List<Locale> |
getAvailableLocalesForFileByPath(String relPath) |
List<RepositoryFile> |
getChildren(RepositoryRequest repositoryRequest)
Returns the children according to the specifications of the RepositoryRequest object
|
List<RepositoryFile> |
getChildren(Serializable folderId)
Deprecated.
|
List<RepositoryFile> |
getChildren(Serializable folderId,
String filter)
Deprecated.
|
List<RepositoryFile> |
getChildren(Serializable folderId,
String filter,
Boolean showHiddenFiles)
Deprecated.
|
<T extends IRepositoryFileData> |
getDataAtVersionForExecute(Serializable fileId,
Serializable versionId,
Class<T> dataClass)
Gets data at given version for read.
|
<T extends IRepositoryFileData> |
getDataAtVersionForRead(Serializable fileId,
Serializable versionId,
Class<T> dataClass)
Gets data at given version for read.
|
<T extends IRepositoryFileData> |
getDataForExecute(Serializable fileId,
Class<T> dataClass)
Gets data at base version for execute.
|
<T extends IRepositoryFileData> |
getDataForExecuteInBatch(List<RepositoryFile> files,
Class<T> dataClass)
Gets the data for multiple
RepositoryFile s for execute. |
<T extends IRepositoryFileData> |
getDataForRead(Serializable fileId,
Class<T> dataClass)
Gets data at base version for read.
|
<T extends IRepositoryFileData> |
getDataForReadInBatch(List<RepositoryFile> files,
Class<T> dataClass)
Gets the data for multiple
RepositoryFile s for read. |
List<RepositoryFile> |
getDeletedFiles()
Gets all deleted files for the current user.
|
List<RepositoryFile> |
getDeletedFiles(String origParentFolderPath)
Gets all deleted files for the current user in this folder.
|
List<RepositoryFile> |
getDeletedFiles(String origParentFolderPath,
String filter)
Gets all deleted files for the current user in this folder.
|
List<RepositoryFileAce> |
getEffectiveAces(Serializable fileId)
Returns the list of access control entries (ACEs) that will be used to make an access control decision.
|
List<RepositoryFileAce> |
getEffectiveAces(Serializable fileId,
boolean forceEntriesInheriting)
Returns the list of access control entries (ACEs) that will be used to make an access control decision.
|
RepositoryFile |
getFile(String path)
Gets file.
|
RepositoryFile |
getFile(String path,
boolean loadLocaleMaps)
Same as
getFile(String) except that if loadMaps is true , the maps for localized
strings will be loaded as well. |
RepositoryFile |
getFile(String path,
boolean loadLocaleMaps,
IPentahoLocale locale)
Retrieves a file at its given version
|
RepositoryFile |
getFile(String path,
IPentahoLocale locale)
Like
getFile(String, boolean) except that the maps which are pulled back are slimmed down to only
contain the localized strings |
RepositoryFile |
getFileAtVersion(Serializable fileId,
Serializable versionId)
Gets file as it was at the given version.
|
RepositoryFile |
getFileById(Serializable fileId)
Gets file.
|
RepositoryFile |
getFileById(Serializable fileId,
boolean loadLocaleMaps)
Same as
getFile(String) except that if loadMaps is true , the maps for localized
strings will be loaded as well. |
RepositoryFile |
getFileById(Serializable fileId,
boolean loadLocaleMaps,
IPentahoLocale locale)
Retrieves a file at its given version by its id
|
RepositoryFile |
getFileById(Serializable fileId,
IPentahoLocale locale)
Same as
getFile(String, IPentahoLocale) except that the Serializable file id is required |
Map<String,Serializable> |
getFileMetadata(Serializable fileId)
Gets a metadata for the given fileid
|
Properties |
getLocalePropertiesForFile(RepositoryFile repositoryFile,
String locale) |
Properties |
getLocalePropertiesForFileById(Serializable fileId,
String locale) |
Properties |
getLocalePropertiesForFileByPath(String relPath,
String locale) |
List<RepositoryFile> |
getReferrers(Serializable fileId)
Get a list of
RepositoryFile s that reference the RepositoryFile identified by fileId. |
List<Character> |
getReservedChars()
Returns a list of characters which cannot be used in file/folder names.
|
RepositoryFileTree |
getTree(RepositoryRequest repositoryRequest)
Gets a tree rooted at path.
|
RepositoryFileTree |
getTree(String path,
int depth,
String filter,
boolean showHidden)
Deprecated.
|
List<VersionSummary> |
getVersionSummaries(Serializable fileId)
Returns a list of version summary instances.
|
VersionSummary |
getVersionSummary(Serializable fileId,
Serializable versionId)
Returns a version summary for the given file id and version id.
|
List<VersionSummary> |
getVersionSummaryInBatch(List<RepositoryFile> files)
Returns a version summary for every
RepositoryFile provided. |
boolean |
hasAccess(String path,
EnumSet<RepositoryFilePermission> permissions)
Returns
true if user has all permissions given. |
void |
lockFile(Serializable fileId,
String message)
Locks a file.
|
void |
moveFile(Serializable fileId,
String destAbsPath,
String versionMessage)
Moves and/or renames file.
|
void |
restoreFileAtVersion(Serializable fileId,
Serializable versionId,
String versionMessage)
Makes a file, as it was at the given version, the latest version.
|
void |
setFileMetadata(Serializable fileId,
Map<String,Serializable> metadataMap)
Sets a metadata object for the given fileid
|
void |
setLocalePropertiesForFile(RepositoryFile repoFile,
String locale,
Properties properties) |
void |
setLocalePropertiesForFileById(Serializable fileId,
String locale,
Properties properties) |
void |
setLocalePropertiesForFileByPath(String relPath,
String locale,
Properties properties) |
void |
undeleteFile(Serializable fileId,
String versionMessage)
Recovers a deleted file if it was not permanently deleted.
|
void |
unlockFile(Serializable fileId)
Unlocks a file.
|
RepositoryFileAcl |
updateAcl(RepositoryFileAcl acl)
Updates an ACL.
|
RepositoryFile |
updateFile(RepositoryFile file,
IRepositoryFileData data,
String versionMessage)
Updates a file and/or the data of a file.
|
RepositoryFile |
updateFolder(RepositoryFile folder,
String versionMessage)
Updates a file and/or the data of a file.
|
static final String SYSTEM_FOLDER
RepositoryFile getFile(String path)
path
- path to filenull
if the file does not exist or access is denied@Deprecated RepositoryFileTree getTree(String path, int depth, String filter, boolean showHidden)
path
- path to filedepth
- 0 fetches just file at path; positive integer n fetches node at path plus n levels of children;
negative integer fetches all childrenfilter
- filter may be a full name or a partial name with one or more wildcard characters ("*"), or a
disjunction (using the "|" character to represent logical OR) of these; filter does not apply to root
node. Filter segments can also filter the results to just Files or Folders by passing in one of the
following: ( FILES | FOLDERS | [default] FILES_FOLDERS )showHidden
- is a boolean which identify whether to include the hidden files/folders in the list or notnull
if the file does not exist or access is deniedRepositoryFileTree getTree(RepositoryRequest repositoryRequest)
repositoryRequest
- Contains the information necessary to process the request. See the RepositoryRequest
class.null
if the file does not exist or access is deniedRepositoryFile getFileAtVersion(Serializable fileId, Serializable versionId)
fileId
- file idversionId
- version idRepositoryFile getFileById(Serializable fileId)
fileId
- file idnull
if the file does not exist or access is deniedRepositoryFile getFile(String path, boolean loadLocaleMaps)
getFile(String)
except that if loadMaps
is true
, the maps for localized
strings will be loaded as well. (Normally these are not loaded.) Use true
in editing tools that can
show the maps for editing purposes.path
- path to fileloadLocaleMaps
- true
to load localized string mapsnull
if the file does not exist or access is deniedRepositoryFile getFileById(Serializable fileId, boolean loadLocaleMaps)
getFile(String)
except that if loadMaps
is true
, the maps for localized
strings will be loaded as well. (Normally these are not loaded.) Use true
in editing tools that can
show the maps for editing purposes.fileId
- file idloadLocaleMaps
- true
to load localized string mapsnull
if the file does not exist or access is deniedRepositoryFile getFile(String path, IPentahoLocale locale)
getFile(String, boolean)
except that the maps which are pulled back are slimmed down to only
contain the localized stringspath
- String
of the path to the filelocale
- IPentahoLocale
which the user wishes to have contained in the mapRepositoryFile
RepositoryFile getFileById(Serializable fileId, IPentahoLocale locale)
getFile(String, IPentahoLocale)
except that the Serializable
file id is requiredfileId
- Serializable
file Id of the filelocale
- IPentahoLocale
which the user wishes to have contained in the mapnull
if the file does not exist or access is deniedRepositoryFile getFile(String path, boolean loadLocaleMaps, IPentahoLocale locale)
path
- String
full path to fileloadLocaleMaps
- boolean - to determine whether to load the locale maplocale
- IPentahoLocale
locale to retrieve for RepositoryFile
RepositoryFile
RepositoryFile getFileById(Serializable fileId, boolean loadLocaleMaps, IPentahoLocale locale)
fileId
- Serializable
file idloadLocaleMaps
- boolean - to determine whether to load the locale maplocale
- IPentahoLocale
locale to retrieve for RepositoryFile
null
if the file does not exist or access is denied<T extends IRepositoryFileData> T getDataForRead(Serializable fileId, Class<T> dataClass)
fileId
- file iddataClass
- class that implements IRepositoryFileData
<T extends IRepositoryFileData> T getDataAtVersionForRead(Serializable fileId, Serializable versionId, Class<T> dataClass)
fileId
- file idversionId
- version iddataClass
- class that implements IRepositoryFileData
<T extends IRepositoryFileData> T getDataForExecute(Serializable fileId, Class<T> dataClass)
fileId
- file iddataClass
- class that implements IRepositoryFileData
<T extends IRepositoryFileData> T getDataAtVersionForExecute(Serializable fileId, Serializable versionId, Class<T> dataClass)
fileId
- file idversionId
- version iddataClass
- class that implements IRepositoryFileData
<T extends IRepositoryFileData> List<T> getDataForReadInBatch(List<RepositoryFile> files, Class<T> dataClass)
RepositoryFile
s for read. Each RepositoryFile
may or may not
contain a version number. If a version number is omitted it is assumed the latest data for the
RepositoryFile
is being requested.T
- Type of IRepositoryFileData
files
- Repository files to fetch data for. Only RepositoryFile.getId()
and
RepositoryFile.getVersionId()
are used to identify IRepositoryFileData
objects to
return.dataClass
- class that implements IRepositoryFileData
<T extends IRepositoryFileData> List<T> getDataForExecuteInBatch(List<RepositoryFile> files, Class<T> dataClass)
RepositoryFile
s for execute. Each RepositoryFile
may or may not
contain a version number. If a version number is omitted it is assumed the latest data for the
RepositoryFile
is being requested.T
- Type of IRepositoryFileData
files
- Repository files to fetch data for. Only RepositoryFile.getId()
and
RepositoryFile.getVersionId()
are used to identify IRepositoryFileData
objects to
return.dataClass
- class that implements IRepositoryFileData
RepositoryFile createFile(Serializable parentFolderId, RepositoryFile file, IRepositoryFileData data, String versionMessage)
parentFolderId
- parent folder idfile
- file to createdata
- file dataversionMessage
- optional version comment to be applied to parentFolderRepositoryFile createFile(Serializable parentFolderId, RepositoryFile file, IRepositoryFileData data, RepositoryFileAcl acl, String versionMessage)
parentFolderId
- parent folder idfile
- file to createdata
- file dataacl
- file aclversionMessage
- optional version comment to be applied to parentFolderRepositoryFile createFolder(Serializable parFolderId, RepositoryFile file, String versionMessage)
parFolderId
- parent folder idfile
- file to createversionMessage
- optional version comment to be applied to parentFolderRepositoryFile createFolder(Serializable parentFolderId, RepositoryFile file, RepositoryFileAcl acl, String versionMessage)
parentFolderId
- parent folder idfile
- file to createacl
- file aclversionMessage
- optional version comment to be applied to parentFolderRepositoryFile updateFolder(RepositoryFile folder, String versionMessage)
folder
- updated folder (not a file); must have non-null idversionMessage
- (optional) version comment@Deprecated List<RepositoryFile> getChildren(Serializable folderId)
folderId
- id of folder whose children to fetchnull
)@Deprecated List<RepositoryFile> getChildren(Serializable folderId, String filter)
folderId
- id of folder whose children to fetchfilter
- filter may be a full name or a partial name with one or more wildcard characters ("*"), or a
disjunction (using the "|" character to represent logical OR) of thesenull
)@Deprecated List<RepositoryFile> getChildren(Serializable folderId, String filter, Boolean showHiddenFiles)
folderId
- id of folder whose children to fetchfilter
- filter may be a full name or a partial name with one or more wildcard characters ("*"), or a
disjunction (using the "|" character to represent logical OR) of theseshowHiddenFiles
- flag determines whether to return the hidden files in he response or notnull
)List<RepositoryFile> getChildren(RepositoryRequest repositoryRequest)
repositoryRequest
- See {@link RepositoryRequest) classnull
)RepositoryFile updateFile(RepositoryFile file, IRepositoryFileData data, String versionMessage)
file
- updated file (not a folder); must have non-null iddata
- updated dataversionMessage
- (optional) version commentvoid deleteFile(Serializable fileId, boolean permanent, String versionMessage)
fileId
- file idpermanent
- if true
, once file is deleted, it cannot be undeletedversionMessage
- optional version commentvoid deleteFile(Serializable fileId, String versionMessage)
fileId
- file idversionMessage
- optional version commentvoid moveFile(Serializable fileId, String destAbsPath, String versionMessage)
fileId
- id of file or folder to move and/or renamedestAbsPath
- path to destination; if only moving then destAbsPath will be an existing folderversionMessage
- optional version comment to be applied to source and destination parent foldersvoid copyFile(Serializable fileId, String destAbsPath, String versionMessage)
fileId
- id of file or folder to copydestAbsPath
- path to destination; if only copying (without name change) then destAbsPath will be an existing
folderversionMessage
- optional version comment to be applied to destination parent foldervoid undeleteFile(Serializable fileId, String versionMessage)
fileId
- deleted file idversionMessage
- optional version comment to be applied to original parent folderList<RepositoryFile> getDeletedFiles(String origParentFolderPath)
origParentFolderPath
- path to original parent folderList<RepositoryFile> getDeletedFiles(String origParentFolderPath, String filter)
origParentFolderPath
- path to original parent folderfilter
- filter may be a full name or a partial name with one or more wildcard characters ("*"), or a
disjunction (using the "|" character to represent logical OR) of theseList<RepositoryFile> getDeletedFiles()
default List<RepositoryFile> getAllDeletedFiles()
boolean canUnlockFile(Serializable fileId)
true
if the current user can unlock the file. This might be a function of access control.fileId
- file idtrue
if the current user can unlock the filevoid lockFile(Serializable fileId, String message)
fileId
- file idlock
- messagevoid unlockFile(Serializable fileId)
fileId
- file idRepositoryFileAcl getAcl(Serializable fileId)
fileId
- file idRepositoryFileAcl updateAcl(RepositoryFileAcl acl)
acl
- ACL to set; must have non-null idgetAcl(Serializable)
boolean hasAccess(String path, EnumSet<RepositoryFilePermission> permissions)
true
if user has all permissions given. Note that false
is returned when the path does
not exist.path
- path to file or folderpermissions
- permissions to checktrue
if user has all permissions givenList<RepositoryFileAce> getEffectiveAces(Serializable fileId)
getEffectiveAces(fileId, false)
.fileId
- file idList<RepositoryFileAce> getEffectiveAces(Serializable fileId, boolean forceEntriesInheriting)
getEffectiveAces(get_parent_id(fileId))
. Note that get_parent_id
is
not a real method.fileId
- file idforceEntriesInheriting
- true
to treat ACL as if isEntriesInheriting
was true; this avoids having the caller
fetch the parent of ACL belonging to file with fileId
; no change is persisted to the ACLVersionSummary getVersionSummary(Serializable fileId, Serializable versionId)
fileId
- file idversionId
- version id (if null
, returns the last version)List<VersionSummary> getVersionSummaryInBatch(List<RepositoryFile> files)
RepositoryFile
provided. Each RepositoryFile
may or may
not contain a version number. If a version number is omitted it is assumed the latest version for the
RepositoryFile
is being requested.files
- Repository files to fetch version summaries for. Only RepositoryFile.getId()
and
RepositoryFile.getVersionId()
are used to identify VersionSummary
objects to return.List<VersionSummary> getVersionSummaries(Serializable fileId)
fileId
- file idnull
)void deleteFileAtVersion(Serializable fileId, Serializable versionId)
fileId
- file idversionId
- version id (MUST not be null)void restoreFileAtVersion(Serializable fileId, Serializable versionId, String versionMessage)
updateFile(RepositoryFile, IRepositoryFileData, String)
with a file and data that matched the
state of the file and data at the given version.fileId
- file idversionId
- version idversionMessage
- optional version commentList<RepositoryFile> getReferrers(Serializable fileId)
RepositoryFile
s that reference the RepositoryFile identified by fileId.fileId
- file idvoid setFileMetadata(Serializable fileId, Map<String,Serializable> metadataMap)
fileId
- file idmetadataMap
- Map of properties to apply to this file.Map<String,Serializable> getFileMetadata(Serializable fileId)
fileId
- file idList<Character> getReservedChars()
A percent-encoded octet is encoded as a character triplet, consisting of the percent character "%" followed by the two hexadecimal digits representing that octet's numeric value. For example, "%20" is the percent-encoding for the binary octet "00100000" (ABNF: %x20), which in US-ASCII corresponds to the space character (SP).
List<Locale> getAvailableLocalesForFileById(Serializable fileId)
List<Locale> getAvailableLocalesForFile(RepositoryFile repositoryFile)
Properties getLocalePropertiesForFileById(Serializable fileId, String locale)
Properties getLocalePropertiesForFileByPath(String relPath, String locale)
Properties getLocalePropertiesForFile(RepositoryFile repositoryFile, String locale)
void setLocalePropertiesForFileById(Serializable fileId, String locale, Properties properties)
void setLocalePropertiesForFileByPath(String relPath, String locale, Properties properties)
void setLocalePropertiesForFile(RepositoryFile repoFile, String locale, Properties properties)
void deleteLocalePropertiesForFile(RepositoryFile repositoryFile, String locale)
Copyright © 2018 Hitachi Vantara. All rights reserved.