public function getSystemProperties(ContainerNodeInterface $containerNode = null)
{
// initialize the properties
$properties = Properties::create();
// append the system properties
$properties->add(SystemPropertyKeys::BASE, $this->getBaseDirectory());
$properties->add(SystemPropertyKeys::VAR_LOG, $this->getLogDir());
$properties->add(SystemPropertyKeys::ETC, $this->getEtcDir());
$properties->add(SystemPropertyKeys::ETC_APPSERVER, $this->getConfDir());
$properties->add(SystemPropertyKeys::ETC_APPSERVER_CONFD, $this->getConfdDir());
// append the declared system propertie
/** @var \AppserverIo\Appserver\Core\Api\Node\SystemPropertyNode $systemProperty */
foreach ($this->getSystemConfiguration()->getSystemProperties() as $systemProperty) {
$properties->add($systemProperty->getName(), $systemProperty->castToType());
}
// query whether or not a container node has been passed
if ($containerNode != null) {
// append the container specific properties
$properties->add(SystemPropertyKeys::TMP, $this->getTmpDir($containerNode));
$properties->add(SystemPropertyKeys::CONTAINER_NAME, $containerNode->getName());
$properties->add(SystemPropertyKeys::WEBAPPS, $this->getWebappsDir($containerNode));
// append the host specific system properties
if ($host = $containerNode->getHost()) {
$properties->add(SystemPropertyKeys::HOST_APP_BASE, $host->getAppBase());
$properties->add(SystemPropertyKeys::HOST_TMP_BASE, $host->getTmpBase());
$properties->add(SystemPropertyKeys::HOST_DEPLOY_BASE, $host->getDeployBase());
}
}
// return the properties
return $properties;
}