public String getEnabled(String sn, String moduleID) { ApplicationRef appRef = getApplicationRefInServer(sn, moduleID); if (appRef != null) { return appRef.getEnabled(); } else { return null; } }
public static String getEnabledForApplication(Domain d, String target, String appName) { ApplicationRef appRef = d.getApplicationRefInTarget( appName, target); if (appRef != null) { return appRef.getEnabled(); } else { return null; } }
public static String getEnabled(String sn, String moduleID) { ApplicationRef appRef = getApplicationRefInServer(sn, moduleID); if (appRef != null) { return appRef.getEnabled(); } else { return null; } }
public static String getEnabledForApplication(Domain d, String target, String appName) { ApplicationRef appRef = d.getApplicationRefInTarget( appName, target); if (appRef != null) { return appRef.getEnabled(); } else { return null; } }
/** * Checks if the application reference is enabled * @param appName application-name * @since SJSAS 9.1 PE/SE/EE * @return boolean indicating the status */ private boolean isApplicationReferenceEnabled(String appName) { ApplicationRef appRef = getServer().getApplicationRef(appName); if (appRef == null) { if (_logger.isLoggable(Level.FINE)) { _logger.fine("ResourcesUtil :: isApplicationReferenceEnabled null ref"); } return false; } if(_logger.isLoggable(Level.FINE)) { _logger.fine("ResourcesUtil :: isApplicationReferenceEnabled appRef enabled ?" + appRef.getEnabled()); } return ConnectorsUtil.parseBoolean(appRef.getEnabled()); }
public boolean isAppEnabled(Application app) { if (Boolean.valueOf(app.getEnabled())) { ApplicationRef appRef = server.getApplicationRef(app.getName()); if (appRef != null && Boolean.valueOf(appRef.getEnabled())) { return true; } } return false; }
public boolean isAppEnabled(Application app) { if (Boolean.valueOf(app.getEnabled())) { ApplicationRef appRef = server.getApplicationRef(app.getName()); if (appRef != null && Boolean.valueOf(appRef.getEnabled())) { return true; } } return false; }
public boolean isEnabled(Application application){ if(application == null){ return false; } boolean appEnabled = Boolean.valueOf(application.getEnabled()); ApplicationRef appRef = getServer().getApplicationRef(application.getName()); boolean appRefEnabled = false; if(appRef != null ){ appRefEnabled = Boolean.valueOf(appRef.getEnabled()); } return appEnabled && appRefEnabled; }
public static boolean isAppRefEnabledInTarget( Domain me, String appName, String target) { boolean found = false; Cluster containingCluster = getClusterForInstance(me, target); if (containingCluster != null) { // if this is a clustered instance, check the enable // attribute of its enclosing cluster first // and return false if the cluster level enable attribute // is false ApplicationRef clusterRef = getApplicationRefInTarget(me, appName, containingCluster.getName()); if (clusterRef == null || !Boolean.valueOf(clusterRef.getEnabled())) { return false; } } for (ApplicationRef ref : getApplicationRefsInTarget(me, target, true)) { if (ref.getRef().equals(appName)) { found = true; if (!Boolean.valueOf(ref.getEnabled())) { return false; } } } // if we found the ref(s) and the enable attribute(s) is/are true if (found) { return true; } return false; }
public static boolean isAppRefEnabledInTarget( Domain me, String appName, String target) { boolean found = false; Cluster containingCluster = getClusterForInstance(me, target); if (containingCluster != null) { // if this is a clustered instance, check the enable // attribute of its enclosing cluster first // and return false if the cluster level enable attribute // is false ApplicationRef clusterRef = getApplicationRefInTarget(me, appName, containingCluster.getName()); if (clusterRef == null || !Boolean.valueOf(clusterRef.getEnabled())) { return false; } } for (ApplicationRef ref : getApplicationRefsInTarget(me, target, true)) { if (ref.getRef().equals(appName)) { found = true; if (!Boolean.valueOf(ref.getEnabled())) { return false; } } } // if we found the ref(s) and the enable attribute(s) is/are true if (found) { return true; } return false; }
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); }
deploymentParams.description = app.getDescription(); if (Boolean.valueOf(app.getEnabled()) && appRef != null && Boolean.valueOf(appRef.getEnabled())) { deploymentParams.enabled = Boolean.TRUE; } else {
servr.getName().equals(inst.getName()) ? isNewInstanceAppRefStateEnabled : Boolean.parseBoolean(inst.getApplicationRef(appName).getEnabled())); if (Boolean.parseBoolean(clusterAppRef.getEnabled()) != isAppRefEnabledOnAnyClusterInstance) { t.enroll(clusterAppRef).setEnabled(String.valueOf(isAppRefEnabledOnAnyClusterInstance));
deploymentParams.description = app.getDescription(); if (Boolean.valueOf(app.getEnabled()) && appRef != null && Boolean.valueOf(appRef.getEnabled())) { deploymentParams.enabled = Boolean.TRUE; } else {
ApplicationRef appRef = getServer().getApplicationRef(resourceInfo.getApplicationName()); if (appRef != null) { enabled = appRef.getEnabled(); } else {
servr.getName().equals(inst.getName()) ? isNewInstanceAppRefStateEnabled : Boolean.parseBoolean(inst.getApplicationRef(appName).getEnabled())); if (Boolean.parseBoolean(clusterAppRef.getEnabled()) != isAppRefEnabledOnAnyClusterInstance) { t.enroll(clusterAppRef).setEnabled(String.valueOf(isAppRefEnabledOnAnyClusterInstance));
Server server = domain.getServers().getServer(env.getInstanceName()); ApplicationRef appRef = server.getApplicationRef(appName); if (appRef != null && Boolean.valueOf(appRef.getEnabled())) { isAppRefEnabled = true;
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 applicationRef = cluster.getApplicationRef(appName); if (applicationRef != null) { if ("true".equalsIgnoreCase(applicationRef.getEnabled())) { appEnabled = true; report.setMessage("A shared service by name [" + serviceName + "] is used by an application " +