Packagecom.adobe.portfolio.api
Interfacepublic interface ICommand

Language Version : ActionScript 3.0
Product Version : Portfolio 9.0
Runtime Versions : Flash Player 10.1, AIR 2.0

This interface provides functions used to request and execute commands. A command is a request that Acrobat perform an action on the navigator's behalf. Normally the navigator cannot perform the action directly because it requires access to secure data that is either not available to it or it must display user interface elements, such as dialogs or context menus, that are part of Acrobat's traditional, non-Flash-based user interface.

See also

INavigatorHost.requestCommand()
INavigatorHost.commands


Public Properties
 PropertyDefined By
  displayName : String
[read-only] The localized display name of the command, which comes from Acrobat's runtime locale (INavigatorHost.locale).
ICommand
  enabled : Boolean
[read-only] The enabled state of the command.
ICommand
  name : String
[read-only] The programmatic name of the command.
ICommand
Public Methods
 MethodDefined By
  
appliesTo(operand:*):Boolean
Determines whether the ICommand instance can operate on the specified item.
ICommand
  
execute(operand:* = null, arguments:Array = null):void
Perform the command on the specified item or items.
ICommand
Property Detail
displayNameproperty
displayName:String  [read-only]

Language Version : ActionScript 3.0
Product Version : Portfolio 9.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The localized display name of the command, which comes from Acrobat's runtime locale (INavigatorHost.locale).


Implementation
    public function get displayName():String

See also

enabledproperty 
enabled:Boolean  [read-only]

Language Version : ActionScript 3.0
Product Version : Portfolio 9.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The enabled state of the command.

The enabled status of a particular ICommand may change with the state of the containing collection document. For example, certain commands may become disabled if the document is read-only. A user interface that displays ICommand instances should provide some visual cue when an ICommand instance is disabled.

If an ICommand instance is not enabled, then an attempt to execute it will do nothing, and may result in an error.

This property can be used as the source for data binding.


Implementation
    public function get enabled():Boolean
nameproperty 
name:String  [read-only]

Language Version : ActionScript 3.0
Product Version : Portfolio 9.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The programmatic name of the command. It must be one of the values in the CommandType class.


Implementation
    public function get name():String

See also

Method Detail
appliesTo()method
public function appliesTo(operand:*):Boolean

Language Version : ActionScript 3.0
Product Version : Portfolio 9.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Determines whether the ICommand instance can operate on the specified item.

Parameters

operand:* — The item to check. The expected type of the item is command-specific, as described in CommandType.

Returns
Booleantrue if the ICommand instance can operate on the specified item; false otherwise. Some CommandType instances can operate on Array instances. If the specified item is passed as an Array, this method returns true only if the ICommand instance can be applied to every item in the array.

See also

execute()method 
public function execute(operand:* = null, arguments:Array = null):void

Language Version : ActionScript 3.0
Product Version : Portfolio 9.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Perform the command on the specified item or items.

This function does nothing if the ICommand instance is not enabled. It skips items to which the ICommand instance does not apply. It displays error messages to the user as appropriate.

Parameters

operand:* (default = null) — The item or items on which to execute the ICommand instance. The data type is command-specific, and is documented in CommandType. For ICommand instances where the operand can be inferred (for example, those that operate on INavigatorHost or ICollection), the parameter can be omitted.
 
arguments:Array (default = null) — Optional arguments to the ICommand instance. Arguments (for ICommand instances that use them) are specific to the particular ICommand, and are documented in CommandType.


Throws
Error — An Error is thrown if the operand parameter is of the wrong type.

See also