Examples of PropertyConfig


Examples of hermes.config.PropertyConfig

                buffer.append("<html><b>").append(hermes.getConnectionFactory().getClass().getName()).append("</b><br>");

                for (Iterator iter = hermesConfig.getProvider().getProperties().getProperty().iterator(); iter.hasNext();)
                {
                    PropertyConfig property = (PropertyConfig) iter.next();

                    buffer.append(property.getName()).append("=").append(property.getValue());

                    if (iter.hasNext())
                    {
                        buffer.append("<br>");
                    }
View Full Code Here

Examples of hermes.config.PropertyConfig

    SortedMap sortMap = new TreeMap();

    if (propertySet.getProperty() != null) {

      for (Iterator iter = propertySet.getProperty().iterator(); iter.hasNext();) {
        PropertyConfig property = (PropertyConfig) iter.next();

        if (!ignore.contains(property.getName())) {
          Object propertyValue = property.getValue();

          if (propertyValue == null) {
            propertyValue = "null";
          }

          sortMap.put(property.getName(), propertyValue);
        }
      }

      for (Iterator iter2 = sortMap.entrySet().iterator(); iter2.hasNext();) {
        Map.Entry entry = (Map.Entry) iter2.next();
View Full Code Here

Examples of hermes.config.PropertyConfig

      String key = (String) row.elementAt(0);
      String value = (String) row.elementAt(1);

      if (key != null && !key.equals("")) {
        PropertyConfig pConfig = HermesBrowser.getConfigDAO().getFactory().createPropertyConfig();

        pConfig.setName(key);
        pConfig.setValue(value);

        list.add(pConfig);
      } else {
        iter.remove();
      }
View Full Code Here

Examples of org.beangle.commons.property.PropertyConfig

@Test
public class UrlConfigProviderTest {

  public void testConfig() {
    PropertyConfig config = new PropertyConfigBean();
    UrlPropertyConfigProvider provider = new UrlPropertyConfigProvider();
    ConfigResource location = new ConfigResource();
    // META-INF/system.properties
    location.setGlobal(UrlPropertyConfigProvider.class.getResource("/system-default.properties"));
    location.setUser(UrlPropertyConfigProvider.class.getResource("/system.properties"));
    provider.setResource(location);
    Properties properties = provider.getConfig();
    config.set(properties);
    assertEquals(Integer.valueOf(1), config.get(Integer.class, "testInt"));
    assertEquals("beangle.org", config.get("system.vendor"));
    assertEquals("http://localhost", config.get("system.url"));
  }
View Full Code Here

Examples of org.beangle.webapp.system.model.PropertyConfig

      names.add(config.getName());
    }
    entityDao.saveOrUpdate(configs);

    String msg = "info.save.success";
    PropertyConfig newConfig = populate(PropertyConfig.class, "configNew");
    if (StringUtils.isNotBlank(newConfig.getName())
        && StringUtils.isNotBlank(newConfig.getValue())
        && !names.contains(newConfig.getName())) {
      entityDao.saveOrUpdate(newConfig);
    }
    configFactory.reload();
    configFactory.multicast();
    return redirect("index", msg);
View Full Code Here

Examples of org.beangle.webapp.system.model.PropertyConfig

    configFactory.multicast();
    return redirect("index", msg);
  }

  public String remove() {
    PropertyConfig config = entityDao.get(PropertyConfig.class, getLong("config.id"));
    if (null != config) entityDao.remove(config);
    return redirect("index", "info.save.success");
  }
View Full Code Here

Examples of org.dmlite.model.config.PropertyConfig

      if (entity.getConceptConfig() != null) {
        PropertiesConfig propertiesConfig = entity.getConceptConfig()
            .getPropertiesConfig();
        TextHandler textHandler = new TextHandler();
        for (IEntity config : propertiesConfig) {
          PropertyConfig propertyConfig = (PropertyConfig) config;
          String propertyCode = propertyConfig.getCode();
          if (propertyCode.equals("code")) {
            continue;
          }
          String cPropertyCode = textHandler
              .firstLetterToUpper(propertyCode);
View Full Code Here

Examples of org.dmlite.model.config.PropertyConfig

              .getNeighborDestinationConceptConfig();
          if (parentConceptConfig != null) {
            PropertiesConfig parentConceptPropertiesConfig = parentConceptConfig
                .getPropertiesConfig();
            for (IEntity parentPropertyConfigEntity : parentConceptPropertiesConfig) {
              PropertyConfig parentConceptPropertyConfig = (PropertyConfig) parentPropertyConfigEntity;
              if (parentConceptPropertyConfig.isEssential()) {
                IEntity parentEntity = entity
                    .getNeighborEntity(neighborConfig
                        .getCode());
                Panel parentPropertyPanel;
                if (parentEntity != null) {
                  parentModelContext.setEntity(parentEntity);
                  parentModelContext
                      .setPropertyConfig(parentConceptPropertyConfig);
                  parentViewContext.setWicketId("valuePanel");
                  parentViewContext.getMoreArgs().add(
                      "shortText", Boolean.TRUE);
                  if (parentConceptPropertyConfig
                      .getPropertyClass().equals(
                          "java.net.URL")
                      || parentConceptPropertyConfig
                          .getPropertyClass()
                          .equals(
                              "org.dmlite.type.email.Email")) {
                    parentPropertyPanel = new ExternalLinkPanel(
                        parentModelContext,
                        parentViewContext);
                  } else if (parentConceptPropertyConfig
                      .getPropertyClass().equals(
                          "java.lang.String")
                      && parentConceptPropertyConfig
                          .isValidateType()
                      && (parentConceptPropertyConfig
                          .getValidationType()
                          .equals("java.net.URL") || parentConceptPropertyConfig
                          .getValidationType()
                          .equals(
                              "org.dmlite.type.email.Email"))) {
                    parentPropertyPanel = new ExternalLinkPanel(
                        parentModelContext,
                        parentViewContext);
                  } else {
                    parentPropertyPanel = new LabelPanel(
                        parentModelContext,
                        parentViewContext);
                  } // if
                  if (!app.isNeighborDisplayAllowed(
                      getAppSession(), neighborConfig)) {
                    parentPropertyPanel.setVisible(false);
                  } else if (!app.isPropertyDisplayAllowed(
                      getAppSession(),
                      parentConceptPropertyConfig)) {
                    parentPropertyPanel.setVisible(false);
                  }
                } else {
                  parentPropertyPanel = new Panel(
                      "valuePanel");
                  parentPropertyPanel.setVisible(false);
                }
                propertyValuePanels.add(parentPropertyPanel);
              } // if
            } // for
          } // if
        } // if
      } // for

      PropertiesConfig propertiesConfig = conceptConfig
          .getPropertiesConfig();
      for (IEntity propertyConfigEntity : propertiesConfig) {
        PropertyConfig propertyConfig = (PropertyConfig) propertyConfigEntity;
        if (propertyConfig.isEssential()) {
          entityModelContext.setPropertyConfig(propertyConfig);
          ViewContext propertiesViewContext = new ViewContext(
              viewContext);
          propertiesViewContext.setWicketId("valuePanel");
          propertiesViewContext.getMoreArgs().add("shortText",
              Boolean.TRUE);
          Panel essentialPropertyPanel;
          if (propertyConfig.getPropertyClass()
              .equals("java.net.URL")
              || propertyConfig.getPropertyClass().equals(
                  "org.dmlite.type.email.Email")) {
            essentialPropertyPanel = new ExternalLinkPanel(
                entityModelContext, propertiesViewContext);
          } else if (propertyConfig.getPropertyClass().equals(
              "java.lang.String")
              && propertyConfig.isValidateType()
              && (propertyConfig.getValidationType().equals(
                  "java.net.URL") || propertyConfig
                  .getValidationType().equals(
                      "org.dmlite.type.email.Email"))) {
            essentialPropertyPanel = new ExternalLinkPanel(
                entityModelContext, propertiesViewContext);
          } else {
View Full Code Here

Examples of org.dmlite.model.config.PropertyConfig

          linkViewContext);
      item.add(linkListPanel);

      ModelContext projectModelContext = new ModelContext(modelContext);
      projectModelContext.setEntity(project);
      PropertyConfig applicationPropertyConfig = project
          .getConceptConfig().getPropertyConfig("application");
      projectModelContext.setPropertyConfig(applicationPropertyConfig);
      ViewContext projectViewContext = new ViewContext(viewContext);
      projectViewContext.setWicketId("appLinkPanel");
      String webApplication = getLocalizer().getString("webApplication", this);
View Full Code Here

Examples of org.dmlite.model.config.PropertyConfig

      entityContext.setEntity(entity);

      PropertiesConfig propertiesConfig = conceptConfig
          .getPropertiesConfig();
      for (IEntity propertyConfigEntity : propertiesConfig) {
        PropertyConfig propertyConfig = (PropertyConfig) propertyConfigEntity;
        if (propertyConfig.isEssential()) {
          String propertyKey = conceptConfig.getCode() + "."
              + propertyConfig.getCode();
          String propertyName = getLocalizer().getString(propertyKey,
              this);
          PropertyNameLabelValuePanelPair propertyNameLabelValuePanelPair = new PropertyNameLabelValuePanelPair();
          Label propertyNameLabel = new Label("propertyName",
              propertyName);
          propertyNameLabelValuePanelPair
              .setPropertyNameLabel(propertyNameLabel);

          entityContext.setPropertyConfig(propertyConfig);
          ViewContext propertiesViewContext = new ViewContext(
              viewContext);
          propertiesViewContext.setWicketId("valuePanel");
          Panel essentialPropertyPanel;
          if (propertyConfig.getPropertyClass()
              .equals("java.net.URL")
              || propertyConfig.getPropertyClass().equals(
                  "org.dmlite.type.email.Email")) {
            essentialPropertyPanel = new ExternalLinkPanel(
                entityContext, propertiesViewContext);
          } else if (propertyConfig.getPropertyClass().equals(
              "java.lang.String")
              && propertyConfig.isValidateType()
              && (propertyConfig.getValidationType().equals(
                  "java.net.URL") || propertyConfig
                  .getValidationType().equals(
                      "org.dmlite.type.email.Email"))) {
            essentialPropertyPanel = new ExternalLinkPanel(
                entityContext, propertiesViewContext);
          } else if (propertyConfig.getPropertyClass().equals(
              "java.lang.Boolean")) {
            essentialPropertyPanel = new CheckBoxPanel(
                entityContext, propertiesViewContext);
          } else if (propertyConfig.getPropertyClass().equals(
              "java.lang.String")
              && propertyConfig.getDisplayLengthInt() > App.MIN_LONG_TEXT_LENGTH) {
            essentialPropertyPanel = new MultiLineLabelPanel(
                entityContext, propertiesViewContext);
          } else {
            essentialPropertyPanel = new LabelPanel(entityContext,
                propertiesViewContext);
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.