Class AbstractComponentSessionController
- java.lang.Object
-
- org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
-
- All Implemented Interfaces:
Serializable
,ComponentSessionController
,SessionCloseable
- Direct Known Subclasses:
AbstractAdminComponentSessionController
,AgendaSessionController
,ClipboardSessionController
,DirectorySessionController
,FileSharingSessionController
,FormTemplateSessionController
,InterestCenterSessionController
,JobSearchPeasSessionController
,MyContactProfilSessionController
,MyProfilSessionController
,PdcClassifySessionController
,PdcSearchSessionController
,PdcSubscriptionSessionController
,PdcUtilizationSessionController
,PersonalizationSessionController
,POPUPSessionController
,ProfilSessionController
,SelectionPeasWrapperSessionController
,SILVERMAILSessionController
,SubscriptionSessionController
,ThesaurusSessionController
,ToDoSessionController
,UserNotificationSessionController
,VersioningSessionController
,WebComponentController
,WebConnectionsSessionController
public abstract class AbstractComponentSessionController extends Object implements ComponentSessionController, SessionCloseable
Base class for all component session controller.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ComponentContext
context
-
Constructor Summary
Constructors Constructor Description AbstractComponentSessionController(MainSessionController controller, String spaceId, String componentId)
AbstractComponentSessionController(MainSessionController controller, ComponentContext context)
AbstractComponentSessionController(MainSessionController controller, ComponentContext context, String localizedMessagesBundleName)
AbstractComponentSessionController(MainSessionController controller, ComponentContext context, String localizedMessagesBundleName, String iconFileName)
AbstractComponentSessionController(MainSessionController controller, ComponentContext context, String localizedMessagesBundleName, String iconFileName, String settingsFileName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addClipboardSelection(ClipboardSelection selection)
void
clipboardPasteDone()
void
close()
The user session is being in close, close all resources relative to the session.String
getClipboardErrorMessage()
Exception
getClipboardExceptionError()
Collection<ClipboardSelection>
getClipboardObjects()
Collection<ClipboardSelection>
getClipboardSelectedObjects()
int
getClipboardSize()
protected ComponentAccessControl
getComponentAccessController()
String
getComponentId()
Return the unique identifier of the current component.String
getComponentLabel()
Gets the label of the current used component (as known by the user).String
getComponentName()
Return the name of the component (as specified in the xmlComponent)String
getComponentParameterValue(String parameterName)
Gets the value of the specified current component's parameter.String
getComponentParameterValue(ComponentInstanceParameterName parameterName)
Gets the value of the specified current component's parameter.String
getComponentRootName()
return the component Root name : i.e.String
getComponentUrl()
Gets the URL at which is located the current selected component.SilverpeasRole
getHighestSilverpeasUserRole()
Gets the highest role the user has on the component.org.silverpeas.kernel.bundle.SettingBundle
getIcon()
String
getLanguage()
Gets the main language of the user.String
getLook()
Gets the identifier of the user website look.org.silverpeas.kernel.bundle.LocalizationBundle
getMultilang()
OrganizationController
getOrganisationController()
Return the organizationControllerUserPreferences
getPersonalization()
String
getRSSUrl()
Selection
getSelection()
org.silverpeas.kernel.bundle.SettingBundle
getSettings()
Collection<SilverpeasRole>
getSilverpeasUserRoles()
Gets the roles the user has on the component.String
getSpaceId()
Gets the unique identifier of the current selected workspace.String
getSpaceLabel()
Gets the space label (as known by the user).String
getString(String resName)
protected SubscriptionContext
getSubscriptionContext()
protected String
getUrlEncodedParameter(String param)
Gets the URL encoded representation of the specified parameter.UserAccessLevel
getUserAccessLevel()
String[]
getUserAvailComponentIds()
Gets the user's available components.UserDetail
getUserDetail()
Gets details on the connected current user.UserDetail
getUserDetail(String userId)
String
getUserId()
Gets the unique identifier of the current connected user.protected List<String>
getUserManageableGroupIds()
protected String[]
getUserManageableSpaceIds()
String[]
getUserRoles()
Gets all of the roles the current user plays in Silverpeas.ZoneId
getZoneId()
Return the user zone idboolean
isAppInMaintenance()
protected boolean
isGroupManager()
boolean
isPasswordChangeAllowed()
boolean
isSpaceInMaintenance(String spaceId)
void
removeClipboardElement(int index)
void
setAppModeMaintenance(boolean mode)
void
setClipboardSelectedElement(int index, boolean selected)
protected void
setComponentRootName(String newRootName)
Sets the component root name : i.e.void
setSpaceModeMaintenance(String spaceId, boolean mode)
-
-
-
Field Detail
-
context
protected ComponentContext context
-
-
Constructor Detail
-
AbstractComponentSessionController
public AbstractComponentSessionController(MainSessionController controller, String spaceId, String componentId)
-
AbstractComponentSessionController
public AbstractComponentSessionController(MainSessionController controller, ComponentContext context)
-
AbstractComponentSessionController
public AbstractComponentSessionController(MainSessionController controller, ComponentContext context, String localizedMessagesBundleName)
-
AbstractComponentSessionController
public AbstractComponentSessionController(MainSessionController controller, ComponentContext context, String localizedMessagesBundleName, String iconFileName)
-
AbstractComponentSessionController
public AbstractComponentSessionController(MainSessionController controller, ComponentContext context, String localizedMessagesBundleName, String iconFileName, String settingsFileName)
-
-
Method Detail
-
getMultilang
public org.silverpeas.kernel.bundle.LocalizationBundle getMultilang()
- Specified by:
getMultilang
in interfaceComponentSessionController
-
getIcon
public org.silverpeas.kernel.bundle.SettingBundle getIcon()
- Specified by:
getIcon
in interfaceComponentSessionController
-
getSettings
public org.silverpeas.kernel.bundle.SettingBundle getSettings()
- Specified by:
getSettings
in interfaceComponentSessionController
-
getOrganisationController
public OrganizationController getOrganisationController()
Description copied from interface:ComponentSessionController
Return the organizationController- Specified by:
getOrganisationController
in interfaceComponentSessionController
-
getLanguage
public String getLanguage()
Gets the main language of the user.- Specified by:
getLanguage
in interfaceComponentSessionController
- Returns:
- the user language code.
-
getZoneId
public ZoneId getZoneId()
Description copied from interface:ComponentSessionController
Return the user zone id- Specified by:
getZoneId
in interfaceComponentSessionController
-
getLook
public String getLook()
Gets the identifier of the user website look.- Returns:
- the user favorite look name.
-
getUserDetail
public UserDetail getUserDetail()
Gets details on the connected current user.- Specified by:
getUserDetail
in interfaceComponentSessionController
- Returns:
- the UserDetail information about the current user.
-
getUserDetail
public UserDetail getUserDetail(String userId)
-
getUserId
public String getUserId()
Gets the unique identifier of the current connected user.- Specified by:
getUserId
in interfaceComponentSessionController
- Returns:
- the user identifier.
-
getSpaceLabel
public String getSpaceLabel()
Gets the space label (as known by the user).- Specified by:
getSpaceLabel
in interfaceComponentSessionController
- Returns:
- the space label.
-
getSpaceId
public String getSpaceId()
Gets the unique identifier of the current selected workspace.- Specified by:
getSpaceId
in interfaceComponentSessionController
- Returns:
- the space identifier.
-
getComponentName
public String getComponentName()
Description copied from interface:ComponentSessionController
Return the name of the component (as specified in the xmlComponent)- Specified by:
getComponentName
in interfaceComponentSessionController
-
getComponentLabel
public final String getComponentLabel()
Gets the label of the current used component (as known by the user).- Specified by:
getComponentLabel
in interfaceComponentSessionController
- Returns:
- the component label.
-
getComponentId
public final String getComponentId()
Return the unique identifier of the current component.- Specified by:
getComponentId
in interfaceComponentSessionController
- Returns:
- the current component identifier.
-
getComponentUrl
public final String getComponentUrl()
Gets the URL at which is located the current selected component. Warning: For old components' use ONLY! (use it in the jsp:forward lines).- Specified by:
getComponentUrl
in interfaceComponentSessionController
- Returns:
- the current component URL.
-
getComponentRootName
public final String getComponentRootName()
return the component Root name : i.e. 'calendar', 'kmelia', .... (the name that appears in the URL's root (the 'R' prefix is added later when needed))- Returns:
- the component root name.
-
setComponentRootName
protected final void setComponentRootName(String newRootName)
Sets the component root name : i.e. 'agenda', 'calendar', 'kmelia', .... (the name that appears in the URL's root (the 'R' prefix is added later when needed)) this function is called by the class of non-instanciable components the inherits from this class- Parameters:
newRootName
- the new root component.
-
getComponentParameterValue
public String getComponentParameterValue(String parameterName)
Gets the value of the specified current component's parameter.- Specified by:
getComponentParameterValue
in interfaceComponentSessionController
- Parameters:
parameterName
- the name of the parameter to get.- Returns:
- the value of the parameter.
-
getComponentParameterValue
public String getComponentParameterValue(ComponentInstanceParameterName parameterName)
Gets the value of the specified current component's parameter.- Specified by:
getComponentParameterValue
in interfaceComponentSessionController
- Parameters:
parameterName
- the name (centralized) of the parameter to get.- Returns:
- the value of the parameter.
-
getUserAvailComponentIds
public String[] getUserAvailComponentIds()
Gets the user's available components.- Specified by:
getUserAvailComponentIds
in interfaceComponentSessionController
- Returns:
- an array with all available component identifiers.
-
getUserRoles
public String[] getUserRoles()
Gets all of the roles the current user plays in Silverpeas. Because the- Specified by:
getUserRoles
in interfaceComponentSessionController
- Returns:
- an array with all the user role names.
-
getSilverpeasUserRoles
public Collection<SilverpeasRole> getSilverpeasUserRoles()
Description copied from interface:ComponentSessionController
Gets the roles the user has on the component.- Specified by:
getSilverpeasUserRoles
in interfaceComponentSessionController
- Returns:
- a list of user roles.
-
getHighestSilverpeasUserRole
public SilverpeasRole getHighestSilverpeasUserRole()
Description copied from interface:ComponentSessionController
Gets the highest role the user has on the component.- Specified by:
getHighestSilverpeasUserRole
in interfaceComponentSessionController
- Returns:
- a user role.
-
getPersonalization
public UserPreferences getPersonalization()
- Specified by:
getPersonalization
in interfaceComponentSessionController
-
getUserAccessLevel
public UserAccessLevel getUserAccessLevel()
-
getSelection
public Selection getSelection()
-
isAppInMaintenance
public boolean isAppInMaintenance()
- Specified by:
isAppInMaintenance
in interfaceComponentSessionController
-
setAppModeMaintenance
public void setAppModeMaintenance(boolean mode)
- Specified by:
setAppModeMaintenance
in interfaceComponentSessionController
-
isSpaceInMaintenance
public boolean isSpaceInMaintenance(String spaceId)
- Specified by:
isSpaceInMaintenance
in interfaceComponentSessionController
-
setSpaceModeMaintenance
public void setSpaceModeMaintenance(String spaceId, boolean mode)
- Specified by:
setSpaceModeMaintenance
in interfaceComponentSessionController
-
close
public void close()
Description copied from interface:SessionCloseable
The user session is being in close, close all resources relative to the session.- Specified by:
close
in interfaceSessionCloseable
-
isPasswordChangeAllowed
public boolean isPasswordChangeAllowed()
-
getRSSUrl
public String getRSSUrl()
-
getClipboardSelectedObjects
public Collection<ClipboardSelection> getClipboardSelectedObjects() throws ClipboardException
- Specified by:
getClipboardSelectedObjects
in interfaceComponentSessionController
- Throws:
ClipboardException
-
getClipboardErrorMessage
public String getClipboardErrorMessage() throws ClipboardException
- Specified by:
getClipboardErrorMessage
in interfaceComponentSessionController
- Throws:
ClipboardException
-
getClipboardExceptionError
public Exception getClipboardExceptionError() throws ClipboardException
- Specified by:
getClipboardExceptionError
in interfaceComponentSessionController
- Throws:
ClipboardException
-
getClipboardObjects
public Collection<ClipboardSelection> getClipboardObjects() throws ClipboardException
- Specified by:
getClipboardObjects
in interfaceComponentSessionController
- Throws:
ClipboardException
-
addClipboardSelection
public void addClipboardSelection(ClipboardSelection selection) throws ClipboardException
- Specified by:
addClipboardSelection
in interfaceComponentSessionController
- Throws:
ClipboardException
-
clipboardPasteDone
public void clipboardPasteDone() throws ClipboardException
- Specified by:
clipboardPasteDone
in interfaceComponentSessionController
- Throws:
ClipboardException
-
setClipboardSelectedElement
public void setClipboardSelectedElement(int index, boolean selected) throws ClipboardException
- Specified by:
setClipboardSelectedElement
in interfaceComponentSessionController
- Throws:
ClipboardException
-
getClipboardSize
public int getClipboardSize() throws ClipboardException
- Specified by:
getClipboardSize
in interfaceComponentSessionController
- Throws:
ClipboardException
-
removeClipboardElement
public void removeClipboardElement(int index) throws ClipboardException
- Specified by:
removeClipboardElement
in interfaceComponentSessionController
- Throws:
ClipboardException
-
getUserManageableSpaceIds
protected String[] getUserManageableSpaceIds()
-
isGroupManager
protected boolean isGroupManager()
-
getSubscriptionContext
protected SubscriptionContext getSubscriptionContext()
-
getUrlEncodedParameter
protected String getUrlEncodedParameter(String param)
Gets the URL encoded representation of the specified parameter.- Parameters:
param
- the parameter.- Returns:
- a URL encoded representation of the parameter.
-
getComponentAccessController
protected ComponentAccessControl getComponentAccessController()
-
-