org.alfresco.repo.bulkimport
Interface MetadataLoader

All Known Implementing Classes:
PropertiesFileMetadataLoader, XmlPropertiesFileMetadataLoader

public interface MetadataLoader

Definition of a metadata loader - a class that can load metadata for a file from some other source. Note that metadata loaders can be "chained", so an implementation needs to be careful about how the Metadata object is populated in the populateMetadata method. Implementors also need to be careful when configuring the bulk import process, as the order in which metadata loaders are configured into a bulk importer is the order of precendence (from lowest to highest).

Since:
4.0

Nested Class Summary
static class MetadataLoader.Metadata
          Class used to encapsulate the type, aspects and property values for a single file or folder.
 
Field Summary
static java.lang.String METADATA_SUFFIX
          Metadata filename suffix (excluding file-type specific ending)
 
Method Summary
 java.lang.String getMetadataFileExtension()
           
 void loadMetadata(ImportableItem.ContentAndMetadata contentAndMetadata, MetadataLoader.Metadata metadata)
          Method that populates the type, aspects and properties to attach to a given file or space.
 

Field Detail

METADATA_SUFFIX

static final java.lang.String METADATA_SUFFIX
Metadata filename suffix (excluding file-type specific ending)

See Also:
Constant Field Values
Method Detail

getMetadataFileExtension

java.lang.String getMetadataFileExtension()
Returns:
The extension for files used to store this metadata, minus the stop character (.) e.g. "properties", "xml", "json", etc.

loadMetadata

void loadMetadata(ImportableItem.ContentAndMetadata contentAndMetadata,
                  MetadataLoader.Metadata metadata)
Method that populates the type, aspects and properties to attach to a given file or space.

Parameters:
contentAndMetadata - The contentAndMetadata from which to obtain the metadata (will not be null).
metadata - The metadata object to populate (will not be null, and may already be partially populated).


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.