Package org.silverpeas.components.websites.service

## Class DefaultWebSiteService

- java.lang.Object
- - org.silverpeas.components.websites.service.DefaultWebSiteService

- All Implemented Interfaces:
    `WebSiteService`

      @Service
      public class DefaultWebSiteService
      extends Object
      implements WebSiteService

  This is the WebSite manager service controller of the MVC. It is implemented as a CDI Bean. It controls all the activities that happen in a client session. It also provides mechanisms to access other service layer.
  Author:
    Cecile BONIN

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultWebSiteService()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addFolder​(org.silverpeas.core.node.model.NodeDetail subFolder, org.silverpeas.core.node.model.NodePK fatherId, org.silverpeas.core.admin.user.model.UserDetail currentUser)` |
    `void` | `addPublicationToTopic​(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK fatherPK)` |
    `void` | `addToFolder​(org.silverpeas.core.node.model.NodePK fatherId, org.silverpeas.core.node.model.NodeDetail subTopic)` |
    `void` | `associateIcons​(String componentId, String id, Collection<String> liste)` |
    `void` | `changePubsOrder​(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK nodePK, int direction)` |
    `void` | `changeTopicsOrder​(String way, org.silverpeas.core.node.model.NodePK topicPK, org.silverpeas.core.node.model.NodePK fatherPK)` |
    `String` | `createPublication​(String componentId, org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail)` |
    `String` | `createWebSite​(String componentId, SiteDetail description, org.silverpeas.core.admin.user.model.UserDetail currentUser)` |
    `void` | `deleteFolder​(org.silverpeas.core.node.model.NodePK pkToDelete)` |
    `void` | `deletePublication​(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)` |
    `void` | `deleteWebSites​(String componentId, Collection<String> liste)` |
    `void` | `dePublish​(String componentId, Collection<String> liste)` |
    `Collection<org.silverpeas.core.node.model.NodePK>` | `getAllFatherPK​(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)` |
    `Collection<IconDetail>` | `getAllIcons​(String componentId)` |
    `Collection<SiteDetail>` | `getAllWebSite​(String componentId)` |
    `org.silverpeas.core.node.model.NodeDetail` | `getFolderDetail​(org.silverpeas.core.node.model.NodePK pk)` |
    `Collection<IconDetail>` | `getIcons​(String componentId, String id)` |
    `String` | `getIdPublication​(String componentId, String idSite)` |
    `String` | `getNextId​(String componentId)` |
    `org.silverpeas.core.contribution.publication.model.PublicationDetail` | `getPublicationDetail​(org.silverpeas.core.contribution.publication.model.PublicationPK pk)` |
    `int` | `getSilverObjectId​(String componentId, String id)` | ContentManager utilization to use PDC
    `SiteDetail` | `getWebSite​(String componentId, String id)` |
    `List<SiteDetail>` | `getWebSites​(String componentId, List<String> ids)` |
    `FolderDetail` | `goTo​(org.silverpeas.core.node.model.NodePK pk)` |
    `void` | `index​(String componentId)` |
    `void` | `publish​(String componentId, Collection<String> liste)` |
    `void` | `removePublicationFromTopic​(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, org.silverpeas.core.node.model.NodePK fatherPK)` |
    `void` | `updateClassification​(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK, List<String> arrayTopic)` |
    `void` | `updateFolder​(org.silverpeas.core.node.model.NodeDetail topic, org.silverpeas.core.node.model.NodePK fatherPK)` |
    `void` | `updatePublication​(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail, String componentId)` |
    `void` | `updateWebSite​(String componentId, SiteDetail description)` |

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

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

- - ### Constructor Detail

    - #### DefaultWebSiteService

          public DefaultWebSiteService()

  - ### Method Detail

    - #### goTo

          public FolderDetail goTo​(org.silverpeas.core.node.model.NodePK pk)

      Specified by:
        `goTo` in interface `WebSiteService`

    - #### addToFolder

          public void addToFolder​(org.silverpeas.core.node.model.NodePK fatherId,
                                  org.silverpeas.core.node.model.NodeDetail subTopic)

    - #### addFolder

          public void addFolder​(org.silverpeas.core.node.model.NodeDetail subFolder,
                                org.silverpeas.core.node.model.NodePK fatherId,
                                org.silverpeas.core.admin.user.model.UserDetail currentUser)

      Specified by:
        `addFolder` in interface `WebSiteService`

    - #### updateFolder

          public void updateFolder​(org.silverpeas.core.node.model.NodeDetail topic,
                                   org.silverpeas.core.node.model.NodePK fatherPK)

      Specified by:
        `updateFolder` in interface `WebSiteService`

    - #### getFolderDetail

          public org.silverpeas.core.node.model.NodeDetail getFolderDetail​(org.silverpeas.core.node.model.NodePK pk)

      Specified by:
        `getFolderDetail` in interface `WebSiteService`
      Parameters:
        `pk` - the topic identifier
      Returns:
        a NodeDetail

    - #### deleteFolder

          public void deleteFolder​(org.silverpeas.core.node.model.NodePK pkToDelete)

      Specified by:
        `deleteFolder` in interface `WebSiteService`
      Parameters:
        `pkToDelete` - the topic identifier to delete

    - #### changeTopicsOrder

          public void changeTopicsOrder​(String way,
                                        org.silverpeas.core.node.model.NodePK topicPK,
                                        org.silverpeas.core.node.model.NodePK fatherPK)

      Specified by:
        `changeTopicsOrder` in interface `WebSiteService`

    - #### getPublicationDetail

          public org.silverpeas.core.contribution.publication.model.PublicationDetail getPublicationDetail​(org.silverpeas.core.contribution.publication.model.PublicationPK pk)

      Specified by:
        `getPublicationDetail` in interface `WebSiteService`

    - #### createPublication

          public String createPublication​(String componentId,
                                          org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail)

      Specified by:
        `createPublication` in interface `WebSiteService`

    - #### updatePublication

          public void updatePublication​(org.silverpeas.core.contribution.publication.model.PublicationDetail pubDetail,
                                        String componentId)

      Specified by:
        `updatePublication` in interface `WebSiteService`

    - #### deletePublication

          public void deletePublication​(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)

      Specified by:
        `deletePublication` in interface `WebSiteService`

    - #### addPublicationToTopic

          public void addPublicationToTopic​(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK,
                                            org.silverpeas.core.node.model.NodePK fatherPK)

      Specified by:
        `addPublicationToTopic` in interface `WebSiteService`

    - #### removePublicationFromTopic

          public void removePublicationFromTopic​(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK,
                                                 org.silverpeas.core.node.model.NodePK fatherPK)

      Specified by:
        `removePublicationFromTopic` in interface `WebSiteService`

    - #### getAllFatherPK

          public Collection<org.silverpeas.core.node.model.NodePK> getAllFatherPK​(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK)

      Specified by:
        `getAllFatherPK` in interface `WebSiteService`

    - #### getIdPublication

          public String getIdPublication​(String componentId,
                                         String idSite)

      Specified by:
        `getIdPublication` in interface `WebSiteService`

    - #### updateClassification

          public void updateClassification​(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK,
                                           List<String> arrayTopic)

      Specified by:
        `updateClassification` in interface `WebSiteService`

    - #### changePubsOrder

          public void changePubsOrder​(org.silverpeas.core.contribution.publication.model.PublicationPK pubPK,
                                      org.silverpeas.core.node.model.NodePK nodePK,
                                      int direction)

      Specified by:
        `changePubsOrder` in interface `WebSiteService`

    - #### getAllWebSite

          public Collection<SiteDetail> getAllWebSite​(String componentId)

      Specified by:
        `getAllWebSite` in interface `WebSiteService`

    - #### getWebSite

          public SiteDetail getWebSite​(String componentId,
                                       String id)

      Specified by:
        `getWebSite` in interface `WebSiteService`

    - #### getWebSites

          public List<SiteDetail> getWebSites​(String componentId,
                                              List<String> ids)

      Specified by:
        `getWebSites` in interface `WebSiteService`

    - #### getIcons

          public Collection<IconDetail> getIcons​(String componentId,
                                                 String id)

      Specified by:
        `getIcons` in interface `WebSiteService`

    - #### getNextId

          public String getNextId​(String componentId)

      Specified by:
        `getNextId` in interface `WebSiteService`

    - #### getAllIcons

          public Collection<IconDetail> getAllIcons​(String componentId)

      Specified by:
        `getAllIcons` in interface `WebSiteService`

    - #### createWebSite

          public String createWebSite​(String componentId,
                                      SiteDetail description,
                                      org.silverpeas.core.admin.user.model.UserDetail currentUser)

      Specified by:
        `createWebSite` in interface `WebSiteService`

    - #### associateIcons

          public void associateIcons​(String componentId,
                                     String id,
                                     Collection<String> liste)

      Specified by:
        `associateIcons` in interface `WebSiteService`

    - #### publish

          public void publish​(String componentId,
                              Collection<String> liste)

      Specified by:
        `publish` in interface `WebSiteService`

    - #### dePublish

          public void dePublish​(String componentId,
                                Collection<String> liste)

      Specified by:
        `dePublish` in interface `WebSiteService`

    - #### deleteWebSites

          public void deleteWebSites​(String componentId,
                                     Collection<String> liste)

      Specified by:
        `deleteWebSites` in interface `WebSiteService`

    - #### index

          public void index​(String componentId)

      Specified by:
        `index` in interface `WebSiteService`

    - #### updateWebSite

          public void updateWebSite​(String componentId,
                                    SiteDetail description)

      Specified by:
        `updateWebSite` in interface `WebSiteService`

    - #### getSilverObjectId

          public int getSilverObjectId​(String componentId,
                                       String id)

      ContentManager utilization to use PDC
      Specified by:
        `getSilverObjectId` in interface `WebSiteService`