com.stratelia.silverpeas.peasCore
Class MainSessionController

java.lang.Object
  extended by com.stratelia.silverpeas.peasCore.MainSessionController
All Implemented Interfaces:
com.stratelia.webactiv.clipboard.control.ejb.Clipboard

public class MainSessionController
extends Object
implements com.stratelia.webactiv.clipboard.control.ejb.Clipboard


Field Summary
static String MAIN_SESSION_CONTROLLER_ATT
           
 
Constructor Summary
protected MainSessionController()
          Default constructor just for tests.
  MainSessionController(String authenticationKey, String sessionId)
          parameter authenticationKey replaced by sUserId
 
Method Summary
 void add(ClipboardSelection clipObject)
           
 void clear()
           
 com.stratelia.webactiv.clipboard.control.ejb.Clipboard create(String name)
           
 ComponentContext createComponentContext(String sSpaceId, String sComponent)
          Helper function.
 AdminUserConnections getAdminUserConnections()
          Get the userId
 AlertUser getAlertUser()
           
 com.stratelia.webactiv.clipboard.control.ejb.Clipboard getClipboard()
          Return the clipboard EJB
 List<Parameter> getComponentParameters(String sComponentId)
          Return the parameters for the given component
 String getComponentParameterValue(String sComponentId, String parameterName)
          Return the value of the parameter for the given component and the given name of parameter
 Object getComponentSOFactory()
          Return the SilverObject Factory
 ContentManager getContentManager()
           
 int getCount()
           
 UserDetail getCurrentUserDetail()
          Return the UserDetail of the the current user
 Exception getExceptionError()
           
 String getFavoriteLanguage()
          Return the user's favorite language
 String getFavoriteLook()
          Return the user's favorite language
 String getFavoriteSpace()
          Return the user's favorite space
 GenericPanel getGenericPanel(String panelKey)
           
 List<GlobalSilverContent> getLastResults()
           
 String getMessageError()
           
 String getName()
           
 ClipboardSelection getObject()
           
 ClipboardSelection getObject(int index)
           
 Collection<ClipboardSelection> getObjects()
           
 OrganisationController getOrganisationController()
           
 UserPreferences getPersonalization()
          Return the personalization EJB
 Collection<ClipboardSelection> getSelectedObjects()
           
 Selection getSelection()
           
 String getServerName()
           
 String getServerNameAndPort()
           
 String getServerPort()
           
 String getSessionId()
           
 SubscriptionContext getSubscriptionContext()
           
 UserAccessLevel getUserAccessLevel()
          Return the user accesslevel of the cuurent user
 String[] getUserAvailComponentIds()
          Return the components ids available for the current user
 String[] getUserAvailRootSpaceIds()
          Return the root spaces ids available for the current user
 String[] getUserAvailSpaceIds()
          Return the spaces ids available for the current user
 String getUserCurrentComponentId()
          Deprecated.  
 String getUserCurrentSpaceId()
          Deprecated.  
 String getUserId()
           
 Date getUserLastRequest()
           
 Date getUserLoginBegin()
           
 List<String> getUserManageableGroupIds()
           
 String[] getUserManageableSpaceIds()
          Return the spaces ids manageable by the current user
 void initClipboard()
           
 void initServerProps(String sName, String sPort)
           
 boolean isAllowPasswordChange()
           
 boolean isAppInMaintenance()
           
 boolean isBackOfficeVisible()
           
 boolean isDragNDropEnabled()
           
 boolean isOnlineEditingEnabled()
           
 boolean isPDCBackOfficeVisible()
           
 boolean isSpaceInMaintenance(String spaceId)
           
 boolean isWebDAVEditingEnabled()
           
 void PasteDone()
           
 void remove()
           
 void removeObject(int index)
           
 void setAllowPasswordChange(boolean flag)
           
 void setAppModeMaintenance(boolean mode)
           
 void setComponentSOFactory(Object Factory)
          Get the Factory
 void setFavoriteSpace(String newSpace)
           
 void setGenericPanel(String panelKey, GenericPanel panel)
           
 void setLastResults(List<GlobalSilverContent> list)
           
 void setMessageError(String messageID, Exception e)
           
 void setMultiClipboard()
           
 void setSelected(int index, boolean setIt)
           
 void setSingleClipboard()
           
 void setSpaceModeMaintenance(String spaceId, boolean mode)
           
 void setUserLastRequest(Date d)
           
 void setUserLoginBegin(Date d)
           
 int size()
           
 void updateUserComponent(String sComponent)
          Deprecated.  
 void updateUserSpace(String sSpaceId)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAIN_SESSION_CONTROLLER_ATT

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

MainSessionController

protected MainSessionController()
Default constructor just for tests.


MainSessionController

public MainSessionController(String authenticationKey,
                             String sessionId)
                      throws Exception
parameter authenticationKey replaced by sUserId

Throws:
Exception
Method Detail

isAppInMaintenance

public final boolean isAppInMaintenance()

setAppModeMaintenance

public void setAppModeMaintenance(boolean mode)

isSpaceInMaintenance

public boolean isSpaceInMaintenance(String spaceId)

setSpaceModeMaintenance

public void setSpaceModeMaintenance(String spaceId,
                                    boolean mode)

getUserId

public String getUserId()

getSessionId

public String getSessionId()

getComponentSOFactory

public Object getComponentSOFactory()
Return the SilverObject Factory


setComponentSOFactory

public void setComponentSOFactory(Object Factory)
Get the Factory


setUserLoginBegin

public void setUserLoginBegin(Date d)

getUserLoginBegin

public Date getUserLoginBegin()

setUserLastRequest

public void setUserLastRequest(Date d)

getUserLastRequest

public Date getUserLastRequest()

setGenericPanel

public void setGenericPanel(String panelKey,
                            GenericPanel panel)

getGenericPanel

public GenericPanel getGenericPanel(String panelKey)

getSelection

public Selection getSelection()

getSubscriptionContext

public SubscriptionContext getSubscriptionContext()

getAlertUser

public AlertUser getAlertUser()

initClipboard

public void initClipboard()

getClipboard

public com.stratelia.webactiv.clipboard.control.ejb.Clipboard getClipboard()
Return the clipboard EJB


getPersonalization

public UserPreferences getPersonalization()
Return the personalization EJB


getFavoriteLanguage

public String getFavoriteLanguage()
Return the user's favorite language


getFavoriteSpace

public String getFavoriteSpace()
Return the user's favorite space


setFavoriteSpace

public void setFavoriteSpace(String newSpace)

getFavoriteLook

public String getFavoriteLook()
Return the user's favorite language


isOnlineEditingEnabled

public boolean isOnlineEditingEnabled()
Returns:
@deprecated use isWebDAVEditingEnabled instead.

isWebDAVEditingEnabled

public boolean isWebDAVEditingEnabled()

isDragNDropEnabled

public boolean isDragNDropEnabled()

getOrganisationController

public OrganisationController getOrganisationController()

getUserAccessLevel

public UserAccessLevel getUserAccessLevel()
Return the user accesslevel of the cuurent user


getCurrentUserDetail

public UserDetail getCurrentUserDetail()
Return the UserDetail of the the current user


getComponentParameters

public List<Parameter> getComponentParameters(String sComponentId)
Return the parameters for the given component


getComponentParameterValue

public String getComponentParameterValue(String sComponentId,
                                         String parameterName)
Return the value of the parameter for the given component and the given name of parameter


getUserAvailRootSpaceIds

public String[] getUserAvailRootSpaceIds()
Return the root spaces ids available for the current user


getUserAvailComponentIds

public String[] getUserAvailComponentIds()
Return the components ids available for the current user


getUserAvailSpaceIds

public String[] getUserAvailSpaceIds()
Return the spaces ids available for the current user


getUserManageableSpaceIds

public String[] getUserManageableSpaceIds()
Return the spaces ids manageable by the current user


isBackOfficeVisible

public boolean isBackOfficeVisible()

isPDCBackOfficeVisible

public boolean isPDCBackOfficeVisible()

getUserManageableGroupIds

public List<String> getUserManageableGroupIds()

createComponentContext

public ComponentContext createComponentContext(String sSpaceId,
                                               String sComponent)
Helper function. Create a new CurrentSessionControl object and fill it with the values of the current space Id and component Id passed in parameters


updateUserSpace

public void updateUserSpace(String sSpaceId)
Deprecated. 

Update the current space for the current user


updateUserComponent

public void updateUserComponent(String sComponent)
Deprecated. 

Update the current component for the current user


getUserCurrentSpaceId

public String getUserCurrentSpaceId()
Deprecated. 


getUserCurrentComponentId

public String getUserCurrentComponentId()
Deprecated. 


getAdminUserConnections

public AdminUserConnections getAdminUserConnections()
Get the userId


getContentManager

public ContentManager getContentManager()

initServerProps

public void initServerProps(String sName,
                            String sPort)

getServerName

public String getServerName()

getServerPort

public String getServerPort()

getServerNameAndPort

public String getServerNameAndPort()

remove

public void remove()
Specified by:
remove in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard

getLastResults

public List<GlobalSilverContent> getLastResults()
Returns:
a List of GlobalSilverResult corresponding to the last search

setLastResults

public void setLastResults(List<GlobalSilverContent> list)
Parameters:
list -

setAllowPasswordChange

public void setAllowPasswordChange(boolean flag)

isAllowPasswordChange

public boolean isAllowPasswordChange()

create

public com.stratelia.webactiv.clipboard.control.ejb.Clipboard create(String name)
Specified by:
create in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard

add

public void add(ClipboardSelection clipObject)
         throws ClipboardException
Specified by:
add in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

getObject

public ClipboardSelection getObject()
Specified by:
getObject in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard

PasteDone

public void PasteDone()
               throws ClipboardException
Specified by:
PasteDone in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

getSelectedObjects

public Collection<ClipboardSelection> getSelectedObjects()
                                                  throws ClipboardException
Specified by:
getSelectedObjects in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

getObjects

public Collection<ClipboardSelection> getObjects()
                                          throws ClipboardException
Specified by:
getObjects in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

size

public int size()
         throws ClipboardException
Specified by:
size in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

getObject

public ClipboardSelection getObject(int index)
                             throws ClipboardException
Specified by:
getObject in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

setSelected

public void setSelected(int index,
                        boolean setIt)
                 throws ClipboardException
Specified by:
setSelected in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

removeObject

public void removeObject(int index)
                  throws ClipboardException
Specified by:
removeObject in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

clear

public void clear()
Specified by:
clear in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard

setMultiClipboard

public void setMultiClipboard()
                       throws ClipboardException
Specified by:
setMultiClipboard in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

setSingleClipboard

public void setSingleClipboard()
                        throws ClipboardException
Specified by:
setSingleClipboard in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

getName

public String getName()
Specified by:
getName in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard

getCount

public int getCount()
             throws ClipboardException
Specified by:
getCount in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

getMessageError

public String getMessageError()
                       throws ClipboardException
Specified by:
getMessageError in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

getExceptionError

public Exception getExceptionError()
                            throws ClipboardException
Specified by:
getExceptionError in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException

setMessageError

public void setMessageError(String messageID,
                            Exception e)
                     throws ClipboardException
Specified by:
setMessageError in interface com.stratelia.webactiv.clipboard.control.ejb.Clipboard
Throws:
ClipboardException


Copyright © 2016 Silverpeas. All Rights Reserved.