if (application.getResourceReferenceRegistry().getResourceReference(
Application.class, imageReferenceName, locale, style, variation, true, false) == null)
{
// Resource not available yet, so create it with factory and
// share via Application
final IResource imageResource = getResourceFactory(application, factoryName).newResource(
specification, locale, style, variation);
ResourceReference ref = new SimpleStaticResourceReference(Application.class,
imageReferenceName, locale, style, variation, imageResource);