Tabnine Logo
Jelly.loadProperties
Code IndexAdd Tabnine to your IDE (free)

How to use
loadProperties
method
in
org.apache.commons.jelly.Jelly

Best Java code snippets using org.apache.commons.jelly.Jelly.loadProperties (Showing top 8 results out of 315)

origin: commons-jelly/commons-jelly

/**
 * Attempts to load jelly.properties from the current directory,
 * the users home directory or from the classpath
 */
protected void loadJellyProperties() {
  InputStream is = null;

  String userDir = System.getProperty("user.home");
  File f = new File(userDir + File.separator + "jelly.properties");
  loadProperties(f);

  f = new File("jelly.properties");
  loadProperties(f);
  
  
  is = ClassLoaderUtils.getClassLoader(getClass()).getResourceAsStream("jelly.properties");
  if (is != null) {
    try {
      loadProperties(is);
    }
    catch (Exception e) {
      log.error( "Caught exception while loading jelly.properties from the classpath. Reason: " + e, e );
    }
  }
}
origin: org.jvnet.hudson/commons-jelly

/**
 * Attempts to load jelly.properties from the current directory,
 * the users home directory or from the classpath
 */
protected void loadJellyProperties() {
  InputStream is = null;

  String userDir = System.getProperty("user.home");
  File f = new File(userDir + File.separator + "jelly.properties");
  loadProperties(f);

  f = new File("jelly.properties");
  loadProperties(f);
  
  
  is = ClassLoaderUtils.getClassLoader(getClass()).getResourceAsStream("jelly.properties");
  if (is != null) {
    try {
      loadProperties(is);
    }
    catch (Exception e) {
      log.error( "Caught exception while loading jelly.properties from the classpath. Reason: " + e, e );
    }
  }
}
origin: org.hudsonci.stapler/commons-jelly

/**
 * Attempts to load jelly.properties from the current directory,
 * the users home directory or from the classpath
 */
protected void loadJellyProperties() {
  InputStream is = null;

  String userDir = System.getProperty("user.home");
  File f = new File(userDir + File.separator + "jelly.properties");
  loadProperties(f);

  f = new File("jelly.properties");
  loadProperties(f);
  
  
  is = ClassLoaderUtils.getClassLoader(getClass()).getResourceAsStream("jelly.properties");
  if (is != null) {
    try {
      loadProperties(is);
    }
    catch (Exception e) {
      log.error( "Caught exception while loading jelly.properties from the classpath. Reason: " + e, e );
    }
  }
}
origin: org.jenkins-ci/commons-jelly

/**
 * Attempts to load jelly.properties from the current directory,
 * the users home directory or from the classpath
 */
protected void loadJellyProperties() {
  InputStream is = null;

  String userDir = System.getProperty("user.home");
  File f = new File(userDir + File.separator + "jelly.properties");
  loadProperties(f);

  f = new File("jelly.properties");
  loadProperties(f);
  
  
  is = ClassLoaderUtils.getClassLoader(getClass()).getResourceAsStream("jelly.properties");
  if (is != null) {
    try {
      loadProperties(is);
    }
    catch (Exception e) {
      log.error( "Caught exception while loading jelly.properties from the classpath. Reason: " + e, e );
    }
  }
}
origin: org.jenkins-ci/commons-jelly

/**
 * Load properties from a file into the context
 * @param f
 */
private void loadProperties(File f) {
  InputStream is = null;
  try {
    if (f.exists()) {
      is = new FileInputStream(f);
      loadProperties(is);
    }
  } catch (Exception e) {
    log.error( "Caught exception while loading: " + f.getName() + ". Reason: " + e, e );
  } finally {
    if (is != null) {
      try {
        is.close();
      } catch (IOException e) {
        if (log.isDebugEnabled()) log.debug("error closing property input stream", e);
      }
    }
  }
}
origin: commons-jelly/commons-jelly

/**
 * Load properties from a file into the context
 * @param f
 */
private void loadProperties(File f) {
  InputStream is = null;
  try {
    if (f.exists()) {
      is = new FileInputStream(f);
      loadProperties(is);
    }
  } catch (Exception e) {
    log.error( "Caught exception while loading: " + f.getName() + ". Reason: " + e, e );
  } finally {
    if (is != null) {
      try {
        is.close();
      } catch (IOException e) {
        if (log.isDebugEnabled()) log.debug("error closing property input stream", e);
      }
    }
  }
}
origin: org.jvnet.hudson/commons-jelly

/**
 * Load properties from a file into the context
 * @param f
 */
private void loadProperties(File f) {
  InputStream is = null;
  try {
    if (f.exists()) {
      is = new FileInputStream(f);
      loadProperties(is);
    }
  } catch (Exception e) {
    log.error( "Caught exception while loading: " + f.getName() + ". Reason: " + e, e );
  } finally {
    if (is != null) {
      try {
        is.close();
      } catch (IOException e) {
        if (log.isDebugEnabled()) log.debug("error closing property input stream", e);
      }
    }
  }
}
origin: org.hudsonci.stapler/commons-jelly

/**
 * Load properties from a file into the context
 * @param f
 */
private void loadProperties(File f) {
  InputStream is = null;
  try {
    if (f.exists()) {
      is = new FileInputStream(f);
      loadProperties(is);
    }
  } catch (Exception e) {
    log.error( "Caught exception while loading: " + f.getName() + ". Reason: " + e, e );
  } finally {
    if (is != null) {
      try {
        is.close();
      } catch (IOException e) {
        if (log.isDebugEnabled()) log.debug("error closing property input stream", e);
      }
    }
  }
}
org.apache.commons.jellyJellyloadProperties

Javadoc

Load properties from a file into the context

Popular methods of Jelly

  • <init>
  • compileScript
    Compiles the script
  • setScript
    Sets the script URL to use as an absolute URL or a relative filename
  • setUrl
    Sets the script URL to use
  • getJellyBuildDate
  • getJellyContext
    The context to use
  • getJellyVersion
  • getRootContext
    Gets the root context
  • getUrl
  • loadJellyProperties
    Attempts to load jelly.properties from the current directory, the users home directory or from the c
  • readBuildTimestampResource
  • resolveURL
  • readBuildTimestampResource,
  • resolveURL,
  • setDefaultNamespaceURI,
  • setValidateXML

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • requestLocationUpdates (LocationManager)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top plugins for WebStorm
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