apps.mtdesktop.fileutility
Class AssetRegistry

java.lang.Object
  extended by apps.mtdesktop.fileutility.AssetRegistry

public class AssetRegistry
extends java.lang.Object

The Class AssetRegistry.


Method Summary
 void addFileTransferListener(FileTransferListener listener)
          Adds the file transfer listener.
 boolean getAsset(java.lang.String siteUrl, java.lang.String assetName, java.lang.String destinationPath)
          Gets the asset.
 boolean getAssets(java.lang.String destinationPath)
          Gets the assets.
static AssetRegistry getInstance()
          Gets the single instance of AssetRegistry.
 Uploader getUploader()
          Gets the uploader.
 boolean isRegistered(java.lang.String assetName)
          Checks if is registered.
 boolean registerAsset(java.lang.String ftpServletUrl, java.lang.String assetId, java.io.File file)
          Register asset.
 boolean registerAsset(java.lang.String ftpServletUrl, java.lang.String assetId, java.lang.String filePath)
          Register asset.
 void removeAllFileTransferListeners()
          Removes the all file transfer listeners.
 void removeFileTransferListener(FileTransferListener listener)
          Removes the file transfer listener.
 boolean unregisterAsset(java.lang.String assetName)
          Unregister asset.
 void unregisterAssets()
          Unregister assets.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AssetRegistry getInstance()
Gets the single instance of AssetRegistry.

Returns:
single instance of AssetRegistry

addFileTransferListener

public void addFileTransferListener(FileTransferListener listener)
Adds the file transfer listener.

Parameters:
listener - the listener

getAsset

public boolean getAsset(java.lang.String siteUrl,
                        java.lang.String assetName,
                        java.lang.String destinationPath)
                 throws java.net.MalformedURLException,
                        java.io.IOException
Gets the asset.

Parameters:
siteUrl - the site url
assetName - the asset name
destinationPath - the destination path
Returns:
the asset
Throws:
java.net.MalformedURLException - the malformed url exception
java.io.IOException - Signals that an I/O exception has occurred.

getAssets

public boolean getAssets(java.lang.String destinationPath)
Gets the assets.

Parameters:
destinationPath - the destination path
Returns:
the assets

getUploader

public Uploader getUploader()
Gets the uploader.

Returns:
the uploader

isRegistered

public boolean isRegistered(java.lang.String assetName)
Checks if is registered.

Parameters:
assetName - the asset name
Returns:
true, if is registered

registerAsset

public boolean registerAsset(java.lang.String ftpServletUrl,
                             java.lang.String assetId,
                             java.io.File file)
                      throws java.io.IOException
Register asset.

Parameters:
ftpServletUrl - the ftp servlet url
assetId - the asset id
file - the file
Returns:
true, if successful
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

registerAsset

public boolean registerAsset(java.lang.String ftpServletUrl,
                             java.lang.String assetId,
                             java.lang.String filePath)
                      throws java.io.IOException
Register asset.

Parameters:
ftpServletUrl - the ftp servlet url
assetId - the asset id
filePath - the file path
Returns:
true, if successful
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

removeAllFileTransferListeners

public void removeAllFileTransferListeners()
Removes the all file transfer listeners.


removeFileTransferListener

public void removeFileTransferListener(FileTransferListener listener)
Removes the file transfer listener.

Parameters:
listener - the listener

unregisterAsset

public boolean unregisterAsset(java.lang.String assetName)
Unregister asset.

Parameters:
assetName - the asset name
Returns:
true, if successful

unregisterAssets

public void unregisterAssets()
Unregister assets.