@Override public Object getValue(HttpContext c) { return i.getValue(); } };
for (Map.Entry<Method, Injectable<?>> e : singletons.entrySet()) { singletonSetters[i] = e.getKey(); singletonSetterValues[i++] = e.getValue().getValue();
for (Map.Entry<Field, Injectable<?>> e : singletons.entrySet()) { singletonFields[i] = e.getKey(); singletonFieldValues[i++] = e.getValue().getValue();
@Override public Object getValue(HttpContext c) { return i.getValue(); } };
@Override public Object getValue(HttpContext c) { return i.getValue(); } };
@Override protected final XMLStreamReader getXMLStreamReader(Class<?> elementType, MediaType mediaType, Unmarshaller u, InputStream entityStream) throws XMLStreamException { return xif.getValue().createXMLStreamReader(entityStream); }
@Override protected final XMLStreamReader getXMLStreamReader(Class<?> elementType, MediaType mediaType, Unmarshaller u, InputStream entityStream) throws XMLStreamException { return xif.getValue().createXMLStreamReader(entityStream); }
public Document readFrom( Class<Document> type, Type genericType, Annotation annotations[], MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException { try { return dbf.getValue().newDocumentBuilder().parse(entityStream); } catch (SAXException ex) { throw new WebApplicationException(ex, Status.BAD_REQUEST); } catch (ParserConfigurationException ex) { throw new WebApplicationException(ex, Status.INTERNAL_SERVER_ERROR); } }
public Document readFrom( Class<Document> type, Type genericType, Annotation annotations[], MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException { try { return dbf.getValue().newDocumentBuilder().parse(entityStream); } catch (SAXException ex) { throw new WebApplicationException(ex, Status.BAD_REQUEST); } catch (ParserConfigurationException ex) { throw new WebApplicationException(ex, Status.INTERNAL_SERVER_ERROR); } }
@Override protected Object readFrom(Class<Object> type, MediaType mediaType, Unmarshaller u, InputStream entityStream) throws JAXBException { final SAXSource s = getSAXSource(spf.getValue(), entityStream); if (type.isAnnotationPresent(XmlRootElement.class)) { return u.unmarshal(s); } else { return u.unmarshal(s, type).getValue(); } } }
protected final JAXBElement<?> readFrom(Class<?> type, MediaType mediaType, Unmarshaller u, InputStream entityStream) throws JAXBException { return u.unmarshal(getSAXSource(spf.getValue(), entityStream), type); }
protected final JAXBElement<?> readFrom(Class<?> type, MediaType mediaType, Unmarshaller u, InputStream entityStream) throws JAXBException { return u.unmarshal(getSAXSource(spf.getValue(), entityStream), type); }
@Override protected Object readFrom(Class<Object> type, MediaType mediaType, Unmarshaller u, InputStream entityStream) throws JAXBException { final SAXSource s = getSAXSource(spf.getValue(), entityStream); if (type.isAnnotationPresent(XmlRootElement.class)) { return u.unmarshal(s); } else { return u.unmarshal(s, type).getValue(); } } }
public DOMSource readFrom( Class<DOMSource> t, Type gt, Annotation[] as, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException { try { Document d = dbf.getValue().newDocumentBuilder().parse(entityStream); return new DOMSource(d); } catch (SAXParseException ex) { throw new WebApplicationException(ex, Status.BAD_REQUEST); } catch (SAXException ex) { throw new WebApplicationException(ex, Status.INTERNAL_SERVER_ERROR); } catch (ParserConfigurationException ex) { throw new WebApplicationException(ex, Status.INTERNAL_SERVER_ERROR); } } }
public SAXSource readFrom( Class<SAXSource> t, Type gt, Annotation[] as, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException { try { return new SAXSource(spf.getValue().newSAXParser().getXMLReader(), new InputSource(entityStream)); } catch (SAXParseException ex) { throw new WebApplicationException(ex, Status.BAD_REQUEST); } catch (SAXException ex) { throw new WebApplicationException(ex, Status.INTERNAL_SERVER_ERROR); } catch (ParserConfigurationException ex) { throw new WebApplicationException(ex, Status.INTERNAL_SERVER_ERROR); } } }
public Object readFrom( Class<Object> type, Type genericType, Annotation annotations[], MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException { try { return getUnmarshaller(type, mediaType). unmarshal(getSAXSource(spf.getValue(), entityStream)); } catch (UnmarshalException ex) { throw new WebApplicationException(ex, Status.BAD_REQUEST); } catch (JAXBException ex) { throw new WebApplicationException(ex, Status.INTERNAL_SERVER_ERROR); } }
public Object readFrom( Class<Object> type, Type genericType, Annotation annotations[], MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException { try { return getUnmarshaller(type, mediaType). unmarshal(getSAXSource(spf.getValue(), entityStream)); } catch (UnmarshalException ex) { throw new WebApplicationException(ex, Status.BAD_REQUEST); } catch (JAXBException ex) { throw new WebApplicationException(ex, Status.INTERNAL_SERVER_ERROR); } }
@Override public T create(CreationalContext<T> creationalContext) { Injectable<T> injectable = lookupWebApplication().getServerInjectableProviderFactory(). getInjectable(qualifier.annotationType(), null, qualifier, getBeanClass(), ComponentScope.Singleton); if (injectable == null) { Errors.error("No injectable for " + getBeanClass().getName()); return null; } return injectable.getValue(); } }
@Override public T create(CreationalContext<T> creationalContext) { Injectable<T> injectable = lookupWebApplication().getServerInjectableProviderFactory(). getInjectable(qualifier.annotationType(), null, qualifier, getBeanClass(), ComponentScope.Singleton); if (injectable == null) { Errors.error("No injectable for " + getBeanClass().getName()); return null; } return injectable.getValue(); } }
@Override public T create(CreationalContext<T> creationalContext) { Injectable<T> injectable = lookupWebApplication().getServerInjectableProviderFactory(). getInjectable(qualifier.annotationType(), null, qualifier, getBeanClass(), ComponentScope.Singleton); if (injectable == null) { Errors.error("No injectable for " + getBeanClass().getName()); return null; } return injectable.getValue(); } }