void processResource(ResourceEntry profileEntry) throws OperationFailedException { super.processResource(profileEntry); final Set<String> subsystems; if (profileEntry.hasChildren(SUBSYSTEM)) { subsystems = new HashSet<>(); subsystems.addAll(profileEntry.getChildrenNames(SUBSYSTEM)); } else { subsystems = Collections.emptySet(); } resourceChildren.put(profileEntry.getName(), subsystems); }
void processResource(ResourceEntry profileEntry) throws OperationFailedException { super.processResource(profileEntry); final Set<String> subsystems; if (profileEntry.hasChildren(SUBSYSTEM)) { subsystems = new HashSet<>(); subsystems.addAll(profileEntry.getChildrenNames(SUBSYSTEM)); } else { subsystems = Collections.emptySet(); } resourceChildren.put(profileEntry.getName(), subsystems); }
void processResource(ResourceEntry groupEntry) throws OperationFailedException{ //Remote and local outbound socket binding names must be unique or we get a DuplicateServiceException //Tighten this up to also make the 'normal' ones unique, to make the validation a bit easier. super.processResource(groupEntry); final Set<String> bindings; if (groupEntry.hasChildren(SOCKET_BINDING) || groupEntry.hasChildren(LOCAL_DESTINATION_OUTBOUND_SOCKET_BINDING) || groupEntry.hasChildren(REMOTE_DESTINATION_OUTBOUND_SOCKET_BINDING)) { bindings = new HashSet<>(); addBindings(groupEntry, bindings, SOCKET_BINDING); addBindings(groupEntry, bindings, LOCAL_DESTINATION_OUTBOUND_SOCKET_BINDING); addBindings(groupEntry, bindings, REMOTE_DESTINATION_OUTBOUND_SOCKET_BINDING); bindings.addAll(groupEntry.getChildrenNames(SUBSYSTEM)); } else { bindings = Collections.emptySet(); } resourceChildren.put(groupEntry.getName(), bindings); }
void processResource(ResourceEntry groupEntry) throws OperationFailedException{ //Remote and local outbound socket binding names must be unique or we get a DuplicateServiceException //Tighten this up to also make the 'normal' ones unique, to make the validation a bit easier. super.processResource(groupEntry); final Set<String> bindings; if (groupEntry.hasChildren(SOCKET_BINDING) || groupEntry.hasChildren(LOCAL_DESTINATION_OUTBOUND_SOCKET_BINDING) || groupEntry.hasChildren(REMOTE_DESTINATION_OUTBOUND_SOCKET_BINDING)) { bindings = new HashSet<>(); addBindings(groupEntry, bindings, SOCKET_BINDING); addBindings(groupEntry, bindings, LOCAL_DESTINATION_OUTBOUND_SOCKET_BINDING); addBindings(groupEntry, bindings, REMOTE_DESTINATION_OUTBOUND_SOCKET_BINDING); bindings.addAll(groupEntry.getChildrenNames(SUBSYSTEM)); } else { bindings = Collections.emptySet(); } resourceChildren.put(groupEntry.getName(), bindings); }
private void addBindings(ResourceEntry groupEntry, Set<String> bindings, String bindingType) throws OperationFailedException{ if (groupEntry.hasChildren(bindingType)) { for (String name : groupEntry.getChildrenNames(bindingType)) { if (!bindings.add(name)) { throw HostControllerLogger.ROOT_LOGGER.bindingNameNotUnique(name, groupEntry.getName()); } } } }
private void addBindings(ResourceEntry groupEntry, Set<String> bindings, String bindingType) throws OperationFailedException{ if (groupEntry.hasChildren(bindingType)) { for (String name : groupEntry.getChildrenNames(bindingType)) { if (!bindings.add(name)) { throw HostControllerLogger.ROOT_LOGGER.bindingNameNotUnique(name, groupEntry.getName()); } } } }