Package jeeves.constants

Examples of jeeves.constants.ConfigFile$Schedule$Attr


        PlexusJdoUtils.addObject( pmf.getPersistenceManager(), database.getSystemConfiguration() );

        Map<Integer, Schedule> schedules = new HashMap<Integer, Schedule>();
        for ( Iterator i = database.getSchedules().iterator(); i.hasNext(); )
        {
            Schedule schedule = (Schedule) i.next();

            schedule = (Schedule) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), schedule );
            schedules.put( Integer.valueOf( schedule.getId() ), schedule );
        }

        for ( Iterator i = database.getProjectGroups().iterator(); i.hasNext(); )
        {
            ProjectGroup projectGroup = (ProjectGroup) i.next();
View Full Code Here


        PlexusJdoUtils.addObject( pmf.getPersistenceManager(), database.getSystemConfiguration() );

        Map<Integer, Schedule> schedules = new HashMap<Integer, Schedule>();
        for ( Iterator i = database.getSchedules().iterator(); i.hasNext(); )
        {
            Schedule schedule = (Schedule) i.next();

            schedule = (Schedule) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), schedule );
            schedules.put( Integer.valueOf( schedule.getId() ), schedule );
        }

        for ( Iterator i = database.getProjectGroups().iterator(); i.hasNext(); )
        {
            ProjectGroup projectGroup = (ProjectGroup) i.next();
View Full Code Here

        PlexusJdoUtils.addObject( pmf.getPersistenceManager(), database.getSystemConfiguration() );

        Map<Integer, Schedule> schedules = new HashMap<Integer, Schedule>();
        for ( Iterator i = database.getSchedules().iterator(); i.hasNext(); )
        {
            Schedule schedule = (Schedule) i.next();

            schedule = (Schedule) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), schedule );
            schedules.put( Integer.valueOf( schedule.getId() ), schedule );
        }

        for ( Iterator i = database.getProjectGroups().iterator(); i.hasNext(); )
        {
            ProjectGroup projectGroup = (ProjectGroup) i.next();
View Full Code Here

        PlexusJdoUtils.addObject( pmf.getPersistenceManager(), database.getSystemConfiguration() );

        Map<Integer, Schedule> schedules = new HashMap<Integer, Schedule>();
        for ( Iterator i = database.getSchedules().iterator(); i.hasNext(); )
        {
            Schedule schedule = (Schedule) i.next();

            schedule = (Schedule) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), schedule );
            schedules.put( Integer.valueOf( schedule.getId() ), schedule );
        }

        for ( Iterator i = database.getProjectGroups().iterator(); i.hasNext(); )
        {
            ProjectGroup projectGroup = (ProjectGroup) i.next();
View Full Code Here

        PlexusJdoUtils.addObject( pmf.getPersistenceManager(), database.getSystemConfiguration() );

        Map<Integer, Schedule> schedules = new HashMap<Integer, Schedule>();
        for ( Iterator i = database.getSchedules().iterator(); i.hasNext(); )
        {
            Schedule schedule = (Schedule) i.next();

            schedule = (Schedule) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), schedule );
            schedules.put( Integer.valueOf( schedule.getId() ), schedule );
        }

        for ( Iterator i = database.getProjectGroups().iterator(); i.hasNext(); )
        {
            ProjectGroup projectGroup = (ProjectGroup) i.next();
View Full Code Here

        int pollFrequency = scheduledListener.getPollFrequencySeconds();
        int pollLatency = getPollLatencySeconds(scheduledListener);

        if(scheduleIdRef != null) {
            listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_ID_REF, scheduleIdRef);
            final Schedule schedule = model.getSchedule(scheduleIdRef) ;
            if (schedule.isSetStartDate()) {
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_START_DATE, Long.toString(schedule.getStartDate().getTimeInMillis())) ;
            }
            if (schedule.isSetEndDate()) {
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_END_DATE, Long.toString(schedule.getEndDate().getTimeInMillis())) ;
            }
            if (schedule instanceof SimpleSchedule) {
                final SimpleSchedule simpleSchedule = (SimpleSchedule)schedule ;
                final long simpleFrequency = simpleSchedule.getFrequency() ;
                final FrequencyUnit.Enum unit = simpleSchedule.getFrequencyUnits() ;
                final String frequencyVal ;
                if (unit.equals(FrequencyUnit.SECONDS)) {
                    frequencyVal = Long.toString(simpleFrequency * 1000) ;
                } else {
                    frequencyVal = Long.toString(simpleFrequency) ;
                }
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_FREQUENCY, frequencyVal) ;
                if (simpleSchedule.isSetExecCount()) {
                    listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_EXEC, Integer.toString(simpleSchedule.getExecCount())) ;
                }
            } else if (schedule instanceof CronSchedule) {
                final String cronExpression = ((CronSchedule)schedule).getCronExpression() ;
                if (cronExpression == null) {
                    throw new ConfigurationException("Missing cron expression from configuration") ;
                }
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_CRON_EXPRESSION, cronExpression) ;
            } else {
                throw new ConfigurationException("Unknown schedule type specified in configuration: " + schedule.getClass().getName()) ;
            }
           
            if(domElement.hasAttribute("poll-frequency-seconds") || domElement.hasAttribute("schedule-frequency") ) {
                logger.warn("Schedule Listener '" + listenerConfig.getTagName() + "' defines both 'scheduleidref' and frequency attributes.  Using the 'scheduleidref'.");
            }
View Full Code Here

        int pollFrequency = scheduledListener.getPollFrequencySeconds();
        int pollLatency = getPollLatencySeconds(scheduledListener);

        if(scheduleIdRef != null) {
            listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_ID_REF, scheduleIdRef);
            final Schedule schedule = model.getSchedule(scheduleIdRef) ;
            if (schedule.isSetStartDate()) {
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_START_DATE, Long.toString(schedule.getStartDate().getTimeInMillis())) ;
            }
            if (schedule.isSetEndDate()) {
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_END_DATE, Long.toString(schedule.getEndDate().getTimeInMillis())) ;
            }
            if (schedule instanceof SimpleSchedule) {
                final SimpleSchedule simpleSchedule = (SimpleSchedule)schedule ;
                final long simpleFrequency = simpleSchedule.getFrequency() ;
                final FrequencyUnit.Enum unit = simpleSchedule.getFrequencyUnits() ;
                final String frequencyVal ;
                if (unit.equals(FrequencyUnit.SECONDS)) {
                    frequencyVal = Long.toString(simpleFrequency * 1000) ;
                } else {
                    frequencyVal = Long.toString(simpleFrequency) ;
                }
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_FREQUENCY, frequencyVal) ;
                if (simpleSchedule.isSetExecCount()) {
                    listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_EXEC, Integer.toString(simpleSchedule.getExecCount())) ;
                }
            } else if (schedule instanceof CronSchedule) {
                final String cronExpression = ((CronSchedule)schedule).getCronExpression() ;
                if (cronExpression == null) {
                    throw new ConfigurationException("Missing cron expression from configuration") ;
                }
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_CRON_EXPRESSION, cronExpression) ;
            } else {
                throw new ConfigurationException("Unknown schedule type specified in configuration: " + schedule.getClass().getName()) ;
            }
           
            if(domElement.hasAttribute("poll-frequency-seconds") || domElement.hasAttribute("schedule-frequency") ) {
                logger.warn("Schedule Listener '" + listenerConfig.getTagName() + "' defines both 'scheduleidref' and frequency attributes.  Using the 'scheduleidref'.");
            }
View Full Code Here

        int pollFrequency = scheduledListener.getPollFrequencySeconds();
        int pollLatency = getPollLatencySeconds(scheduledListener);

        if(scheduleIdRef != null) {
            listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_ID_REF, scheduleIdRef);
            final Schedule schedule = model.getSchedule(scheduleIdRef) ;
            if (schedule.isSetStartDate()) {
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_START_DATE, Long.toString(schedule.getStartDate().getTimeInMillis())) ;
            }
            if (schedule.isSetEndDate()) {
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_END_DATE, Long.toString(schedule.getEndDate().getTimeInMillis())) ;
            }
            if (schedule instanceof SimpleSchedule) {
                final SimpleSchedule simpleSchedule = (SimpleSchedule)schedule ;
                final long simpleFrequency = simpleSchedule.getFrequency() ;
                final FrequencyUnit.Enum unit = simpleSchedule.getFrequencyUnits() ;
                final String frequencyVal ;
                if (unit.equals(FrequencyUnit.SECONDS)) {
                    frequencyVal = Long.toString(simpleFrequency * 1000) ;
                } else {
                    frequencyVal = Long.toString(simpleFrequency) ;
                }
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_FREQUENCY, frequencyVal) ;
                if (simpleSchedule.isSetExecCount()) {
                    listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_EXEC, Integer.toString(simpleSchedule.getExecCount())) ;
                }
            } else if (schedule instanceof CronSchedule) {
                final String cronExpression = ((CronSchedule)schedule).getCronExpression() ;
                if (cronExpression == null) {
                    throw new ConfigurationException("Missing cron expression from configuration") ;
                }
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_CRON_EXPRESSION, cronExpression) ;
            } else {
                throw new ConfigurationException("Unknown schedule type specified in configuration: " + schedule.getClass().getName()) ;
            }

            if(domElement.hasAttribute("poll-frequency-seconds") || domElement.hasAttribute("schedule-frequency") ) {
                logger.warn("Schedule Listener '" + listenerConfig.getTagName() + "' defines both 'scheduleidref' and frequency attributes.  Using the 'scheduleidref'.");
            }
View Full Code Here

        int pollFrequency = scheduledListener.getPollFrequencySeconds();
        int pollLatency = getPollLatencySeconds(scheduledListener);

        if(scheduleIdRef != null) {
            listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_ID_REF, scheduleIdRef);
            final Schedule schedule = model.getSchedule(scheduleIdRef) ;
            if (schedule.isSetStartDate()) {
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_START_DATE, Long.toString(schedule.getStartDate().getTimeInMillis())) ;
            }
            if (schedule.isSetEndDate()) {
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_END_DATE, Long.toString(schedule.getEndDate().getTimeInMillis())) ;
            }
            if (schedule instanceof SimpleSchedule) {
                final SimpleSchedule simpleSchedule = (SimpleSchedule)schedule ;
                final long simpleFrequency = simpleSchedule.getFrequency() ;
                final FrequencyUnit.Enum unit = simpleSchedule.getFrequencyUnits() ;
                final String frequencyVal ;
                if (unit.equals(FrequencyUnit.SECONDS)) {
                    frequencyVal = Long.toString(simpleFrequency * 1000) ;
                } else {
                    frequencyVal = Long.toString(simpleFrequency) ;
                }
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_FREQUENCY, frequencyVal) ;
                if (simpleSchedule.isSetExecCount()) {
                    listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_EXEC, Integer.toString(simpleSchedule.getExecCount())) ;
                }
            } else if (schedule instanceof CronSchedule) {
                final String cronExpression = ((CronSchedule)schedule).getCronExpression() ;
                if (cronExpression == null) {
                    throw new ConfigurationException("Missing cron expression from configuration") ;
                }
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_CRON_EXPRESSION, cronExpression) ;
            } else {
                throw new ConfigurationException("Unknown schedule type specified in configuration: " + schedule.getClass().getName()) ;
            }

            if(domElement.hasAttribute("poll-frequency-seconds") || domElement.hasAttribute("schedule-frequency") ) {
                logger.warn("Schedule Listener '" + listenerConfig.getTagName() + "' defines both 'scheduleidref' and frequency attributes.  Using the 'scheduleidref'.");
            }
View Full Code Here

TOP

Related Classes of jeeves.constants.ConfigFile$Schedule$Attr

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.