com.adobe.icc.services.letter

# ILetterService - AS3 Asset Composer

Package | com.adobe.icc.services.letter
Interface | public interface ILetterService extends IEventDispatcher

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Defines a service for Letter management.

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | activateLetter(letterID:String, updateDependencies:Boolean = false):com.adobe.icc.token:IAsyncToken Activates a letter template | ILetterService
|  | 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. | IEventDispatcher
|  | copyLetter(oldLetterID:String, newLetter:Letter):com.adobe.icc.token:IAsyncToken Creates a copy of an existing letter. | ILetterService
|  | createLetter(letter:Letter):com.adobe.icc.token:IAsyncToken Allows creating a new Letter template entry. | ILetterService
|  | createTestLetter(letterID:String):com.adobe.icc.token:IAsyncToken Allows creating a test version of a letter template entry. | ILetterService
|  | deleteLetter(letterId:String):com.adobe.icc.token:IAsyncToken Allows deleting of a letter. | ILetterService
|  | dispatchEvent(event:Event):Boolean Dispatches an event into the event flow. | IEventDispatcher
|  | getAllLetters(query:Query = null):com.adobe.icc.token:IAsyncToken Method description: Returns a list of available letter templates. | ILetterService
|  | getLetter(letterId:String):com.adobe.icc.token:IAsyncToken Retrieves a letter given its unique identifier. | ILetterService
|  | getLetterByVersion(letterId:String, date:Date):com.adobe.icc.token:IAsyncToken Retrieves a letter given its unique identifier and date on which the letter was published. | ILetterService
|  | getUsedDataModules(letterId:String, fetchIndirectReferences:Boolean = false):com.adobe.icc.token:IAsyncToken Retrieve the list of modules that is used by the Letter identified by the given letterId. | ILetterService
|  | hasEventListener(type:String):Boolean Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | IEventDispatcher
|  | letterExists(name:String):com.adobe.icc.token:IAsyncToken Determines if the specified letter exists. | ILetterService
|  | markReadyToPublish(letterId:String):com.adobe.icc.token:IAsyncToken Mark as ready to publish the Letter identified by the given letterID. | ILetterService
|  | publishLetter(letterId:String):com.adobe.icc.token:IAsyncToken Publish the Letter identified by the given letterID. | ILetterService
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void Removes a listener from the EventDispatcher object. | IEventDispatcher
|  | revertToLastPublish(fragmentLayoutId:String):com.adobe.icc.token:IAsyncToken Reverts the letter to the last published version. | ILetterService
|  | updateLetter(letter:Letter):com.adobe.icc.token:IAsyncToken Allows modifying a letter template entry which has a state test. | ILetterService
|  | 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. | IEventDispatcher

Method Detail

### activateLetter

()
method

`public function activateLetter(letterID:String, updateDependencies:Boolean = false):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Activates a letter template

Parameters

| `letterID:String` — The ID (GUID) of the letter to activate
| `updateDependencies:Boolean` (default = `false`)`` — Whether to replace/use this new activated version in the dependencies

Returns

| `com.adobe.icc.token:IAsyncToken` — the updated Letter

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### copyLetter

()
method

`public function copyLetter(oldLetterID:String, newLetter:Letter):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Creates a copy of an existing letter.

Parameters

| `oldLetterID:String` — Identifier if the letter to be copied
| `newLetter:Letter` — may optionally specify a new test data file

Returns

| `com.adobe.icc.token:IAsyncToken` — New letter object (the copy).

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### createLetter

()
method

`public function createLetter(letter:Letter):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Allows creating a new Letter template entry.

Parameters

| `letter:Letter` — `Letter` object to be created

Returns

| `com.adobe.icc.token:IAsyncToken` — The new Letter object on success

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### createTestLetter

()
method

`public function createTestLetter(letterID:String):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Allows creating a test version of a letter template entry.

Parameters

| `letterID:String` — The ID (GUID) of an existing Letter to duplicate as a test version

Returns

| `com.adobe.icc.token:IAsyncToken` — The new Letter object

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### deleteLetter

()
method

`public function deleteLetter(letterId:String):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Allows deleting of a letter.

Parameters

| `letterId:String` — The ID (GUID) of the letter to delete

Returns

| `com.adobe.icc.token:IAsyncToken` — Return without any value if delete was successful

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### getAllLetters

()
method

`public function getAllLetters(query:Query = null):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Method description: Returns a list of available letter templates.

Parameters

| `query:Query` (default = `null`)`` — Query specifying the statements for filtering search results.

Returns

| `com.adobe.icc.token:IAsyncToken` — ArrayCollection containing the letter records as Letter objects

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### getLetter

()
method

`public function getLetter(letterId:String):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Retrieves a letter given its unique identifier.

Parameters

| `letterId:String` — The unique identifier of the letter to retrieve (i.e. it's GUID).

Returns

| `com.adobe.icc.token:IAsyncToken` — The result event's result data will be a Letter object for the specified letter, if the ID was valid.

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### getLetterByVersion

()
method

`public function getLetterByVersion(letterId:String, date:Date):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Retrieves a letter given its unique identifier and date on which the letter was published.

Parameters

| `letterId:String` — The unique identifier of the letter to retrieve (i.e. it's GUID).
| `date:Date` — The date on which the letter was published

Returns

| `com.adobe.icc.token:IAsyncToken` — The result event's result data will be a Letter object for the specified letter, if the ID was valid.

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### getUsedDataModules

()
method

`public function getUsedDataModules(letterId:String, fetchIndirectReferences:Boolean = false):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Retrieve the list of modules that is used by the Letter identified by the given `letterId`.

Parameters

| `letterId:String` — ID (GUID) of the Letter, for which the used modules are to be fetched.
| `fetchIndirectReferences:Boolean` (default = `false`)`` — True, if you wish to fetch the modules that are directly or indirectly used by this Letter. For example, if a Text T1 is used in a List L1, and List L1 is used in Letter L1, the List would contain (T1 and L1), for the Letter L1. If false, the List would contain only L1.

Returns

| `com.adobe.icc.token:IAsyncToken` — List of modules that is used by the given Letter.

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### letterExists

()
method

`public function letterExists(name:String):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Determines if the specified letter exists.

Parameters

| `name:String` — Version-independent name of the letter.

Returns

| `com.adobe.icc.token:IAsyncToken` — `Boolean` which is true if the letter exists; false if not.

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### markReadyToPublish

()
method

`public function markReadyToPublish(letterId:String):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Mark as ready to publish the Letter identified by the given `letterID`.

Parameters

| `letterId:String` — ID of the Letter

Returns

| `com.adobe.icc.token:IAsyncToken` — Letter object marked for publishing

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### publishLetter

()
method

`public function publishLetter(letterId:String):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Publish the Letter identified by the given `letterID`.

Parameters

| `letterId:String` — ID of the Letter

Returns

| `com.adobe.icc.token:IAsyncToken` — published Letter object

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### revertToLastPublish

()
method

`public function revertToLastPublish(fragmentLayoutId:String):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Reverts the letter to the last published version. If letter is not published, it is removed from repository.

Parameters

| `fragmentLayoutId:String` — ID of the Letter

Returns

| `com.adobe.icc.token:IAsyncToken` — Reverted letter object

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

### updateLetter

()
method

`public function updateLetter(letter:Letter):com.adobe.icc.token:IAsyncToken`

Language Version: | ActionScript 3.0

Product Version: | Asset Composer Building Block 10

Runtime Versions: | AIR (unsupported), Flash Player 10.2

Allows modifying a letter template entry which has a state test.

Parameters

| `letter:Letter` — `Letter` object to be updated

Returns

| `com.adobe.icc.token:IAsyncToken` — Updated letter object.

Throws

| `Error` — Throws ICCException with the appropriate error message and error code, if there was an error processing the request on the server.

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