mirror of
https://github.com/Fishwaldo/rundeck-api-java-client.git
synced 2025-07-06 13:08:38 +00:00
Deprecate incorrect method names
This commit is contained in:
parent
6c1f93af49
commit
1a1e610b20
2 changed files with 49 additions and 9 deletions
|
@ -3261,9 +3261,28 @@ public class RundeckClient implements Serializable {
|
|||
* @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
|
||||
* @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
|
||||
* @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
|
||||
* @deprecated renamed for clarity use {@link #getExecutionOutput(Long, int, int, long, int)}
|
||||
*/
|
||||
public RundeckOutput getJobExecutionOutput(Long executionId, int offset, int lastlines, long lastmod, int maxlines)
|
||||
throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
|
||||
return getExecutionOutput(executionId, offset, lastlines, lastmod, maxlines);
|
||||
}
|
||||
/**
|
||||
* Get the execution output of the given job
|
||||
*
|
||||
* @param executionId identifier of the execution - mandatory
|
||||
* @param offset byte offset to read from in the file. 0 indicates the beginning.
|
||||
* @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will override the offset value and return only the specified number of lines at the end of the log.
|
||||
* @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset
|
||||
* @param maxlines maximum number of lines to retrieve forward from the specified offset.
|
||||
* @return {@link RundeckOutput}
|
||||
* @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
|
||||
* @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
|
||||
* @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
|
||||
* @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
|
||||
*/
|
||||
public RundeckOutput getExecutionOutput(Long executionId, int offset, int lastlines, long lastmod, int maxlines)
|
||||
throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
|
||||
AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
|
||||
ApiPathBuilder param = new ApiPathBuilder(
|
||||
"/execution/", executionId.toString(),
|
||||
|
@ -3321,7 +3340,7 @@ public class RundeckClient implements Serializable {
|
|||
* @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
|
||||
* @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
|
||||
*/
|
||||
public RundeckOutput getJobExecutionOutputForNode(Long executionId, String nodeName, int offset, int lastlines,
|
||||
public RundeckOutput getExecutionOutputForNode(Long executionId, String nodeName, int offset, int lastlines,
|
||||
long lastmod, int maxlines)
|
||||
throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
|
||||
AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
|
||||
|
@ -3362,7 +3381,7 @@ public class RundeckClient implements Serializable {
|
|||
* @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
|
||||
* @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
|
||||
*/
|
||||
public RundeckOutput getJobExecutionOutputForStep(Long executionId, String stepCtx, int offset, int lastlines,
|
||||
public RundeckOutput getExecutionOutputForStep(Long executionId, String stepCtx, int offset, int lastlines,
|
||||
long lastmod, int maxlines)
|
||||
throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
|
||||
AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
|
||||
|
@ -3403,7 +3422,8 @@ public class RundeckClient implements Serializable {
|
|||
* @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
|
||||
* @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
|
||||
*/
|
||||
public RundeckOutput getJobExecutionOutputForNodeAndStep(Long executionId, String nodeName, String stepCtx, int offset, int lastlines,
|
||||
public RundeckOutput getExecutionOutputForNodeAndStep(Long executionId, String nodeName, String stepCtx,
|
||||
int offset, int lastlines,
|
||||
long lastmod, int maxlines)
|
||||
throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
|
||||
AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
|
||||
|
@ -3440,9 +3460,27 @@ public class RundeckClient implements Serializable {
|
|||
* @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
|
||||
* @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
|
||||
* @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
|
||||
* @deprecated renamed for clarity use {@link #getExecutionOutput(Long, int, long, int)}
|
||||
*/
|
||||
public RundeckOutput getJobExecutionOutput(Long executionId, int offset, long lastmod, int maxlines)
|
||||
throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
|
||||
return getExecutionOutput(executionId, offset, lastmod, maxlines);
|
||||
}
|
||||
/**
|
||||
* Get the execution output of the given job
|
||||
*
|
||||
* @param executionId identifier of the execution - mandatory
|
||||
* @param offset byte offset to read from in the file. 0 indicates the beginning.
|
||||
* @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset
|
||||
* @param maxlines maximum number of lines to retrieve forward from the specified offset.
|
||||
* @return {@link RundeckOutput}
|
||||
* @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
|
||||
* @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
|
||||
* @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
|
||||
* @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
|
||||
*/
|
||||
public RundeckOutput getExecutionOutput(Long executionId, int offset, long lastmod, int maxlines)
|
||||
throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
|
||||
AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
|
||||
ApiPathBuilder param = new ApiPathBuilder("/execution/", executionId.toString(), "/output")
|
||||
.param("offset", offset);
|
||||
|
@ -3468,7 +3506,8 @@ public class RundeckClient implements Serializable {
|
|||
* @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
|
||||
* @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
|
||||
*/
|
||||
public RundeckOutput getJobExecutionOutputState(Long executionId, boolean stateOnly, int offset, long lastmod, int maxlines)
|
||||
public RundeckOutput getExecutionOutputState(Long executionId, boolean stateOnly, int offset, long lastmod,
|
||||
int maxlines)
|
||||
throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
|
||||
AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
|
||||
ApiPathBuilder param = new ApiPathBuilder("/execution/", executionId.toString(), "/output/state")
|
||||
|
|
|
@ -1066,7 +1066,7 @@ public class RundeckClientTest {
|
|||
@Betamax(tape = "execution_output_fornode", mode = TapeMode.READ_ONLY)
|
||||
public void executionOutputForNode() throws Exception {
|
||||
final RundeckClient client = createClient(TEST_TOKEN_6, 10);
|
||||
RundeckOutput output = client.getJobExecutionOutputForNode(146L,"node-14.qa.subgroup.mycompany.com",0,-1,0L,-1);
|
||||
RundeckOutput output = client.getExecutionOutputForNode(146L, "node-14.qa.subgroup.mycompany.com", 0, -1, 0L, -1);
|
||||
|
||||
Assert.assertEquals(new Long(1602), output.getExecDuration());
|
||||
Assert.assertEquals(new Long(146), output.getExecutionId());
|
||||
|
@ -1091,7 +1091,7 @@ public class RundeckClientTest {
|
|||
@Betamax(tape = "execution_output_forstep", mode = TapeMode.READ_ONLY)
|
||||
public void executionOutputForStep() throws Exception {
|
||||
final RundeckClient client = createClient(TEST_TOKEN_6, 10);
|
||||
RundeckOutput output = client.getJobExecutionOutputForStep(146L,"1",0,-1,0L,-1);
|
||||
RundeckOutput output = client.getExecutionOutputForStep(146L, "1", 0, -1, 0L, -1);
|
||||
|
||||
Assert.assertEquals(new Long(1602), output.getExecDuration());
|
||||
Assert.assertEquals(new Long(146), output.getExecutionId());
|
||||
|
@ -1117,7 +1117,8 @@ public class RundeckClientTest {
|
|||
@Betamax(tape = "execution_output_fornodeandstep", mode = TapeMode.READ_ONLY)
|
||||
public void executionOutputForNodeAndStep() throws Exception {
|
||||
final RundeckClient client = createClient(TEST_TOKEN_6, 10);
|
||||
RundeckOutput output = client.getJobExecutionOutputForNodeAndStep(146L,"node-14.qa.subgroup.mycompany.com","1",0,-1,0L,-1);
|
||||
RundeckOutput output = client.getExecutionOutputForNodeAndStep(146L, "node-14.qa.subgroup.mycompany.com",
|
||||
"1", 0, -1, 0L, -1);
|
||||
|
||||
Assert.assertEquals(new Long(1602), output.getExecDuration());
|
||||
Assert.assertEquals(new Long(146), output.getExecutionId());
|
||||
|
@ -1143,7 +1144,7 @@ public class RundeckClientTest {
|
|||
@Betamax(tape = "execution_output_state", mode = TapeMode.READ_ONLY)
|
||||
public void executionOutputState() throws Exception {
|
||||
final RundeckClient client = createClient(TEST_TOKEN_6, 10);
|
||||
RundeckOutput output = client.getJobExecutionOutputState(146L,false,0,0L,-1);
|
||||
RundeckOutput output = client.getExecutionOutputState(146L, false, 0, 0L, -1);
|
||||
|
||||
Assert.assertEquals(new Long(1602), output.getExecDuration());
|
||||
Assert.assertEquals(new Long(146), output.getExecutionId());
|
||||
|
@ -1168,7 +1169,7 @@ public class RundeckClientTest {
|
|||
@Betamax(tape = "execution_output_state_only", mode = TapeMode.READ_ONLY)
|
||||
public void executionOutputStateOnly() throws Exception {
|
||||
final RundeckClient client = createClient(TEST_TOKEN_6, 10);
|
||||
RundeckOutput output = client.getJobExecutionOutputState(146L,true,0,0L,-1);
|
||||
RundeckOutput output = client.getExecutionOutputState(146L, true, 0, 0L, -1);
|
||||
|
||||
Assert.assertEquals(new Long(1602), output.getExecDuration());
|
||||
Assert.assertEquals(new Long(146), output.getExecutionId());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue