Class SpringBeanServiceDef
java.lang.Object
org.apache.tapestry5.internal.spring.SpringBeanServiceDef
- All Implemented Interfaces:
ServiceDef
,ServiceDef2
-
Constructor Summary
ConstructorsConstructorDescriptionSpringBeanServiceDef
(String beanName, org.springframework.context.ApplicationContext context) -
Method Summary
Modifier and TypeMethodDescriptioncreateServiceCreator
(ServiceBuilderResources resources) Returns anObjectCreator
that can create the core service implementation.Returns an optional set of marker annotations.Returns the service id, derived from the method name or the unqualified service interface name.Returns the service interface associated with this service.Returns the lifecycle defined for the service.boolean
Returns true if the service should be eagerly loaded at Registry startup.boolean
Returns true if the service should not be decorated.
-
Constructor Details
-
SpringBeanServiceDef
public SpringBeanServiceDef(String beanName, org.springframework.context.ApplicationContext context)
-
-
Method Details
-
isPreventDecoration
Description copied from interface:ServiceDef2
Returns true if the service should not be decorated. Most services allow decoration, unless thePreventServiceDecoration
annotation is present.- Specified by:
isPreventDecoration
in interfaceServiceDef2
-
createServiceCreator
Description copied from interface:ServiceDef
Returns anObjectCreator
that can create the core service implementation.- Specified by:
createServiceCreator
in interfaceServiceDef
- Parameters:
resources
- used to resolve dependencies of the service, or access its configuration- Returns:
- an object that can (later) be used to instantiate the service itself
-
getServiceId
Description copied from interface:ServiceDef
Returns the service id, derived from the method name or the unqualified service interface name. Service ids must be unique among all services in all modules. Service ids are used in a heavy handed way to support ultimate disambiguation, but their primary purpose is to support service contribution methods.- Specified by:
getServiceId
in interfaceServiceDef
-
getMarkers
Description copied from interface:ServiceDef
Returns an optional set of marker annotations. Marker annotations are used to disambiguate services; the combination of a marker annotation and a service type is expected to be unique. The annotation is placed on the field or method/constructor parameter and the service is located by combining the marker with service type (the parameter or field type).- Specified by:
getMarkers
in interfaceServiceDef
- Returns:
- the marker annotations for the service (possibly empty), including any default marker annotations from the containing module.
-
getServiceInterface
Description copied from interface:ServiceDef
Returns the service interface associated with this service. This is the interface exposed to the outside world, as well as the one used to build proxies. In cases where the service is not defined in terms of an interface, this will return the actual implementation class of the service. Services without a true service interface are not proxied, which has a number of ramifications (such as losing lazy instantiation capabilities and other more interesting lifecycles).- Specified by:
getServiceInterface
in interfaceServiceDef
-
getServiceScope
Description copied from interface:ServiceDef
Returns the lifecycle defined for the service. This is indicated by adding aScope
annotation to the service builder method for the service. Services that are not proxied will ignore their scope; such services are always treated as singletons.- Specified by:
getServiceScope
in interfaceServiceDef
- See Also:
-
isEagerLoad
Description copied from interface:ServiceDef
Returns true if the service should be eagerly loaded at Registry startup.- Specified by:
isEagerLoad
in interfaceServiceDef
- See Also:
-