CStockage 4.2_beta-RC-1
API Documentation

org.esupportail.portal.channels.CStockage.channelAction.injac.metadata
Class MetaDataManager

java.lang.Object
  extended byorg.esupportail.portal.channels.CStockage.channelAction.injac.metadata.MetaDataManager

public class MetaDataManager
extends java.lang.Object

Id: MetaDataManager.java,v 1.0 30 sept. 2004 Copyright (c) 2004 Esup Portail (www.esup-portail.org) Classes: MetaDataManager Original Author: Yohan Colmant A tool metadata manager


Constructor Summary
MetaDataManager()
           
 
Method Summary
static java.lang.String getDirectoryType(Space currentSpace, java.lang.String path)
          Get the directory type (document, space, ... ?)
static java.lang.String getDocumentOwner(Space currentSpace, java.lang.String path)
          Get the owner of a document
static java.lang.String getDocumentState(Space currentSpace, java.lang.String path)
          Get the document state: published, refused, waiting, expired...
static java.lang.String getMetadataDescription(Space currentSpace, java.lang.String path)
          Return in the MD description
static void getMetadataEditorsOnSpace(Space currentSpace, java.lang.String path, java.util.Vector users, java.util.Vector groups)
          Return the MD : list of editors on the space
static void getMetadataManagersOnSpace(Space currentSpace, java.lang.String path, java.util.Vector users, java.util.Vector groups)
          Return the MD : list of managers on the space
static java.lang.String getMetadataRenderingType(Space currentSpace, java.lang.String path)
          Return the rendering type MD that the user have to set
static java.lang.String getMetadataSpaceProfile(Space currentSpace, java.lang.String path)
          Return the list of MD that the user have to set
static void getMetadataWritersOnSpace(Space currentSpace, java.lang.String path, java.util.Vector users, java.util.Vector groups)
          Return the MD : list of writers on the space
static java.util.Date getPublicationDateBegin(Space currentSpace, java.lang.String path)
          Get the publication date begin
static java.util.Date getPublicationDateEnd(Space currentSpace, java.lang.String path)
          Get the publication date end
static java.lang.String getRejectCause(Space currentSpace, java.lang.String path)
          Get the refuse message
static java.lang.String getSpaceRootDocumentName(Space currentSpace, java.lang.String path)
          Return the root document name of a space
static boolean setDirectoryAsPublishedDocument(Space currentSpace, java.lang.String path)
          Set the injac-type metadata of the directory specified by its path to "document" value, and document-state to "published"
static boolean setDirectoryAsRejectedDocument(Space currentSpace, java.lang.String path)
          Set the injac-type metadata of the directory specified by its path to "document" value, and document-state to "refused"
static boolean setDirectoryAsSpace(Space currentSpace, java.lang.String path)
          Set the injac-type metadata of the directory specified by its path to "space" value
static boolean setDirectoryAsWaitingDocument(Space currentSpace, java.lang.String path)
          Set the injac-type metadata of the directory specified by its path to "document" value, and document-state to "waiting"
static boolean setMetadataOnDocument(Space currentSpace, java.lang.String path, java.util.ArrayList metadataToSet)
          Set the metadata set by user on a document
static boolean setMetadataOnSpace(Space currentSpace, java.lang.String path, InjacSpaceManagementProperties smp)
          Set the metadata set by manager on a space
static boolean setPublicationDateBegin(Space currentSpace, java.lang.String path, java.lang.String date)
          Set the publication date begin
static boolean setPublicationDateEnd(Space currentSpace, java.lang.String path, java.lang.String date)
          Set the publication date end
static boolean setRejectCause(Space currentSpace, java.lang.String path, java.lang.String cause)
          Set the refuse message
static boolean setSpaceRootDocumentName(Space currentSpace, java.lang.String path, java.lang.String documentName)
          Set the root-file-name metadata of the directory specified by its path
static boolean setUserAsDocumentOwner(Space currentSpace, java.lang.String path, java.lang.String value)
          Set the owner of a document
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaDataManager

public MetaDataManager()
Method Detail

getDocumentOwner

public static java.lang.String getDocumentOwner(Space currentSpace,
                                                java.lang.String path)
                                         throws ServerException
Get the owner of a document

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
the type of the resource
Throws:
ServerException

setUserAsDocumentOwner

public static boolean setUserAsDocumentOwner(Space currentSpace,
                                             java.lang.String path,
                                             java.lang.String value)
                                      throws ServerException
Set the owner of a document

Parameters:
currentSpace - the current space used
path - the resource path
value - the MD value
Returns:
true if well done, else false
Throws:
ServerException

getDirectoryType

public static java.lang.String getDirectoryType(Space currentSpace,
                                                java.lang.String path)
                                         throws ServerException
Get the directory type (document, space, ... ?)

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
the type of the resource
Throws:
ServerException

getPublicationDateBegin

public static java.util.Date getPublicationDateBegin(Space currentSpace,
                                                     java.lang.String path)
                                              throws ServerException
Get the publication date begin

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
the date, null if no date
Throws:
ServerException

getPublicationDateEnd

public static java.util.Date getPublicationDateEnd(Space currentSpace,
                                                   java.lang.String path)
                                            throws ServerException
Get the publication date end

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
the date, null if no date
Throws:
ServerException

setPublicationDateBegin

public static boolean setPublicationDateBegin(Space currentSpace,
                                              java.lang.String path,
                                              java.lang.String date)
                                       throws ServerException
Set the publication date begin

Parameters:
currentSpace - the current space used
path - the resource path
date - the date value
Returns:
true if well done
Throws:
ServerException

setPublicationDateEnd

public static boolean setPublicationDateEnd(Space currentSpace,
                                            java.lang.String path,
                                            java.lang.String date)
                                     throws ServerException
Set the publication date end

Parameters:
currentSpace - the current space used
path - the resource path
date - the date value
Returns:
true if well done
Throws:
ServerException

getRejectCause

public static java.lang.String getRejectCause(Space currentSpace,
                                              java.lang.String path)
                                       throws ServerException
Get the refuse message

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
the type of the resource
Throws:
ServerException

setRejectCause

public static boolean setRejectCause(Space currentSpace,
                                     java.lang.String path,
                                     java.lang.String cause)
                              throws ServerException
Set the refuse message

Parameters:
currentSpace - the current space used
path - the resource path
cause - the metadata value
Returns:
true if well done
Throws:
ServerException

getDocumentState

public static java.lang.String getDocumentState(Space currentSpace,
                                                java.lang.String path)
                                         throws ServerException
Get the document state: published, refused, waiting, expired...

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
the type of the resource
Throws:
ServerException

setDirectoryAsSpace

public static boolean setDirectoryAsSpace(Space currentSpace,
                                          java.lang.String path)
                                   throws ServerException
Set the injac-type metadata of the directory specified by its path to "space" value

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
true if well done
Throws:
ServerException

setDirectoryAsWaitingDocument

public static boolean setDirectoryAsWaitingDocument(Space currentSpace,
                                                    java.lang.String path)
                                             throws ServerException
Set the injac-type metadata of the directory specified by its path to "document" value, and document-state to "waiting"

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
true if well done
Throws:
ServerException

setDirectoryAsPublishedDocument

public static boolean setDirectoryAsPublishedDocument(Space currentSpace,
                                                      java.lang.String path)
                                               throws ServerException
Set the injac-type metadata of the directory specified by its path to "document" value, and document-state to "published"

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
true if well done
Throws:
ServerException

setDirectoryAsRejectedDocument

public static boolean setDirectoryAsRejectedDocument(Space currentSpace,
                                                     java.lang.String path)
                                              throws ServerException
Set the injac-type metadata of the directory specified by its path to "document" value, and document-state to "refused"

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
true if well done
Throws:
ServerException

setMetadataOnSpace

public static boolean setMetadataOnSpace(Space currentSpace,
                                         java.lang.String path,
                                         InjacSpaceManagementProperties smp)
                                  throws ServerException,
                                         ApplicationException,
                                         PropertiesException
Set the metadata set by manager on a space

Parameters:
currentSpace - the current space used
path - the resource path
smp - object containing all properties
Returns:
true if well done, else false
Throws:
ServerException
ApplicationException
PropertiesException

setMetadataOnDocument

public static boolean setMetadataOnDocument(Space currentSpace,
                                            java.lang.String path,
                                            java.util.ArrayList metadataToSet)
                                     throws ServerException
Set the metadata set by user on a document

Parameters:
currentSpace - the current space used
path - the resource path
metadataToSet - object containing all properties
Returns:
true if well done, else false
Throws:
ServerException

getMetadataDescription

public static java.lang.String getMetadataDescription(Space currentSpace,
                                                      java.lang.String path)
                                               throws ServerException
Return in the MD description

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
the MD description
Throws:
ServerException

getMetadataSpaceProfile

public static java.lang.String getMetadataSpaceProfile(Space currentSpace,
                                                       java.lang.String path)
                                                throws ServerException
Return the list of MD that the user have to set

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
the list of MD that the user have to set
Throws:
ServerException

getMetadataRenderingType

public static java.lang.String getMetadataRenderingType(Space currentSpace,
                                                        java.lang.String path)
                                                 throws ServerException
Return the rendering type MD that the user have to set

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
the rendering type MD that the user have to set
Throws:
ServerException

getMetadataWritersOnSpace

public static void getMetadataWritersOnSpace(Space currentSpace,
                                             java.lang.String path,
                                             java.util.Vector users,
                                             java.util.Vector groups)
                                      throws ServerException
Return the MD : list of writers on the space

Parameters:
currentSpace - the current space used
path - the resource path
users - the users list to set
groups - the groups list to set
Throws:
ServerException

getMetadataEditorsOnSpace

public static void getMetadataEditorsOnSpace(Space currentSpace,
                                             java.lang.String path,
                                             java.util.Vector users,
                                             java.util.Vector groups)
                                      throws ServerException
Return the MD : list of editors on the space

Parameters:
currentSpace - the current space used
path - the resource path
users - the users list to set
groups - the groups list to set
Throws:
ServerException

getMetadataManagersOnSpace

public static void getMetadataManagersOnSpace(Space currentSpace,
                                              java.lang.String path,
                                              java.util.Vector users,
                                              java.util.Vector groups)
                                       throws ServerException
Return the MD : list of managers on the space

Parameters:
currentSpace - the current space used
path - the resource path
users - the users list to set
groups - the groups list to set
Throws:
ServerException

setSpaceRootDocumentName

public static boolean setSpaceRootDocumentName(Space currentSpace,
                                               java.lang.String path,
                                               java.lang.String documentName)
                                        throws ServerException
Set the root-file-name metadata of the directory specified by its path

Parameters:
currentSpace - the current space used
path - the resource path
documentName - the name of the root document file
Returns:
true if well done
Throws:
ServerException

getSpaceRootDocumentName

public static java.lang.String getSpaceRootDocumentName(Space currentSpace,
                                                        java.lang.String path)
                                                 throws ServerException
Return the root document name of a space

Parameters:
currentSpace - the current space used
path - the resource path
Returns:
the root document name of a space
Throws:
ServerException

CStockage 4.2_beta-RC-1
API Documentation