org.broadleafcommerce.cms.file.service
Interface StaticAssetService

All Superinterfaces:
SandBoxItemListener
All Known Implementing Classes:
StaticAssetServiceImpl

public interface StaticAssetService
extends SandBoxItemListener

Created by bpolster.


Method Summary
 StaticAsset addStaticAsset(StaticAsset staticAsset, SandBox destinationSandbox)
          This method is intended to be called from within the CMS admin only.
 Long countAssets(SandBox sandbox, org.hibernate.Criteria criteria)
           
 void deleteStaticAsset(StaticAsset staticAsset, SandBox destinationSandbox)
          If deleting and item where page.originalPageId != null then the item is deleted from the database.
 List<StaticAsset> findAssets(SandBox sandbox, org.hibernate.Criteria criteria)
           
 StaticAsset findStaticAssetByFullUrl(String fullUrl, SandBox targetSandBox)
           
 StaticAsset findStaticAssetById(Long id)
           
 StaticAsset updateStaticAsset(StaticAsset staticAsset, SandBox sandbox)
          This method is intended to be called from within the CMS admin only.
 
Methods inherited from interface org.broadleafcommerce.openadmin.server.domain.SandBoxItemListener
itemPromoted, itemRejected, itemReverted
 

Method Detail

findStaticAssetById

StaticAsset findStaticAssetById(Long id)

findStaticAssetByFullUrl

StaticAsset findStaticAssetByFullUrl(String fullUrl,
                                     SandBox targetSandBox)

addStaticAsset

StaticAsset addStaticAsset(StaticAsset staticAsset,
                           SandBox destinationSandbox)
This method is intended to be called from within the CMS admin only. Adds the passed in page to the DB. Creates a sandbox/site if one doesn't already exist.


updateStaticAsset

StaticAsset updateStaticAsset(StaticAsset staticAsset,
                              SandBox sandbox)
This method is intended to be called from within the CMS admin only. Updates the page according to the following rules: 1. If sandbox has changed from null to a value This means that the user is editing an item in production and the edit is taking place in a sandbox. Clone the page and add it to the new sandbox and set the cloned page's originalPageId to the id of the page being updated. 2. If the sandbox has changed from one value to another This means that the user is moving the item from one sandbox to another. Update the siteId for the page to the one associated with the new sandbox 3. If the sandbox has changed from a value to null This means that the item is moving from the sandbox to production. If the page has an originalPageId, then update that page by setting it's archived flag to true. Then, update the siteId of the page being updated to be the siteId of the original page. 4. If the sandbox is the same then just update the page.


deleteStaticAsset

void deleteStaticAsset(StaticAsset staticAsset,
                       SandBox destinationSandbox)
If deleting and item where page.originalPageId != null then the item is deleted from the database. If the originalPageId is null, then this method marks the items as deleted within the passed in sandbox.

Parameters:
staticAsset -
destinationSandbox -

countAssets

Long countAssets(SandBox sandbox,
                 org.hibernate.Criteria criteria)

findAssets

List<StaticAsset> findAssets(SandBox sandbox,
                             org.hibernate.Criteria criteria)


Copyright © 2011. All Rights Reserved.