Package com.salas.bb.persistence

Examples of com.salas.bb.persistence.IPersistenceManager


        /**
         * Creates a provider.
         */
        public ReportDataProvider()
        {
            IPersistenceManager pm = PersistenceManagerConfig.getManager();
            sm = pm.getStatisticsManager();
        }
View Full Code Here


            " (" + description.getVendorURL() + ") " + System.getProperty("java.version"));
        System.setProperty("http.agent.discoverer", description.getProductText() + " Discoverer" +
            " (" + description.getVendorURL() + ") " + System.getProperty("java.version"));

        // Create and initialize caching authenticator
        IPersistenceManager persistenceManager = PersistenceManagerConfig.getManager();
        IPasswordsRepository passwordsRepository = persistenceManager.getPasswordsRepository();
        Authenticator.setDefault(new CachingAuthenticator(passwordsRepository));

        // This is a very kludgy way to propagate default reading and connection timeouts.
        // It's the only way for now (JRE 1.4.x) to let this values be used when running under JWS.
        // NOTE: NetworkClient is not part of public API and can be removed/changed in a future.
View Full Code Here

                ApplicationLauncher.super.launchApplication();
            }
        }, MSG_PARENT_APP_LAUNCHER_ERROR, Level.SEVERE);

        Splash.setNote(Strings.message("startup.opening.database"), 40);
        IPersistenceManager manager = PersistenceManagerConfig.getManager();
        try
        {
            manager.init();
        } catch (PersistenceException e)
        {
            LOG.log(Level.SEVERE, Strings.error("failed.to.initialize.database"), e);

            // It's not possible to continue working with database failing.
View Full Code Here

                model.loadingStarted();

                final GuidesSet guidesSet = getModel().getGuidesSet();

                // Load data into model
                IPersistenceManager manager = PersistenceManagerConfig.getManager();
                manager.loadGuidesSet(guidesSet);

                // Connect persistence listeners
                ChangesMonitor changesMonitor = new ChangesMonitor(guidesSet, manager);
                domainEventsListener.addDomainListener(changesMonitor);

                // Copy guides and preferences from installer model if it is present
                if (installationModel != null)
                {
                    GuidesSet installerSet = installationModel.getGuidesSet();
                    int count = installerSet.getGuidesCount();
                    for (int i = 0; i < count; i++)
                    {
                        guidesSet.add(installerSet.getGuideAt(i));
                    }

                    // Copy preferences
                    Preferences appPrefs = Application.getUserPreferences();
                    installationModel.storePreferences(appPrefs);
                    restoreModelPreferencesAndUpdate(model, appPrefs);
                }

                // If database was reset we need to show recovery options
                if (manager.isDatabaseReset())
                {
                    DatabaseRecoverer.performRecovery(model, ApplicationLauncher.getBackupsPath());
                }

                initMaxViewsAndClickthroughs(guidesSet);

                startLoadingUsedTags(guidesSet);

                if (dockIconUnreadMonitor != null) dockIconUnreadMonitor.update();

                model.loadingFinished();

                // Perform sync-on-startup only if the database was OK
                if (!manager.isDatabaseReset())
                {
                    // check if it's time for full sync on startup
                    SyncFull syncFull = new SyncFull(model);
                    if (syncFull.isSyncTime()) SyncFullAction.getInstance().doSync(null);
                }
View Full Code Here

            article.setPinned(pinned);
        }

        if (pinned && cnt > 0)
        {
            IPersistenceManager pm = PersistenceManagerConfig.getManager();
            pm.getStatisticsManager().articlesPinned(guide, feed, cnt);
        }
    }
View Full Code Here

        }
       
        // Record stats if it's reading and the count is greater than 0
        if (read && cnt > 0)
        {
            IPersistenceManager pm = PersistenceManagerConfig.getManager();
            pm.getStatisticsManager().articlesRead(guide, feed, cnt);
        }
    }
View Full Code Here

                feed.setRead(read);
            }

            if (cnt > 0)
            {
                IPersistenceManager pm = PersistenceManagerConfig.getManager();
                pm.getStatisticsManager().articlesRead(guide, feed, cnt);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.salas.bb.persistence.IPersistenceManager

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.