public class SharedResourceReference extends ResourceReference
ResourceReference which should be used to lookup a IResource from the globally
registered ones (also known as application shared resources). If there is no shared resource with
such key then it checks whether there is a PackageResource with this
key and registers it automatically if it exists.
Note: Cannot be registered in ResourceReferenceRegistry because
SharedResourceReference is just a shortcut to the resource of another
ResourceReference
ResourceReference.Key, ResourceReference.UrlAttributes| Constructor and Description |
|---|
SharedResourceReference(Class<?> scope,
String name)
Construct.
|
SharedResourceReference(Class<?> scope,
String name,
Locale locale,
String style,
String variation)
Construct.
|
SharedResourceReference(String name)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeRegistered()
Can be used to disable registering certain resource references in
ResourceReferenceRegistry. |
IResource |
getResource()
Returns the resource.
|
equals, getDependencies, getExtension, getKey, getLocale, getName, getScope, getStyle, getUrlAttributes, getVariation, hashCode, toStringpublic SharedResourceReference(Class<?> scope, String name, Locale locale, String style, String variation)
scope - Scope of resourcename - Logical name of resourcelocale - The locale of the resourcestyle - The resource style (see Session)variation - The component specific variation of the stylepublic SharedResourceReference(Class<?> scope, String name)
scope - Scope of resourcename - Logical name of resourcepublic SharedResourceReference(String name)
name - resource namepublic IResource getResource()
ResourceReferencegetResource in class ResourceReferencepublic boolean canBeRegistered()
ResourceReferenceResourceReferenceRegistry.canBeRegistered in class ResourceReferencetrue if this reference can be registered, false otherwise.Copyright © 2006–2014 Apache Software Foundation. All rights reserved.