Package org.apache.oodt.cas.workflow.structs

Examples of org.apache.oodt.cas.workflow.structs.WorkflowConditionConfiguration


            throws RepositoryException {
        Connection conn = null;
        Statement statement = null;
        ResultSet rs = null;

        WorkflowConditionConfiguration config = null;

        try {
            conn = dataSource.getConnection();
            statement = conn.createStatement();

            String getConfigurationSql = "SELECT * from workflow_condition_configuration WHERE workflow_condition_id = "
                    + condId;

            LOG.log(Level.FINE, "getConfigurationByConfigurationId: Executing: "
                    + getConfigurationSql);
            rs = statement.executeQuery(getConfigurationSql);

            config = new WorkflowConditionConfiguration();
            while (rs.next()) {
                config.getProperties().put(rs.getString("property_name"),
                        rs.getString("property_value"));
            }

            if (config.getProperties().keySet().size() == 0) {
                config = null;
            }

        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here


        condition.setConditionName(conditionElement.getAttribute("name"));
       
        // load its configuration
        Element configElement = getFirstElement("configuration", conditionElement);
        if (configElement != null) {
            condition.setCondConfig(new WorkflowConditionConfiguration(getConfiguration(configElement)));
        }
       
        return condition;

    }
View Full Code Here

        .getAttribute("optional")));

    // load its configuration
    Element configElement = getFirstElement("configuration", conditionElement);
    if (configElement != null) {
      condition.setCondConfig(new WorkflowConditionConfiguration(
          getConfiguration(configElement)));
    }

    return condition;
View Full Code Here

   *          {@link WorkflowConditionConfiguration}.
   * @return A {@link WorkflowConditionConfiguration} from XML-RPC.
   */
  public static WorkflowConditionConfiguration getWorkflowConditionConfigurationFromXmlRpc(
      Hashtable conf) {
    WorkflowConditionConfiguration config = new WorkflowConditionConfiguration();
    for (String key : (Set<String>) (Set<?>) conf.keySet()) {
      config.addConfigProperty(key, (String) conf.get(key));
    }

    return config;
  }
View Full Code Here

      String condId) throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    WorkflowConditionConfiguration config = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getConfigurationSql = "SELECT * from workflow_condition_configuration WHERE workflow_condition_id = "
          + condId;

      LOG.log(Level.FINE, "getConfigurationByConfigurationId: Executing: "
          + getConfigurationSql);
      rs = statement.executeQuery(getConfigurationSql);

      config = new WorkflowConditionConfiguration();
      while (rs.next()) {
        config.getProperties().put(rs.getString("property_name"),
            rs.getString("property_value"));
      }

      if (config.getProperties().keySet().size() == 0) {
        config = null;
      }

    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

    return config;
  }

  private WorkflowConditionConfiguration convertToConditionConfiguration(
      Metadata met) {
    WorkflowConditionConfiguration config = new WorkflowConditionConfiguration();
    for (String key : met.getAllKeys()) {
      config.addConfigProperty(key, met.getMetadata(key));
    }
    return config;
  }
View Full Code Here

    this.wm = new WorkflowMgrConn(wmUrlStr);
    final WorkflowCondition cond = this.wm.safeGetConditionById(conditionId);
    add(new Label("condition_id", cond.getConditionId()));
    add(new Label("condition_name", cond.getConditionName()));
    add(new Label("condition_class", cond.getConditionInstanceClassName()));
    final WorkflowConditionConfiguration config = cond.getCondConfig() != null ?
        cond.getCondConfig():new WorkflowConditionConfiguration();
    List<String> condConfigKeyNames = Arrays.asList(config
        .getProperties().keySet().toArray(
            new String[config.getProperties().size()]));
    Collections.sort(condConfigKeyNames);
    add(new ListView<String>("cond_config", new ListModel<String>(
        condConfigKeyNames)) {
      /*
       * (non-Javadoc)
       *
       * @see
       * org.apache.wicket.markup.html.list.ListView#populateItem(org.apache
       * .wicket.markup.html.list.ListItem)
       */
      @Override
      protected void populateItem(ListItem<String> item) {
        String keyName = item.getModelObject();
        String keyVal = config.getProperty(keyName);
        item.add(new Label("cond_pname", keyName));
        item.add(new Label("cond_pvalue", keyVal));
      }
    });

View Full Code Here

    return config;
  }

  private WorkflowConditionConfiguration convertToConditionConfiguration(
      Metadata met) {
    WorkflowConditionConfiguration config = new WorkflowConditionConfiguration();
    for (String key : met.getAllKeys()) {
      config.addConfigProperty(key, met.getMetadata(key));
    }
    return config;
  }
View Full Code Here

   *          {@link WorkflowConditionConfiguration}.
   * @return A {@link WorkflowConditionConfiguration} from XML-RPC.
   */
  public static WorkflowConditionConfiguration getWorkflowConditionConfigurationFromXmlRpc(
      Hashtable conf) {
    WorkflowConditionConfiguration config = new WorkflowConditionConfiguration();
    for (String key : (Set<String>) (Set<?>) conf.keySet()) {
      config.addConfigProperty(key, (String) conf.get(key));
    }

    return config;
  }
View Full Code Here

      String condId) throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    WorkflowConditionConfiguration config = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getConfigurationSql = "SELECT * from workflow_condition_configuration WHERE workflow_condition_id = "
          + condId;

      LOG.log(Level.FINE, "getConfigurationByConfigurationId: Executing: "
          + getConfigurationSql);
      rs = statement.executeQuery(getConfigurationSql);

      config = new WorkflowConditionConfiguration();
      while (rs.next()) {
        config.getProperties().put(rs.getString("property_name"),
            rs.getString("property_value"));
      }

      if (config.getProperties().keySet().size() == 0) {
        config = null;
      }

    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.workflow.structs.WorkflowConditionConfiguration

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.