Tabnine Logo
SuperProperties.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.openejb.util.SuperProperties
constructor

Best Java code snippets using org.apache.openejb.util.SuperProperties.<init> (Showing top 20 results out of 315)

origin: org.apache.openejb/openejb-core

/**
 * Gets the value of the properties property.
 * <p/>
 * <p/>
 * This accessor method returns a reference to the live Properties Object,
 * not a snapshot. Therefore any modification you make to the
 * returned Properties will be present inside the JAXB object.
 * This is why there is not a <CODE>set</CODE> method for the properties property.
 * <p/>
 * <p/>
 * For example, to add a new value, do as follows:
 * <pre>
 *    getProperties().setProperty(key, value);
 * </pre>
 * <p/>
 * <p/>
 * <p/>
 */
public Properties getProperties() {
  if (properties == null) {
    properties = new SuperProperties();
  }
  return properties;
}
origin: org.apache.tomee/openejb-core

/**
 * Gets the value of the properties property.
 * <p/>
 * <p/>
 * This accessor method returns a reference to the live Properties Object,
 * not a snapshot. Therefore any modification you make to the
 * returned Properties will be present inside the JAXB object.
 * This is why there is not a <CODE>set</CODE> method for the properties property.
 * <p/>
 * <p/>
 * For example, to add a new value, do as follows:
 * <pre>
 *    getProperties().setProperty(key, value);
 * </pre>
 * <p/>
 * <p/>
 * <p/>
 */
public Properties getProperties() {
  if (properties == null) {
    properties = new SuperProperties();
  }
  return properties;
}
origin: org.apache.geronimo.ext.openejb/openejb-core

/**
 * Gets the value of the properties property.
 * <p/>
 * <p/>
 * This accessor method returns a reference to the live Properties Object,
 * not a snapshot. Therefore any modification you make to the
 * returned Properties will be present inside the JAXB object.
 * This is why there is not a <CODE>set</CODE> method for the properties property.
 * <p/>
 * <p/>
 * For example, to add a new value, do as follows:
 * <pre>
 *    getProperties().setProperty(key, value);
 * </pre>
 * <p/>
 * <p/>
 * <p/>
 */
public Properties getProperties() {
  if (properties == null) {
    properties = new SuperProperties();
  }
  return properties;
}
origin: org.apache.geronimo.ext.openejb/openejb-core

public Properties unmarshal(String s) throws Exception {
  Properties properties = new SuperProperties();
  ByteArrayInputStream in = new ByteArrayInputStream(s.getBytes());
  properties.load(in);
  return properties;
}
origin: org.apache.geronimo.ext.openejb/openejb-core

private ResourceInfo copy(ResourceInfo a) {
  ResourceInfo b = new ResourceInfo();
  b.id = a.id;
  b.service = a.service;
  b.className = a.className;
  b.codebase = a.codebase;
  b.displayName = a.displayName;
  b.description = a.description;
  b.factoryMethod = a.factoryMethod;
  b.constructorArgs.addAll(a.constructorArgs);
  b.types.addAll(a.types);
  b.properties = new SuperProperties();
  b.properties.putAll(a.properties);
  return b;
}
origin: org.apache.tomee/openejb-core

private ResourceInfo copy(final ResourceInfo a) {
  final ResourceInfo b = new ResourceInfo();
  b.id = a.id;
  b.service = a.service;
  b.className = a.className;
  b.codebase = a.codebase;
  b.displayName = a.displayName;
  b.description = a.description;
  b.factoryMethod = a.factoryMethod;
  b.constructorArgs.addAll(a.constructorArgs);
  b.originAppName = a.originAppName;
  b.types.addAll(a.types);
  b.properties = new SuperProperties();
  b.properties.putAll(a.properties);
  if (a.classpath != null) {
    b.classpath = new URI[a.classpath.length];
    System.arraycopy(a.classpath, 0, b.classpath, 0, a.classpath.length);
  }
  //b.aliases.addAll(a.aliases);
  return b;
}
origin: org.apache.openejb/openejb-core

private ResourceInfo copy(final ResourceInfo a) {
  final ResourceInfo b = new ResourceInfo();
  b.id = a.id;
  b.service = a.service;
  b.className = a.className;
  b.codebase = a.codebase;
  b.displayName = a.displayName;
  b.description = a.description;
  b.factoryMethod = a.factoryMethod;
  b.constructorArgs.addAll(a.constructorArgs);
  b.originAppName = a.originAppName;
  b.types.addAll(a.types);
  b.properties = new SuperProperties();
  b.properties.putAll(a.properties);
  if (a.classpath != null) {
    b.classpath = new URI[a.classpath.length];
    System.arraycopy(a.classpath, 0, b.classpath, 0, a.classpath.length);
  }
  //b.aliases.addAll(a.aliases);
  return b;
}
origin: org.apache.openejb/openejb-core

private static Properties holds(final Properties properties, final boolean cache) {
  // we can put null values in SuperProperties, since properties is often of this type we need to tolerate it
  final Properties updated = new SuperProperties();
  if (properties == null) {
    return updated;
  }
  for (final Map.Entry<Object, Object> entry : properties.entrySet()) {
    final Object rawValue = entry.getValue();
    if (rawValue instanceof String) {
      final String value = (String) rawValue;
      updated.put(entry.getKey(), cache ? value(value) : simpleValue(value));
    } else {
      updated.put(entry.getKey(), rawValue);
    }
  }
  return updated;
}
origin: org.apache.tomee/openejb-core

private static Properties holds(final Properties properties, final boolean cache) {
  // we can put null values in SuperProperties, since properties is often of this type we need to tolerate it
  final Properties updated = new SuperProperties();
  if (properties == null) {
    return updated;
  }
  for (final Map.Entry<Object, Object> entry : properties.entrySet()) {
    final Object rawValue = entry.getValue();
    if (rawValue instanceof String) {
      final String value = (String) rawValue;
      updated.put(entry.getKey(), cache ? value(value) : simpleValueAsStringOrCharArray(value));
    } else {
      updated.put(entry.getKey(), rawValue);
    }
  }
  return updated;
}
origin: org.apache.openejb/openejb-core

public Properties unmarshal(final String s) throws Exception {
  return IO.readProperties(IO.read(s), new SuperProperties());
}
origin: org.apache.tomee/openejb-core

public Properties unmarshal(final String s) throws Exception {
  return IO.readProperties(IO.read(s), new SuperProperties());
}
origin: org.apache.tomee/openejb-core

private static Properties asProperties(final String definition) throws IOException {
  final SuperProperties properties = new SuperProperties();
  properties.caseInsensitive(true);
  properties.putAll(IO.readProperties(IO.read(definition), new Properties()));
  return properties;
}
origin: org.apache.openejb/openejb-core

private static Properties asProperties(final String definition) throws IOException {
  final SuperProperties properties = new SuperProperties();
  properties.caseInsensitive(true);
  properties.putAll(IO.readProperties(IO.read(definition), new Properties()));
  return properties;
}
origin: org.apache.openejb/tomee-jdbc

@Override
public CommonDataSource pool(final String name, final String driver, final Properties properties) {
  final Properties converted = new Properties();
  converted.setProperty("name", name);
  final SuperProperties prop = new SuperProperties().caseInsensitive(true);
  prop.putAll(properties);
  updateProperties(prop, converted, driver);
  final PoolConfiguration config = build(PoolProperties.class, converted);
  final String xa = String.class.cast(properties.remove("XaDataSource"));
  if (xa != null) {
    final XADataSource xaDs = XADataSourceResource.proxy(Thread.currentThread().getContextClassLoader(), xa);
    final TomEEDataSource instance = new TomEEDataSource(config, name, xaDs);
    return build(TomEEDataSource.class, instance, converted);
  } else {
    final TomEEDataSource instance = new TomEEDataSource(config, name);
    return build(TomEEDataSource.class, instance, converted);
  }
}
origin: org.apache.geronimo.ext.openejb/openejb-core

private static void printSystemProperties() {
  try {
    SuperProperties p = new SuperProperties();
    p.setSpaceBetweenProperties(false);
    p.setKeyValueSeparator(" = ");
    copyOpenEjbProperties(System.getProperties(), p);
    copyOpenEjbProperties(SystemInstance.get().getProperties(), p);
    p.store(System.out, null);
    Properties p2 = System.getProperties();
    String[] misc = {"os.version", "os.name", "os.arch", "java.version", "java.vendor"};
    for (String prop : misc) {
      comment(prop + "=" + p2.get(prop));
    }
  } catch (IOException e) {
    e.printStackTrace(new PrintWriter(new CommentsFilter(System.out)));
  }
}
origin: org.apache.openejb/openejb-core

private static void printSystemProperties(final PrintStream out, final String cr) {
  try {
    final SuperProperties p = new SuperProperties();
    p.setSpaceBetweenProperties(false);
    p.setKeyValueSeparator(" = ");
    p.setLineSeparator(cr);
    copyOpenEjbProperties(System.getProperties(), p);
    copyOpenEjbProperties(SystemInstance.get().getProperties(), p);
    p.store(out, null);
    final Properties p2 = System.getProperties();
    final String[] misc = {"os.version", "os.name", "os.arch", "java.version", "java.vendor"};
    for (final String prop : misc) {
      comment(out, cr, prop + "=" + p2.get(prop));
    }
  } catch (final IOException e) {
    e.printStackTrace(new PrintWriter(new CommentsFilter(out)));
  }
}
origin: org.apache.openejb/tomee-jdbc

@Override
public DataSource pool(final String name, final DataSource ds, final Properties properties) {
  final Properties converted = new Properties();
  final SuperProperties prop = new SuperProperties().caseInsensitive(true);
  prop.putAll(properties);
  updateProperties(prop, converted, null);
  final PoolConfiguration config = build(PoolProperties.class, converted);
  config.setDataSource(ds);
  final ConnectionPool pool;
  try {
    pool = new ConnectionPool(config);
  } catch (final SQLException e) {
    throw new IllegalStateException(e);
  }
  return build(TomEEDataSource.class, new TomEEDataSource(config, pool, name), converted);
}
origin: com.tomitribe.tribestream/tribestream-metrics-core

@Override
public CommonDataSource pool(final String name, final String driver, final Properties properties) {
  if (!isMonitorDatabase()) {
    return super.pool(name, driver, properties);
  }
  final Properties converted = new Properties();
  converted.setProperty("name", name);
  final SuperProperties prop = new SuperProperties().caseInsensitive(true);
  prop.putAll(properties);
  convertProperties(driver, converted, prop);
  final PoolConfiguration config = build(PoolProperties.class, converted);
  if (config.getName() == null) {
    config.setName(name);
  }
  final TomEEDataSource ds = build(TribestreamDataSource.class, new TribestreamDataSource(config, name), converted);
  final String xa = String.class.cast(properties.remove("XaDataSource"));
  if (xa != null) {
    cleanProperty(ds, "xadatasource");
    final XADataSource xaDs = XADataSourceResource.proxy(Thread.currentThread().getContextClassLoader(), xa);
    ds.setDataSource(xaDs);
  }
  return ds;
}
origin: org.apache.tomee/openejb-core

private static void printSystemProperties(final PrintStream out, final String cr) {
  try {
    final SuperProperties p = new SuperProperties();
    p.setSpaceBetweenProperties(false);
    p.setKeyValueSeparator(" = ");
    p.setLineSeparator(cr);
    copyOpenEjbProperties(JavaSecurityManagers.getSystemProperties(), p);
    copyOpenEjbProperties(SystemInstance.get().getProperties(), p);
    p.store(out, null);
    final Properties p2 = JavaSecurityManagers.getSystemProperties();
    final String[] misc = {"os.version", "os.name", "os.arch", "java.version", "java.vendor"};
    for (final String prop : misc) {
      comment(out, cr, prop + "=" + p2.get(prop));
    }
  } catch (final IOException e) {
    e.printStackTrace(new PrintWriter(new CommentsFilter(out)));
  }
}
origin: com.tomitribe.tribestream/tribestream-metrics-core

@Override
public DataSource pool(final String name, final DataSource ds, final Properties properties) {
  if (!isMonitorDatabase()) {
    return super.pool(name, ds, properties);
  }
  final Properties converted = new Properties();
  final SuperProperties prop = new SuperProperties().caseInsensitive(true);
  prop.putAll(properties);
  convertProperties(null, converted, prop);
  final PoolConfiguration config = build(PoolProperties.class, converted);
  config.setDataSource(ds);
  final ConnectionPool pool;
  try {
    pool = new ConnectionPool(config);
  } catch (final SQLException e) {
    throw new IllegalStateException(e);
  }
  if (config.getName() == null) {
    config.setName(name);
  }
  return build(TribestreamDataSource.class, new TribestreamDataSource(config, pool, name), converted);
}
org.apache.openejb.utilSuperProperties<init>

Javadoc

Constructs a new Properties object.

Popular methods of SuperProperties

  • caseInsensitive
  • entrySet
    Returns an unmodifiable view of the entries.
  • getProperty
  • putAll
  • containsKey
  • decodeEscapeChar
  • decodeNextCharacter
  • dumpComment
  • dumpString
  • get
  • getAttributes
    Searches for the attributes associated with the specified property. If the property is not found, lo
  • getComment
    Searches for the comment associated with the specified property. If the property is not found, look
  • getAttributes,
  • getComment,
  • getDocumentBuilder,
  • isEmpty,
  • keySet,
  • keys,
  • normalize,
  • propertyNames,
  • put

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • setScale (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Permission (java.security)
    Legacy security code; do not use.
  • Collectors (java.util.stream)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now