@AutoInitialize @AutoStart public class Environment extends Object implements XEnvironment
| Modifier and Type | Class and Description |
|---|---|
static interface |
Environment.ProductInfoProvider |
XEnvironment.Mode| Constructor and Description |
|---|
Environment(String nodeName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTags(XTag... newTags)
Adds a
XTag to the tag repository. |
boolean |
containsValue(String tagName,
String expectedValue)
This method should be used by the listeners when taking decisions based the current tags in the repository.
|
void |
destroy() |
Stream<File> |
findProjects() |
List<String> |
getExtensionPackages() |
String |
getFirstValue(String key)
Get the first value in the value list under a given key
|
XEnvironment.Mode |
getMode() |
String |
getNodeName() |
String |
getNodeSpace() |
String |
getProductName() |
File |
getProjectBaseDir()
Gives the base directory for projects as a file
|
String |
getProjectConfDirPath()
Gives the project's configuration directory which contains the integration flow files
|
RuntimeVersion |
getRuntimeVersion() |
Map<String,List<String>> |
getTags() |
File |
getTmpDir() |
List<String> |
getValues(String tagName)
Returns the
XTag values in the tag container. |
void |
init(org.springframework.context.ApplicationContext context) |
void |
registerListener(XEnvironmentListener listener) |
void |
removeListener(XEnvironmentListener listener) |
void |
removeTags(XTag... tagsToRemove)
Remove one or more
XTags from the tag repository. |
void |
resetTags()
Reset the tag listener to its initial state.
|
void |
setExtensionPackages(List<String> extensionPackages) |
void |
setMode(XEnvironment.Mode mode) |
void |
setNodeSpace(String nodeSpace) |
void |
setProjectBaseDir(String projectBaseDir) |
void |
setTags(Map<String,String> tagsMap) |
void |
setTmpDir(String tmpDir) |
void |
start() |
void |
stop() |
public Environment(String nodeName)
public void setProjectBaseDir(String projectBaseDir)
public File getProjectBaseDir()
XEnvironmentgetProjectBaseDir in interface XEnvironmentpublic String getProjectConfDirPath()
XEnvironmentgetProjectConfDirPath in interface XEnvironmentpublic void setTmpDir(String tmpDir)
public File getTmpDir()
getTmpDir in interface XEnvironmentpublic String getProductName()
getProductName in interface XEnvironmentpublic Stream<File> findProjects()
findProjects in interface XEnvironmentpublic XEnvironment.Mode getMode()
getMode in interface XEnvironmentpublic void setMode(XEnvironment.Mode mode)
public List<String> getExtensionPackages()
getExtensionPackages in interface XEnvironmentpublic RuntimeVersion getRuntimeVersion()
getRuntimeVersion in interface XEnvironmentpublic void init(org.springframework.context.ApplicationContext context)
init in interface Initializablepublic void destroy()
destroy in interface Initializablepublic void addTags(XTag... newTags)
XEnvironmentXTag to the tag repository.addTags in interface XEnvironmentnewTags - The tag to be addedpublic void removeTags(XTag... tagsToRemove)
XEnvironmentXTags from the tag repository. The tags to be removed should be given as a key value pair.
If the value of the given key is equal, the tag will be removed.removeTags in interface XEnvironmenttagsToRemove - The tag to be removedpublic void registerListener(XEnvironmentListener listener)
registerListener in interface XEnvironmentpublic void removeListener(XEnvironmentListener listener)
removeListener in interface XEnvironmentpublic boolean containsValue(String tagName, String expectedValue)
XEnvironmentcontainsValue in interface XEnvironmenttagName - Tag nameexpectedValue - value of the tagpublic void resetTags()
XEnvironmentresetTags in interface XEnvironmentpublic List<String> getValues(String tagName)
XEnvironmentXTag values in the tag container. It is recommended not to use this method for decision
making purposes. Use XEnvironment.containsValue(String, String) insteadgetValues in interface XEnvironmenttagName - the name of the tag to retrieve tag valuespublic String getFirstValue(String key)
XEnvironmentgetFirstValue in interface XEnvironmentkey - key of the tagpublic String getNodeName()
getNodeName in interface XEnvironmentpublic String getNodeSpace()
getNodeSpace in interface XEnvironmentpublic void setNodeSpace(String nodeSpace)
Copyright © 2016–2019 AdroitLogic. All rights reserved.