public class ControllerJob extends TieSimpleObject
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVE_ATTRIBUTE
The name of the Attribute reflecting the active status of the object.
|
static String |
CLASS_NAME
The name of the ClassObject representing this class.
|
static String |
COMPLETIONDESCRIPTION_ATTRIBUTE
The description of how the ControllerJob completed.
|
static String |
COMPLETIONDESCRIPTION_CANCELLED_NEW_CONTROLLER
Completion description indicating being cancelled by a new Controller
that took over after the Job was created.
|
static String |
COMPLETIONDESCRIPTION_FAILURE_UNKNOWN
Completion description indicating an unknown failure.
|
static String |
COMPLETIONDESCRIPTION_INVALID_DISPOSED_OBJECT
Completion description indicating a disposed object was specified.
|
static String |
COMPLETIONDESCRIPTION_INVALID_HANDLER
Completion description indicating an invalid Handler specified.
|
static String |
COMPLETIONDESCRIPTION_INVALID_REPLYCODE
Completion description indicating an invalid ControllerReply code was received.
|
static String |
COMPLETIONDESCRIPTION_INVALID_REQUEST_ALREADY_ACTIVE
Completion description indicating a ControllerRequest was already in
progress for the specified object.
|
static String |
COMPLETIONDESCRIPTION_INVALID_SERVER
Completion description indicating an invalid Server specified.
|
static String |
COMPLETIONDESCRIPTION_INVALID_SETTINGS
Completion description indicating an invalid job settings.
|
static String |
COMPLETIONDESCRIPTION_SETTINGS_NOACTION
Completion description indicating that the job settings
resulted in no action taken.
|
static String |
COMPLETIONDESCRIPTION_SUCCESS
Completion description indicating normal success.
|
static String |
COMPLEXJOBCLASSPATH_ATTRIBUTE
The name of the Attribute representing
the fully-qualified class name of the Java class which
implements the ControllerJobInterface.
|
static String |
DESCRIPTION_ATTRIBUTE
The description of this ControllerJob.
|
static String |
JOBDATE_ATTRIBUTE
The name of the Attribute representing
The date this ControllerJob was placed.
|
static String |
JOBSETTING_KEY_NODEASSIGNABLE
The JobSetting key that holds the target object (once the job is started).
|
static String |
JOBSETTING_KEY_TARGETOBJECT
The JobSetting key that holds the target object (once the job is started).
|
static String |
JOBSETTINGS_ATTRIBUTE
The name of the Attribute representing
the settings used to describe the job.
|
static String |
JOBTYPE_ATTRIBUTE
The name of the Attribute representing
the type of job, for example RESTART or SHUTDOWN.
|
static String |
NAME_ATTRIBUTE
The name of this ControllerJob.
|
static String |
RUNTIMESTATETARGET_ATTRIBUTE
Name of the RUNTIMESTATETARGET Attribute
|
static String |
SIMPLEJOBCODE_ATTRIBUTE
The name of the Attribute representing
the code that identifies the type for simple ControllerJobs.
|
static String |
UUID_ATTRIBUTE
The name of the Attribute representing the UUID.
|
DOMAIN_UNIQUENAME_DEFAULT_DELIMITER, m_ClassId, m_Id, m_Session, PROPERTYBUNDLE_ATTRIBUTE
Modifier | Constructor and Description |
---|---|
protected |
ControllerJob(LibrarySession session,
Long id,
Long classId,
S_LibraryObjectData data)
Construct a ControllerJob object.
|
Modifier and Type | Method and Description |
---|---|
void |
addSetting(String key,
AttributeValue value)
Adds a setting (SimpleProperty) for this object.
|
void |
complete()
Mark the job as completed, by setting ACTIVE to false.
|
void |
complete(String compDesc)
Mark the job as completed, by setting ACTIVE to false
and adding the specified completion description.
|
static ComplexControllerJob |
constructComplexControllerJob(LibrarySession session,
String classPath)
Constucts the ComplexControllerJob instance implementation
corresponding to the specified class path.
|
static ControllerJob |
create(int code,
RuntimeState rs)
Create a simple ControllerJob.
|
static ControllerJob |
createReconfigure(RuntimeState rs,
AttributeValueTable settingsTable)
Create a job to Reconfigure a RuntimeState object.
|
String |
getCompletionDescription()
Returns the description of how the ControllerJob completed.
|
ComplexControllerJob |
getComplexControllerJob()
Gets the ComplexControllerJob instance implementation
corresponding to the ComplexJobClassPath.
|
String |
getComplexJobClassPath()
Returns the fully-qualified class name of the Java class
which implements the ControllerJobInterface.
|
String |
getDescription()
Returns the description of this ControllerJob.
|
Date |
getJobDate()
Gets The date this ControllerJob was placed.
|
SimpleProperty[] |
getJobSettings()
Gets the settings used to describe the job.
|
AttributeValue |
getJobSettingValue(String settingName)
Gets a settings used to describe the job for the specified setting name.
|
String |
getJobType()
Returns the job type for this ControllerJob.
|
RuntimeState |
getRuntimeStateTarget()
Gets the RuntimeState that is the target (or subject) of this Job.
|
Integer |
getSimpleJobCode()
Gets the simple Job code number for simple ControllerJobs, using the
same code numbers as for ControllerRequests.
|
String |
getSimpleJobCodeName()
Gets the simple Job code name for simple ControllerJobs.
|
String |
getUuid()
Gets the value of the UUID attribute.
|
boolean |
hasNameAttribute()
Returns true if this object is an instance of a class
that has a NAME attribute, and false otherwise.
|
boolean |
isActive()
Gets the Active status.
|
boolean |
isSimpleJob()
Returns true if this is a simple Job.
|
void |
performAsController()
Perform the Job.
|
void |
performComplexJob()
Perform a complex Job.
|
void |
performSimpleJob()
Perform a simple Job.
|
protected void |
postCreate(LibraryObjectDefinition lodef)
Extensibility point to perform actions after the
creation of a object.
|
protected void |
preCreate(LibraryObjectDefinition lodef)
Extensibility point to perform actions prior to the
creation of a object.
|
protected void |
preFree(LibraryObjectDefinition lodef)
Extensibility point to perform actions prior to the
permanent deletion ("free") of a object.
|
protected void |
preUpdate(LibraryObjectDefinition lodef)
Extensibility point to perform actions prior to the update of a object.
|
void |
setActive(boolean active)
Sets the ACTIVE attribute for this object.
|
free, handleCreate, isValidEventType
added, addSimpleProperty, addSimpleProperty, applyProperties, auditCreated, auditUpdated, canPurge, checkIfPropertyBundleSupported, checkRequiredAttributeSet, clearCopyContext, clearFreeContext, clearUpdateContext, compareTo, constructIdArray, constructIdArray, constructLibraryObject, constructLibraryObjectVector, createDedicatedPropertyBundle, createInstance, deriveDomainUniqueName, dispose, equals, equals, free, freeAll, get, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getAuditDomainContext, getAuditEventFolderContext, getClassId, getClassname, getClassName, getClassObject, getCommonName, getCommonNameAndClass, getCopyContext, getCreateContext, getData, getDefinition, getDefinitionForSimplePropertyUpdates, getEffectivePolicyListElements, getEventualAttributeByUpperCaseName, getFreeContext, getId, getLabel, getName, getObjectReferenceAttribute, getOperationActionSpecificationContext, getPropertyBundle, getPropertyValue, getPublicObjectAttribute, getResourceString, getResourceString, getSchemaObjectAttribute, getSession, getSessionInterface, getSharedStateFactory, getSimpleObjectAttribute, getSimpleProperties, getSimpleProperty, getSimplePropertyValue, getStringIdentifier, getSystemObjectAttribute, getTraceLogger, getUpdateContext, handleAdminModeChange, handleEvent, handleFree, handleUpdate, hashCode, hasPropertyBundleAttribute, invalidateState, invokeOperation, invokeOperation, invokeServerMethod, isConnected, isCoreEventPostingEnabled, isInstanceOf, isPersistent, isTraced, lockRows, lookupInstanceLabel, performPostCreateExtensions, performPostFreeExtensions, performPostUpdateExtensions, performPreCreateExtensions, performPreFreeExtensions, performPreUpdateExtensions, postEvent, postEvent, postFree, postUpdate, prePostAuditEvent, putProperty, putProperty, removeAllProperties, removeAllSimpleProperties, removeAllSimpleProperties, removed, removeProperty, removeSimpleProperty, removeSimpleProperty, renderAsRandomAccessContent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setCopyContext, setFreeContext, setId, setName, setPropertyBundle, setPropertyValue, setUpdateContext, toString, trace, trustHandleCreate, trustHandleCreateAsAdmin, trustHandleFree, trustHandleFreeAsAdmin, trustHandleUpdate, trustHandleUpdateAsAdmin, update, updateAndExposeDefinition, validatePropertyValues, vectorLibraryObjectElement, vectorToLibraryObjectArray, verifyAdministrationMode, verifyConnected, verifyPersistent, verifySystemUserAccess, verifyTargetObject
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAttributeByUpperCaseName, getClassId, getId, getSessionInterface
getTraceLogger, isTraced, trace
public static final String CLASS_NAME
public static final String UUID_ATTRIBUTE
public static final String NAME_ATTRIBUTE
public static final String DESCRIPTION_ATTRIBUTE
public static final String COMPLETIONDESCRIPTION_ATTRIBUTE
public static final String ACTIVE_ATTRIBUTE
public static final String JOBTYPE_ATTRIBUTE
public static final String SIMPLEJOBCODE_ATTRIBUTE
public static final String COMPLEXJOBCLASSPATH_ATTRIBUTE
public static final String JOBDATE_ATTRIBUTE
public static final String RUNTIMESTATETARGET_ATTRIBUTE
public static final String JOBSETTINGS_ATTRIBUTE
public static final String JOBSETTING_KEY_TARGETOBJECT
public static final String JOBSETTING_KEY_NODEASSIGNABLE
public static final String COMPLETIONDESCRIPTION_SUCCESS
public static final String COMPLETIONDESCRIPTION_FAILURE_UNKNOWN
public static final String COMPLETIONDESCRIPTION_INVALID_SETTINGS
public static final String COMPLETIONDESCRIPTION_SETTINGS_NOACTION
public static final String COMPLETIONDESCRIPTION_INVALID_REPLYCODE
public static final String COMPLETIONDESCRIPTION_INVALID_SERVER
public static final String COMPLETIONDESCRIPTION_INVALID_HANDLER
public static final String COMPLETIONDESCRIPTION_INVALID_DISPOSED_OBJECT
public static final String COMPLETIONDESCRIPTION_INVALID_REQUEST_ALREADY_ACTIVE
public static final String COMPLETIONDESCRIPTION_CANCELLED_NEW_CONTROLLER
protected ControllerJob(LibrarySession session, Long id, Long classId, S_LibraryObjectData data) throws IfsException
session
- current LibrarySessionid
- object idclassId
- class iddata
- data componentIfsException
- if the operation failspublic static ControllerJob create(int code, RuntimeState rs) throws IfsException
code
- the ControllerRequest coders
- the RuntimeState targetIfsException
- if the operation failspublic static ControllerJob createReconfigure(RuntimeState rs, AttributeValueTable settingsTable) throws IfsException
rs
- the RuntimeState targetsettingsTable
- the Property settingsIfsException
- if the operation failspublic boolean hasNameAttribute() throws IfsException
LibraryObject
hasNameAttribute
in class LibraryObject
IfsException
- if operation fails.public String getUuid() throws IfsException
IfsException
- if the operation failspublic String getDescription() throws IfsException
IfsException
- if the operation fails.public String getCompletionDescription() throws IfsException
This is typically null when the job is completed successfully.
IfsException
- if the operation fails.public boolean isActive() throws IfsException
IfsException
- if operation failspublic String getJobType() throws IfsException
For example, this will return "RESTART" for the Simple ControllerJob
with SimpleJobCode of ConrtollerRequest.CODE_RESTART
. For
complex ControllerJobs, it will return the name that was assigned
when the job was created.
IfsException
- if the operation fails.public Integer getSimpleJobCode() throws IfsException
IfsException
- if the operation failspublic String getSimpleJobCodeName() throws IfsException
IfsException
- if the operation failspublic String getComplexJobClassPath() throws IfsException
IfsException
- if the operation fails.public boolean isSimpleJob() throws IfsException
A simple job is one whose Job code matches a ControllerRequest code.
IfsException
- if the operation failspublic Date getJobDate() throws IfsException
IfsException
- if the operation failspublic SimpleProperty[] getJobSettings() throws IfsException
IfsException
- if the operation failspublic AttributeValue getJobSettingValue(String settingName) throws IfsException
settingName
- the setting nameIfsException
- if the operation failspublic RuntimeState getRuntimeStateTarget() throws IfsException
IfsException
- if operation failspublic final ComplexControllerJob getComplexControllerJob() throws IfsException
This implementation is cached for use by the session associated with this instance.
IfsException
- if the operation failspublic static ComplexControllerJob constructComplexControllerJob(LibrarySession session, String classPath) throws IfsException
session
- the session contextclassPath
- the fully qualified class pathIfsException
- if the operation failspublic void setActive(boolean active) throws IfsException
active
- the new Active status valueIfsException
- if operation failspublic void complete() throws IfsException
This variant does not set a Completion description.
IfsException
- if operation failspublic void complete(String compDesc) throws IfsException
compDesc
- the completion descriptionIfsException
- if operation failspublic void addSetting(String key, AttributeValue value) throws IfsException
key
- the setting property's keyvalue
- the setting property's valueIfsException
- if the operation failsprotected void preCreate(LibraryObjectDefinition lodef) throws IfsException
LibraryObject
This method is typically overridden by subclasses that
add attribute settings to the definition prior to the object
being created, and/or create other objects that the target object
depends on. At this point, the target object does not exist in
the database, and therefore certain operations performed on the target
will fail (such as getAttribute
).
Subclasses are expected to invoke super.preCreate
.
preCreate
in class LibraryObject
lodef
- object definition that will be used to create the objectIfsException
- if operation fails.protected void postCreate(LibraryObjectDefinition lodef) throws IfsException
LibraryObject
This method is typically overridden by subclasses that
perform operations after an object is created.
Subclasses are expected to invoke super.postCreate
.
postCreate
in class LibraryObject
lodef
- object definition that was used to create the objectIfsException
- if operation fails.protected void preUpdate(LibraryObjectDefinition lodef) throws IfsException
LibraryObject
This method is typically overridden by subclasses that
perform other operations prior to the target object
being updated, in order to modify objects related
to the target object.
Subclasses are expected to invoke super.preUpdate
.
preUpdate
in class LibraryObject
lodef
- object definition used to define how the target object
will be updatedIfsException
- if operation fails.protected void preFree(LibraryObjectDefinition lodef) throws IfsException
LibraryObject
This method is typically overridden by subclasses that
perform other operations prior to the target object
being freed in order to all delete or modify objects related
to the target object.
Subclasses are expected to invoke super.preFree
.
preFree
in class LibraryObject
lodef
- object definition used to hold options related to the free
operationIfsException
- if operation fails.public void performAsController() throws IfsException
IfsException
- if operation failspublic void performSimpleJob() throws IfsException
IfsException
- if operation failspublic void performComplexJob() throws IfsException
IfsException
- if operation failsCopyright © 2023. All rights reserved.