Examples of IvoryException


Examples of org.apache.ivory.IvoryException

                    Response.Status.BAD_REQUEST.getStatusCode()) {
                LOG.error("Request failed: " + response.getClientResponseStatus().getStatusCode());
                return (T) response.getEntity(method.getReturnType());
            } else {
                LOG.error("Request failed: " + response.getClientResponseStatus().getStatusCode());
                throw new IvoryException(response.getEntity(String.class));
            }
        } catch (Throwable e) {
            LOG.error("Request failed", e);
            throw new IvoryException(e);
        }
    }
View Full Code Here

Examples of org.apache.ivory.IvoryException

    private String pathValue(Method method, Object... args)
            throws IvoryException {

        Path pathParam = method.getAnnotation(Path.class);
        if (pathParam == null) {
            throw new IvoryException("No path param mentioned for " + method);
        }
        String pathValue = pathParam.value();

        Annotation[][] paramAnnotations = method.getParameterAnnotations();
        StringBuilder queryString = new StringBuilder("?");
View Full Code Here

Examples of org.apache.ivory.IvoryException

        try {
            return String.valueOf(paramAnnotation.annotationType().
                    getMethod(annotationAttribute).invoke(paramAnnotation));
        } catch (Exception e) {
            throw new IvoryException("Unable to get attribute value for " +
                    paramAnnotation + "[" + annotationAttribute + "]");
        }
    }
View Full Code Here

Examples of org.apache.ivory.IvoryException

                try {
                    APIResult resultHolder = doExecute(colo);
                    if (resultHolder instanceof InstancesResult) {
                        results.put(colo, (InstancesResult) resultHolder);
                    } else {
                        throw new IvoryException(resultHolder.getMessage());
                    }
                } catch (IvoryException e) {
                    results.put(colo, new InstancesResult(APIResult.Status.FAILED,
                            e.getClass().getName() + "::" + e.getMessage(),
                            new InstancesResult.Instance[0]));
View Full Code Here

Examples of org.apache.ivory.IvoryException

                if (methodKey.equals(itemKey)) {
                    methods.putIfAbsent(methodKey, item);
                    return item;
                }
            }
            throw new IvoryException("Lookup for " + methodKey +
                    " in service " + service.getName() + " found no match");
        }
        return method;
    }
View Full Code Here

Examples of org.apache.ivory.IvoryException

  public static <T extends Entity> T getEntity(String type, String entityName) throws IvoryException {
    EntityType entityType;
    try {
      entityType = EntityType.valueOf(type.toUpperCase());
    } catch (IllegalArgumentException e) {
      throw new IvoryException("Invalid entity type: " + type, e);
    }
    return getEntity(entityType, entityName);
  }
View Full Code Here

Examples of org.apache.ivory.IvoryException

    public static Date parseDateUTC(String dateStr) throws IvoryException {
        try {
            return SchemaHelper.parseDateUTC(dateStr);
        } catch (Exception e) {
            throw new IvoryException(e);
        }
    }
View Full Code Here

Examples of org.apache.ivory.IvoryException

                    for (Object key : map.keySet()) {
                        if (!key.equals("class"))
                            mapToProperties(map.get(key), name != null ? name + "." + key : (String)key, propMap, filterProps);
                    }
                } catch (Exception e1) {
                    throw new IvoryException(e1);
                }
            } catch(Exception e) {
                throw new IvoryException(e);
            }
        }
    }
View Full Code Here

Examples of org.apache.ivory.IvoryException

    public static String getStagingPath(Entity entity) throws IvoryException {
    try {
      return "ivory/workflows/" + entity.getEntityType().name().toLowerCase() + "/" + entity.getName() + "/"
      + md5(entity);
    } catch (Exception e) {
      throw new IvoryException(e);
    }
  }
View Full Code Here

Examples of org.apache.ivory.IvoryException

          throws IvoryException {
    try {
      return new Path(ClusterHelper.getLocation(cluster, "staging"),
          EntityUtil.getStagingPath(entity));
    } catch (Exception e) {
      throw new IvoryException(e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.