Package | com.adobe.icc.editors.model |
Class | public class CategoryModel |
Inheritance | CategoryModel EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10 |
CategoryModel
class represents the domain object for the assets of type Category.
Domain objects can be leveraged to build presentation on top of them. They ease the
process of coding views by abstracting all the service calls and maintaining meaningful
states.
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
id : String [read-only]
The GUID of the underlying value object. | CategoryModel | ||
isNew : Boolean
Indicates if this Category is new. | CategoryModel | ||
name : String
Name of the category
| CategoryModel | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
type : int
Type of the category. | CategoryModel | ||
vo : Category
The underlying category value object. | CategoryModel |
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 | ||
[static]
Creates the domain object from the corresponding value object. | CategoryModel | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Saves the underlying value object on the server. | CategoryModel | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Event | Summary | Defined By | ||
---|---|---|---|---|
[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | |||
[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher | |||
Dispatched when the category is successfully saved. | CategoryModel | |||
Dispatched when a fault occurs while saving the category. | CategoryModel | |||
Dispatched when the current category is requested for save. | CategoryModel |
id | property |
isNew | property |
isNew:Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10 |
Indicates if this Category is new. New Category objects are existent purely on the client side until they are saved.
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 isNew():Boolean
public function set isNew(value:Boolean):void
name | property |
name:String
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10 |
Name of the category
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 name():String
public function set name(value:String):void
type | property |
type:int
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10 |
Type of the category. The value is amongst the constants defined in the class CategoryType
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 type():int
public function set type(value:int):void
Related API Elements
vo | property |
createFromVO | () | method |
public static function createFromVO(categoryVO:Category):CategoryModel
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10 |
Creates the domain object from the corresponding value object.
Value Objects are pure data entities mostly acting as parameters to the server apis. Domain objects are build atop to provide more meaningful business data and behavior thereby enabling faster and convenient UI view development.
Parameters
categoryVO:Category — The value object of the type Category
|
CategoryModel — The Category domain object corresponding the passed Category value object.
|
save | () | method |
public function save():void
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10 |
Saves the underlying value object on the server.
Under the hood, separate calls are required for creating a new asset and copying or copying an existing one.
The save() method internally invokes the relevant server calls
on the basis of its current state. The domain object
constructed from the createFromVO()
method would invoke
the "update" api and the domain object starightaway instantiated
on the client would inoke the "create" module api.
Category is somewhat different when compared to other assets. The category object is a "thin" object and thus isn't ever shallow. Moreover, categories cannot be copied.
saveComplete | Event |
com.adobe.icc.editors.events.AssetEvent
property AssetEvent.type =
com.adobe.icc.editors.events.AssetEvent.SAVE_COMPLETE
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10 |
Dispatched when the category is successfully saved.
TheAssetEvent.SAVE_COMPLETE
constant defines the value of the
type
property of the event object for a saveComplete
event.
The saveComplete
event is dispatched when the domain object has been
successfully saved on the server. Unlike the saving
event, this is dispatched
in an aysnchronous manner only after the server has responded with a result for the save api
call.
This event can be used to stop UI animations indicating "save in progress" or to popup an info box indicating save success.
saveFault | Event |
com.adobe.icc.editors.events.AssetEvent
property AssetEvent.type =
com.adobe.icc.editors.events.AssetEvent.SAVE_FAULT
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10 |
Dispatched when a fault occurs while saving the category.
TheAssetEvent.SAVE_FAULT
constant defines the value of the
type
property of the event object for a saveFault
event.
The saveFault
event is dispatched when the server reports an error while
saving the asset on the server. Unlike the saving
event, this is dispatched
in an aysnchronous manner only after the server has responded with a result for the save api
call.
When this event is dispatched, the fault
property contains the fault object
encapsulating the error sent by the server. The fault
property can be used to
determine the faultCode and show an error message accordingly.
This event can be used to stop UI animations indicating "save in progress" or to popup an info box indicating save success.
saving | Event |
com.adobe.icc.editors.events.AssetEvent
property AssetEvent.type =
com.adobe.icc.editors.events.AssetEvent.SAVING
Language Version: | ActionScript 3.0 |
Product Version: | Asset Composer Building Block 9.5 |
Runtime Versions: | AIR (unsupported), Flash Player 9, Flash Player 10 |
Dispatched when the current category is requested for save. This event, being bubbling in nature, can be leveraged by the UI to display a progress bar or animation to indicate the save progress.
TheAssetEvent.SAVING
constant defines the value of the
type
property of the event object for a saving
event.
The saving
event is dispatched when the save() method has been
called on the domain object. This event is dispatched before any server api
is invoked but after the domain client validations are complete. This is because
the actual save starts once the client validations are complete.
This event can be used to start a UI animation indicating "save in progress".
Mon Nov 28 2011, 06:48 AM -08:00