public abstract class AbstractCockpitPlugin extends Object implements CockpitPlugin
CockpitPlugin
that comes with reasonable defaults.CockpitPlugin
Constructor and Description |
---|
AbstractCockpitPlugin() |
Modifier and Type | Method and Description |
---|---|
String |
getAssetDirectory()
Returns a uri to a plugins asset directory.
|
List<String> |
getMappingFiles()
Returns a list of mapping files that define the custom queries
provided by this plugin.
|
Set<Class<?>> |
getResourceClasses()
Returns a set of JAX-RS resource classes that extend the cockpit rest API.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId
public String getAssetDirectory()
This implementation assumes that the assets are provided in the directory assets
,
relative to the location of the CockpitPlugin
SPI implementation class.
getAssetDirectory
in interface CockpitPlugin
public Set<Class<?>> getResourceClasses()
CockpitPlugin
Typically, a plugin publishes its API via a subclass of AbstractPluginRootResource
.
getResourceClasses
in interface CockpitPlugin
public List<String> getMappingFiles()
CockpitPlugin
The mapping files define additional MyBatis queries that can be executed by the plugin.
Inside the plugin the queries may be executed via the QueryService
that may be obtained through
Cockpit.getQueryService(java.lang.String)
.
getMappingFiles
in interface CockpitPlugin
Copyright © 2015. All rights reserved.