Search in sources :

Example 1 with InjectableResourceProvider

use of org.apache.deltaspike.core.api.resourceloader.InjectableResourceProvider in project deltaspike by apache.

the class InjectableResourceProducer method getInputStreams.

@Produces
@InjectableResource(resourceProvider = InjectableResourceProvider.class, location = "")
public List<InputStream> getInputStreams(final InjectionPoint injectionPoint) {
    InjectableResource injectableResource = getAnnotation(injectionPoint);
    InjectableResourceProvider provider = BeanProvider.getContextualReference(injectableResource.resourceProvider());
    return provider.readStreams(injectableResource);
}
Also used : InjectableResourceProvider(org.apache.deltaspike.core.api.resourceloader.InjectableResourceProvider) InjectableResource(org.apache.deltaspike.core.api.resourceloader.InjectableResource) Produces(javax.enterprise.inject.Produces) InjectableResource(org.apache.deltaspike.core.api.resourceloader.InjectableResource)

Example 2 with InjectableResourceProvider

use of org.apache.deltaspike.core.api.resourceloader.InjectableResourceProvider in project deltaspike by apache.

the class InjectableResourceProducer method getInputStream.

@Produces
@InjectableResource(resourceProvider = InjectableResourceProvider.class, location = "")
public InputStream getInputStream(final InjectionPoint injectionPoint) {
    InjectableResource injectableResource = getAnnotation(injectionPoint);
    InjectableResourceProvider provider = BeanProvider.getContextualReference(injectableResource.resourceProvider());
    final InputStream is = provider.readStream(injectableResource);
    return is;
}
Also used : InjectableResourceProvider(org.apache.deltaspike.core.api.resourceloader.InjectableResourceProvider) InjectableResource(org.apache.deltaspike.core.api.resourceloader.InjectableResource) InputStream(java.io.InputStream) Produces(javax.enterprise.inject.Produces) InjectableResource(org.apache.deltaspike.core.api.resourceloader.InjectableResource)

Example 3 with InjectableResourceProvider

use of org.apache.deltaspike.core.api.resourceloader.InjectableResourceProvider in project deltaspike by apache.

the class InjectableResourceProducer method getProperties.

@Produces
@InjectableResource(resourceProvider = InjectableResourceProvider.class, location = "")
public Properties getProperties(final InjectionPoint injectionPoint) throws IOException {
    InjectableResource injectableResource = getAnnotation(injectionPoint);
    InjectableResourceProvider provider = BeanProvider.getContextualReference(injectableResource.resourceProvider());
    final Properties properties = provider.readProperties(injectableResource);
    return properties;
}
Also used : InjectableResourceProvider(org.apache.deltaspike.core.api.resourceloader.InjectableResourceProvider) InjectableResource(org.apache.deltaspike.core.api.resourceloader.InjectableResource) Properties(java.util.Properties) Produces(javax.enterprise.inject.Produces) InjectableResource(org.apache.deltaspike.core.api.resourceloader.InjectableResource)

Aggregations

Produces (javax.enterprise.inject.Produces)3 InjectableResource (org.apache.deltaspike.core.api.resourceloader.InjectableResource)3 InjectableResourceProvider (org.apache.deltaspike.core.api.resourceloader.InjectableResourceProvider)3 InputStream (java.io.InputStream)1 Properties (java.util.Properties)1