001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.mx.modelmbean;
023:
024: /**
025: * Constraint definitions for the {@link XMBean} implementation.
026: *
027: * @author <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
028: * @version $Revision: 57200 $
029: */
030: public interface XMBeanConstants extends ModelMBeanConstants {
031:
032: // Resource Types ------------------------------------------------
033:
034: /**
035: * Resource type string identifying a resource object that implements
036: * an interface adhering to the Standard MBean naming conventions.
037: */
038: final static String STANDARD_INTERFACE = "StandardInterface";
039:
040: final static String STANDARD_MBEAN = "StandardMBean";
041:
042: /**
043: * Resource type string identifying a resource object that is part of
044: * a descriptor object.
045: */
046: final static String DESCRIPTOR = "descriptor";
047:
048: // Descriptor string prefixes ------------------------------------
049:
050: /**
051: * Descriptor field naming prefix for {@link XMBean} configuration. Descriptor
052: * fields matching to this prefix follow the <tt>"xmbean.*"</tt> naming
053: * convention in field names.
054: */
055: final static String XMBEAN_DESCRIPTOR_PREFIX = "xmbean.";
056:
057: /**
058: * Descriptor field naming prefix for {@link XMBean} configuration. Descriptor
059: * fields matching to this prefix follow the <tt>"xmbean.metadata.*"</tt> naming
060: * convention in field names.
061: */
062: final static String METADATA_DESCRIPTOR_PREFIX = XMBEAN_DESCRIPTOR_PREFIX
063: + "metadata.";
064:
065: /**
066: * Descriptor field naming prefix for {@link XMBean} configuration. Descriptor
067: * fields matching to this prefix follow the <tt>"xmbean.resource.*"</tt> naming
068: * convention in field names.
069: */
070: final static String RESOURCE_DESCRIPTOR_PREFIX = XMBEAN_DESCRIPTOR_PREFIX
071: + "resource.";
072:
073: // Resource descriptor string ------------------------------------
074:
075: /**
076: * Mandatory descriptor field when {@link #DESCRIPTOR} resource type is used.
077: * The value of this field contains a reference to the resource
078: * object the Model MBean represents. <p>
079: *
080: * This field matches to the {@link #RESOURCE_DESCRIPTOR_PREFIX} naming pattern.
081: *
082: * @see org.jboss.mx.modelmbean.XMBean
083: */
084: final static String RESOURCE_REFERENCE = RESOURCE_DESCRIPTOR_PREFIX
085: + "reference";
086:
087: /**
088: * Mandatory descriptor field when {@link #DESCRIPTOR} resource type is used.
089: * The value of this field contains the actual resource type of the resource
090: * object defined by the {@link #RESOURCE_REFERENCE} field. <p>
091: *
092: * This field matches to the {@link #RESOURCE_DESCRIPTOR_PREFIX} naming pattern.
093: *
094: * @see org.jboss.mx.modelmbean.XMBean
095: */
096: final static String RESOURCE_TYPE = RESOURCE_DESCRIPTOR_PREFIX
097: + "type";
098:
099: // Metadata configuration descriptor strings --------------------
100:
101: /**
102: * XML metadata descriptor field name. This descriptor field matches the
103: * {@link #METADATA_DESCRIPTOR_PREFIX} and is therefore passed as a
104: * configuration property to all metadata builder implementations. <p>
105: *
106: * This specific field is used in a {@link #DESCRIPTOR} resource type to
107: * configure <a href="http://www.jdom.org">JDOM</a> based metadata builders
108: * to override the default JAXP SAX parser settings.
109: *
110: * @see org.jboss.mx.modelmbean.XMBean
111: */
112: final static String SAX_PARSER = METADATA_DESCRIPTOR_PREFIX
113: + "sax.parser";
114:
115: /**
116: * XML metadata descriptor field name. This descriptor field matches the
117: * {@link #METADATA_DESCRIPTOR_PREFIX} and is therefore passed as a
118: * configuration property to all metadata builder implementations. <p>
119: *
120: * This specific field can be used to indicate the XML based builder
121: * implementations to validate the document instance before creating the
122: * metadata.
123: *
124: * @see org.jboss.mx.modelmbean.XMBean
125: */
126: final static String XML_VALIDATION = METADATA_DESCRIPTOR_PREFIX
127: + "xml.validate";
128:
129: String GET_METHOD_ATTRIBUTE = "getMethod";
130: String SET_METHOD_ATTRIBUTE = "setMethod";
131: }
|