org.dspace.app.xmlui.aspect.administrative
Class FlowRegistryUtils

java.lang.Object
  extended by org.dspace.app.xmlui.aspect.administrative.FlowRegistryUtils

public class FlowRegistryUtils
extends Object


Constructor Summary
FlowRegistryUtils()
           
 
Method Summary
static FlowResult processAddMetadataField(Context context, int schemaID, String element, String qualifier, String note)
          Add a new metadata field.
static FlowResult processAddMetadataSchema(Context context, String namespace, String name)
          Add a new metadata schema.
static FlowResult processDeleteBitstreamFormats(Context context, String[] formatIDs)
          Delete the specified bitstream formats.
static FlowResult processDeleteMetadataField(Context context, String[] fieldIDs)
          Delete the specified metadata fields.
static FlowResult processDeleteMetadataSchemas(Context context, String[] schemaIDs)
          Delete the given schemas.
static FlowResult processEditBitstreamFormat(Context context, int formatID, org.apache.cocoon.environment.Request request)
          Edit a bitstream format.
static FlowResult processEditMetadataField(Context context, int schemaID, int fieldID, String element, String qualifier, String note)
          Edit a metadata field.
static FlowResult processMoveMetadataField(Context context, int schemaID, String[] fieldIDs)
          Move the specified metadata fields to the target schema.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowRegistryUtils

public FlowRegistryUtils()
Method Detail

processAddMetadataSchema

public static FlowResult processAddMetadataSchema(Context context,
                                                  String namespace,
                                                  String name)
                                           throws SQLException,
                                                  AuthorizeException,
                                                  NonUniqueMetadataException,
                                                  UIException
Add a new metadata schema. The ID of the new schema will be added as the "schemaID" parameter on the results object.

Parameters:
context - The DSpace context
namespace - The new schema's namespace
name - The new schema's name.
Returns:
A flow result
Throws:
SQLException
AuthorizeException
NonUniqueMetadataException
UIException

processDeleteMetadataSchemas

public static FlowResult processDeleteMetadataSchemas(Context context,
                                                      String[] schemaIDs)
                                               throws SQLException,
                                                      AuthorizeException,
                                                      NonUniqueMetadataException
Delete the given schemas.

Parameters:
context - The DSpace context
schemaIDs - A list of schema IDs to be deleted.
Returns:
A flow result
Throws:
SQLException
AuthorizeException
NonUniqueMetadataException

processAddMetadataField

public static FlowResult processAddMetadataField(Context context,
                                                 int schemaID,
                                                 String element,
                                                 String qualifier,
                                                 String note)
                                          throws IOException,
                                                 AuthorizeException,
                                                 SQLException,
                                                 UIException
Add a new metadata field. The newly created field's ID will be added as the "fieldID" parameter on the results object.

Parameters:
context - The DSpace context
schemaID - The id of the schema where this new field should be added.
element - The field's element.
qualifier - The field's qualifier.
note - A scope not about the field.
Returns:
A results object
Throws:
IOException
AuthorizeException
SQLException
UIException

processEditMetadataField

public static FlowResult processEditMetadataField(Context context,
                                                  int schemaID,
                                                  int fieldID,
                                                  String element,
                                                  String qualifier,
                                                  String note)
                                           throws IOException,
                                                  AuthorizeException,
                                                  SQLException,
                                                  UIException
Edit a metadata field.

Parameters:
context - The DSpace context.
schemaID - The ID of the schema for this field.
fieldID - The id of this field.
element - A new element value
qualifier - A new qualifier value
note - A new note value.
Returns:
A results object.
Throws:
IOException
AuthorizeException
SQLException
UIException

processMoveMetadataField

public static FlowResult processMoveMetadataField(Context context,
                                                  int schemaID,
                                                  String[] fieldIDs)
                                           throws NumberFormatException,
                                                  SQLException,
                                                  AuthorizeException,
                                                  NonUniqueMetadataException,
                                                  IOException
Move the specified metadata fields to the target schema.

Parameters:
context - The DSpace context
schemaID - The target schema ID
fieldIDs - The fields to be moved.
Returns:
A results object.
Throws:
NumberFormatException
SQLException
AuthorizeException
NonUniqueMetadataException
IOException

processDeleteMetadataField

public static FlowResult processDeleteMetadataField(Context context,
                                                    String[] fieldIDs)
                                             throws NumberFormatException,
                                                    SQLException,
                                                    AuthorizeException
Delete the specified metadata fields.

Parameters:
context - The DSpace context
fieldIDs - The fields to be deleted.
Returns:
A results object
Throws:
NumberFormatException
SQLException
AuthorizeException

processEditBitstreamFormat

public static FlowResult processEditBitstreamFormat(Context context,
                                                    int formatID,
                                                    org.apache.cocoon.environment.Request request)
                                             throws SQLException,
                                                    AuthorizeException
Edit a bitstream format. If the formatID is -1 then a new format is created. The formatID of the new format is added as a parameter to the results object. FIXME: the reason we accept a request object is so that we can use the RequestUtils.getFieldvalues() to get the multivalue field values.

Parameters:
context - The dspace context
formatID - The id of the format being updated.
request - The request object, for all the field entries.
Returns:
A results object
Throws:
SQLException
AuthorizeException

processDeleteBitstreamFormats

public static FlowResult processDeleteBitstreamFormats(Context context,
                                                       String[] formatIDs)
                                                throws NumberFormatException,
                                                       SQLException,
                                                       AuthorizeException
Delete the specified bitstream formats.

Parameters:
context - The DSpace context
formatIDs - The formats-to-be-deleted.
Returns:
A results object.
Throws:
NumberFormatException
SQLException
AuthorizeException


Copyright © 2012 DuraSpace. All Rights Reserved.