private List<EnvironmentReferenceModel> processEnvironmentReference(GraphContext context, Element element) { EnvironmentReferenceService environmentReferenceService = new EnvironmentReferenceService(context); List<EnvironmentReferenceModel> resources = new LinkedList<EnvironmentReferenceModel>(); // find JMS references... List<Element> queueReferences = $(element).find("resource-env-ref").get(); for (Element e : queueReferences) { String type = $(e).child("resource-env-ref-type").text(); String name = $(e).child("resource-env-ref-name").text(); type = StringUtils.trim(type); name = StringUtils.trim(name); EnvironmentReferenceModel ref = environmentReferenceService.findEnvironmentReference(name, type); if (ref == null) { ref = environmentReferenceService.create(); ref.setName(name); ref.setReferenceType(type); } resources.add(ref); } return resources; }
private List<EnvironmentReferenceModel> processEnvironmentReference(GraphContext context, Element element) { EnvironmentReferenceService environmentReferenceService = new EnvironmentReferenceService(context); List<EnvironmentReferenceModel> resources = new ArrayList<>(); // find JMS references... List<Element> queueReferences = $(element).find("resource-ref").get(); for (Element e : queueReferences) { String id = $(e).attr("id"); String type = $(e).child("res-type").text(); String name = $(e).child("res-ref-name").text(); type = StringUtils.trim(type); name = StringUtils.trim(name); EnvironmentReferenceModel ref = environmentReferenceService.findEnvironmentReference(name, type); if (ref == null) { ref = environmentReferenceService.create(); ref.setName(name); ref.setReferenceType(type); } ref.setReferenceId(id); resources.add(ref); } return resources; } }
private List<EnvironmentReferenceModel> processEnvironmentReference(GraphContext context, Element element) { EnvironmentReferenceService environmentReferenceService = new EnvironmentReferenceService(context); List<EnvironmentReferenceModel> resources = new ArrayList<>(); // find JMS references... for (Element resourceRef : $(element).find("resource-ref").get()) { processElement(environmentReferenceService, resources, resourceRef, "res-type", "res-ref-name", EnvironmentReferenceTagType.RESOURCE_REF); } for (Element resourceRef : $(element).find("ejb-ref").get()) { processElement(environmentReferenceService, resources, resourceRef, "ejb-ref-type", "ejb-ref-name", EnvironmentReferenceTagType.EJB_REF); } for (Element resourceRef : $(element).find("ejb-local-ref").get()) { processElement(environmentReferenceService, resources, resourceRef, "ejb-ref-type", "ejb-ref-name", EnvironmentReferenceTagType.EJB_LOCAL_REF); } for (Element resourceRef : $(element).find("message-destination-ref").get()) { processElement(environmentReferenceService, resources, resourceRef, "message-destination-type", "message-destination-ref-name", EnvironmentReferenceTagType.MSG_DESTINATION_REF); } return resources; }
private List<EnvironmentReferenceModel> processEnvironmentReference(GraphContext context, Element element) { EnvironmentReferenceService environmentReferenceService = new EnvironmentReferenceService(context); List<EnvironmentReferenceModel> resources = new ArrayList<>(); // find JMS references... for (Element resourceRef : $(element).find("resource-ref").get()) { processElement(environmentReferenceService, resources, resourceRef, "res-type", "res-ref-name", EnvironmentReferenceTagType.RESOURCE_REF); } for (Element resourceRef : $(element).find("ejb-ref").get()) { processElement(environmentReferenceService, resources, resourceRef, "ejb-ref-type", "ejb-ref-name", EnvironmentReferenceTagType.EJB_REF); } for (Element resourceRef : $(element).find("ejb-local-ref").get()) { processElement(environmentReferenceService, resources, resourceRef, "ejb-ref-type", "ejb-ref-name", EnvironmentReferenceTagType.EJB_LOCAL_REF); } for (Element resourceRef : $(element).find("message-destination-ref").get()) { processElement(environmentReferenceService, resources, resourceRef, "message-destination-type", "message-destination-ref-name", EnvironmentReferenceTagType.MSG_DESTINATION_REF); } return resources; }
private List<EnvironmentReferenceModel> processEnvironmentReference(GraphContext context, Element element) EnvironmentReferenceService environmentReferenceService = new EnvironmentReferenceService(context); List<EnvironmentReferenceModel> resources = new LinkedList<>();
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext());
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext());
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) { EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); TechnologyTagService technologyTagService = new TechnologyTagService(event.getGraphContext()); Document doc = xmlFileService.loadDocumentQuiet(event, context, payload); VendorSpecificationExtensionService vendorSpecificationService = new VendorSpecificationExtensionService(event.getGraphContext()); // mark as vendor extension; create reference to web.xml vendorSpecificationService.associateAsVendorExtension(payload, "web.xml"); technologyTagService.addTagToFileModel(payload, "WebLogic Web XML", TechnologyTagLevel.IMPORTANT); Set<ProjectModel> applications = ProjectTraversalCache.getApplicationsForProject(event.getGraphContext(), payload.getProjectModel()); for (Element resourceRef : $(doc).find("resource-description").get()) { String jndiLocation = $(resourceRef).child("jndi-name").text(); String resourceName = $(resourceRef).child("res-ref-name").text(); if (StringUtils.isNotBlank(jndiLocation)) { JNDIResourceModel resource = jndiResourceService.createUnique(applications, jndiLocation); LOG.info("JNDI: " + jndiLocation + " Resource: " + resourceName); // now, look up the resource by name, and associate the type which is resolved by DiscoverWebXmlRuleProvider for (EnvironmentReferenceModel ref : envRefService.findAllByProperty(EnvironmentReferenceModel.NAME, resourceName)) { envRefService.associateEnvironmentToJndi(resource, ref); } } } }
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) { EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); TechnologyTagService technologyTagService = new TechnologyTagService(event.getGraphContext()); Document doc = xmlFileService.loadDocumentQuiet(event, context, payload); VendorSpecificationExtensionService vendorSpecificationService = new VendorSpecificationExtensionService(event.getGraphContext()); // mark as vendor extension; create reference to web.xml vendorSpecificationService.associateAsVendorExtension(payload, "web.xml"); technologyTagService.addTagToFileModel(payload, "WebLogic Web XML", TechnologyTagLevel.IMPORTANT); Set<ProjectModel> applications = ProjectTraversalCache.getApplicationsForProject(event.getGraphContext(), payload.getProjectModel()); for (Element resourceRef : $(doc).find("resource-description").get()) { String jndiLocation = $(resourceRef).child("jndi-name").text(); String resourceName = $(resourceRef).child("res-ref-name").text(); if (StringUtils.isNotBlank(jndiLocation)) { JNDIResourceModel resource = jndiResourceService.createUnique(applications, jndiLocation); LOG.info("JNDI: " + jndiLocation + " Resource: " + resourceName); // now, look up the resource by name, and associate the type which is resolved by DiscoverWebXmlRuleProvider for (EnvironmentReferenceModel ref : envRefService.findAllByProperty(EnvironmentReferenceModel.NAME, resourceName)) { envRefService.associateEnvironmentToJndi(resource, ref); } } } }
EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext());
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext());
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext());
EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext());
EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext());
EnvironmentReferenceService envRefService = new EnvironmentReferenceService(graphContext);
EnvironmentReferenceService envRefService = new EnvironmentReferenceService(graphContext);
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) { EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); TechnologyTagService technologyTagService = new TechnologyTagService(event.getGraphContext()); // Classification done by websphere-xml-06000 - see WINDUPRULE-164 Document doc = xmlFileService.loadDocumentQuiet(event, context, payload); VendorSpecificationExtensionService vendorSpecificationService = new VendorSpecificationExtensionService(event.getGraphContext()); // mark as vendor extension; create reference to web.xml vendorSpecificationService.associateAsVendorExtension(payload, "web.xml"); TechnologyTagModel technologyTag = technologyTagService.addTagToFileModel(payload, "WebSphere Web XML", TechnologyTagLevel.IMPORTANT); Set<ProjectModel> applications = ProjectTraversalCache.getApplicationsForProject(event.getGraphContext(), payload.getProjectModel()); for (Element resourceRef : $(doc).find("resRefBindings").get()) { processBinding(envRefService, jndiResourceService, applications, resourceRef, "bindingResourceRef"); } for (Element resourceRef : $(doc).find("ejbRefBindings").get()) { processBinding(envRefService, jndiResourceService, applications, resourceRef, "bindingEjbRef"); } for (Element resourceRef : $(doc).find("messageDestinationRefBindings").get()) { processBinding(envRefService, jndiResourceService, applications, resourceRef, "bindingMessageDestinationRef"); } }
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) { EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); TechnologyTagService technologyTagService = new TechnologyTagService(event.getGraphContext()); // Classification done by websphere-xml-06000 - see WINDUPRULE-164 Document doc = xmlFileService.loadDocumentQuiet(event, context, payload); VendorSpecificationExtensionService vendorSpecificationService = new VendorSpecificationExtensionService(event.getGraphContext()); // mark as vendor extension; create reference to web.xml vendorSpecificationService.associateAsVendorExtension(payload, "web.xml"); TechnologyTagModel technologyTag = technologyTagService.addTagToFileModel(payload, "WebSphere Web XML", TechnologyTagLevel.IMPORTANT); Set<ProjectModel> applications = ProjectTraversalCache.getApplicationsForProject(event.getGraphContext(), payload.getProjectModel()); for (Element resourceRef : $(doc).find("resRefBindings").get()) { processBinding(envRefService, jndiResourceService, applications, resourceRef, "bindingResourceRef"); } for (Element resourceRef : $(doc).find("ejbRefBindings").get()) { processBinding(envRefService, jndiResourceService, applications, resourceRef, "bindingEjbRef"); } for (Element resourceRef : $(doc).find("messageDestinationRefBindings").get()) { processBinding(envRefService, jndiResourceService, applications, resourceRef, "bindingMessageDestinationRef"); } }
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext());
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) EnvironmentReferenceService envRefService = new EnvironmentReferenceService(event.getGraphContext()); JNDIResourceService jndiResourceService = new JNDIResourceService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext());