@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 ConfigurationService
public void endBatch()
endBatch
in interface ConfigurationService
public List<ConfigGroup> getConfiguration(ConfigType type)
getConfiguration
in interface ConfigurationService
public List<ConfigGroup> getConfiguration(ConfigType type, String namespace)
getConfiguration
in interface ConfigurationService
public Map<String,List<ConfigGroup>> getConfigurationByNamespace(ConfigType type)
getConfigurationByNamespace
in interface ConfigurationService
public boolean addConfiguration(ConfigGroup configGroup)
addConfiguration
in interface ConfigurationService
public boolean updateConfiguration(ConfigGroup configGroup)
updateConfiguration
in interface ConfigurationService
public boolean removeConfiguration(ConfigGroup configGroup)
removeConfiguration
in interface ConfigurationService
protected String getIdentityName()
protected long getLastModified()
protected void updateLastModified()
public void callback(long value)
callback
in interface AsyncWatchServiceCallback
public boolean cleanUpSystemRepository()
cleanUpSystemRepository
in interface ConfigurationService
protected ConfigServiceWatchServiceExecutor getWatchServiceExecutor()
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.