com.silverpeas.silvercrawler.control
Class SilverCrawlerSessionController
java.lang.Object
com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
com.silverpeas.silvercrawler.control.SilverCrawlerSessionController
- All Implemented Interfaces:
- com.stratelia.silverpeas.peasCore.ComponentSessionController
public class SilverCrawlerSessionController
- extends com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController |
CHARACTER_ENCODING, context |
Constructor Summary |
SilverCrawlerSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl,
com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
Standard Session Controller Constructor |
Methods inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController |
addClipboardSelection, clipboardPasteDone, close, getAlertUser, getClipboardCount, getClipboardErrorMessage, getClipboardExceptionError, getClipboardName, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameters, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getFavoriteSpace, getGenericPanel, getHighestSilverpeasUserRole, getIcon, getLanguage, getLastResults, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getServerNameAndPort, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserAvailSpaceIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoleLevel, getUserRoles, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardError, setClipboardSelectedElement, setComponentRootName, setFavoriteSpaceToMainSessionController, setGenericPanel, setIconFileName, setLastResults, setMultilangFileName, setResourceFileName, setSpaceModeMaintenance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SilverCrawlerSessionController
public SilverCrawlerSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl,
com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
- Standard Session Controller Constructor
- Parameters:
mainSessionCtrl
- The user's profilecomponentContext
- The component's profile- See Also:
getCurrentFolder
public FileFolder getCurrentFolder(boolean isAdmin)
getCurrentFolder
public FileFolder getCurrentFolder()
isRootPath
public boolean isRootPath()
setRootPath
public void setRootPath()
getSizeMax
public long getSizeMax()
getSizeMaxString
public Long getSizeMaxString()
getNbMaxDirectoriesByPage
public String getNbMaxDirectoriesByPage()
getNbMaxFilesByPage
public String getNbMaxFilesByPage()
goToDirectory
public void goToDirectory(String directory)
isDownload
public Boolean isDownload()
isPrivateSearch
public Boolean isPrivateSearch()
isAllowedNav
public Boolean isAllowedNav()
setCurrentPath
public void setCurrentPath(String path)
setCurrentPathFromResult
public void setCurrentPathFromResult(String path)
getNameFromPath
public String getNameFromPath(String path)
getCurrentPath
public String getCurrentPath()
getFullPath
public String getFullPath(String directory)
getPath
public Collection<String> getPath()
zipFolder
public FolderZIPInfo zipFolder(String folderName)
getHistoryByFolder
public Collection<HistoryByUser> getHistoryByFolder(String folderName)
getHistoryByFolderFromResult
public Collection<HistoryByUser> getHistoryByFolderFromResult(String folderName)
getHistoryByUser
public Collection<HistoryDetail> getHistoryByUser(String folderName,
String userId)
unindexPath
public void unindexPath(String folderName)
unindexFile
public void unindexFile(String fileName)
indexPath
public void indexPath(String folderName)
indexFile
public void indexFile(String fileName)
indexPathSelected
public void indexPathSelected(Collection<String> dirToIndex)
indexSelectedFiles
public void indexSelectedFiles(Collection<String> fileToIndex)
getResultSearch
public Collection<FileDetail> getResultSearch(String word)
getCurrentResultSearch
public Collection<FileDetail> getCurrentResultSearch()
getRootPath
public String 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
public void switchReadWriteAccess(boolean active)
throws SilverCrawlerRuntimeException,
SilverCrawlerForbiddenActionException
- Activate/Desactivate read//write access.
- Parameters:
active
- true to activate read/write access
- Throws:
SilverCrawlerForbiddenActionException
SilverCrawlerRuntimeException
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 given subfolder.
- Parameters:
folderName
- name of folder to be removedisAdmin
- flag to indicate if user has admin profile
- Throws:
SilverCrawlerForbiddenActionException
renameFolder
public void renameFolder(String folderName,
String newName)
throws SilverCrawlerFolderRenameException,
IOException
- Throws:
SilverCrawlerFolderRenameException
IOException
createFolder
public void createFolder(String newName)
throws SilverCrawlerFolderCreationException
- Throws:
SilverCrawlerFolderCreationException
removeFile
public void removeFile(String fileName,
boolean isAdminOrPublisher)
throws SilverCrawlerForbiddenActionException
- Throws:
SilverCrawlerForbiddenActionException
saveFile
public void saveFile(org.apache.commons.fileupload.FileItem fileItem,
boolean replaceFile)
throws SilverCrawlerFileUploadException
- Throws:
SilverCrawlerFileUploadException
setLastUploadReport
public void setLastUploadReport(UploadReport report)
getLastUploadReport
public UploadReport getLastUploadReport()
checkLastUpload
public UploadReport checkLastUpload()
- Checks upload info coming from DragNDrop. Uses UploadReport to retrieves folders/files list and
detect conflicts
- Returns:
processLastUpload
public UploadReport processLastUpload()
- Process copy from DragAndDrop temp repository to current folder
- Returns:
resetLastUploadReport
public void resetLastUploadReport()
- Reset any existing upload report and clean temp folder if exists.
checkUserLANAccess
public boolean checkUserLANAccess(String remoteIPAdress)
Copyright © 2016 Silverpeas. All Rights Reserved.