@ApplicationScoped public class ConfigurationServiceImpl extends Object implements ConfigurationService, AsyncWatchServiceCallback
LAST_MODIFIED_MARKER_FILE| Constructor and Description |
|---|
ConfigurationServiceImpl() |
ConfigurationServiceImpl(Repository systemRepository,
ConfigGroupMarshaller marshaller,
org.jboss.errai.security.shared.api.identity.User identity,
IOService ioService,
javax.enterprise.event.Event<SystemRepositoryChangedEvent> repoChangedEvent,
javax.enterprise.event.Event<SystemRepositoryChangedEvent> spaceChangedEvent,
javax.enterprise.event.Event<SystemRepositoryChangedEvent> changedEvent,
FileSystem fs) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addConfiguration(ConfigGroup configGroup) |
void |
callback(long value) |
boolean |
cleanUpSystemRepository() |
void |
endBatch() |
List<ConfigGroup> |
getConfiguration(ConfigType type) |
List<ConfigGroup> |
getConfiguration(ConfigType type,
String namespace) |
Map<String,List<ConfigGroup>> |
getConfigurationByNamespace(ConfigType type) |
protected String |
getIdentityName() |
protected long |
getLastModified() |
protected ConfigServiceWatchServiceExecutor |
getWatchServiceExecutor() |
boolean |
removeConfiguration(ConfigGroup configGroup) |
void |
setup() |
void |
shutdown() |
void |
startBatch() |
boolean |
updateConfiguration(ConfigGroup configGroup) |
protected void |
updateLastModified() |
protected static final String MONITOR_DISABLED
protected static final String INVALID_FILENAME_CHARS
protected Repository systemRepository
protected ConfigGroupMarshaller marshaller
protected org.jboss.errai.security.shared.api.identity.User identity
protected final Map<ConfigType,List<ConfigGroup>> configGroupsByTypeWithoutNamespace
protected final Map<ConfigType,Map<String,List<ConfigGroup>>> configGroupsByTypeWithNamespace
protected AtomicLong localLastModifiedValue
protected IOService ioService
protected javax.enterprise.event.Event<SystemRepositoryChangedEvent> repoChangedEvent
protected javax.enterprise.event.Event<SystemRepositoryChangedEvent> spaceChangedEvent
protected javax.enterprise.event.Event<SystemRepositoryChangedEvent> changedEvent
protected final ExecutorService executorService
protected ConfigServiceWatchServiceExecutor executor
protected org.guvnor.structure.backend.config.ConfigurationServiceImpl.CheckConfigurationUpdates configUpdates
protected WatchService watchService
protected FileSystem fs
public ConfigurationServiceImpl()
@Inject
public ConfigurationServiceImpl(@Named(value="system")
Repository systemRepository,
ConfigGroupMarshaller marshaller,
org.jboss.errai.security.shared.api.identity.User identity,
@Named(value="configIO")
IOService ioService,
javax.enterprise.event.Event<SystemRepositoryChangedEvent> repoChangedEvent,
javax.enterprise.event.Event<SystemRepositoryChangedEvent> spaceChangedEvent,
javax.enterprise.event.Event<SystemRepositoryChangedEvent> changedEvent,
@Named(value="systemFS")
FileSystem fs)
@PostConstruct public void setup()
@PreDestroy public void shutdown()
public void startBatch()
startBatch in interface ConfigurationServicepublic void endBatch()
endBatch in interface ConfigurationServicepublic List<ConfigGroup> getConfiguration(ConfigType type)
getConfiguration in interface ConfigurationServicepublic List<ConfigGroup> getConfiguration(ConfigType type, String namespace)
getConfiguration in interface ConfigurationServicepublic Map<String,List<ConfigGroup>> getConfigurationByNamespace(ConfigType type)
getConfigurationByNamespace in interface ConfigurationServicepublic boolean addConfiguration(ConfigGroup configGroup)
addConfiguration in interface ConfigurationServicepublic boolean updateConfiguration(ConfigGroup configGroup)
updateConfiguration in interface ConfigurationServicepublic boolean removeConfiguration(ConfigGroup configGroup)
removeConfiguration in interface ConfigurationServiceprotected String getIdentityName()
protected long getLastModified()
protected void updateLastModified()
public void callback(long value)
callback in interface AsyncWatchServiceCallbackpublic boolean cleanUpSystemRepository()
cleanUpSystemRepository in interface ConfigurationServiceprotected ConfigServiceWatchServiceExecutor getWatchServiceExecutor()
Copyright © 2012–2021 JBoss by Red Hat. All rights reserved.