Package com.collabnet.ce.webservices
Class CTFProject
- java.lang.Object
-
- com.collabnet.ce.webservices.CTFProject
-
- All Implemented Interfaces:
ObjectWithTitle
public class CTFProject extends Object implements ObjectWithTitle
A project in TeamForge.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description protected CollabNetAppappprotected Stringid
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMember(CTFUser u)voidaddMember(String userName)CTFPackagecreatePackage(String title, String description, boolean isPublished)CTFRolecreateRole(String title, String description)CTFTrackercreateTracker(String name, String title, String description)protected <T extends ObjectWithTitle>
TfindByTitle(List<T> list, String title)Convenience method for a subtype to find an item in a collection by its title.List<CTFUser>getAdmins()Gets the administrators of this project.StringgetId()List<CTFUser>getMembers()CTFDocumentFoldergetOrCreateDocumentFolder(String documentPath)Gets to the folder from a path string like "foo/bar/zot", if necessary by creating intermediate directories.CTFList<CTFPackage>getPackages()CTFList<CTFRole>getRoles()Roles in this project.CTFDocumentFoldergetRootFolder()CTFList<CTFScmRepository>getScmRepositories()StringgetTitle()CTFList<CTFTracker>getTrackers()CTFList<CTFRole>getUserRoles(CTFUser u)CTFList<CTFRole>getUserRoles(String username)Gets all the roles that the given user has in this project.booleanhasMember(String username)StringverifyPath(String documentPath)Verify a document folder path.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.collabnet.ce.webservices.ObjectWithTitle
getId
-
-
-
-
Field Detail
-
app
protected final CollabNetApp app
-
id
protected final String id
-
-
Method Detail
-
getTitle
public String getTitle()
- Specified by:
getTitlein interfaceObjectWithTitle
-
createPackage
public CTFPackage createPackage(String title, String description, boolean isPublished) throws IOException
- Parameters:
title- Package title.description- Package description.isPublished- Whether the package should be published- Throws:
IOException
-
getPackages
public CTFList<CTFPackage> getPackages() throws IOException
- Throws:
IOException
-
getTrackers
public CTFList<CTFTracker> getTrackers() throws IOException
- Throws:
IOException
-
createTracker
public CTFTracker createTracker(String name, String title, String description) throws IOException
- Throws:
IOException
-
getScmRepositories
public CTFList<CTFScmRepository> getScmRepositories() throws IOException
- Throws:
IOException
-
getMembers
public List<CTFUser> getMembers() throws IOException
- Throws:
IOException
-
getAdmins
public List<CTFUser> getAdmins() throws IOException
Gets the administrators of this project.- Throws:
IOException
-
addMember
public void addMember(String userName) throws IOException
- Throws:
IOException
-
addMember
public void addMember(CTFUser u) throws IOException
- Throws:
IOException
-
hasMember
public boolean hasMember(String username) throws IOException
- Throws:
IOException
-
getRoles
public CTFList<CTFRole> getRoles() throws IOException
Roles in this project.- Throws:
IOException
-
createRole
public CTFRole createRole(String title, String description) throws IOException
- Throws:
IOException
-
getUserRoles
public CTFList<CTFRole> getUserRoles(CTFUser u) throws IOException
- Throws:
IOException
-
getUserRoles
public CTFList<CTFRole> getUserRoles(String username) throws IOException
Gets all the roles that the given user has in this project.- Throws:
IOException
-
getRootFolder
public CTFDocumentFolder getRootFolder() throws IOException
- Throws:
IOException
-
getOrCreateDocumentFolder
public CTFDocumentFolder getOrCreateDocumentFolder(String documentPath) throws IOException
Gets to the folder from a path string like "foo/bar/zot", if necessary by creating intermediate directories.- Throws:
IOException
-
verifyPath
public String verifyPath(String documentPath) throws IOException
Verify a document folder path. If at any point the folder is missing, return the name of the first missing folder.- Parameters:
documentPath- string with folders separated by '/'.- Returns:
- the first missing folder, or null if all are found.
- Throws:
RemoteException- if any problems occurs while verifying pathIOException
-
getId
public String getId()
-
findByTitle
protected <T extends ObjectWithTitle> T findByTitle(List<T> list, String title)
Convenience method for a subtype to find an item in a collection by its title.
-
-