org.esupportail.portal.channels.CStockage.channelAction
Class AbstractChannelAction

java.lang.Object
  extended byorg.esupportail.portal.channels.CStockage.channelAction.AbstractChannelAction
Direct Known Subclasses:
ChannelAction, ChannelAction

public abstract class AbstractChannelAction
extends java.lang.Object

Id: AbstractChannelAction.java,v 1.0 24 sept. 2004 Copyright (c) 2004 Esup Portail (www.esup-portail.org) Classes: AbstractChannelAction Original Author: Yohan Colmant


Field Summary
private  java.util.TreeMap availableSpaces
          The avalaible spaces
protected  BufferAction buffer
          Object used to keep the objects used between 2 actions, for example, the clipboard
protected  Space currentSpace
          the space containing this channel action
protected static Log log
          Logger object
private  org.jasig.portal.security.IPerson person
          The current user IPerson object
protected  SharingTool sharingTool
          The object used to manage the sharing of folder
protected  org.jasig.portal.IServant slave
          The servant channel used for groups and users selection
protected  java.util.ArrayList spaces
          The default spaces
protected  java.lang.StringBuffer stylesheet
          The stylesheet used
private  java.util.TreeMap usedSpaces
          The spaces still in use
protected  java.util.Vector userGroups
          The groups of the user in the portal
protected  java.lang.String userPortalLogin
          The user login in the portal
 
Constructor Summary
AbstractChannelAction()
           
 
Method Summary
 void checkCalledAction(org.jasig.portal.ChannelStaticData staticData, org.jasig.portal.ChannelRuntimeData runtimeData, org.xml.sax.ContentHandler out, org.jasig.portal.utils.XSLT xslt, ChannelException setStaticDataException)
          Manage the actions when refreshing the channel
protected abstract  void checkCurrentDirectoryProperties()
          For the selected mode, we check the properties of the current directory
protected abstract  void directoryBack()
          Go to the parent directory
 void init(org.jasig.portal.security.IPerson person, Space currentSpace, java.util.ArrayList spaces, BufferAction buffer, java.lang.String userPortalLogin, java.util.Vector userGroups)
          Init the object used to manage the actions of the channel
 void initPersonalSpacesIntoMenu()
          Init the personal spaces into the menu
protected abstract  java.lang.StringBuffer renderXmlBadConnexionParametersException(ChannelException e)
          Return the xml when we have a BadConnexionParameters exception
protected abstract  java.lang.StringBuffer renderXmlChannelException(ChannelException e)
          Return the xml when we have a ChannelException exception
private  java.lang.StringBuffer renderXmlManageSharedSpaces(org.jasig.portal.ChannelRuntimeData runtimeData)
          Generate the XML when we want to manage the shared spaces
private  java.lang.StringBuffer renderXmlManageSharedSpacesAdd(org.jasig.portal.ChannelRuntimeData runtimeData)
          Generate the XML when we click on "add" when we manage the shared spaces
private  void renderXmlManageSharedSpacesCancel()
          Generate the XML when we click on "cancel" when we manage the shared spaces
private  java.lang.StringBuffer renderXmlManageSharedSpacesDelete(org.jasig.portal.ChannelRuntimeData runtimeData)
          Generate the XML when we click on "delete" when we manage the shared spaces
private  java.lang.StringBuffer renderXmlManageSharedSpacesGetXmlForRender(org.jasig.portal.ChannelRuntimeData runtimeData)
          Generate the XML when we want to manage the shared spaces
private  java.lang.StringBuffer renderXmlManageSharedSpacesGetXmlForRenderOnlySpaces(java.util.TreeMap spaces)
          Generate the XML when we want to manage the shared spaces
private  java.lang.StringBuffer renderXmlManageSharedSpacesValid(org.jasig.portal.ChannelRuntimeData runtimeData)
          Generate the XML when we click on "valid" when we manage the shared spaces
protected abstract  java.lang.StringBuffer renderXmlShowCurrentDir(org.jasig.portal.ChannelRuntimeData runtimeData)
          Generate the XML String for this mod
protected abstract  java.lang.StringBuffer renderXmlWithInformation(java.lang.String informationCode)
          Return the xml when we have to show a information message
private  void setAvailableAndUsedSpaces()
          Set the used spaces and the avalaible spaces for this user
private  void setSpacesIntoMenu()
          Set the personal spaces into the spaces menu
abstract  java.lang.StringBuffer specificCheckCalledAction(java.lang.String currentMode, org.jasig.portal.ChannelStaticData staticData, org.jasig.portal.ChannelRuntimeData runtimeData, org.xml.sax.ContentHandler out, org.jasig.portal.utils.XSLT xslt, ChannelException setStaticDataException)
          Manage the specific actions when refreshing the channel for the specific channel mode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final Log log
Logger object


currentSpace

protected Space currentSpace
the space containing this channel action


spaces

protected java.util.ArrayList spaces
The default spaces


buffer

protected BufferAction buffer
Object used to keep the objects used between 2 actions, for example, the clipboard


userPortalLogin

protected java.lang.String userPortalLogin
The user login in the portal


userGroups

protected java.util.Vector userGroups
The groups of the user in the portal


slave

protected org.jasig.portal.IServant slave
The servant channel used for groups and users selection


sharingTool

protected SharingTool sharingTool
The object used to manage the sharing of folder


person

private org.jasig.portal.security.IPerson person
The current user IPerson object


stylesheet

protected java.lang.StringBuffer stylesheet
The stylesheet used


usedSpaces

private java.util.TreeMap usedSpaces
The spaces still in use


availableSpaces

private java.util.TreeMap availableSpaces
The avalaible spaces

Constructor Detail

AbstractChannelAction

public AbstractChannelAction()
Method Detail

init

public void init(org.jasig.portal.security.IPerson person,
                 Space currentSpace,
                 java.util.ArrayList spaces,
                 BufferAction buffer,
                 java.lang.String userPortalLogin,
                 java.util.Vector userGroups)
          throws ChannelException
Init the object used to manage the actions of the channel

Parameters:
person - the uportal person object
currentSpace - the current space used
spaces - all the spaces used
buffer - the buffer used to get for example the clipboard
userPortalLogin - The user login in the portal
userGroups - The groups of the user in the portal
Throws:
ChannelException

initPersonalSpacesIntoMenu

public void initPersonalSpacesIntoMenu()
                                throws DataBaseException,
                                       ChannelException
Init the personal spaces into the menu

Throws:
DataBaseException
ChannelException

checkCalledAction

public void checkCalledAction(org.jasig.portal.ChannelStaticData staticData,
                              org.jasig.portal.ChannelRuntimeData runtimeData,
                              org.xml.sax.ContentHandler out,
                              org.jasig.portal.utils.XSLT xslt,
                              ChannelException setStaticDataException)
                       throws org.jasig.portal.PortalException
Manage the actions when refreshing the channel

Parameters:
staticData - the static data channel object
runtimeData - the runtime data channel object
out - the contentHandler used in the renderXml
xslt - the xslt motor object
setStaticDataException - the excpetion throwed in the setStaticData method
Throws:
org.jasig.portal.PortalException

checkCurrentDirectoryProperties

protected abstract void checkCurrentDirectoryProperties()
                                                 throws java.lang.Exception
For the selected mode, we check the properties of the current directory

Throws:
java.lang.Exception

renderXmlWithInformation

protected abstract java.lang.StringBuffer renderXmlWithInformation(java.lang.String informationCode)
                                                            throws PropertiesException
Return the xml when we have to show a information message

Returns:
the xml when we have to show a information message
Throws:
PropertiesException

renderXmlBadConnexionParametersException

protected abstract java.lang.StringBuffer renderXmlBadConnexionParametersException(ChannelException e)
                                                                            throws PropertiesException
Return the xml when we have a BadConnexionParameters exception

Parameters:
e - the throwed exception
Returns:
the xml when we have a BadConnexionParameters exception
Throws:
PropertiesException

renderXmlChannelException

protected abstract java.lang.StringBuffer renderXmlChannelException(ChannelException e)
Return the xml when we have a ChannelException exception

Parameters:
e - the throwed exception
Returns:
the xml when we have a ChannelException exception

specificCheckCalledAction

public abstract java.lang.StringBuffer specificCheckCalledAction(java.lang.String currentMode,
                                                                 org.jasig.portal.ChannelStaticData staticData,
                                                                 org.jasig.portal.ChannelRuntimeData runtimeData,
                                                                 org.xml.sax.ContentHandler out,
                                                                 org.jasig.portal.utils.XSLT xslt,
                                                                 ChannelException setStaticDataException)
                                                          throws ChannelException,
                                                                 org.jasig.portal.PortalException
Manage the specific actions when refreshing the channel for the specific channel mode

Parameters:
currentMode - the current channel mode
staticData - the static data channel object
runtimeData - the runtime data channel object
out - the contentHandler used in the renderXml
xslt - the xslt motor object
setStaticDataException - the excpetion throwed in the setStaticData method
Throws:
org.jasig.portal.PortalException
ChannelException

renderXmlShowCurrentDir

protected abstract java.lang.StringBuffer renderXmlShowCurrentDir(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                           throws ChannelException
Generate the XML String for this mod

Parameters:
runtimeData - the runtime data channel object
Returns:
le XML pour ce mode
Throws:
ChannelException

directoryBack

protected abstract void directoryBack()
                               throws ChannelException
Go to the parent directory

Throws:
ChannelException

renderXmlManageSharedSpaces

private java.lang.StringBuffer renderXmlManageSharedSpaces(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                    throws ChannelException,
                                                           PropertiesException,
                                                           CancelException,
                                                           DataBaseException,
                                                           ServerException
Generate the XML when we want to manage the shared spaces

Parameters:
runtimeData - the runtime data channel object
Returns:
the XML for this mode
Throws:
CancelException
DataBaseException
ChannelException
PropertiesException
ServerException

setAvailableAndUsedSpaces

private void setAvailableAndUsedSpaces()
                                throws DataBaseException,
                                       PropertiesException
Set the used spaces and the avalaible spaces for this user

Throws:
DataBaseException
PropertiesException

renderXmlManageSharedSpacesGetXmlForRender

private java.lang.StringBuffer renderXmlManageSharedSpacesGetXmlForRender(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                                   throws ServerException,
                                                                          PropertiesException
Generate the XML when we want to manage the shared spaces

Parameters:
runtimeData - the runtime data channel object
Returns:
the XML for this mode
Throws:
CancelException
ServerException
PropertiesException

renderXmlManageSharedSpacesGetXmlForRenderOnlySpaces

private java.lang.StringBuffer renderXmlManageSharedSpacesGetXmlForRenderOnlySpaces(java.util.TreeMap spaces)
                                                                             throws ServerException,
                                                                                    PropertiesException
Generate the XML when we want to manage the shared spaces

Parameters:
spaces - spaces list
Returns:
the XML for this mode
Throws:
ServerException
PropertiesException

renderXmlManageSharedSpacesCancel

private void renderXmlManageSharedSpacesCancel()
                                        throws CancelException
Generate the XML when we click on "cancel" when we manage the shared spaces

Throws:
CancelException

setSpacesIntoMenu

private void setSpacesIntoMenu()
                        throws DataBaseException,
                               ChannelException
Set the personal spaces into the spaces menu

Throws:
DataBaseException
ChannelException

renderXmlManageSharedSpacesValid

private java.lang.StringBuffer renderXmlManageSharedSpacesValid(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                         throws DataBaseException,
                                                                ChannelException
Generate the XML when we click on "valid" when we manage the shared spaces

Parameters:
runtimeData - the runtime data channel object
Returns:
the XML for this mode
Throws:
DataBaseException
ChannelException

renderXmlManageSharedSpacesAdd

private java.lang.StringBuffer renderXmlManageSharedSpacesAdd(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                       throws ServerException,
                                                              PropertiesException
Generate the XML when we click on "add" when we manage the shared spaces

Parameters:
runtimeData - the runtime data channel object
Returns:
the XML for this mode
Throws:
ServerException
PropertiesException

renderXmlManageSharedSpacesDelete

private java.lang.StringBuffer renderXmlManageSharedSpacesDelete(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                          throws ServerException,
                                                                 PropertiesException
Generate the XML when we click on "delete" when we manage the shared spaces

Parameters:
runtimeData - the runtime data channel object
Returns:
the XML for this mode
Throws:
ServerException
PropertiesException