<commit_before>/**
 * Copyright (c) 2011, 2014 Eurotech and/or its affiliates
 *
 *  All rights reserved. This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License v1.0
 *  which accompanies this distribution, and is available at
 *  http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   Eurotech
 */
package org.eclipse.kura.net.admin.visitor.linux;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.kura.KuraException;
import org.eclipse.kura.core.net.NetworkConfiguration;
import org.eclipse.kura.core.net.NetworkConfigurationVisitor;


public class LinuxWriteVisitor implements NetworkConfigurationVisitor{
    
    private static LinuxWriteVisitor s_instance;
    
    private List<NetworkConfigurationVisitor> m_visitors;
    
    private LinuxWriteVisitor() {
        m_visitors = new ArrayList<NetworkConfigurationVisitor>();
        m_visitors.add(IfcfgConfigWriter.getInstance());
        m_visitors.add(WifiConfigWriter.getInstance());
        m_visitors.add(PppConfigWriter.getInstance());
        m_visitors.add(DhcpConfigWriter.getInstance());
        m_visitors.add(FirewallNatConfigWriter.getInstance());
    }
    
    public static LinuxWriteVisitor getInstance() {
        if(s_instance == null) {
            s_instance = new LinuxWriteVisitor();
        }
        
        return s_instance;<commit_msg>ported port forwarding and NATing from esf2 branch<commit_after>/**
 * Copyright (c) 2011, 2014 Eurotech and/or its affiliates
 *
 *  All rights reserved. This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License v1.0
 *  which accompanies this distribution, and is available at
 *  http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   Eurotech
 */
package org.eclipse.kura.net.admin.visitor.linux;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.kura.KuraException;
import org.eclipse.kura.core.net.NetworkConfiguration;
import org.eclipse.kura.core.net.NetworkConfigurationVisitor;


public class LinuxWriteVisitor implements NetworkConfigurationVisitor{
    
    private static LinuxWriteVisitor s_instance;
    
    private List<NetworkConfigurationVisitor> m_visitors;
    
    private LinuxWriteVisitor() {
        m_visitors = new ArrayList<NetworkConfigurationVisitor>();
        m_visitors.add(IfcfgConfigWriter.getInstance());
        m_visitors.add(WifiConfigWriter.getInstance());
        m_visitors.add(PppConfigWriter.getInstance());
        m_visitors.add(DhcpConfigWriter.getInstance());
        m_visitors.add(FirewallAutoNatConfigWriter.getInstance());
    }
    
    public static LinuxWriteVisitor getInstance() {
        if(s_instance == null) {
            s_instance = new LinuxWriteVisitor();
        }
        
        return s_instance;
{'fraction_non_alphanumeric': 0.08853258975252701, 'fraction_numerical': 0.00871383757406762, 'mean_word_length': 3.689542483660131, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4829572', 'n_tokens_mistral': 806, 'n_tokens_neox': 776, 'n_words': 178}