Package org.fenrir.yggdrasil.core.definition

Examples of org.fenrir.yggdrasil.core.definition.PreferencesDefinition


        }
        else{
            clearRestartWorkspace();
        }

        PreferencesDefinition preferencesDefinition = ApplicationContext.getInstance().getPluginRegistry().getPreferencesDefinition();
        String defaultConfFilename = preferencesDefinition.getDefaultFile().getFile();
        URL defaultConfigurationUrl = getClass().getClassLoader().getResource(defaultConfFilename);
        preferenceService.loadPreferencesFile(IPreferenceService.PREFERENCES_CONFIGURATION_ID, defaultConfigurationUrl);

        if(StringUtils.isNotBlank(defaultWorkspace)){
            loadWorkspace(defaultWorkspace);
View Full Code Here


        XPathExpression versionExpr = xpath.compile(CoreConstants.PREFERENCES_VERSION);
        int currentVersion = ((Double)versionExpr.evaluate(configurationDocument, XPathConstants.NUMBER)).intValue();
        int applicationVersion = Integer.parseInt(preferenceService.getProperty(CoreConstants.PREFERENCES_VERSION, "0"));
        if(applicationVersion>currentVersion){
          PreferencesDefinition preferencesDefinition = ApplicationContext.getInstance().getPluginRegistry().getPreferencesDefinition();
          String updateConfFilename = preferencesDefinition.getUpdateFile().getFile();
            Document updateDocument = builder.parse(getClass().getClassLoader().getResourceAsStream(updateConfFilename));

            XPathExpression preferencesExpr = xpath.compile("//preference");
            NodeList updatePreferenceNodes = (NodeList)preferencesExpr.evaluate(updateDocument, XPathConstants.NODESET);
            for(int i=0; i<updatePreferenceNodes.getLength(); i++){
View Full Code Here

TOP

Related Classes of org.fenrir.yggdrasil.core.definition.PreferencesDefinition

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.