Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.esupportail.portal.channels.CStockage.channelAction.injac
Class ChannelAction

    java.lang.Object
      org.esupportail.portal.channels.CStockage.channelAction.AbstractChannelAction
          org.esupportail.portal.channels.CStockage.channelAction.injac.ChannelAction

public class ChannelAction
extends AbstractChannelAction

Id: ChannelAction.java,v 1.0 27 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 an injac space context

Field Summary
`private boolean` | `creatingNewSpace` If we are creating a new Space
`private java.lang.String` | `creatingNewSpaceName` The name of the new space while creating
`private DirectoryProperties` | `directoryProperties` Object used to know the properties of the current directory
`protected static Log` | `log` Logger object
`private java.util.ArrayList` | `metadataToSet` The metadata we have to set
`private InjacSpaceManagementProperties` | `smp` Object use to manage an injac space properties
`private java.util.Vector` | `userTypeForAdd` The vector used to add people when we use a servant channel
`private java.lang.String` | `userTypeForAddName` The name of user type for add: reader_group, ... ?

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
`private boolean` | `adminSpaceAdd(org.jasig.portal.ChannelRuntimeData runtimeData, org.jasig.portal.ChannelStaticData staticData, org.xml.sax.ContentHandler out)` When we want to add a user or a group
`private void` | `adminSpaceChangeMetadataFile(java.lang.String choice)` When we change the metadata file
`private void` | `adminSpaceChangeRenderType(java.lang.String choice)` When we change the rendering type
`private void` | `adminSpaceDelete(org.jasig.portal.ChannelRuntimeData runtimeData)` When we delete a user or a group
`protected void` | `checkCurrentDirectoryProperties()` For the selected mode, we check the properties of the current directory
`private void` | `createDir(org.jasig.portal.ChannelRuntimeData runtimeData)` Generate the XML String for this mod
`private java.lang.StringBuffer` | `createSpace(org.jasig.portal.ChannelRuntimeData runtimeData, org.jasig.portal.ChannelStaticData staticData, org.xml.sax.ContentHandler out)` Generate the xml for the creating space mod
`private void` | `delete(org.jasig.portal.ChannelRuntimeData runtimeData)` Generate the XML String for this mod
`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
`static boolean` | `isUserDocumentOwner(java.lang.String documentPath, Space currentSpace, java.lang.String userPortalLogin)` Check if the current user is the owner of the specified document
`static boolean` | `isUserEditorInSpace(java.lang.String spacePath, Space currentSpace, java.lang.String userPortalLogin, java.util.Vector userGroups)` Check if the current user is editor in the specified space
`static boolean` | `isUserManagerInSpace(java.lang.String spacePath, Space currentSpace, java.lang.String userPortalLogin, java.util.Vector userGroups)` Check if the current user is manager in the specified space
`static boolean` | `isUserWriterInSpace(java.lang.String spacePath, Space currentSpace, java.lang.String userPortalLogin, java.util.Vector userGroups)` Check if the current user is writer in the specified space
`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)` Generate the XML String for this mod
`private java.lang.StringBuffer` | `renderXmlAdminSpace(org.jasig.portal.ChannelRuntimeData runtimeData, org.jasig.portal.ChannelStaticData staticData, org.xml.sax.ContentHandler out)` Return XML for the space administration mode
`private java.lang.StringBuffer` | `renderXmlAdminSpaceCancel()` When click on cancel
`private java.lang.StringBuffer` | `renderXmlAdminSpaceGenerateXml()` Generate xml for the administration rendering
`private java.lang.StringBuffer` | `renderXmlAdminSpaceValid(org.jasig.portal.ChannelRuntimeData runtimeData)` When valid the properties
`private java.lang.StringBuffer` | `renderXmlAdminSpaceValidServantResults(org.jasig.portal.ChannelStaticData staticData)` When we check the servant results
`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` | `renderXmlConfirmRootDocumentSetting(org.jasig.portal.ChannelRuntimeData runtimeData)` Generate the XML when we ask a root document setting confirmation
`private java.lang.StringBuffer` | `renderXmlSetNameForRename(org.jasig.portal.ChannelRuntimeData runtimeData)` Generate the XML String for this mod
`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` | `rootDocumentSetting(org.jasig.portal.ChannelRuntimeData runtimeData)` Generate the XML String and set the document as root
`private void` | `setClipboard(java.lang.String mode, org.jasig.portal.ChannelRuntimeData runtimeData)` Generate the XML String for this mod
`private void` | `setCurrentDirectoryProperties()` Set the properties of the currentDirectory
`private void` | `setCurrentDirectoryProperties(java.lang.String injacType)` Set the properties of the currentDirectory
`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
`private java.lang.StringBuffer` | `verifyChoiceForPublishMode(org.jasig.portal.ChannelRuntimeData runtimeData)` When we choose the mode for the publication, we verify the choice
`private java.lang.StringBuffer` | `verifyChoiceForSubmitMode(org.jasig.portal.ChannelRuntimeData runtimeData)` When we choose the mode for the submit, we verify the choice

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

### smp

    private InjacSpaceManagementProperties smp

  Object use to manage an injac space properties

### directoryProperties

    private DirectoryProperties directoryProperties

  Object used to know the properties of the current directory

### metadataToSet

    private java.util.ArrayList metadataToSet

  The metadata we have to set

### creatingNewSpace

    private boolean creatingNewSpace

  If we are creating a new Space

### creatingNewSpaceName

    private java.lang.String creatingNewSpaceName

  The name of the new space while creating

### userTypeForAdd

    private java.util.Vector userTypeForAdd

  The vector used to add people when we use a servant channel

### userTypeForAddName

    private java.lang.String userTypeForAddName

  The name of user type for add: reader_group, ... ?

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`

### setCurrentDirectoryProperties

    private void setCurrentDirectoryProperties()
                                        throws ServerException

  Set the properties of the currentDirectory

  Throws:
    `ServerException`

### setCurrentDirectoryProperties

    private void setCurrentDirectoryProperties(java.lang.String injacType)
                                        throws ServerException

  Set the properties of the currentDirectory

  Parameters:
    `injacType` - the type of the directory
  Throws:
    `ServerException`

### isUserManagerInSpace

    public static boolean isUserManagerInSpace(java.lang.String spacePath,
                                               Space currentSpace,
                                               java.lang.String userPortalLogin,
                                               java.util.Vector userGroups)
                                        throws ServerException

  Check if the current user is manager in the specified space

  Parameters:
    `spacePath` - the space access path
    `currentSpace` - the current space used
    `userPortalLogin` - the uportal access login
    `userGroups` - the groups of the user
  Returns:
    true if manager, false else
  Throws:
    `ServerException`

### isUserWriterInSpace

    public static boolean isUserWriterInSpace(java.lang.String spacePath,
                                              Space currentSpace,
                                              java.lang.String userPortalLogin,
                                              java.util.Vector userGroups)
                                       throws ServerException

  Check if the current user is writer in the specified space

  Parameters:
    `spacePath` - the space access path
    `currentSpace` - the current space used
    `userPortalLogin` - the uportal access login
    `userGroups` - the groups of the user
  Returns:
    true if writer, false else
  Throws:
    `ServerException`

### isUserEditorInSpace

    public static boolean isUserEditorInSpace(java.lang.String spacePath,
                                              Space currentSpace,
                                              java.lang.String userPortalLogin,
                                              java.util.Vector userGroups)
                                       throws ServerException

  Check if the current user is editor in the specified space

  Parameters:
    `spacePath` - the space access path
    `currentSpace` - the current space used
    `userPortalLogin` - the uportal access login
    `userGroups` - the groups of the user
  Returns:
    true if editor, false else
  Throws:
    `ServerException`

### isUserDocumentOwner

    public static boolean isUserDocumentOwner(java.lang.String documentPath,
                                              Space currentSpace,
                                              java.lang.String userPortalLogin)
                                       throws ServerException

  Check if the current user is the owner of the specified document

  Parameters:
    `documentPath` - the document access path
    `currentSpace` - the current space used
    `userPortalLogin` - the uportal access login
  Returns:
    true if author, false else
  Throws:
    `ServerException`

### 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)

  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

### 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:
    le XML pour ce mode
  Throws:
    `ChannelException`

### directoryBack

    protected void directoryBack()
                          throws ChannelException

  Go to the parent directory

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

### createDir

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

  Generate the XML String for this mod

  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 String for this mod
  Throws:
    `ChannelException`

### rename

    private void rename(org.jasig.portal.ChannelRuntimeData runtimeData)
                 throws ChannelException

  Generate the XML String for this mod

  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:
    le XML pour ce mode
  Throws:
    `ChannelException`

### delete

    private void delete(org.jasig.portal.ChannelRuntimeData runtimeData)
                 throws ChannelException

  Generate the XML String for this mod

  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

  Generate the XML String for this mod

  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`

### verifyChoiceForSubmitMode

    private java.lang.StringBuffer verifyChoiceForSubmitMode(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                      throws CancelException,
                                                             ChannelException

  When we choose the mode for the submit, we verify the choice

  Parameters:
    `runtimeData` - the ChannelRuntimeData object
  Throws:
    `CancelException`
    `ChannelException`

### verifyChoiceForPublishMode

    private java.lang.StringBuffer verifyChoiceForPublishMode(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                       throws CancelException,
                                                              ChannelException

  When we choose the mode for the publication, we verify the choice

  Parameters:
    `runtimeData` - the ChannelRuntimeData object
  Throws:
    `CancelException`
    `ChannelException`

### renderXmlAdminSpace

    private java.lang.StringBuffer renderXmlAdminSpace(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 space administration mode

  Parameters:
    `runtimeData` -
    `staticData` -
    `out` -
  Returns:
    XML for the space administration mode
  Throws:
    `org.jasig.portal.PortalException`
    `ChannelException`

### renderXmlAdminSpaceCancel

    private java.lang.StringBuffer renderXmlAdminSpaceCancel()
                                                      throws CancelException

  When click on cancel

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

### renderXmlAdminSpaceValid

    private java.lang.StringBuffer renderXmlAdminSpaceValid(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                     throws ChannelException

  When valid the properties

  Parameters:
    `runtimeData` -
  Returns:
    xml when we set the properties
  Throws:
    `ChannelException`

### adminSpaceChangeMetadataFile

    private void adminSpaceChangeMetadataFile(java.lang.String choice)
                                       throws PropertiesException

  When we change the metadata file

  Parameters:
    `choice` - the metadata file choice
  Throws:
    `PropertiesException`

### adminSpaceChangeRenderType

    private void adminSpaceChangeRenderType(java.lang.String choice)
                                     throws PropertiesException

  When we change the rendering type

  Parameters:
    `choice` - the rendering type choice
  Throws:
    `PropertiesException`

### adminSpaceAdd

    private boolean adminSpaceAdd(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 or 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:
    true is we clicked on add, else false
  Throws:
    `PropertiesException`
    `org.jasig.portal.PortalException`

### renderXmlAdminSpaceValidServantResults

    private java.lang.StringBuffer renderXmlAdminSpaceValidServantResults(org.jasig.portal.ChannelStaticData staticData)
                                                                   throws PropertiesException

  When we check the servant results

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

### adminSpaceDelete

    private void adminSpaceDelete(org.jasig.portal.ChannelRuntimeData runtimeData)
                           throws PropertiesException

  When we delete a user or a group

  Parameters:
    `runtimeData` - the runtime data object used in the channel
  Throws:
    `PropertiesException`

### renderXmlAdminSpaceGenerateXml

    private java.lang.StringBuffer renderXmlAdminSpaceGenerateXml()
                                                           throws PropertiesException

  Generate xml for the administration rendering

  Returns:
    the xml for the administration rendering
  Throws:
    `PropertiesException`

### createSpace

    private java.lang.StringBuffer createSpace(org.jasig.portal.ChannelRuntimeData runtimeData,
                                               org.jasig.portal.ChannelStaticData staticData,
                                               org.xml.sax.ContentHandler out)
                                        throws ChannelException,
                                               org.jasig.portal.PortalException

  Generate the xml for the creating space mod

  Parameters:
    `runtimeData` - the runtime data channel object
    `staticData` - the static data channel object
    `out` - the object used for the rendering
  Returns:
    the xml for the creating space mod
  Throws:
    `ChannelException`
    `org.jasig.portal.PortalException`

### renderXmlConfirmRootDocumentSetting

    private java.lang.StringBuffer renderXmlConfirmRootDocumentSetting(org.jasig.portal.ChannelRuntimeData runtimeData)
                                                                throws ChannelException

  Generate the XML when we ask a root document setting confirmation

  Parameters:
    `runtimeData` - the channel runtimedata object
  Returns:
    the XML String for this mod
  Throws:
    `ChannelException`

### rootDocumentSetting

    private void rootDocumentSetting(org.jasig.portal.ChannelRuntimeData runtimeData)
                              throws ChannelException

  Generate the XML String and set the document as root

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD