Skip to content

Instantly share code, notes, and snippets.

@antonio
Created February 23, 2011 10:35
Show Gist options
  • Save antonio/840260 to your computer and use it in GitHub Desktop.
Save antonio/840260 to your computer and use it in GitHub Desktop.
OpenCms Collection Metadata Basic implementation
import java.util.Properties;
import es.juntadeandalucia.icms.data.AbstractCollectionMetadata;
import es.juntadeandalucia.icms.exceptions.ICMSException;
import groovy.util.ConfigObject;
public class OpenCmsCollectionMetadata extends AbstractCollectionMetadata<OpenCmsResourceMetadataCollection, OpenCmsResourceMetadata> {
final static String STRUCTURED_CONTENT_CONFIG_STRING = "structured_content_type";
public OpenCmsCollectionMetadata(final String providerId, final String id, final ConfigObject config) throws ICMSException {
super(providerId, id, config);
}
public OpenCmsCollectionMetadata(final String providerId, final String id, final Properties properties) throws ICMSException {
super(providerId, id, properties);
}
protected OpenCmsResourceMetadataCollection createResourceMetadataCollection() {
return new OpenCmsResourceMetadataCollection();
}
protected OpenCmsResourceMetadata createResourceMetadata(final String resourceMetadataName, final ConfigObject config) {
return new OpenCmsResourceMetadata(resourceMetadataName, config);
}
public String getStructuredContentType() {
return config.get(STRUCTURED_CONTENT_CONFIG_STRING);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment