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

java.lang.Object
  extended byorg.esupportail.portal.channels.CStockage.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_DOC_FROM_CLIPBOARD
          If we are editing a document form the clipboard
static java.lang.String EDIT_DOC_FROM_UPLOAD
          If we are editing a document form the upload
static java.lang.String EDIT_OLD_DOC
          If we are re-editing an existing document
protected static Log log
          Logger object
static java.lang.String PUBLISH_DOC_FROM_CLIPBOARD
          If we are publishing a document form the clipboard
static java.lang.String PUBLISH_DOC_FROM_UPLOAD
          If we are publishing a document form the upload
static java.lang.String PUBLISH_EDITED_DOC
          If we are publishing a document wich have still been edited before
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, java.util.ArrayList spaces, java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, java.util.Vector userGroups, Space currentSpace, DirectoryProperties directoryProperties, java.lang.String documentFullPath, java.lang.String currentSortType)
          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.Object[] getInputStream(org.jasig.portal.ChannelRuntimeData runtimeData, Space currentSpace)
          Start the upload
private static java.lang.StringBuffer publishDocument(java.lang.StringBuffer stylesheet, java.util.ArrayList spaces, java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, java.util.Vector userGroups, Space currentSpace, DirectoryProperties directoryProperties, java.lang.String documentFullPath, java.lang.String currentSortType)
          Publish the document and return the xml for the next action
private static java.lang.StringBuffer rejectDocument(java.lang.StringBuffer stylesheet, java.util.ArrayList spaces, java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, java.util.Vector userGroups, Space currentSpace, DirectoryProperties directoryProperties, java.lang.String documentFullPath, java.lang.String currentSortType)
          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, java.util.ArrayList spaces, java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, java.util.Vector userGroups, Space currentSpace, DirectoryProperties directoryProperties, BufferAction buffer, java.lang.String currentSortType)
          Generate the xml for the metadata management
private static java.lang.StringBuffer setMetadataOnDocument(java.lang.StringBuffer stylesheet, java.util.ArrayList spaces, java.util.ArrayList metadataToSet, java.lang.String userPortalLogin, java.util.Vector userGroups, Space currentSpace, DirectoryProperties directoryProperties, java.lang.String documentFullPath, java.lang.String currentSortType)
          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, BufferAction buffer)
          Set the metadata list we want to set
private static java.lang.StringBuffer submitMetadataManager(org.jasig.portal.ChannelRuntimeData runtimeData, java.lang.StringBuffer stylesheet, 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, java.lang.String currentSortType)
          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 Log log
Logger object


EDIT_DOC_FROM_CLIPBOARD

public static final java.lang.String EDIT_DOC_FROM_CLIPBOARD
If we are editing a document form the clipboard

See Also:
Constant Field Values

EDIT_DOC_FROM_UPLOAD

public static final java.lang.String EDIT_DOC_FROM_UPLOAD
If we are editing a document form the upload

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_DOC_FROM_CLIPBOARD

public static final java.lang.String PUBLISH_DOC_FROM_CLIPBOARD
If we are publishing a document form the clipboard

See Also:
Constant Field Values

PUBLISH_DOC_FROM_UPLOAD

public static final java.lang.String PUBLISH_DOC_FROM_UPLOAD
If we are publishing a document form the upload

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

getInputStream

private static java.lang.Object[] getInputStream(org.jasig.portal.ChannelRuntimeData runtimeData,
                                                 Space currentSpace)
                                          throws ChannelException
Start the upload

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

renderXmlMetadataManager

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

Parameters:
runtimeData - the channel runtime data
stylesheet - the stylesheet used
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
currentSortType - The current and default sort type for the resources
Returns:
the xml generation
Throws:
ChannelException

submitMetadataManager

private static java.lang.StringBuffer submitMetadataManager(org.jasig.portal.ChannelRuntimeData runtimeData,
                                                            java.lang.StringBuffer stylesheet,
                                                            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,
                                                            java.lang.String currentSortType)
                                                     throws ChannelException
Generate the xml and submit the metadata

Parameters:
runtimeData - the channel runtime data
stylesheet - the stylesheet used
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
currentSortType - The current and default sort type for the resources
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,
                                     BufferAction buffer)
                              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,
                                                            java.util.ArrayList spaces,
                                                            java.util.ArrayList metadataToSet,
                                                            java.lang.String userPortalLogin,
                                                            java.util.Vector userGroups,
                                                            Space currentSpace,
                                                            DirectoryProperties directoryProperties,
                                                            java.lang.String documentFullPath,
                                                            java.lang.String currentSortType)
                                                     throws ServerException,
                                                            MetadataException
Set the metadata on document and return the xml for the next action

Parameters:
stylesheet - the stylesheet used
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
currentSortType - The current and default sort type for the resources
Returns:
the xml generation
Throws:
ServerException
MetadataException

editDocument

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

Parameters:
stylesheet - the stylesheet used
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
currentSortType - The current and default sort type for the resources
Returns:
the xml generation
Throws:
ServerException
MetadataException

publishDocument

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

Parameters:
stylesheet - the stylesheet used
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
currentSortType - The current and default sort type for the resources
Returns:
the xml generation
Throws:
ServerException
MetadataException

rejectDocument

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

Parameters:
stylesheet - the stylesheet used
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
currentSortType - The current and default sort type for the resources
Returns:
the xml generation
Throws:
ServerException
MetadataException