package net.sourceforge.tracelog.config;
import java.io.Serializable;
import net.sourceforge.tracelog.utils.Util;
/**
* LogFile is a value object that contains information about the log, such as
* log name, log file path and the color of log text (when displayed).
*
* @author Choon-Chern Lim (Mike)
*/
public class LogFile implements Serializable {
private static final long serialVersionUID = 5339819668361806191L;
public int backgroundColor;
public int foregroundColor;
public String id;
public String logName;
public int logOrder;
public String logPath;
public LogFile() {
this(0, "", "", 0, 0);
}
public LogFile(int logOrder, String logName, String logPath, int foregroundColor, int backgroundColor) {
this.logOrder = logOrder;
this.logName = logName;
this.logPath = logPath;
this.foregroundColor = foregroundColor;
this.backgroundColor = backgroundColor;
this.id = Util.getUniqueId();
}
/**
* @return the backgroundColor
*/
public int getBackgroundColor() {
return backgroundColor;
}
/**
* @return the foregroundColor
*/
public int getForegroundColor() {
return foregroundColor;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @return the logName
*/
public String getLogName() {
return logName;
}
/**
* @return the logOrder
*/
public int getLogOrder() {
return logOrder;
}
/**
* @return the logPath
*/
public String getLogPath() {
return logPath;
}
/**
* @param backgroundColor
* the backgroundColor to set
*/
public void setBackgroundColor(int backgroundColor) {
this.backgroundColor = backgroundColor;
}
/**
* @param foregroundColor
* the foregroundColor to set
*/
public void setForegroundColor(int foregroundColor) {
this.foregroundColor = foregroundColor;
}
/**
* @param id
* the id to set
*/
public void setId(String id) {
this.id = id.trim();
}
/**
* @param logName
* the logName to set
*/
public void setLogName(String logName) {
this.logName = logName.trim();
}
/**
* @param logOrder
* the logOrder to set
*/
public void setLogOrder(int logOrder) {
this.logOrder = logOrder;
}
/**
* @param logPath
* the logPath to set
*/
public void setLogPath(String logPath) {
this.logPath = logPath.trim();
}
}
|