public class StateChangeAction extends ActionAdapter
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ACTIONSPECIFICATION_NAME
The name of the default ActionSpecification for this type of action.
|
static AuditEventTypeDefinition |
EVENTTYPE_SMARTHOMEITEM_CLOSED
The AuditEventTypeDefinition for the SMARTHOMEITEM_CLOSED action.
|
static AuditEventTypeDefinition |
EVENTTYPE_SMARTHOMEITEM_OPENED
The AuditEventTypeDefinition for the SMARTHOMEITEM_OPENED action.
|
static AuditEventTypeDefinition |
EVENTTYPE_SMARTHOMEITEM_STARTED
The AuditEventTypeDefinition for the SMARTHOMEITEM_STARTED action.
|
static AuditEventTypeDefinition |
EVENTTYPE_SMARTHOMEITEM_STOPPED
The AuditEventTypeDefinition for the SMARTHOMEITEM_STOPPED action.
|
static int |
OPTYPE_CLOSED
The Operation type for the SMARTHOMEITEM_CLOSED action.
|
static int |
OPTYPE_OPENED
The Operation type for the SMARTHOMEITEM_OPENED action.
|
static int |
OPTYPE_STARTED
The Operation type for the SMARTHOMEITEM_STARTED action.
|
static int |
OPTYPE_STOPPED
The Operation type for the SMARTHOMEITEM_STOPPED action.
|
Constructor and Description |
---|
StateChangeAction()
Constructs a StateChangeAction to be used as an ActionFactory.
|
StateChangeAction(ActionFactory factory)
Constructs a "pending" StateChangeAction, to be used to execute a new Action.
|
StateChangeAction(ActionFactory factory,
AuditEvent event)
Constructs an "executed" StateChangeAction, reflecting a previously
executed Action.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAllSettings()
Clears any previously-set settings on this Action instance.
|
Action |
constructExecutedAction(AuditEvent event)
Construct an instance reflecting a previously executed Action.
|
Action |
constructPendingAction()
Construct an instance of an Action that is not yet executed.
|
void |
execute()
Perform the Action execution.
|
AuditEventTypeDefinition[] |
getAuditEventTypeDefinitions()
Gets the set of AuditEventTypeDefinitions for events
that can be posted by this Action associated with this type of Action.
|
boolean |
isClosedSet()
Returns true if this action will set a CLOSED (when executed).
|
boolean |
isOpenSet()
Returns true if this action will set an OPEN (when executed).
|
boolean |
isStartedSet()
Returns true if this action will set a STARTED (when executed).
|
boolean |
isStoppedSet()
Returns true if this action will set a STOPPED (when executed).
|
void |
setClosed()
Sets a "CLOSED" indication, prior to execution.
|
void |
setOpen()
Sets a "OPEN" indication, prior to execution.
|
void |
setStarted()
Sets a "STARTED" indication, prior to execution.
|
void |
setStopped()
Sets a "STOPPED" indication, prior to execution.
|
calculateOperationType, dispatchEvent, dispatchEvent, dispatchEvent, dispatchEvent, execute, execute, getActionSpecification, getActionSpecificationId, getActivityRecord, getActor, getAuditEventId, getAuditOperationType, getAuditOperationTypeKey, getAuxiliaryObjects, getAuxiliaryString, getExecutingUserId, getExecutionDate, getFirstAuxiliaryObject, getInstance, getInstance, getPerformedActivityRecord, getProperties, getPropertyTable, getSecondAuxiliaryObject, getSession, getTrackedActivityRecord, isActivityRecordFreed, isActivityRecordUndiscoverable, isActorFreed, isActorUndiscoverable, isFactory, isPendingExecution, isPreviouslyExecuted, postExecute, preExecute, setExecutingActionType
constructActivityEventTypeDefinition, initialize, isInitialized
public static final String DEFAULT_ACTIONSPECIFICATION_NAME
public static final AuditEventTypeDefinition EVENTTYPE_SMARTHOMEITEM_OPENED
public static final AuditEventTypeDefinition EVENTTYPE_SMARTHOMEITEM_CLOSED
public static final AuditEventTypeDefinition EVENTTYPE_SMARTHOMEITEM_STARTED
public static final AuditEventTypeDefinition EVENTTYPE_SMARTHOMEITEM_STOPPED
public static final int OPTYPE_OPENED
public static final int OPTYPE_CLOSED
public static final int OPTYPE_STARTED
public static final int OPTYPE_STOPPED
public StateChangeAction()
Called from ActionSpecification when initializing the ActionFactory to use for that specific ActionSpecification.
public StateChangeAction(ActionFactory factory) throws IfsException
factory
- the ActionFactory used to construct this instanceIfsException
- if operation failspublic StateChangeAction(ActionFactory factory, AuditEvent event) throws IfsException
factory
- the ActionFactory used to construct this instanceevent
- The event that was posted as part of the
previously executed Action.IfsException
- if operation failspublic Action constructPendingAction() throws IfsException
constructPendingAction
in class ActionFactory
IfsException
- if the operation fails.public Action constructExecutedAction(AuditEvent event) throws IfsException
constructExecutedAction
in class ActionFactory
event
- The event that was posted as part of the
previously executed Action.IfsException
- if the operation fails.public AuditEventTypeDefinition[] getAuditEventTypeDefinitions()
getAuditEventTypeDefinitions
in class ActionFactory
public void clearAllSettings()
public void setOpen()
public void setClosed()
public void setStarted()
public void setStopped()
public boolean isOpenSet()
public boolean isClosedSet()
public boolean isStartedSet()
public boolean isStoppedSet()
public void execute() throws IfsException
This is called after first invoking preExecute
and before
invoking postExecute
.
execute
in class ActionAdapter
IfsException
- if the operation fails.Copyright © 2023. All rights reserved.