org.rhq.enterprise.server.operation
Class OperationJob

java.lang.Object
  extended by org.rhq.enterprise.server.operation.OperationJob
All Implemented Interfaces:
org.quartz.Job
Direct Known Subclasses:
GroupOperationJob, ResourceOperationJob

public abstract class OperationJob
extends Object
implements org.quartz.Job


Field Summary
static String DATAMAP_INT_ENTITY_ID
           
static String DATAMAP_INT_PARAMETERS_ID
           
static String DATAMAP_INT_SUBJECT_ID
           
static String DATAMAP_STRING_OPERATION_DISPLAY_NAME
           
static String DATAMAP_STRING_OPERATION_NAME
           
 
Constructor Summary
OperationJob()
           
 
Method Summary
protected  org.rhq.core.domain.operation.ResourceOperationHistory createOperationHistory(String jobName, String jobGroup, org.rhq.core.domain.operation.bean.ResourceOperationSchedule schedule, org.rhq.core.domain.operation.GroupOperationHistory groupHistory, OperationManagerLocal operationManager)
           
protected  org.rhq.core.domain.auth.Subject getUserWithSession(org.rhq.core.domain.auth.Subject user)
          For security purposes, we need to provide a subject with a valid login session.
protected  void updateOperationScheduleEntity(org.quartz.JobDetail jobDetail, Date nextFireTime, OperationManagerLocal operationManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.quartz.Job
execute
 

Field Detail

DATAMAP_STRING_OPERATION_NAME

public static final String DATAMAP_STRING_OPERATION_NAME
See Also:
Constant Field Values

DATAMAP_STRING_OPERATION_DISPLAY_NAME

public static final String DATAMAP_STRING_OPERATION_DISPLAY_NAME
See Also:
Constant Field Values

DATAMAP_INT_PARAMETERS_ID

public static final String DATAMAP_INT_PARAMETERS_ID
See Also:
Constant Field Values

DATAMAP_INT_SUBJECT_ID

public static final String DATAMAP_INT_SUBJECT_ID
See Also:
Constant Field Values

DATAMAP_INT_ENTITY_ID

public static final String DATAMAP_INT_ENTITY_ID
See Also:
Constant Field Values
Constructor Detail

OperationJob

public OperationJob()
Method Detail

getUserWithSession

protected org.rhq.core.domain.auth.Subject getUserWithSession(org.rhq.core.domain.auth.Subject user)
                                                       throws Exception
For security purposes, we need to provide a subject with a valid login session. This creates such a subject by logging in as the given user and returning the subject with a valid session. Call this even if the user already has a session if you think the session may have timed out - this will refresh the session.

Parameters:
user - the user whose needs a valid session assigned to it
reattach - if the user already has a session, reattach to it rather than creating a new session
Returns:
the user with a valid session associated with it
Throws:
Exception
See Also:
SubjectManagerLocal.loginUnauthenticated(String)

updateOperationScheduleEntity

protected void updateOperationScheduleEntity(org.quartz.JobDetail jobDetail,
                                             Date nextFireTime,
                                             OperationManagerLocal operationManager)

createOperationHistory

protected org.rhq.core.domain.operation.ResourceOperationHistory createOperationHistory(String jobName,
                                                                                        String jobGroup,
                                                                                        org.rhq.core.domain.operation.bean.ResourceOperationSchedule schedule,
                                                                                        org.rhq.core.domain.operation.GroupOperationHistory groupHistory,
                                                                                        OperationManagerLocal operationManager)


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.