org.infoglue.deliver.controllers.kernel.impl.simple
Class DigitalAssetDeliveryController

java.lang.Object
  |
  +--org.infoglue.deliver.controllers.kernel.impl.simple.BaseDeliveryController
        |
        +--org.infoglue.deliver.controllers.kernel.impl.simple.DigitalAssetDeliveryController

public class DigitalAssetDeliveryController
extends BaseDeliveryController


Method Summary
 void deleteContentVersionAssets(java.lang.Integer contentVersionId)
          This method removes all images in the digitalAsset directory which belongs to a certain content version.
 void deleteDigitalAssets(java.lang.Integer digitalAssetId)
          This method removes all images in the digitalAsset directory which belongs to a certain digital asset.
 java.util.Vector dumpAndGetZipEntries(DigitalAsset digitalAsset, java.lang.String fileName, java.lang.String filePath, java.io.File unzipDirectory)
           
 void dumpAndUnzipDigitalAsset(DigitalAsset digitalAsset, java.lang.String fileName, java.lang.String filePath, java.io.File unzipDirectory)
          This method dumps the digitalAsset to file and unzips it.
 void dumpAttributeToFile(java.lang.String attributeValue, java.lang.String fileName, java.lang.String filePath)
          This method checks if the given file exists on disk.
 void dumpDigitalAsset(DigitalAsset digitalAsset, java.lang.String fileName, java.lang.String filePath)
          This method checks if the given file exists on disk.
 void dumpDigitalAssetThumbnail(DigitalAsset digitalAsset, java.lang.String fileName, java.lang.String thumbnailFile, java.lang.String filePath, int width, int height)
          This method checks if the given file exists on disk.
 java.lang.String getAssetThumbnailUrl(DigitalAsset digitalAsset, Repository repository, int width, int height)
          This is the basic way of getting an asset-url for a digital asset.
 java.lang.String getAssetUrl(DigitalAsset digitalAsset, Repository repository)
          This is the basic way of getting an asset-url for a digital asset.
static DigitalAssetDeliveryController getDigitalAssetDeliveryController()
          Factory method
 
Methods inherited from class org.infoglue.deliver.controllers.kernel.impl.simple.BaseDeliveryController
beginTransaction, closeDatabase, closeTransaction, commitTransaction, getAllVOObjects, getAllVOObjects, rollbackTransaction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDigitalAssetDeliveryController

public static DigitalAssetDeliveryController getDigitalAssetDeliveryController()
Factory method


getAssetUrl

public java.lang.String getAssetUrl(DigitalAsset digitalAsset,
                                    Repository repository)
                             throws SystemException,
                                    java.lang.Exception
This is the basic way of getting an asset-url for a digital asset. If the asset is cached on disk it returns that path imediately it's ok - otherwise it dumps it fresh.

SystemException
java.lang.Exception

getAssetThumbnailUrl

public java.lang.String getAssetThumbnailUrl(DigitalAsset digitalAsset,
                                             Repository repository,
                                             int width,
                                             int height)
                                      throws SystemException,
                                             java.lang.Exception
This is the basic way of getting an asset-url for a digital asset. If the asset is cached on disk it returns that path imediately it's ok - otherwise it dumps it fresh.

SystemException
java.lang.Exception

dumpAttributeToFile

public void dumpAttributeToFile(java.lang.String attributeValue,
                                java.lang.String fileName,
                                java.lang.String filePath)
                         throws java.lang.Exception
This method checks if the given file exists on disk. If it does it's ignored because that means that the file is allready cached on the server. If not we dump the text on it.

java.lang.Exception

dumpDigitalAsset

public void dumpDigitalAsset(DigitalAsset digitalAsset,
                             java.lang.String fileName,
                             java.lang.String filePath)
                      throws java.lang.Exception
This method checks if the given file exists on disk. If it does it's ignored because that means that the file is allready cached on the server. If not we take out the stream from the digitalAsset-object and dumps it.

java.lang.Exception

dumpDigitalAssetThumbnail

public void dumpDigitalAssetThumbnail(DigitalAsset digitalAsset,
                                      java.lang.String fileName,
                                      java.lang.String thumbnailFile,
                                      java.lang.String filePath,
                                      int width,
                                      int height)
                               throws java.lang.Exception
This method checks if the given file exists on disk. If it does it's ignored because that means that the file is allready cached on the server. If not we take out the stream from the digitalAsset-object and dumps a thumbnail to it.

java.lang.Exception

dumpAndUnzipDigitalAsset

public void dumpAndUnzipDigitalAsset(DigitalAsset digitalAsset,
                                     java.lang.String fileName,
                                     java.lang.String filePath,
                                     java.io.File unzipDirectory)
                              throws java.lang.Exception
This method dumps the digitalAsset to file and unzips it. If it does it's ignored because that means that the file is allready cached on the server. If not we take out the stream from the digitalAsset-object and dumps it.

java.lang.Exception

dumpAndGetZipEntries

public java.util.Vector dumpAndGetZipEntries(DigitalAsset digitalAsset,
                                             java.lang.String fileName,
                                             java.lang.String filePath,
                                             java.io.File unzipDirectory)
                                      throws java.lang.Exception
java.lang.Exception

deleteContentVersionAssets

public void deleteContentVersionAssets(java.lang.Integer contentVersionId)
                                throws SystemException,
                                       java.lang.Exception
This method removes all images in the digitalAsset directory which belongs to a certain content version.

SystemException
java.lang.Exception

deleteDigitalAssets

public void deleteDigitalAssets(java.lang.Integer digitalAssetId)
                         throws SystemException,
                                java.lang.Exception
This method removes all images in the digitalAsset directory which belongs to a certain digital asset.

SystemException
java.lang.Exception