configContext);
final Properties result = new Properties();
if (target.getType() == TargetType.DOMAIN) {
//list domain properties
final Domain domain = ConfigAPIHelper.getDomainConfigBean(configContext);
addProperties(result, domain.getSystemProperty());
} else if (target.getType() == TargetType.CONFIG) {
//list config properties
if (inherit) {
final Domain domain = ConfigAPIHelper.getDomainConfigBean(configContext);
addProperties(result, domain.getSystemProperty());
}
final Config config = ConfigAPIHelper.getConfigByName(configContext,
target.getName());
addProperties(result, config.getSystemProperty());
} else if (target.getType() == TargetType.CLUSTER) {
//list cluster properties
if (inherit) {
final Domain domain = ConfigAPIHelper.getDomainConfigBean(configContext);
addProperties(result, domain.getSystemProperty());
final Config config = ClusterHelper.getConfigForCluster(configContext,
target.getName());
addProperties(result, config.getSystemProperty());
}
final Cluster cluster = ClusterHelper.getClusterByName(configContext,
target.getName());
addProperties(result, cluster.getSystemProperty());
} else if (target.getType() == TargetType.SERVER ||
target.getType() == TargetType.DAS) {
//list server properties
final Server server = ServerHelper.getServerByName(configContext,
target.getName());
if (inherit) {
final Domain domain = ConfigAPIHelper.getDomainConfigBean(configContext);
addProperties(result, domain.getSystemProperty());
final Config config = ConfigAPIHelper.getConfigByName(configContext, server.getConfigRef());
addProperties(result, config.getSystemProperty());
if (ServerHelper.isServerClustered(configContext, target.getName())) {
final Cluster cluster = ClusterHelper.getClusterForInstance(configContext,