private static List<ModelNode> getPatches(PatchOperationTarget target, String stream) throws PatchingException { PatchOperationBuilder history = PatchOperationBuilder.Factory.history(stream); ModelNode resp = history.execute(target); ModelNode res = resp.get(ModelDescriptionConstants.RESULT); return res.asList(); }
private void configureBuilder(PatchOperationBuilder builder) throws CommandException { if (overrideModules) { builder.ignoreModuleChanges(); } if (overrideAll) { builder.overrideAll(); } if (overrideList != null) { for (String path : overrideList.split(",+")) { builder.overrideItem(path); } } if (preserveList != null) { for (String path : preserveList.split(",+")) { builder.preserveItem(path); } } }
private void configureBuilder(PatchOperationBuilder builder) throws CommandException { if (overrideModules) { builder.ignoreModuleChanges(); } if (overrideAll) { builder.overrideAll(); } if (overrideList != null) { for (String path : overrideList.split(",+")) { builder.overrideItem(path); } } if (preserveList != null) { for (String path : preserveList.split(",+")) { builder.preserveItem(path); } } }
private static List<ModelNode> getPatches(PatchOperationTarget target, String stream) throws PatchingException { PatchOperationBuilder history = PatchOperationBuilder.Factory.history(stream); ModelNode resp = history.execute(target); ModelNode res = resp.get(ModelDescriptionConstants.RESULT); return res.asList(); }
builder.ignoreModuleChanges(); builder.overrideAll(); builder.overrideItem(path); builder.preserveItem(path);
private static List<ModelNode> getAllPatches(PatchOperationTarget target, String stream) throws PatchingException { if (stream == null) { PatchOperationBuilder streams = PatchOperationBuilder.Factory.streams(); // retrieve all streams. ModelNode response = streams.execute(target); final ModelNode result = response.get(ModelDescriptionConstants.RESULT); if (!result.isDefined()) { return Collections.emptyList(); } // retrieve patches in stream. List<ModelNode> patches = new ArrayList<>(); List<ModelNode> list = response.get(ModelDescriptionConstants.RESULT).asList(); for (ModelNode s : list) { patches.addAll(getPatches(target, s.asString())); } return patches; } else { return getPatches(target, stream); } }
builder.ignoreModuleChanges(); builder.overrideAll(); builder.overrideItem(path); builder.preserveItem(path);
private static List<ModelNode> getAllPatches(PatchOperationTarget target, String stream) throws PatchingException { if (stream == null) { PatchOperationBuilder streams = PatchOperationBuilder.Factory.streams(); // retrieve all streams. ModelNode response = streams.execute(target); final ModelNode result = response.get(ModelDescriptionConstants.RESULT); if (!result.isDefined()) { return Collections.emptyList(); } // retrieve patches in stream. List<ModelNode> patches = new ArrayList<>(); List<ModelNode> list = response.get(ModelDescriptionConstants.RESULT).asList(); for (ModelNode s : list) { patches.addAll(getPatches(target, s.asString())); } return patches; } else { return getPatches(target, stream); } }
final ModelNode response; try { response = builder.execute(target); } catch (Exception e) { throw new CommandException(action + " failed", e);
final ModelNode response; try { response = builder.execute(target); } catch (Exception e) { throw new CommandException(action + " failed", e);
final ModelNode response; try { response = builder.execute(target); } catch (Exception e) { throw new CommandLineException(action + " failed", e);
final ModelNode response; try { response = builder.execute(target); } catch (Exception e) { throw new CommandLineException(action + " failed", e);