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

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


    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

       
        bind(form, SWTBinder.BINDING_STRATEGY_AS_YOU_TYPE);
  }

  private void handleAddEncoderMapping() {
    EncoderMapping mapping = new EncoderMapping();
    mapping.setName("<name>");
    mapping.setImplementationClass("<implementation class>");
    _encoderMappingsModel.add(mapping);
  }
View Full Code Here

        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();
View Full Code Here

        List<Encoding> encodings = new ArrayList<Encoding>(ITEMENCODINGS.values());

        Iterator<EncoderMapping> customEncoders = _csConfig.getEncoderMappings().iterator();
        while (customEncoders.hasNext()) {
            EncoderMapping element = customEncoders.next();
            encodings.add(new Encoding(element.getName(), element.getName()));
        }

        return encodings;
    }
View Full Code Here

   
        bind(form, SWTBinder.BINDING_STRATEGY_AS_YOU_TYPE);
  }

  private void handleAddJobDefinition() {
    JobDefinition jobDef = new JobDefinition();
    jobDef.setName("<name>");
    jobDef.setType(JobType.TYPE_TMLSCRIPTMODULE);
    jobDef.setResource("<job resource>");   
    _jobDefinitionsModel.add(jobDef);
  }
View Full Code Here

        }
       
        // 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;
               
                if (job.getType() == JobDefinition.TYPE_TMLSCRIPTMODULE) {
                    ScriptTask scriptTask = new ScriptTask();
                    scriptTask.setCancelJobOnFail(true);
                    scriptTask.setDatabase(db.getDbReference());
                    scriptTask.setModule(job.getResource());
                    task = scriptTask;
                }
                else if (job.getType() == JobDefinition.TYPE_JAVA) {
                    JavaTask javaTask = new JavaTask();
                    javaTask.setClassName(job.getResource());
                    task = javaTask;
                }
                else {
                    getLog().error("Error adding job '" + jobName + "'. Unknown job type: " + job.getType());
                    continue;
                }
               
                task.setDescription(job.getDescription());
               
                JobSchedule schedule = null;
                if (job.getSchedule() != null && !job.getSchedule().trim().equals("")) {
                    schedule = new JobSchedule();
                    schedule.setEnabled(true);
                    schedule.setScheduleData(job.getSchedule());
                    schedule.setType(JobSchedule.TYPE_CRON);
                }
               
                Job schedulerJob = getScheduler().addCustomTaskJob(jobName, task, false, schedule);
                schedulerJob.setDescription(job.getDescription());
                schedulerJob.getOptions().put("database", db.getDbReference());
                info.getEnforcedJobDefinitions().add(schedulerJob.getName());
            }
            catch (Exception e) {
                getLog().error("Error adding job '" + jobName + "' from content store configuration", e);
View Full Code Here

TOP

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

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.