<?xml version="1.0"?>
<!DOCTYPE mbeans-descriptors PUBLIC
 "-//Apache Software Foundation//DTD Model MBeans Configuration File"
 "http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd">

<!--
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 - JOnAS: Java(TM) Open Application Server
 - Copyright (C) 1999-2007 Bull S.A.S.
 - Contact: jonas-team@ow2.org
 -
 - This library is free software; you can redistribute it and/or
 - modify it under the terms of the GNU Lesser General Public
 - License as published by the Free Software Foundation; either
 - version 2.1 of the License, or any later version.
 -
 - This library is distributed in the hope that it will be useful,
 - but WITHOUT ANY WARRANTY; without even the implied warranty of
 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 - Lesser General Public License for more details.
 -
 - You should have received a copy of the GNU Lesser General Public
 - License along with this library; if not, write to the Free Software
 - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 - USA
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 - $Id: mbeans-descriptors.xml 15428 2008-10-07 11:20:29Z sauthieg $
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 -->

<mbeans-descriptors>

  <mbean name="JavaMailSessionResource"
         description="Session JavaMail J2EEResource"
         domain="JOnAS"
         group="J2EEResource"
         type="org.ow2.jonas.mail.internal.factory.mbean.JavaMailSessionResource"
         className="org.ow2.jonas.mail.internal.factory.mbean.JavaMailResourceMBean">

   <!-- JSR77 J2EEManagedObject -->
    <attribute name="objectName"
               description="Name of the object"
               type="java.lang.String"
               writeable="false"/>

    <attribute name="stateManageable"
               description="State management support for this managed object"
               is="true"
               type="boolean"
               writeable="false"/>

    <attribute name="statisticsProvider"
               description="Performance statistics support for this managed object"
               is="true"
               type="boolean"
               writeable="false"/>

    <attribute name="eventProvider"
               description="Event provider support for this managed object"
               is="true"
               type="boolean"
               writeable="false"/>

    <!-- JSR77 JavaMailResource -->

    <!-- JOnAS specific -->
    <attribute name="Name"
               description="Mail factory name"
               type="java.lang.String"
               writeable="true"/>

    <attribute name="FactoryName"
               description="The resource name"
               type="java.lang.String"
               writeable="false"/>

    <attribute name="FactoryType"
               description="The type of the mail factory"
               type="java.lang.String"
               writeable="false"/>

    <attribute name="AuthenticationProperties"
               description="authentication properties"
               type="java.util.Properties"
               writeable="true"/>

    <attribute name="SessionProperties"
               description="session properties"
               type="java.util.Properties"
               writeable="true"/>

    <operation name="saveConfig"
               description="save configuration"
               impact="ACTION"
               returnType="void">
    </operation>
  </mbean>

  <mbean name="JavaMailMimePartDSResource"
         description="MimePartDataSource JavaMail J2EEResource"
         domain="JOnAS"
         group="J2EEResource"
         type="org.ow2.jonas.mail.internal.factory.mbean.JavaMailMimePartDSResource"
         className="org.ow2.jonas.mail.internal.factory.mbean.JavaMailResourceMBean">

   <!-- JSR77 J2EEManagedObject -->
    <attribute name="objectName"
               description="Name of the object"
               type="java.lang.String"
               writeable="false"/>

    <attribute name="stateManageable"
               description="State management support for this managed object"
               is="true"
               type="boolean"
               writeable="false"/>

    <attribute name="statisticsProvider"
               description="Performance statistics support for this managed object"
               is="true"
               type="boolean"
               writeable="false"/>

    <attribute name="eventProvider"
               description="Event provider support for this managed object"
               is="true"
               type="boolean"
               writeable="false"/>

    <!-- JSR77 JavaMailResource -->

    <!-- JOnAS specific -->
    <attribute name="Name"
               description="Mail factory name"
               type="java.lang.String"
               writeable="true"/>

    <attribute name="FactoryName"
               description="The resource name"
               type="java.lang.String"
               writeable="false"/>

    <attribute name="FactoryType"
               description="The type of the mail factory"
               type="java.lang.String"
               writeable="false"/>

    <attribute name="AuthenticationProperties"
               description="authentication properties"
               type="java.util.Properties"
               writeable="true"/>

    <attribute name="SessionProperties"
               description="session properties"
               type="java.util.Properties"
               writeable="true"/>

    <attribute name="MimeMessageProperties"
               description="specific MimePart DataSource properties"
               type="java.util.Properties"
               writeable="true"/>

    <operation name="saveConfig"
               description="save configuration"
               impact="ACTION"
               returnType="void">
    </operation>

  </mbean>

  <mbean name="DefaultMailService"
         description="JOnAS Default Mail Service"
         domain="JOnAS"
         group="service"
         type="org.ow2.jonas.mail.internal.JOnASMailService">

   <attribute name="currentNumberOfMailFactories"
              description="Current number of managed mail factories"
              type="java.lang.Integer"
              writeable="false" />

   <attribute name="currentNumberOfMimeMailFactories"
              description="Current number of managed mime mail factories"
              type="java.lang.Integer"
              writeable="false" />

   <attribute name="currentNumberOfSessionMailFactories"
              description="Current number of managed session mail factories"
              type="java.lang.Integer"
              writeable="false" />

   <operation name="getMailFactoryPropertiesFile"
              description="The mail factory configuration properties from a local file"
              returnType="java.util.Properties"
              impact="ACTION-INFO" >
        <parameter name="filename"
                   description="Configuration file to load"
                   type="java.lang.String" />
   </operation>

   <operation name="getMailFactoryPropertiesFiles"
              description="The list of properties files describing mail factories found in JONAS_BASE/conf"
              returnType="java.util.List"
              impact="INFO" />

   <operation name="getMimePartMailFactoryPropertiesFiles"
              description="The list of properties files describing mail factories found in JONAS_BASE/conf"
              returnType="java.util.List"
              impact="INFO" />

   <operation name="getSessionMailFactoryPropertiesFiles"
              description="The list of properties files describing mail factories found in JONAS_BASE/conf"
              returnType="java.util.List"
              impact="INFO" />

   <operation name="createMailFactoryMBean"
              description="Create a mail factory with the specified properties and register it into the registry."
              returnType="void"
              impact="ACTION" >
        <parameter name="name"
                   description="the name of the mail factory."
                   type="java.lang.String" />
        <parameter name="props"
                   description="the properties used to configure the mail factory."
                   type="java.util.Properties" />
        <parameter name="loadFromFile"
                   description="true if the mail factory is loaded from a .properties file."
                   type="java.lang.Boolean" />
   </operation>

   <operation name="unbindMailFactoryMBean"
              description="Unregister the factory bound with the given name."
              returnType="void"
              impact="ACTION">
       <parameter name="name"
                  description="Mail factory name"
                  type="java.lang.String" />
   </operation>

  </mbean>
</mbeans-descriptors>