private static final String TEST_METADATA_VALUE = "test-metadata";
protected static Map<String, MetadataFacetFactory> createTestMetadataFacetFactories()
{
Map<String, MetadataFacetFactory> factories = new HashMap<String, MetadataFacetFactory>();
factories.put( TEST_FACET_ID, new MetadataFacetFactory()
{
public MetadataFacet createMetadataFacet()
{
return new TestMetadataFacet( TEST_METADATA_VALUE );
}
public MetadataFacet createMetadataFacet( String repositoryId, String name )
{
return new TestMetadataFacet( TEST_METADATA_VALUE );
}
} );
// add to ensure we don't accidentally create an empty facet ID.
factories.put( "", new MetadataFacetFactory()
{
public MetadataFacet createMetadataFacet()
{
return new TestMetadataFacet( "", TEST_VALUE );
}