|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.collabnet.ce.webservices.CollabNetApp
public class CollabNetApp
This class represents the connection to the CollabNet webservice. Since it contains login/logout data, other webservices will require an instance of it. This is written based on the 5.0 version of the soap services.
| Nested Class Summary | |
|---|---|
static class |
CollabNetApp.CollabNetAppException
Exception class to throw when something unexpected goes wrong. |
| Field Summary | |
|---|---|
static java.lang.String |
SOAP_SERVICE
|
| Constructor Summary | |
|---|---|
CollabNetApp(java.lang.String url)
Creates a new collabnet app |
|
CollabNetApp(java.lang.String url,
java.lang.String username)
Creates a new CollabNetApp without a session. |
|
CollabNetApp(java.lang.String url,
java.lang.String username,
java.lang.String password)
Creates a new session to the server at the given url. |
|
| Method Summary | |
|---|---|
void |
checkValidSessionId()
Throws a CollabNetAppException if there is no current sessionId. |
java.util.Collection<java.lang.String> |
getAdmins(java.lang.String projectId)
Get the usernames of all project admins. |
java.lang.String |
getApiVersion()
|
static java.lang.String |
getApiVersion(java.lang.String url)
|
java.util.Map<java.lang.String,java.lang.String> |
getGroups()
Get the list of all Groups on the system. |
java.util.Collection<java.lang.String> |
getGroupUsers(java.lang.String groupId)
Return a collection of users that are active members of the group. |
java.lang.String |
getProjectId(java.lang.String projectName)
Find the project that matches the given name, and return it's id. |
java.util.Collection<java.lang.String> |
getProjects()
Return the list of project names. |
java.lang.String |
getServerUrl()
|
java.lang.String |
getSessionId()
|
java.util.Collection<java.lang.String> |
getUserGroups(java.lang.String username)
Get a list of the groups the user belongs to. |
java.util.Collection<java.lang.String> |
getUsers(java.lang.String projectId)
Get the usernames of all users. |
java.util.Collection<java.lang.String> |
getUsersInGroups(java.util.Collection<java.lang.String> groupNames)
Given a list of group names, return a list of all unique users that are members of any of the groups. |
java.lang.String |
getVersion()
|
boolean |
isUserMemberOfGroup(java.lang.String username,
java.lang.String group)
Is the user a member of the group? |
boolean |
isUserMemberOfProject(java.lang.String username,
java.lang.String projectId)
Is the user a member of the project? |
boolean |
isUsernameValid(java.lang.String username)
Can the user can be found on the CollabNet server? |
boolean |
isUserProjectAdmin(java.lang.String username,
java.lang.String projectId)
Is the user a project admin? |
boolean |
isUserSuper(java.lang.String username)
|
void |
loginWithToken(java.lang.String token)
Login with a token. |
void |
logoff()
Logoff for this user and invalidate the sessionId. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String SOAP_SERVICE
| Constructor Detail |
|---|
public CollabNetApp(java.lang.String url,
java.lang.String username,
java.lang.String password)
throws java.rmi.RemoteException
url - of the CollabNet server.username - to login as.password - to login with.
java.rmi.RemoteException - if we fail to login with the username/password
public CollabNetApp(java.lang.String url,
java.lang.String username)
url - of the CollabNet server.username - to login as.public CollabNetApp(java.lang.String url)
url - url of the CollabNet server| Method Detail |
|---|
public java.lang.String getSessionId()
public java.lang.String getServerUrl()
public void loginWithToken(java.lang.String token)
throws java.rmi.RemoteException
token - one-time token
java.rmi.RemoteException
public void logoff()
throws java.rmi.RemoteException
java.rmi.RemoteException
public static java.lang.String getApiVersion(java.lang.String url)
throws java.rmi.RemoteException
url - of the CollabNet server.
java.rmi.RemoteException
public java.lang.String getApiVersion()
throws java.rmi.RemoteException
java.rmi.RemoteException - if the call fails for some unknown reason
public java.lang.String getVersion()
throws java.rmi.RemoteException
java.rmi.RemoteException
public java.lang.String getProjectId(java.lang.String projectName)
throws java.rmi.RemoteException
projectName -
java.rmi.RemoteException
public java.util.Collection<java.lang.String> getProjects()
throws java.rmi.RemoteException
java.rmi.RemoteException
public boolean isUsernameValid(java.lang.String username)
throws java.rmi.RemoteException
username - to check.
java.rmi.RemoteException
public boolean isUserMemberOfProject(java.lang.String username,
java.lang.String projectId)
throws java.rmi.RemoteException
username - to check.projectId -
java.rmi.RemoteException
public boolean isUserMemberOfGroup(java.lang.String username,
java.lang.String group)
throws java.rmi.RemoteException
username - to check.group -
java.rmi.RemoteException
public java.util.Collection<java.lang.String> getUserGroups(java.lang.String username)
throws java.rmi.RemoteException
username -
java.rmi.RemoteException
public boolean isUserProjectAdmin(java.lang.String username,
java.lang.String projectId)
throws java.rmi.RemoteException
username - to check.projectId -
java.rmi.RemoteException
public boolean isUserSuper(java.lang.String username)
throws java.rmi.RemoteException
username -
java.rmi.RemoteException
public java.util.Collection<java.lang.String> getUsers(java.lang.String projectId)
throws java.rmi.RemoteException
projectId - the project id
java.rmi.RemoteException
public java.util.Collection<java.lang.String> getAdmins(java.lang.String projectId)
throws java.rmi.RemoteException
projectId - the project id
java.rmi.RemoteException
public java.util.Map<java.lang.String,java.lang.String> getGroups()
throws java.rmi.RemoteException
java.rmi.RemoteException
public java.util.Collection<java.lang.String> getUsersInGroups(java.util.Collection<java.lang.String> groupNames)
throws java.rmi.RemoteException
groupNames - collection of group names.
java.rmi.RemoteException
public java.util.Collection<java.lang.String> getGroupUsers(java.lang.String groupId)
throws java.rmi.RemoteException
groupId -
java.rmi.RemoteExceptionpublic void checkValidSessionId()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||