@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
XTag s 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()
XEnvironment
getProjectBaseDir
in interface XEnvironment
public String getProjectConfDirPath()
XEnvironment
getProjectConfDirPath
in interface XEnvironment
public void setTmpDir(String tmpDir)
public File getTmpDir()
getTmpDir
in interface XEnvironment
public String getProductName()
getProductName
in interface XEnvironment
public Stream<File> findProjects()
findProjects
in interface XEnvironment
public XEnvironment.Mode getMode()
getMode
in interface XEnvironment
public void setMode(XEnvironment.Mode mode)
public List<String> getExtensionPackages()
getExtensionPackages
in interface XEnvironment
public RuntimeVersion getRuntimeVersion()
getRuntimeVersion
in interface XEnvironment
public void init(org.springframework.context.ApplicationContext context)
init
in interface Initializable
public void destroy()
destroy
in interface Initializable
public void addTags(XTag... newTags)
XEnvironment
XTag
to the tag repository.addTags
in interface XEnvironment
newTags
- The tag to be addedpublic void removeTags(XTag... tagsToRemove)
XEnvironment
XTag
s 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 XEnvironment
tagsToRemove
- The tag to be removedpublic void registerListener(XEnvironmentListener listener)
registerListener
in interface XEnvironment
public void removeListener(XEnvironmentListener listener)
removeListener
in interface XEnvironment
public boolean containsValue(String tagName, String expectedValue)
XEnvironment
containsValue
in interface XEnvironment
tagName
- Tag nameexpectedValue
- value of the tagpublic void resetTags()
XEnvironment
resetTags
in interface XEnvironment
public List<String> getValues(String tagName)
XEnvironment
XTag
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 XEnvironment
tagName
- the name of the tag to retrieve tag valuespublic String getFirstValue(String key)
XEnvironment
getFirstValue
in interface XEnvironment
key
- key of the tagpublic String getNodeName()
getNodeName
in interface XEnvironment
public String getNodeSpace()
getNodeSpace
in interface XEnvironment
public void setNodeSpace(String nodeSpace)
Copyright © 2016–2019 AdroitLogic. All rights reserved.