com.aragost.javahg.RepositoryConfiguration Maven / Gradle / Ivy
/*
* #%L
* JavaHg
* %%
* Copyright (C) 2011 aragost Trifork ag
* %%
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* #L%
*/
package com.aragost.javahg;
import java.nio.charset.CodingErrorAction;
import com.google.common.base.Strings;
public class RepositoryConfiguration {
static {
String hgBin = System.getProperty("com.aragost.javahg.hgbin");
if (Strings.isNullOrEmpty(hgBin)) {
hgBin = "hg";
}
DEFAULT_HG_BIN = hgBin;
}
private static final String DEFAULT_HG_BIN;
public static final RepositoryConfiguration DEFAULT = new RepositoryConfiguration();
public enum CachePolicy {
STRONG, SOFT, WEAK, NONE
};
private String hgBin = DEFAULT_HG_BIN;
private CachePolicy cachePolicy = CachePolicy.SOFT;
private CodingErrorAction codingErrorAction = CodingErrorAction.REPORT;
public String getHgBin() {
return hgBin;
}
public void setHgBin(String hgBin) {
this.hgBin = hgBin;
}
public CachePolicy getCachePolicy() {
return cachePolicy;
}
public void setCachePolicy(CachePolicy cachePolicy) {
this.cachePolicy = cachePolicy;
}
public CodingErrorAction getCodingErrorAction() {
return codingErrorAction;
}
public void setCodingErrorAction(CodingErrorAction codingErrorAction) {
this.codingErrorAction = codingErrorAction;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy