com.stratelia.webactiv.webSites.control
Class WebSiteSessionController

java.lang.Object
  extended by com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
      extended by com.stratelia.webactiv.webSites.control.WebSiteSessionController
All Implemented Interfaces:
com.stratelia.silverpeas.peasCore.ComponentSessionController

public class WebSiteSessionController
extends com.stratelia.silverpeas.peasCore.AbstractComponentSessionController


Field Summary
static String TAB_PDC
           
 
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
CHARACTER_ENCODING, context
 
Constructor Summary
WebSiteSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl, com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
           
 
Method Summary
 int addFileIntoWebSite(String webSitePath, org.apache.commons.fileupload.FileItem fileItem)
           
 com.stratelia.webactiv.util.node.model.NodePK addFolder(com.stratelia.webactiv.util.node.model.NodeDetail nd, String alertType)
           
 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 close()
           
 void createFile(String cheminFichier, String nomFichier, String contenuFichier)
          createPage
 void createFolder(String chemin)
          createFolder
 String createWebSite(SiteDetail description)
          createWebSite
 int 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 chemin)
          deleteDirectory
 void deleteFile(String chemin)
          deleteFile
 void deleteFolder(String id)
           
 void deletePublication(String pubId)
           
 void deleteWebSites(Collection<String> liste)
          deleteWebSites
 void delFolder(String chemin)
          delFolder
 void dePublish(Collection<String> listeSite)
          dePublish
 Collection<com.stratelia.webactiv.util.node.model.NodePK> getAllFatherPK(String pubId)
           
 Collection<File> getAllFile(String chemin)
          getAllFile
 Collection<IconDetail> getAllIcons()
          getAllIcons
 Collection<File> getAllImages(String chemin)
          getAllImages
 Collection<File> getAllSubFolder(String chemin)
          getAllSubFolder
 Collection<File> getAllWebPages2(String chemin)
          getAllWebPages2
 Collection<SiteDetail> getAllWebSite()
          getAllWebSite
 String getCode(String cheminFichier, String nomFichier)
          getCode
 FolderDetail getFolder(String id)
           
 com.stratelia.webactiv.util.node.model.NodeDetail getFolderDetail(String id)
           
 Collection<IconDetail> getIcons(String id)
          getIcons
 String getIdPublication(String siteId)
           
 String getNextId()
          getNextId
 com.stratelia.silverpeas.notificationManager.NotificationSender getNotificationSender()
           
 com.stratelia.webactiv.util.publication.model.PublicationDetail getPublicationDetail(String pubId)
           
 SiteDetail getSessionSite()
           
 FolderDetail getSessionTopic()
           
 int getSilverObjectId(String objectId)
           
 String getSiteName()
          getSiteName
 SiteDetail getWebSite(String id)
          getWebSite
 WebSiteBm getWebSiteEJB()
          getWebSiteEJB
 String getWebSitePathById(String id)
           
protected  String getWebSiteRepositoryPath()
           
 void index()
          index web sites component
 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 rep, String name, String newName)
          renameFile
 void renameFolder(String cheminRep, String newCheminRep)
          renameFolder
 void setSessionSite(SiteDetail siteDetail)
           
 void setSessionTopic(FolderDetail topicDetail)
          **********************************************************************************
 void setSiteName(String siteName)
          setSiteName
 void unzip(String cheminDirResultat, String cheminFichierZip)
          unzip
 void updateClassification(String idSite, ArrayList<String> arrayTopic)
           
 com.stratelia.webactiv.util.node.model.NodePK updateFolderHeader(com.stratelia.webactiv.util.node.model.NodeDetail nd, String alertType)
           
 void updateWebSite(SiteDetail description)
           
 String verif(String action, String currentPath, String name, String newName, String nomPage)
          verif
 
Methods inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, 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
 

Field Detail

TAB_PDC

public static final String TAB_PDC
See Also:
Constant Field Values
Constructor Detail

WebSiteSessionController

public WebSiteSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl,
                                com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
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 com.stratelia.silverpeas.notificationManager.NotificationSender getNotificationSender()

getWebSiteEJB

public WebSiteBm getWebSiteEJB()
getWebSiteEJB


isPdcUsed

public boolean isPdcUsed()

getFolder

public FolderDetail getFolder(String id)
                       throws WebSitesException
Throws:
WebSitesException

updateFolderHeader

public com.stratelia.webactiv.util.node.model.NodePK updateFolderHeader(com.stratelia.webactiv.util.node.model.NodeDetail nd,
                                                                        String alertType)
                                                                 throws WebSitesException
Throws:
WebSitesException

getFolderDetail

public com.stratelia.webactiv.util.node.model.NodeDetail getFolderDetail(String id)
                                                                  throws WebSitesException
Throws:
WebSitesException

addFolder

public com.stratelia.webactiv.util.node.model.NodePK addFolder(com.stratelia.webactiv.util.node.model.NodeDetail nd,
                                                               String alertType)
                                                        throws WebSitesException
Throws:
WebSitesException

deleteFolder

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

changeTopicsOrder

public void changeTopicsOrder(String way,
                              String topicId)
                       throws RemoteException
Parameters:
way -
topicId -
Throws:
RemoteException

getPublicationDetail

public com.stratelia.webactiv.util.publication.model.PublicationDetail getPublicationDetail(String pubId)
                                                                                     throws WebSitesException
Throws:
WebSitesException

deletePublication

public void deletePublication(String pubId)
                       throws WebSitesException
Throws:
WebSitesException

getAllFatherPK

public Collection<com.stratelia.webactiv.util.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)
                     throws RemoteException
Parameters:
pubId -
direction -
Throws:
RemoteException

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

getAllWebPages2

public Collection<File> getAllWebPages2(String chemin)
                                 throws WebSitesException
getAllWebPages2

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 chemin)
                  throws WebSitesException
createFolder

Throws:
WebSitesException

getWebSitePathById

public String getWebSitePathById(String id)

renameFolder

public void renameFolder(String cheminRep,
                         String newCheminRep)
                  throws WebSitesException
renameFolder

Throws:
WebSitesException

delFolder

public void delFolder(String chemin)
               throws WebSitesException
delFolder

Throws:
WebSitesException

createFile

public void createFile(String cheminFichier,
                       String nomFichier,
                       String contenuFichier)
                throws WebSitesException
createPage

Throws:
WebSitesException

unzip

public void unzip(String cheminDirResultat,
                  String cheminFichierZip)
           throws WebSitesException
unzip

Throws:
WebSitesException

deleteWebSites

public void deleteWebSites(Collection<String> liste)
                    throws WebSitesException
deleteWebSites

Throws:
WebSitesException

updateWebSite

public void updateWebSite(SiteDetail description)
                   throws WebSitesException
Parameters:
description -
Throws:
WebSitesException

deleteDirectory

public void deleteDirectory(String chemin)
                     throws WebSitesException
deleteDirectory

Throws:
WebSitesException

renameFile

public void renameFile(String rep,
                       String name,
                       String newName)
                throws WebSitesException
renameFile

Throws:
WebSitesException

deleteFile

public void deleteFile(String chemin)
                throws WebSitesException
deleteFile

Throws:
WebSitesException

getCode

public String getCode(String cheminFichier,
                      String nomFichier)
               throws WebSitesException
getCode

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

index

public void index()
           throws RemoteException
index web sites component

Throws:
RemoteException

notifyPublishers

public void notifyPublishers(String auteur,
                             String nomSite,
                             String description,
                             String nomPage,
                             String listeMessage,
                             String date)
notifyPublishers


getSilverObjectId

public int getSilverObjectId(String objectId)

close

public void close()
Overrides:
close in class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController

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.


Copyright © 2016 Silverpeas. All Rights Reserved.