lc.procmgmt.ui.task

# TaskDirectiveModel - AS3 ADEP Workspace

Package | lc.procmgmt.ui.task
Class | public class TaskDirectiveModel
Inheritance | TaskDirectiveModel PresentationModel EventDispatcher Object

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

The `TaskDirectiveModel` class acts as the model for the `TaskDirective` component.

The `TaskDirectiveModel` class is responsible for enabling a `TaskUserCommand` object to be executed with a selected `User` object.

Related API Elements

lc.procmgmt.ui.task.TaskDirective
lc.procmgmt.domain.Task
lc.procmgmt.commands.TaskUserCommand
lc.procmgmt.commands.ForwardCommand
lc.procmgmt.commands.ShareCommand
lc.procmgmt.commands.ConsultCommand

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | command : lc.procmgmt.commands:TaskUserCommand The command object that drives the behavior of the model. | TaskDirectiveModel
|  | commandInstructions : String [read-only] Retrieves the localized instructions that are associated with the command. | TaskDirectiveModel
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | errorMessage : Message [read-only] The error message when an error occurs. | TaskDirectiveModel
|  | isAddEnabled : Boolean [read-only] A flag that indicates whether a user was added based on a certain condition. | TaskDirectiveModel
|  | isExecuteEnabled : Boolean [read-only] A flag that indicates whether the condition for executing the task directive was satisfied. | TaskDirectiveModel
|  | isRemoveEnabled : Boolean [read-only] A flag that indicates whether the condition for removing a user is satisfied. | TaskDirectiveModel
|  | omitUserOids : ListCollectionView [read-only] The list of users to remove from the searches. | TaskDirectiveModel
|  | selectedUser : User [read-only] The current selected user. | TaskDirectiveModel
|  | selectedUsers : ListCollectionView [read-only] The collection of users that were selected from the UserSearchDataGridModel object. | TaskDirectiveModel
|  | serviceName : String [read-only] The service name of the task. | TaskDirectiveModel
|  | session : SessionMap A SessionMap object that stores information relating to the server session. | PresentationModel
|  | state : String [read-only] The name of the state the current view is in. | PresentationModel
|  | userSearchDataGridModel : UserSearchDataGridModel The UserSearchDataGridModel object provides the results of a user search. | TaskDirectiveModel

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. | EventDispatcher
|  | addUser():void Adds the selected users from the UserSearchDataGridModel object to the selectedUsers property. | TaskDirectiveModel
|  | bindProperty(destination:Object, destinationProperty:String, source:Object, sourceChain:Object, commitOnly:Boolean = false):ChangeWatcher Binds a public property on the destination object from a property or property chain on the source object. | PresentationModel
|  | cancelCommand():void Cancels the command. | TaskDirectiveModel
|  | dispatchEvent(event:Event):Boolean Dispatches an event into the event flow. | EventDispatcher
|  | executeCommand():void Invokes the associated command object's execute method. | TaskDirectiveModel
|  | getCSSStyle(declaration:String, styleProperty:String, defaultValue:Object = null):Object Returns the corresponding cascading style sheet (CSS) property to use based on the specified parameters. | PresentationModel
|  | hasEventListener(type:String):Boolean Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | EventDispatcher
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | initialize():void [override] Initializes the presentation model after the view bindings are processed to prevent view bindings from overriding the initial model state. | TaskDirectiveModel
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void Removes a listener from the EventDispatcher object. | EventDispatcher
|  | removeUser():void Resets the selectdUsers property to an empty value (null). | TaskDirectiveModel
|  | reset():void Resets the model to the original state and reinitalizes the properties back to default values. | TaskDirectiveModel
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object
|  | willTrigger(type:String):Boolean Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | EventDispatcher

Protected Methods

| Method | Defined By
--- | --- | ---
|  | setState(newState:String):void [override] Sets the state property to a new value and causes a PropertyChangeEvent event. | TaskDirectiveModel

Events
Click for more information on events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | activate | [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher
|  | commandCancel | Dispatched on the request to cancel the command. | TaskDirectiveModel
|  | commandComplete | Dispatched on successful execution of the command. | TaskDirectiveModel
|  | deactivate | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher

Public Constants

| Constant | Defined By
--- | --- | ---
|  | STATE_ERROR : String = "errorState" [static] A special value that specifies that an error occurred. | TaskDirectiveModel
|  | STATE_INITIAL : String = "initialState" [static] A special value that specifies that the model is initializing. | TaskDirectiveModel
|  | STATE_IN_PROGRESS : String = "inProgressState" [static] A special value that specifies that a search operation is occuring. | TaskDirectiveModel
|  | STATE_SEARCH_COMPLETE : String = "searchCompleteState" [static] A special value that specifies that a search has completed. | TaskDirectiveModel

Property Detail

### command

property

`command:lc.procmgmt.commands:TaskUserCommand`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

The `command` object that drives the behavior of the model. Different commands have different instructions and images associated with them.

Implementation
`public function get command():lc.procmgmt.commands:TaskUserCommand`
`public function set command(value:lc.procmgmt.commands:TaskUserCommand):void`

### commandInstructions

property

`commandInstructions:String` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

Retrieves the localized instructions that are associated with the command.

This property can be used as the source for data binding. When this property is modified, it dispatches the `propertyChange` event.

Implementation
`public function get commandInstructions():String`

### errorMessage

property

`errorMessage:Message` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

The error message when an error occurs.

This property can be used as the source for data binding. When this property is modified, it dispatches the `propertyChange` event.

Implementation
`public function get errorMessage():Message`

### isAddEnabled

property

`isAddEnabled:Boolean` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

A flag that indicates whether a user was added based on a certain condition. A value of `true` is returned if a user was selected within the `UserSearchDataGridModel` object.

This property can be used as the source for data binding. When this property is modified, it dispatches the `propertyChange` event.

Implementation
`public function get isAddEnabled():Boolean`

### isExecuteEnabled

property

`isExecuteEnabled:Boolean` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

A flag that indicates whether the condition for executing the task directive was satisfied. A value of `true` is returned if a user was selected within the `UserSearchDataGridModel` object and the current state of the model is not searching.

This property can be used as the source for data binding. When this property is modified, it dispatches the `propertyChange` event.

Implementation
`public function get isExecuteEnabled():Boolean`

### isRemoveEnabled

property

`isRemoveEnabled:Boolean` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

A flag that indicates whether the condition for removing a user is satisfied. A value of `true` is returned if a user was selected within the `UserSearchDataGridModel` object.

This property can be used as the source for data binding. When this property is modified, it dispatches the `propertyChange` event.

Implementation
`public function get isRemoveEnabled():Boolean`

### omitUserOids

property

`omitUserOids:ListCollectionView` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

The list of users to remove from the searches.

This property can be used as the source for data binding. When this property is modified, it dispatches the `propertyChange` event.

Implementation
`public function get omitUserOids():ListCollectionView`

### selectedUser

property

`selectedUser:User` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

The current selected user.

This property can be used as the source for data binding. When this property is modified, it dispatches the `propertyChange` event.

Implementation
`public function get selectedUser():User`

### selectedUsers

property

`selectedUsers:ListCollectionView` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

The collection of users that were selected from the `UserSearchDataGridModel` object.

This property can be used as the source for data binding. When this property is modified, it dispatches the `propertyChange` event.

Implementation
`public function get selectedUsers():ListCollectionView`

### serviceName

property

`serviceName:String` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

The service name of the task.

This property can be used as the source for data binding. When this property is modified, it dispatches the `propertyChange` event.

Implementation
`public function get serviceName():String`

### userSearchDataGridModel

property

`userSearchDataGridModel:UserSearchDataGridModel`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

The `UserSearchDataGridModel` object provides the results of a user search.

Implementation
`public function get userSearchDataGridModel():UserSearchDataGridModel`
`public function set userSearchDataGridModel(value:UserSearchDataGridModel):void`
Method Detail

### addUser

()
method

`public function addUser():void`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

Adds the selected users from the `UserSearchDataGridModel` object to the `selectedUsers` property.

### cancelCommand

()
method

`public function cancelCommand():void`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

Cancels the command. This resets the properties in the model and dispatches an `EVENT_COMMAND_CANCEL` event.

### executeCommand

()
method

`public function executeCommand():void`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

Invokes the associated command object's `execute` method.

### initialize

()
method

`override public function initialize():void`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

Initializes the presentation model after the view bindings are processed to prevent view bindings from overriding the initial model state. Subclasses can override this method, which

### removeUser

()
method

`public function removeUser():void`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

Resets the `selectdUsers` property to an empty value (`null`).

### reset

()
method

`public function reset():void`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

Resets the model to the original state and reinitalizes the properties back to default values.

### setState

()
method

`override protected function setState(newState:String):void`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

Sets the `state` property to a new value and causes a `PropertyChangeEvent` event.

Parameters

| `newState:String` — Specifies the new state name.

Event Detail

### commandCancel

Event

Event Object Type: `flash.events.Event`
property Event.type = `flash.events.Event`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

Dispatched on the request to cancel the command.

### commandComplete

Event

Event Object Type: `flash.events.Event`
property Event.type = `flash.events.Event`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

Dispatched on successful execution of the command.

Constant Detail

### STATE_ERROR

Constant

`public static const STATE_ERROR:String = "errorState"`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

A special value that specifies that an error occurred.

### STATE_IN_PROGRESS

Constant

`public static const STATE_IN_PROGRESS:String = "inProgressState"`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

A special value that specifies that a search operation is occuring.

### STATE_INITIAL

Constant

`public static const STATE_INITIAL:String = "initialState"`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

A special value that specifies that the model is initializing.

### STATE_SEARCH_COMPLETE

Constant

`public static const STATE_SEARCH_COMPLETE:String = "searchCompleteState"`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Document Services - Workspace 9

Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10

A special value that specifies that a search has completed.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00