Class WebSiteSessionController
- java.lang.Object
-
- org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
-
- org.silverpeas.components.websites.control.WebSiteSessionController
-
- All Implemented Interfaces:
Serializable
,org.silverpeas.core.web.mvc.controller.ComponentSessionController
,org.silverpeas.core.web.session.SessionCloseable
public class WebSiteSessionController extends org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WebSiteSessionController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addFileIntoWebSite(String webSitePath, org.apache.commons.fileupload.FileItem fileItem)
org.silverpeas.core.node.model.NodePK
addFolder(org.silverpeas.core.node.model.NodeDetail nd, String alertType)
void
addPublicationToFolder(String pubId, String folderId)
void
associateIcons(String id, Collection<String> listeIcones)
AssociateIconsvoid
changePubsOrder(String pubId, int direction)
void
changeTopicsOrder(String way, String topicId)
void
checkPath(String path)
void
createFile(String filePath, String fileName, String fileContent)
createPagevoid
createFolder(String path)
createFolderString
createWebSite(SiteDetail description)
createWebSiteint
createWebSiteFromZipFile(SiteDetail descriptionSite, org.apache.commons.fileupload.FileItem fileItem)
Creates a web site from the content of an archive file (a ZIP file).void
deleteDirectory(String path)
deleteDirectoryvoid
deleteFile(String path)
deleteFilevoid
deleteFolder(String id)
void
deletePublication(String pubId)
void
deleteWebSites(Collection<String> liste)
deleteWebSitesvoid
delFolder(String folderPath)
delFoldervoid
dePublish(Collection<String> listeSite)
dePublishCollection<org.silverpeas.core.node.model.NodePK>
getAllFatherPK(String pubId)
Collection<File>
getAllFile(String chemin)
getAllFileCollection<File>
getAllHTMLWebPages(String chemin)
getAllHTMLWebPagesCollection<IconDetail>
getAllIcons()
getAllIconsCollection<File>
getAllImages(String chemin)
getAllImagesCollection<File>
getAllSubFolder(String chemin)
getAllSubFolderCollection<SiteDetail>
getAllWebSite()
getAllWebSiteFolderDetail
getFolder(String id)
org.silverpeas.core.node.model.NodeDetail
getFolderDetail(String id)
Collection<IconDetail>
getIcons(String id)
getIconsString
getIdPublication(String siteId)
String
getNextId()
getNextIdorg.silverpeas.core.notification.user.client.NotificationSender
getNotificationSender()
org.silverpeas.core.contribution.publication.model.PublicationDetail
getPublicationDetail(String pubId)
SiteDetail
getSessionSite()
FolderDetail
getSessionTopic()
int
getSilverObjectId(String objectId)
String
getSiteName()
getSiteNameSiteDetail
getWebSite(String id)
getWebSiteString
getWebSitePathById(String id)
protected String
getWebSiteRepositoryPath()
WebSiteService
getWebSiteService()
getWebSiteServiceboolean
isBookmarkMode()
boolean
isPdcUsed()
boolean
isSortedTopicsEnabled()
void
notifyPublishers(String auteur, String nomSite, String description, String nomPage, String listeMessage, String date)
notifyPublishersvoid
publish(Collection<String> listeSite)
publishvoid
removePublicationToFolder(String pubId, String folderId)
void
removeSessionSite()
void
removeSessionTopic()
void
renameFile(String dir, String name, String newName)
renameFilevoid
renameFolder(String oldPath, String newPath)
renameFoldervoid
setSessionSite(SiteDetail siteDetail)
void
setSessionTopic(FolderDetail topicDetail)
void
setSiteName(String siteName)
setSiteNamevoid
unzip(String destPath, String zipFilePath)
unzipvoid
updateClassification(String idSite, ArrayList<String> arrayTopic)
org.silverpeas.core.node.model.NodePK
updateFolderHeader(org.silverpeas.core.node.model.NodeDetail nd, String alertType)
void
updateWebSite(SiteDetail siteDetail)
String
verif(String action, String currentPath, String name, String newName, String nomPage)
verif-
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
-
-
-
-
Field Detail
-
TAB_PDC
public static final String TAB_PDC
- See Also:
- Constant Field Values
-
-
Method Detail
-
getWebSiteRepositoryPath
protected String getWebSiteRepositoryPath()
-
isBookmarkMode
public boolean isBookmarkMode()
-
isSortedTopicsEnabled
public boolean isSortedTopicsEnabled()
-
setSessionTopic
public void setSessionTopic(FolderDetail topicDetail)
-
setSessionSite
public void setSessionSite(SiteDetail siteDetail)
-
getSessionTopic
public FolderDetail getSessionTopic()
-
getSessionSite
public SiteDetail getSessionSite()
-
removeSessionTopic
public void removeSessionTopic()
-
removeSessionSite
public void removeSessionSite()
-
getNotificationSender
public org.silverpeas.core.notification.user.client.NotificationSender getNotificationSender()
-
getWebSiteService
public WebSiteService getWebSiteService()
getWebSiteService
-
isPdcUsed
public boolean isPdcUsed()
-
getFolder
public FolderDetail getFolder(String id) throws WebSitesException
- Throws:
WebSitesException
-
updateFolderHeader
public org.silverpeas.core.node.model.NodePK updateFolderHeader(org.silverpeas.core.node.model.NodeDetail nd, String alertType) throws WebSitesException
- Throws:
WebSitesException
-
getFolderDetail
public org.silverpeas.core.node.model.NodeDetail getFolderDetail(String id) throws WebSitesException
- Throws:
WebSitesException
-
addFolder
public org.silverpeas.core.node.model.NodePK addFolder(org.silverpeas.core.node.model.NodeDetail nd, String alertType) throws WebSitesException
- Throws:
WebSitesException
-
deleteFolder
public void deleteFolder(String id) throws WebSitesException
- Throws:
WebSitesException
-
getPublicationDetail
public org.silverpeas.core.contribution.publication.model.PublicationDetail getPublicationDetail(String pubId) throws WebSitesException
- Throws:
WebSitesException
-
deletePublication
public void deletePublication(String pubId) throws WebSitesException
- Throws:
WebSitesException
-
getAllFatherPK
public Collection<org.silverpeas.core.node.model.NodePK> getAllFatherPK(String pubId) throws WebSitesException
- Throws:
WebSitesException
-
addPublicationToFolder
public void addPublicationToFolder(String pubId, String folderId) throws WebSitesException
- Throws:
WebSitesException
-
removePublicationToFolder
public void removePublicationToFolder(String pubId, String folderId) throws WebSitesException
- Throws:
WebSitesException
-
getIdPublication
public String getIdPublication(String siteId) throws WebSitesException
- Parameters:
siteId
-- Returns:
- Throws:
WebSitesException
-
changePubsOrder
public void changePubsOrder(String pubId, int direction)
-
setSiteName
public void setSiteName(String siteName)
setSiteName
-
getSiteName
public String getSiteName()
getSiteName
-
getAllWebSite
public Collection<SiteDetail> getAllWebSite() throws WebSitesException
getAllWebSite- Throws:
WebSitesException
-
getWebSite
public SiteDetail getWebSite(String id) throws WebSitesException
getWebSite- Throws:
WebSitesException
-
getIcons
public Collection<IconDetail> getIcons(String id) throws WebSitesException
getIcons- Throws:
WebSitesException
-
getNextId
public String getNextId() throws WebSitesException
getNextId- Throws:
WebSitesException
-
getAllIcons
public Collection<IconDetail> getAllIcons() throws WebSitesException
getAllIcons- Throws:
WebSitesException
-
getAllSubFolder
public Collection<File> getAllSubFolder(String chemin) throws WebSitesException
getAllSubFolder- Throws:
WebSitesException
-
getAllFile
public Collection<File> getAllFile(String chemin) throws WebSitesException
getAllFile- Throws:
WebSitesException
-
getAllImages
public Collection<File> getAllImages(String chemin) throws WebSitesException
getAllImages- Throws:
WebSitesException
-
getAllHTMLWebPages
public Collection<File> getAllHTMLWebPages(String chemin) throws WebSitesException
getAllHTMLWebPages- Throws:
WebSitesException
-
createWebSite
public String createWebSite(SiteDetail description) throws WebSitesException
createWebSite- Throws:
WebSitesException
-
associateIcons
public void associateIcons(String id, Collection<String> listeIcones) throws WebSitesException
AssociateIcons- Throws:
WebSitesException
-
publish
public void publish(Collection<String> listeSite) throws WebSitesException
publish- Throws:
WebSitesException
-
dePublish
public void dePublish(Collection<String> listeSite) throws WebSitesException
dePublish- Throws:
WebSitesException
-
createFolder
public void createFolder(String path) throws WebSitesException
createFolder- Throws:
WebSitesException
-
renameFolder
public void renameFolder(String oldPath, String newPath) throws WebSitesException
renameFolder- Throws:
WebSitesException
-
delFolder
public void delFolder(String folderPath) throws WebSitesException
delFolder- Throws:
WebSitesException
-
createFile
public void createFile(String filePath, String fileName, String fileContent) throws WebSitesException
createPage- Throws:
WebSitesException
-
unzip
public void unzip(String destPath, String zipFilePath) throws WebSitesException
unzip- Throws:
WebSitesException
-
deleteWebSites
public void deleteWebSites(Collection<String> liste) throws WebSitesException
deleteWebSites- Throws:
WebSitesException
-
updateWebSite
public void updateWebSite(SiteDetail siteDetail) throws WebSitesException
- Parameters:
siteDetail
- the site detail to update- Throws:
WebSitesException
-
deleteDirectory
public void deleteDirectory(String path) throws WebSitesException
deleteDirectory- Throws:
WebSitesException
-
renameFile
public void renameFile(String dir, String name, String newName) throws WebSitesException
renameFile- Throws:
WebSitesException
-
deleteFile
public void deleteFile(String path) throws WebSitesException
deleteFile- Throws:
WebSitesException
-
verif
public String verif(String action, String currentPath, String name, String newName, String nomPage) throws WebSitesException
verif- Parameters:
action
-currentPath
-name
-newName
-nomPage
-- Returns:
- Throws:
WebSitesException
-
notifyPublishers
public void notifyPublishers(String auteur, String nomSite, String description, String nomPage, String listeMessage, String date)
notifyPublishers
-
getSilverObjectId
public int getSilverObjectId(String objectId)
-
updateClassification
public void updateClassification(String idSite, ArrayList<String> arrayTopic) throws WebSitesException
- Parameters:
idSite
-arrayTopic
-- Throws:
WebSitesException
-
checkPath
public void checkPath(String path) throws WebSitesException
- Throws:
WebSitesException
-
addFileIntoWebSite
public int addFileIntoWebSite(String webSitePath, org.apache.commons.fileupload.FileItem fileItem) throws Exception
- Throws:
Exception
-
createWebSiteFromZipFile
public int createWebSiteFromZipFile(SiteDetail descriptionSite, org.apache.commons.fileupload.FileItem fileItem) throws Exception
Creates a web site from the content of an archive file (a ZIP file).- Parameters:
descriptionSite
- the site to create.fileItem
- the zip archive with the content of the site to create.- Returns:
- the creation status. 0 means the creation succeed, other values means the site creation failed: -1 the main page name is invalid and -2 the web site folder creation failed.
- Throws:
Exception
- if an unexpected error occurs when creating the web site.
-
-