本文整理汇总了Java中de.timroes.axmlrpc.XMLRPCException.getClass方法的典型用法代码示例。如果您正苦于以下问题:Java XMLRPCException.getClass方法的具体用法?Java XMLRPCException.getClass怎么用?Java XMLRPCException.getClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.timroes.axmlrpc.XMLRPCException
的用法示例。
在下文中一共展示了XMLRPCException.getClass方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTickets
import de.timroes.axmlrpc.XMLRPCException; //导入方法依赖的package包/类
public List<Ticket> getTickets(String strFilter) throws RemoteCallException
{
try {
strFilter = "max=0&" + strFilter;
Object[] result = (Object[]) m_client.call("ticket.query", strFilter);
List<Object> ticketIds = new ArrayList<Object>();
ticketIds.addAll(Arrays.asList(result));
List<Ticket> tickets = new ArrayList<Ticket>();
for (Object id : ticketIds)
{
result = (Object[]) m_client.call("ticket.get", id);
int iID = (Integer) result[0];
HashMap<String, Object> attributes = (HashMap<String, Object>) result[3];
List<TicketAction> actions = this.getTicketActions((Integer) id);
tickets.add(new Ticket(iID, attributes, actions));
}
return tickets;
} catch (XMLRPCException ex) {
throw new RemoteCallException(ex.getClass(), "ticket.query", ex.getMessage());
}
}
示例2: getComponents
import de.timroes.axmlrpc.XMLRPCException; //导入方法依赖的package包/类
public List<String> getComponents() throws RemoteCallException
{
try {
Object[] result = (Object[]) m_client.call("ticket.component.getAll");
List<Object> res = new ArrayList<Object>();
res.addAll(Arrays.asList(result));
List<String> strComponents = new ArrayList<String>();
for (Object objEntry : res)
{
strComponents.add(objEntry.toString());
}
return strComponents;
} catch (XMLRPCException ex) {
throw new RemoteCallException(ex.getClass(), "ticket.component.getAll", ex.getMessage());
}
}
示例3: getMilestones
import de.timroes.axmlrpc.XMLRPCException; //导入方法依赖的package包/类
public List<String> getMilestones() throws RemoteCallException
{
try {
Object[] result = (Object[]) m_client.call("ticket.milestone.getAll");
List<Object> res = new ArrayList<Object>();
res.addAll(Arrays.asList(result));
List<String> strMilestones = new ArrayList<String>();
for (Object objEntry : res)
{
strMilestones.add(objEntry.toString());
}
return strMilestones;
} catch (XMLRPCException ex) {
throw new RemoteCallException(ex.getClass(), "ticket.milestone.getAll", ex.getMessage());
}
}
示例4: getWikiPage
import de.timroes.axmlrpc.XMLRPCException; //导入方法依赖的package包/类
public String getWikiPage(String strName, int iVersion) throws RemoteCallException
{
try {
String strResult;
if (iVersion == -1)
{
strResult = (String) m_client.call("wiki.getPageHTML", strName);
}
else
{
strResult = (String) m_client.call("wiki.getPageHTML", strName, iVersion);
}
return strResult;
} catch (XMLRPCException ex) {
throw new RemoteCallException(ex.getClass(), "wiki.getPageHTML", ex.getMessage());
}
}
示例5: getAPIVersion
import de.timroes.axmlrpc.XMLRPCException; //导入方法依赖的package包/类
/**
* Gets the APIVersion
* @return Object Array with the API Versions
* @throws RemoteCallException
*/
public Object[] getAPIVersion() throws RemoteCallException
{
try {
Object[] result = (Object[]) m_client.call("system.getAPIVersion");
return result;
} catch (XMLRPCException ex) {
throw new RemoteCallException(ex.getClass(), "system.getAPIVersion()", ex.getMessage());
}
}
示例6: getTicket
import de.timroes.axmlrpc.XMLRPCException; //导入方法依赖的package包/类
public Ticket getTicket(int iID) throws RemoteCallException
{
try {
Object[] result = (Object[]) m_client.call("ticket.get", iID);
iID = (Integer) result[0];
HashMap<String, Object> attributes = (HashMap<String, Object>) result[3];
List<TicketAction> actions = this.getTicketActions(iID);
return new Ticket(iID, attributes, actions);
} catch (XMLRPCException ex) {
throw new RemoteCallException(ex.getClass(), "ticket.get", ex.getMessage());
}
}
示例7: getTicketHistory
import de.timroes.axmlrpc.XMLRPCException; //导入方法依赖的package包/类
public List<TicketChange> getTicketHistory(int iID) throws RemoteCallException
{
try {
Object[] result = (Object[]) m_client.call("ticket.changeLog", iID);
List<Object> res = new ArrayList<Object>();
res.addAll(Arrays.asList(result));
List<TicketChange> changes = new ArrayList<TicketChange>();
for (Object objAttribute : res)
{
Object[] attributes = (Object[]) objAttribute;
SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
Date dtTime = (Date) attributes[0];
String strAuthor = (String) attributes[1];
String strField = (String) attributes[2];
String strOldValue = "";
String strNewValue = "";
if (attributes.length > 3)
strOldValue = (String) attributes[3];
if (attributes.length > 4)
strNewValue = (String) attributes[4];
changes.add(new TicketChange(dtTime, strAuthor, strField, strOldValue, strNewValue));
}
return changes;
} catch (XMLRPCException ex) {
throw new RemoteCallException(ex.getClass(), "ticket.changeLog", ex.getMessage());
}
}
示例8: getTicketActions
import de.timroes.axmlrpc.XMLRPCException; //导入方法依赖的package包/类
private List<TicketAction> getTicketActions(int iID) throws RemoteCallException
{
try
{
List<TicketAction> actions = new ArrayList<TicketAction>();
Object[] result = (Object[]) m_client.call("ticket.getActions", iID);
for (Object action : result)
{
Object[] arrAction = (Object[]) action;
String strAction = (String) arrAction[0];
String strLabel = (String) arrAction[1];
String strHint = (String) arrAction[2];
List<TicketInputField> inputFields = new ArrayList<TicketInputField>();
Object[] objInputFields = (Object[]) arrAction[3];
for (Object inputField : objInputFields)
{
Object[] arrInputField = (Object[]) inputField;
String strName = (String) arrInputField[0];
String strValue = (String) arrInputField[1];
List<String> options = new ArrayList<String>();
Object[] objValues = (Object[]) arrInputField[2];
for (Object value : objValues)
{
options.add((String) value);
}
inputFields.add(new TicketInputField(strName, strValue, options));
}
actions.add(new TicketAction(strAction, strLabel, strHint, inputFields));
}
return actions;
} catch (XMLRPCException ex) {
throw new RemoteCallException(ex.getClass(), "ticket.getActions", ex.getMessage());
}
}
示例9: getTicketFields
import de.timroes.axmlrpc.XMLRPCException; //导入方法依赖的package包/类
public List<TicketAttribute> getTicketFields() throws RemoteCallException
{
try {
Object[] result = (Object[]) m_client.call("ticket.getTicketFields");
List<Object> res = new ArrayList<Object>();
res.addAll(Arrays.asList(result));
List<TicketAttribute> attributes = new ArrayList<TicketAttribute>();
for (Object objAttribute : res)
{
HashMap<String, Object> attribute = (HashMap<String, Object>) objAttribute;
String strName = "";
String strLabel = "";
String strType = "";
String strValue = "";
Object[] options = null;
boolean bOptional = false;
int iOrder = 0;
boolean bCustom = false;
String strFormat = "";
if (attribute.get("name") != null)
strName = (String) attribute.get("name");
if (attribute.get("label") != null)
strLabel = (String) attribute.get("label");
if (attribute.get("type") != null)
strType = (String) attribute.get("type");
if (attribute.get("value") != null)
strValue = (String) attribute.get("value");
if (attribute.get("options") != null)
options = (Object[]) attribute.get("options");
if (attribute.get("optional") != null)
bOptional = (Boolean) attribute.get("optional");
if (attribute.get("order") != null)
iOrder = (Integer) attribute.get("order");
if (attribute.get("custom") != null)
bCustom = (Boolean) attribute.get("custom");
if (attribute.get("format") != null)
strFormat = (String) attribute.get("format");
List<String> strOptions = new ArrayList<String>();
if (options != null)
{
for (Object option : options)
{
strOptions.add((String) option);
}
}
attributes.add(new TicketAttribute(strName, strLabel, strType, strValue, strOptions, bOptional, iOrder, bCustom, strFormat));
}
return attributes;
} catch (XMLRPCException ex) {
throw new RemoteCallException(ex.getClass(), "ticket.getTicketFields", ex.getMessage());
}
}