com.sun.enterprise.config.serverbeans.Application.getProperty()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中com.sun.enterprise.config.serverbeans.Application.getProperty()方法的一些代码示例,展示了Application.getProperty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.getProperty()方法的具体详情如下:
包路径:com.sun.enterprise.config.serverbeans.Application
类名称:Application
方法名:getProperty

Application.getProperty介绍

[英]Properties as per PropertyBag
[中]符合PropertyBag的属性

代码示例

代码示例来源:origin: org.glassfish.main.admin/config-api

private static File fileForProp(final Application instance,
    final String propName) {
  for (Property p : instance.getProperty()) {
    if (p.getName().equals(propName)) {
      return new File(URI.create(p.getValue()));
    }
  }
  return null;
}

代码示例来源:origin: org.glassfish.admin/config-api

private static File fileForProp(final Application instance,
      final String propName) {
    for (Property p : instance.getProperty()) {
      if (p.getName().equals(propName)) {
        return new File(URI.create(p.getValue()));
      }
    }
    return null;
  }
}

代码示例来源:origin: org.glassfish.main.admin/config-api

public static String archiveType(final Application instance) {
  for (Property p : instance.getProperty()) {
    if (p.getName().equals(ARCHIVE_TYPE_PROP_NAME)) {
      return p.getValue();
    }
  }
  return null;
}

代码示例来源:origin: org.glassfish.main.core/kernel

private void setRestAppAttributes(Application app, Properties appProps)
  throws PropertyVetoException, TransactionFailure {
  // context-root element
  if (appProps.getProperty(ServerTags.CONTEXT_ROOT) != null) {
    app.setContextRoot(appProps.getProperty(
      ServerTags.CONTEXT_ROOT));
  }
  // property element
  // trim the properties that have been written as attributes
  // the rest properties will be written as property element
  for (Iterator itr = appProps.keySet().iterator();
    itr.hasNext();) {
    String propName = (String) itr.next();
    if (!propName.equals(ServerTags.LOCATION) &&
      !propName.equals(ServerTags.CONTEXT_ROOT) &&
      !propName.equals(ServerTags.OBJECT_TYPE) &&
      !propName.equals(ServerTags.DIRECTORY_DEPLOYED) &&
      !propName.startsWith(
        DeploymentProperties.APP_CONFIG))
        {
      if (appProps.getProperty(propName) != null) {
        Property prop = app.createChild(Property.class);
        app.getProperty().add(prop);
        prop.setName(propName);
        prop.setValue(appProps.getProperty(propName));
      }
    }
  }
}

代码示例来源:origin: fujitsu/launcher

private void setRestAppAttributes(Application app, Properties appProps)
  throws PropertyVetoException, TransactionFailure {
  // context-root element
  if (appProps.getProperty(ServerTags.CONTEXT_ROOT) != null) {
    app.setContextRoot(appProps.getProperty(
      ServerTags.CONTEXT_ROOT));
  }
  // property element
  // trim the properties that have been written as attributes
  // the rest properties will be written as property element
  for (Iterator itr = appProps.keySet().iterator();
    itr.hasNext();) {
    String propName = (String) itr.next();
    if (!propName.equals(ServerTags.LOCATION) &&
      !propName.equals(ServerTags.CONTEXT_ROOT) &&
      !propName.equals(ServerTags.OBJECT_TYPE) &&
      !propName.equals(ServerTags.DIRECTORY_DEPLOYED) &&
      !propName.startsWith(
        DeploymentProperties.APP_CONFIG))
        {
      if (appProps.getProperty(propName) != null) {
        Property prop = app.createChild(Property.class);
        app.getProperty().add(prop);
        prop.setName(propName);
        prop.setValue(appProps.getProperty(propName));
      }
    }
  }
}

代码示例来源:origin: org.glassfish.admin/config-api

public static Properties getDeployProperties(Application instance) {
  Properties deploymentProps = new Properties();
  for (Property prop : instance.getProperty()) {
    deploymentProps.put(prop.getName(), prop.getValue());
  }
  deploymentProps.setProperty(ServerTags.OBJECT_TYPE,
    instance.getObjectType());
  if (instance.getContextRoot() != null) {
    deploymentProps.setProperty(ServerTags.CONTEXT_ROOT,
      instance.getContextRoot());
  }
  if (instance.getDirectoryDeployed() != null) {
    deploymentProps.setProperty(ServerTags.DIRECTORY_DEPLOYED,
      instance.getDirectoryDeployed());
  }
  return deploymentProps;            
}

代码示例来源:origin: org.glassfish.main.admin/config-api

public static Properties getDeployProperties(Application instance) {
  Properties deploymentProps = new Properties();
  for (Property prop : instance.getProperty()) {
    if (prop.getValue() != null) {
      deploymentProps.put(prop.getName(), prop.getValue());
    }
  }
  if (instance.getObjectType() != null) {
    deploymentProps.setProperty(ServerTags.OBJECT_TYPE,
      instance.getObjectType());
  }
  if (instance.getContextRoot() != null) {
    deploymentProps.setProperty(ServerTags.CONTEXT_ROOT,
        instance.getContextRoot());
  }
  if (instance.getDirectoryDeployed() != null) {
    deploymentProps.setProperty(ServerTags.DIRECTORY_DEPLOYED,
        instance.getDirectoryDeployed());
  }
  return deploymentProps;
}

代码示例来源:origin: org.glassfish.main.admin/config-api

for (Property prop : app.getProperty()) {
  if (prop.getName().equals(ARCHIVE_TYPE_PROP_NAME)) {
    deploymentParams.type = prop.getValue();

代码示例来源:origin: org.glassfish.admin/config-api

System.out.println("Checking app " + app.getName());
Application app_w = null;
Property oldSetting = app.getProperty(V3_0_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME);
if (oldSetting != null) {
  logger.log(Level.INFO, "For application {0} converting property {1} to {2}",
  addProperty(GF3_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME,
      oldSetting.getValue(), app_w);
  app_w.getProperty().remove(oldSetting);

代码示例来源:origin: org.glassfish.main.admin/admin-core

System.out.println("Checking app " + app.getName());
Application app_w = null;
Property oldSetting = app.getProperty(V3_0_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME);
if (oldSetting != null) {
  logger.log(Level.INFO, "For application {0} converting property {1} to {2}",
  addProperty(GF3_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME,
      oldSetting.getValue(), app_w);
  app_w.getProperty().remove(oldSetting);

代码示例来源:origin: org.glassfish.web/web-glue

/**
 * Configure the <code>WebModule</code< properties.
 */
protected void configureCatalinaProperties(){
  String propName = null;
  String propValue = null;
  if (bean != null) {
    List<Property> props = bean.getProperty();
    if (props != null) {
      for (Property prop : props) {
        propName = prop.getName();
        propValue = prop.getValue();
        configureCatalinaProperties(propName,propValue);
      }
    }
  }
  if (iasBean != null && iasBean.sizeWebProperty() > 0) {
    WebProperty[] wprops = iasBean.getWebProperty();
    for(WebProperty wprop : wprops) {
      propName = wprop.getAttributeValue("name");
      propValue = wprop.getAttributeValue("value");
      configureCatalinaProperties(propName, propValue);
    }
  }
}

代码示例来源:origin: org.glassfish.admin/config-api

prop.setName(property.getName());
  prop.setValue(property.getValue());
  app.getProperty().add(prop);
prop.setName(MODULE_TYPE);
prop.setValue(ServerTags.CONNECTOR_MODULE);
app.getProperty().add(prop);
  prop.setName(property.getName());
  prop.setValue(property.getValue());
  app.getProperty().add(prop);
prop.setName(MODULE_TYPE);
prop.setValue(ServerTags.EJB_MODULE);
app.getProperty().add(prop);
  prop.setName(property.getName());
  prop.setValue(property.getValue());
  app.getProperty().add(prop);
prop.setName(MODULE_TYPE);
prop.setValue(ServerTags.WEB_MODULE);
app.getProperty().add(prop);
  prop.setName(property.getName());
  prop.setValue(property.getValue());
  app.getProperty().add(prop);
prop.setValue(

相关文章

微信公众号

最新文章

更多