org.zodiac.sdk.log.LogSpace Maven / Gradle / Ivy
package org.zodiac.sdk.log;
import java.util.Map;
import java.util.Properties;
import org.zodiac.sdk.log.factory.AbstractLoggerSpaceFactory;
public class LogSpace {
private AbstractLoggerSpaceFactory abstractLoggerSpaceFactory;
private Properties properties = new Properties();
private ClassLoader spaceClassloader;
public LogSpace() {
//properties = new Properties();
}
public LogSpace(Map map, ClassLoader spaceClassloader) {
this.setSpaceClassloader(spaceClassloader).putAll(map);
}
public ClassLoader getSpaceClassloader() {
return spaceClassloader;
}
public LogSpace setSpaceClassloader(ClassLoader spaceClassloader) {
this.spaceClassloader = spaceClassloader;
return this;
}
public AbstractLoggerSpaceFactory getAbstractLoggerSpaceFactory() {
return abstractLoggerSpaceFactory;
}
public LogSpace setAbstractLoggerSpaceFactory(AbstractLoggerSpaceFactory abstractLoggerSpaceFactory) {
this.abstractLoggerSpaceFactory = abstractLoggerSpaceFactory;
return this;
}
public Properties properties() {
return properties;
}
public LogSpace putAll(Map properties) {
if (properties != null) {
this.properties.putAll(properties);
}
return this;
}
public LogSpace setProperty(String key, String value) {
properties.setProperty(key, value);
return this;
}
public String getProperty(String key) {
return properties.getProperty(key);
}
}