private String buildLinkString(Iterable<LinkModel> links) { StringBuilder linksString = new StringBuilder(); for (LinkModel linkModel : links) { linksString.append("["); linksString.append(linkModel.getLink()).append(","); linksString.append(linkModel.getDescription()); linksString.append("]"); } return linksString.toString(); }
/** * Tries to find a link with the specified description and href. If it cannot, then it will return a new one. */ public LinkModel getOrCreate(String description, String href) { Iterable<Vertex> results = (List<Vertex>)getQuery().traverse(g -> g.has(LinkModel.PROPERTY_DESCRIPTION, description).has(LinkModel.PROPERTY_LINK, href)).getRawTraversal().toList(); if (!results.iterator().hasNext()) { LinkModel model = create(); model.setDescription(description); model.setLink(href); return model; } return frame(results.iterator().next()); }
/** * Attach the given link to the classification, while checking for duplicates. */ public ClassificationModel attachLink(ClassificationModel classificationModel, LinkModel linkModel) { for (LinkModel existing : classificationModel.getLinks()) { if (StringUtils.equals(existing.getLink(), linkModel.getLink())) { return classificationModel; } } classificationModel.addLink(linkModel); return classificationModel; } }
/** * Tries to find a link with the specified description and href. If it cannot, then it will return a new one. */ public LinkModel getOrCreate(String description, String href) { Iterable<Vertex> results = (List<Vertex>)getQuery().traverse(g -> g.has(LinkModel.PROPERTY_DESCRIPTION, description).has(LinkModel.PROPERTY_LINK, href)).getRawTraversal().toList(); if (!results.iterator().hasNext()) { LinkModel model = create(); model.setDescription(description); model.setLink(href); return model; } return frame(results.iterator().next()); }
/** * Attach the given link to the classification, while checking for duplicates. */ public ClassificationModel attachLink(ClassificationModel classificationModel, LinkModel linkModel) { for (LinkModel existing : classificationModel.getLinks()) { if (StringUtils.equals(existing.getLink(), linkModel.getLink())) { return classificationModel; } } classificationModel.addLink(linkModel); return classificationModel; } }
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) { ClassificationService classificationService = new ClassificationService(event.getGraphContext()); ClassificationModel classificationModel = classificationService.attachClassification(event, context, payload, IssueCategoryRegistry.MANDATORY, "WebSphere web service extension descriptor (ibm-webservices-ext)", "WebSphere Webservice Extension XML Deployment Descriptor. \n" + "This deployment descriptor extension is IBM specific and it needs to be migrated to JBossWS. \n" + "JBossWS implements the latest JAX-WS specification, which users can reference for any vendor-agnostic web service usage need. \n" + "You can migrate deployment descriptors following the links below. \n"); classificationModel.setEffort(3); GraphContext graphContext = event.getGraphContext(); LinkService linkService = new LinkService(graphContext); LinkModel documentationEAP6Link = linkService.create(); documentationEAP6Link.setDescription("JAX-WS Web Services (JBoss EAP 6)"); documentationEAP6Link.setLink( "https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Development_Guide/chap-JAX-WS_Web_Services.html"); classificationService.attachLink(classificationModel, documentationEAP6Link); LinkModel documentationEAP7Link = linkService.create(); documentationEAP7Link.setDescription("Developing JAX-WS Web Services (JBoss EAP 7)"); documentationEAP7Link.setLink( "https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/developing_web_services_applications/developing_jax_ws_web_services"); classificationService.attachLink(classificationModel, documentationEAP7Link); LinkModel documentationCommunityLink = linkService.create(); documentationCommunityLink.setDescription("Assigning Client and Endpoint Configurations (JBoss EAP 7)"); documentationCommunityLink.setLink("https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html-single/developing_web_services_applications/#ws_endpoint_assign_config"); classificationService.attachLink(classificationModel, documentationCommunityLink); TechnologyTagService technologyTagService = new TechnologyTagService(event.getGraphContext()); technologyTagService.addTagToFileModel(payload, "WebSphere WS Extension", TechnologyTagLevel.IMPORTANT); }
private String buildLinkString(Iterable<LinkModel> links) { StringBuilder linksString = new StringBuilder(); for (LinkModel linkModel : links) { linksString.append("["); linksString.append(linkModel.getLink()).append(","); linksString.append(linkModel.getDescription()); linksString.append("]"); } return linksString.toString(); }
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) { ClassificationService classificationService = new ClassificationService(event.getGraphContext()); ClassificationModel classificationModel = classificationService.attachClassification(event, context, payload, IssueCategoryRegistry.MANDATORY, "WebSphere web service extension descriptor (ibm-webservices-ext)", "WebSphere Webservice Extension XML Deployment Descriptor. \n" + "This deployment descriptor extension is IBM specific and it needs to be migrated to JBossWS. \n" + "JBossWS implements the latest JAX-WS specification, which users can reference for any vendor-agnostic web service usage need. \n" + "You can migrate deployment descriptors following the links below. \n"); classificationModel.setEffort(3); GraphContext graphContext = event.getGraphContext(); LinkService linkService = new LinkService(graphContext); LinkModel documentationEAP6Link = linkService.create(); documentationEAP6Link.setDescription("JAX-WS Web Services (JBoss EAP 6)"); documentationEAP6Link.setLink( "https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Development_Guide/chap-JAX-WS_Web_Services.html"); classificationService.attachLink(classificationModel, documentationEAP6Link); LinkModel documentationEAP7Link = linkService.create(); documentationEAP7Link.setDescription("Developing JAX-WS Web Services (JBoss EAP 7)"); documentationEAP7Link.setLink( "https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/developing_web_services_applications/developing_jax_ws_web_services"); classificationService.attachLink(classificationModel, documentationEAP7Link); LinkModel documentationCommunityLink = linkService.create(); documentationCommunityLink.setDescription("Assigning Client and Endpoint Configurations (JBoss EAP 7)"); documentationCommunityLink.setLink("https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html-single/developing_web_services_applications/#ws_endpoint_assign_config"); classificationService.attachLink(classificationModel, documentationCommunityLink); TechnologyTagService technologyTagService = new TechnologyTagService(event.getGraphContext()); technologyTagService.addTagToFileModel(payload, "WebSphere WS Extension", TechnologyTagLevel.IMPORTANT); }
private static List<Link> fromLinkModels(Iterable<LinkModel> links) { List<Link> links2 = new LinkedList<>(); for (LinkModel model : links) links2.add(new Link(model.getLink(), model.getDescription())); return links2; }
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) { ClassificationService classificationService = new ClassificationService(event.getGraphContext()); ClassificationModel classificationModel = classificationService.attachClassification(event, context, payload, IssueCategoryRegistry.MANDATORY, "WebSphere web service binding descriptor (ibm-webservices-bnd)", "WebSphere Webservice Binding XML Deployment Descriptor. \n" + "This deployment descriptor extension is IBM specific and it needs to be migrated to JBossWS. \n" + "JBossWS implements the latest JAX-WS specification, which users can reference for any vendor-agnostic web service usage need. \n" + "You can migrate deployment descriptors following the links below. \n"); classificationModel.setEffort(3); GraphContext graphContext = event.getGraphContext(); LinkService linkService = new LinkService(graphContext); LinkModel documentationEAP6Link = linkService.create(); documentationEAP6Link.setDescription("JAX-WS Web Services (JBoss EAP 6)"); documentationEAP6Link.setLink( "https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Development_Guide/chap-JAX-WS_Web_Services.html"); classificationService.attachLink(classificationModel, documentationEAP6Link); LinkModel documentationEAP7Link = linkService.create(); documentationEAP7Link.setDescription("Developing JAX-WS Web Services (JBoss EAP 7)"); documentationEAP7Link.setLink( "https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/developing_web_services_applications/developing_jax_ws_web_services"); classificationService.attachLink(classificationModel, documentationEAP7Link); LinkModel documentationCommunityLink = linkService.create(); documentationCommunityLink.setDescription("Assigning Client and Endpoint Configurations (JBoss EAP 7)"); documentationCommunityLink.setLink("https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html-single/developing_web_services_applications/#ws_endpoint_assign_config"); classificationService.attachLink(classificationModel, documentationCommunityLink); TechnologyTagService technologyTagService = new TechnologyTagService(event.getGraphContext()); technologyTagService.addTagToFileModel(payload, "WebSphere WS Binding", TechnologyTagLevel.IMPORTANT); }
public Link from(LinkModel m) { return new Link(m.getLink(), m.getDescription()); } };
@Override public void perform(GraphRewrite event, EvaluationContext context, XmlFileModel payload) { ClassificationService classificationService = new ClassificationService(event.getGraphContext()); ClassificationModel classificationModel = classificationService.attachClassification(event, context, payload, IssueCategoryRegistry.MANDATORY, "WebSphere web service binding descriptor (ibm-webservices-bnd)", "WebSphere Webservice Binding XML Deployment Descriptor. \n" + "This deployment descriptor extension is IBM specific and it needs to be migrated to JBossWS. \n" + "JBossWS implements the latest JAX-WS specification, which users can reference for any vendor-agnostic web service usage need. \n" + "You can migrate deployment descriptors following the links below. \n"); classificationModel.setEffort(3); GraphContext graphContext = event.getGraphContext(); LinkService linkService = new LinkService(graphContext); LinkModel documentationEAP6Link = linkService.create(); documentationEAP6Link.setDescription("JAX-WS Web Services (JBoss EAP 6)"); documentationEAP6Link.setLink( "https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Development_Guide/chap-JAX-WS_Web_Services.html"); classificationService.attachLink(classificationModel, documentationEAP6Link); LinkModel documentationEAP7Link = linkService.create(); documentationEAP7Link.setDescription("Developing JAX-WS Web Services (JBoss EAP 7)"); documentationEAP7Link.setLink( "https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/developing_web_services_applications/developing_jax_ws_web_services"); classificationService.attachLink(classificationModel, documentationEAP7Link); LinkModel documentationCommunityLink = linkService.create(); documentationCommunityLink.setDescription("Assigning Client and Endpoint Configurations (JBoss EAP 7)"); documentationCommunityLink.setLink("https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html-single/developing_web_services_applications/#ws_endpoint_assign_config"); classificationService.attachLink(classificationModel, documentationCommunityLink); TechnologyTagService technologyTagService = new TechnologyTagService(event.getGraphContext()); technologyTagService.addTagToFileModel(payload, "WebSphere WS Binding", TechnologyTagLevel.IMPORTANT); }
public Link from(LinkModel m) { return new Link(m.getLink(), m.getDescription()); } };
link.setDescription("Websphere AS - EJB 3.0 application bindings overview"); link.setLink("https://www.ibm.com/support/knowledgecenter/en/SSAW57_7.0.0/com.ibm.websphere.nd.doc/info/ae/ae/cejb_bindingsejbfp.html"); ejb3RefLink.setDescription("EAP 7 - jboss-ejb3.xml Deployment Descriptor Reference"); ejb3RefLink.setLink("https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html-single/developing_ejb_applications/#jboss_ejb3_xml_deployment_descriptor_reference"); classificationService.attachLink(classificationModel, ejb3RefLink); ejb3RefLink_.setDescription("EAP 6 - jboss-ejb3.xml Deployment Descriptor Reference"); ejb3RefLink_.setLink("https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html-single/Development_Guide/index.html#jboss-ejb3xml_Deployment_Descriptor_Reference"); classificationService.attachLink(classificationModel, ejb3RefLink_);
private static List<Link> fromLinkModels(Iterable<LinkModel> links) { List<Link> links2 = new LinkedList<>(); for (LinkModel model : links) links2.add(new Link(model.getLink(), model.getDescription())); return links2; }
link.setDescription("Websphere AS - EJB 3.0 application bindings overview"); link.setLink("https://www.ibm.com/support/knowledgecenter/en/SSAW57_7.0.0/com.ibm.websphere.nd.doc/info/ae/ae/cejb_bindingsejbfp.html"); ejb3RefLink.setDescription("EAP 7 - jboss-ejb3.xml Deployment Descriptor Reference"); ejb3RefLink.setLink("https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html-single/developing_ejb_applications/#jboss_ejb3_xml_deployment_descriptor_reference"); classificationService.attachLink(classificationModel, ejb3RefLink); ejb3RefLink_.setDescription("EAP 6 - jboss-ejb3.xml Deployment Descriptor Reference"); ejb3RefLink_.setLink("https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html-single/Development_Guide/index.html#jboss-ejb3xml_Deployment_Descriptor_Reference"); classificationService.attachLink(classificationModel, ejb3RefLink_);
private static List<Link> asLinks(Iterable<LinkModel> linkModels) { List<Link> links = new ArrayList<>(); for (LinkModel linkModel : linkModels) { LinkImpl link = new LinkImpl(); link.setDescription(linkModel.getDescription()); link.setUrl(linkModel.getLink()); links.add(link); } return links; }
linkModel.setDescription(description); linkModel.setLink(xsltTransformationService.getRelativeTransformedXSLTPath(payload).resolve(fileName).toString()); payload.addLinkToTransformedFile(linkModel);
private static List<Link> asLinks(Iterable<LinkModel> linkModels) { List<Link> links = new ArrayList<>(); for (LinkModel linkModel : linkModels) { LinkImpl link = new LinkImpl(); link.setDescription(linkModel.getDescription()); link.setUrl(linkModel.getLink()); links.add(link); } return links; }
link.setDescription("JBoss Web XML Descriptor - Generated by " + Util.WINDUP_BRAND_NAME_LONG); link.setLink(applicationReportModel.getReportFilename()); generatedDescriptor.setDescription("JBoss Web XML Descriptor - Generated by " + Util.WINDUP_BRAND_NAME_LONG); generatedDescriptor.setLink(applicationReportModel.getReportFilename());