com.adobe.icc.services.api
Interface LetterService


public interface LetterService

Service interface for Letter specific operations.


Method Summary
 Letter activateLetter(java.lang.String letterID, boolean updateDependencies)
          Deprecated.  
 Letter copyLetter(java.lang.String oldletterID, Letter newletter)
          Create a copy of the Letter identified by the oldletterID.
 Letter createLetter(Letter letter)
          Create a new Letter object.
 Letter createTestLetter(java.lang.String letterID)
          Deprecated.  
 Letter deactivateLetter(java.lang.String letterId)
           
 void deleteLetter(java.lang.String letterID)
          Deprecated.  
 java.util.List getAllLetters(Query query)
          List all Letters filtered by the given Query.
 java.util.List getDependentPortfolios(java.lang.String letterID)
          Retrieve the list of Portfolios dependent on the Letter identified by the given letterID.
 Letter getLetter(java.lang.String letterID)
          Fetch the Letter identified by the given letterID.
 java.util.Map getLetterDataElements(java.lang.String letterID)
          Gets information about data elements (element for which values can be updated for letter rendering).
 Letter getLetterWithLatestAssets(java.lang.String letterID)
          Deprecated. Use LetterService.getLetter(String) instead.
 Letter getLetterWithoutData(java.lang.String letterID)
          Fetch the Letter identified by the given letterID, removing the test data bytes and associated layout bytes in it.
 java.util.List getUsedDataModules(Letter letter, boolean fetchIndirectReferences)
          Retrieve the list of all DataModules that is used by the Letter identified by the given letterID.
 java.util.List getUsedDataModules(java.lang.String letterID, boolean fetchIndirectReferences)
          Retrieve the list of all DataModules that is used by the Letter identified by the given letterID.
 java.util.Map getUsedFragmentLayouts(Letter letter, boolean fetchIndirectReferences)
          Retrieve the list of all the child ContainerLayoutAssignments of the Letter identified by the given letterID.
 boolean isReferenced(java.lang.String letterID)
          Check if this Letter is being referenced by any other asset (Portfolio).
 java.lang.Boolean letterExists(java.lang.String letterName)
          Check if a Letter exists by the given name.
 Letter markReadyToPublish(java.lang.String letterID)
          Mark as ready to publish the Letter identified by the given letterID.
 Letter publishLetter(java.lang.String letterID)
          Publish the Letter identified by the given letterID.
 Letter readLetter(java.lang.String letterID)
          Fetch the Letter identified by the given letterID.
 Letter retrieveVersion(java.lang.String letterId, java.util.Date publishDate)
          Returns the version of letter that was published on or before the specified date.
 Letter revertToLastPublished(java.lang.String letterId)
          Reverts the letter to the last published version.
 boolean updateDependencies(java.lang.String oldLetterID, java.lang.String newLetterID)
          Update the references of the old Letter in any dependent assets with the new Letter.
 Letter updateLetter(Letter letter)
          Update the given Letter.
 

Method Detail

letterExists

java.lang.Boolean letterExists(java.lang.String letterName)
                               throws ICCException
Check if a Letter exists by the given name.

Parameters:
letterName - Name of the Letter.
Returns:
true if exists, false otherwise.
Throws:
ICCException

deleteLetter

void deleteLetter(java.lang.String letterID)
                  throws ICCException
Deprecated. 

Delete the Letter identified by the given letterID.

Parameters:
letterID - ID of the Letter.
Throws:
ICCException

createLetter

Letter createLetter(Letter letter)
                    throws ICCException
Create a new Letter object.

Parameters:
letter - The Letter to be created.
Returns:
created Letter object
Throws:
ICCException

updateLetter

Letter updateLetter(Letter letter)
                    throws ICCException
Update the given Letter.

Parameters:
letter - Letter object to be updated.
Returns:
updated Letter object.
Throws:
ICCException

markReadyToPublish

Letter markReadyToPublish(java.lang.String letterID)
                          throws ICCException
Mark as ready to publish the Letter identified by the given letterID.

Parameters:
letterID - ID of the Letter.
Returns:
Letter object marked for publishing
Throws:
ICCException
Since:
10.0.0.0

activateLetter

Letter activateLetter(java.lang.String letterID,
                      boolean updateDependencies)
                      throws ICCException
Deprecated. 

Activate the Letter identified by the given letterID.

Parameters:
letterID - ID of the Letter.
updateDependencies - Whether to set this new activated version in the dependencies.
Returns:
activated Letter object
Throws:
ICCException

publishLetter

Letter publishLetter(java.lang.String letterID)
                     throws ICCException
Publish the Letter identified by the given letterID.

Parameters:
letterID - ID of the Letter.
Returns:
activated Letter object
Throws:
ICCException
Since:
10.0.0.0

createTestLetter

Letter createTestLetter(java.lang.String letterID)
                        throws ICCException
Deprecated. 

Create Test/Inactive version of Letter object.

Parameters:
letterID - ID of the Letter whose Inactive version is to be created.
Returns:
created Test/Inactive version Letter object.
Throws:
ICCException

copyLetter

Letter copyLetter(java.lang.String oldletterID,
                  Letter newletter)
                  throws ICCException
Create a copy of the Letter identified by the oldletterID.

If the incoming Letter newletter does not have content in it, the content of the original Letter is set in it.

Parameters:
oldletterID - ID of the original Letter. Used to fetch the original content, if need be.
newletter - copy of the original Letter (may have properties altered by the user)
Returns:
Created copy of the Letter.
Throws:
ICCException

getAllLetters

java.util.List getAllLetters(Query query)
                             throws ICCException
List all Letters filtered by the given Query.

Parameters:
query - Query to select Letter (supports only first level attributes/properties of an object).
The "attributeName" used in the Statement object should be the name of the property in the object (Form object, in this case).
Returns:
List of Letter objects
Throws:
ICCException
See Also:
Statement, Query

getLetter

Letter getLetter(java.lang.String letterID)
                 throws ICCException
Fetch the Letter identified by the given letterID. This action is not audited for action type Read.

Parameters:
letterID - ID of the Letter to be fetched.
Returns:
the Letter identified by the given letterID.
Throws:
ICCException

readLetter

Letter readLetter(java.lang.String letterID)
                  throws ICCException
Fetch the Letter identified by the given letterID. This action is audited for action type Read.

Parameters:
letterID - ID of the Letter to be fetched.
Returns:
the Letter identified by the given letterID.
Throws:
ICCException

getLetterWithoutData

Letter getLetterWithoutData(java.lang.String letterID)
                            throws ICCException
Fetch the Letter identified by the given letterID, removing the test data bytes and associated layout bytes in it.

Parameters:
letterID - ID of the Letter to be fetched.
Returns:
the Letter identified by the given letterID.
Throws:
ICCException

getLetterWithLatestAssets

Letter getLetterWithLatestAssets(java.lang.String letterID)
                                 throws ICCException
Deprecated. Use LetterService.getLetter(String) instead.

Fetch the Letter identified by the given letterID, with the latest versions of assets used in the letter. The actual versions of assets used in the Letter would be replaced by the latest available assets.
Note: If an Inactive version of an asset exists, then that is considered as the *latest* version of that asset.

Parameters:
letterID - ID of the Letter to be fetched.
Returns:
the Letter identified by the given letterID, built with the latest versions of used assets.
Throws:
ICCException

getDependentPortfolios

java.util.List getDependentPortfolios(java.lang.String letterID)
                                      throws ICCException
Retrieve the list of Portfolios dependent on the Letter identified by the given letterID.

Parameters:
letterID - ID of the Letter whose dependencies are to be fetched.
Returns:
List of Portfolios which depend on the given Letter.
Throws:
ICCException

getUsedDataModules

java.util.List getUsedDataModules(java.lang.String letterID,
                                  boolean fetchIndirectReferences)
                                  throws ICCException
Retrieve the list of all DataModules that is used by the Letter identified by the given letterID.

Parameters:
letterID - ID of the Letter, for which the used modules are to be fetched.
fetchIndirectReferences - 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:
List of all DataModules that is used by the Letter. Empty list returned, if the Letter does not use any other module.
Throws:
ICCException

getUsedDataModules

java.util.List getUsedDataModules(Letter letter,
                                  boolean fetchIndirectReferences)
                                  throws ICCException
Retrieve the list of all DataModules that is used by the Letter identified by the given letterID.

Parameters:
letter - Letter, for which the used modules are to be fetched.
fetchIndirectReferences - 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:
List of all DataModules that is used by the Letter. Empty list returned, if the Letter does not use any other module.
Throws:
ICCException
Since:
10.0.0.0

getUsedFragmentLayouts

java.util.Map getUsedFragmentLayouts(Letter letter,
                                     boolean fetchIndirectReferences)
                                     throws ICCException
Retrieve the list of all the child ContainerLayoutAssignments of the Letter identified by the given letterID.

Parameters:
letterID - ID of the Letter, for which the child container layout assignments are to be fetched.
fetchIndirectReferences - True, if you wish to fetch the container layout assignments that are directly or indirectly used by this Letter.
Returns:
Map of all child ContainerLayoutAssignments and corresponding FragmentLayouts used in the Letter. Empty map returned, if the Letter does not use a FragmentLayout.
Throws:
ICCException
Since:
10.0.0.0

isReferenced

boolean isReferenced(java.lang.String letterID)
                     throws ICCException
Check if this Letter is being referenced by any other asset (Portfolio).

Parameters:
letterID - ID of the Letter whose dependencies are to be fetched.
Returns:
True, if the Letter is being referenced, False otherwise.
Throws:
ICCException

updateDependencies

boolean updateDependencies(java.lang.String oldLetterID,
                           java.lang.String newLetterID)
                           throws ICCException
Update the references of the old Letter in any dependent assets with the new Letter.

Parameters:
oldLetterID - The old Letter ID.
newLetterID - The new Letter ID.
Returns:
True if the operation succeeds, False otherwise.
Throws:
ICCException

getLetterDataElements

java.util.Map getLetterDataElements(java.lang.String letterID)
                                    throws ICCException
Gets information about data elements (element for which values can be updated for letter rendering).

Parameters:
letterID - the letter ID
Returns:
This API returns a map having three string keys "DDE" , "PH" and "Field" .
  • "DDE" is mapped with a list of DataDictionaryElements ( List ) for this letter. This consists of DDEs used in this letter as variable and also all the required DDEs.
  • "PH" is mapped with a list of Variables ( List ) which is used in this letter. Only variable of type place-holder which are used in variable assignment of this letter will be added into this list.
  • "Field" is mapped with a list of Fields object (List ) used in this letter. All fields used in field assignment of this Letter will be added in to this list.
  • Throws:
    ICCException

    revertToLastPublished

    Letter revertToLastPublished(java.lang.String letterId)
                                 throws ICCException
    Reverts the letter to the last published version. If letter is not published, it is removed from repository.

    Parameters:
    letterID - The Letter ID.
    Returns:
    Reverted letter.
    Throws:
    ICCException
    Since:
    10.0.0.0

    retrieveVersion

    Letter retrieveVersion(java.lang.String letterId,
                           java.util.Date publishDate)
    Returns the version of letter that was published on or before the specified date.

    Parameters:
    letterId - The Letter ID.
    publishDate - specifies the date for fetching published letter.
    Returns:
    version which was published on or before the specified date.
    Throws:
    ICCException
    Since:
    10.0.0.0

    deactivateLetter

    Letter deactivateLetter(java.lang.String letterId)


    [an error occurred while processing this directive] [an error occurred while processing this directive]