Packagecom.vmware.actionsfw
Classpublic class ActionSpec
InheritanceActionSpec Inheritance Object
Implements mx.core.IUID

This is the descriptor class for an action. The action framework can create action objects from this class.

ActionSpec objects can be supplied to the action framework in sets by extending the vise.actions.sets extension point with an ActionSetSpec object and supplying an array of ActionSpec objects to the actions property (see example below).

View the examples

See also

com.vmware.actionsfw.ActionSetSpec


Public Properties
 PropertyDefined By
  acceptsMultipleTargets : Boolean
(Optional) When true, the action is considered relevant for target contexts that contain more than one object.
ActionSpec
  command : ObjectSpec
Specifies the class that handles the ActionInvocationEvent that represents (the invocation of) this action.
ActionSpec
  conditionalProperty : String
(Optional) The name of a boolean property that indicates whether this action is applicable or should be enabled on the object in question.
ActionSpec
  description : String
(Optional) The longer description of the action, suitable for a tooltip.
ActionSpec
  icon : Class
(Optional) The icon to use for this action in UIs that display icons.
ActionSpec
  label : String
The readable short name of the action, suitable for use on a button or in a menu.
ActionSpec
  privateAction : Boolean
(Optional) Flag indicating that this action should not be used by the Action Framework except when explicitly identified by its uid.
ActionSpec
  uid : String
Unique id of the action, in namespace style, e.g.
ActionSpec
Property Detail
acceptsMultipleTargetsproperty
public var acceptsMultipleTargets:Boolean

(Optional) When true, the action is considered relevant for target contexts that contain more than one object.

The default value is false.

commandproperty 
public var command:ObjectSpec

Specifies the class that handles the ActionInvocationEvent that represents (the invocation of) this action.

Handling is done via a method annotated with the [RequestHandler] tag which contains the actionSpec's uid as follows:

     [RequestHandler("com.vmware.samples.actions.myVmAction1")]
     public function onVmAction1Invocation(event:ActionInvocationEvent):void {
       ...
     }
    

conditionalPropertyproperty 
public var conditionalProperty:String

(Optional) The name of a boolean property that indicates whether this action is applicable or should be enabled on the object in question. In other words, the current value of the property on a given object indicates the current availability of the action on that object.

descriptionproperty 
public var description:String

(Optional) The longer description of the action, suitable for a tooltip.

iconproperty 
public var icon:Class

(Optional) The icon to use for this action in UIs that display icons.

labelproperty 
public var label:String

The readable short name of the action, suitable for use on a button or in a menu.

privateActionproperty 
public var privateAction:Boolean

(Optional) Flag indicating that this action should not be used by the Action Framework except when explicitly identified by its uid. In practice, set it to true when you define a "context-less" action, for instance a global action in a list toolbar or a drag and drop action that you don't want to see in the default menu.

The default value is false.

uidproperty 
uid:String

Unique id of the action, in namespace style, e.g. com.acme.actions.vm.vmAction1. The uid is used in the command class [RequestHandler] tag which annotates the method handling this action.


Implementation
    public function get uid():String
    public function set uid(value:String):void
Examples
The following code might appear in a plugin manifest file to declare an action for virtual machines.
 
  <!-- action set for VMs -->
  <extension id="com.acme.actions.vm.vmActionSet"/>
     <extendedPoint>vise.actions.sets</extendedPoint>
     <object>
        <actions>
           <!-- action 1 -->
           <com.vmware.actionsfw.ActionSpec>
              <uid>com.acme.actions.vm.vmAction1</uid>
              <label>action label 1</label>
              <description>This will perform action 1 on the virtual machine</description>
              <icon>Embed("../assets/vmAction1Icon.png")</icon>
              <!-- This action requires that the "config.template" property be true on the ActionContext objects -->
              <conditionalProperty>config.template</conditionalProperty>
              <!-- The command class that handles ActionInvocationEvents for this action -->
              <operationId>vmAction1CommandClass</operationId>
              <acceptsMultipleTargets>true</acceptsMultipleTargets>
           </com.vmware.actionsfw.ActionSpec>
        </actions>
     </object>
     <metadata>
        <objectType>VirtualMachine</objectType>
     </metadata>
  </extension>