|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectse.datadosen.jalbum.UploadBean
public class UploadBean
Version 1.0
Glue between the JAlbum user interface and the RemoteFSBean ftp component.
Also adds the "smart" upload feature by comparing file sizes.
| Nested Class Summary | |
|---|---|
class |
UploadBean.PathFinder
Utility class that helps resolving (figuring out) paths and URLs to published albums |
| Constructor Summary | |
|---|---|
UploadBean()
|
|
| Method Summary | |
|---|---|
void |
addAlbumBeanListener(AlbumBeanListener l)
AlbumBeanListener used to track and control file deletion |
void |
addTransferListener(TransferListener l)
Event dispatching code |
void |
bytesTransferred(long bytes)
Implements RemoteFSProgressMonitor |
void |
connect()
|
void |
deleteDirectory(java.lang.String remoteDir)
Remove all files and directories from remote album |
void |
disconnect()
|
void |
downloadFile(RemoteFSNode node,
java.io.File destination)
|
void |
downloadFiles(java.lang.String remotePath,
java.io.File destination)
|
protected void |
finalize()
Make sure UploadBean disconnects if finalized (security) |
protected void |
fireErrorOccured(java.lang.Exception param1,
java.io.File param2)
|
protected void |
fireFileProcessingFinished(ProgressEvent e)
|
protected void |
fireFileProcessingProgress(ProgressEvent e)
|
protected void |
fireFileProcessingStarted(ProgressEvent e)
|
protected void |
fireImageProcessingFinished(AlbumBeanEvent e)
|
protected void |
fireImageProcessingStarted(AlbumBeanEvent e)
|
java.lang.String |
getAbsoluteURL()
|
java.lang.String |
getBaseDirectory()
The current directory when just logged in. |
java.util.Set<RemoteFile> |
getExistingAlbumFiles(java.lang.String remoteDirectory)
Attempt to gather the file contents under the specified remoteDirectory First try to grab the manifest.jmf file Then try CrushFTP's :filetree method Finally gather the contents by manually traversing the album directory |
java.lang.String |
getFtpPassword()
|
int |
getFtpPort()
|
java.lang.String |
getFtpServer()
|
java.lang.String |
getFtpUser()
|
UploadBean.PathFinder |
getPathFinder(AccountProfile account,
AlbumBean engine)
Return utility class that helps resolving (figuring out) paths and URLs to published albums |
TransferProtocol |
getProtocol()
|
RemoteFSDelegate |
getRemoteFS()
|
static long |
getTotalSize(java.util.Set<RemoteFile> files,
int clusterSize)
|
boolean |
isConnected()
|
boolean |
isFtpForceUTF8()
|
boolean |
isMyjalbum()
|
boolean |
isPassiveMode()
|
void |
removeAlbumBeanListener(AlbumBeanListener l)
|
void |
removeTransferListener(TransferListener l)
|
void |
setAbsoluteURL(java.lang.String absoluteURL)
|
void |
setAccountProperties(AccountProfile account)
|
void |
setFtpForceUTF8(boolean force)
|
void |
setFtpPassword(java.lang.String newFtpPassword)
|
void |
setFtpPort(int newFtpPort)
|
void |
setFtpServer(java.lang.String newFtpServer)
|
void |
setFtpUser(java.lang.String newFtpUser)
|
void |
setMyjalbum(boolean myjalbum)
|
void |
setPassiveMode(boolean newPassiveMode)
|
void |
setProtocol(TransferProtocol protocol)
|
void |
setSecureFtp(boolean newSecureFtp)
Deprecated. use setProtocol instead |
static void |
showErrorDialog(java.awt.Component owner,
RemoteFSException ex,
java.lang.String messagePrefix,
java.lang.String title)
Convenience method |
void |
testConnection(AlbumBean engine)
Test a connection to a remote filesystem Exceptions are thrown if connection could not be established. |
AlbumManifest |
uploadAlbum(JAlbumContext context,
boolean fullUpdate)
Upload an album to a server |
AlbumManifest |
uploadAlbum(JAlbumContext context,
boolean fullUpdate,
java.util.Set<RemoteFile> existingFiles)
|
void |
uploadFiles(java.io.File[] filesDirs,
java.lang.String remotePath)
|
void |
uploadHiresFiles(AlbumObject root,
AlbumManifest manifest,
java.lang.Long spaceLeft)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UploadBean()
| Method Detail |
|---|
public java.lang.String getAbsoluteURL()
public void setAbsoluteURL(java.lang.String absoluteURL)
public static void showErrorDialog(java.awt.Component owner,
RemoteFSException ex,
java.lang.String messagePrefix,
java.lang.String title)
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic RemoteFSDelegate getRemoteFS()
public void deleteDirectory(java.lang.String remoteDir)
throws ParameterException,
RemoteFSException,
java.io.IOException
ParameterException
RemoteFSException
java.io.IOExceptionpublic void setFtpServer(java.lang.String newFtpServer)
public java.lang.String getFtpServer()
public void setFtpPort(int newFtpPort)
throws RemoteFSException
RemoteFSException
public int getFtpPort()
throws RemoteFSException
RemoteFSExceptionpublic void setFtpUser(java.lang.String newFtpUser)
public java.lang.String getFtpUser()
public void setFtpPassword(java.lang.String newFtpPassword)
public java.lang.String getFtpPassword()
public boolean isMyjalbum()
public void setMyjalbum(boolean myjalbum)
public boolean isFtpForceUTF8()
throws RemoteFSException
RemoteFSException
public void setFtpForceUTF8(boolean force)
throws RemoteFSException
RemoteFSExceptionpublic void setSecureFtp(boolean newSecureFtp)
public TransferProtocol getProtocol()
public void setProtocol(TransferProtocol protocol)
public void setPassiveMode(boolean newPassiveMode)
throws RemoteFSException
RemoteFSException
public boolean isPassiveMode()
throws RemoteFSException
RemoteFSExceptionpublic void setAccountProperties(AccountProfile account)
public void connect()
throws RemoteFSException,
java.io.IOException
RemoteFSException
java.io.IOExceptionpublic void disconnect()
public boolean isConnected()
public void testConnection(AlbumBean engine)
throws java.io.IOException,
RemoteFSException
RemoteFSException
java.io.IOExceptionpublic java.lang.String getBaseDirectory()
public static long getTotalSize(java.util.Set<RemoteFile> files,
int clusterSize)
public java.util.Set<RemoteFile> getExistingAlbumFiles(java.lang.String remoteDirectory)
throws java.io.IOException,
RemoteFSException
java.io.IOException
RemoteFSException
public AlbumManifest uploadAlbum(JAlbumContext context,
boolean fullUpdate)
throws RemoteFSException,
java.io.IOException
engine - fullUpdate -
ParameterException
RemoteFSException
java.io.IOException
OperationAbortedException
public AlbumManifest uploadAlbum(JAlbumContext context,
boolean fullUpdate,
java.util.Set<RemoteFile> existingFiles)
throws RemoteFSException,
java.io.IOException,
OperationAbortedException
RemoteFSException
java.io.IOException
OperationAbortedException
public void uploadFiles(java.io.File[] filesDirs,
java.lang.String remotePath)
throws RemoteFSException,
java.io.IOException,
OperationAbortedException
RemoteFSException
java.io.IOException
OperationAbortedException
public void downloadFile(RemoteFSNode node,
java.io.File destination)
throws RemoteFSException,
java.io.IOException,
OperationAbortedException
RemoteFSException
java.io.IOException
OperationAbortedException
public void downloadFiles(java.lang.String remotePath,
java.io.File destination)
throws RemoteFSException,
java.io.IOException,
OperationAbortedException
RemoteFSException
java.io.IOException
OperationAbortedException
public void uploadHiresFiles(AlbumObject root,
AlbumManifest manifest,
java.lang.Long spaceLeft)
throws RemoteFSException,
java.io.IOException,
OperationAbortedException
RemoteFSException
java.io.IOException
OperationAbortedExceptionpublic void addTransferListener(TransferListener l)
public void removeTransferListener(TransferListener l)
protected void fireFileProcessingStarted(ProgressEvent e)
protected void fireFileProcessingProgress(ProgressEvent e)
protected void fireFileProcessingFinished(ProgressEvent e)
public void addAlbumBeanListener(AlbumBeanListener l)
public void removeAlbumBeanListener(AlbumBeanListener l)
protected void fireImageProcessingStarted(AlbumBeanEvent e)
protected void fireImageProcessingFinished(AlbumBeanEvent e)
protected void fireErrorOccured(java.lang.Exception param1,
java.io.File param2)
public void bytesTransferred(long bytes)
public UploadBean.PathFinder getPathFinder(AccountProfile account,
AlbumBean engine)
throws java.io.IOException,
RemoteFSException
account - engine -
java.io.IOException
RemoteFSException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||