Package org.rhq.core.domain.operation

Examples of org.rhq.core.domain.operation.ScheduleJobId


                if (null != parameters) {
                    entityManager.remove(parameters);
                }
            }

            ScheduleJobId jobIdObject = new ScheduleJobId(jobId);
            String jobName = jobIdObject.getJobName();
            String jobGroup = jobIdObject.getJobGroup();

            boolean deleted = scheduler.deleteJob(jobName, jobGroup);

            if (deleted) {
                deleteOperationScheduleEntity(jobIdObject);
View Full Code Here


                if (null != parameters) {
                    entityManager.remove(parameters);
                }
            }

            ScheduleJobId jobIdObject = new ScheduleJobId(jobId);
            String jobName = jobIdObject.getJobName();
            String jobGroup = jobIdObject.getJobGroup();

            boolean deleted = scheduler.deleteJob(jobName, jobGroup);

            if (deleted) {
                deleteOperationScheduleEntity(jobIdObject);
View Full Code Here

        } else {
            // for jobs created prior to upgrading to RHQ 4.0, the map will not contain an entityId entry,
            // so we'll need to lookup the entity id from the DB.
            String jobName = jobDetail.getName();
            String jobGroup = jobDetail.getGroup();
            ScheduleJobId jobId = new ScheduleJobId(jobName, jobGroup);
            OperationScheduleEntity operationScheduleEntity = findOperationScheduleEntity(jobId);
            entityId = operationScheduleEntity.getId();
        }
        return entityId;
    }
View Full Code Here

    protected void updateOperationScheduleEntity(JobDetail jobDetail, Date nextFireTime,
        OperationManagerLocal operationManager) {
        try {
            String jobName = jobDetail.getName();
            String jobGroup = jobDetail.getGroup();
            ScheduleJobId jobId = new ScheduleJobId(jobName, jobGroup);

            if (nextFireTime == null) {
                operationManager.deleteOperationScheduleEntity(jobId);
            } else {
                operationManager.updateOperationScheduleEntity(jobId, nextFireTime.getTime());
View Full Code Here

        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();
    }

    public void testScheduleJobIdEquals() {
        ScheduleJobId one;
        ScheduleJobId two;

        one = new ScheduleJobId("name", "group");
        assert one.equals(one);
        assert one.getJobName().equals("name");
        assert one.getJobGroup().equals("group");

        one = new ScheduleJobId("name", "group");
        two = new ScheduleJobId("name", "group");
        assert one != two;
        assert one.getJobName().equals(two.getJobName());
        assert one.getJobGroup().equals(two.getJobGroup());
        assert one.equals(two);
        assert one.hashCode() == two.hashCode();

        two = new ScheduleJobId("nameX", "group");
        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();

        two = new ScheduleJobId("name", "groupX");
        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();

        one = new ScheduleJobId("nameX", "group");
        two = new ScheduleJobId("name", "group");
        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();

        one = new ScheduleJobId("name", "groupX");
        assert one != two;
        assert !one.equals(two);
        assert one.hashCode() != two.hashCode();
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.operation.ScheduleJobId

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.