/** * Search for the enabled version of the given application. * * @param name the application name * @param target an option supply from admin command, it's retained for * compatibility with other releases * @return the enabled version of the application, if exists * @throws VersioningSyntaxException if getUntaggedName throws an exception */ public final String getEnabledVersion(String name, String target) throws VersioningDeploymentSyntaxException { String untaggedName = VersioningDeploymentUtil.getUntaggedName(name); List<String> allVersions = getAllversions(untaggedName, target); if (allVersions != null) { Iterator it = allVersions.iterator(); while (it.hasNext()) { String app = (String) it.next(); // if a version of the app is enabled if (domain.isAppEnabledInTarget(app, target)) { return app; } } } // no enabled version found return null; }
/** * Search for the enabled version of the given application. * * @param name the application name * @param target an option supply from admin command, it's retained for * compatibility with other releases * @return the enabled version of the application, if exists * @throws VersioningSyntaxException if getUntaggedName throws an exception */ public final String getEnabledVersion(String name, String target) throws VersioningSyntaxException { String untaggedName = VersioningUtils.getUntaggedName(name); List<String> allVersions = getAllversions(untaggedName, target); if (allVersions != null) { Iterator it = allVersions.iterator(); while (it.hasNext()) { String app = (String) it.next(); // if a version of the app is enabled if (domain.isAppEnabledInTarget(app, target)) { return app; } } } // no enabled version found return null; }
private String getLongStatus(Application app) { String message = ""; boolean isVersionEnabled = domain.isAppEnabledInTarget(app.getName(), target); if ( isVersionEnabled ) { message = localStrings.getLocalString("list.applications.verbose.enabled", "enabled"); } else { message = localStrings.getLocalString("list.applications.verbose.disabled", "disabled"); } return message; }
if (domain.isAppEnabledInTarget(appName, target)) { status = "enabled";
if (domain.isAppEnabledInTarget(name(), target)) { logger.fine("The application is already enabled"); return;