public static String GenerateLink(String relativeUrl, ServicePolicy pol) { if (pol.getPolicyType() == null || pol.getPolicyType() == PolicyType.TRANSACTIONAL) { return "<a href=\"" + relativeUrl + "/TransactionLogViewer.jsp?url=" + URLEncoder.encode(pol.getURL()) + "\">View recent transactions</a><br>" + "<a href=\"" + relativeUrl + "/availability.jsp?url=" + URLEncoder.encode(pol.getURL()) + "\">View availability data</a>"; } if (pol.getPolicyType() == PolicyType.STATISTICAL) { return "<a href=\"" + relativeUrl + "/messageBrokerDetail.jsp?url=" + URLEncoder.encode(pol.getURL()) + "\">View statistics</a><br>" + "<a href=\"" + relativeUrl + "/availability.jsp?url=" + URLEncoder.encode(pol.getURL()) + "\">View availability data</a>"; } if (pol.getPolicyType() == PolicyType.STATUS) { return "<a href=\"" + relativeUrl + "/availability.jsp?url=" + URLEncoder.encode(pol.getURL()) + "\">View availability data</a>"; } return "<a href=\"" + relativeUrl + "\">fgsms</a>"; }
Class<SLAActionInterface> forName = (Class<SLAActionInterface>) Class.forName(action.get(i).getImplementingClassName()); SLAActionInterface newInstance = forName.newInstance(); if (!newInstance.GetAppliesTo().contains(pol.getPolicyType())) { ref.set(ref.get() + " The specified action, class name=" + action.get(i).getImplementingClassName() + " does not apply to the policy type of " + pol.getPolicyType().value()); return false;
servicePolicyQueue.get(k).getPolicyType(), ispooled, servicePolicyQueue.get(k));
Class<SLARuleInterface> forName = (Class<SLARuleInterface>) Class.forName(r.getClassName()); SLARuleInterface newInstance = forName.newInstance(); if (!newInstance.GetAppliesTo().contains(pol.getPolicyType())) { ref.set(ref.get() + " The specified Rule, class name=" + r.getClassName() + " does not apply to the policy type of " + pol.getPolicyType().value()); return false;
throw new IllegalArgumentException("policy"); if (policy.getPolicyType() == null) { throw new IllegalArgumentException("policy"); comm.setInt(6, policy.getPolicyType().ordinal()); if (policy instanceof TransactionalWebServicePolicy) { TransactionalWebServicePolicy tp = (TransactionalWebServicePolicy) policy;