Examples of IDataSourceProducer


Examples of fr.soleil.data.service.IDataSourceProducer

     * @return the desired source
     */
    @SuppressWarnings("unchecked")
    protected static <U> AbstractDataSource<U> getSource(final IKey key, boolean readImmediately) {
        AbstractDataSource<U> result = null;
        final IDataSourceProducer producer = DataSourceProducerProvider.getProducer(key
                .getSourceProduction());
        try {
            if (producer == null) {
                throw new KeyCompatibilityException(key, producer);
            }
            else if (producer instanceof AbstractRefreshingManager<?>) {
                result = (AbstractDataSource<U>) ((AbstractRefreshingManager<?>) producer)
                        .createDataSource(key, false, readImmediately);
            }
            else {
                result = (AbstractDataSource<U>) producer.createDataSource(key);
            }
        }
        catch (final Exception e) {
            Logger.getLogger(Mediator.LOGGER_ACCESS).log(
                    Level.SEVERE,
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

     * @return the desired source
     */
    @SuppressWarnings("unchecked")
    protected static <U> AbstractDataSource<U> getSource(final IKey key, boolean readImmediately) {
        AbstractDataSource<U> result = null;
        final IDataSourceProducer producer = DataSourceProducerProvider.getProducer(key.getSourceProduction());
        try {
            if (producer == null) {
                throw new KeyCompatibilityException(key, producer);
            } else if (producer instanceof AbstractRefreshingManager<?>) {
                result = (AbstractDataSource<U>) ((AbstractRefreshingManager<?>) producer).createDataSource(key, false,
                        readImmediately);
            } else {
                result = (AbstractDataSource<U>) producer.createDataSource(key);
            }
        } catch (final Exception e) {
            Logger.getLogger(Mediator.LOGGER_ACCESS).log(Level.SEVERE,
                    "Failed to create source for key: " + (key == null ? null : key.getInformationKey()), e);
        }
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

                        // make
                        result = controller.addLink(source, connectedTarget);

                        String logMessage = "connection failed for";
                        if (result) {
                            IDataSourceProducer producer = DataSourceProducerProvider
                                    .getProducer(key.getSourceProduction());

                            List<AbstractPlugin<?>> tempListPlugin = initPlugins(source);
                            List<AbstractPlugin<?>> toRemove = new ArrayList<AbstractPlugin<?>>();
                            for (AbstractPlugin<?> plugin : tempListPlugin) {
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

     */
    protected <U> AbstractDataSource<U> getSource(IKey key) {
        AbstractDataSource<U> result = null;
        result = getLinkedSource(key);
        if (result == null) {
            IDataSourceProducer producer = DataSourceProducerProvider.getProducer(key
                    .getSourceProduction());
            try {
                if (producer == null) {
                    throw new KeyCompatibilityException(key, producer);
                }
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

     * @return true if the source is creatable, false otherwise
     */
    public static boolean isSourceCreatable(IKey key) {
        boolean result = false;
        if (key != null) {
            IDataSourceProducer producer = DataSourceProducerProvider.getProducer(key
                    .getSourceProduction());
            try {
                AbstractDataSource<?> source = initSource(key, producer);
                result = (source != null);
                source = null;
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

                        }

                        String logMessage = "connection failed for";

                        // First, Connect plugins
                        final IDataSourceProducer producer = DataSourceProducerProvider
                                .getProducer(key.getSourceProduction());

                        initPlugins(producer, source, widget);

                        computeDefaultToolTip(widget, key);
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

     * @return the desired source
     */
    @SuppressWarnings("unchecked")
    protected static <U> AbstractDataSource<U> getSource(final IKey key) {
        AbstractDataSource<U> result = null;
        final IDataSourceProducer producer = DataSourceProducerProvider.getProducer(key
                .getSourceProduction());
        try {
            if (producer == null) {
                throw new KeyCompatibilityException(key, producer);
            }
            result = (AbstractDataSource<U>) producer.createDataSource(key);
        }
        catch (final Exception e) {
            Logger.getLogger(Mediator.LOGGER_ACCESS).log(
                    Level.SEVERE,
                    "Failed to create source for key: "
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

    @SuppressWarnings("unchecked")
    protected static <U> AbstractDataSource<U> getExistingSource(final IKey key) {
        AbstractDataSource<U> result = null;
        if (key != null) {
            final IDataSourceProducer producer = DataSourceProducerProvider.getProducer(key.getSourceProduction());
            if (producer instanceof IConstantSourceProducer) {
                result = (AbstractDataSource<U>) ((IConstantSourceProducer) producer).getExistingSource(key);
            }
        }
        return result;
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

    @SuppressWarnings("unchecked")
    protected static <U> AbstractDataSource<U> getSource(final IKey key, boolean readImmediately,
            boolean forgetImmediately) {
        AbstractDataSource<U> result = null;
        if (key != null) {
            final IDataSourceProducer producer = DataSourceProducerProvider.getProducer(key.getSourceProduction());
            try {
                if (producer == null) {
                    throw new KeyCompatibilityException(key, producer);
                } else if (producer instanceof IConstantSourceProducer) {
                    IConstantSourceProducer constantSourceProducer = (IConstantSourceProducer) producer;
                    AbstractDataSource<U> former = (AbstractDataSource<U>) constantSourceProducer
                            .getExistingSource(key);
                    if (producer instanceof AbstractRefreshingManager<?>) {
                        result = (AbstractDataSource<U>) ((AbstractRefreshingManager<?>) producer).createDataSource(
                                key, false, readImmediately);
                    } else {
                        result = (AbstractDataSource<U>) producer.createDataSource(key);
                    }
                    if (forgetImmediately && (former == null)) {
                        constantSourceProducer.removeDataSource(key);
                    }
                } else {
                    result = (AbstractDataSource<U>) producer.createDataSource(key);
                }
            } catch (final Exception e) {
                Logger.getLogger(Mediator.LOGGER_ACCESS).log(Level.SEVERE,
                        "Failed to create source for key: " + (key == null ? null : key.getInformationKey()), e);
            }
View Full Code Here

Examples of fr.soleil.data.service.IDataSourceProducer

     * @return the desired source
     */
    @SuppressWarnings("unchecked")
    protected static <U> AbstractDataSource<U> getSource(final IKey key) {
        AbstractDataSource<U> result = null;
        final IDataSourceProducer producer = DataSourceProducerProvider.getProducer(key
                .getSourceProduction());
        try {
            if (producer == null) {
                throw new KeyCompatibilityException(key, producer);
            }
            result = (AbstractDataSource<U>) producer.createDataSource(key);
        }
        catch (final Exception e) {
            Logger.getLogger(Mediator.LOGGER_ACCESS).log(
                    Level.SEVERE,
                    "Failed to create source for key: "
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.