-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
TemplatesPluginProperties.java
44 lines (33 loc) · 1.12 KB
/
TemplatesPluginProperties.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.glowroot.plugin.freemarker;
import org.glowroot.agent.plugin.api.Agent;
import org.glowroot.agent.plugin.api.config.ConfigListener;
import org.glowroot.agent.plugin.api.config.ConfigService;
import org.glowroot.agent.plugin.api.config.StringProperty;
/**
* @author Fabian Bouché
*/
public class TemplatesPluginProperties {
public static String instrumentationLevel() {
return _instrumentationLevel;
}
private static final ConfigService _configService = Agent.getConfigService(
"liferay-freemarker-templates-plugin");
private static String _instrumentationLevel;
private static class TemplatesPluginConfigListener
implements ConfigListener {
@Override
public void onChange() {
StringProperty stringProperty = _configService.getStringProperty(
"instrumentationLevel");
_instrumentationLevel = stringProperty.value();
}
}
static {
_configService.registerConfigListener(
new TemplatesPluginConfigListener());
}
}