Package com.emc.esu.api

Examples of com.emc.esu.api.EsuException


        String code = d.getRootElement().getChildText("Code");
        String message = d.getRootElement().getChildText("Message");

        if (code == null && message == null) {
            // not an error from ESU
            throw new EsuException(msg, httpCode);
        }

        l4j.debug("Error: " + code + " message: " + message);
        throw new EsuException(message, httpCode, Integer.parseInt(code));
  }
View Full Code Here


    public AbstractEsuRestApi(String host, int port, String uid,
            String sharedSecret) {
        try {
            this.secret = Base64.decodeBase64( sharedSecret.getBytes( "UTF-8" ) );
        } catch (UnsupportedEncodingException e) {
            throw new EsuException( "Could not decode shared secret", e );
        }
        this.host = host;
        this.uid = uid;
        this.port = port;
View Full Code Here

                l4j.debug( "URL: " + u );
           
            return u;
        } catch (UnsupportedEncodingException e) {
            throw new EsuException( "Unsupported encoding", e );
        } catch (InvalidKeyException e) {
            throw new EsuException( "Invalid secret key", e );
        } catch (NoSuchAlgorithmException e) {
            throw new EsuException( "Missing signature algorithm", e );
        } catch (IllegalStateException e) {
            throw new EsuException( "Error signing request", e );
        } catch (MalformedURLException e) {
            throw new EsuException( "Invalid URL format", e );
        } catch (URISyntaxException e) {
            throw new EsuException( "Invalid URL", e );
        }
    }
View Full Code Here

                    l4j.debug( o + " is not an Element!" );
                }
            }
           
        } catch (JDOMException e) {
            throw new EsuException( "Error parsing response", e );
        } catch (IOException e) {
            throw new EsuException( "Error reading response", e );
        }

        return objs;
    }
View Full Code Here

                    l4j.debug( o + " is not an Element!" );
                }
            }
           
        } catch (JDOMException e) {
            throw new EsuException( "Error parsing response", e );
        } catch (IOException e) {
            throw new EsuException( "Error reading response", e );
        }

        return objs;
    }
View Full Code Here

                    String sitime = e.getChildText("itime", esuNs);
                    Date itime = null;
                    try {
            itime = itimeParser.parse(sitime);
          } catch (ParseException e1) {
            throw new EsuException("Could not parse itime: " + sitime, e1);
          }
                   
                    objs.add(new Version(id, versionNumber, itime));
                } else {
                    l4j.debug( o + " is not an Element!" );
                }
            }
           
        } catch (JDOMException e) {
            throw new EsuException( "Error parsing response", e );
        } catch (IOException e) {
            throw new EsuException( "Error reading response", e );
        }

        return objs;
    }
View Full Code Here

                    l4j.debug( o + " is not an Element!" );
                }
            }
           
        } catch (JDOMException e) {
            throw new EsuException( "Error parsing response", e );
        } catch (IOException e) {
            throw new EsuException( "Error reading response", e );
        }

        return objs;
    }
View Full Code Here

                    l4j.debug(o + " is not an Element!");
                }
            }

        } catch (JDOMException e) {
            throw new EsuException("Error parsing response", e);
        } catch (IOException e) {
            throw new EsuException("Error reading response", e);
        }

        return objs;
    }
View Full Code Here

        if (m.find()) {
            String vid = m.group(1);
            l4j.debug("vId: " + vid);
            return new ObjectId(vid);
        } else {
            throw new EsuException("Could not find ObjectId in " + location);
        }
    }
View Full Code Here

              }
            }
           
            return si;
        } catch (JDOMException e) {
            throw new EsuException( "Error parsing response", e );
        } catch (IOException e) {
            throw new EsuException( "Error reading response", e );
        }
    }
View Full Code Here

TOP

Related Classes of com.emc.esu.api.EsuException

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.