final String transformers = (String)((RegisteredResourceImpl)resource).getAttribute(ResourceTransformer.class.getName());
if ( id == null ||
(transformers != null && transformers.contains(":" + id + ':'))) {
continue;
}
final ResourceTransformer transformer = (ResourceTransformer) this.transformerTracker.getService(reference);
if ( transformer != null ) {
try {
final TransformationResult[] result = transformer.transform(resource);
final String newTransformers = (transformers == null ? ":" + id + ':' : transformers + id + ':');
((RegisteredResourceImpl)resource).setAttribute(ResourceTransformer.class.getName(), newTransformers);
if ( logger.isDebugEnabled() ) {
logger.debug("Invoked transformer {} on {} : {}",
new Object[] {transformer, resource, Arrays.toString(result)});