Package org.b3log.solo.repository

Examples of org.b3log.solo.repository.PreferenceRepository


            Latkes.setRepositoryPath(repositoryPath);
            LOGGER.log(Level.INFO, "Sets repository[path={0}]", repositoryPath);
        }

        final PreferenceRepository preferenceRepository = PreferenceRepositoryImpl.getInstance();

        final Transaction transaction = preferenceRepository.beginTransaction();

        // Cache will be cleared manaully if necessary, see loadPreference.
        transaction.clearQueryCache(false);
        try {
            loadPreference();
View Full Code Here


    private void loadPreference() {
        Stopwatchs.start("Load Preference");

        LOGGER.info("Loading preference....");

        final PreferenceRepository preferenceRepository = PreferenceRepositoryImpl.getInstance();
        JSONObject preference;

        try {
            preference = preferenceRepository.get(Preference.PREFERENCE);
            if (null == preference) {
                LOGGER.log(Level.WARNING, "Can't not init default skin, please init B3log Solo first");
                return;
            }
View Full Code Here

     *
     * @param httpServletRequest the specified HTTP servlet request
     */
    private void resolveSkinDir(final HttpServletRequest httpServletRequest) {
        try {
            final PreferenceRepository preferenceRepository = PreferenceRepositoryImpl.getInstance();
            final JSONObject preference = preferenceRepository.get(Preference.PREFERENCE);
            if (null == preference) {  // Did not initialize yet
                return;
            }

            final String requestURI = httpServletRequest.getRequestURI();
View Full Code Here

        Stopwatchs.start("Context Initialized");

        // Default to skin "ease", loads from preference later
        Skins.setDirectoryForTemplateLoading("ease");

        final PreferenceRepository preferenceRepository = beanManager.getReference(PreferenceRepositoryImpl.class);

        final Transaction transaction = preferenceRepository.beginTransaction();

        try {
            loadPreference();

            if (transaction.isActive()) {
View Full Code Here

    private void loadPreference() {
        Stopwatchs.start("Load Preference");

        LOGGER.info("Loading preference....");

        final PreferenceRepository preferenceRepository = beanManager.getReference(PreferenceRepositoryImpl.class);
        JSONObject preference;

        try {
            preference = preferenceRepository.get(Preference.PREFERENCE);
            if (null == preference) {
                LOGGER.log(Level.WARN, "Can't not init default skin, please init B3log Solo first");
                return;
            }
View Full Code Here

     *
     * @param httpServletRequest the specified HTTP servlet request
     */
    private void resolveSkinDir(final HttpServletRequest httpServletRequest) {
        try {
            final PreferenceRepository preferenceRepository = beanManager.getReference(PreferenceRepositoryImpl.class);
            final JSONObject preference = preferenceRepository.get(Preference.PREFERENCE);

            if (null == preference) { // Did not initialize yet
                return;
            }

View Full Code Here

     *
     * @throws Exception exception
     */
    @Test
    public void test() throws Exception {
        final PreferenceRepository preferenceRepository =
                getPreferenceRepository();
    }
View Full Code Here

     *
     * @throws Exception exception
     */
    @Test
    public void test() throws Exception {
        final PreferenceRepository preferenceRepository =
                getPreferenceRepository();
    }
View Full Code Here

        super.contextInitialized(servletContextEvent);

        registerRemoteJSServices();
        registerEventProcessor();

        final PreferenceRepository preferenceRepository =
                PreferenceGAERepository.getInstance();
        final Transaction transaction = preferenceRepository.beginTransaction();
        try {
            PluginManager.getInstance().load();

            loadPreference();
View Full Code Here

     * </p>
     */
    private void loadPreference() {
        LOGGER.info("Loading preference....");

        final PreferenceRepository preferenceRepository =
                PreferenceGAERepository.getInstance();
        JSONObject preference = null;

        try {
            preference = preferenceRepository.get(Preference.PREFERENCE);
            if (null == preference) {
                LOGGER.log(Level.SEVERE,
                           "Can't not init default skin, please init B3log Solo first");
                return;
            }
View Full Code Here

TOP

Related Classes of org.b3log.solo.repository.PreferenceRepository

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.