org.esupportail.portal.channels.CStockage.channelAction.classic
Class ChannelAction

java.lang.Object
  extended byorg.esupportail.portal.channels.CStockage.channelAction.AbstractChannelAction
      extended byorg.esupportail.portal.channels.CStockage.channelAction.classic.ChannelAction

public class ChannelAction
extends AbstractChannelAction

Id: ChannelAction.java,v 1.0 24 sept. 2004 Copyright (c) 2004 Esup Portail (www.esup-portail.org) Classes: ChannelAction Original Author: Yohan Colmant Class used to manage the actions when we are in a classic space context


Field Summary
protected static Log log
          Logger object
private  Space tempSharedSpace
          sharing directory properties used during the sharing management
 
Fields inherited from class org.esupportail.portal.channels.CStockage.channelAction.AbstractChannelAction
buffer, currentSpace, sharingTool, slave, spaces, stylesheet, userGroups, userPortalLogin
 
Constructor Summary
ChannelAction()
          Default constructor
 
Method Summary
protected  void checkCurrentDirectoryProperties()
          For the selected mode, we check the properties of the current directory
private  void checkParameters(org.jasig.portal.ChannelRuntimeData runtimeData)
          When valid the sharing
private  void createDir(org.jasig.portal.ChannelRuntimeData runtimeData)
          Create a new directory
private  void delete(org.jasig.portal.ChannelRuntimeData runtimeData)
          Delete the specified resource(s)
private  void deleteWithoutConfirm()
          Delete resource(s) without confirmation
protected  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
private  java.lang.StringBuffer paste(org.jasig.portal.ChannelRuntimeData runtimeData)
          Generate the XML String for this mod
private  void rename(org.jasig.portal.ChannelRuntimeData runtimeData)
          Rename the selected resource
protected  java.lang.StringBuffer renderXmlBadConnexionParametersException(ChannelException e)
          Return the xml when we have a BadConnexionParameters exception
 java.lang.StringBuffer renderXmlChannelException(ChannelException e)
          Return the xml when we have a ChannelException exception
private  java.lang.StringBuffer renderXmlConfirmDelete(org.jasig.portal.ChannelRuntimeData runtimeData)
          Generate the XML String for this mod
private  java.lang.StringBuffer renderXmlConfirmPaste()
          Generate the XML String for this mod
private  java.lang.StringBuffer renderXmlSetNameForRename(org.jasig.portal.ChannelRuntimeData runtimeData)
          Generate the XML String for this mod
private  java.lang.StringBuffer renderXmlShareDirectory(org.jasig.portal.ChannelRuntimeData runtimeData, org.jasig.portal.ChannelStaticData staticData, org.xml.sax.ContentHandler out)
          Return XML for the directory sharing mode
private  java.lang.StringBuffer renderXmlShareDirectoryAddGroup(org.jasig.portal.ChannelRuntimeData runtimeData, org.jasig.portal.ChannelStaticData staticData, org.xml.sax.ContentHandler out)
          When we want to add a group
private  java.lang.StringBuffer renderXmlShareDirectoryAddUser(org.jasig.portal.ChannelRuntimeData runtimeData, org.jasig.portal.ChannelStaticData staticData, org.xml.sax.ContentHandler out)
          When we want to add a user
private  java.lang.StringBuffer renderXmlShareDirectoryCancel()
          When click on cancel
private  java.lang.StringBuffer renderXmlShareDirectoryDeleteGroup(org.jasig.portal.ChannelRuntimeData runtimeData)
          When we delete a group
private  java.lang.StringBuffer renderXmlShareDirectoryDeleteUser(org.jasig.portal.ChannelRuntimeData runtimeData)
          When we delete a user
private  java.lang.StringBuffer renderXmlShareDirectoryGenerateXml()
          Generate xml for the directory sharing
private  java.lang.StringBuffer renderXmlShareDirectoryValid(org.jasig.portal.ChannelRuntimeData runtimeData)
          When valid the sharing
private  java.lang.StringBuffer renderXmlShareDirectoryValidServantResults(org.jasig.portal.ChannelRuntimeData runtimeData, org.jasig.portal.ChannelStaticData staticData)
          When we check the servant results
protected  java.lang.StringBuffer renderXmlShowCurrentDir(org.jasig.portal.ChannelRuntimeData runtimeData)
          Generate the XML String for this mod
 java.lang.StringBuffer renderXmlWithInformation(java.lang.String informationCode)
          Return the xml when we have to show a information message
private  void setClipboard(java.lang.String mode, org.jasig.portal.ChannelRuntimeData runtimeData)
          Set the clipboard
private  void setCurrentDirectorySharingProperties()
          Set the sharing properties of the currentDirectory
private  void setSharingProperties()
          Set the properties for the current directory
 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
private  void upload(org.jasig.portal.ChannelRuntimeData runtimeData)
          Start the upload
 
Methods inherited from class org.esupportail.portal.channels.CStockage.channelAction.AbstractChannelAction
checkCalledAction
 
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


tempSharedSpace

private Space tempSharedSpace
sharing directory properties used during the sharing management

Constructor Detail

ChannelAction

public ChannelAction()
Default constructor

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

Overrides:
init in class AbstractChannelAction
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

setCurrentDirectorySharingProperties

private void setCurrentDirectorySharingProperties()
                                           throws ServerException,
                                                  DataBaseException,
                                                  PropertiesException,
                                                  AclReadException,
                                                  AclAccessException,
                                                  AclWriteException,
                                                  NotSupportedAclException
Set the sharing properties of the currentDirectory

Throws:
ServerException
DataBaseException
PropertiesException
AclReadException
AclAccessException
AclWriteException
NotSupportedAclException

specificCheckCalledAction

public 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

Specified by:
specificCheckCalledAction in class AbstractChannelAction
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

renderXmlWithInformation

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

Specified by:
renderXmlWithInformation in class AbstractChannelAction
Returns:
the xml when we have to show a information message
Throws:
PropertiesException

checkCurrentDirectoryProperties

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

Specified by:
checkCurrentDirectoryProperties in class AbstractChannelAction
Throws:
java.lang.Exception

renderXmlBadConnexionParametersException

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

Specified by:
renderXmlBadConnexionParametersException in class AbstractChannelAction
Parameters:
e - the throwed exception
Returns:
the xml when we have a BadConnexionParameters exception
Throws:
PropertiesException

renderXmlChannelException

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

Specified by:
renderXmlChannelException in class AbstractChannelAction
Parameters:
e - the throwed exception
Returns:
the xml when we have a ChannelException exception

renderXmlShowCurrentDir

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

Specified by:
renderXmlShowCurrentDir in class AbstractChannelAction
Parameters:
runtimeData - the runtime data channel object
Returns:
the XML for this mod
Throws:
ChannelException

directoryBack

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

Specified by:
directoryBack in class AbstractChannelAction
Throws:
ChannelException

createDir

private void createDir(org.jasig.portal.ChannelRuntimeData runtimeData)
                throws CancelException,
                       ApplicationException,
                       CreateDirectoryException,
                       StillExistsException,
                       BadFormatException,
                       NotAuthorizedException,
                       NotAuthorizedNewDirException,
                       NotExistsResourceException,
                       PropertiesException
Create a new directory

Parameters:
runtimeData - the runtime data channel object
Throws:
CancelException
ApplicationException
CreateDirectoryException
StillExistsException
BadFormatException
NotAuthorizedException
NotAuthorizedNewDirException
NotExistsResourceException
PropertiesException

renderXmlSetNameForRename

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

Parameters:
runtimeData - the runtime data channel object
Returns:
the XML StringBuffer for this mod
Throws:
ChannelException

rename

private void rename(org.jasig.portal.ChannelRuntimeData runtimeData)
             throws ChannelException
Rename the selected resource

Parameters:
runtimeData - the runtime data channel object
Throws:
ChannelException

renderXmlConfirmDelete

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

Parameters:
runtimeData - the runtime data channel object
Returns:
the xml used to confirm a delete
Throws:
ChannelException

delete

private void delete(org.jasig.portal.ChannelRuntimeData runtimeData)
             throws ChannelException
Delete the specified resource(s)

Parameters:
runtimeData - the runtime data channel object
Throws:
ChannelException

deleteWithoutConfirm

private void deleteWithoutConfirm()
                           throws ChannelException
Delete resource(s) without confirmation

Throws:
ChannelException

upload

private void upload(org.jasig.portal.ChannelRuntimeData runtimeData)
             throws ChannelException
Start the upload

Parameters:
runtimeData - the runtime data channel object
Throws:
ChannelException

setClipboard

private void setClipboard(java.lang.String mode,
                          org.jasig.portal.ChannelRuntimeData runtimeData)
                   throws NoneSelectedResourceException,
                          ApplicationException,
                          NotAuthorizedException
Set the clipboard

Parameters:
mode - used: copy or move
runtimeData - the runtime data channel object
Throws:
NoneSelectedResourceException
ApplicationException
NotAuthorizedException

renderXmlConfirmPaste

private java.lang.StringBuffer renderXmlConfirmPaste()
                                              throws ChannelException
Generate the XML String for this mod

Returns:
the XML String for this mod
Throws:
ChannelException

paste

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

Parameters:
runtimeData - the runtime data channel object
Returns:
the XML String for this mod
Throws:
ChannelException

renderXmlShareDirectory

private java.lang.StringBuffer renderXmlShareDirectory(org.jasig.portal.ChannelRuntimeData runtimeData,
                                                       org.jasig.portal.ChannelStaticData staticData,
                                                       org.xml.sax.ContentHandler out)
                                                throws org.jasig.portal.PortalException,
                                                       ChannelException
Return XML for the directory sharing mode

Parameters:
runtimeData -
staticData -
out -
Returns:
XML for the directory sharing mode
Throws:
org.jasig.portal.PortalException
ChannelException

renderXmlShareDirectoryCancel

private java.lang.StringBuffer renderXmlShareDirectoryCancel()
                                                      throws CancelException
When click on cancel

Returns:
the xml when we click on cancel
Throws:
CancelException

checkParameters

private void checkParameters(org.jasig.portal.ChannelRuntimeData runtimeData)
When valid the sharing

Parameters:
runtimeData -

renderXmlShareDirectoryValid

private java.lang.StringBuffer renderXmlShareDirectoryValid(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                     throws ChannelException
When valid the sharing

Parameters:
runtimeData -
Returns:
xml when we valid the sharing
Throws:
ChannelException

renderXmlShareDirectoryAddUser

private java.lang.StringBuffer renderXmlShareDirectoryAddUser(org.jasig.portal.ChannelRuntimeData runtimeData,
                                                              org.jasig.portal.ChannelStaticData staticData,
                                                              org.xml.sax.ContentHandler out)
                                                       throws PropertiesException,
                                                              org.jasig.portal.PortalException
When we want to add a user

Parameters:
runtimeData - the runtime data object used in this channel
staticData - the static data object used in this channel
out - the output object used for the rendering
Returns:
the xml when we add somebody
Throws:
PropertiesException
org.jasig.portal.PortalException

renderXmlShareDirectoryAddGroup

private java.lang.StringBuffer renderXmlShareDirectoryAddGroup(org.jasig.portal.ChannelRuntimeData runtimeData,
                                                               org.jasig.portal.ChannelStaticData staticData,
                                                               org.xml.sax.ContentHandler out)
                                                        throws PropertiesException,
                                                               org.jasig.portal.PortalException
When we want to add a group

Parameters:
runtimeData - the runtime data object used in this channel
staticData - the static data object used in this channel
out - the output object used for the rendering
Returns:
the xml when we add somebody
Throws:
PropertiesException
org.jasig.portal.PortalException

renderXmlShareDirectoryValidServantResults

private java.lang.StringBuffer renderXmlShareDirectoryValidServantResults(org.jasig.portal.ChannelRuntimeData runtimeData,
                                                                          org.jasig.portal.ChannelStaticData staticData)
                                                                   throws PropertiesException
When we check the servant results

Parameters:
runtimeData - the runtime data object used in this channel
staticData - the static data object used in this channel
Returns:
the xml after getting the servant results
Throws:
PropertiesException

renderXmlShareDirectoryDeleteUser

private java.lang.StringBuffer renderXmlShareDirectoryDeleteUser(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                          throws PropertiesException
When we delete a user

Parameters:
runtimeData - the runtime data object used in the channel
Returns:
the xml when we delete somebody
Throws:
PropertiesException

renderXmlShareDirectoryDeleteGroup

private java.lang.StringBuffer renderXmlShareDirectoryDeleteGroup(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                           throws PropertiesException
When we delete a group

Parameters:
runtimeData - the runtime data object used in the channel
Returns:
the xml when we delete somebody
Throws:
PropertiesException

renderXmlShareDirectoryGenerateXml

private java.lang.StringBuffer renderXmlShareDirectoryGenerateXml()
Generate xml for the directory sharing

Returns:
the xml for the directory sharing

setSharingProperties

private void setSharingProperties()
                           throws DataBaseException,
                                  PropertiesException,
                                  ServerException,
                                  AclAccessException,
                                  AclWriteException,
                                  AclReadException,
                                  NotSupportedAclException
Set the properties for the current directory

Throws:
DataBaseException
PropertiesException
ServerException
AclAccessException
AclWriteException
AclReadException
NotSupportedAclException