Class SilverCrawlerSessionController
java.lang.Object
org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
org.silverpeas.components.silvercrawler.control.SilverCrawlerSessionController
- All Implemented Interfaces:
Serializable,org.silverpeas.core.web.mvc.controller.ComponentSessionController,org.silverpeas.core.web.session.SessionCloseable
public class SilverCrawlerSessionController
extends org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
- See Also:
-
Field Summary
Fields inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
context -
Constructor Summary
ConstructorsConstructorDescriptionSilverCrawlerSessionController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext) Standard Session Controller Constructor -
Method Summary
Modifier and TypeMethodDescriptionChecks upload info coming from DragNDrop.booleancheckRWSettingsAccess(boolean throwException) Only people with admin profil AND listed in silverpeas configuration are allowed to set read/write accessbooleancheckUserLANAccess(String remoteIPAdress) voidcreateFolder(String newName) getCurrentFolder(boolean isAdmin) getHistoryByFolder(String folderName) getHistoryByFolderFromResult(String folderName) getHistoryByUser(String folderName, String userId) getNameFromPath(String path) getPath()getResultSearch(String word) voidgoToDirectory(String directory) voidvoidvoidindexPathSelected(Collection<String> dirToIndex) voidindexSelectedFiles(Collection<String> fileToIndex) booleanIs read//write access has been activatedbooleanProcesses the files upload by copying the uploaded files by DragAndDrop from the temporary repository to the current folder.voidremoveFile(String fileName, boolean isAdminOrPublisher) voidremoveSubFolder(String folderName, boolean isAdmin) Remove the given subfolder.voidrenameFolder(String folderName, String newName) voidReset any existing upload report and clean temp folder if exists.voidsaveFile(org.silverpeas.core.util.file.FileItem fileItem, boolean replaceFile) voidsetCurrentPath(String path) voidvoidsetLastUploadReport(UploadReport report) voidvoidswitchReadWriteAccess(boolean active) Enable/disable read//write access.voidunindexFile(String fileName) voidunindexPath(String folderName) Methods inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getClipboardErrorMessage, getClipboardExceptionError, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getHighestSilverpeasUserRole, getIcon, getLanguage, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoles, getZoneId, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardSelectedElement, setComponentRootName, setSpaceModeMaintenance
-
Constructor Details
-
SilverCrawlerSessionController
public SilverCrawlerSessionController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext) Standard Session Controller Constructor- Parameters:
mainSessionCtrl- The user's profilecomponentContext- The component's profile
-
-
Method Details
-
getCurrentFolder
-
getCurrentFolder
-
isRootPath
public boolean isRootPath() -
setRootPath
public void setRootPath() -
getNbMaxDirectoriesByPage
-
getNbMaxFilesByPage
-
goToDirectory
-
isDownload
-
setCurrentPath
-
setCurrentPathFromResult
-
getNameFromPath
-
getCurrentPath
-
getPath
-
zipFolder
-
getHistoryByFolder
-
getHistoryByFolderFromResult
-
getHistoryByUser
-
unindexPath
-
unindexFile
-
indexPath
-
indexFile
-
indexPathSelected
-
indexSelectedFiles
-
getResultSearch
-
getCurrentResultSearch
-
getRootPath
-
isReadWriteActivated
public boolean isReadWriteActivated()Is read//write access has been activated- Returns:
- true only if is activated both in platform and component instance
-
switchReadWriteAccess
Enable/disable read//write access.- Parameters:
active- true to activate read/write access- Throws:
SilverCrawlerForbiddenActionException- if the user can change the read/write access.
-
checkRWSettingsAccess
public boolean checkRWSettingsAccess(boolean throwException) throws SilverCrawlerForbiddenActionException Only people with admin profil AND listed in silverpeas configuration are allowed to set read/write access- Parameters:
throwException- true if exception must be thrown if checks failed. (else just return false)- Throws:
SilverCrawlerForbiddenActionException- if user doesn't have those requirements.
-
removeSubFolder
public void removeSubFolder(String folderName, boolean isAdmin) throws SilverCrawlerForbiddenActionException Remove the given subfolder.- Parameters:
folderName- name of folder to be removedisAdmin- flag to indicate if user has admin profile- Throws:
SilverCrawlerForbiddenActionException- if the deletion is forbidden or cannot be done.
-
renameFolder
public void renameFolder(String folderName, String newName) throws SilverCrawlerFolderRenameException, IOException -
createFolder
-
removeFile
public void removeFile(String fileName, boolean isAdminOrPublisher) throws SilverCrawlerForbiddenActionException -
saveFile
public void saveFile(org.silverpeas.core.util.file.FileItem fileItem, boolean replaceFile) throws SilverCrawlerFileUploadException - Throws:
SilverCrawlerFileUploadException
-
setLastUploadReport
-
getLastUploadReport
-
checkLastUpload
Checks upload info coming from DragNDrop. Uses UploadReport to retrieves folders/files list and detect conflicts- Returns:
- an upload report
-
processLastUpload
Processes the files upload by copying the uploaded files by DragAndDrop from the temporary repository to the current folder.- Returns:
- a report about the upload process.
-
resetLastUploadReport
public void resetLastUploadReport()Reset any existing upload report and clean temp folder if exists. -
checkUserLANAccess
-