/** * @param eid * @return */ public EndpointInfo getEndpoint(ID eid) { for (EndpointInfo ei : endpoints) { if (eid.equals(ei.getName())) { return ei; } } return null; }
private List<EndpointInfo> getConsolidatedEndpoints( ServletContext context, List<EndpointInfo> ddEndpointList, Set<Class<?>> wsClassSet, List<Source> metadata) { List<EndpointInfo> consList = new ArrayList<>(); for (Class<?> c : wsClassSet) { EndpointInfo endpointInfo = findEndpointInfo(ddEndpointList, c); endpointInfo.implType = c; if (endpointInfo.servletLink == null) { endpointInfo.servletLink = getDefaultServletLink(c); } ServletRegistration reg = context.getServletRegistration(endpointInfo.servletLink); if (reg != null) { Collection<String> mappings = reg.getMappings(); if (mappings.isEmpty()) { endpointInfo.urlPattern = getDefaultUrlPattern(c); } else { endpointInfo.urlPattern = mappings.iterator().next(); } } else { endpointInfo.urlPattern = getDefaultUrlPattern(c); } endpointInfo.features = new WebServiceFeature[0]; endpointInfo.metadata = metadata; consList.add(endpointInfo); } return consList; }
public void addEndpoint(EndpointInfo ep) { EndpointInfo ei = getEndpoint(ep.getName()); if (ei != null) { endpoints.remove(ei); } endpoints.add(ep); }