@Activate
protected final void activate(final Map<String, String> properties) throws Exception {
final String regex = PropertiesUtil.toString(properties.get(PROP_ASSET_RENDITION_PICKER_REGEX),
DEFAULT_ASSET_RENDITION_PICKER_REGEX);
try {
renditionPatternPicker = new RenditionPatternPicker(regex);
log.info("Asset Rendition Pattern Picker: {}", regex);
} catch (Exception ex) {
log.error("Error creating RenditionPatternPicker with regex [ {} ], defaulting to [ {} ]", regex,
DEFAULT_ASSET_RENDITION_PICKER_REGEX);
renditionPatternPicker = new RenditionPatternPicker(DEFAULT_ASSET_RENDITION_PICKER_REGEX);
}
}