|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IUnifiedRepository
Entry point into the unified repository. The finest grained object that can be read and written to this repository
is a RepositoryFile
.
Method Summary | ||
---|---|---|
boolean |
canUnlockFile(Serializable fileId)
Returns true if the current user can unlock the 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 parentFolderId,
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. |
|
RepositoryFileAcl |
getAcl(Serializable fileId)
Returns ACL for file. |
|
List<RepositoryFile> |
getChildren(Serializable folderId)
Returns the children of this folder. |
|
List<RepositoryFile> |
getChildren(Serializable folderId,
String filter)
Returns the children of this folder that match the specified filter. |
|
|
getDataAtVersionForExecute(Serializable fileId,
Serializable versionId,
Class<T> dataClass)
Gets data at given version for read. |
|
|
getDataAtVersionForRead(Serializable fileId,
Serializable versionId,
Class<T> dataClass)
Gets data at given version for read. |
|
|
getDataForExecute(Serializable fileId,
Class<T> dataClass)
Gets data at base version for execute. |
|
|
getDataForRead(Serializable fileId,
Class<T> dataClass)
Gets data at base version for read. |
|
List<RepositoryFile> |
getDeletedFiles()
Gets all deleted files for the current user. |
|
List<RepositoryFile> |
getDeletedFiles(Serializable folderId)
Gets all deleted files for the current user in this folder. |
|
List<RepositoryFile> |
getDeletedFiles(Serializable folderId,
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 |
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. |
|
RepositoryFileTree |
getTree(String path,
int depth,
String filter)
Gets a tree rooted at path. |
|
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. |
|
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 |
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. |
Method Detail |
---|
RepositoryFile getFile(String path)
path
- path to file
null
if the file does not exist or access is deniedRepositoryFileTree getTree(String path, int depth, String filter)
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
null
if the file does not exist or access is deniedRepositoryFile getFileAtVersion(Serializable fileId, Serializable versionId)
fileId
- file idversionId
- version id
RepositoryFile getFileById(Serializable fileId)
fileId
- file id
null
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 maps
null
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 maps
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
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 parentFolder
RepositoryFile 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 parentFolder
RepositoryFile createFolder(Serializable parentFolderId, RepositoryFile file, String versionMessage)
parentFolderId
- parent folder idfile
- file to createversionMessage
- optional version comment to be applied to parentFolder
RepositoryFile 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 parentFolder
List<RepositoryFile> getChildren(Serializable folderId)
folderId
- id of folder whose children to fetch
null
)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 these
null
)RepositoryFile updateFile(RepositoryFile file, IRepositoryFileData data, String versionMessage)
file
- updated file (not a folder); must have non-null iddata
- updated dataversionMessageoptional
- version comment
void 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
- if of file or folder to move and/or renamedestAbsPath
- path to destination; if only moving then destAbsPath will be an existing pathversionMessageAndLabel
- optional version comment to be applied to source and destination parent foldersvoid undeleteFile(Serializable fileId, String versionMessage)
fileId
- deleted file idversionMessage
- optional version comment to be applied to original parent folderList<RepositoryFile> getDeletedFiles(Serializable folderId)
folderId
- folder id
List<RepositoryFile> getDeletedFiles(Serializable folderId, String filter)
folderId
- folder idfilter
- 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
List<RepositoryFile> getDeletedFiles()
boolean canUnlockFile(Serializable fileId)
true
if the current user can unlock the file. This might be a function of access control.
fileId
- file id
true
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 id
RepositoryFileAcl updateAcl(RepositoryFileAcl acl)
acl
- ACL to set; must have non-null id
getAcl(Serializable)
boolean hasAccess(String path, EnumSet<RepositoryFilePermission> permissions)
true
if user has all permissions given.
path
- path to file or folderpermissions
- permissions to check
true
if user has all permissions givenList<RepositoryFileAce> getEffectiveAces(Serializable fileId)
fileId
- file id
List<RepositoryFileAce> getEffectiveAces(Serializable fileId, boolean forceEntriesInheriting)
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 ACL
VersionSummary getVersionSummary(Serializable fileId, Serializable versionId)
fileId
- file idversionId
- version id (if null
, returns the last version)
List<VersionSummary> getVersionSummaries(Serializable fileId)
fileId
- file id
null
)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 comment
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |