Package org.silverpeas.components.websites.control

# 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
This is the webSite manager main interface It contains all the methods to be accessible to the client

Author:
  Cécile BONIN
See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `TAB_PDC`

  ### Fields inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController

  `context`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WebSiteSessionController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `addFileIntoWebSite(String webSitePath, org.silverpeas.core.util.file.FileItem fileItem)`
  `void`
  `addFolder(org.silverpeas.core.node.model.NodeDetail nd)`
  `void`
  `addPublicationToFolder(String pubId, String folderId)`
  `void`
  `associateIcons(String id, Collection<String> listeIcones)`
  AssociateIcons
  `void`
  `changePubsOrder(String pubId, int direction)`
  `void`
  `changeTopicsOrder(String way, String topicId)`
  `void`
  `checkPath(String path)`
  `void`
  `createFile(String filePath, String fileName, String fileContent)`
  createPage
  `void`
  `createFolder(String path)`
  createFolder
  `String`
  `createWebSite(SiteDetail description)`
  createWebSite
  `int`
  `createWebSiteFromZipFile(SiteDetail descriptionSite, org.silverpeas.core.util.file.FileItem fileItem)`
  Creates a website from the content of an archive file (a ZIP file).
  `void`
  `deleteDirectory(String path)`
  `void`
  `deleteFile(String path)`
  deleteFile
  `void`
  `deleteFolder(String id)`
  `void`
  `deletePublication(String pubId)`
  `void`
  `deleteWebSites(Collection<String> liste)`
  `void`
  `delFolder(String folderPath)`
  delFolder
  `void`
  `dePublish(Collection<String> listeSite)`
  dePublish
  `Collection<org.silverpeas.core.node.model.NodePK>`
  `getAllFatherPK(String pubId)`
  `Collection<File>`
  `getAllFile(String chemin)`
  getAllFile
  `Collection<File>`
  `getAllHTMLWebPages(String chemin)`
  getAllHTMLWebPages
  `Collection<IconDetail>`
  `getAllIcons()`
  getAllIcons
  `Collection<File>`
  `getAllImages(String chemin)`
  getAllImages
  `Collection<File>`
  `getAllSubFolder(String chemin)`
  getAllSubFolder
  `Collection<SiteDetail>`
  `getAllWebSite()`
  getAllWebSite
  `FolderDetail`
  `getFolder(String id)`
  `org.silverpeas.core.node.model.NodeDetail`
  `getFolderDetail(String id)`
  `Collection<IconDetail>`
  `getIcons(String id)`
  getIcons
  `String`
  `getIdPublication(String siteId)`
  `String`
  `getNextId()`
  getNextId
  `org.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()`
  getSiteName
  `SiteDetail`
  `getWebSite(String id)`
  getWebSite
  `String`
  `getWebSitePathById(String id)`
  `protected String`
  `getWebSiteRepositoryPath()`
  `WebSiteService`
  `getWebSiteService()`
  getWebSiteService
  `boolean`
  `isBookmarkMode()`
  `boolean`
  `isPdcUsed()`
  `boolean`
  `isSortedTopicsEnabled()`
  `void`
  `notifyPublishers(String auteur, String nomSite, String description, String nomPage, String listeMessage, String date)`
  notifyPublishers
  `void`
  `publish(Collection<String> listeSite)`
  publish
  `void`
  `removePublicationToFolder(String pubId, String folderId)`
  `void`
  `removeSessionSite()`
  `void`
  `removeSessionTopic()`
  `void`
  `renameFile(String dir, String name, String newName)`
  renameFile
  `void`
  `renameFolder(String oldPath, String newPath)`
  renameFolder
  `void`
  `setSessionSite(SiteDetail siteDetail)`
  `void`
  `setSessionTopic(FolderDetail topicDetail)`
  `void`
  `setSiteName(String siteName)`
  setSiteName
  `void`
  `unzip(String destPath, String zipFilePath)`
  unzip
  `void`
  `updateClassification(String idSite, ArrayList<String> arrayTopic)`
  `void`
  `updateFolderHeader(org.silverpeas.core.node.model.NodeDetail nd)`
  `void`
  `updateWebSite(SiteDetail siteDetail)`
  `String`
  `verif(String action, String currentPath, String name, String newName, String nomPage)`

  ### 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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### TAB_PDC

    public static final String TAB_PDC
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### WebSiteSessionController

    public WebSiteSessionController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)

- ## Method Details

  - ### 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 void updateFolderHeader(org.silverpeas.core.node.model.NodeDetail nd) throws WebSitesException
    Throws:
      `WebSitesException`

  - ### getFolderDetail

    public org.silverpeas.core.node.model.NodeDetail getFolderDetail(String id) throws WebSitesException
    Throws:
      `WebSitesException`

  - ### addFolder

    public void addFolder(org.silverpeas.core.node.model.NodeDetail nd) throws WebSitesException
    Throws:
      `WebSitesException`

  - ### deleteFolder

    public void deleteFolder(String id) throws WebSitesException
    Throws:
      `WebSitesException`

  - ### changeTopicsOrder

    public void changeTopicsOrder(String way, String topicId)

  - ### 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
    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`

  - ### getWebSitePathById

    public String getWebSitePathById(String id)

  - ### 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
    Throws:
      `WebSitesException`

  - ### updateWebSite

    public void updateWebSite(SiteDetail siteDetail) throws WebSitesException
    Throws:
      `WebSitesException`

  - ### deleteDirectory

    public void deleteDirectory(String path) throws WebSitesException
    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
    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
    Throws:
      `WebSitesException`

  - ### checkPath

    public void checkPath(String path) throws WebSitesException
    Throws:
      `WebSitesException`

  - ### addFileIntoWebSite

    public int addFileIntoWebSite(String webSitePath, org.silverpeas.core.util.file.FileItem fileItem) throws IOException
    Throws:
      `IOException`

  - ### createWebSiteFromZipFile

    public int createWebSiteFromZipFile(SiteDetail descriptionSite, org.silverpeas.core.util.file.FileItem fileItem) throws WebSitesException
    Creates a website 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 website folder creation failed.
    Throws:
      `WebSitesException` - if an unexpected error occurs when creating the website.