// Path: api/src/main/java/com/geewhiz/pacify/defect/Defect.java
// public interface Defect {
// 
//     String getDefectMessage();
// 
// }
// 
// Path: api/src/main/java/com/geewhiz/pacify/resolver/PropertyResolver.java
// public interface PropertyResolver extends Comparable<PropertyResolver> {
// 
//     boolean containsProperty(String property);
// 
//     boolean isProtectedProperty(String property);
// 
//     String getPropertyValue(String key);
// 
//     Set<String> getReferencedProperties(String property);
// 
//     Set<String> getPropertyKeys();
// 
//     String getEncoding();
// 
//     String getPropertyResolverDescription();
// 
//     LinkedHashSet<Defect> checkForDuplicateEntry();
// 
//     FilterSet createFilterSet();
// 
//     boolean propertyUsesToken(String property);
// 
//     String getBeginToken();
// 
//     String getEndToken();
// 
// }
// 
// Path: api/src/main/java/com/geewhiz/pacify/resolver/PropertyResolverModule.java
// public abstract class PropertyResolverModule extends AbstractModule {
// 
//     public abstract String getResolverId();
// 
//     public abstract void setParameters(Map<String, String> parameters);
// 
//     public abstract LinkedHashSet<Defect> getDefects();
// 
// }


import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Properties;
import com.geewhiz.pacify.defect.Defect;
import com.geewhiz.pacify.resolver.PropertyResolver;
import com.geewhiz.pacify.resolver.PropertyResolverModule;
import com.google.inject.Provides;
import com.google.inject.multibindings.Multibinder;
/*-
 * ========================LICENSE_START=================================
 * com.geewhiz.pacify.resolver.cmd-resolver
 * %%
 * Copyright (C) 2011 - 2017 Sven Oppermann
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =========================LICENSE_END==================================
 */

package com.geewhiz.pacify.property.resolver.cmdresolver;





public class CmdPropertyResolverModule extends PropertyResolverModule {

    Map<String, String> parameters;

    @Override
    public String getResolverId() {
        return "CmdResolver";
    }

    @Override
    protected void configure() {
        Multibinder<PropertyResolver> resolveBinder = Multibinder.newSetBinder(binder(), PropertyResolver.class);
        resolveBinder.addBinding().to(CmdPropertyResolver.class);
    }

    @Override
    public void setParameters(Map<String, String> parameters) {
        this.parameters = parameters;
    }

    @Provides
    public CmdPropertyResolver createFilePropertyResolver() {
        Properties properties = new Properties();
        properties.putAll(parameters);
        return new CmdPropertyResolver(properties);
    }

    @Override
    public LinkedHashSet<Defect> getDefects() {
// Path: api/src/main/java/com/geewhiz/pacify/defect/Defect.java
// public interface Defect {
// 
//     String getDefectMessage();
// 
// }
// 
// Path: api/src/main/java/com/geewhiz/pacify/resolver/PropertyResolver.java
// public interface PropertyResolver extends Comparable<PropertyResolver> {
// 
//     boolean containsProperty(String property);
// 
//     boolean isProtectedProperty(String property);
// 
//     String getPropertyValue(String key);
// 
//     Set<String> getReferencedProperties(String property);
// 
//     Set<String> getPropertyKeys();
// 
//     String getEncoding();
// 
//     String getPropertyResolverDescription();
// 
//     LinkedHashSet<Defect> checkForDuplicateEntry();
// 
//     FilterSet createFilterSet();
// 
//     boolean propertyUsesToken(String property);
// 
//     String getBeginToken();
// 
//     String getEndToken();
// 
// }
// 
// Path: api/src/main/java/com/geewhiz/pacify/resolver/PropertyResolverModule.java
// public abstract class PropertyResolverModule extends AbstractModule {
// 
//     public abstract String getResolverId();
// 
//     public abstract void setParameters(Map<String, String> parameters);
// 
//     public abstract LinkedHashSet<Defect> getDefects();
// 
// }


// Path: resolver/cmd-resolver/src/main/java/com/geewhiz/pacify/property/resolver/cmdresolver/CmdPropertyResolverModule.java
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Properties;
import com.geewhiz.pacify.defect.Defect;
import com.geewhiz.pacify.resolver.PropertyResolver;
import com.geewhiz.pacify.resolver.PropertyResolverModule;
import com.google.inject.Provides;
import com.google.inject.multibindings.Multibinder;

/*-
 * ========================LICENSE_START=================================
 * com.geewhiz.pacify.resolver.cmd-resolver
 * %%
 * Copyright (C) 2011 - 2017 Sven Oppermann
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =========================LICENSE_END==================================
 */

package com.geewhiz.pacify.property.resolver.cmdresolver;





public class CmdPropertyResolverModule extends PropertyResolverModule {

    Map<String, String> parameters;

    @Override
    public String getResolverId() {
        return "CmdResolver";
    }

    @Override
    protected void configure() {
        Multibinder<PropertyResolver> resolveBinder = Multibinder.newSetBinder(binder(), PropertyResolver.class);
        resolveBinder.addBinding().to(CmdPropertyResolver.class);
    }

    @Override
    public void setParameters(Map<String, String> parameters) {
        this.parameters = parameters;
    }

    @Provides
    public CmdPropertyResolver createFilePropertyResolver() {
        Properties properties = new Properties();
        properties.putAll(parameters);
        return new CmdPropertyResolver(properties);
    }

    @Override
    public LinkedHashSet<Defect> getDefects() {
        return new LinkedHashSet<Defect>();