public static void contributeBindingSource( MappedConfiguration<String, BindingFactory> configuration, @InjectService("SelectorBindingFactory") BindingFactory selectorBindingFactory) { configuration.add("selector", selectorBindingFactory); }
public class FieldInjectionViaInjectService { @InjectService("FredService") private Runnable fred; public Runnable getFred() { return fred; } @Override public String toString() { return "<FieldInjectionViaInjectService>"; } }
public Greeter buildGreeter(@InjectService("${greeter}") Greeter greeter) { return greeter; }
public void contributeNoParameter(@InjectService("foo.Bar") UpcaseService service) { } }
public static void contributeMasterDispatcher(OrderedConfiguration<Dispatcher> configuration, @InjectService("js") Dispatcher js) { configuration.add("js", js, "before:Asset"); }
public MultipleConstructorsAutobuildService(@InjectService("ToUpperCaseStringHolder")StringHolder delegate) { this.delegate = delegate; }
public RecursiveConstructorModule(@InjectService("Runnable") Runnable r) { // Invoking a method on the service proxy is going to cause a recursive attempt to // instantiate the module. Hilarity ensues. r.run(); }
public ResourceStreamerImpl(Request request, Response response, StreamableResourceSource streamableResourceSource, OperationTracker tracker, @Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode, ResourceChangeTracker resourceChangeTracker, @Symbol(SymbolConstants.OMIT_EXPIRATION_CACHE_CONTROL_HEADER) String omitExpirationCacheControlHeader, @InjectService("ClasspathAssetFactory") AssetFactory classpathAssetFactory, @InjectService("ContextAssetFactory") AssetFactory contextAssetFactory) { this.request = request; this.response = response; this.streamableResourceSource = streamableResourceSource; this.tracker = tracker; this.productionMode = productionMode; this.resourceChangeTracker = resourceChangeTracker; this.omitExpirationCacheControlHeader = omitExpirationCacheControlHeader; this.classpathAssetFactory = classpathAssetFactory; this.contextAssetFactory = contextAssetFactory; }
/** * Just wanted to get code coverage for using @InjectService here. */ @Autowired public SpringStatusProvider(@InjectService("Context") Context context, Upcase upcase) { this.context = context; this.upcase = upcase; }
public FieService build_injected(@InjectService("Foe") FoeService foe) { assertSame(expectedFoe, foe); return fie; }
public FoeService buildRecursiveFoe(@InjectService("RecursiveFoe") FoeService self) { // While constructing self, we invoke a method on self. self.foe(); return null; } }
@InjectService("PropBindingFactory") BindingFactory propBindingFactory, @InjectService("MessageBindingFactory") BindingFactory messageBindingFactory, @InjectService("ValidateBindingFactory") BindingFactory validateBindingFactory, @InjectService("TranslateBindingFactory") BindingFactory translateBindingFactory, @InjectService("AssetBindingFactory") BindingFactory assetBindingFactory, @InjectService("NullFieldStrategyBindingFactory") BindingFactory nullFieldStrategyBindingFactory, @InjectService("ContextBindingFactory") BindingFactory contextBindingFactory, @InjectService("SymbolBindingFactory") BindingFactory symbolBindingFactory)
/** * <dl> * <dt>Annotation</dt> * <dd>Checks for {@link org.apache.tapestry5.beaneditor.DataType} annotation</dd> * <dt>Default (ordered last)</dt> * <dd> * {@link org.apache.tapestry5.internal.services.DefaultDataTypeAnalyzer} service ( * {@link #contributeDefaultDataTypeAnalyzer(org.apache.tapestry5.ioc.MappedConfiguration)} )</dd> * </dl> */ public static void contributeDataTypeAnalyzer(OrderedConfiguration<DataTypeAnalyzer> configuration, @InjectService("DefaultDataTypeAnalyzer") DataTypeAnalyzer defaultDataTypeAnalyzer) { configuration.add("Annotation", new AnnotationDataTypeAnalyzer()); configuration.add("Default", defaultDataTypeAnalyzer, "after:*"); }
/** * Contributes several strategies: * <dl> * <dt>session * <dd>Values are stored in the {@link Session} * <dt>flash * <dd>Values are stored in the {@link Session}, until the next request (for the page) * <dt>client * <dd>Values are encoded into URLs (or hidden form fields) * </dl> */ public void contributePersistentFieldManager(MappedConfiguration<String, PersistentFieldStrategy> configuration, Request request, @InjectService("ClientPersistentFieldStrategy") PersistentFieldStrategy clientStrategy) { configuration.add(PersistenceConstants.SESSION, new SessionPersistentFieldStrategy(request)); configuration.add(PersistenceConstants.FLASH, new FlashPersistentFieldStrategy(request)); configuration.add(PersistenceConstants.CLIENT, clientStrategy); }
/** * Contributes two object providers: * <dl> * <dt>Asset * <dt> * <dd>Checks for the {@link Path} annotation, and injects an {@link Asset}</dd> * <dt>Service</dt> * <dd>Injects based on the {@link Service} annotation, if present</dd> * <dt>ApplicationMessages</dt> * <dd>Injects the global application messages</dd> * </dl> */ public static void contributeMasterObjectProvider(OrderedConfiguration<ObjectProvider> configuration, @InjectService("AssetObjectProvider") ObjectProvider assetObjectProvider, ObjectLocator locator) { configuration.add("Asset", assetObjectProvider, "before:AnnotationBasedContributions"); configuration.add("Service", new ServiceAnnotationObjectProvider(), "before:AnnotationBasedContributions"); configuration.add("ApplicationMessages", new ApplicationMessageCatalogObjectProvider(locator), "before:AnnotationBasedContributions"); }
GZipFilter gzipFilter, @InjectService("IgnoredPathsFilter") HttpServletRequestFilter ignoredPathsFilter)
public void contributeObjectRenderer(MappedConfiguration<Class, ObjectRenderer> configuration, @InjectService("LocationRenderer") ObjectRenderer locationRenderer,
@InjectService("MusicLibrary") private MusicLibrary musicLibrary;