public static ApplicationRef getApplicationRef(Cluster cluster, String appName) { for (ApplicationRef appRef : cluster.getApplicationRef()) { if (appRef.getRef().equals(appName)) { return appRef; } } return null; }
public static ApplicationRef getApplicationRef(Cluster cluster, String appName) { for (ApplicationRef appRef : cluster.getApplicationRef()) { if (appRef.getRef().equals(appName)) { return appRef; } } return null; }
public static List<ApplicationRef> getApplicationRefsInTarget( Domain me, String tgt, boolean includeInstances) { List<String> targets = new ArrayList<String>(); if (!tgt.equals("domain")) { targets.add(tgt); } else { targets = me.getAllTargets(); } List<ApplicationRef> allAppRefs = new ArrayList<ApplicationRef>(); for (String target : targets) { Server server = me.getServerNamed(target); if (server != null) { allAppRefs.addAll(server.getApplicationRef()); } else { Cluster cluster = getClusterNamed(me, target); if (cluster != null) { allAppRefs.addAll(cluster.getApplicationRef()); if (includeInstances) { for (Server svr : cluster.getInstances() ) { allAppRefs.addAll(svr.getApplicationRef()); } } } } } return allAppRefs; }
public static List<ApplicationRef> getApplicationRefsInTarget( Domain me, String tgt, boolean includeInstances) { List<String> targets = getTargets(me, tgt); List<ApplicationRef> allAppRefs = new ArrayList<ApplicationRef>(); for (String target : targets) { Server server = me.getServerNamed(target); if (server != null) { allAppRefs.addAll(server.getApplicationRef()); } else { Cluster cluster = getClusterNamed(me, target); if (cluster != null) { allAppRefs.addAll(cluster.getApplicationRef()); if (includeInstances) { for (Server svr : cluster.getInstances() ) { allAppRefs.addAll(svr.getApplicationRef()); } } } } } return allAppRefs; }
clusterContainingInstance.getApplicationRef(appName); if (Boolean.parseBoolean(clusterAppRef.getEnabled()) != isAppRefEnabledOnAnyClusterInstance) { t.enroll(clusterAppRef).setEnabled(String.valueOf(isAppRefEnabledOnAnyClusterInstance));
clusterContainingInstance.getApplicationRef(appName); if (Boolean.parseBoolean(clusterAppRef.getEnabled()) != isAppRefEnabledOnAnyClusterInstance) { t.enroll(clusterAppRef).setEnabled(String.valueOf(isAppRefEnabledOnAnyClusterInstance));
cluster.getApplicationRef()) { if (appRef.getRef().equals(appName)) { ((Cluster)cluster_w).getApplicationRef().remove( appRef); break;
cluster.getApplicationRef()) { if (appRef.getRef().equals(appName)) { ((Cluster)cluster_w).getApplicationRef().remove( appRef); break;
cluster.getApplicationRef()) { if (appRef.getRef().equals(appName)) { ConfigBeanProxy appRef_w = t.enroll(appRef);
cluster.getApplicationRef()) { if (appRef.getRef().equals(appName)) { ConfigBeanProxy appRef_w = t.enroll(appRef);
ApplicationRef appRef = cluster_w.createChild(ApplicationRef.class); setAppRefAttributes(appRef, deployParams); ((Cluster)cluster_w).getApplicationRef().add(appRef);
ApplicationRef appRef = cluster_w.createChild(ApplicationRef.class); setAppRefAttributes(appRef, deployParams); ((Cluster)cluster_w).getApplicationRef().add(appRef);
ApplicationRef newAppRef = instance.createChild(ApplicationRef.class); newAppRef.setRef(application.getName()); instance.getApplicationRef().add(newAppRef);
private void addClusterRefs(Cluster cluster, Server instance) throws TransactionFailure, PropertyVetoException { if (cluster != null) { for (ApplicationRef appRef : cluster.getApplicationRef()) { if (instance.getApplicationRef(appRef.getRef()) == null) { ApplicationRef newAppRef = instance.createChild(ApplicationRef.class); newAppRef.setRef(appRef.getRef()); newAppRef.setDisableTimeoutInMinutes(appRef.getDisableTimeoutInMinutes()); newAppRef.setEnabled(appRef.getEnabled()); newAppRef.setLbEnabled(appRef.getLbEnabled()); newAppRef.setVirtualServers(appRef.getVirtualServers()); instance.getApplicationRef().add(newAppRef); } } for (ResourceRef rr : cluster.getResourceRef()) { if (instance.getResourceRef(rr.getRef()) == null) { ResourceRef newRR = instance.createChild(ResourceRef.class); newRR.setRef(rr.getRef()); newRR.setEnabled(rr.getEnabled()); instance.getResourceRef().add(newRR); } } } } }
private void addClusterRefs(Cluster cluster, Server instance) throws TransactionFailure, PropertyVetoException { if (cluster != null) { for (ApplicationRef appRef : cluster.getApplicationRef()) { if (instance.getApplicationRef(appRef.getRef()) == null) { ApplicationRef newAppRef = instance.createChild(ApplicationRef.class); newAppRef.setRef(appRef.getRef()); newAppRef.setDisableTimeoutInMinutes(appRef.getDisableTimeoutInMinutes()); newAppRef.setEnabled(appRef.getEnabled()); newAppRef.setLbEnabled(appRef.getLbEnabled()); newAppRef.setVirtualServers(appRef.getVirtualServers()); instance.getApplicationRef().add(newAppRef); } } for (ResourceRef rr : cluster.getResourceRef()) { if (instance.getResourceRef(rr.getRef()) == null) { ResourceRef newRR = instance.createChild(ResourceRef.class); newRR.setRef(rr.getRef()); newRR.setEnabled(rr.getEnabled()); instance.getResourceRef().add(newRR); } } } } }
ApplicationRef newAppRef = instance.createChild(ApplicationRef.class); newAppRef.setRef(application.getName()); instance.getApplicationRef().add(newAppRef);
List<Cluster> clusterList = clusters.getCluster(); for (Cluster cluster : clusterList) { ApplicationRef applicationRef = cluster.getApplicationRef(appName); if (applicationRef != null) { if ("true".equalsIgnoreCase(applicationRef.getEnabled())) {
ConfigBeanProxy cluster_w = t.enroll(cluster); List<ApplicationRef> appRefs = cluster.getApplicationRef(); for (ApplicationRef appRef : appRefs) { if (systemAppNames.contains(appRef.getRef())) { ((Cluster)cluster_w).getApplicationRef().remove(appRef);