FileDocCategorySizeDatePackage
ConfigChangeCategory.javaAPI DocGlassfish v2 API5221Fri May 04 22:33:34 BST 2007com.sun.enterprise.admin.event

ConfigChangeCategory

public class ConfigChangeCategory extends Object
Configuration change category. Configuration changes can be categorized by their associated attributes. All config attributes are identified by their XPath location and a regular expression matching one or more attribues XPath defines a category of Configuration Changes.

Fields Summary
private String
configChangeCategoryName
private Pattern
configXPathPattern
Constructors Summary
public ConfigChangeCategory()
Create a new ConfigChangeCategory

    
public ConfigChangeCategory(String name, String regex)
Create a new ConfigChangeCategory using specified name and regular expression pattern expressed as string.

throws
PatternSyntaxException if regular expression can not be compiled

        configChangeCategoryName = name;
        configXPathPattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
    
public ConfigChangeCategory(String name, Pattern regex)
Create a new ConfigChangeCategory using specified name and regular expression pattern.

        configChangeCategoryName = name;
        configXPathPattern = regex;
    
Methods Summary
public booleanequals(com.sun.enterprise.admin.event.ConfigChangeCategory other)
Two config change categories are same if they share the same regular expression pattern (irrespective of the name given to them).

        if (configXPathPattern == null) {
            if (other.configXPathPattern == null) {
                return ((configChangeCategoryName != null) ?
                        configChangeCategoryName.equals(
                            other.configChangeCategoryName) :
                        (other.configChangeCategoryName == null));
            } else {
                return false;
            }
        } else {
            return configXPathPattern.equals(other.configXPathPattern);
        }
    
public java.util.regex.PatterngetConfigXPathPattern()
Get regular expression pattern on attribute XPath that defines this category.

        return configXPathPattern;
    
public java.lang.StringgetName()
Get name of this configuration change category.

        return configChangeCategoryName;
    
public voidsetConfigXPathPattern(java.lang.String regex)
Set regular expression pattern over attribute XPath that defines this category.

throws
PatternSyntaxException if regular expression can not be compiled

        configXPathPattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
    
public voidsetConfigXPathPattern(java.util.regex.Pattern regex)
Set regular expression pattern over attribute XPath that defines this category.

        configXPathPattern = regex;
    
public voidsetName(java.lang.String name)
Set name of this configuration change category to specified value.

        configChangeCategoryName = name;