Solved

Which method should I use in p4java api JAVADOC?

Posted on 2013-11-13
1
561 Views
Last Modified: 2013-11-14
Hi,
I try to get the list of workspaces a user has by using the P4JAVA API.

However, I couldn't figure out which class and which method I should use from the JavaDoc they provided.

This is the JAVADOC I found for p4java.

Can you please help me with this?

Thanks,
0
Comment
Question by:Tolgar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 39646532
It appears that in the Javadoc the term "client" is what is used for what you are thinking of as "workspace". So the IServer.getClients() is probably what you need to use. Something along the lines of...
String username = "george";
List<IClientSummary> clientSummaries = ServerFactory.getServer("p4java://perforce.mycompany.com:1666", null).getClients(username, null, 0);
System.out.println("Workspaces for '" + username + "'...");
for (IClientSummary clientSummary : clientSummaries) {
    System.out.println(clientSummary.getName() + " (" + clientSummary.getRoot() + ")");
}

Open in new window

(Obviously, change the host, port and username to whatever you need for your environment)
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question