|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kohsuke.jnt.JavaNet
public class JavaNet
Root of java.net.
Start with one of the connect
method, which gives you
an instance of JavaNet
. The rest of the java.net object model
can be traversed from this object.
Method Summary | |
---|---|
static JavaNet |
connect()
obtains the connection info from ~/.java.net and returns the connected JavaNet object. |
static JavaNet |
connect(File accountFile)
obtains the connection info from the given file and returns the connected JavaNet object. |
static JavaNet |
connect(String userName,
String password)
Connects to java.net directly by using the given account info. |
static JavaNet |
connect(String userName,
String password,
String proxyServer,
int proxyPort)
Connects to java.net through HTTP proxy by using the given account info. |
static JavaNet |
connect(com.meterware.httpunit.WebConversation conversation)
Connects to java.net by using a WebConversation instance that has already logged in. |
static JavaNet |
connectAnonymously()
Connects anonymously. |
static JavaNet |
connectByClone(JavaNet base)
Connects by just reusing an earlier session established by another JavaNet instance. |
JavaNet |
copy()
A bit more object-oriented way of calling connectByClone(JavaNet) . |
com.meterware.httpunit.WebConversation |
getConversation()
Obtains the session being used. |
JNMyself |
getMyself()
Obtains a special JNUser object that represents
the currently logged-in user. |
JNProject |
getProject(String projectName)
Obtains a JNProject object from its name. |
JNRole |
getRole(String roleName)
Obtains a JNRole object from a role name. |
String |
getSessionID()
Gets the session cookie that the server uses to track us. |
JNUser |
getUser(String userName)
Obtains a JNUser object from an user name. |
boolean |
isLoggedIn()
Checks if the user is logged in. |
void |
login(String userName,
String password)
Logs in to the java.net. |
String[][] |
runAdHocQuery(String sql)
Runs ad-hoc query against java.net database. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public final com.meterware.httpunit.WebConversation getConversation()
public void login(String userName, String password) throws ProcessingException
ProcessingException
public boolean isLoggedIn() throws ProcessingException
ProcessingException
public String getSessionID()
public static JavaNet connect() throws ProcessingException
JavaNet
object.
ProcessingException
public static JavaNet connect(File accountFile) throws ProcessingException
JavaNet
object.
accountFile
- The property file that stores the connection information.
ProcessingException
public static JavaNet connectAnonymously()
public static JavaNet connectByClone(JavaNet base) throws ProcessingException
JavaNet
instance.
ProcessingException
public JavaNet copy() throws ProcessingException
connectByClone(JavaNet)
.
ProcessingException
public static JavaNet connect(String userName, String password) throws ProcessingException
ProcessingException
public static JavaNet connect(String userName, String password, String proxyServer, int proxyPort) throws ProcessingException
ProcessingException
public static JavaNet connect(com.meterware.httpunit.WebConversation conversation)
WebConversation
instance that has already logged in.
Don't use this method unless you know what you are doing.
public JNProject getProject(String projectName) throws ProcessingException
JNProject
object from its name.
A successful completion of this method does not guarantee that the project actually exists.
ProcessingException
public JNMyself getMyself() throws ProcessingException
JNUser
object that represents
the currently logged-in user.
ProcessingException
public JNUser getUser(String userName)
JNUser
object from an user name.
A successful completion of this method does not guarantee that the user exists.
public JNRole getRole(String roleName) throws ProcessingException
JNRole
object from a role name.
A successful completion of this method does not guarantee that the role actually exists.
ProcessingException
public String[][] runAdHocQuery(String sql) throws ProcessingException
ProcessingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |