public static InjectionReferences getInjectionReferences() { return ProxyFactory.getInjectionReferences(); }
@Produces @Dependent public JobContext getJobContext() { if (ProxyFactory.getInjectionReferences() != null) { return ProxyFactory.getInjectionReferences().getJobContext(); } else { return null; } }
@Produces @Dependent public StepContext getStepContext() { if (ProxyFactory.getInjectionReferences() != null) { return ProxyFactory.getInjectionReferences().getStepContext(); } else { return null; } }
@Produces @Dependent public StepContext getStepContext() { if (ProxyFactory.getInjectionReferences() != null) { return ProxyFactory.getInjectionReferences().getStepContext(); } else { return null; } } }
@Produces @Dependent public JobContext getJobContext() { if (ProxyFactory.getInjectionReferences() != null) { return ProxyFactory.getInjectionReferences().getJobContext(); } else { return null; } }
public static InjectionReferencesCdi getInjectionReferences() { return new InjectionReferencesCdi( ProxyFactory.getInjectionReferences() ); }
DependencyInjectionUtility.injectReferences(loadedArtifact, ProxyFactory.getInjectionReferences());
DependencyInjectionUtility.injectReferences(loadedArtifact, ProxyFactory.getInjectionReferences());
@Produces @Dependent @BatchProperty public String produceProperty(InjectionPoint injectionPoint) { //Seems like this is a CDI bug where null injection points are getting passed in. //We should be able to ignore these as a workaround. if (injectionPoint != null) { if (ProxyFactory.getInjectionReferences() == null) { return null; } BatchProperty batchPropAnnotation = injectionPoint.getAnnotated().getAnnotation(BatchProperty.class); // If a name is not supplied the batch property name defaults to // the field name String batchPropName; if (batchPropAnnotation.name().equals("")) { batchPropName = injectionPoint.getMember().getName(); } else { batchPropName = batchPropAnnotation.name(); } List<Property> propList = ProxyFactory.getInjectionReferences().getProps(); return DependencyInjectionUtility.getPropertyValue(propList, batchPropName); } return null; }
@Produces @Dependent @BatchProperty public String produceProperty(InjectionPoint injectionPoint) { //Seems like this is a CDI bug where null injection points are getting passed in. //We should be able to ignore these as a workaround. if (injectionPoint != null) { if (ProxyFactory.getInjectionReferences() == null) { return null; } BatchProperty batchPropAnnotation = injectionPoint.getAnnotated().getAnnotation(BatchProperty.class); // If a name is not supplied the batch property name defaults to // the field name String batchPropName = null; if (batchPropAnnotation.name().equals("")) { batchPropName = injectionPoint.getMember().getName(); } else { batchPropName = batchPropAnnotation.name(); } List<Property> propList = ProxyFactory.getInjectionReferences().getProps(); String propValue = DependencyInjectionUtility.getPropertyValue(propList, batchPropName); return propValue; } return null; }
DependencyInjectionUtility.injectReferences(loadedArtifact, ProxyFactory.getInjectionReferences());