com.collabnet.ce.webservices
Class FrsApp

java.lang.Object
  extended by com.collabnet.ce.webservices.AbstractSoapApp
      extended by com.collabnet.ce.webservices.FrsApp

public class FrsApp
extends AbstractSoapApp

Class to hold the package and release-related methods. Wraps a collabNetApp.


Constructor Summary
FrsApp(CollabNetApp collabNetApp)
          Constructs a FileReleaseSystem webservice container, from a CollabNetApp webservice container.
 
Method Summary
 com.collabnet.ce.soap50.webservices.frs.FrsFileSoapDO createFrsFile(java.lang.String releaseId, java.lang.String fileName, java.lang.String mimeType, java.lang.String fileId)
          Associate an uploaded file with a release.
 void deleteFrsFile(java.lang.String fileId)
          Delete existing Frs files matching the given name.
 java.lang.String findFrsFile(java.lang.String name, java.lang.String releaseId)
          Find the File Release System file which matches the given name, if any.
 java.lang.String findPackageId(java.lang.String packageName, java.lang.String projectId)
          Find the packageId in a project with a given name.
 java.lang.String findReleaseId(java.lang.String releaseName, java.lang.String projectId)
          Find the releaseId when we don't know the package.
 java.lang.String findReleaseIdByPackage(java.lang.String releaseName, java.lang.String packageId)
          Get the releaseId when we know the packageId.
 java.util.Collection<java.lang.String> getPackages(java.lang.String projectId)
          Get the list of package names associated with a given projectId.
 java.util.Collection<java.lang.String> getProjectReleases(java.lang.String projectId)
          Get the list of possible releases, in a given project.
 java.lang.String getReleasePath(java.lang.String releaseId)
          Get the path to the release's page.
 java.util.Collection<java.lang.String> getReleases(java.lang.String packageId)
          Get the list of release names, given a packageId.
 
Methods inherited from class com.collabnet.ce.webservices.AbstractSoapApp
checkValidSessionId, getServerUrl, getSessionId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrsApp

public FrsApp(CollabNetApp collabNetApp)
Constructs a FileReleaseSystem webservice container, from a CollabNetApp webservice container.

Parameters:
collabNetApp - logged in main CollabNet webservice.
Method Detail

findPackageId

public java.lang.String findPackageId(java.lang.String packageName,
                                      java.lang.String projectId)
                               throws java.rmi.RemoteException
Find the packageId in a project with a given name.

Parameters:
packageName -
projectId -
Returns:
the package id for a package with this name in the project, or null if the package cannot be found.
Throws:
java.rmi.RemoteException

getPackages

public java.util.Collection<java.lang.String> getPackages(java.lang.String projectId)
                                                   throws java.rmi.RemoteException
Get the list of package names associated with a given projectId.

Parameters:
projectId -
Returns:
collection of package names.
Throws:
java.rmi.RemoteException

findReleaseId

public java.lang.String findReleaseId(java.lang.String releaseName,
                                      java.lang.String projectId)
                               throws java.rmi.RemoteException
Find the releaseId when we don't know the package. We'll need to get all packages for the project, then get all releases for each package and search for the release we're looking for.

Parameters:
releaseName -
projectId -
Returns:
the id for the first matching release, or null, if the release cannot be found.
Throws:
java.rmi.RemoteException

getProjectReleases

public java.util.Collection<java.lang.String> getProjectReleases(java.lang.String projectId)
                                                          throws java.rmi.RemoteException
Get the list of possible releases, in a given project.

Parameters:
projectId -
Returns:
a collection of unique release names.
Throws:
java.rmi.RemoteException

findReleaseIdByPackage

public java.lang.String findReleaseIdByPackage(java.lang.String releaseName,
                                               java.lang.String packageId)
                                        throws java.rmi.RemoteException
Get the releaseId when we know the packageId.

Parameters:
releaseName -
packageId -
Returns:
the id for the release from this package or null, if none is found.
Throws:
java.rmi.RemoteException

getReleases

public java.util.Collection<java.lang.String> getReleases(java.lang.String packageId)
                                                   throws java.rmi.RemoteException
Get the list of release names, given a packageId.

Parameters:
packageId -
Returns:
a list of release names.
Throws:
java.rmi.RemoteException

getReleasePath

public java.lang.String getReleasePath(java.lang.String releaseId)
                                throws java.rmi.RemoteException
Get the path to the release's page.

Parameters:
releaseId -
Returns:
the path to the release.
Throws:
java.rmi.RemoteException

findFrsFile

public java.lang.String findFrsFile(java.lang.String name,
                                    java.lang.String releaseId)
                             throws java.rmi.RemoteException
Find the File Release System file which matches the given name, if any. Otherwise, return null.

Parameters:
name - match with the file's title.
releaseId - for this file.
Returns:
the id for this file, or null if none is found.
Throws:
java.rmi.RemoteException

deleteFrsFile

public void deleteFrsFile(java.lang.String fileId)
                   throws java.rmi.RemoteException
Delete existing Frs files matching the given name.

Parameters:
fileId - of the file to delete.
Throws:
java.rmi.RemoteException

createFrsFile

public com.collabnet.ce.soap50.webservices.frs.FrsFileSoapDO createFrsFile(java.lang.String releaseId,
                                                                           java.lang.String fileName,
                                                                           java.lang.String mimeType,
                                                                           java.lang.String fileId)
                                                                    throws java.rmi.RemoteException
Associate an uploaded file with a release.

Parameters:
releaseId -
fileName - of file that was uploaded.
mimeType - of the uploaded file.
fileId - returned when file was uploaded.
Returns:
newly SoapDO for newly created FRSFile.
Throws:
java.rmi.RemoteException


Copyright © 2010. All Rights Reserved.