public class ConfigPlugin extends PluginActivator implements ConfigService, PostCreateTopicListener
Modifier and Type | Field and Description |
---|---|
private static String |
ASSOC_TYPE_CONFIGURATION |
private Logger |
logger |
private Map<String,List<ConfigDefinition>> |
registry
Key: the "configurable URI" as a config target's hash key, that is either "topicUri:{uri}" or "typeUri:{uri}".
|
private javax.servlet.http.HttpServletRequest |
request |
private static String |
ROLE_TYPE_CONFIGURABLE |
private static String |
ROLE_TYPE_DEFAULT |
bundle, dmx, mf
Constructor and Description |
---|
ConfigPlugin() |
getBundleContext, getPluginName, getStaticResource, getUri, init, preInstall, publishFileSystem, serviceArrived, serviceGone, setCoreService, shutdown, start, stop, toString
private static String ASSOC_TYPE_CONFIGURATION
private static String ROLE_TYPE_CONFIGURABLE
private static String ROLE_TYPE_DEFAULT
private Map<String,List<ConfigDefinition>> registry
@Context private javax.servlet.http.HttpServletRequest request
public ConfigPlugin()
public RelatedTopic getConfigTopic(String configTypeUri, long topicId)
getConfigTopic
in interface ConfigService
public void createConfigTopic(String configTypeUri, Topic topic)
createConfigTopic
in interface ConfigService
public void registerConfigDefinition(ConfigDefinition configDef)
registerConfigDefinition
in interface ConfigService
public void unregisterConfigDefinition(String configTypeUri)
unregisterConfigDefinition
in interface ConfigService
public ConfigDefinitions getConfigDefinitions()
public void postCreateTopic(Topic topic)
postCreateTopic
in interface PostCreateTopicListener
private RelatedTopic _getConfigTopic(String configTypeUri, long topicId)
private RelatedTopic _createConfigTopic(ConfigDefinition configDef, Topic topic)
private long workspaceId(ConfigModificationRole role)
private List<ConfigDefinition> getApplicableConfigDefinitions(Topic topic)
private ConfigDefinition getApplicableConfigDefinition(Topic topic, String configTypeUri)
RuntimeException
- if no such config definition is registered.private boolean isRegistered(ConfigDefinition configDef)
private ConfigDefinition findByConfigTypeUri(List<ConfigDefinition> configDefs, String configTypeUri)
private List<ConfigDefinition> lookupConfigDefinitions(String hashKey)
Copyright © 2018. All Rights Reserved.