Package net.sf.redmine_mylyn.api.exception

Examples of net.sf.redmine_mylyn.api.exception.RedmineApiErrorException


          response = new ByteArrayInputStream(output.toByteArray());
        } finally {
          output.close();
        }
      } catch (IOException e) {
        throw new RedmineApiErrorException(e.getMessage(), e);
      }
      return response;
    }
    return null;
  }
View Full Code Here


            return;
          }
        }
      }
    } catch (NumberFormatException e) {
      throw new RedmineApiErrorException(Messages.ERRMSG_QUERY_FIELD_INVALID_INTEGER_X_X, e, ""+values.get(0), queryField.getQueryValue()); //$NON-NLS-1$
    }
   
    if((queryField==QueryField.PROJECT || queryField==QueryField.STOREDQUERY) && values.size()==1 && operator==CompareOperator.IS) {
      parts.add(new NameValuePair(queryField.getQueryValue(), values.get(0)));
    } else {
View Full Code Here

      for (NameValuePair nvp : getParams()) {
        builder.append("&").append(nvp.getName()); //$NON-NLS-1$
        builder.append("=").append(URLEncoder.encode(nvp.getValue(), encoding)); //$NON-NLS-1$
      }
    } catch (UnsupportedEncodingException e) {
      throw new RedmineApiErrorException(Messages.ERRMSG_INVALID_ENCODING_X, e, encoding);
    }
   
    if(builder.length()>0) {
      builder.deleteCharAt(0);
      builder.insert(0, "?"); //$NON-NLS-1$
View Full Code Here

      }
     
      try {
        namedValue[1] = URLDecoder.decode(namedValue[1], encoding);
      } catch (UnsupportedEncodingException e) {
        throw new RedmineApiErrorException(Messages.ERRMSG_INVALID_ENCODING_X, e, encoding);
      }
     
      nvp.add(new NameValuePair(namedValue[0], namedValue[1]));
    }
   
View Full Code Here

        byte[] buffer = new byte[44];
        if(input.read(buffer)>0) {
          return new String(buffer);
        }
      } catch (IOException e) {
        throw new RedmineApiErrorException(e.getMessage(), e);
      }
    }
    return null;
  }
View Full Code Here

        if (field.getType().equals(container.getClass())) {
          field.set(this, container);
        }
      }
    } catch (Exception e) {
      throw new RedmineApiErrorException(Messages.ERRMSG_UPDATING_ATTRIBUTES_FAILED, e);
    }
  }
View Full Code Here

        if ((field.getModifiers()&Modifier.STATIC)!=Modifier.STATIC) {
          field.set(this, field.get(conf));
        }
      }
    } catch (Exception e) {
      throw new RedmineApiErrorException(Messages.ERRMSG_UPDATING_ATTRIBUTES_FAILED, e);
    }
  }
View Full Code Here

        Marshaller m = ctx.createMarshaller();
        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE );
        m.marshal(this, out);
      } catch(JAXBException e) {
        ILogService log = RedmineApiPlugin.getLogService(JaxbParser.class);
        RedmineApiErrorException exc = new RedmineApiErrorException(Messages.ERRMSG_CONFIGURATION_SERIALIZATION_FAILED, e);
        log.error(e, exc.getMessage());
        throw exc;
      }
    }
  }
View Full Code Here

      SAXSource source = new SAXSource(filter, new InputSource(stream));

      return parseInputStream(source);
     
    } catch (ParserConfigurationException e) {
      RedmineApiErrorException exc = new RedmineApiErrorException(Messages.ERRMSG_INPUTSTREAM_PARSING_FAILED_CONFIG_ERROR_X, e.getMessage(), e);
      log.error(e, exc.getMessage());
      throw exc;
    } catch (SAXException e) {
      RedmineApiErrorException exc = new RedmineApiErrorException(Messages.ERRMSG_INPUTSTREAM_PARSING_FAILED_X, e.getMessage(), e);
      log.error(e, exc.getMessage());
      throw exc;
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.redmine_mylyn.api.exception.RedmineApiErrorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.