Package fr.soleil.data.service

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


                        // 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

     */
    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

     * @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

     * @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

     * @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);
            }
            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

        }
    }

    protected void updateRefreshingPeriod(IKey key) {
        if (key != null) {
            IDataSourceProducer producer = DataSourceProducerProvider.getProducer(key.getSourceProduction());
            if (producer instanceof AbstractRefreshingManager<?>) {
                ((AbstractRefreshingManager<?>) producer).setRefreshingStrategy(key, new PolledRefreshingStrategy(
                        (int) periodSwitch.getValue()));
                // We transmit refreshing strategy to sub-key
                if (key instanceof HistoryKey) {
View Full Code Here

                        result = controller.addLink(source, connectedTarget);

                        String logMessage = "connection failed for";
                        if (result) {

                            final IDataSourceProducer producer = DataSourceProducerProvider
                                    .getProducer(key.getSourceProduction());

                            initPlugins(producer, source, widget);

                            computeDefaultToolTip(widget, key);
View Full Code Here

     * @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) {
            e.printStackTrace();
        }

View Full Code Here

     * @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

TOP

Related Classes of fr.soleil.data.service.IDataSourceProducer

Copyright © 2018 www.massapicom. 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.