net.sourceforge.mavenplugins.sourceforge
Class FileReleaseSystemBean

java.lang.Object
  extended bynet.sourceforge.mavenplugins.sourceforge.FileReleaseSystemBean

public class FileReleaseSystemBean
extends java.lang.Object

Bean used for accessing the File Release System on Sourceforge.

Version:
$Revision: 1.5 $ $Date: 2004/02/05 09:12:23 $
Author:
Ludovic Claude

Constructor Summary
FileReleaseSystemBean()
          Constructor for FileReleaseSystemBean
 
Method Summary
protected  boolean canCreatePackage(org.w3c.dom.Document doc)
           
protected  boolean checkLoginResponse(org.w3c.dom.Document doc)
           
protected  int createPackage()
          Creates a new package
protected  int createRelease(int packageId)
          Creates a new release for the package
protected  org.w3c.dom.Document defineFileInformation(int packageId, int releaseId, int fileId, java.lang.String fileName)
          Defines the file information like plateform support and file type
 void execute()
           
 java.io.File getChangeLogFile()
          Gets the changeLogFile.
protected  int getCreatedReleaseId(org.w3c.dom.Document doc)
           
protected  int getFileId(org.w3c.dom.Document doc, java.lang.String fileName)
          Gets the file id for the given file
 java.util.List getFiles()
          Gets the files.
 java.lang.String getPackage()
          Gets the package.
 java.lang.String getPackageDescription()
          Gets the packageDescription.
protected  int getPackageId(org.w3c.dom.Document doc)
          Locates the package id in the page if it exists, else returns -1
 java.lang.String getProxyHost()
          Gets the proxyHost.
 java.lang.String getProxyNTDomain()
          Gets the proxyNTDomain.
 java.lang.String getProxyPassword()
          Gets the proxyPassword.
 int getProxyPort()
          Gets the proxyPort.
 java.lang.String getProxyUserName()
          Gets the proxyUserName.
 java.lang.String getRelease()
          Gets the release.
protected  int getReleaseId(org.w3c.dom.Document doc)
          Locates the release id in he page if it exists, else returns -1
 java.io.File getReleaseNotesFile()
          Gets the releaseNotesFile.
 int getSfGroupId()
          Gets the sfGroupId.
 java.lang.String getSfPassword()
          Gets the sfPassword.
 java.lang.String getSfUserName()
          Gets the sfUserName.
 boolean isSubmitNewsItem()
          Gets the submitNewsItem.
protected  void login()
           
protected  org.w3c.dom.Document selectUploadedFiles(int packageId, int releaseId)
          Select our uploaded files to include in the file release page
protected  void sendEmailConfirmation(int packageId, int releaseId)
          Send the email confirmation to the users monitoring the package
 void setChangeLogFile(java.io.File changeLogFile)
          Sets the changeLogFile.
 void setFiles(java.util.List files)
          Sets the files.
 void setFilesIterator(java.util.Iterator iterator)
          Sets the files.
 void setPackage(java.lang.String package1)
          Sets the package.
 void setPackageDescription(java.lang.String packageDescription)
          Sets the packageDescription.
 void setProxyHost(java.lang.String proxyHost)
          Sets the proxyHost.
 void setProxyNTDomain(java.lang.String proxyNTDomain)
          Sets the proxyNTDomain.
 void setProxyPassword(java.lang.String proxyPassword)
          Sets the proxyPassword.
 void setProxyPort(int proxyPort)
          Sets the proxyPort.
 void setProxyUserName(java.lang.String proxyUserName)
          Sets the proxyUserName.
 void setRelease(java.lang.String release)
          Sets the release.
 void setReleaseNotesFile(java.io.File releaseNotesFile)
          Sets the releaseNotesFile.
 void setSfGroupId(int sfGroupId)
          Sets the sfGroupId.
 void setSfPassword(java.lang.String sfPassword)
          Sets the sfPassword.
 void setSfUserName(java.lang.String sfUserName)
          Sets the sfUserName.
 void setSubmitNewsItem(boolean submitNewsItem)
          Sets the submitNewsItem.
protected  void submitNewsItem()
          Submit a news item informing users about the release
protected  org.w3c.dom.Document uploadNotes(int packageId, int releaseId)
          Upload the changes and release notes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileReleaseSystemBean

public FileReleaseSystemBean()
Constructor for FileReleaseSystemBean

Method Detail

getFiles

public java.util.List getFiles()
Gets the files.

Returns:
the files.

setFiles

public void setFiles(java.util.List files)
Sets the files.

Parameters:
files - The files to set.

setFilesIterator

public void setFilesIterator(java.util.Iterator iterator)
Sets the files.


getSfGroupId

public int getSfGroupId()
Gets the sfGroupId.

Returns:
the sfGroupId.

setSfGroupId

public void setSfGroupId(int sfGroupId)
Sets the sfGroupId.

Parameters:
sfGroupId - The sfGroupId to set.

getSfUserName

public java.lang.String getSfUserName()
Gets the sfUserName.

Returns:
the sfUserName.

setSfUserName

public void setSfUserName(java.lang.String sfUserName)
Sets the sfUserName.

Parameters:
sfUserName - The sfUserName to set.

getSfPassword

public java.lang.String getSfPassword()
Gets the sfPassword.

Returns:
the sfPassword.

setSfPassword

public void setSfPassword(java.lang.String sfPassword)
Sets the sfPassword.

Parameters:
sfPassword - The sfPassword to set.

getPackage

public java.lang.String getPackage()
Gets the package.

Returns:
the package.

setPackage

public void setPackage(java.lang.String package1)
Sets the package.

Parameters:
package1 - The package to set.

getRelease

public java.lang.String getRelease()
Gets the release.

Returns:
the release.

setRelease

public void setRelease(java.lang.String release)
Sets the release.

Parameters:
release - The release to set.

getChangeLogFile

public java.io.File getChangeLogFile()
Gets the changeLogFile.

Returns:
the changeLogFile.

setChangeLogFile

public void setChangeLogFile(java.io.File changeLogFile)
Sets the changeLogFile.

Parameters:
changeLogFile - The changeLogFile to set.

getReleaseNotesFile

public java.io.File getReleaseNotesFile()
Gets the releaseNotesFile.

Returns:
the releaseNotesFile.

setReleaseNotesFile

public void setReleaseNotesFile(java.io.File releaseNotesFile)
Sets the releaseNotesFile.

Parameters:
releaseNotesFile - The releaseNotesFile to set.

isSubmitNewsItem

public boolean isSubmitNewsItem()
Gets the submitNewsItem.

Returns:
the submitNewsItem.

setSubmitNewsItem

public void setSubmitNewsItem(boolean submitNewsItem)
Sets the submitNewsItem.

Parameters:
submitNewsItem - The submitNewsItem to set.

getPackageDescription

public java.lang.String getPackageDescription()
Gets the packageDescription.

Returns:
the packageDescription.

setPackageDescription

public void setPackageDescription(java.lang.String packageDescription)
Sets the packageDescription.


getProxyHost

public java.lang.String getProxyHost()
Gets the proxyHost.

Returns:
the proxyHost.

setProxyHost

public void setProxyHost(java.lang.String proxyHost)
Sets the proxyHost.

Parameters:
proxyHost - The proxyHost to set.

getProxyPort

public int getProxyPort()
Gets the proxyPort.

Returns:
the proxyPort.

setProxyPort

public void setProxyPort(int proxyPort)
Sets the proxyPort.

Parameters:
proxyPort - The proxyPort to set.

getProxyUserName

public java.lang.String getProxyUserName()
Gets the proxyUserName.

Returns:
the proxyUserName.

setProxyUserName

public void setProxyUserName(java.lang.String proxyUserName)
Sets the proxyUserName.

Parameters:
proxyUserName - The proxyUserName to set.

getProxyPassword

public java.lang.String getProxyPassword()
Gets the proxyPassword.

Returns:
the proxyPassword.

setProxyPassword

public void setProxyPassword(java.lang.String proxyPassword)
Sets the proxyPassword.

Parameters:
proxyPassword - The proxyPassword to set.

getProxyNTDomain

public java.lang.String getProxyNTDomain()
Gets the proxyNTDomain.

Returns:
the proxyNTDomain.

setProxyNTDomain

public void setProxyNTDomain(java.lang.String proxyNTDomain)
Sets the proxyNTDomain.

Parameters:
proxyNTDomain - The proxyNTDomain to set.

execute

public void execute()
             throws java.lang.Exception
Throws:
java.lang.Exception

login

protected void login()
              throws java.lang.Exception
Throws:
java.lang.Exception

checkLoginResponse

protected boolean checkLoginResponse(org.w3c.dom.Document doc)

getPackageId

protected int getPackageId(org.w3c.dom.Document doc)
Locates the package id in the page if it exists, else returns -1

Parameters:
doc - The html page Admin: FRS: Packages
Returns:
the package id, or -1

canCreatePackage

protected boolean canCreatePackage(org.w3c.dom.Document doc)
Parameters:
doc - The html page Admin: FRS: Packages
Returns:
true if the user is authorised to add a new package

createPackage

protected int createPackage()
                     throws java.lang.Exception
Creates a new package

Returns:
the new package id
Throws:
java.lang.Exception

getReleaseId

protected int getReleaseId(org.w3c.dom.Document doc)
Locates the release id in he page if it exists, else returns -1

Parameters:
doc - The html page Admin: FRS: Releases
Returns:
the release id, or -1

createRelease

protected int createRelease(int packageId)
                     throws java.lang.Exception
Creates a new release for the package

Returns:
the release id, or -1 if the release could notbe created
Throws:
java.lang.Exception

getCreatedReleaseId

protected int getCreatedReleaseId(org.w3c.dom.Document doc)
                           throws java.lang.NumberFormatException
Throws:
java.lang.NumberFormatException

uploadNotes

protected org.w3c.dom.Document uploadNotes(int packageId,
                                           int releaseId)
                                    throws java.lang.Exception
Upload the changes and release notes

Parameters:
packageId - The package id
releaseId - The release id
Returns:
the result page
Throws:
java.lang.Exception

selectUploadedFiles

protected org.w3c.dom.Document selectUploadedFiles(int packageId,
                                                   int releaseId)
                                            throws java.lang.Exception
Select our uploaded files to include in the file release page

Parameters:
packageId - The package id
releaseId - The release id
Returns:
the result page
Throws:
java.lang.Exception

getFileId

protected int getFileId(org.w3c.dom.Document doc,
                        java.lang.String fileName)
                 throws java.lang.Exception
Gets the file id for the given file

Parameters:
doc - The html page Admin: FRS: Releases
fileName - The file name
Returns:
the file id
Throws:
java.lang.Exception

defineFileInformation

protected org.w3c.dom.Document defineFileInformation(int packageId,
                                                     int releaseId,
                                                     int fileId,
                                                     java.lang.String fileName)
                                              throws java.lang.Exception
Defines the file information like plateform support and file type

Parameters:
packageId - The package id
releaseId - The release id
fileId - The file id
fileName - The file name
Returns:
the result page
Throws:
java.lang.Exception

sendEmailConfirmation

protected void sendEmailConfirmation(int packageId,
                                     int releaseId)
                              throws org.apache.commons.httpclient.URIException
Send the email confirmation to the users monitoring the package

Parameters:
packageId - The package id
releaseId - The release id
Throws:
org.apache.commons.httpclient.URIException

submitNewsItem

protected void submitNewsItem()
                       throws java.lang.Exception
Submit a news item informing users about the release

Throws:
java.lang.Exception


Copyright © 2003-2004 SourceForge. All Rights Reserved.