Package railo.commons.net.http.httpclient3.entity

Examples of railo.commons.net.http.httpclient3.entity._ByteArrayRequestEntity


            audit(request, entity, type, "INSTANCE_RESUME");
            validateParams(type, entity, startStr, endStr);
           
            Date start = EntityUtil.parseDateUTC(startStr);
            Date end = getEndDate(start, endStr);           
            Entity entityObject = EntityUtil.getEntity(type, entity);
           
            Properties props = getProperties(request);
            AbstractWorkflowEngine wfEngine = getWorkflowEngine();
            return wfEngine.resumeInstances(entityObject, start, end, props);
        } catch (Throwable e) {
View Full Code Here


            audit(request, entity, type, "INSTANCE_RERUN");
            validateParams(type, entity, startStr, endStr);
           
            Date start = EntityUtil.parseDateUTC(startStr);
            Date end = getEndDate(start, endStr);           
            Entity entityObject = EntityUtil.getEntity(type, entity);

            Properties props = getProperties(request);
            AbstractWorkflowEngine wfEngine = getWorkflowEngine();
            return wfEngine.reRunInstances(entityObject, start, end, props);
        } catch (Exception e) {
View Full Code Here

    private void validateParams(String type, String entity, String startStr, String endStr) throws IvoryException {
        validateNotEmpty("entityType", type);
        validateNotEmpty("entityName", entity);
        validateNotEmpty("start", startStr);

        Entity entityObject = EntityUtil.getEntity(type, entity);
        validateDateRange(entityObject, startStr, endStr);
    }
View Full Code Here

    }

    private Entity getEntity(HttpServletRequest request, String type) {
        try {
            request.getInputStream().reset();
            Entity entity = deserializeEntity(request, EntityType.valueOf(type.toUpperCase()));
            request.getInputStream().reset();
            return entity;
        } catch (Exception e) {
            throw IvoryWebException.newException(e, Response.Status.BAD_REQUEST);
        }
View Full Code Here

        "ACL.group", "ACL.owner", "ACL.permission"};
    private static final String[] PROCESS_FIELDS = new String[] { "retry.policy", "retry.delay", "retry.attempts",
        "lateProcess.policy", "lateProcess.delay", "lateProcess.lateInputs[\\d+].input", "lateProcess.lateInputs[\\d+].workflowPath"};
   
    public static boolean shouldUpdate(Entity oldEntity, Entity newEntity, String cluster) throws IvoryException {
        Entity oldView = EntityUtil.getClusterView(oldEntity, cluster);
        Entity newView = EntityUtil.getClusterView(newEntity, cluster);
        switch(oldEntity.getEntityType()) {
            case FEED:
                if(EntityUtil.equals(oldView, newView, FEED_FIELDS))
                    return false;
                return true;
View Full Code Here

  public void handleRerun(String cluster, String entityType,
      String entityName, String nominalTime, String runId, String wfId,
      long msgReceivedTime) {

    try {
      Entity entity = EntityUtil.getEntity(entityType, entityName);
      try {
        if (EntityUtil.getLateProcess(entity) == null
            || EntityUtil.getLateProcess(entity).getLateInputs() == null
            || EntityUtil.getLateProcess(entity).getLateInputs()
                .size() == 0) {
View Full Code Here

     * @return Entity - JAVA Object
     * @throws IvoryException
     */
    public Entity parseAndValidate(String xmlString) throws IvoryException {
        InputStream inputStream = new ByteArrayInputStream(xmlString.getBytes());
        Entity entity = parseAndValidate(inputStream);
        return entity;
    }
View Full Code Here

  @Override
  public void handleRerun(String cluster, String entityType,
      String entityName, String nominalTime, String runId, String wfId,
      long msgReceivedTime) {
    try {
      Entity entity = getEntity(entityType, entityName);
      Retry retry = getRetry(entity);

      if (retry == null) {
        LOG.warn("Retry not configured for entity:" + entityType + "("
            + entity.getName() + "), ignoring failed retries");
        return;
      }

      int attempts = retry.getAttempts();
      Frequency delay = retry.getDelay();
View Full Code Here

                    for (FileStatus file : files) {
                        String fileName = file.getPath().getName();
                        String encodedEntityName = fileName.substring(0, fileName.length() - 4); // drop
                                                                                                 // ".xml"
                        String entityName = URLDecoder.decode(encodedEntityName, UTF_8);
                        Entity entity = restore(type, entityName);
                        entityMap.put(entityName, entity);
                        onAdd(entity);
                    }
                }
            }
View Full Code Here

    private synchronized void updateInternal(EntityType type, Entity entity) throws IvoryException {
        try {
            if (get(type, entity.getName()) != null) {
                persist(type, entity);
                Entity oldEntity = dictionary.get(type).put(entity.getName(), entity);
                onChange(oldEntity, entity);
            } else {
                throw new IvoryException(entity.toShortString() + " doesn't exist");
            }
        } catch (IOException e) {
View Full Code Here

TOP

Related Classes of railo.commons.net.http.httpclient3.entity._ByteArrayRequestEntity

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.