Package info.magnolia.context

Examples of info.magnolia.context.SimpleContext


        String jobName = jobCtx.getJobDetail().getName();
        log.info("start job [{}]", jobName);
        Map jobData = jobCtx.getJobDetail().getJobDataMap();

        // init context
        MgnlContext.setInstance(new SimpleContext(MgnlContext.getSystemContext()));
        String catalogName = (String) jobData.get(SchedulerConsts.CONFIG_JOB_COMMAND_CATALOG);
        String cmdName = (String) jobData.get(SchedulerConsts.CONFIG_JOB_COMMAND);

        Command cmd = CommandsManager.getInstance().getCommand(catalogName, cmdName);
        if (cmd == null)
        {
            log.error("can't find command {} for job in catalog {}", cmdName, catalogName);
            return;
        }

        Context ctx = new SimpleContext();
        // copy data, else the jobs context could get manipluated by the commands
        ctx.putAll((Map) jobData.get(SchedulerConsts.CONFIG_JOB_PARAMS));

        JobDefinition jd = null;
        try
        {
            jd = jobDefinitionManager.getJobDefinitionByName(jobName);
View Full Code Here


        String jobName = jobCtx.getJobDetail().getName();
        log.info("starting job [{}]", jobName);
        Map jobData = jobCtx.getJobDetail().getJobDataMap();

        // init context
        MgnlContext.setInstance(new SimpleContext(MgnlContext.getSystemContext()));
        String groovyScript = (String) jobData.get(SchedulerConsts.CONFIG_JOB_GROOVY);

        if (StringUtils.isEmpty(groovyScript))
        {
            String msg = "can't find groovy script for job " + jobName;
View Full Code Here

TOP

Related Classes of info.magnolia.context.SimpleContext

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.