FileDocCategorySizeDatePackage
LogService.javaAPI DocGlassfish v2 API19059Fri May 26 10:47:08 BST 2006com.sun.enterprise.config.serverbeans

LogService

public class LogService extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class LogService matches the DTD element log-service

Fields Summary
static Vector
comparators
private static final org.netbeans.modules.schema2beans.Version
runtimeVersion
public static final String
MODULE_LOG_LEVELS
public static final String
ELEMENT_PROPERTY
Constructors Summary
public LogService()


	  
		this(Common.USE_DEFAULT_VALUES);
	
public LogService(int options)

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(2);
		this.createProperty("module-log-levels", MODULE_LOG_LEVELS, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ModuleLogLevels.class);
		this.createAttribute(MODULE_LOG_LEVELS, "root", "Root", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "server", "Server", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "ejb-container", "EjbContainer", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "cmp-container", "CmpContainer", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "mdb-container", "MdbContainer", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "web-container", "WebContainer", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "classloader", "Classloader", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "configuration", "Configuration", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "naming", "Naming", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "security", "Security", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "jts", "Jts", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "jta", "Jta", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "admin", "Admin", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "deployment", "Deployment", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "verifier", "Verifier", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "jaxr", "Jaxr", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "jaxrpc", "Jaxrpc", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "saaj", "Saaj", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "corba", "Corba", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "javamail", "Javamail", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "jms", "Jms", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "connector", "Connector", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "jdo", "Jdo", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "cmp", "Cmp", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "util", "Util", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "resource-adapter", "ResourceAdapter", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "synchronization", "Synchronization", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "node-agent", "NodeAgent", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "self-management", "SelfManagement", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "group-management-service", "GroupManagementService", 
						AttrProp.CDATA,
						null, "INFO");
		this.createAttribute(MODULE_LOG_LEVELS, "management-event", "ManagementEvent", 
						AttrProp.CDATA,
						null, "INFO");
		this.createProperty("property", ELEMENT_PROPERTY, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ElementProperty.class);
		this.createAttribute(ELEMENT_PROPERTY, "name", "Name", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(ELEMENT_PROPERTY, "value", "Value", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.initialize(options);
	
Methods Summary
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddElementProperty(ElementProperty value)

		return addElementProperty(value, true);
	
public intaddElementProperty(ElementProperty value, boolean overwrite)

		ElementProperty old = getElementPropertyByName(value.getName());
		if(old != null) {
			throw new ConfigException(StringManager.getManager(LogService.class).getString("cannotAddDuplicate",  "ElementProperty"));
		}
		return this.addValue(ELEMENT_PROPERTY, value, overwrite);
	
public voiddump(java.lang.StringBuffer str, java.lang.String indent)

		String s;
		Object o;
		org.netbeans.modules.schema2beans.BaseBean n;
		str.append(indent);
		str.append("ModuleLogLevels");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getModuleLogLevels();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(MODULE_LOG_LEVELS, 0, str, indent);

		str.append(indent);
		str.append("ElementProperty["+this.sizeElementProperty()+"]");	// NOI18N
		for(int i=0; i<this.sizeElementProperty(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			n = (org.netbeans.modules.schema2beans.BaseBean) this.getElementProperty(i);
			if (n != null)
				n.dump(str, indent + "\t");	// NOI18N
			else
				str.append(indent+"\tnull");	// NOI18N
			this.dumpAttributes(ELEMENT_PROPERTY, i, str, indent);
		}

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("LogService\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public static java.lang.StringgetDefaultAlarms()
Get the default value of Alarms from dtd

		return "false".trim();
	
public static java.lang.StringgetDefaultAttributeValue(java.lang.String attr)

		if(attr == null) return null;
		attr = attr.trim();
		if(attr.equals(ServerTags.USE_SYSTEM_LOGGING)) return "false".trim();
		if(attr.equals(ServerTags.LOG_TO_CONSOLE)) return "false".trim();
		if(attr.equals(ServerTags.LOG_ROTATION_LIMIT_IN_BYTES)) return "500000".trim();
		if(attr.equals(ServerTags.LOG_ROTATION_TIMELIMIT_IN_MINUTES)) return "0".trim();
		if(attr.equals(ServerTags.ALARMS)) return "false".trim();
		if(attr.equals(ServerTags.RETAIN_ERROR_STATISTICS_FOR_HOURS)) return "5".trim();
	return null;
	
public static java.lang.StringgetDefaultLogRotationLimitInBytes()
Get the default value of LogRotationLimitInBytes from dtd

		return "500000".trim();
	
public static java.lang.StringgetDefaultLogRotationTimelimitInMinutes()
Get the default value of LogRotationTimelimitInMinutes from dtd

		return "0".trim();
	
public static java.lang.StringgetDefaultLogToConsole()
Get the default value of LogToConsole from dtd

		return "false".trim();
	
public static java.lang.StringgetDefaultRetainErrorStatisticsForHours()
Get the default value of RetainErrorStatisticsForHours from dtd

		return "5".trim();
	
public static java.lang.StringgetDefaultUseSystemLogging()
Get the default value of UseSystemLogging from dtd

		return "false".trim();
	
public ElementPropertygetElementProperty(int index)

		return (ElementProperty)this.getValue(ELEMENT_PROPERTY, index);
	
public ElementProperty[]getElementProperty()

		return (ElementProperty[])this.getValues(ELEMENT_PROPERTY);
	
public ElementPropertygetElementPropertyByName(java.lang.String id)

	 if (null != id) { id = id.trim(); }
	ElementProperty[] o = getElementProperty();
	 if (o == null) return null;

	 for (int i=0; i < o.length; i++) {
	     if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
	         return o[i];
	     }
	 }

		return null;
		
	
public java.lang.StringgetFile()
Getter for File of the Element log-service

return
the File of the Element log-service

			return getAttributeValue(ServerTags.FILE);
	
public java.lang.StringgetLogFilter()
Getter for LogFilter of the Element log-service

return
the LogFilter of the Element log-service

			return getAttributeValue(ServerTags.LOG_FILTER);
	
public java.lang.StringgetLogHandler()
Getter for LogHandler of the Element log-service

return
the LogHandler of the Element log-service

			return getAttributeValue(ServerTags.LOG_HANDLER);
	
public java.lang.StringgetLogRotationLimitInBytes()
Getter for LogRotationLimitInBytes of the Element log-service

return
the LogRotationLimitInBytes of the Element log-service

		return getAttributeValue(ServerTags.LOG_ROTATION_LIMIT_IN_BYTES);
	
public java.lang.StringgetLogRotationTimelimitInMinutes()
Getter for LogRotationTimelimitInMinutes of the Element log-service

return
the LogRotationTimelimitInMinutes of the Element log-service

		return getAttributeValue(ServerTags.LOG_ROTATION_TIMELIMIT_IN_MINUTES);
	
public ModuleLogLevelsgetModuleLogLevels()

		return (ModuleLogLevels)this.getValue(MODULE_LOG_LEVELS);
	
protected java.lang.StringgetRelativeXPath()
get the xpath representation for this element returns something like abc[@name='value'] or abc depending on the type of the bean

	    String ret = null;
	    ret = "log-service";
	    return (null != ret ? ret.trim() : null);
	
public java.lang.StringgetRetainErrorStatisticsForHours()
Getter for RetainErrorStatisticsForHours of the Element log-service

return
the RetainErrorStatisticsForHours of the Element log-service

		return getAttributeValue(ServerTags.RETAIN_ERROR_STATISTICS_FOR_HOURS);
	
voidinitialize(int options)


	
public booleanisAlarms()
Getter for Alarms of the Element log-service

return
the Alarms of the Element log-service

		return toBoolean(getAttributeValue(ServerTags.ALARMS));
	
public booleanisLogToConsole()
Getter for LogToConsole of the Element log-service

return
the LogToConsole of the Element log-service

		return toBoolean(getAttributeValue(ServerTags.LOG_TO_CONSOLE));
	
public booleanisUseSystemLogging()
Getter for UseSystemLogging of the Element log-service

return
the UseSystemLogging of the Element log-service

		return toBoolean(getAttributeValue(ServerTags.USE_SYSTEM_LOGGING));
	
public ElementPropertynewElementProperty()
Create a new bean using it's default constructor. This does not add it to any bean graph.

		return new ElementProperty();
	
public ModuleLogLevelsnewModuleLogLevels()
Create a new bean using it's default constructor. This does not add it to any bean graph.

		return new ModuleLogLevels();
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremoveElementProperty(ElementProperty value)

		return this.removeValue(ELEMENT_PROPERTY, value);
	
public intremoveElementProperty(ElementProperty value, boolean overwrite)

		return this.removeValue(ELEMENT_PROPERTY, value, overwrite);
	
public voidsetAlarms(boolean v, boolean overwrite)
Modify the Alarms of the Element log-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.ALARMS, ""+(v==true), overwrite);
	
public voidsetAlarms(boolean v)
Modify the Alarms of the Element log-service

param
v the new value

		setAttributeValue(ServerTags.ALARMS, ""+(v==true));
	
public voidsetElementProperty(ElementProperty[] value)

		this.setValue(ELEMENT_PROPERTY, value);
	
public voidsetFile(java.lang.String v, boolean overwrite)
Modify the File of the Element log-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.FILE, v, overwrite);
	
public voidsetFile(java.lang.String v)
Modify the File of the Element log-service

param
v the new value

		setAttributeValue(ServerTags.FILE, v);
	
public voidsetLogFilter(java.lang.String v, boolean overwrite)
Modify the LogFilter of the Element log-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.LOG_FILTER, v, overwrite);
	
public voidsetLogFilter(java.lang.String v)
Modify the LogFilter of the Element log-service

param
v the new value

		setAttributeValue(ServerTags.LOG_FILTER, v);
	
public voidsetLogHandler(java.lang.String v, boolean overwrite)
Modify the LogHandler of the Element log-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.LOG_HANDLER, v, overwrite);
	
public voidsetLogHandler(java.lang.String v)
Modify the LogHandler of the Element log-service

param
v the new value

		setAttributeValue(ServerTags.LOG_HANDLER, v);
	
public voidsetLogRotationLimitInBytes(java.lang.String v, boolean overwrite)
Modify the LogRotationLimitInBytes of the Element log-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.LOG_ROTATION_LIMIT_IN_BYTES, v, overwrite);
	
public voidsetLogRotationLimitInBytes(java.lang.String v)
Modify the LogRotationLimitInBytes of the Element log-service

param
v the new value

		setAttributeValue(ServerTags.LOG_ROTATION_LIMIT_IN_BYTES, v);
	
public voidsetLogRotationTimelimitInMinutes(java.lang.String v, boolean overwrite)
Modify the LogRotationTimelimitInMinutes of the Element log-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.LOG_ROTATION_TIMELIMIT_IN_MINUTES, v, overwrite);
	
public voidsetLogRotationTimelimitInMinutes(java.lang.String v)
Modify the LogRotationTimelimitInMinutes of the Element log-service

param
v the new value

		setAttributeValue(ServerTags.LOG_ROTATION_TIMELIMIT_IN_MINUTES, v);
	
public voidsetLogToConsole(boolean v, boolean overwrite)
Modify the LogToConsole of the Element log-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.LOG_TO_CONSOLE, ""+(v==true), overwrite);
	
public voidsetLogToConsole(boolean v)
Modify the LogToConsole of the Element log-service

param
v the new value

		setAttributeValue(ServerTags.LOG_TO_CONSOLE, ""+(v==true));
	
public voidsetModuleLogLevels(ModuleLogLevels value)

		this.setValue(MODULE_LOG_LEVELS, value);
	
public voidsetRetainErrorStatisticsForHours(java.lang.String v, boolean overwrite)
Modify the RetainErrorStatisticsForHours of the Element log-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.RETAIN_ERROR_STATISTICS_FOR_HOURS, v, overwrite);
	
public voidsetRetainErrorStatisticsForHours(java.lang.String v)
Modify the RetainErrorStatisticsForHours of the Element log-service

param
v the new value

		setAttributeValue(ServerTags.RETAIN_ERROR_STATISTICS_FOR_HOURS, v);
	
public voidsetUseSystemLogging(boolean v, boolean overwrite)
Modify the UseSystemLogging of the Element log-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.USE_SYSTEM_LOGGING, ""+(v==true), overwrite);
	
public voidsetUseSystemLogging(boolean v)
Modify the UseSystemLogging of the Element log-service

param
v the new value

		setAttributeValue(ServerTags.USE_SYSTEM_LOGGING, ""+(v==true));
	
public intsizeElementProperty()

		return this.size(ELEMENT_PROPERTY);
	
public voidvalidate()