Package de.innovationgate.wga.common.beans.csconfig.v1

Examples of de.innovationgate.wga.common.beans.csconfig.v1.Version


            // Create TMLForm, if form information was issued
            if (form != null) {
                FormInfo formInfo = new FormInfo(form.getId(), false, false);
                formInfo.setSource("none");
                formInfo.setKeepOnValidate(false);
                CSConfig csConfig = (CSConfig) db.getAttribute(WGACore.DBATTRIB_CSCONFIG);
                if (csConfig != null) {
                    formInfo.setVersionCompliance(csConfig.getVersionCompliance());
                }
                de.innovationgate.wgpublisher.webtml.utils.TMLForm tmlForm = context.createform(formInfo);
                tmlForm.importServicesForm(form);
            }
           
View Full Code Here


        }
    }
   
    protected boolean mayCallAction(WGDatabase db, String actionID) throws WGAPIException {
       
        CSConfig csConfig = (CSConfig) db.getAttribute(WGACore.DBATTRIB_CSCONFIG);
       
        // No cs config: All designers are permitted
        if (csConfig == null) {
            return db.getSessionContext().isDesigner();           
        }
       
        RemoteAction action = csConfig.findRemoteAction(actionID);
        if (action == null) {
            return false;
        }
       
        if (db.isMemberOfUserList(action.getCallers())) {
View Full Code Here

            status.formInfo.setDefinitionModule(getStatus().getTMLModuleName());
            status.formInfo.setDefinitionDatabase(getDesignDBKey());
           
            WGDatabase designDB = getCore().getContentdbs().get(getDesignDBKey());
            if (designDB != null) { // May be in StaticTML
                CSConfig csConfig = (CSConfig) designDB.getAttribute(WGACore.DBATTRIB_CSCONFIG);
                if (csConfig != null) {
                    status.formInfo.setVersionCompliance(csConfig.getVersionCompliance());
                }
            }
           
            updateDefaultAction(status.formInfo);
           
View Full Code Here

       
        Map metaMappings = (Map) db.getAttribute(DBATTRIB_META_MAPPINGS);
        Map itemMappings = (Map) db.getAttribute(DBATTRIB_ITEM_MAPPINGS);
        Map pluginShortcuts = (Map) db.getAttribute(DBATTRIB_PLUGIN_SHORTCUTS);
       
        CSConfig csconfig = (CSConfig) db.getAttribute(DBATTRIB_CSCONFIG);
        if (csconfig != null && csconfig instanceof de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) {
            de.innovationgate.wga.common.beans.csconfig.v2.CSConfig v2 = (de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) csconfig;
            Iterator shortcuts = v2.getShortcuts().iterator();
            while (shortcuts.hasNext()) {
                Shortcut shortcut = (Shortcut) shortcuts.next();
View Full Code Here

            updateLibraryLoader();
            info.setEnfordedLibraryUpdate(true);
        }
       
        // If no cxconfig.xml we are finished here
        CSConfig csConfig = info.getCsConfig();
        if (csConfig == null) {
            return;
        }
       
        // WGA wide configurations, that can be bypassed if the system file container is from a provider DB
        // (because they already were enforced by the provider db)
        if (!info.isFromProviderDB()) {
       
            // Add encoder mappings
            Iterator encoderMappings = csConfig.getEncoderMappings().iterator();
            while (encoderMappings.hasNext()) {
                EncoderMapping mapping = (EncoderMapping) encoderMappings.next();
                getLog().info("Adding WebTML encoder '" + mapping.getName() + "'");
                if (addEncoderMapping(mapping.getName(), mapping.getImplementationClass(), false)) {
                    info.getEnforcedEncoderMappings().add(mapping.getName());
                }
            }
           
           
            // Add element mappings
            Iterator elementMappings = csConfig.getElementMappings().iterator();
            while (elementMappings.hasNext()) {
                ElementMapping mapping = (ElementMapping) elementMappings.next();
                getLog().info("Adding WebTML element '" + mapping.getName() + "'");
                if (addElementMapping(mapping.getName(), mapping.getImplementationClass(), false)) {
                    info.getEnforcedElementMappings().add(mapping.getName());
                }
            }
           
            // Add media keys
            Iterator mediaKeys = csConfig.getMediaKeys().iterator();
            while (mediaKeys.hasNext()) {
                de.innovationgate.wga.common.beans.csconfig.v1.MediaKey mediaKey = (de.innovationgate.wga.common.beans.csconfig.v1.MediaKey) mediaKeys.next();
                getLog().info("Adding WebTML media key '" + mediaKey.getKey() + "' for MIME type '" + mediaKey.getMimeType() + "'");
                addMediaMapping(mediaKey, false);
                info.getEnforcedMediaMappings().add(mediaKey.getKey());
            }
           

            if (csConfig instanceof de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) {
               
                // Add TMLScript global shortcuts
                de.innovationgate.wga.common.beans.csconfig.v2.CSConfig v2 = (de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) csConfig;
                Iterator shortcuts = v2.getShortcuts().iterator();
                while (shortcuts.hasNext()) {
                    Shortcut shortcut = (Shortcut) shortcuts.next();
                    if (shortcut.getType() == Shortcut.TYPE_TMLSCRIPT_GLOBAL) {
                        getTmlscriptGlobalRegistry().registerGlobal(new TMLScriptGlobal(shortcut.getShortcut(), TMLScriptGlobal.TYPE_PACKAGE_OR_CLASS, shortcut.getReference()));
                    }
                }
               
            }
           
        }
       
        // Set WGA version compliance if not explicitly set via first level db option
        Set firstLevelOptions = (Set) db.getAttribute(DBATTRIB_FIRSTLEVELDBOPTIONS);
        if (!firstLevelOptions.contains(WGDatabase.COPTION_NOITEMBEHAVIOUR)) {
            db.getNoItemBehaviour().compliantTo(csConfig.getVersionCompliance());
        }
       
        // Add jobs
        Iterator jobs = csConfig.getJobDefinitions().iterator();
        while (jobs.hasNext()) {
            JobDefinition job = (JobDefinition) jobs.next();
            String jobName = db.getDbReference() + "." + job.getName();
            try {
                Task task = null;
View Full Code Here

    private CSConfig loadConfig(FileObject syncInfo) {
       
        try {
            if (syncInfo == null || !syncInfo.exists()) {
                return new CSConfig();
            }
           
            FileObject csConfig = syncInfo.getParent().resolveFile(SystemContainerManager.CSCONFIG_PATH);
            if (csConfig.exists()) {
                return CSConfig.load(csConfig);
View Full Code Here

            }
            File system = new File(files, "system");
            if (!system.exists()) {
                system.mkdir();
            }
            _csConfig = new CSConfig();
            _csConfig.write(_csConfigFile);
        }
        else {
            try {
                _csConfig = CSConfig.load(_csConfigFile);
View Full Code Here

        }

        // Convert CsConfig and PluginConfig object to proper version for WGA version compliance
        if (!_csConfig.getClass().equals(CSConfig.getCSConfigClassForCompliance(_csConfig.getVersionCompliance()))) {
           
            CSConfig correctVersionCSConfig = CSConfig.instantiateCSConfigForCompliance(_csConfig.getVersionCompliance());
            BeanUtils.copyProperties(correctVersionCSConfig, _csConfig);
           
            if (_csConfig.getPluginConfig() != null) {
                PluginConfig correctVersionPluginConfig = PluginConfig.instantiatePluginConfigForCompliance(_csConfig.getVersionCompliance());
                BeanUtils.copyProperties(correctVersionPluginConfig, _csConfig.getPluginConfig());
                correctVersionCSConfig.setPluginConfig(correctVersionPluginConfig);
            }
                       
            _csConfig = correctVersionCSConfig;

            // reload cached design shortcuts
View Full Code Here

      _encoderMappingsModel.remove((EncoderMapping) _tblEncoderMappings.getSelection()[0].getData());
    }
  } 
 
  private void handleAddElementMapping() {
    ElementMapping mapping = new ElementMapping();
    mapping.setName("<name>");
    mapping.setImplementationClass("<implementation class>");
    _elementMappingsModel.add(mapping);
  }
View Full Code Here

           
           
            // Add element mappings
            Iterator elementMappings = csConfig.getElementMappings().iterator();
            while (elementMappings.hasNext()) {
                ElementMapping mapping = (ElementMapping) elementMappings.next();
                getLog().info("Adding WebTML element '" + mapping.getName() + "'");
                if (addElementMapping(mapping.getName(), mapping.getImplementationClass(), false)) {
                    info.getEnforcedElementMappings().add(mapping.getName());
                }
            }
           
            // Add media keys
            Iterator mediaKeys = csConfig.getMediaKeys().iterator();
View Full Code Here

TOP

Related Classes of de.innovationgate.wga.common.beans.csconfig.v1.Version

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.