Examples of PropertiesUtil


Examples of br.com.flexait.gateway.util.PropertiesUtil

   * Construtor vazio, baseado nos valores do properties
   * @return
   * @throws Exception
   */
  public static GatewayService of() throws Exception {
    PropertiesUtil util = getPropertiesUtil();
    return new GatewayService(
      util.getUrl(), util.getIdentificador(), util.getModulo(), util.getAmbiente()
    );
  }
View Full Code Here

Examples of br.com.flexait.gateway.util.PropertiesUtil

    params.setOperacao(EOperacao.Cancelamento);
    return check(getPropertiesAndValidateTid(params));
  }
 
  private Parametros getPropertiesParameters(Parametros params) throws Exception {
    PropertiesUtil util = PropertiesUtil.of();
    params.setAmbiente(util.getAmbiente());
    params.setIdentificacao(util.getIdentificador());
    params.setModulo(util.getModulo());
    return params;
  }
View Full Code Here

Examples of br.com.flexait.gateway.util.PropertiesUtil

   * Construtor vazio, baseado nos valores do properties
   * @return
   * @throws Exception
   */
  public static GatewayService of() throws Exception {
    PropertiesUtil util = getPropertiesUtil();
    return new GatewayService(
      util.getUrl(), util.getIdentificador(), util.getModulo(), util.getAmbiente()
    );
  }
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

            follow ? new PrintStream(new SystemOutStream(), true, enc) : System.out :
            follow ? new PrintStream(new SystemErrStream(), true, enc) : System.err;
        } catch (UnsupportedEncodingException ex) { // should never happen
            throw new IllegalStateException("Unsupported default encoding " + enc, ex);
        }
        PropertiesUtil propsUtil = PropertiesUtil.getProperties();
        if (!propsUtil.getStringProperty("os.name").startsWith("Windows") ||
            propsUtil.getBooleanProperty("log4j.skipJansi")) {
            return printStream;
        } else {
            try {
                final ClassLoader loader = Loader.getClassLoader();
                // We type the parameter as a wildcard to avoid a hard reference to Jansi.
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

    /**
     * <em>Consider private, used for testing.</em>
     */
    static void init() {
        contextMap = null;
        final PropertiesUtil managerProps = PropertiesUtil.getProperties();
        disableAll = managerProps.getBooleanProperty(DISABLE_ALL);
        useStack = !(managerProps.getBooleanProperty(DISABLE_STACK) || disableAll);
        useMap = !(managerProps.getBooleanProperty(DISABLE_MAP) || disableAll);

        contextStack = new DefaultThreadContextStack(useStack);
        String threadContextMapName = managerProps.getStringProperty(THREAD_CONTEXT_KEY);
        final ClassLoader cl = ProviderUtil.findClassLoader();
        if (threadContextMapName != null) {
            try {
                final Class<?> clazz = cl.loadClass(threadContextMapName);
                if (ThreadContextMap.class.isAssignableFrom(clazz)) {
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

            follow ? new PrintStream(new SystemOutStream(), true, enc) : System.out :
            follow ? new PrintStream(new SystemErrStream(), true, enc) : System.err;
        } catch (final UnsupportedEncodingException ex) { // should never happen
            throw new IllegalStateException("Unsupported default encoding " + enc, ex);
        }
        final PropertiesUtil propsUtil = PropertiesUtil.getProperties();
        if (!propsUtil.getStringProperty("os.name").startsWith("Windows") ||
            propsUtil.getBooleanProperty("log4j.skipJansi")) {
            return printStream;
        }
        try {
            final ClassLoader loader = Loader.getClassLoader();
            // We type the parameter as a wildcard to avoid a hard reference to Jansi.
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

    /**
     * <em>Consider private, used for testing.</em>
     */
    static void init() {
        contextMap = null;
        final PropertiesUtil managerProps = PropertiesUtil.getProperties();
        disableAll = managerProps.getBooleanProperty(DISABLE_ALL);
        useStack = !(managerProps.getBooleanProperty(DISABLE_STACK) || disableAll);
        useMap = !(managerProps.getBooleanProperty(DISABLE_MAP) || disableAll);

        contextStack = new DefaultThreadContextStack(useStack);
        String threadContextMapName = managerProps.getStringProperty(THREAD_CONTEXT_KEY);
        final ClassLoader cl = ProviderUtil.findClassLoader();
        if (threadContextMapName != null) {
            try {
                final Class<?> clazz = cl.loadClass(threadContextMapName);
                if (ThreadContextMap.class.isAssignableFrom(clazz)) {
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

    private static OutputStream getOutputStream(final boolean follow, final Target target) {
        final PrintStream printStream = target == Target.SYSTEM_OUT ?
            follow ? new PrintStream(new SystemOutStream()) : System.out :
            follow ? new PrintStream(new SystemErrStream()) : System.err;
        PropertiesUtil propsUtil = PropertiesUtil.getProperties();
        if (!propsUtil.getStringProperty("os.name").startsWith("Windows") ||
            propsUtil.getBooleanProperty("log4j.skipJansi")) {
            return printStream;
        } else {
            try {
                final ClassLoader loader = Loader.getClassLoader();
                // We type the parameter as a wildcard to avoid a hard reference to Jansi.
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

            follow ? new PrintStream(new SystemOutStream(), true, enc) : System.out :
            follow ? new PrintStream(new SystemErrStream(), true, enc) : System.err;
        } catch (final UnsupportedEncodingException ex) { // should never happen
            throw new IllegalStateException("Unsupported default encoding " + enc, ex);
        }
        final PropertiesUtil propsUtil = PropertiesUtil.getProperties();
        if (!propsUtil.getStringProperty("os.name").startsWith("Windows") ||
            propsUtil.getBooleanProperty("log4j.skipJansi")) {
            return printStream;
        }
        try {
            final ClassLoader loader = Loader.getClassLoader();
            // We type the parameter as a wildcard to avoid a hard reference to Jansi.
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

    }
   
    // LOG4J2-479: by default, use a plain ThreadLocal, only use InheritableThreadLocal if configured.
    // (This method is package protected for JUnit tests.)
    static ThreadLocal<Map<String, String>> createThreadLocalMap(final boolean isMapEnabled) {
        final PropertiesUtil managerProps = PropertiesUtil.getProperties();
        final boolean inheritable = managerProps.getBooleanProperty(INHERITABLE_MAP);
        if (inheritable) {
            return new InheritableThreadLocal<Map<String, String>>() {
                @Override
                protected Map<String, String> childValue(final Map<String, String> parentValue) {
                    return parentValue != null && isMapEnabled //
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.