public class YouTrackServer extends Object
Constructor and Description |
---|
YouTrackServer(String serverUrl)
Constructs a server.
|
Modifier and Type | Method and Description |
---|---|
Command |
addBuildToBundle(String siteName,
User user,
String bundleName,
String buildName)
Adds a build with the name to the bundle with the given name.
|
Command |
applyCommand(String siteName,
User user,
Issue issue,
String command,
String comment,
String group,
User runAs,
boolean notify)
Apply a command to an issue.
|
Command |
comment(String siteName,
User user,
Issue issue,
String comment,
String group,
boolean silent)
Adds a comment to the issue with currently logged in user.
|
Command |
createIssue(String siteName,
User user,
String project,
String title,
String description,
String command,
File attachment) |
String |
getBuildBundleNameForField(User user,
String projectId,
String fieldName) |
List<BuildBundle> |
getBuildBundles(User user) |
List<Field> |
getFields(User user) |
List<Group> |
getGroups(User user) |
Issue |
getIssue(User user,
String issueId,
String stateField)
Gets an issue by issue id.
|
List<Project> |
getProjects(User user)
Gets all projects that the given user can see.
|
StateBundle |
getStateBundleForField(User user,
String fieldName) |
StateBundle |
getStateBundleWithName(User user,
String stateBundleName)
Gets a state bundle for the given name filled with the state values/
|
User |
getUserByEmail(User user,
String email)
Get a YouTrack user from the e-mail address.
|
String[] |
getVersion() |
User |
login(String username,
String password)
Logs in a user.
|
List<Issue> |
search(User user,
String searchQuery) |
List<Suggestion> |
searchSuggestions(User user,
String current) |
public YouTrackServer(String serverUrl)
serverUrl
- the url of the server.public Command createIssue(String siteName, User user, String project, String title, String description, String command, File attachment)
public StateBundle getStateBundleWithName(User user, String stateBundleName)
user
- the userstateBundleName
- the name of the state bundle.public StateBundle getStateBundleForField(User user, String fieldName)
public String getBuildBundleNameForField(User user, String projectId, String fieldName)
public List<Project> getProjects(User user)
login(String, String)
, i.e.
it should contains the cookie strings for the users login session.user
- the user to get projects for.public Command comment(String siteName, User user, Issue issue, String comment, String group, boolean silent)
siteName
- name of site configuration to comment on.user
- the currently logged in user.issue
- the issue to comment on.comment
- the comment text.group
- the group the comment should be visible to.silent
- prevents watchers from being notified.public Command applyCommand(String siteName, User user, Issue issue, String command, String comment, String group, User runAs, boolean notify)
siteName
- name of site.user
- the user used to apply the command, shall be one with cookies set.issue
- the issue to apply the command to.command
- the command to apply.comment
- comment with the command, null is allowed.group
- the visibility group for the command.runAs
- user to apply the command as, null is allowed.notify
- notifies watchers.public User getUserByEmail(User user, String email)
user
- the user to get.email
- the email to get.public User login(String username, String password)
username
- the username of the user.password
- the password of the user.public Command addBuildToBundle(String siteName, User user, String bundleName, String buildName)
siteName
- the name of the site to add bundle to.user
- the logged in user.bundleName
- the name of the bundle to add a build to.buildName
- the name of the build to add.public Issue getIssue(User user, String issueId, String stateField)
user
- the user session.issueId
- the id of the issue.stateField
- the state field.public String[] getVersion()
public List<BuildBundle> getBuildBundles(User user)
public List<Suggestion> searchSuggestions(User user, String current)
Copyright © 2016–2019. All rights reserved.