FileDocCategorySizeDatePackage
LocaleCharsetInfo.javaAPI DocGlassfish v2 API9471Fri May 04 22:34:42 BST 2007com.sun.enterprise.tools.common.dd.webapp

LocaleCharsetInfo

public class LocaleCharsetInfo extends com.sun.enterprise.tools.common.dd.SunBaseBean
This generated bean class LocaleCharsetInfo matches the schema element locale-charset-info Generated on Sun Feb 29 21:00:47 PST 2004

Fields Summary
static Vector
comparators
public static final String
DEFAULTLOCALE
public static final String
LOCALE_CHARSET_MAP
public static final String
PARAMETER_ENCODING
public static final String
PARAMETERENCODINGFORMHINTFIELD
public static final String
PARAMETERENCODINGDEFAULTCHARSET
Constructors Summary
public LocaleCharsetInfo()

	// NOI18N

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

		super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
		// Properties (see root bean comments for the bean graph)
		this.createProperty("locale-charset-map", 	// NOI18N
			LOCALE_CHARSET_MAP, 
			Common.TYPE_1_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			LocaleCharsetMap.class);
		this.createAttribute(LOCALE_CHARSET_MAP, "locale", "Locale", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(LOCALE_CHARSET_MAP, "agent", "Agent", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(LOCALE_CHARSET_MAP, "charset", "Charset", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createProperty("parameter-encoding", 	// NOI18N
			PARAMETER_ENCODING, 
			Common.TYPE_0_1 | Common.TYPE_BOOLEAN | Common.TYPE_KEY, 
			Boolean.class);
		this.createAttribute(PARAMETER_ENCODING, "form-hint-field", "FormHintField", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(PARAMETER_ENCODING, "default-charset", "DefaultCharset", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.initialize(options);
	
Methods Summary
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddLocaleCharsetMap(com.sun.enterprise.tools.common.dd.webapp.LocaleCharsetMap value)

		return this.addValue(LOCALE_CHARSET_MAP, value);
	
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("LocaleCharsetMap["+this.sizeLocaleCharsetMap()+"]");	// NOI18N
		for(int i=0; i<this.sizeLocaleCharsetMap(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			n = (org.netbeans.modules.schema2beans.BaseBean) this.getLocaleCharsetMap(i);
			if (n != null)
				n.dump(str, indent + "\t");	// NOI18N
			else
				str.append(indent+"\tnull");	// NOI18N
			this.dumpAttributes(LOCALE_CHARSET_MAP, i, str, indent);
		}

		str.append(indent);
		str.append("ParameterEncoding");	// NOI18N
		str.append(indent+"\t");	// NOI18N
		str.append((this.isParameterEncoding()?"true":"false"));
		this.dumpAttributes(PARAMETER_ENCODING, 0, str, indent);

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("LocaleCharsetInfo\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public java.lang.StringgetDefaultLocale()

		return getAttributeValue(DEFAULTLOCALE);
	
public com.sun.enterprise.tools.common.dd.webapp.LocaleCharsetMapgetLocaleCharsetMap(int index)

		return (LocaleCharsetMap)this.getValue(LOCALE_CHARSET_MAP, index);
	
public com.sun.enterprise.tools.common.dd.webapp.LocaleCharsetMap[]getLocaleCharsetMap()

		return (LocaleCharsetMap[])this.getValues(LOCALE_CHARSET_MAP);
	
public java.lang.StringgetParameterEncodingDefaultCharset()

		// If our element does not exist, then the attribute does not exist.
		if (size(PARAMETER_ENCODING) == 0) {
			return null;
		} else {
			return getAttributeValue(PARAMETER_ENCODING, "DefaultCharset");
		}
	
public java.lang.StringgetParameterEncodingFormHintField()

		// If our element does not exist, then the attribute does not exist.
		if (size(PARAMETER_ENCODING) == 0) {
			return null;
		} else {
			return getAttributeValue(PARAMETER_ENCODING, "FormHintField");
		}
	
voidinitialize(int options)

	
	
public booleanisParameterEncoding()

		Boolean ret = (Boolean)this.getValue(PARAMETER_ENCODING);
		if (ret == null)
			ret = (Boolean)Common.defaultScalarValue(Common.TYPE_BOOLEAN);
		return ((java.lang.Boolean)ret).booleanValue();
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremoveLocaleCharsetMap(com.sun.enterprise.tools.common.dd.webapp.LocaleCharsetMap value)

		return this.removeValue(LOCALE_CHARSET_MAP, value);
	
public voidsetDefaultLocale(java.lang.String value)

		setAttributeValue(DEFAULTLOCALE, value);
	
public voidsetLocaleCharsetMap(int index, com.sun.enterprise.tools.common.dd.webapp.LocaleCharsetMap value)

		this.setValue(LOCALE_CHARSET_MAP, index, value);
	
public voidsetLocaleCharsetMap(com.sun.enterprise.tools.common.dd.webapp.LocaleCharsetMap[] value)

		this.setValue(LOCALE_CHARSET_MAP, value);
	
public voidsetParameterEncoding(boolean value)

		this.setValue(PARAMETER_ENCODING, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE));
	
public voidsetParameterEncodingDefaultCharset(java.lang.String value)

		// Make sure we've got a place to put this attribute.
		if (size(PARAMETER_ENCODING) == 0) {
			setValue(PARAMETER_ENCODING, "");
		}
		setAttributeValue(PARAMETER_ENCODING, "DefaultCharset", value);
	
public voidsetParameterEncodingFormHintField(java.lang.String value)

		// Make sure we've got a place to put this attribute.
		if (size(PARAMETER_ENCODING) == 0) {
			setValue(PARAMETER_ENCODING, "");
		}
		setAttributeValue(PARAMETER_ENCODING, "FormHintField", value);
	
public intsizeLocaleCharsetMap()

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

		boolean restrictionFailure = false;
		// Validating property defaultLocale
		if (getDefaultLocale() != null) {
		}
		// Validating property localeCharsetMap
		if (sizeLocaleCharsetMap() == 0) {
			throw new org.netbeans.modules.schema2beans.ValidateException("sizeLocaleCharsetMap() == 0", "localeCharsetMap", this);	// NOI18N
		}
		for (int _index = 0; _index < sizeLocaleCharsetMap(); ++_index) {
			com.sun.enterprise.tools.common.dd.webapp.LocaleCharsetMap element = getLocaleCharsetMap(_index);
			if (element != null) {
				element.validate();
			}
		}
		// Validating property parameterEncoding
		// Validating property parameterEncodingFormHintField
		if (getParameterEncodingFormHintField() != null) {
		}
		// Validating property parameterEncodingDefaultCharset
		if (getParameterEncodingDefaultCharset() != null) {
		}