/******************************************************************************* * Copyright (c) Feb 13, 2012 Zend Technologies Ltd. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.zend.webapi.internal.core.connection.request; import java.util.Date; import org.restlet.data.Method; import org.zend.webapi.core.connection.data.IResponseData.ResponseType; import org.zend.webapi.core.connection.data.values.ServerType; import org.zend.webapi.core.connection.data.values.WebApiVersion; import org.zend.webapi.core.connection.response.ResponseCode; /** * Retrieve an issue's details according to the issueId passed as a parameter. * Additional information about event groups is also displayed The response is a * list of issue elements with their general details and event-groups * identifiers. * * * Request Parameters: * <table border="1"> * <tr> * <th>Parameter</th> * <th>Type</th> * <th>Required</th> * <th>Description</th> * </tr> * <tr> * <td>issueId</td> * <td>String</td> * <td>Yes</td> * <td>The predefined filter's id. Can be the filter's �name� or the actual * identifier randomly created by the system. This parameter is case-sensitive.</td> * </tr> * </table> * * @author Wojciech Galanciak, 2012 * */ public class MonitorGetIssueDetailsRequest extends AbstractRequest { private static final ResponseCode[] RESPONSE_CODES = new ResponseCode[] { ResponseCode.OK }; public MonitorGetIssueDetailsRequest(WebApiVersion version, Date date, String keyName, String userAgent, String host, String secretKey, ServerType type) { super(version, date, keyName, userAgent, host, secretKey, type); } /* * (non-Javadoc) * * @see org.zend.webapi.core.connection.request.IRequest#getMethod() */ public Method getMethod() { return Method.GET; } /** * The predefined filter's id. Can be the filter's �name� or the actual * identifier randomly created by the system. This parameter is * case-sensitive. * * @param uid */ public void setIssueId(int issueId) { addParameter("issueId", issueId); } /** * Limits the number of eventsGroups returned with the issue details. * * @param limit */ public void setLimit(int limit) { addParameter("limit", limit); } /* * (non-Javadoc) * * @see org.zend.webapi.internal.core.connection.request.AbstractRequest# * getResponseCodeList() */ @Override protected ResponseCode[] getValidResponseCode() { return RESPONSE_CODES; } /* * (non-Javadoc) * * @see * org.zend.webapi.core.connection.request.IRequest#getExpectedResponseDataType * () */ public ResponseType getExpectedResponseDataType() { return ResponseType.ISSUE_DETAILS; } /* * (non-Javadoc) * * @see org.zend.webapi.internal.core.connection.request.AbstractRequest# * getMethodName() */ protected String getRequestName() { return "monitorGetIssueDetails"; } }