} else if(JVM.equals(type)) {
final String serverName = address.getElement(0).getValue();
// If the server is running require a restart
if(serverProxies.containsKey(serverName)) {
final String group = host.get(address.getLastElement().getKey(), address.getLastElement().getValue(), GROUP).asString();
final ServerIdentity id = new ServerIdentity(localHostName, group, serverName);
return getServerRestartRequiredOperations(Collections.singleton(id));
}
} else if (SYSTEM_PROPERTY.equals(type) && isServerAffectingSystemPropertyOperation(operation)) {
String propName = address.getLastElement().getValue();
String serverName = address.getElement(0).getValue();
ServerIdentity serverId = getServerIdentity(serverName, host);
serverOp = getServerSystemPropertyOperation(operation, propName, serverId, Level.SERVER, domain, host);
}
} else if (address.size() == 1) {
// TODO - deal with "add", "remove" and changing "auto-start" attribute
if (ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION.equals(operation.require(OP).asString())) {
final String attr = operation.get(NAME).asString();
if (GROUP.equals(attr) || SOCKET_BINDING_GROUP.equals(attr) || SOCKET_BINDING_PORT_OFFSET.equals(attr)) {
final String serverName = address.getElement(0).getValue();
// If the server is running require a restart
if(serverProxies.containsKey(serverName)) {
final String group = host.get(address.getLastElement().getKey(), address.getLastElement().getValue(), GROUP).asString();
final ServerIdentity id = new ServerIdentity(localHostName, group, serverName);
result = getServerRestartRequiredOperations(Collections.singleton(id));
return result;
}
}
}
}
if (serverOp == null) {
result = Collections.emptyMap();
} else {
String serverName = address.getElement(0).getValue();
ServerIdentity gs = getServerIdentity(serverName, host);
Set<ServerIdentity> set = Collections.singleton(gs);
result = Collections.singletonMap(set, serverOp);
}
return result;
}