Esempio n. 1
0
 @Override
 public Object visiteWatchList(final NodeWatchlist node, final Object data) {
   final ObjConfiguration configuration = ((ObjManifestation) data).getConfiguration();
   final ObjConfig config = new ObjConfig(ConfigType.valueOf(node._name), node._title);
   config.setId(node._id);
   config.setTitre(node._title);
   for (int i = 0; i < node.getNumChild(); i++) {
     final ColTable colTable = (ColTable) node.getChild(i).accept(this, null);
     config.addColTable(colTable);
   }
   configuration.addConfig(config);
   return null;
 }
  /** Sets the value of the attribute */
  @Override
  public void setText(Object bean, QName name, String value) throws ConfigException {
    if ("#text".equals(name.getLocalName())) {
      if (value == null || value.trim().length() == 0) return;

      throw new ConfigException(
          L.l(
              "text is not allowed for bean {0}\n  '{1}'",
              bean.getClass().getName(), value.trim()));
    }

    try {
      _putMethod.invoke(bean, name.getLocalName(), _type.valueOf(value));
    } catch (Exception e) {
      throw ConfigException.create(_putMethod, e);
    }
  }