ServicesBuilder class
Builds a list of PublicationService from a collection of service factories.
Provides helpers to manipulate the list of services of a Publication.
Constructors
- ServicesBuilder.create({ServiceFactory? contentProtection, ServiceFactory? cover, ServiceFactory? locator = _defaultLocator, ServiceFactory? positions})
-
factory
Properties
- contentProtectionServiceFactory ← ServiceFactory
-
Available on ServicesBuilder, provided by the ServicesBuilderContentProtectionServiceExtension extension
no getter - coverServiceFactory ← ServiceFactory
-
Available on ServicesBuilder, provided by the ServicesBuilderExtension extension
no getter - hashCode → int
-
The hash code for this object.
no setterinherited
- locatorServiceFactory ← ServiceFactory
-
Available on ServicesBuilder, provided by the ServicesBuilderLocatorExtension extension
no getter - positionsServiceFactory ← ServiceFactory
-
Available on ServicesBuilder, provided by the ServicesBuilderPositionExtension extension
no getter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
serviceFactories
→ Map<
Type, ServiceFactory> -
final
Methods
-
build(
PublicationServiceContext context) → List< PublicationService> - Builds the actual list of publication services to use in a Publication.
-
decorate(
Type serviceType, ServiceFactory transform(ServiceFactory? )) → void -
Replaces the service factory associated with the given service type with the result of
transform
. -
getContentProtectionServiceFactory(
) → ServiceFactory? -
Available on ServicesBuilder, provided by the ServicesBuilderContentProtectionServiceExtension extension
Factory to build a ContentProtectionService. -
getCoverServiceFactory(
) → ServiceFactory? -
Available on ServicesBuilder, provided by the ServicesBuilderExtension extension
Factory to build a CoverService. -
getLocatorServiceFactory(
) → ServiceFactory? -
Available on ServicesBuilder, provided by the ServicesBuilderLocatorExtension extension
-
getPositionsServiceFactory(
) → ServiceFactory? -
Available on ServicesBuilder, provided by the ServicesBuilderPositionExtension extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
of<
T extends PublicationService> () → ServiceFactory? - Gets the publication service factory for the given service type.
-
remove(
Type serviceType) → void - Removes the service factory producing the given kind of service, if any.
-
set<
T> (ServiceFactory? factory) → void - Sets the publication service factory for the given service type.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited