public class GenericCustomActionBuilderFactory<T extends io.sphere.sdk.types.Custom & io.sphere.sdk.models.Resource<T>,S extends GenericCustomActionBuilder<T>>
extends java.lang.Object
GenericCustomActionBuilder, which is responsible for building custom update actions, according to the type
of the resource instance provided to the of(Custom) function.| Constructor and Description |
|---|
GenericCustomActionBuilderFactory() |
| Modifier and Type | Method and Description |
|---|---|
static <U extends io.sphere.sdk.types.Custom & io.sphere.sdk.models.Resource<U>> |
of(U resource)
Given a
resource of the type U which represents a CTP resource (currently either Category or
Channel) creates an instance of the concrete implementation of the
GenericCustomActionBuilder, which is responsible for building custom update actions, according to
the type of the resource instance provided. |
public static <U extends io.sphere.sdk.types.Custom & io.sphere.sdk.models.Resource<U>> GenericCustomActionBuilder of(@Nonnull U resource) throws BuildUpdateActionException, java.lang.InstantiationException, java.lang.IllegalAccessException
resource of the type U which represents a CTP resource (currently either Category or
Channel) creates an instance of the concrete implementation of the
GenericCustomActionBuilder, which is responsible for building custom update actions, according to
the type of the resource instance provided. For example, if U is of type Category this method
will return an instance of CategoryCustomActionBuilder, if U is of type Channel this method
will return an instance of ChannelCustomActionBuilder instance.U - the type of the resource.resource - the resource from which the type of the CTP resource to choose the update action builder.GenericCustomActionBuilder
which is responsible for building custom update actions.BuildUpdateActionException - exception thrown in case a concrete implementation of the the
GenericCustomActionBuilder for the provided resource type is not
implemented yet.java.lang.IllegalAccessException - thrown by getBuilder(Custom) if the resource class or its
nullary constructor is not accessible.java.lang.InstantiationException - thrown by getBuilder(Custom) if resource Class
represents an abstract class, an interface, an array class, a primitive type,
or void; or if the resource class has no nullary constructor;
or if the instantiation fails for some other reason.