Author: heiko.braun(a)jboss.com
Date: 2007-05-30 03:21:11 -0400 (Wed, 30 May 2007)
New Revision: 3296
Added:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumerFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProviderFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/package.html
Removed:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/api/
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/spi/
Modified:
trunk/integration/spi/build.xml
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/wsconsume.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/wsprovide.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/command/wsconsume.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/command/wsprovide.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerFactoryImpl.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderFactoryImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerFactoryImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
Log:
Less packages for the tools SPI
Modified: trunk/integration/spi/build.xml
===================================================================
--- trunk/integration/spi/build.xml 2007-05-30 07:17:39 UTC (rev 3295)
+++ trunk/integration/spi/build.xml 2007-05-30 07:21:11 UTC (rev 3296)
@@ -127,17 +127,21 @@
<mkdir dir="${spi.output.apidocs.dir}"/>
<javadoc destdir="${spi.output.apidocs.dir}" author="true"
version="true" use="true" windowtitle="JBossWS API">
- <classpath refid="spi.classpath"/>
+ <classpath refid="thirdparty.classpath"/>
<packageset dir="${spi.java.dir}"
defaultexcludes="yes">
<include name="org/jboss/ws/**"/>
+ <include name="org/jboss/wsf/**"/>
</packageset>
- <doctitle><![CDATA[<h1>JBossWS</h1>]]></doctitle>
+ <doctitle><![CDATA[<h1>JBoss Web Service Framework -
SPI</h1>]]></doctitle>
<tag name="todo" scope="all" description="To
do:"/>
- <group title="Core" packages="org.jboss.ws.spi*"/>
- <group title="Metadata"
packages="org.jboss.ws.metadata*"/>
- <group title="spi" packages="org.jboss.ws.spi*"/>
- <group title="Extensions"
packages="org.jboss.ws.extensions*"/>
- <group title="Tools" packages="org.jboss.ws.tools*"/>
+ <group title="Integration (AS 4.2 backwards compatibility)"
packages="org.jboss.ws.integration*"/>
+ <group title="Annotations"
packages="org.jboss.wsf.spi.annotation*"/>
+ <group title="Deployment"
packages="org.jboss.wsf.spi.deployment*"/>
+ <group title="Invocation"
packages="org.jboss.wsf.spi.invocation*"/>
+ <group title="Management"
packages="org.jboss.wsf.spi.management*"/>
+ <group title="Handler"
packages="org.jboss.wsf.spi.handler*"/>
+ <group title="MetaData"
packages="org.jboss.wsf.spi.metadata*"/>
+ <group title="Tools"
packages="org.jboss.wsf.spi.tools*"/>
</javadoc>
</target>
Copied:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java (from
rev 3289,
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/api/WSContractConsumer.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -0,0 +1,188 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This 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 (at your option) any later version.
+*
+* This software 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 software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.wsf.spi.tools;
+
+import org.jboss.ws.integration.FactoryLoader;
+import org.jboss.wsf.spi.tools.WSContractConsumerFactory;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+
+/**
+ * WSContractConsumer is responsible for generating JAX-WS client and server
+ * artifacts from the specified WSDL file. To implement a client, one would use
+ * the generated ___Service.java file. For a server, one only needs to provide
+ * an implementation class that implements the generated service endpoint
+ * interface.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public abstract class WSContractConsumer
+{
+ private static String DEFAULT_PROVIDER =
"org.jboss.ws.tools.jaxws.impl.SunRIConsumerFactoryImpl";
+ public static final String PROVIDER_PROPERTY =
"org.jboss.wsf.tools.ConsumerFactoryImpl";
+
+ /**
+ * Obtain a new instance of a WSContractProvider. This will use the current
+ * thread's context class loader to locate the WSContractProviderFactory
+ * implementation.
+ *
+ * @return a new WSContractProvider
+ */
+ public static WSContractConsumer newInstance()
+ {
+ return newInstance(Thread.currentThread().getContextClassLoader());
+ }
+
+ /**
+ * Obtain a new instance of a WSContractConsumer. The specified ClassLoader will be
used to
+ * locate the WebServiceImporterProvide implementation
+ *
+ * @param loader the ClassLoader to use
+ * @return a new WSContractConsumer
+ */
+ public static WSContractConsumer newInstance(ClassLoader loader)
+ {
+ ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(loader);
+ WSContractConsumerFactory factory = (WSContractConsumerFactory)
+ FactoryLoader.loadFactory(PROVIDER_PROPERTY, DEFAULT_PROVIDER);
+ return factory.createConsumer();
+ }
+ finally{
+ Thread.currentThread().setContextClassLoader(oldLoader);
+ }
+ }
+
+ /**
+ * Specifies the JAX-WS and JAXB binding files to use on import operations.
+ *
+ * @param bindingFiles list of JAX-WS or JAXB binding files
+ */
+ public abstract void setBindingFiles(List<File> bindingFiles);
+
+ /**
+ * Sets the OASIS XML Catalog file to use for entity resolution.
+ *
+ * @param catalog the OASIS XML Catalog file
+ */
+ public abstract void setCatalog(File catalog);
+
+ /**
+ * Sets the main output directory. If the directory does not exist, it will be
created.
+ *
+ * @param directory the root directory for generated files
+ */
+ public abstract void setOutputDirectory(File directory);
+
+ /**
+ * Sets the source directory. This directory will contain any generated Java source.
+ * If the directory does not exist, it will be created. If not specified,
+ * the output directory will be used instead.
+ *
+ * @param directory the root directory for generated source code
+ */
+ public abstract void setSourceDirectory(File directory);
+
+ /**
+ * Enables/Disables Java source generation.
+ *
+ * @param generateSource whether or not to generate Java source.
+ */
+ public abstract void setGenerateSource(boolean generateSource);
+
+
+ /**
+ * Sets the target package for generated source. If not specified the default
+ * is based off of the XML namespace.
+ *
+ * @param targetPackage the target package for generated source
+ */
+ public abstract void setTargetPackage(String targetPackage);
+
+ /**
+ * Sets the @(a)WebService.wsdlLocation and @(a)WebServiceClient.wsdlLocation attributes
to a custom value.
+ *
+ * @param wsdlLocation the custom WSDL location to use in generated source
+ */
+ public abstract void setWsdlLocation(String wsdlLocation);
+
+ /**
+ * Sets the PrintStream to use for status feedback. The simplest example
+ * would be to use System.out.
+ *
+ * @param messageStream the stream to use for status messages:
+ */
+ public abstract void setMessageStream(PrintStream messageStream);
+
+
+ /**
+ * Sets the additional classpath to use if/when invoking the Java compiler.
+ * Typically an implementation will use the system
<code>java.class.path</code>
+ * property. So for most normal applications this method is not needed. However,
+ * if this API is being used from an isolated classloader, then it needs to
+ * be called in order to reference all jars that are required by the
+ * implementation.
+ *
+ * @param classPath a list of strings where each entry references a
+ * single jar or directory
+ */
+ public abstract void setAdditionalCompilerClassPath(List<String> classPath);
+
+ /**
+ * Generate the required artifacts using the specified WSDL URL. This method
+ * may be called more than once, although this is probably not desireable
+ *
+ * @param wsdl the URL of the WSDL
+ */
+ public abstract void consume(URL wsdl);
+
+ /**
+ * Generate the required artifacts using the specified WSDL. This method
+ * may be called more than once, although this is probably not desireable.
+ * The passed string is expect to either be a valid URL, or a local file path.
+ *
+ * @param wsdl a URL or local file path
+ * @throws MalformedURLException if wsdl is not a legal URL or local file
+ */
+ public void consume(String wsdl) throws MalformedURLException
+ {
+ URL url = null;
+ try
+ {
+ url = new URL(wsdl);
+ }
+ catch (MalformedURLException e)
+ {
+ File file = new File(wsdl);
+ url = file.toURL();
+ }
+
+ consume(url);
+ }
+}
Property changes on:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumerFactory.java
(from rev 3289,
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/spi/WSContractConsumerFactory.java)
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumerFactory.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumerFactory.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This 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 (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.tools;
+
+import org.jboss.wsf.spi.tools.WSContractConsumer;
+
+/**
+ * WSContractConsumerFactory defines the contract for a WSContractConsumer factory.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ */
+public interface WSContractConsumerFactory
+{
+ /**
+ * Create a new WSContractConsumer. There are no restrictions on how this
+ * should be performed.
+ *
+ * @return a new WSContractConsumer
+ */
+ public WSContractConsumer createConsumer();
+}
Property changes on:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumerFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java (from
rev 3289,
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/api/WSContractProvider.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -0,0 +1,159 @@
+package org.jboss.wsf.spi.tools;
+
+import org.jboss.wsf.spi.tools.WSContractProviderFactory;
+import org.jboss.ws.integration.FactoryLoader;
+
+import java.io.File;
+import java.io.PrintStream;
+
+
+/**
+ * WSContractProvider is responsible for generating the required portable
+ * JAX-WS artifacts for a service endpoint implementation. This includes class
+ * files for wrapper types and fault beans. WSDL may be optionally generated as
+ * well using this API.
+ *
+ * <p>The following example generates class files, source files and WSDL for an
+ * endpoint:</p>
+ * <pre>
+ * WSContractProvider provider = WSContractProvider.newInstance();
+ * provider.setGenerateSource(true);
+ * provider.setGenerateWsdl(true);
+ * provider.setOutputDirectory(new File("output"));
+ * provider.setMessageStream(System.out);
+ * provider.provide(TestMe.class);
+ * </pre>
+ *
+ * <p>Thread-Safety:</p>
+ * This class expects to be thread-confined, so it can not be shared between threads.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ */
+public abstract class WSContractProvider
+{
+ private static String DEFAULT_PROVIDER =
"org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl";
+ public static final String PROVIDER_PROPERTY =
"org.jboss.wsf.tools.ProviderFactoryImpl";
+
+ protected WSContractProvider()
+ {
+
+ }
+
+ /**
+ * Obtain a new instance of a WSContractProvider. This will use the current
+ * thread's context class loader to locate the WSContractProviderFactory
+ * implementation.
+ *
+ * @return a new WSContractProvider
+ */
+ public static WSContractProvider newInstance()
+ {
+ return newInstance(Thread.currentThread().getContextClassLoader());
+ }
+
+ /**
+ * Obtain a new instance of a WSContractProvider. The specified ClassLoader will be
used to
+ * locate the WSContractProviderFactory implementation
+ *
+ * @param loader the ClassLoader to use
+ * @return a new WSContractProvider
+ */
+ public static WSContractProvider newInstance(ClassLoader loader)
+ {
+ ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(loader);
+ WSContractProviderFactory factory = (WSContractProviderFactory)
+ FactoryLoader.loadFactory(PROVIDER_PROPERTY, DEFAULT_PROVIDER);
+ return factory.createProvider(loader);
+ }
+ finally{
+ Thread.currentThread().setContextClassLoader(oldLoader);
+ }
+ }
+
+ /**
+ * Enables/Disables WSDL generation.
+ *
+ * @param generateWsdl whether or not to generate WSDL
+ */
+ public abstract void setGenerateWsdl(boolean generateWsdl);
+
+ /**
+ * Enables/Disables Java source generation.
+ *
+ * @param generateSource whether or not to generate Java source.
+ */
+ public abstract void setGenerateSource(boolean generateSource);
+
+ /**
+ * Sets the main output directory. If the directory does not exist, it will be
created.
+ *
+ * @param directory the root directory for generated files
+ */
+ public abstract void setOutputDirectory(File directory);
+
+ /**
+ * Sets the resource directory. This directory will contain any generated
+ * WSDL and XSD files. If the directory does not exist, it will be created.
+ * If not specified, the output directory will be used instead.
+ *
+ * @param directory the root directory for generated resource files
+ */
+ public abstract void setResourceDirectory(File directory);
+
+ /**
+ * Sets the source directory. This directory will contain any generated Java source.
+ * If the directory does not exist, it will be created. If not specified,
+ * the output directory will be used instead.
+ *
+ * @param directory the root directory for generated source code
+ */
+ public abstract void setSourceDirectory(File directory);
+
+ /**
+ * Sets the ClassLoader used to discover types. This defaults to the one used
+ * in instantiation.
+ *
+ * @param loader the ClassLoader to use
+ */
+ public abstract void setClassLoader(ClassLoader loader);
+
+ /**
+ * Generates artifacts using the current settings. This method may be invoked
+ * more than once (e.g. multiple endpoints).
+ *
+ * @param endpointClass the name of the endpoint implementation bean
+ * @throws RuntimeException if any error occurs during processing, or the class is not
found
+ */
+ public abstract void provide(String endpointClass);
+
+ /**
+ * Generates artifacts using the current settings. This method may be invoked
+ * more than once (e.g. multiple endpoints).
+ *
+ * @param endpointClass the endpoint implementation bean
+ * @throws RuntimeException if any error occurs during processing
+ */
+ public abstract void provide(Class<?> endpointClass);
+
+ /**
+ * Sets the PrintStream to use for status feedback. The simplest example
+ * would be to use System.out.
+ *
+ * <p>Example output:</p>
+ * <pre>
+ * Generating WSDL:
+ * TestMeService.wsdl
+ * Writing Source:
+ * org/jboss/ws/tools/jaxws/TestMe.java
+ * org/jboss/ws/tools/jaxws/TestMeResponse.java
+ * Writing Classes:
+ * org/jboss/ws/tools/jaxws/TestMe.class
+ * org/jboss/ws/tools/jaxws/TestMeResponse.class
+ * </pre>
+ * @param messageStream the stream to use for status messages:
+ */
+ public abstract void setMessageStream(PrintStream messageStream);
+}
Property changes on:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProviderFactory.java
(from rev 3289,
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/spi/WSContractProviderFactory.java)
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProviderFactory.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProviderFactory.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This 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 (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.tools;
+
+import org.jboss.wsf.spi.tools.WSContractProvider;
+
+/**
+ * WSContractProviderFactory defines the contract for a WSContractProvider factory.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ */
+public interface WSContractProviderFactory
+{
+ /**
+ * Create a new WSContractProvider. There are no restrictions on how this
+ * should be performed. The passed ClassLoader is the one used in
+ * {@link WSContractProvider#newInstance(ClassLoader)}. This loader
+ * should be made available to the generated WSContractProvider.
+ *
+ * @param loader the ClassLoader for type discovery
+ * @return a new WSContractProvider
+ */
+ public WSContractProvider createProvider(ClassLoader loader);
+}
Property changes on:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProviderFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/package.html
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/package.html
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/package.html 2007-05-30
07:21:11 UTC (rev 3296)
@@ -0,0 +1,187 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+</head>
+<body bgcolor="white">
+
+Provides classes and interfaces for handling text, dates, numbers, currency, messages
and
+collation in a manner independent of natural languages. This means your main
application
+or applet can be written to be language-independent, and it can rely upon
+separate, dynamically-linked localized resources. This allows the flexibility
+of adding localizations for new localizations at any time.
+<p>
+These classes are capable of formatting dates, numbers, and messages, parsing;
+searching and sorting strings; and iterating over characters, words, sentences,
+and line breaks. This package contains three main groups of classes and
+interfaces:
+<ul>
+<li>Classes for formatting and parsing
+<li>Classes for iteration over text
+<li>Classes for string collation
+</ul>
+
+
+</ul>
+<h3>Formatting and Parsing</h3>
+
+<em>Formatting</em> is the conversion of number and date objects to
+strings. <em>P</em><em>arsing</em> is the reverse operation of
+converting strings into number and date objects.
+<p>
+
+Dates and numbers are represented internally in a
+locale-independent way. For example, dates are kept as milliseconds
+since January 1, 1970, 00:00:00 UCT. When these objects are printed or
+displayed, they must be converted to localized strings. The
+locale-specific parts of a date string, such as the time zone string,
+are separately imported from a locale-specific resource bundle.
+<p>
+
+The <code>format()</code> method converts the <code>Date</code>
+object from -604656780000 milliseconds to the form "Tuesday, November
+3, 1997 9:47am CST" for the U. S. English locale. The figure shows how the
+<code>format()</code> method of subclasses of
<code>Format</code>
+enable instances of <code>Number</code>, <code>Date</code>,
+<code>String</code>, and other objects to be formatted to
+locale-specific strings.
+<p>
+
+Conversely, the <code>parseObject()</code> method (and
+<code>parse()</code> method in subclasses) perform the reverse
+operation of parsing localized strings and converting them to
+<code>Number</code>, <code>Date</code>,<code>
</code>and
+<code>String</code> objects. The figure
+shows how the <code>parse()</code> method is complementary to
+<code>format()</code>. Any <code>String</code> formatted by
+<code>format()</code> is guaranteed to be parseable by
+<code>parseObject()</code>.
+<p>
+
+Java provides six subclasses of {@link Format} for formatting
+dates, numbers, and messages: {@link DateFormat},
+{@link SimpleDateFormat}, {@link NumberFormat},
+{@link DecimalFormat}, {@link ChoiceFormat}, and
+{@link MessageFormat}.
+
+<h3>String Collation</h3>
+
+The term "<em>collate"</em> means to determine the proper sort
+sequence for two or more strings. It can also tell if two strings
+match, for searching. The <code>Collator</code> class and its subclass
+<code>RuleBasedCollator</code> perform locale-sensitive string
+comparison. You use these classes to build searching and alphabetical
+sorting routines for natural language text. They can distinguish
+characters based on the base character, accent marks, and
+uppercase/lowercase properties.
+<p>
+
+{@link Collator} is an abstract base class. Subclasses
+implement specific collation strategies. One subclass,
+{@link RuleBasedCollator}, is currently provided and is
+applicable to a wide set of languages. Other subclasses may be created
+to handle more specialized
+needs. {@link CollationElementIterator} provides an iterator for
+stepping through each character of a locale-specific string according
+to the rules of a specific <code>Collator</code>
+object. {@link CollationKey} enables fast sorting of strings by
+representing a string as a sort key under the rules of a specific
+<code>Collator</code> object.
+
+<h3>Word Breaks</h3>
+
+While the Java types <code>char</code> and
<code>Character</code>
+represent Unicode characters, sometimes Unicode characters combine to
+form a more complex character that has its own semantic value, a
+<em>user character</em>. The {@link BreakIterator} class makes it
+possible to iterate over these user characters. A break iterator can
+find the location of character, word, or sentence boundaries or
+potential line-break boundaries. This makes it possible for a program
+to properly select characters for text operations such as highlighting
+a character, cutting a word, moving to the next sentence, or
+word-wrapping at a line ending. These operations are performed in a
+locale-sensitive manner, meaning that they honor the boundaries of
+text for a particular locale.
+
+
+<h3>Locale-Sensitive Classes</h3>
+
+Many, but not all, of the classes in java.text are locale-sensitive,
+meaning you have to create a different instance for each locale. The
+following table lists which are locale-sensitive and which are not.
+<p>
+
+<table border=1 cellspacing=0 cellpadding=6>
+<tr valign=top>
+<td>
+<b>Locale-Sensitive Classes</b><br>
+
+NumberFormat<br>
+DecimalFormat<br>
+DecimalFormatSymbols<br>
+MessageFormat<br>
+DateFormat<br>
+SimpleDateFormat<br>
+DateFormatSymbols<br>
+Collator<br>
+RuleBasedCollator<br>
+CollationElementIterator<br>
+CollationKey<br>
+BreakIterator<br>
+</td>
+
+<td>
+<b>Locale-Independent Classes</b><br>
+
+Format<br>
+ChoiceFormat<br>
+FieldPosition<br>
+ParsePosition<br>
+ParseException<br>
+StringCharacterIterator<br>
+CharacterIterator
+</td>
+</tr>
+
+</table>
+
+<p>
+
+
+<h2>Package Specification</h2>
+
+ (none)
+
+
+<h2>Related Documentation </h2>
+
+The following classes are used by the java.text classes.
+<ul>
+ <li>{@link java.lang.Character} (for getType)
+ <li>{@link java.util.Locale}
+ <li>{@link java.util.Calendar}
+ <li>{@link java.util.GregorianCalendar}
+ <li>{@link java.util.Date}
+ <li>{@link java.util.ResourceBundle}
+ <li>{@link java.util.ListResourceBundle}
+ <li>{@link java.util.PropertyResourceBundle}
+ <li>{@link java.util.TimeZone}
+ <li>{@link java.util.SimpleTimeZone}
+</ul>
+
+
+For overviews, tutorials, examples, guides, and tool documentation, please see:
+<ul>
+ <li><a
href="http://java.sun.com/products/jdk/1.1/docs/guide/intl/index.htm...
1.1.x Internationalization Documentation</a>
+
+ <li><a
href="http://java.sun.com/products/jdk/1.2/docs/guide/intl/index.htm...
1.2.x Input Method Framework Documentation</a>
+</ul>
+<br>
+
+@since JDK1.1
+
+
+<!-- This file was created with Quadralay WebWorks Publisher 3.5.0 -->
+<!-- Last updated: Thu Jan 15 10:16:56 1998 -->
+
+</body>
+</html>
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/wsconsume.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/wsconsume.java 2007-05-30
07:17:39 UTC (rev 3295)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/wsconsume.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -28,7 +28,7 @@
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.Path;
-import org.jboss.wsf.spi.tools.api.WSContractConsumer;
+import org.jboss.wsf.spi.tools.WSContractConsumer;
import java.io.File;
import java.io.PrintStream;
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/wsprovide.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/wsprovide.java 2007-05-30
07:17:39 UTC (rev 3295)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/wsprovide.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -31,7 +31,7 @@
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
-import org.jboss.wsf.spi.tools.api.WSContractProvider;
+import org.jboss.wsf.spi.tools.WSContractProvider;
import java.io.File;
import java.io.PrintStream;
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/command/wsconsume.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/command/wsconsume.java 2007-05-30
07:17:39 UTC (rev 3295)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/command/wsconsume.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -23,7 +23,7 @@
import gnu.getopt.Getopt;
import gnu.getopt.LongOpt;
-import org.jboss.wsf.spi.tools.api.WSContractConsumer;
+import org.jboss.wsf.spi.tools.WSContractConsumer;
import java.io.File;
import java.io.PrintStream;
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/command/wsprovide.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/command/wsprovide.java 2007-05-30
07:17:39 UTC (rev 3295)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/command/wsprovide.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -24,7 +24,7 @@
import gnu.getopt.Getopt;
import gnu.getopt.LongOpt;
import org.jboss.wsf.spi.utils.JavaUtils;
-import org.jboss.wsf.spi.tools.api.WSContractProvider;
+import org.jboss.wsf.spi.tools.WSContractProvider;
import java.io.File;
import java.io.PrintStream;
Modified:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerFactoryImpl.java
===================================================================
---
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerFactoryImpl.java 2007-05-30
07:17:39 UTC (rev 3295)
+++
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerFactoryImpl.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -21,8 +21,8 @@
*/
package org.jboss.wsf.stack.sunri.tools;
-import org.jboss.wsf.spi.tools.spi.WSContractConsumerFactory;
-import org.jboss.wsf.spi.tools.api.WSContractConsumer;
+import org.jboss.wsf.spi.tools.WSContractConsumerFactory;
+import org.jboss.wsf.spi.tools.WSContractConsumer;
/**
* Creates a WSContractConsumer that delegates to the Sun RI.
Modified:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerImpl.java
===================================================================
---
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerImpl.java 2007-05-30
07:17:39 UTC (rev 3295)
+++
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerImpl.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -21,7 +21,7 @@
*/
package org.jboss.wsf.stack.sunri.tools;
-import org.jboss.wsf.spi.tools.api.WSContractConsumer;
+import org.jboss.wsf.spi.tools.WSContractConsumer;
import java.io.File;
import java.io.PrintStream;
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderFactoryImpl.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderFactoryImpl.java 2007-05-30
07:17:39 UTC (rev 3295)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderFactoryImpl.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.tools.jaxws.impl;
-import org.jboss.wsf.spi.tools.api.WSContractProvider;
-import org.jboss.wsf.spi.tools.spi.WSContractProviderFactory;
+import org.jboss.wsf.spi.tools.WSContractProvider;
+import org.jboss.wsf.spi.tools.WSContractProviderFactory;
/**
* Creates a JBossWS WSContractProvider implementation.
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-05-30
07:17:39 UTC (rev 3295)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -28,7 +28,7 @@
import static org.jboss.wsf.spi.deployment.Deployment.DeploymentType.JAXWS_EJB3;
import static org.jboss.wsf.spi.deployment.Deployment.DeploymentType.JAXWS_JSE;
import org.jboss.ws.integration.ResourceLoaderAdapter;
-import org.jboss.wsf.spi.tools.api.WSContractProvider;
+import org.jboss.wsf.spi.tools.WSContractProvider;
import org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerFactoryImpl.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerFactoryImpl.java 2007-05-30
07:17:39 UTC (rev 3295)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerFactoryImpl.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.tools.jaxws.impl;
-import org.jboss.wsf.spi.tools.api.WSContractConsumer;
-import org.jboss.wsf.spi.tools.spi.WSContractConsumerFactory;
+import org.jboss.wsf.spi.tools.WSContractConsumer;
+import org.jboss.wsf.spi.tools.WSContractConsumerFactory;
/**
* Creates a WSContractConsumer that delegates to the Sun RI.
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2007-05-30
07:17:39 UTC (rev 3295)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -22,7 +22,7 @@
package org.jboss.ws.tools.jaxws.impl;
import com.sun.tools.ws.wscompile.WsimportTool;
-import org.jboss.wsf.spi.tools.api.WSContractConsumer;
+import org.jboss.wsf.spi.tools.WSContractConsumer;
import java.io.File;
import java.io.PrintStream;
Modified:
trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
===================================================================
---
trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java 2007-05-30
07:17:39 UTC (rev 3295)
+++
trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java 2007-05-30
07:21:11 UTC (rev 3296)
@@ -28,7 +28,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
-import org.jboss.wsf.spi.tools.api.WSContractProvider;
+import org.jboss.wsf.spi.tools.WSContractProvider;
import org.jboss.wsf.spi.utils.JavaUtils;
/**