001/* 002 * (C) Copyright 2012 Nuxeo SA (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Julien Carsique 016 * 017 */ 018 019package org.nuxeo.launcher.config; 020 021import java.io.File; 022 023import org.nuxeo.common.Environment; 024 025/** 026 * @since 5.7 027 */ 028public class UnknownServerConfigurator extends ServerConfigurator { 029 030 /** 031 * @param configurationGenerator 032 */ 033 public UnknownServerConfigurator(ConfigurationGenerator configurationGenerator) { 034 super(configurationGenerator); 035 log.warn("Unknown server."); 036 } 037 038 @Override 039 boolean isConfigured() { 040 return false; 041 } 042 043 @Override 044 protected File getRuntimeHome() { 045 return new File(System.getProperty(Environment.NUXEO_RUNTIME_HOME, generator.getNuxeoHome().getPath())); 046 } 047 048 @Override 049 public File getLogConfFile() { 050 return null; 051 } 052 053 @Override 054 public File getConfigDir() { 055 return new File(System.getProperty(Environment.NUXEO_CONFIG_DIR, getRuntimeHome().getPath() + File.separator 056 + Environment.DEFAULT_CONFIG_DIR)); 057 } 058 059 @Override 060 public File getServerLibDir() { 061 return getNuxeoLibDir(); 062 } 063 064}