/** * Extract the set of version(s) of the given application represented as * an untagged version name * * @param untaggedName the application name as an untagged version : an * application name without version identifier * @param target the target where we want to get all the versions * @return all the version(s) of the given application */ private final List<String> getAllversions(String untaggedName, String target) { List<Application> allApplications = null; if (target != null) { allApplications = domain.getApplicationsInTarget(target); } else { allApplications = domain.getApplications().getApplications(); } return VersioningUtils.getVersions(untaggedName, allApplications); }
/** * Extract the set of version(s) of the given application represented as * an untagged version name * * @param untaggedName the application name as an untagged version : an * application name without version identifier * @param target the target where we want to get all the versions * @return all the version(s) of the given application */ public final List<String> getAllversions(String untaggedName, String target) { List<Application> allApplications = null; if (target != null) { allApplications = domain.getApplicationsInTarget(target); } else { allApplications = domain.getApplications().getApplications(); } return VersioningDeploymentUtil.getVersions(untaggedName, allApplications); }
for (Application app : domain.getApplicationsInTarget(target)) { if (!app.isLifecycleModule()) { if (type==null || isApplicationOfThisType(app, type)) {
public void execute(AdminCommandContext context) { ActionReport report = context.getActionReport(); ActionReport.MessagePart part = report.getTopMessagePart(); boolean found = false; for (Application app : domain.getApplicationsInTarget(target)) { if (app.isLifecycleModule()) { ActionReport.MessagePart childPart = part.addChild(); childPart.setMessage(app.getName()); found = true; } } if (!found && !terse) { part.setMessage(localStrings.getLocalString("list.components.no.elements.to.list", "Nothing to List.")); } report.setActionExitCode(ActionReport.ExitCode.SUCCESS); } }
private void displayAppScopedResources(String applicationName, ActionReport report, ActionReport.MessagePart part) { Application application = null; List<Application> applications = domain.getApplicationsInTarget(target); for (Application app : applications) { if (app.getName().equals(applicationName)) { application = app; } } if (application != null) { ActionReport subReport = report.addSubActionsReport(); CommandRunner.CommandInvocation inv = commandRunner.getCommandInvocation("_list-resources", subReport); final ParameterMap parameters = new ParameterMap(); parameters.add("appname", application.getName()); inv.parameters(parameters).execute(); ActionReport.MessagePart subPart = subReport.getTopMessagePart(); for (ActionReport.MessagePart cp: subPart.getChildren()) { ActionReport.MessagePart resourcesChildPart = part.addChild(); resourcesChildPart.setMessage(cp.getMessage()); } } }