|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.jcr.business.RepositoryFileHome
public class RepositoryFileHome
Home class for JCR repository operations
| Field Summary | |
|---|---|
static java.lang.String |
CONTEXT_NAME
|
static java.lang.String |
SPRING_JSR170_JCRLIST
|
static java.lang.String |
SPRING_REPOSITORY_FILEdao
|
static java.lang.String |
SPRINGworkspaceDao
|
| Constructor Summary | |
|---|---|
protected |
RepositoryFileHome()
Default constructor |
| Method Summary | |
|---|---|
void |
addFile(AdminWorkspace workspace,
java.lang.String path,
java.io.File file,
java.lang.String strMimeType,
JsrUser user)
Create a file in workspace strWorkspace in directory designed by path with content file |
boolean |
canAccess(AdminWorkspace adminWorkspace,
java.lang.String strAccessType,
java.lang.String[] userRoles,
JsrUser user)
Tests if the workspace strWorkspace can be accessed with roles in userRoles and access of type strAccessType |
boolean |
canCreateWorkspace(java.lang.String strJcrType)
This is part of admin functionalities |
void |
createFolder(AdminWorkspace workspace,
java.lang.String path,
JsrUser user)
Create a directory in workspace strWorkspace at location path |
void |
createWorkspace(java.lang.String strJcrType,
java.lang.String strWorkspaceName)
Create a new workspace |
void |
doRecursive(AdminWorkspace adminWorkspace,
AdminView view,
java.lang.String strStartPath,
INodeAction<org.apache.lucene.document.Document,java.util.Collection<org.apache.lucene.document.Document>> action,
JsrUser user)
Recursively delegates an specific action on a JCR content. |
java.util.Map<java.lang.String,java.lang.Boolean> |
getAvailableAccess(AdminWorkspace adminWorkspace,
java.lang.String[] userRoles,
JsrUser user)
Get all available access, given some roles |
fr.paris.lutece.util.ReferenceList |
getAvailableJcr()
|
java.util.List<java.lang.String> |
getAvailableJcrList()
|
fr.paris.lutece.util.ReferenceList |
getAvailableWorkspaces(java.lang.String strJcrType)
Get all available workspaces |
java.util.List<IRepositoryFile> |
getFileHistory(AdminWorkspace adminWorkspace,
java.lang.String strFileId,
JsrUser user)
Gets the file history |
static RepositoryFileHome |
getInstance()
Returns the instance of the singleton |
java.util.Map<java.lang.String,JcrLock> |
getLocks(AdminWorkspace adminWorkspace,
AdminView view,
JsrUser user)
Returns a list of all files locked |
java.util.List<IRepositoryFile> |
getPathToFile(AdminWorkspace adminWorkspace,
java.lang.String strFileId,
JsrUser user)
Gives a list of files from the root node to the given node |
java.lang.String |
getPrettyAbsolutePath(AdminWorkspace adminWorkspace,
IRepositoryFile rootFile,
JsrUser jsrUser)
|
IRepositoryFile |
getRepositoryFile(AdminWorkspace workspace,
java.lang.String path,
JsrUser user)
Get the file in workspace strWorkspace in directory path |
IRepositoryFile |
getRepositoryFileById(AdminWorkspace workspace,
java.lang.String strFileId,
JsrUser user)
Get the file in workspace strWorkspace in directory path |
java.util.List<IRepositoryFile> |
getRepositoryFileList(AdminWorkspace workspace,
JsrUser user)
Get the files in workspace strWorkspace |
java.util.List<IRepositoryFile> |
getRepositoryFileList(AdminWorkspace workspace,
java.lang.String parent,
JsrUser user)
Get the files in workspace strWorkspace in directory parent |
IRepositoryFile |
getRepositoryFileVersionById(AdminWorkspace workspace,
java.lang.String strFileId,
java.lang.String strVersion,
JsrUser user)
Get the file in workspace strWorkspace in directory path |
IWorkspace |
getWorkspace(AdminWorkspace workspace,
JsrUser user)
Get workspace informations |
void |
modify(AdminWorkspace adminWorkspace,
IWorkspace workspace,
JsrUser user)
Modify workspace acces rights This is part of admin functionalities |
void |
removeRepositoryFile(AdminWorkspace workspace,
java.lang.String strPath,
JsrUser user)
Remove element in workspace strWorkspace at path strPath |
void |
removeWorkspace(AdminWorkspace adminWorkspace,
JsrUser user)
Removes a workspace This is part of admin functionalities |
void |
setLock(AdminWorkspace adminWorkspace,
IRepositoryFile file,
JsrUser user)
Puts a lock on a node |
void |
setVersionnable(AdminWorkspace adminWorkspace,
java.lang.String strFileId,
boolean isVersionnable,
JsrUser user)
Adds a file to the version manager |
void |
unLock(AdminWorkspace adminWorkspace,
IRepositoryFile file,
JsrUser user)
Unlock a locked node |
void |
unLock(AdminWorkspace adminWorkspace,
IRepositoryFile file,
JsrUser user,
java.util.Collection<JcrLock> jcrLocks)
|
void |
update(AdminWorkspace adminWorkspace,
IRepositoryFile file,
JsrUser user)
Modifies a file in a workspace The file must not be locked by another user |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CONTEXT_NAME
public static final java.lang.String SPRING_JSR170_JCRLIST
public static final java.lang.String SPRING_REPOSITORY_FILEdao
public static final java.lang.String SPRINGworkspaceDao
| Constructor Detail |
|---|
protected RepositoryFileHome()
| Method Detail |
|---|
public static RepositoryFileHome getInstance()
public java.util.List<IRepositoryFile> getRepositoryFileList(AdminWorkspace workspace,
JsrUser user)
workspace - the workspace name
public IRepositoryFile getRepositoryFileById(AdminWorkspace workspace,
java.lang.String strFileId,
JsrUser user)
workspace - the workspace namestrFileId - an absolute path to the directoryuser - the current user
public IRepositoryFile getRepositoryFileVersionById(AdminWorkspace workspace,
java.lang.String strFileId,
java.lang.String strVersion,
JsrUser user)
workspace - the workspace namestrFileId - an absolute path to the directorystrVersion - the version name to retrieveuser - the current user
public IRepositoryFile getRepositoryFile(AdminWorkspace workspace,
java.lang.String path,
JsrUser user)
workspace - the workspacepath - an absolute path to the directoryuser - the current user
public java.util.List<IRepositoryFile> getRepositoryFileList(AdminWorkspace workspace,
java.lang.String parent,
JsrUser user)
workspace - the workspaceparent - the parent directory absolute pathuser - the current user
public void addFile(AdminWorkspace workspace,
java.lang.String path,
java.io.File file,
java.lang.String strMimeType,
JsrUser user)
workspace - the workspacepath - the parent directory absolute pathfile - the file contentuser - the current user
public void createFolder(AdminWorkspace workspace,
java.lang.String path,
JsrUser user)
workspace - the workspacepath - the directory absolute pathuser - the current user
public void removeRepositoryFile(AdminWorkspace workspace,
java.lang.String strPath,
JsrUser user)
workspace - the workspacestrPath - the absolute pathuser - the current userpublic fr.paris.lutece.util.ReferenceList getAvailableWorkspaces(java.lang.String strJcrType)
strJcrType - the type of the jcr repository
public void createWorkspace(java.lang.String strJcrType,
java.lang.String strWorkspaceName)
strJcrType - the type of the jcr repositorystrWorkspaceName - the workspace name
public IWorkspace getWorkspace(AdminWorkspace workspace,
JsrUser user)
workspace - the workspaceuser - the current user
public void modify(AdminWorkspace adminWorkspace,
IWorkspace workspace,
JsrUser user)
adminWorkspace - the admin workspaceworkspace - the workspace instanceuser - the current user
public boolean canAccess(AdminWorkspace adminWorkspace,
java.lang.String strAccessType,
java.lang.String[] userRoles,
JsrUser user)
adminWorkspace - the workspacestrAccessType - the access type, it must be in IWorkspace.AVAILABLE_ACCESSuserRoles - an array of rolesuser - the current user
public java.util.Map<java.lang.String,java.lang.Boolean> getAvailableAccess(AdminWorkspace adminWorkspace,
java.lang.String[] userRoles,
JsrUser user)
adminWorkspace - the workspaceuserRoles - an array of rolesuser - the current user
public fr.paris.lutece.util.ReferenceList getAvailableJcr()
public java.util.List<java.lang.String> getAvailableJcrList()
public boolean canCreateWorkspace(java.lang.String strJcrType)
strJcrType - the type of jcr
public void removeWorkspace(AdminWorkspace adminWorkspace,
JsrUser user)
adminWorkspace - the name of the workspace to removeuser - the current user
public java.lang.String getPrettyAbsolutePath(AdminWorkspace adminWorkspace,
IRepositoryFile rootFile,
JsrUser jsrUser)
adminWorkspace - the workspace to userootFile - the file to get the pretty path fromuser - the current user
public void update(AdminWorkspace adminWorkspace,
IRepositoryFile file,
JsrUser user)
adminWorkspace - the current workspacefile - the new file contentuser - the current user
public void setVersionnable(AdminWorkspace adminWorkspace,
java.lang.String strFileId,
boolean isVersionnable,
JsrUser user)
adminWorkspace - the current workspacestrFileId - the id of the file to modifyisVersionnable - true : sets the file as versionable, if false : remove the file from the file manageruser - the current user
public java.util.List<IRepositoryFile> getFileHistory(AdminWorkspace adminWorkspace,
java.lang.String strFileId,
JsrUser user)
adminWorkspace - the current workspacestrFileId - the id of the fileuser - the current user
public void doRecursive(AdminWorkspace adminWorkspace,
AdminView view,
java.lang.String strStartPath,
INodeAction<org.apache.lucene.document.Document,java.util.Collection<org.apache.lucene.document.Document>> action,
JsrUser user)
T - the result element typeL - the result list typeadminWorkspace - the workspace to work onview - the view to browsestrStartPath - the start point of the browsingaction - the action to perform on each nodeuser - the current user
public void setLock(AdminWorkspace adminWorkspace,
IRepositoryFile file,
JsrUser user)
adminWorkspace - the workspacefile - the node to lockuser - the current user
public void unLock(AdminWorkspace adminWorkspace,
IRepositoryFile file,
JsrUser user)
adminWorkspace - the workspacefile - the file to unlockuser - the current user
public void unLock(AdminWorkspace adminWorkspace,
IRepositoryFile file,
JsrUser user,
java.util.Collection<JcrLock> jcrLocks)
public java.util.List<IRepositoryFile> getPathToFile(AdminWorkspace adminWorkspace,
java.lang.String strFileId,
JsrUser user)
adminWorkspace - the workspacestrFileId - the id of the nodeuser - the current user
public java.util.Map<java.lang.String,JcrLock> getLocks(AdminWorkspace adminWorkspace,
AdminView view,
JsrUser user)
adminWorkspace - the workspaceview - the vieuser - the user
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||