public static <T> List<T> getModules(Applications apps, Class<T> type) { List<T> modules = new ArrayList<T>(); for (Object module : apps.getModules()) { if (type.isInstance(module)) { modules.add(type.cast(module)); } } // you have to return an umodifiable list since this list // is not the real list of elements as maintained by this config bean return Collections.unmodifiableList(modules); }
public static <T> List<T> getModules(Applications apps, Class<T> type) { List<T> modules = new ArrayList<T>(); for (Object module : apps.getModules()) { if (type.isInstance(module)) { modules.add(type.cast(module)); } } // you have to return an umodifiable list since this list // is not the real list of elements as maintained by this config bean return Collections.unmodifiableList(modules); }
public static Application getApplication(Applications apps, String moduleID) { if (moduleID == null) { return null; } for (ApplicationName module : apps.getModules()) if (module instanceof Application && module.getName().equals(moduleID)) return (Application)module; return null; }
public ApplicationName getModule(String moduleID) { for (ApplicationName module : apps.getModules()) { if (module.getName().equals(moduleID)) { return module; } } return null; }
public static <T> T getModule(Applications apps, Class<T> type, String moduleID) { if (moduleID == null) { return null; } for (ApplicationName module : apps.getModules()) if (type.isInstance(module) && module.getName().equals(moduleID)) return type.cast(module); return null; }
public static Application getApplication(Applications apps, String moduleID) { if (moduleID == null) { return null; } for (ApplicationName module : apps.getModules()) if (module instanceof Application && module.getName().equals(moduleID)) return (Application)module; return null; }
public static <T> T getModule(Applications apps, Class<T> type, String moduleID) { if (moduleID == null) { return null; } for (ApplicationName module : apps.getModules()) if (type.isInstance(module) && module.getName().equals(moduleID)) return type.cast(module); return null; }
public static ApplicationName getModule(String moduleID) { for (ApplicationName module : apps.getModules()) { if (module.getName().equals(moduleID)) { return module; } } return null; }
private ConnectorModule getConnectorModuleByName(String name){ ConnectorModule module = null; List<ConnectorModule> modules = getApplications().getModules(ConnectorModule.class); for(ConnectorModule connectorModule : modules){ if(connectorModule.getName().equals(name)){ module = connectorModule; break; } } return module; }
/** * Records reload information about the currently-known applications. * * @param applications */ private synchronized void initAppReloadInfo(Applications applications) throws URISyntaxException { appReloadInfo = new HashMap<String,AppReloadInfo>(); logger.fine("[Reloader] Preparing list of apps to monitor:"); for (ApplicationName m : applications.getModules()) { if (m instanceof Application) { Application app = (Application) m; if (Boolean.valueOf(app.getDeployProperties().getProperty (ServerTags.IS_LIFECYCLE))) { // skip lifecycle modules continue; } AppReloadInfo info = new AppReloadInfo(app); appReloadInfo.put(app.getName(), info); logger.fine("[Reloader] Monitoring " + app.getName() + " at " + app.getLocation()); } } }
for (ApplicationName m : applications.getModules()) { if (m instanceof Application) { Application app = (Application) m;
for (ApplicationName module : apps.getModules()) { if (module.getName().equals(appName)) { ((Applications)apps_w).getModules().remove(module); break;
for (ApplicationName module : apps.getModules()) { if (module.getName().equals(appName)) { ((Applications)apps_w).getModules().remove(module); break;
apps_w.getModules().add(app_w); if (applicationInfo != null) { applicationInfo.save(app_w);
apps_w.getModules().add(app_w); if (applicationInfo != null) { applicationInfo.save(app_w);
apps.getModules(ConnectorModule.class)) { ((Applications)apps_w).getModules().remove(connectorModule); ((Applications)apps_w).getModules().add(app); apps.getModules(EjbModule.class)) { ((Applications)apps_w).getModules().remove(ejbModule); ((Applications)apps_w).getModules().add(app); apps.getModules(WebModule.class)) { ((Applications)apps_w).getModules().remove(webModule); ((Applications)apps_w).getModules().add(app); apps.getModules(AppclientModule.class)) { ((Applications)apps_w).getModules().remove(appclientModule); ((Applications)apps_w).getModules().add(app); apps.getModules(J2eeApplication.class)) { ((Applications)apps_w).getModules().remove(j2eeApp); ((Applications)apps_w).getModules().add(app);