|
||||||||||
| 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,
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 |
|
|
doRecursive(AdminWorkspace adminWorkspace,
AdminView view,
java.lang.String strStartPath,
INodeAction<T,L> action,
JsrUser user)
Recursively runs 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.lang.String |
getPrettyAbsolutePath(AdminWorkspace adminWorkspace,
IRepositoryFile rootFile)
|
|
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)
|
|
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)
|
|
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 directory
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 -
public IRepositoryFile getRepositoryFile(AdminWorkspace workspace,
java.lang.String path,
JsrUser user)
workspace - the workspacepath - an absolute path to the directoryuser -
public java.util.List<IRepositoryFile> getRepositoryFileList(AdminWorkspace workspace,
java.lang.String parent,
JsrUser user)
workspace - the workspaceparent - the parent directory absolute pathuser -
public void addFile(AdminWorkspace workspace,
java.lang.String path,
java.io.File file,
JsrUser user)
workspace - the workspacepath - the parent directory absolute pathfile - the file contentuser -
public void createFolder(AdminWorkspace workspace,
java.lang.String path,
JsrUser user)
workspace - the workspacepath - the directory absolute pathuser -
public void removeRepositoryFile(AdminWorkspace workspace,
java.lang.String strPath,
JsrUser user)
workspace - the workspacestrPath - the absolute pathuser - public 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 -
public void modify(AdminWorkspace adminWorkspace,
IWorkspace workspace,
JsrUser user)
adminWorkspace - the admin workspaceworkspace - the workspace instanceuser -
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 -
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 -
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 -
public java.lang.String getPrettyAbsolutePath(AdminWorkspace adminWorkspace,
IRepositoryFile rootFile)
adminWorkspace - the workspace to userootFile - the file to get the pretty path from
public void update(AdminWorkspace adminWorkspace,
IRepositoryFile file,
JsrUser user)
adminWorkspace - the current workspacefile - the new file contentuser -
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 -
public java.util.List<IRepositoryFile> getFileHistory(AdminWorkspace adminWorkspace,
java.lang.String strFileId,
JsrUser user)
adminWorkspace - the current workspacestrFileId - the id of the fileuser -
public <T,L extends java.util.Collection<T>> L doRecursive(AdminWorkspace adminWorkspace,
AdminView view,
java.lang.String strStartPath,
INodeAction<T,L> 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 -
public void setLock(AdminWorkspace adminWorkspace,
IRepositoryFile file,
JsrUser user)
public void unLock(AdminWorkspace adminWorkspace,
IRepositoryFile file,
JsrUser user)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||