+ RuleType ruleType = (RuleType ) ite.next();
+ AdviceExpressionsType adviceExpressionsType = ruleType.getAdviceExpressions();
+ if (adviceExpressionsType != null) {
+ List<AdviceExpressionType> adviceExpressionTypes = adviceExpressionsType.getAdviceExpression();
+ if (adviceExpressionTypes != null && !adviceExpressionTypes.isEmpty()) {
+ for (Iterator iterator = adviceExpressionTypes
+ .iterator(); iterator.hasNext();) {
+ AdviceExpressionType adviceExpressionType = (AdviceExpressionType) iterator
+ .next();
+ if (adviceExpressionType.getAdviceId() != null && !"".equals(adviceExpressionType.getAdviceId()) && ("configID".equals(adviceExpressionType.getAdviceId())
+ || "faultID".equals(adviceExpressionType.getAdviceId()) || "PMID".equals(adviceExpressionType.getAdviceId())||"firewallConfigID".equals(adviceExpressionType.getAdviceId()) || "OptimizationID".equals(adviceExpressionType.getAdviceId())
+ || "MSID".equals(adviceExpressionType.getAdviceId())) || "GocID".equals(adviceExpressionType.getAdviceId())||"GocHPID".equals(adviceExpressionType.getAdviceId())||"BRMSRAWID".equals(adviceExpressionType.getAdviceId())
+ || "BRMSPARAMID".equals(adviceExpressionType.getAdviceId())|| "HPSuppID".equals(adviceExpressionType.getAdviceId()) || "HPFlapID".equals(adviceExpressionType.getAdviceId()) || "HPOverID".equals(adviceExpressionType.getAdviceId()))
+ {
+ List<AttributeAssignmentExpressionType> attributeAssignmentExpressionTypes = adviceExpressionType.getAttributeAssignmentExpression();
+ if (attributeAssignmentExpressionTypes != null && !attributeAssignmentExpressionTypes.isEmpty()) {
+ for (Iterator iterator2 = attributeAssignmentExpressionTypes
+ .iterator(); iterator2.hasNext();) {
+ AttributeAssignmentExpressionType attributeAssignmentExpressionType = (AttributeAssignmentExpressionType) iterator2
+ .next();
+ if ("URLID".equals(attributeAssignmentExpressionType.getAttributeId())) {
+ JAXBElement<AttributeValueType> attributeValueType = (JAXBElement<AttributeValueType>) attributeAssignmentExpressionType.getExpression();
+ AttributeValueType attributeValueType1 = attributeValueType.getValue();
+ String configUrl = "$URL";
+ String urlVal = (String) attributeValueType1.getContent().get(0);
+ String origExtension = urlVal.substring(urlVal.lastIndexOf('.')+1).trim();
+ extension = origExtension;
+ attributeValueType1.getContent().clear();
+ String txtFileName = filename.getFileName().toString();
+ txtFileName = txtFileName.substring(0, txtFileName.lastIndexOf(".")+1) + origExtension;
+ txtFileName = configUrl+ File.separator + "Config" + File.separator + domain + txtFileName;
+ attributeValueType1.getContent().add(txtFileName);
+ } else if ("PolicyName".equals(attributeAssignmentExpressionType.getAttributeId())) {
+ JAXBElement<AttributeValueType> attributeValueType = (JAXBElement<AttributeValueType>) attributeAssignmentExpressionType.getExpression();
+ AttributeValueType attributeValueType1 = attributeValueType.getValue();
+ List<Object> contents = attributeValueType1.getContent();
+ if (contents != null && !contents.isEmpty()) {
+ String tmp = filename.getFileName()+"";
+ String newName = tmp.substring(0, tmp.lastIndexOf("."));
+ attributeValueType1.getContent().clear();
+ attributeValueType1.getContent().add(domain + newName + "." + "xml");
+ }