You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-cvs@xml.apache.org by pc...@apache.org on 2004/02/28 02:17:34 UTC

cvs commit: xml-xmlbeans/v2/src/jeti/org/apache/xmlbeans/impl/jeti/output OutputService.java

pcal        2004/02/27 17:17:34

  Modified:    v2/src/jeti/org/apache/xmlbeans/impl/jeti/logging
                        Logger.java
               v2/src/jeti/org/apache/xmlbeans/impl/jeti/output
                        OutputService.java
  Added:       v2/src/jeti/org/apache/xmlbeans/impl/jeti/logging/provider
                        Message.java MessageConsumer.java package.html
  Removed:     v2/src/jeti/org/apache/xmlbeans/impl/jeti/javatype
                        JavaTypeService.java
               v2/src/jeti/org/apache/xmlbeans/impl/jeti/logging
                        Message.java MessageConsumer.java
  Log:
  jeti: API updates
  
  Revision  Changes    Path
  1.2       +25 -10    xml-xmlbeans/v2/src/jeti/org/apache/xmlbeans/impl/jeti/logging/Logger.java
  
  Index: Logger.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/jeti/org/apache/xmlbeans/impl/jeti/logging/Logger.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Logger.java	25 Feb 2004 21:26:26 -0000	1.1
  +++ Logger.java	28 Feb 2004 01:17:34 -0000	1.2
  @@ -19,18 +19,21 @@
   import java.util.logging.Level;
   
   /**
  + * <p>Client interface logging service.</p>
    *
    * @author Patrick Calahan <pc...@bea.com>
    */
   public interface Logger {
   
     /**
  +   * Outputs a generic logging message.
      */
     public void log(Level level,
                     String msgId,
                     Object[] msgArgs);
   
     /**
  +   * Outputs a generic logging message.
      */
     public void log(Level level,
                     String msgId,
  @@ -38,21 +41,33 @@
                     Throwable error);
   
     /**
  -   *
  +   * Outputs a diagnostic message that was encountered while processing
  +   * a specific java construct.
      *
      * @param level
  -   * @param javaContext
  +   * @param javaDiagnosticContext
      * @param msgId
      * @param msgArgs
      */
  -  public void log(Level level,
  -                  JElement javaContext,
  -                  String msgId,
  -                  Object[] msgArgs);
  -
  -
  -
  -  public void log(Message m);
  +  public void addDiagnostic(Level level,
  +                            JElement javaDiagnosticContext,
  +                            String msgId,
  +                            Object[] msgArgs);
   
  +  /**
  +   * Outputs a diagnostic message that was encountered while processing
  +   * a specific java construct.
  +   *
  +   *
  +   * @param level
  +   * @param javaDiagnosticContext
  +   * @param msgId
  +   * @param msgArgs
  +   */
  +  public void addDiagnostic(Level level,
  +                            JElement javaDiagnosticContext,
  +                            String msgId,
  +                            Object[] msgArgs,
  +                            Throwable error);
   
   }
  
  
  
  1.1                  xml-xmlbeans/v2/src/jeti/org/apache/xmlbeans/impl/jeti/logging/provider/Message.java
  
  Index: Message.java
  ===================================================================
  /*   Copyright 2004 The Apache Software Foundation
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  package org.apache.xmlbeans.impl.jeti.logging.provider;
  
  import org.apache.xmlbeans.impl.jam.JElement;
  
  import java.util.logging.Level;
  
  /**
   * <p>Encapsulates diagnostic or logging information produced while running a tool.
   *
   * @author Patrick Calahan <pc...@bea.com>
   */
  public interface Message {
  
    /**
     * @return The severity level of the message.  This must never return null.
     */
    public Level getLevel();
  
    /**
     * @return The internationalized text of the message.
     * This must never return null.
     */
    public String getText();
  
    /**
     * @return The message text id for this message.
     */
    public String getTextId();
  
    /**
     * @return The exception which caused the message, or null.
     */
    public Throwable getException();
  
    /**
     * @return The JElement representing the java construct to which the message
     * applies, or null.
     */
    public JElement getJavaContext();
  
    /**
     * @return The SchemaType representing the xsd type to which the message
     * applies, or null.
     */
  //  public SchemaType getSchemaTypeContext();
  
  }
  
  
  1.1                  xml-xmlbeans/v2/src/jeti/org/apache/xmlbeans/impl/jeti/logging/provider/MessageConsumer.java
  
  Index: MessageConsumer.java
  ===================================================================
  /*   Copyright 2004 The Apache Software Foundation
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  package org.apache.xmlbeans.impl.jeti.logging.provider;
  
  import org.apache.xmlbeans.impl.jeti.logging.provider.Message;
  
  /**
   * To be implemented by providers who want to handle messages/diagnostics
   * from tools.
   *
   * @author Patrick Calahan <pc...@bea.com>
   */
  public interface MessageConsumer {
  
    public void log(Message msg);
  }
  
  
  
  1.1                  xml-xmlbeans/v2/src/jeti/org/apache/xmlbeans/impl/jeti/logging/provider/package.html
  
  Index: package.html
  ===================================================================
  <body>
    This package contains interfaces to be implemented by JETI service
    providers.
  </body>
  
  
  1.2       +10 -0     xml-xmlbeans/v2/src/jeti/org/apache/xmlbeans/impl/jeti/output/OutputService.java
  
  Index: OutputService.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/jeti/org/apache/xmlbeans/impl/jeti/output/OutputService.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OutputService.java	25 Feb 2004 21:26:26 -0000	1.1
  +++ OutputService.java	28 Feb 2004 01:17:34 -0000	1.2
  @@ -36,6 +36,16 @@
     }
   
     /**
  +   * <p>Returns a genric Writer for outputting a file.
  +   *
  +   * @param resourceName path to the file (relative to the output root) to
  +   * generate.
  +   */
  +  public Writer createWriter(String resourceName) {
  +    throw new UnsupportedOperationException();
  +  }
  +
  +  /**
      * <p>Returns an XMLStreamWriter on a resource relative to the
      * output root.</p>
      *
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org