org.esupportail.portal.channels.CWebdav.channelAction.injac.actions
Class MetadataManagerAction

java.lang.Object
  extended byorg.esupportail.portal.channels.CWebdav.channelAction.injac.actions.MetadataManagerAction

public class MetadataManagerAction
extends java.lang.Object

Id: MetadataManagerAction.java,v 1.0 27 oct. 2004 Copyright (c) 2004 Esup Portail (www.esup-portail.org) Classes: MetadataManagerAction Original Author: Yohan Colmant Actions of the metadata management


Field Summary
static java.lang.String EDIT_NEW_DOC
          If we are editing a new document
static java.lang.String EDIT_OLD_DOC
          If we are re-editing an existing document
protected static org.apache.commons.logging.Log log
          Logger object
static java.lang.String PUBLISH_EDITED_DOC
          If we are publishing a document wich have still been edited before
static java.lang.String PUBLISH_PERSONNAL_DOC
          If we are publishing a new document from another space
static java.lang.String REJECT_DOC
          If we are rejecting a document wich have still been edited before
static java.lang.String SET_METADATA
          If we are only setting metadata
 
Constructor Summary
MetadataManagerAction()
           
 
Method Summary
private static java.lang.StringBuffer editDocument(java.lang.StringBuffer stylesheet, ChannelConfiguration config, java.util.ArrayList spaces, java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, java.util.Vector userGroups, Space currentSpace, DirectoryProperties directoryProperties, java.lang.String documentFullPath)
          Edit the document and return the xml for the next action
private static java.lang.StringBuffer generateXmlForMetadataSettings(java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, Space currentSpace, java.lang.String documentName, java.lang.String documentPath, java.lang.String actionType)
          Generate the xml for the metadata setting
private static java.lang.StringBuffer publishDocument(java.lang.StringBuffer stylesheet, ChannelConfiguration config, java.util.ArrayList spaces, java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, java.util.Vector userGroups, Space currentSpace, DirectoryProperties directoryProperties, java.lang.String documentFullPath)
          Publish the document and return the xml for the next action
private static java.lang.StringBuffer rejectDocument(java.lang.StringBuffer stylesheet, ChannelConfiguration config, java.util.ArrayList spaces, java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, java.util.Vector userGroups, Space currentSpace, DirectoryProperties directoryProperties, java.lang.String documentFullPath)
          Reject the document and return the xml for the next action
static java.lang.StringBuffer renderXmlMetadataManager(org.jasig.portal.ChannelRuntimeData runtimeData, java.lang.StringBuffer stylesheet, ChannelConfiguration config, java.util.ArrayList spaces, java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, java.util.Vector userGroups, Space currentSpace, DirectoryProperties directoryProperties, BufferAction buffer)
          Generate the xml for the metadata management
private static java.lang.StringBuffer setMetadataOnDocument(java.lang.StringBuffer stylesheet, ChannelConfiguration config, java.util.ArrayList spaces, java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, java.util.Vector userGroups, Space currentSpace, DirectoryProperties directoryProperties, java.lang.String documentFullPath)
          Set the metadata on document and return the xml for the next action
private static void setMetadataToSet(org.jasig.portal.ChannelRuntimeData runtimeData, java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, Space currentSpace, DirectoryProperties directoryProperties, java.lang.String documentName, java.lang.String documentPath, java.lang.String actionType)
          Set the metadata list we want to set
private static java.lang.StringBuffer submitMetadataManager(org.jasig.portal.ChannelRuntimeData runtimeData, java.lang.StringBuffer stylesheet, ChannelConfiguration config, java.util.ArrayList spaces, java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, java.util.Vector userGroups, Space currentSpace, DirectoryProperties directoryProperties, java.lang.String documentName, java.lang.String documentPath, java.lang.String actionType, BufferAction buffer)
          Generate the xml and submit the metadata
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
Logger object


EDIT_NEW_DOC

public static final java.lang.String EDIT_NEW_DOC
If we are editing a new document

See Also:
Constant Field Values

EDIT_OLD_DOC

public static final java.lang.String EDIT_OLD_DOC
If we are re-editing an existing document

See Also:
Constant Field Values

SET_METADATA

public static final java.lang.String SET_METADATA
If we are only setting metadata

See Also:
Constant Field Values

PUBLISH_PERSONNAL_DOC

public static final java.lang.String PUBLISH_PERSONNAL_DOC
If we are publishing a new document from another space

See Also:
Constant Field Values

PUBLISH_EDITED_DOC

public static final java.lang.String PUBLISH_EDITED_DOC
If we are publishing a document wich have still been edited before

See Also:
Constant Field Values

REJECT_DOC

public static final java.lang.String REJECT_DOC
If we are rejecting a document wich have still been edited before

See Also:
Constant Field Values
Constructor Detail

MetadataManagerAction

public MetadataManagerAction()
Method Detail

renderXmlMetadataManager

public static java.lang.StringBuffer renderXmlMetadataManager(org.jasig.portal.ChannelRuntimeData runtimeData,
                                                              java.lang.StringBuffer stylesheet,
                                                              ChannelConfiguration config,
                                                              java.util.ArrayList spaces,
                                                              java.util.ArrayList metadataToSet,
                                                              java.lang.String userPortalLogin,
                                                              java.util.Vector userGroups,
                                                              Space currentSpace,
                                                              DirectoryProperties directoryProperties,
                                                              BufferAction buffer)
                                                       throws ChannelException
Generate the xml for the metadata management

Parameters:
runtimeData - the channel runtime data
stylesheet - the stylesheet used
config - the channel configuration file access object
spaces - the spaces list
metadataToSet - the metadata list to set
userPortalLogin - the user portal login
userGroups - the user portal groups
currentSpace - the current space
directoryProperties - the current directory properties
buffer - the buffer used for the clipboard
Returns:
the xml generation
Throws:
ChannelException

submitMetadataManager

private static java.lang.StringBuffer submitMetadataManager(org.jasig.portal.ChannelRuntimeData runtimeData,
                                                            java.lang.StringBuffer stylesheet,
                                                            ChannelConfiguration config,
                                                            java.util.ArrayList spaces,
                                                            java.util.ArrayList metadataToSet,
                                                            java.lang.String userPortalLogin,
                                                            java.util.Vector userGroups,
                                                            Space currentSpace,
                                                            DirectoryProperties directoryProperties,
                                                            java.lang.String documentName,
                                                            java.lang.String documentPath,
                                                            java.lang.String actionType,
                                                            BufferAction buffer)
                                                     throws ChannelException
Generate the xml and submit the metadata

Parameters:
runtimeData - the channel runtime data
stylesheet - the stylesheet used
config - the channel configuration file access object
spaces - the spaces list
metadataToSet - the metadata list to set
userPortalLogin - the user portal login
userGroups - the user portal groups
currentSpace - the current space
directoryProperties - the current directory properties
documentName - the name of the document we want to set metadata
documentPath - the path of the document we want to set metadata
actionType - the action type. For example EDIT_NEW_DOC, ....
buffer - the buffer used for the clipboard
Returns:
the xml generation
Throws:
ChannelException

setMetadataToSet

private static void setMetadataToSet(org.jasig.portal.ChannelRuntimeData runtimeData,
                                     java.util.ArrayList metadataToSet,
                                     java.lang.String userPortalLogin,
                                     Space currentSpace,
                                     DirectoryProperties directoryProperties,
                                     java.lang.String documentName,
                                     java.lang.String documentPath,
                                     java.lang.String actionType)
                              throws ChannelException
Set the metadata list we want to set

Parameters:
runtimeData - the channel runtime data
metadataToSet - the metadata list to set
userPortalLogin - the user portal login
currentSpace - the current space
directoryProperties - the current directory properties
documentName - the name of the document we want to set metadata
documentPath - the path of the document we want to set metadata
actionType - the action type. For example EDIT_NEW_DOC, ....
Throws:
ChannelException

generateXmlForMetadataSettings

private static java.lang.StringBuffer generateXmlForMetadataSettings(java.util.ArrayList metadataToSet,
                                                                     java.lang.String userPortalLogin,
                                                                     Space currentSpace,
                                                                     java.lang.String documentName,
                                                                     java.lang.String documentPath,
                                                                     java.lang.String actionType)
Generate the xml for the metadata setting

Parameters:
metadataToSet - the metadata list to set
userPortalLogin - the user portal login
currentSpace - the current space
documentName - the name of the document we want to set metadata
documentPath - the path of the document we want to set metadata
actionType - the action type. For example EDIT_NEW_DOC, ....
Returns:
the xml generation

setMetadataOnDocument

private static java.lang.StringBuffer setMetadataOnDocument(java.lang.StringBuffer stylesheet,
                                                            ChannelConfiguration config,
                                                            java.util.ArrayList spaces,
                                                            java.util.ArrayList metadataToSet,
                                                            java.lang.String userPortalLogin,
                                                            java.util.Vector userGroups,
                                                            Space currentSpace,
                                                            DirectoryProperties directoryProperties,
                                                            java.lang.String documentFullPath)
                                                     throws ServerException,
                                                            MetadataException
Set the metadata on document and return the xml for the next action

Parameters:
stylesheet - the stylesheet used
config - the channel configuration file access object
spaces - the spaces list
metadataToSet - the metadata list to set
userPortalLogin - the user portal login
userGroups - the user portal groups
currentSpace - the current space
directoryProperties - the current directory properties
documentFullPath - the full path of the document we want to set metadata
Returns:
the xml generation
Throws:
ServerException
MetadataException

editDocument

private static java.lang.StringBuffer editDocument(java.lang.StringBuffer stylesheet,
                                                   ChannelConfiguration config,
                                                   java.util.ArrayList spaces,
                                                   java.util.ArrayList metadataToSet,
                                                   java.lang.String userPortalLogin,
                                                   java.util.Vector userGroups,
                                                   Space currentSpace,
                                                   DirectoryProperties directoryProperties,
                                                   java.lang.String documentFullPath)
                                            throws ServerException,
                                                   MetadataException
Edit the document and return the xml for the next action

Parameters:
stylesheet - the stylesheet used
config - the channel configuration file access object
spaces - the spaces list
metadataToSet - the metadata list to set
userPortalLogin - the user portal login
userGroups - the user portal groups
currentSpace - the current space
directoryProperties - the current directory properties
documentFullPath - the full path of the document we want to set metadata
Returns:
the xml generation
Throws:
ServerException
MetadataException

publishDocument

private static java.lang.StringBuffer publishDocument(java.lang.StringBuffer stylesheet,
                                                      ChannelConfiguration config,
                                                      java.util.ArrayList spaces,
                                                      java.util.ArrayList metadataToSet,
                                                      java.lang.String userPortalLogin,
                                                      java.util.Vector userGroups,
                                                      Space currentSpace,
                                                      DirectoryProperties directoryProperties,
                                                      java.lang.String documentFullPath)
                                               throws ServerException,
                                                      MetadataException
Publish the document and return the xml for the next action

Parameters:
stylesheet - the stylesheet used
config - the channel configuration file access object
spaces - the spaces list
metadataToSet - the metadata list to set
userPortalLogin - the user portal login
userGroups - the user portal groups
currentSpace - the current space
directoryProperties - the current directory properties
documentFullPath - the full path of the document we want to set metadata
Returns:
the xml generation
Throws:
ServerException
MetadataException

rejectDocument

private static java.lang.StringBuffer rejectDocument(java.lang.StringBuffer stylesheet,
                                                     ChannelConfiguration config,
                                                     java.util.ArrayList spaces,
                                                     java.util.ArrayList metadataToSet,
                                                     java.lang.String userPortalLogin,
                                                     java.util.Vector userGroups,
                                                     Space currentSpace,
                                                     DirectoryProperties directoryProperties,
                                                     java.lang.String documentFullPath)
                                              throws ServerException,
                                                     MetadataException
Reject the document and return the xml for the next action

Parameters:
stylesheet - the stylesheet used
config - the channel configuration file access object
spaces - the spaces list
metadataToSet - the metadata list to set
userPortalLogin - the user portal login
userGroups - the user portal groups
currentSpace - the current space
directoryProperties - the current directory properties
documentFullPath - the full path of the document we want to set metadata
Returns:
the xml generation
Throws:
ServerException
MetadataException