Skip navigation links


com.fatwire.services
Interface ApprovalService

All Superinterfaces:
Service

public interface ApprovalService
extends Service

The Approval Service is the interface providing asset approval life cycle related services.


Method Summary
 void approve(long destinationId, java.util.List<AssetId> assetsToApprove, boolean recursive)
           Attempts to approve a list of assets for a specified destination.
 java.util.List<AssetId> getBlockingAssets(long destinationId, AssetId assetId)
          Returns a flat list of blocking assets.
 DestinationBean getDestination(long destinationId)
           Returns complete information associated with a publishing destination for the specified site.
 java.util.List<DestinationBean> getDestinations(long siteId)
           Returns a list containing the publishing destinations for the specified site.
 java.util.Date getLastPublishDate(long destinationId, AssetId assetId)
           Retrieves the date when an asset has been last published to a specified destination.
 ApprovalBean getState(long destinationId, AssetId assetId)
           Returns the approval state of an asset for a given target.
 void unapprove(long destinationId, java.util.List<AssetId> assetId)
           Revokes approval of an already approved asset in the life-cycle.

 

Methods inherited from interface com.fatwire.services.Service
getManager, getResponse, setManager

 

Method Detail

getDestinations

java.util.List<DestinationBean> getDestinations(long siteId)
                                                throws ServiceException

Returns a list containing the publishing destinations for the specified site.

The elements returned in the list are light-weight objects which may contain partial information associated with the destination.
Parameters:
site - the site for which the destinations are to be retrieved.
Returns:
list of destinations, or an empty list if there are no destinations configured.
Throws:
ServiceException - wraps any exception underlying the service call.

getDestination

DestinationBean getDestination(long destinationId)
                               throws ServiceException

Returns complete information associated with a publishing destination for the specified site.

The source bean should provide the minimal information as specified by the underlying implementation to retrieve the details.
Parameters:
source - the destination whose details are to be retrieved.
Returns:
a destination.
Throws:
ServiceException - wraps any exception underlying the service call.

approve

void approve(long destinationId,
             java.util.List<AssetId> assetsToApprove,
             boolean recursive)
             throws ServiceException

Attempts to approve a list of assets for a specified destination.

If recursive flag is set to true, then this method attempts to recursively approve all dependencies.
Parameters:
assetsToApprove - the list containing identifiers for the assets to approve.
recursive - set to true if all dependencies are to be recursively approved.
Throws:
ServiceException - wraps any exception underlying the service call.

getBlockingAssets

java.util.List<AssetId> getBlockingAssets(long destinationId,
                                          AssetId assetId)
                                          throws ServiceException

Returns a flat list of blocking assets.

The flat list will contain the earliest unapproved child in a sub-tree of the dependency hierarchy.
Parameters:
destinationId -
assetId -
Returns:
Throws:
ServiceException - TODO Doc

getState

ApprovalBean getState(long destinationId,
                      AssetId assetId)
                      throws ServiceException

Returns the approval state of an asset for a given target.

The last published date will be populated only if the target destination is a real time publishing target (DestinationBean.Type.REAL_TIME).
Parameters:
destinationId - the target destination.
assetId - the asset identifier whose approval state is to be retrieved.
Returns:
the approval state.
Throws:
ServiceException - wraps any exception underlying the service call.

unapprove

void unapprove(long destinationId,
               java.util.List<AssetId> assetId)
               throws ServiceException

Revokes approval of an already approved asset in the life-cycle.

Dependencies of the asset are not affected. This method quietly ignores the call if the asset is already in unapproved state.
Parameters:
destinationId - the target destination.
assetId - the asset identifier for the asset whose approval is to be revoked.
Throws:
ServiceException - wraps any exception underlying the service call.

getLastPublishDate

java.util.Date getLastPublishDate(long destinationId,
                                  AssetId assetId)
                                  throws ServiceException

Retrieves the date when an asset has been last published to a specified destination.

Parameters:
destinationId - the target destination.
assetId - the asset identifier for the asset whose publish date is to be retrieved.
Returns:
the last publish date, or null if the asset has never been published to this destination before.
Throws:
ServiceException - wraps any exception underlying the service call.

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.