public class ResourceCategoryDefinition extends Object
Constructor and Description |
---|
ResourceCategoryDefinition(String categoryName,
List<String> coreResources,
List<String> pluginResources)
Create a new category definition.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getCategoryName() |
List<String> |
getCoreResources()
Return a collection of resources which are delivered with the application and should be added
first when rendering the resources of this category.
|
List<String> |
getPluginResources()
Return the initial resources of this category that are provided by the plugin and should be
included after the coreResources when rendering the category's resources.
|
String |
getPropertyResourceFallback()
Return a fallback plugin resource to be used if
hasPropertyResource() returns true
but the PluginProperty does not exist. |
int |
hashCode() |
boolean |
hasPropertyResource()
Whether the category definition supports providing a resource with the help of a
PluginProperty.
|
void |
setPropertyResource(boolean propertyResource)
Set whether there can be a PluginProperty providing a resource
|
void |
setPropertyResourceFallback(String propertyResourceFallback)
Set a fallback plugin resource to be used if
hasPropertyResource() returns true but
the PluginProperty does not exist. |
public ResourceCategoryDefinition(String categoryName, List<String> coreResources, List<String> pluginResources)
categoryName
- the name of the category. This can be the name of an existing built-in category or
a new one.coreResources
- a collection of resources which are delivered with the application and should be
added first when rendering the resources of this category. Each entry of the
collection refers to the relative location of a resource under which it can be
downloaded. Can be null if the category needs no core resources.pluginResources
- the initial resources of this category that are provided by the plugin and should
be included after the coreResources when rendering the category's resources. The
resources are expected to be list of file paths relative to the 'static' directory
within the plugin resources directory. Can be null if the category needs no plugin
resources.public String getCategoryName()
public List<String> getCoreResources()
public List<String> getPluginResources()
public String getPropertyResourceFallback()
hasPropertyResource()
returns true
but the PluginProperty does not exist.public boolean hasPropertyResource()
public void setPropertyResource(boolean propertyResource)
propertyResource
- true if there can be a PluginPropertyhasPropertyResource()
public void setPropertyResourceFallback(String propertyResourceFallback)
hasPropertyResource()
returns true but
the PluginProperty does not exist.propertyResourceFallback
- a file path relative to the 'static' directory within the plugin resources
directoryCopyright © 2019 Communote team. All rights reserved.