part.setChildrenType("DottedName"); part.setMessage(prefix + node.getValue() + "=" + node.getKey().attribute("value")); foundMatch = true; if (matches(finalDottedName, pattern)) { ActionReport.MessagePart part = report.getTopMessagePart().addChild(); part.setChildrenType("DottedName"); part.setMessage(prefix + node.getValue() + "." + name.getKey() + "=" + name.getValue()); foundMatch = true;
top.setChildrenType("Module");
private void copyMessagePart(MessagePart source, MessagePart dest) { if (source == null || dest == null) { return; } dest.setMessage(source.getMessage()); dest.setChildrenType(source.getChildrenType()); Properties props = source.getProps(); if (props != null) { for (Map.Entry<Object, Object> entry : props.entrySet()) { dest.addProperty((String) entry.getKey(), (String) entry.getValue()); } } for (MessagePart chmp : source.getChildren()) { copyMessagePart(chmp, dest.addChild()); } }
msgPart.setChildrenType("WARNING"); ActionReport.MessagePart childPart = msgPart.addChild(); childPart.setMessage(VersioningUtils.LOCALSTRINGS.getLocalString(
ActionReport.MessagePart cmd = top.addChild(); cmd.setChildrenType("command"); cmd.addProperty("name", model.getCommandName()); if (model.unknownOptionsAreOperands()) { ppart.setChildrenType("option"); ppart.addProperty("name", p.getName()); ppart.addProperty("type", typeOf(p)); primpart.setChildrenType("operand"); primpart.addProperty("name", primary.getName()); primpart.addProperty("type", typeOf(primary));
"list.file.group.success", "list-file-groups successful")); report.getTopMessagePart().setChildrenType("file-group"); while (groups.hasMoreElements()) { final ActionReport.MessagePart part =
"list.file.group.success", "list-file-groups successful")); report.getTopMessagePart().setChildrenType("file-group"); while (groups.hasMoreElements()) { final ActionReport.MessagePart part =
ActionReport.MessagePart cmd = top.addChild(); cmd.setChildrenType("command"); cmd.addProperty("name", model.getCommandName()); if (model.unknownOptionsAreOperands()) { ppart.setChildrenType("option"); ppart.addProperty("name", p.getName()); ppart.addProperty("type", typeOf(p)); primpart.setChildrenType("operand"); primpart.addProperty("name", primary.getName()); primpart.addProperty("type", typeOf(primary));
"list.message.security.provider.success", "list-message-security-providers successful")); report.getTopMessagePart().setChildrenType("");
"list.file.group.success", "list-file-groups successful")); report.getTopMessagePart().setChildrenType("file-group"); while (groups.hasMoreElements()) { final ActionReport.MessagePart part =
top.setChildrenType(localStrings.getLocalString("container", "Container")); if (!atLeastOne) { atLeastOne=true; container.setChildrenType(localStrings.getLocalString("list.containers.listapps", "Applications deployed"));
domain.getResources(), xmlFile, target, resourceFactory); final Iterator resultsIter = results.iterator(); report.getTopMessagePart().setChildrenType("Command"); boolean isSuccess = false; while (resultsIter.hasNext()) {
report.getTopMessagePart().setChildrenType("audit-module"); for (AuditModule am : securityService.getAuditModule()) { ActionReport.MessagePart part = report.getTopMessagePart().addChild();
"list.message.security.provider.success", "list-message-security-providers successful")); report.getTopMessagePart().setChildrenType("");
public void execute(AdminCommandContext context) { ActionReport report = context.getActionReport(); /* Issue 5918 Used in ManifestManager to keep output sorted */ try { PropsFileActionReporter reporter = (PropsFileActionReporter) report; reporter.useMainChildrenAttribute(true); } catch(ClassCastException e) { // ignore, this is not a manifest output } if (monitor) { listMonitorElements(context); return; } List<Map.Entry> matchingNodesSorted = sortNodesByDottedName(matchingNodes); for (Map.Entry<Dom, String> node : matchingNodesSorted) { ActionReport.MessagePart part = report.getTopMessagePart().addChild(); part.setChildrenType("DottedName"); if (parentNodes[0].name.isEmpty()) { part.setMessage(node.getValue()); } else { part.setMessage(parentNodes[0].name + "." + node.getValue()); } } }
public void execute(AdminCommandContext context) { final ActionReport report = context.getActionReport(); ActionReport.MessagePart part = report.getTopMessagePart(); part.setMessage(target); part.setChildrenType("application"); List<ApplicationRef> appRefs = domain.getApplicationRefsInTarget(target); for (ApplicationRef appRef : appRefs) { if (state.equals("all") || (state.equals("running") && Boolean.valueOf(appRef.getEnabled())) || (state.equals("non-running") && !Boolean.valueOf(appRef.getEnabled())) ) { if (isApplicationOfThisType(appRef.getRef(), type)) { ActionReport.MessagePart childPart = part.addChild(); childPart.setMessage(appRef.getRef()); } } } report.setActionExitCode(ActionReport.ExitCode.SUCCESS); }
/** * Executes the command with the command parameters passed as Properties * where the keys are the paramter names and the values the parameter values * * @param context information */ @Override public void execute(AdminCommandContext context) { context.getActionReport().setActionExitCode(ActionReport.ExitCode.SUCCESS); ActionReport report = context.getActionReport(); report.getTopMessagePart().setChildrenType("Command"); for (String name : sortedAdminCommands()) { ActionReport.MessagePart part = report.getTopMessagePart().addChild(); part.setMessage(name); } }
/** * Executes the command with the command parameters passed as Properties * where the keys are the paramter names and the values the parameter values * * @param context information */ public void execute(AdminCommandContext context) { final ActionReport report = context.getActionReport(); report.getTopMessagePart().setChildrenType("audit-module"); for (AuditModule am : securityService.getAuditModule()) { ActionReport.MessagePart part = report.getTopMessagePart().addChild(); part.setMessage(am.getName()); } }
/** * Executes the command. * * @param context information */ public void execute(AdminCommandContext context) { final ActionReport report = context.getActionReport(); ActionReport.MessagePart msgPart = report.getTopMessagePart(); msgPart.setChildrenType("WARNING"); ActionReport.MessagePart childPart = msgPart.addChild(); String commandName = getClass().getAnnotation(Service.class).name(); childPart.setMessage(localStrings.getLocalString("deploydir.command.deprecated", "{0} command deprecated. Please use {1} command instead.", commandName, "deploy")); super.execute(context); } }
/** * Indicate in the action report that the command succeeded and * include the target property and it's value in the report */ private void success(AdminCommandContext context, String target, String value) { context.getActionReport().setActionExitCode(ActionReport.ExitCode.SUCCESS); ActionReport.MessagePart part = context.getActionReport().getTopMessagePart().addChild(); part.setChildrenType("DottedName"); part.setMessage(target + "=" + value); } }