All Downloads are FREE. Search and download functionalities are using the official Maven repository.

colesico.framework.weblet.internal.WebletIoclet Maven / Gradle / Ivy

There is a newer version: 5.3.0
Show newest version
// This is automatically generated file. Do not modify!
package colesico.framework.weblet.internal;

import colesico.framework.assist.LazySingleton;
import colesico.framework.assist.codegen.Genstamp;
import colesico.framework.http.HttpContext;
import colesico.framework.http.HttpResponse;
import colesico.framework.ioc.Ioc;
import colesico.framework.ioc.ioclet.AdvancedIoc;
import colesico.framework.ioc.ioclet.Catalog;
import colesico.framework.ioc.ioclet.DefaultProvider;
import colesico.framework.ioc.ioclet.Factory;
import colesico.framework.ioc.ioclet.Ioclet;
import colesico.framework.ioc.ioclet.SingletonFactory;
import colesico.framework.ioc.key.TypeKey;
import colesico.framework.ioc.production.InstanceProducingException;
import colesico.framework.ioc.scope.ThreadScope;
import colesico.framework.router.RouterContext;
import colesico.framework.weblet.assist.CSRFProtector;
import colesico.framework.weblet.teleapi.Authenticator;
import colesico.framework.weblet.teleapi.PrincipalWebletConfigPrototype;
import colesico.framework.weblet.teleapi.ProfileWebletConfigPrototype;
import colesico.framework.weblet.teleapi.WebletDataPort;
import colesico.framework.weblet.teleapi.WebletTeleDriver;

@Genstamp(
        generator = "colesico.framework.ioc.codegen.generator.IocletGenerator",
        timestamp = "2020-06-08T10:52:36.854Z",
        hashId = "aa64a8ba-d382-49d8-867e-25fa6da9f3c4",
        comments = "Producer: ClassElement{originElement=colesico.framework.weblet.internal.WebletProducer}"
)
public final class WebletIoclet implements Ioclet {
    private final LazySingleton producer = new LazySingleton() {
        @Override
        public final WebletProducer create() {
            return new WebletProducer();
        }
    };

    @Override
    public final String getId() {
        return "colesico.framework.weblet.internal.WebletProducer";
    }

    /**
     * Factory to produce colesico.framework.weblet.teleapi.WebletDataPort class instance
     * Scope: SINGLETON; Custom: null
     */
    public Factory getWebletDataPortFactory0() {
        return new SingletonFactory() {
            private Factory implFac;

            @Override
            public final void setup(final AdvancedIoc ioc) {
                // Initialize dependencies for: colesico.framework.weblet.teleapi.WebletDataPort
                this.implFac = ioc.factory(new TypeKey(WebletDataPortImpl.class));
            }

            @Override
            public final WebletDataPort create(final Object message) {
                try {
                    // Perform instance producing
                    WebletDataPort instance = producer.get().getWebletDataPort(this.implFac.get(message));
                    return instance;
                } catch (InstanceProducingException ipe) {
                    throw ipe;
                } catch (Throwable t) {
                    throw new InstanceProducingException(t, WebletDataPort.class);
                }
            }
        };
    }

    /**
     * Factory to produce colesico.framework.weblet.teleapi.WebletTeleDriver class instance
     * Scope: SINGLETON; Custom: null
     */
    public Factory getWebTeledriverFactory1() {
        return new SingletonFactory() {
            private Factory implFac;

            @Override
            public final void setup(final AdvancedIoc ioc) {
                // Initialize dependencies for: colesico.framework.weblet.teleapi.WebletTeleDriver
                this.implFac = ioc.factory(new TypeKey(WebletTeleDriverImpl.class));
            }

            @Override
            public final WebletTeleDriver create(final Object message) {
                try {
                    // Perform instance producing
                    WebletTeleDriver instance = producer.get().getWebTeledriver(this.implFac.get(message));
                    return instance;
                } catch (InstanceProducingException ipe) {
                    throw ipe;
                } catch (Throwable t) {
                    throw new InstanceProducingException(t, WebletTeleDriver.class);
                }
            }
        };
    }

    /**
     * Factory to produce colesico.framework.weblet.teleapi.Authenticator class instance
     * Scope: SINGLETON; Custom: null
     */
    public Factory getAuthenticatorFactory2() {
        return new SingletonFactory() {
            private Factory implFac;

            @Override
            public final void setup(final AdvancedIoc ioc) {
                // Initialize dependencies for: colesico.framework.weblet.teleapi.Authenticator
                this.implFac = ioc.factory(new TypeKey(AuthenticatorImpl.class));
            }

            @Override
            public final Authenticator create(final Object message) {
                try {
                    // Perform instance producing
                    Authenticator instance = producer.get().getAuthenticator(this.implFac.get(message));
                    return instance;
                } catch (InstanceProducingException ipe) {
                    throw ipe;
                } catch (Throwable t) {
                    throw new InstanceProducingException(t, Authenticator.class);
                }
            }
        };
    }

    /**
     * Factory to produce colesico.framework.weblet.teleapi.PrincipalWebletConfigPrototype class instance
     * Scope: SINGLETON; Custom: null
     */
    public Factory getPrincipalWriterConfigFactory3() {
        return new SingletonFactory() {
            @Override
            public final void setup(final AdvancedIoc ioc) {
                // Initialize dependencies for: colesico.framework.weblet.teleapi.PrincipalWebletConfigPrototype
            }

            @Override
            public final PrincipalWebletConfigPrototype create(final Object message) {
                try {
                    // Perform instance producing
                    PrincipalWebletConfigPrototype instance = producer.get().getPrincipalWriterConfig();
                    return instance;
                } catch (InstanceProducingException ipe) {
                    throw ipe;
                } catch (Throwable t) {
                    throw new InstanceProducingException(t, PrincipalWebletConfigPrototype.class);
                }
            }
        };
    }

    /**
     * Factory to produce colesico.framework.weblet.teleapi.ProfileWebletConfigPrototype class instance
     * Scope: SINGLETON; Custom: null
     */
    public Factory getProfileWriterConfigFactory4() {
        return new SingletonFactory() {
            @Override
            public final void setup(final AdvancedIoc ioc) {
                // Initialize dependencies for: colesico.framework.weblet.teleapi.ProfileWebletConfigPrototype
            }

            @Override
            public final ProfileWebletConfigPrototype create(final Object message) {
                try {
                    // Perform instance producing
                    ProfileWebletConfigPrototype instance = producer.get().getProfileWriterConfig();
                    return instance;
                } catch (InstanceProducingException ipe) {
                    throw ipe;
                } catch (Throwable t) {
                    throw new InstanceProducingException(t, ProfileWebletConfigPrototype.class);
                }
            }
        };
    }

    /**
     * Factory to produce colesico.framework.weblet.assist.CSRFProtector class instance
     * Scope: SINGLETON; Custom: null
     */
    public Factory getCSRFProtectorFactory5() {
        return new SingletonFactory() {
            private Factory responseProvFac;

            @Override
            public final void setup(final AdvancedIoc ioc) {
                // Initialize dependencies for: colesico.framework.weblet.assist.CSRFProtector
                this.responseProvFac = ioc.factory(new TypeKey(HttpResponse.class));
            }

            @Override
            public final CSRFProtector create(final Object message) {
                try {
                    // Perform instance producing
                    CSRFProtector instance = new CSRFProtector(new DefaultProvider(this.responseProvFac,message));
                    // Post construct listeners invocations:
                    return instance;
                } catch (InstanceProducingException ipe) {
                    throw ipe;
                } catch (Throwable t) {
                    throw new InstanceProducingException(t, CSRFProtector.class);
                }
            }
        };
    }

    /**
     * Factory to produce colesico.framework.weblet.internal.WebletDataPortImpl class instance
     * Scope: SINGLETON; Custom: null
     */
    public Factory getWebletDataPortImplFactory6() {
        return new SingletonFactory() {
            private Factory iocFac;

            @Override
            public final void setup(final AdvancedIoc ioc) {
                // Initialize dependencies for: colesico.framework.weblet.internal.WebletDataPortImpl
                this.iocFac = ioc.factory(new TypeKey(Ioc.class));
            }

            @Override
            public final WebletDataPortImpl create(final Object message) {
                try {
                    // Perform instance producing
                    WebletDataPortImpl instance = new WebletDataPortImpl(this.iocFac.get(message));
                    // Post construct listeners invocations:
                    return instance;
                } catch (InstanceProducingException ipe) {
                    throw ipe;
                } catch (Throwable t) {
                    throw new InstanceProducingException(t, WebletDataPortImpl.class);
                }
            }
        };
    }

    /**
     * Factory to produce colesico.framework.weblet.internal.WebletTeleDriverImpl class instance
     * Scope: SINGLETON; Custom: null
     */
    public Factory getWebletTeleDriverImplFactory7() {
        return new SingletonFactory() {
            private Factory threadScopeFac;

            private Factory dataPortFac;

            private Factory authenticatorProvFac;

            private Factory httpContextProvFac;

            private Factory routerContextProvFac;

            @Override
            public final void setup(final AdvancedIoc ioc) {
                // Initialize dependencies for: colesico.framework.weblet.internal.WebletTeleDriverImpl
                this.threadScopeFac = ioc.factory(new TypeKey(ThreadScope.class));
                this.dataPortFac = ioc.factory(new TypeKey(WebletDataPortImpl.class));
                this.authenticatorProvFac = ioc.factory(new TypeKey(Authenticator.class));
                this.httpContextProvFac = ioc.factory(new TypeKey(HttpContext.class));
                this.routerContextProvFac = ioc.factory(new TypeKey(RouterContext.class));
            }

            @Override
            public final WebletTeleDriverImpl create(final Object message) {
                try {
                    // Perform instance producing
                    WebletTeleDriverImpl instance = new WebletTeleDriverImpl(this.threadScopeFac.get(message),this.dataPortFac.get(message),new DefaultProvider(this.authenticatorProvFac,message),new DefaultProvider(this.httpContextProvFac,message),new DefaultProvider(this.routerContextProvFac,message));
                    // Post construct listeners invocations:
                    return instance;
                } catch (InstanceProducingException ipe) {
                    throw ipe;
                } catch (Throwable t) {
                    throw new InstanceProducingException(t, WebletTeleDriverImpl.class);
                }
            }
        };
    }

    /**
     * Factory to produce colesico.framework.weblet.internal.AuthenticatorImpl class instance
     * Scope: UNSCOPED; Custom: null
     */
    public Factory getAuthenticatorImplFactory8() {
        return new Factory() {
            @Override
            public final void setup(final AdvancedIoc ioc) {
                // Initialize dependencies for: colesico.framework.weblet.internal.AuthenticatorImpl
            }

            @Override
            public final AuthenticatorImpl get(final Object message) {
                try {
                    // Perform instance producing
                    AuthenticatorImpl instance = new AuthenticatorImpl();
                    // Post construct listeners invocations:
                    return instance;
                } catch (InstanceProducingException ipe) {
                    throw ipe;
                } catch (Throwable t) {
                    throw new InstanceProducingException(t, AuthenticatorImpl.class);
                }
            }
        };
    }

    @Override
    public final void addFactories(final Catalog catalog) {
        if(catalog.accept(new TypeKey("colesico.framework.weblet.teleapi.WebletDataPort"), null, null, false)){
            catalog.add(getWebletDataPortFactory0());
        }

        if(catalog.accept(new TypeKey("colesico.framework.weblet.teleapi.WebletTeleDriver"), null, null, false)){
            catalog.add(getWebTeledriverFactory1());
        }

        if(catalog.accept(new TypeKey("colesico.framework.weblet.teleapi.Authenticator"), null, null, false)){
            catalog.add(getAuthenticatorFactory2());
        }

        if(catalog.accept(new TypeKey("colesico.framework.weblet.teleapi.PrincipalWebletConfigPrototype"), null, null, false)){
            catalog.add(getPrincipalWriterConfigFactory3());
        }

        if(catalog.accept(new TypeKey("colesico.framework.weblet.teleapi.ProfileWebletConfigPrototype"), null, null, false)){
            catalog.add(getProfileWriterConfigFactory4());
        }

        if(catalog.accept(new TypeKey("colesico.framework.weblet.assist.CSRFProtector"), null, null, false)){
            catalog.add(getCSRFProtectorFactory5());
        }

        if(catalog.accept(new TypeKey("colesico.framework.weblet.internal.WebletDataPortImpl"), null, null, false)){
            catalog.add(getWebletDataPortImplFactory6());
        }

        if(catalog.accept(new TypeKey("colesico.framework.weblet.internal.WebletTeleDriverImpl"), null, null, false)){
            catalog.add(getWebletTeleDriverImplFactory7());
        }

        if(catalog.accept(new TypeKey("colesico.framework.weblet.internal.AuthenticatorImpl"), null, null, false)){
            catalog.add(getAuthenticatorImplFactory8());
        }

    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy