// Path: opennms-pris-api/src/main/java/org/opennms/pris/api/InstanceConfiguration.java
// public interface InstanceConfiguration extends Configuration {
//    
//     /**
//      * Returns the identifier of the instance.
//      * 
//      * @return the identifier string
//      */
//     String getInstanceIdentifier();
//     
//     /**
//      * Return a decorator Configuration containing every key from the current
//      * Configuration that starts with the specified prefix.
//      * 
//      * The prefix is removed from the keys in the subset.
//      * 
//      * Since the subset is a decorator and not a modified copy of the initial
//      * Configuration, any change made to the subset is available to the
//      * Configuration, and reciprocally.
//      *
//      * @param prefix The prefix used to select the properties
//      * 
//      * @return a subset configuration
//      */
//     InstanceConfiguration subset(final String prefix);
// }
// 
// Path: opennms-pris-api/src/main/java/org/opennms/pris/api/Source.java
// public interface Source {
// 
//     /**
//      * Factory interface for creating {@link Source}s.
//      */
//     public static interface Factory {
//         
//         /**
//          * Returns the identifier used to created a source using this factory.
//          * 
//          * @return the identifier string
//          */
//         String getIdentifier();
// 
//         /**
//          * Creates a source.
//          * 
//          * @param config the configuration used to build the source
//          * 
//          * @return the created source
//          */
//         Source create(final InstanceConfiguration config);
//     }
// 
//     /**
//      * Loads some information and returns them.
//      *
//      * There is no requirement to the returned object as long as there is a
//      * mapper available for mapping this data.
//      *
//      * @return the loaded information
//      *
//      * @throws Exception
//      */
//     Object dump() throws Exception;
// }


import java.util.Arrays;
import java.util.List;
import org.opennms.pris.api.InstanceConfiguration;
import org.opennms.pris.api.Source;
/*******************************************************************************
 * This file is part of OpenNMS(R).
 *
 * Copyright (C) 2014 The OpenNMS Group, Inc.
 * OpenNMS(R) is Copyright (C) 1999-2014 The OpenNMS Group, Inc.
 *
 * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
 *
 * OpenNMS(R) is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published
 * by the Free Software Foundation, either version 3 of the License,
 * or (at your option) any later version.
 *
 * OpenNMS(R) is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with OpenNMS(R). If not, see:
 * http://www.gnu.org/licenses/
 *
 * For more information contact:
 * OpenNMS(R) Licensing <license@opennms.org>
 * http://www.opennms.org/
 * http://www.opennms.com/
 *******************************************************************************/
package org.opennms.opennms.pris.plugins.ocs.source;



public abstract class AbstractOcsSource implements Source {
  
  private final InstanceConfiguration config;

  public AbstractOcsSource(final InstanceConfiguration config) {
    this.config = config;
  }

  public final InstanceConfiguration getConfig() {
    return this.config;
  }
          
  public final String  getUrl() {
    return this.config.getString("url");
  }
  
  public final String  getUsername() {
    return this.config.getString("username");
  }
  
  public final String  getPassword() {
    return this.config.getString("password");
  }
  
// Path: opennms-pris-api/src/main/java/org/opennms/pris/api/InstanceConfiguration.java
// public interface InstanceConfiguration extends Configuration {
//    
//     /**
//      * Returns the identifier of the instance.
//      * 
//      * @return the identifier string
//      */
//     String getInstanceIdentifier();
//     
//     /**
//      * Return a decorator Configuration containing every key from the current
//      * Configuration that starts with the specified prefix.
//      * 
//      * The prefix is removed from the keys in the subset.
//      * 
//      * Since the subset is a decorator and not a modified copy of the initial
//      * Configuration, any change made to the subset is available to the
//      * Configuration, and reciprocally.
//      *
//      * @param prefix The prefix used to select the properties
//      * 
//      * @return a subset configuration
//      */
//     InstanceConfiguration subset(final String prefix);
// }
// 
// Path: opennms-pris-api/src/main/java/org/opennms/pris/api/Source.java
// public interface Source {
// 
//     /**
//      * Factory interface for creating {@link Source}s.
//      */
//     public static interface Factory {
//         
//         /**
//          * Returns the identifier used to created a source using this factory.
//          * 
//          * @return the identifier string
//          */
//         String getIdentifier();
// 
//         /**
//          * Creates a source.
//          * 
//          * @param config the configuration used to build the source
//          * 
//          * @return the created source
//          */
//         Source create(final InstanceConfiguration config);
//     }
// 
//     /**
//      * Loads some information and returns them.
//      *
//      * There is no requirement to the returned object as long as there is a
//      * mapper available for mapping this data.
//      *
//      * @return the loaded information
//      *
//      * @throws Exception
//      */
//     Object dump() throws Exception;
// }


// Path: opennms-pris-plugins/opennms-pris-plugins-ocs/src/main/java/org/opennms/opennms/pris/plugins/ocs/source/AbstractOcsSource.java
import java.util.Arrays;
import java.util.List;
import org.opennms.pris.api.InstanceConfiguration;
import org.opennms.pris.api.Source;

/*******************************************************************************
 * This file is part of OpenNMS(R).
 *
 * Copyright (C) 2014 The OpenNMS Group, Inc.
 * OpenNMS(R) is Copyright (C) 1999-2014 The OpenNMS Group, Inc.
 *
 * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
 *
 * OpenNMS(R) is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published
 * by the Free Software Foundation, either version 3 of the License,
 * or (at your option) any later version.
 *
 * OpenNMS(R) is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with OpenNMS(R). If not, see:
 * http://www.gnu.org/licenses/
 *
 * For more information contact:
 * OpenNMS(R) Licensing <license@opennms.org>
 * http://www.opennms.org/
 * http://www.opennms.com/
 *******************************************************************************/
package org.opennms.opennms.pris.plugins.ocs.source;



public abstract class AbstractOcsSource implements Source {
  
  private final InstanceConfiguration config;

  public AbstractOcsSource(final InstanceConfiguration config) {
    this.config = config;
  }

  public final InstanceConfiguration getConfig() {
    return this.config;
  }
          
  public final String  getUrl() {
    return this.config.getString("url");
  }
  
  public final String  getUsername() {
    return this.config.getString("username");
  }
  
  public final String  getPassword() {
    return this.config.getString("password");
  }
  
  public final String  getChecksum() {