com.elasticpath.service.asset
Interface DigitalAssetAuditService

All Superinterfaces:
EpPersistenceService, EpService
All Known Implementing Classes:
DigitalAssetAuditServiceImpl

public interface DigitalAssetAuditService
extends EpPersistenceService

Provide digitalAssetAudit-related business service.


Method Summary
 DigitalAssetAudit add(DigitalAssetAudit digitalAssetAudit)
          Adds the given digitalAssetAudit.
 DigitalAssetAudit addDigitalAssetAudit(java.lang.String ipAddress, long digitalAssetUid, long orderSkuUid)
          Add an audit record to for digital asset download.
 java.lang.String findOrderNumberByOrderSkuID(long orderSkuUid)
          Retrieves order number found by the orderSku Uid.
 DigitalAssetAudit get(long digitalAssetAuditUid)
          Get the digitalAssetAudit with the given UID.
 DigitalAsset getDigitalAsset(long orderSkuUid)
          Retrieves DigitalAsset.
 OrderSku getOrderSku(long orderSkuUid)
          Retrieves OrderSku found by the orderSku Uid.
 int isValidDADownloadRequest(long digitalAssetUid, long orderSkuUid)
          Check if the asset uid and ordersku uid from download request is a valid download request.
 java.util.List list()
          Lists all digitalAssetAudits stored in the database.
 DigitalAssetAudit load(long digitalAssetAuditUid)
          Load the digitalAssetAudit with the given UID.
 void remove(DigitalAssetAudit digitalAssetAudit)
          Delete the digitalAssetAudit.
 void update(DigitalAssetAudit digitalAssetAudit)
          Updates the given digitalAssetAudit.
 
Methods inherited from interface com.elasticpath.service.EpPersistenceService
getObject, getPersistenceEngine, setPersistenceEngine
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Method Detail

add

DigitalAssetAudit add(DigitalAssetAudit digitalAssetAudit)
                      throws EpServiceException
Adds the given digitalAssetAudit.

Parameters:
digitalAssetAudit - the digitalAssetAudit to add
Returns:
the persisted instance of digitalAssetAudit
Throws:
EpServiceException - - if digitalAssetAudit with the specified name already exists

addDigitalAssetAudit

DigitalAssetAudit addDigitalAssetAudit(java.lang.String ipAddress,
                                       long digitalAssetUid,
                                       long orderSkuUid)
Add an audit record to for digital asset download.

Parameters:
ipAddress - the IP address
digitalAssetUid - the digital asset uid
orderSkuUid - the order sku id
Returns:
the added DigitalAssetAudit

findOrderNumberByOrderSkuID

java.lang.String findOrderNumberByOrderSkuID(long orderSkuUid)
Retrieves order number found by the orderSku Uid.

Parameters:
orderSkuUid - the orderSku Uid
Returns:
order number found by the orderSku Uid

get

DigitalAssetAudit get(long digitalAssetAuditUid)
                      throws EpServiceException
Get the digitalAssetAudit with the given UID. Return null if no matching record exists.

Parameters:
digitalAssetAuditUid - the digitalAssetAudit UID
Returns:
the digitalAssetAudit if UID exists, otherwise null
Throws:
EpServiceException - - in case of any errors

getDigitalAsset

DigitalAsset getDigitalAsset(long orderSkuUid)
Retrieves DigitalAsset.

Parameters:
orderSkuUid - the orderSku Uid
Returns:
DigitalAsset

getOrderSku

OrderSku getOrderSku(long orderSkuUid)
Retrieves OrderSku found by the orderSku Uid.

Parameters:
orderSkuUid - the orderSku Uid
Returns:
OrderSku found by the orderSku Uid

isValidDADownloadRequest

int isValidDADownloadRequest(long digitalAssetUid,
                             long orderSkuUid)
Check if the asset uid and ordersku uid from download request is a valid download request.

Parameters:
digitalAssetUid - the digital asset uid
orderSkuUid - the order Sku uid
Returns:
the error code if fail in validation, otherwise return 0.

list

java.util.List list()
                    throws EpServiceException
Lists all digitalAssetAudits stored in the database.

Returns:
a list of digitalAssetAudits
Throws:
EpServiceException - - in case of any errors

load

DigitalAssetAudit load(long digitalAssetAuditUid)
                       throws EpServiceException
Load the digitalAssetAudit with the given UID. Throw an unrecoverable exception if there is no matching database row.

Parameters:
digitalAssetAuditUid - the digitalAssetAudit UID
Returns:
the digitalAssetAudit if UID exists, otherwise null
Throws:
EpServiceException - - in case of any errors

remove

void remove(DigitalAssetAudit digitalAssetAudit)
            throws EpServiceException
Delete the digitalAssetAudit.

Parameters:
digitalAssetAudit - the digitalAssetAudit to remove
Throws:
EpServiceException - - in case of any errors

update

void update(DigitalAssetAudit digitalAssetAudit)
            throws EpServiceException
Updates the given digitalAssetAudit.

Parameters:
digitalAssetAudit - the digitalAssetAudit to update
Throws:
EpServiceException - - if digitalAssetAudit with the specified name already exists