You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-commits@ws.apache.org by sc...@apache.org on 2005/08/02 18:30:44 UTC
svn commit: r227033 [8/27] - in /webservices/wsrf/trunk: ./
src/java/org/apache/ws/ src/java/org/apache/ws/addressing/
src/java/org/apache/ws/addressing/v2003_03/
src/java/org/apache/ws/addressing/v2004_08_10/
src/java/org/apache/ws/resource/ src/java/...
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/impl/MetadataExchangePortTypeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/impl/MetadataExchangePortTypeImpl.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/impl/MetadataExchangePortTypeImpl.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/impl/MetadataExchangePortTypeImpl.java Tue Aug 2 09:28:49 2005
@@ -1,292 +1,321 @@
-/*=============================================================================*
- * Copyright 2005 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.ws.resource.metadataexchange.v2004_09.porttype.impl;
-
-import org.apache.ws.resource.AbstractPortType;
-import org.apache.ws.resource.ResourceContext;
-import org.apache.ws.resource.metadataexchange.v2004_09.MetadataExchangeConstants;
-import org.apache.ws.resource.metadataexchange.v2004_09.porttype.MetadataExchangePortType;
-import org.apache.ws.resource.properties.NamespaceVersionHolder;
-import org.apache.ws.resource.properties.v2004_11.impl.NamespaceVersionHolderImpl;
-import org.apache.ws.util.XmlBeanUtils;
-import org.apache.ws.util.jndi.tools.MetadataConfig;
-import org.apache.ws.util.soap.SoapClient;
-import org.apache.xmlbeans.XmlException;
-import org.apache.xmlbeans.XmlObject;
-import org.xmlsoap.schemas.soap.envelope.Envelope;
-import org.xmlsoap.schemas.soap.envelope.EnvelopeDocument;
-import org.xmlsoap.schemas.soap.envelope.Header;
-import org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI;
-import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
-import org.xmlsoap.schemas.ws.x2004.x09.mex.AnyXmlType;
-import org.xmlsoap.schemas.ws.x2004.x09.mex.GetMetadataDocument;
-import org.xmlsoap.schemas.ws.x2004.x09.mex.LocationDocument;
-import org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataDocument;
-import org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataReferenceDocument;
-import org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataSectionDocument;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * An implementation of the WS-MEX MetadataExchange portType.
- *
- * @author Sal Campana
- */
-public class MetadataExchangePortTypeImpl extends AbstractPortType implements MetadataExchangePortType
-{
- private static final NamespaceVersionHolder NAMESPACE_SET = new NamespaceVersionHolderImpl();
-
- /**
- * Creates a new {@link AbstractPortType} object.
- *
- * @param resourceContext
- */
- public MetadataExchangePortTypeImpl(ResourceContext resourceContext)
- {
- super(resourceContext);
- }
-
- /**
- * WS-MetadataExchange GetMetadata operation.
- *
- * @param request
- * @return MetadataDocument response document
- */
- public MetadataDocument getMetadata(GetMetadataDocument request)
- {
- MetadataConfig metadataConfig = getMetadataConfigFromJNDI();
-
- //prep the response
- MetadataDocument responseDoc = createMetadataResponseDoc();
- MetadataDocument.Metadata responseMetadata = responseDoc.addNewMetadata();
-
- //get the values from the request
- GetMetadataDocument.GetMetadata requestMetadata = request.getGetMetadata();
- String dialect = requestMetadata.getDialect();
- String identifier = requestMetadata.getIdentifier();
-
- //get the metatdata from the config
- // the map is keyed on dialect and keyed to a List of metadata
- // this allows you to build a metadata section per dialect
- Map metadataMap = metadataConfig.getMetadata(dialect, identifier);
- //iterate the returned set and add metadata sections
- Iterator iterator = metadataMap.keySet().iterator();
- while (iterator.hasNext())
- {
- String dialectKey = (String) iterator.next();
- //get the list of metatadata for this dialect
- List metadataList = (List) metadataMap.get(dialectKey);
-
- for (int i = 0; i < metadataList.size(); i++)
- {
- //create a new metadata section
- MetadataSectionDocument.MetadataSection metadataSection = responseMetadata.addNewMetadataSection();
- Object data = metadataList.get(i);
- metadataSection.setDialect(dialectKey);
- if(identifier != null && !"".equals(identifier))
- {
- metadataSection.setIdentifier(identifier);
- }
-
- /** Determine type of metadata to add **/
- if(data instanceof MetadataReferenceDocument)
- {
- //adds a MetadataReference for locating the metadata
- metadataSection.setMetadataReference((EndpointReferenceType) data);
- }
- else if (data instanceof LocationDocument)
- {
- //adds a Location for locating the metadata
- metadataSection.setLocation(((LocationDocument) data).getLocation());
- }
- else
- {
- //else its the metadata document and must be added as a child for the "any"
- XmlBeanUtils.addChildElement(metadataSection, (XmlObject) data);
- }
- }
- }
- getResourceContext().setResponseAction( URI.create( MetadataExchangeConstants.ACTION_GETMETADATA_RESPONSE ) );
- return responseDoc;
- }
-
- private MetadataConfig getMetadataConfigFromJNDI()
- {
- String metadataJndiContextName = getMetadataJndiContextName();
- try
- {
- return (MetadataConfig) new InitialContext().lookup(metadataJndiContextName);
- }
- catch ( NamingException ne )
- {
- throw new RuntimeException( "Unable to retrieve WS-MetadataExchange configuration.", ne);
- }
- }
-
- /**
- * Returns the JNDI Contrext name for looking up the metadata
- *
- * @return
- */
- private String getMetadataJndiContextName()
- {
- return org.apache.ws.resource.JndiConstants.CONTEXT_NAME_SERVICES + "/" + getResourceContext().getServiceName() + "/" + org.apache.ws.resource.JndiConstants.ATOMIC_METADATA_CONTEXT;
- }
-
- /**
- * Creates the response object for a GetMetadata request
- *
- * @return empty MetadataDocument
- */
- private MetadataDocument createMetadataResponseDoc()
- {
- MetadataDocument metadataDocument = MetadataDocument.Factory.newInstance();
- return metadataDocument;
- }
-
- /**
- * WS-MetadataExchange Get operation.
- *
- * @return AnyXmlType response document.
- */
- public AnyXmlType get()
- {
- AnyXmlType anyXmlType = AnyXmlType.Factory.newInstance();
- MetadataConfig metadataConfig = getMetadataConfigFromJNDI();
-
- //get all the registered metadata
- Map allMetadata = metadataConfig.getAllMetadata();
- Iterator iterator = allMetadata.values().iterator();
- while (iterator.hasNext())
- {
- List metadataList = (List) iterator.next();
- for (int i = 0; i < metadataList.size(); i++)
- {
- Object metadata = metadataList.get(i);
-
- /** Determine type of metadata to add **/
- if(metadata instanceof MetadataReferenceDocument)
- {
- //must load actual metadata using MetadataReference
- try
- {
- metadata = loadMetadataFromEPR(((MetadataReferenceDocument) metadata).getMetadataReference());
- }
- catch (Exception e)
- {
- throw new RuntimeException( "Unable to retrieve metadata from the configured EPR: " + metadata, e);
- }
- }
- else if (metadata instanceof LocationDocument)
- {
- try
- {
- metadata = loadMetadataFromURL(((LocationDocument) metadata).getLocation());
- }
- catch (Exception e)
- {
- //not sure if we should ignore a problem and send the rest...
- throw new RuntimeException( "Unable to retrieve metadata from the configured URL: " + ((LocationDocument) metadata).getLocation(), e);
- }
- }
- XmlBeanUtils.addChildElement(anyXmlType, (XmlObject) metadata);
- }
- }
- getResourceContext().setResponseAction( URI.create( MetadataExchangeConstants.ACTION_GET_RESPONSE ) );
- return anyXmlType;
- }
-
- /**
- * Loads metadata off of a URL.
- *
- * @param s
- * @return
- * @throws IOException
- * @throws XmlException
- */
- private Object loadMetadataFromURL(String s) throws IOException, XmlException
- {
- return XmlObject.Factory.parse(new URL(s));
- }
-
- /**
- * Loads metadata off of an EPR.
- *
- * @param epr
- * @return
- * @throws IOException
- * @throws URISyntaxException
- * @throws XmlException
- */
- private Object loadMetadataFromEPR(EndpointReferenceType epr) throws IOException, URISyntaxException, XmlException
- {
- String address = epr.getAddress().getStringValue();
- //send WS-MEX Get request
- EnvelopeDocument envelope = buildSoapEnvelopeForGet(address, epr);
- String response = SoapClient.sendRequest(new URL(address),envelope.newInputStream(),new URI(MetadataExchangeConstants.ACTION_GET_REQUEST));
- return XmlObject.Factory.parse(response);
- }
-
- /**
- * Builds a SOAP Envelope based on the EPR and makes a request to retrieve the metadata.
- *
- * @param address
- * @param endpointReferenceType
- * @return The SOAP Envelope for making a request.
- */
- private EnvelopeDocument buildSoapEnvelopeForGet(String address, EndpointReferenceType endpointReferenceType)
- {
- EnvelopeDocument envelopeDocument = EnvelopeDocument.Factory.newInstance();
- Envelope envelope = envelopeDocument.addNewEnvelope();
- envelope.addNewBody();
- Header header = envelope.addNewHeader();
- XmlObject toElem;
- XmlObject actionElem;
- org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument toDoc = org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument.Factory.newInstance();
- AttributedURI attributedURI = toDoc.addNewTo();
- attributedURI.setStringValue(address);
- toElem = toDoc;
- org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument actionDoc = org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument.Factory.newInstance();
- AttributedURI actionType = actionDoc.addNewAction();
- actionType.setStringValue( MetadataExchangeConstants.ACTION_GET_REQUEST );
- actionElem = actionDoc;
-
- XmlBeanUtils.addChildElement( header, toElem );
- XmlBeanUtils.addChildElement( header, actionElem );
- if (endpointReferenceType.getReferenceProperties() != null)
- {
- XmlObject[] refPropElems = XmlBeanUtils.getChildElements(endpointReferenceType.getReferenceProperties());
- for (int i = 0; i < refPropElems.length; i++)
- {
- XmlBeanUtils.addChildElement(header, refPropElems[i]);
- }
- }
- return envelopeDocument;
- }
-
- protected NamespaceVersionHolder getNamespaceSet()
- {
- return NAMESPACE_SET;
- }
-}
+/*=============================================================================*
+ * 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.ws.resource.metadataexchange.v2004_09.porttype.impl;
+
+import org.apache.ws.resource.AbstractPortType;
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.metadataexchange.v2004_09.MetadataExchangeConstants;
+import org.apache.ws.resource.metadataexchange.v2004_09.porttype.MetadataExchangePortType;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.v2004_11.impl.NamespaceVersionHolderImpl;
+import org.apache.ws.util.XmlBeanUtils;
+import org.apache.ws.util.jndi.tools.MetadataConfig;
+import org.apache.ws.util.soap.SoapClient;
+import org.apache.xmlbeans.XmlException;
+import org.apache.xmlbeans.XmlObject;
+import org.xmlsoap.schemas.soap.envelope.Envelope;
+import org.xmlsoap.schemas.soap.envelope.EnvelopeDocument;
+import org.xmlsoap.schemas.soap.envelope.Header;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.AnyXmlType;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.GetMetadataDocument;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.LocationDocument;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataDocument;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataReferenceDocument;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataSectionDocument;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * An implementation of the WS-MEX MetadataExchange portType.
+ *
+ * @author Sal Campana
+ */
+public class MetadataExchangePortTypeImpl
+ extends AbstractPortType
+ implements MetadataExchangePortType
+{
+ private static final NamespaceVersionHolder NAMESPACE_SET = new NamespaceVersionHolderImpl( );
+
+ /**
+ * Creates a new {@link AbstractPortType} object.
+ *
+ * @param resourceContext
+ */
+ public MetadataExchangePortTypeImpl( ResourceContext resourceContext )
+ {
+ super( resourceContext );
+ }
+
+ /**
+ * WS-MetadataExchange GetMetadata operation.
+ *
+ * @param request
+ * @return MetadataDocument response document
+ */
+ public MetadataDocument getMetadata( GetMetadataDocument request )
+ {
+ MetadataConfig metadataConfig = getMetadataConfigFromJNDI( );
+
+ //prep the response
+ MetadataDocument responseDoc = createMetadataResponseDoc( );
+ MetadataDocument.Metadata responseMetadata = responseDoc.addNewMetadata( );
+
+ //get the values from the request
+ GetMetadataDocument.GetMetadata requestMetadata = request.getGetMetadata( );
+ String dialect = requestMetadata.getDialect( );
+ String identifier = requestMetadata.getIdentifier( );
+
+ //get the metatdata from the config
+ // the map is keyed on dialect and keyed to a List of metadata
+ // this allows you to build a metadata section per dialect
+ Map metadataMap = metadataConfig.getMetadata( dialect, identifier );
+
+ //iterate the returned set and add metadata sections
+ Iterator iterator = metadataMap.keySet( ).iterator( );
+ while ( iterator.hasNext( ) )
+ {
+ String dialectKey = (String) iterator.next( );
+
+ //get the list of metatadata for this dialect
+ List metadataList = (List) metadataMap.get( dialectKey );
+
+ for ( int i = 0; i < metadataList.size( ); i++ )
+ {
+ //create a new metadata section
+ MetadataSectionDocument.MetadataSection metadataSection = responseMetadata.addNewMetadataSection( );
+ Object data = metadataList.get( i );
+ metadataSection.setDialect( dialectKey );
+ if ( ( identifier != null ) && !"".equals( identifier ) )
+ {
+ metadataSection.setIdentifier( identifier );
+ }
+
+ /** Determine type of metadata to add **/
+ if ( data instanceof MetadataReferenceDocument )
+ {
+ //adds a MetadataReference for locating the metadata
+ metadataSection.setMetadataReference( (EndpointReferenceType) data );
+ }
+ else if ( data instanceof LocationDocument )
+ {
+ //adds a Location for locating the metadata
+ metadataSection.setLocation( ( (LocationDocument) data ).getLocation( ) );
+ }
+ else
+ {
+ //else its the metadata document and must be added as a child for the "any"
+ XmlBeanUtils.addChildElement( metadataSection, (XmlObject) data );
+ }
+ }
+ }
+
+ getResourceContext( ).setResponseAction( URI.create( MetadataExchangeConstants.ACTION_GETMETADATA_RESPONSE ) );
+ return responseDoc;
+ }
+
+ /**
+ * WS-MetadataExchange Get operation.
+ *
+ * @return AnyXmlType response document.
+ */
+ public AnyXmlType get( )
+ {
+ AnyXmlType anyXmlType = AnyXmlType.Factory.newInstance( );
+ MetadataConfig metadataConfig = getMetadataConfigFromJNDI( );
+
+ //get all the registered metadata
+ Map allMetadata = metadataConfig.getAllMetadata( );
+ Iterator iterator = allMetadata.values( ).iterator( );
+ while ( iterator.hasNext( ) )
+ {
+ List metadataList = (List) iterator.next( );
+ for ( int i = 0; i < metadataList.size( ); i++ )
+ {
+ Object metadata = metadataList.get( i );
+
+ /** Determine type of metadata to add **/
+ if ( metadata instanceof MetadataReferenceDocument )
+ {
+ //must load actual metadata using MetadataReference
+ try
+ {
+ metadata =
+ loadMetadataFromEPR( ( (MetadataReferenceDocument) metadata ).getMetadataReference( ) );
+ }
+ catch ( Exception e )
+ {
+ throw new RuntimeException( "Unable to retrieve metadata from the configured EPR: " + metadata, e );
+ }
+ }
+ else if ( metadata instanceof LocationDocument )
+ {
+ try
+ {
+ metadata = loadMetadataFromURL( ( (LocationDocument) metadata ).getLocation( ) );
+ }
+ catch ( Exception e )
+ {
+ //not sure if we should ignore a problem and send the rest...
+ throw new RuntimeException( "Unable to retrieve metadata from the configured URL: "
+ + ( (LocationDocument) metadata ).getLocation( ), e );
+ }
+ }
+
+ XmlBeanUtils.addChildElement( anyXmlType, (XmlObject) metadata );
+ }
+ }
+
+ getResourceContext( ).setResponseAction( URI.create( MetadataExchangeConstants.ACTION_GET_RESPONSE ) );
+ return anyXmlType;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ protected NamespaceVersionHolder getNamespaceSet( )
+ {
+ return NAMESPACE_SET;
+ }
+
+ private MetadataConfig getMetadataConfigFromJNDI( )
+ {
+ String metadataJndiContextName = getMetadataJndiContextName( );
+ try
+ {
+ return (MetadataConfig) new InitialContext( ).lookup( metadataJndiContextName );
+ }
+ catch ( NamingException ne )
+ {
+ throw new RuntimeException( "Unable to retrieve WS-MetadataExchange configuration.", ne );
+ }
+ }
+
+ /**
+ * Returns the JNDI Contrext name for looking up the metadata
+ *
+ * @return
+ */
+ private String getMetadataJndiContextName( )
+ {
+ return org.apache.ws.resource.JndiConstants.CONTEXT_NAME_SERVICES + "/"
+ + getResourceContext( ).getServiceName( ) + "/"
+ + org.apache.ws.resource.JndiConstants.ATOMIC_METADATA_CONTEXT;
+ }
+
+ /**
+ * Builds a SOAP Envelope based on the EPR and makes a request to retrieve the metadata.
+ *
+ * @param address
+ * @param endpointReferenceType
+ * @return The SOAP Envelope for making a request.
+ */
+ private EnvelopeDocument buildSoapEnvelopeForGet( String address,
+ EndpointReferenceType endpointReferenceType )
+ {
+ EnvelopeDocument envelopeDocument = EnvelopeDocument.Factory.newInstance( );
+ Envelope envelope = envelopeDocument.addNewEnvelope( );
+ envelope.addNewBody( );
+ Header header = envelope.addNewHeader( );
+ XmlObject toElem;
+ XmlObject actionElem;
+ org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument toDoc =
+ org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument.Factory.newInstance( );
+ AttributedURI attributedURI = toDoc.addNewTo( );
+ attributedURI.setStringValue( address );
+ toElem = toDoc;
+ org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument actionDoc =
+ org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument.Factory.newInstance( );
+ AttributedURI actionType = actionDoc.addNewAction( );
+ actionType.setStringValue( MetadataExchangeConstants.ACTION_GET_REQUEST );
+ actionElem = actionDoc;
+
+ XmlBeanUtils.addChildElement( header, toElem );
+ XmlBeanUtils.addChildElement( header, actionElem );
+ if ( endpointReferenceType.getReferenceProperties( ) != null )
+ {
+ XmlObject[] refPropElems =
+ XmlBeanUtils.getChildElements( endpointReferenceType.getReferenceProperties( ) );
+ for ( int i = 0; i < refPropElems.length; i++ )
+ {
+ XmlBeanUtils.addChildElement( header, refPropElems[i] );
+ }
+ }
+
+ return envelopeDocument;
+ }
+
+ /**
+ * Creates the response object for a GetMetadata request
+ *
+ * @return empty MetadataDocument
+ */
+ private MetadataDocument createMetadataResponseDoc( )
+ {
+ MetadataDocument metadataDocument = MetadataDocument.Factory.newInstance( );
+ return metadataDocument;
+ }
+
+ /**
+ * Loads metadata off of an EPR.
+ *
+ * @param epr
+ * @return
+ * @throws IOException
+ * @throws URISyntaxException
+ * @throws XmlException
+ */
+ private Object loadMetadataFromEPR( EndpointReferenceType epr )
+ throws IOException,
+ URISyntaxException,
+ XmlException
+ {
+ String address = epr.getAddress( ).getStringValue( );
+
+ //send WS-MEX Get request
+ EnvelopeDocument envelope = buildSoapEnvelopeForGet( address, epr );
+ String response =
+ SoapClient.sendRequest( new URL( address ),
+ envelope.newInputStream( ),
+ new URI( MetadataExchangeConstants.ACTION_GET_REQUEST ) );
+ return XmlObject.Factory.parse( response );
+ }
+
+ /**
+ * Loads metadata off of a URL.
+ *
+ * @param s
+ * @return
+ * @throws IOException
+ * @throws XmlException
+ */
+ private Object loadMetadataFromURL( String s )
+ throws IOException,
+ XmlException
+ {
+ return XmlObject.Factory.parse( new URL( s ) );
+ }
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/MetaDataViolationException.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/MetaDataViolationException.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/MetaDataViolationException.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/MetaDataViolationException.java Tue Aug 2 09:28:49 2005
@@ -15,6 +15,7 @@
*=============================================================================*/
package org.apache.ws.resource.properties;
+
/**
* Indicates a violation of the metadata constraints associated with a resource properties document.
*
@@ -23,7 +24,6 @@
public class MetaDataViolationException
extends RuntimeException
{
-
/**
* Creates a new {@link MetaDataViolationException} object.
*
@@ -33,5 +33,4 @@
{
super( message );
}
-
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/NamespaceVersionHolder.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/NamespaceVersionHolder.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/NamespaceVersionHolder.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/NamespaceVersionHolder.java Tue Aug 2 09:28:49 2005
@@ -1,21 +1,72 @@
-package org.apache.ws.resource.properties;
-
-/**
- * Interface used for maintaining a set of versions of namespaces for
- * a given collection of specifications.
- *
- * The point to this interface is as each draft of the WSRF specifications
- * come out, we can have an impl which will point us to all the correct
- * namespaces for use in polymorphic-versionless class....
- *
- * @author Sal Campana
- */
-public interface NamespaceVersionHolder
-{
- String getPropertiesXsdNamespace();
- String getLifetimeXsdNamespace();
- String getBaseFaultsXsdNamespace();
- String getAddressingNamespace();
- String getServiceGroupsXsdNamespace();
- String getMetadataExchangeNamespace();
-}
+/*=============================================================================*
+ * 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.ws.resource.properties;
+
+
+/**
+ * Interface used for maintaining a set of versions of namespaces for
+ * a given collection of specifications.
+ *
+ * The point to this interface is as each draft of the WSRF specifications
+ * come out, we can have an impl which will point us to all the correct
+ * namespaces for use in polymorphic-versionless class....
+ *
+ * @author Sal Campana
+ */
+public interface NamespaceVersionHolder
+{
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ String getAddressingNamespace( );
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ String getBaseFaultsXsdNamespace( );
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ String getLifetimeXsdNamespace( );
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ String getMetadataExchangeNamespace( );
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ String getPropertiesXsdNamespace( );
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ String getServiceGroupsXsdNamespace( );
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourceProperty.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourceProperty.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourceProperty.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourceProperty.java Tue Aug 2 09:28:49 2005
@@ -17,7 +17,6 @@
import org.apache.commons.lang.SerializationException;
import org.w3c.dom.Element;
-
import javax.xml.soap.SOAPElement;
import java.util.Iterator;
@@ -27,136 +26,138 @@
*/
public interface ResourceProperty
{
- /**
- * Returns <tt>true</tt> if, and only if, this property contains no elements.
- *
- * @return <tt>true</tt> if, and only if, this property contains no elements
- */
- boolean isEmpty();
-
- /**
- * Gets meta data of this resource property.
- *
- * @return meta data of this resource property.
- */
- ResourcePropertyMetaData getMetaData();
-
- /**
- * Returns the resource property set that contains this property.
- *
- * @return the resource property set that contains this property.
- */
- ResourcePropertySet getSet();
-
- /**
- * Adds a value.
- *
- * @param value the value to add.
- *
- * @throws MetaDataViolationException if the name of the element to be added does not match the name associated with this property
- */
- void add( Object value );
-
- /**
- * Removes all values.
- */
- void clear();
-
- /**
- * Retrieves a value at a specific index.
- *
- * @param index the index of value to retrieve.
- *
- * @return the value at the given index. This operation might fail if the index is out of bounds.
- */
- Object get( int index );
-
- /**
- * Returns an iterator over the property elements.
- *
- * @return an iterator over the property elements
- */
- Iterator iterator();
-
- /**
- * Removes the first property element with the specified value.
- *
- * @param value value of a property element to remove
- *
- * @return true if, and only if, a property element was removed
- */
- boolean remove( Object value );
-
- /**
- * Sets a value at a specific index.
- *
- * @param index the index to set value at.
- * @param value the new value
- */
- void set( int index, Object value );
-
- /**
- * Returns the number of values in the resource property.
- *
- * @return the number of values.
- */
- int size();
-
- /**
- * Converts the resource property into an array of DOM {@link Element}s. If the RP has no values (is null), and RP
- * element was defined as: <ul> <li>minOccurs >= 0 - the function returns null.</li> <li>nillable == true - the
- * function returns a single element with <i>xsi:nil="true"</i> attribute set.</li> </ul>
- *
- * @return the resource property as a DOM Element array
- *
- * @throws SerializationException if conversion fails
- */
- Element[] toElements() throws SerializationException;
-
- /**
- * Converts the resource property value into an array of {@link SOAPElement}s. If the RP has no values (is null),
- * and RP element was defined as: <ul> <li>minOccurs >= 0 - the function returns null.</li> <li>nillable == true -
- * the function returns a single element with <i>xsi:nil="true"</i> attribute set.</li> </ul>
- *
- * @return the resource property as a SOAPElement array
- *
- * @throws SerializationException if conversion fails
- */
- SOAPElement[] toSOAPElements() throws SerializationException;
-
- /**
- * Returns the XML representation of this property (i.e. the resource property elements).
- *
- * @return the XML representation of this property
- */
- String toXML();
-
- /**
- * Sets a callback for this property.
- *
- * @param callback the callback
- */
- void setCallback( ResourcePropertyCallback callback );
-
- /**
- * Returns the callback for this property, or null if no callback has been set.
- *
- * @return the callback for this property, or null if no callback has been set
- */
- ResourcePropertyCallback getCallBack();
-
- /**
- * Returns the value-change listeners that are registered on this property.
- *
- * @return the value-change listeners that are registered on this property; may be empty, but never null
- */
- ResourcePropertyValueChangeListener[] getChangeListeners();
-
- /**
- * Registers the specified value-change listener on this property.
- *
- * @param listener a property value-change listener
- */
- void addChangeListener( ResourcePropertyValueChangeListener listener );
-
+ /**
+ * Returns the callback for this property, or null if no callback has been set.
+ *
+ * @return the callback for this property, or null if no callback has been set
+ */
+ ResourcePropertyCallback getCallBack( );
+
+ /**
+ * Sets a callback for this property.
+ *
+ * @param callback the callback
+ */
+ void setCallback( ResourcePropertyCallback callback );
+
+ /**
+ * Returns the value-change listeners that are registered on this property.
+ *
+ * @return the value-change listeners that are registered on this property; may be empty, but never null
+ */
+ ResourcePropertyValueChangeListener[] getChangeListeners( );
+
+ /**
+ * Returns <tt>true</tt> if, and only if, this property contains no elements.
+ *
+ * @return <tt>true</tt> if, and only if, this property contains no elements
+ */
+ boolean isEmpty( );
+
+ /**
+ * Gets meta data of this resource property.
+ *
+ * @return meta data of this resource property.
+ */
+ ResourcePropertyMetaData getMetaData( );
+
+ /**
+ * Returns the resource property set that contains this property.
+ *
+ * @return the resource property set that contains this property.
+ */
+ ResourcePropertySet getSet( );
+
+ /**
+ * Adds a value.
+ *
+ * @param value the value to add.
+ *
+ * @throws MetaDataViolationException if the name of the element to be added does not match the name associated with this property
+ */
+ void add( Object value );
+
+ /**
+ * Registers the specified value-change listener on this property.
+ *
+ * @param listener a property value-change listener
+ */
+ void addChangeListener( ResourcePropertyValueChangeListener listener );
+
+ /**
+ * Removes all values.
+ */
+ void clear( );
+
+ /**
+ * Retrieves a value at a specific index.
+ *
+ * @param index the index of value to retrieve.
+ *
+ * @return the value at the given index. This operation might fail if the index is out of bounds.
+ */
+ Object get( int index );
+
+ /**
+ * Returns an iterator over the property elements.
+ *
+ * @return an iterator over the property elements
+ */
+ Iterator iterator( );
+
+ /**
+ * Removes the first property element with the specified value.
+ *
+ * @param value value of a property element to remove
+ *
+ * @return true if, and only if, a property element was removed
+ */
+ boolean remove( Object value );
+
+ /**
+ * Sets a value at a specific index.
+ *
+ * @param index the index to set value at.
+ * @param value the new value
+ */
+ void set( int index,
+ Object value );
+
+ /**
+ * Returns the number of values in the resource property.
+ *
+ * @return the number of values.
+ */
+ int size( );
+
+ /**
+ * Converts the resource property into an array of DOM {@link Element}s. If the RP has no values (is null), and RP
+ * element was defined as: <ul> <li>minOccurs >= 0 - the function returns null.</li> <li>nillable == true - the
+ * function returns a single element with <i>xsi:nil="true"</i> attribute set.</li> </ul>
+ *
+ * @return the resource property as a DOM Element array
+ *
+ * @throws SerializationException if conversion fails
+ */
+ Element[] toElements( )
+ throws SerializationException;
+
+ /**
+ * Converts the resource property value into an array of {@link SOAPElement}s. If the RP has no values (is null),
+ * and RP element was defined as: <ul> <li>minOccurs >= 0 - the function returns null.</li> <li>nillable == true -
+ * the function returns a single element with <i>xsi:nil="true"</i> attribute set.</li> </ul>
+ *
+ * @return the resource property as a SOAPElement array
+ *
+ * @throws SerializationException if conversion fails
+ */
+ SOAPElement[] toSOAPElements( )
+ throws SerializationException;
+
+ /**
+ * Returns the XML representation of this property (i.e. the resource property elements).
+ *
+ * @return the XML representation of this property
+ */
+ String toXML( );
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyCallback.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyCallback.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyCallback.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyCallback.java Tue Aug 2 09:28:49 2005
@@ -1,43 +1,42 @@
-/*=============================================================================*
- * 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.ws.resource.properties;
-
-import org.apache.ws.resource.properties.impl.CallbackFailedException;
-
-/**
- * A callback that should be registered on any property whose value
- * on the managed resource may change. Register the callback by calling
- * {@link ResourceProperty#setCallback(ResourcePropertyCallback)} on the
- * property.
- */
-public interface ResourcePropertyCallback
-{
-
- /**
- * This method is called by the all of the WSRP PortType impls, prior
- * to performing any work, in order to ensure the resource properties
- * accurately reflect the current state of the managed resource.
- *
- * @param prop the property to be refreshed
- *
- * @return the refreshed property
- *
- * @throws CallbackFailedException An exception if the refresh fails on the backend
- * and you want the server to return a fault instead of the current stored value.
- */
- ResourceProperty refreshProperty( ResourceProperty prop ) throws CallbackFailedException;
-
-}
+/*=============================================================================*
+ * 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.ws.resource.properties;
+
+import org.apache.ws.resource.properties.impl.CallbackFailedException;
+
+/**
+ * A callback that should be registered on any property whose value
+ * on the managed resource may change. Register the callback by calling
+ * {@link ResourceProperty#setCallback(ResourcePropertyCallback)} on the
+ * property.
+ */
+public interface ResourcePropertyCallback
+{
+ /**
+ * This method is called by the all of the WSRP PortType impls, prior
+ * to performing any work, in order to ensure the resource properties
+ * accurately reflect the current state of the managed resource.
+ *
+ * @param prop the property to be refreshed
+ *
+ * @return the refreshed property
+ *
+ * @throws CallbackFailedException An exception if the refresh fails on the backend
+ * and you want the server to return a fault instead of the current stored value.
+ */
+ ResourceProperty refreshProperty( ResourceProperty prop )
+ throws CallbackFailedException;
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyMetaData.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyMetaData.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyMetaData.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyMetaData.java Tue Aug 2 09:28:49 2005
@@ -23,6 +23,11 @@
public interface ResourcePropertyMetaData
{
/**
+ * Determines if the ResourceProperty is an XSD:Any
+ */
+ boolean isAny( );
+
+ /**
* Returns the maximum number of values that this resource property can have.
*
* @return the maximum number of values that this resource property can have. Returns {@link Integer#MAX_VALUE
@@ -71,9 +76,4 @@
* container.
*/
ResourceProperty create( ResourcePropertySet propSet );
-
- /**
- * Determines if the ResourceProperty is an XSD:Any
- */
- boolean isAny();
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertySet.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertySet.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertySet.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertySet.java Tue Aug 2 09:28:49 2005
@@ -17,7 +17,6 @@
import org.apache.commons.lang.SerializationException;
import org.w3c.dom.Element;
-
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPElement;
import java.util.Iterator;
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertySetMetaData.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertySetMetaData.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertySetMetaData.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertySetMetaData.java Tue Aug 2 09:28:49 2005
@@ -58,5 +58,4 @@
* Creates a resource property set of the type defined by this metadata.
*/
ResourcePropertySet create( );
-
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyValueChangeEvent.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyValueChangeEvent.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyValueChangeEvent.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyValueChangeEvent.java Tue Aug 2 09:28:49 2005
@@ -1,38 +1,37 @@
-/*
- * 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
- *
+/*=============================================================================*
+ * 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.
- */
+ *
+ * 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.ws.resource.properties;
+
/**
* @author Ian P. Springer (Hewlett-Packard Company)
*/
public interface ResourcePropertyValueChangeEvent
{
+ /**
+ * Returns the new value of the property, as an array of property elements; may be null.
+ *
+ * @return the new value of the property, as an array of property elements; may be null
+ */
+ Object[] getNewValue( );
- /**
- * Returns the old value of the property, as an array of property elements; may be null.
- *
- * @return the old value of the property, as an array of property elements; may be null
- */
- Object[] getOldValue();
-
- /**
- * Returns the new value of the property, as an array of property elements; may be null.
- *
- * @return the new value of the property, as an array of property elements; may be null
- */
- Object[] getNewValue();
-
-}
+ /**
+ * Returns the old value of the property, as an array of property elements; may be null.
+ *
+ * @return the old value of the property, as an array of property elements; may be null
+ */
+ Object[] getOldValue( );
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyValueChangeListener.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyValueChangeListener.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyValueChangeListener.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyValueChangeListener.java Tue Aug 2 09:28:49 2005
@@ -1,18 +1,18 @@
-/*
- * 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
- *
+/*=============================================================================*
+ * 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.
- */
+ *
+ * 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.ws.resource.properties;
import java.util.EventListener;
@@ -20,16 +20,15 @@
/**
* @author Ian P. Springer (Hewlett-Packard Company)
*/
-public interface ResourcePropertyValueChangeListener extends EventListener
+public interface ResourcePropertyValueChangeListener
+ extends EventListener
{
-
- /**
- * A method that is called whenever a particular resource property's value changes as
- * the result of the Insert, Delete, or Update component of a SetResourceProperties
- * request.
- *
- * @param propValueChangeEvent
- */
- void propertyChanged( ResourcePropertyValueChangeEvent propValueChangeEvent );
-
-}
+ /**
+ * A method that is called whenever a particular resource property's value changes as
+ * the result of the Insert, Delete, or Update component of a SetResourceProperties
+ * request.
+ *
+ * @param propValueChangeEvent
+ */
+ void propertyChanged( ResourcePropertyValueChangeEvent propValueChangeEvent );
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/SetResourcePropertyCallback.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/SetResourcePropertyCallback.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/SetResourcePropertyCallback.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/SetResourcePropertyCallback.java Tue Aug 2 09:28:49 2005
@@ -1,59 +1,60 @@
-/*=============================================================================*
- * 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.ws.resource.properties;
-
-import org.apache.ws.resource.properties.impl.CallbackFailedException;
-
-import javax.xml.namespace.QName;
-
-/**
- * A callback that should be registered on any mutable properties (i.e.
- * properties that support the WSRP SetResourceProperties operation).
- * Register the callback by calling
- * {@link ResourceProperty#setCallback(ResourcePropertyCallback)} on the
- * property.
- */
-public interface SetResourcePropertyCallback extends ResourcePropertyCallback
-{
-
- /**
- * Implement this method for handling "delete" on the backend.
- *
- * @param propQName
- * @throws CallbackFailedException An exception if the delete fails on the backend
- * and you want the server to return a fault.
- */
- void deleteProperty( QName propQName ) throws CallbackFailedException;
-
- /**
- * Implement this method for handling "insert" on the backend.
- *
- * @param propElems
- * @throws CallbackFailedException An exception if the insert fails on the backend
- * and you want the server to return a fault.
- */
- void insertProperty( Object[] propElems ) throws CallbackFailedException;
-
- /**
- * Implement this method for handling "update" on the backend.
- *
- * @param propElems
- * @throws CallbackFailedException An exception if the update fails on the backend
- * and you want the server to return a fault.
- */
- void updateProperty( Object[] propElems ) throws CallbackFailedException;
-
-}
+/*=============================================================================*
+ * 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.ws.resource.properties;
+
+import org.apache.ws.resource.properties.impl.CallbackFailedException;
+import javax.xml.namespace.QName;
+
+/**
+ * A callback that should be registered on any mutable properties (i.e.
+ * properties that support the WSRP SetResourceProperties operation).
+ * Register the callback by calling
+ * {@link ResourceProperty#setCallback(ResourcePropertyCallback)} on the
+ * property.
+ */
+public interface SetResourcePropertyCallback
+ extends ResourcePropertyCallback
+{
+ /**
+ * Implement this method for handling "delete" on the backend.
+ *
+ * @param propQName
+ * @throws CallbackFailedException An exception if the delete fails on the backend
+ * and you want the server to return a fault.
+ */
+ void deleteProperty( QName propQName )
+ throws CallbackFailedException;
+
+ /**
+ * Implement this method for handling "insert" on the backend.
+ *
+ * @param propElems
+ * @throws CallbackFailedException An exception if the insert fails on the backend
+ * and you want the server to return a fault.
+ */
+ void insertProperty( Object[] propElems )
+ throws CallbackFailedException;
+
+ /**
+ * Implement this method for handling "update" on the backend.
+ *
+ * @param propElems
+ * @throws CallbackFailedException An exception if the update fails on the backend
+ * and you want the server to return a fault.
+ */
+ void updateProperty( Object[] propElems )
+ throws CallbackFailedException;
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/XmlBeansResourcePropertyUtils.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/XmlBeansResourcePropertyUtils.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/XmlBeansResourcePropertyUtils.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/XmlBeansResourcePropertyUtils.java Tue Aug 2 09:28:49 2005
@@ -23,7 +23,6 @@
import org.apache.ws.util.i18n.Messages;
import org.apache.xmlbeans.XmlDateTime;
import org.apache.xmlbeans.impl.values.XmlDateTimeImpl;
-
import java.util.Calendar;
/**
@@ -33,47 +32,57 @@
*/
public abstract class XmlBeansResourcePropertyUtils
{
- private static final Log LOG = LogFactory.getLog( XmlBeansResourcePropertyUtils.class );
- public static final Messages MSG = MessagesImpl.getInstance();
+ private static final Log LOG = LogFactory.getLog( XmlBeansResourcePropertyUtils.class );
+
+ /** DOCUMENT_ME */
+ public static final Messages MSG = MessagesImpl.getInstance( );
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param prop DOCUMENT_ME
+ * @param time DOCUMENT_ME
+ */
+ public static void setDateTimePropertyValue( XmlBeansResourceProperty prop,
+ Calendar time )
+ {
+ LOG.debug( MSG.getMessage( Keys.SET_PROP_TIME,
+ prop.getMetaData( ).getName( ),
+ time.toString( ) ) );
+ XmlDateTimeImpl propElem = (XmlDateTimeImpl) getDateTimePropertyElement( prop );
+ if ( time == null )
+ {
+ propElem.setNil( );
+ }
+ else
+ {
+ propElem.setCalendarValue( time );
+ }
+ }
+
+ /**
+ *
+ * @param prop an XMLBeans-based resource property; must not be null
+ * @return
+ */
+ public static Calendar getDateTimePropertyValue( XmlBeansResourceProperty prop )
+ {
+ XmlDateTime propElem = getDateTimePropertyElement( prop );
+ return ( propElem != null ) ? propElem.getCalendarValue( ) : null;
+ }
+
+ private static XmlDateTime getDateTimePropertyElement( XmlBeansResourceProperty prop )
+ {
+ XmlDateTime propElem;
+ if ( !prop.isEmpty( ) )
+ {
+ propElem = (XmlDateTime) prop.get( 0 );
+ }
+ else
+ {
+ propElem = null;
+ }
- public static void setDateTimePropertyValue( XmlBeansResourceProperty prop,
- Calendar time )
- {
- LOG.debug( MSG.getMessage( Keys.SET_PROP_TIME, prop.getMetaData().getName(), time.toString() ) );
- XmlDateTimeImpl propElem = (XmlDateTimeImpl) getDateTimePropertyElement( prop );
- if(time == null)
- {
- propElem.setNil();
- }
- else
- {
- propElem.setCalendarValue( time );
- }
-
- }
-
- /**
- *
- * @param prop an XMLBeans-based resource property; must not be null
- * @return
- */
- public static Calendar getDateTimePropertyValue( XmlBeansResourceProperty prop )
- {
- XmlDateTime propElem = getDateTimePropertyElement( prop );
- return propElem != null ? propElem.getCalendarValue() : null;
- }
-
- private static XmlDateTime getDateTimePropertyElement( XmlBeansResourceProperty prop )
- {
- XmlDateTime propElem;
- if ( ! prop.isEmpty() )
- {
- propElem = (XmlDateTime) prop.get( 0 );
- }
- else
- {
- propElem = null;
- }
- return propElem;
- }
+ return propElem;
+ }
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/DeleteResourcePropertyRequestFailedFaultException.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/DeleteResourcePropertyRequestFailedFaultException.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/DeleteResourcePropertyRequestFailedFaultException.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/DeleteResourcePropertyRequestFailedFaultException.java Tue Aug 2 09:28:49 2005
@@ -1,57 +1,55 @@
-/*=============================================================================*
- * 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.ws.resource.properties.faults;
-
-import org.apache.ws.resource.faults.AbstractBaseFaultException;
-import org.apache.ws.resource.properties.NamespaceVersionHolder;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Sal Campana
- */
-public class DeleteResourcePropertyRequestFailedFaultException
- extends AbstractBaseFaultException
-{
-
- private QName m_name;
-
- /**
- * Creates a new {@link DeleteResourcePropertyRequestFailedFaultException} object.
- *
- * @param namespaces DOCUMENT_ME
- * @param description a description of why the operation failed
- */
- public DeleteResourcePropertyRequestFailedFaultException( NamespaceVersionHolder namespaces,
- String description )
- {
- super( namespaces, description );
- m_name = new QName( namespaces.getPropertiesXsdNamespace(),
- "DeleteResourcePropertyRequestFailedFault",
- "wsrp" );
- }
-
- /**
- * Returns the element name for this base fault.
- *
- * @return the element name for this base fault
- */
- public QName getBaseFaultName()
- {
- return m_name;
- }
-
+/*=============================================================================*
+ * 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.ws.resource.properties.faults;
+
+import org.apache.ws.resource.faults.AbstractBaseFaultException;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import javax.xml.namespace.QName;
+
+/**
+ * @author Sal Campana
+ */
+public class DeleteResourcePropertyRequestFailedFaultException
+ extends AbstractBaseFaultException
+{
+ private QName m_name;
+
+ /**
+ * Creates a new {@link DeleteResourcePropertyRequestFailedFaultException} object.
+ *
+ * @param namespaces DOCUMENT_ME
+ * @param description a description of why the operation failed
+ */
+ public DeleteResourcePropertyRequestFailedFaultException( NamespaceVersionHolder namespaces,
+ String description )
+ {
+ super( namespaces, description );
+ m_name =
+ new QName( namespaces.getPropertiesXsdNamespace( ),
+ "DeleteResourcePropertyRequestFailedFault",
+ "wsrp" );
+ }
+
+ /**
+ * Returns the element name for this base fault.
+ *
+ * @return the element name for this base fault
+ */
+ public QName getBaseFaultName( )
+ {
+ return m_name;
+ }
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InsertResourcePropertyRequestFailedFaultException.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InsertResourcePropertyRequestFailedFaultException.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InsertResourcePropertyRequestFailedFaultException.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InsertResourcePropertyRequestFailedFaultException.java Tue Aug 2 09:28:49 2005
@@ -1,58 +1,56 @@
-/*=============================================================================*
- * 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.ws.resource.properties.faults;
-
-import org.apache.ws.resource.faults.AbstractBaseFaultException;
-import org.apache.ws.resource.faults.Description;
-import org.apache.ws.resource.properties.NamespaceVersionHolder;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Sal Campana
- */
-public class InsertResourcePropertyRequestFailedFaultException
- extends AbstractBaseFaultException
-{
-
- private QName m_name;
-
- /**
- * Creates a new {@link InsertResourcePropertyRequestFailedFaultException} object.
- *
- * @param namespaces DOCUMENT_ME
- * @param description DOCUMENT_ME
- */
- public InsertResourcePropertyRequestFailedFaultException( NamespaceVersionHolder namespaces,
- Description[] description )
- {
- super( namespaces,
- "" );
- m_name = new QName( namespaces.getPropertiesXsdNamespace(),
- "InsertResourcePropertyRequestFailedFault",
- "wsrp" );
- }
-
- /**
- * Returns the element name for this base fault.
- *
- * @return the element name for this base fault
- */
- public QName getBaseFaultName()
- {
- return m_name;
- }
+/*=============================================================================*
+ * 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.ws.resource.properties.faults;
+
+import org.apache.ws.resource.faults.AbstractBaseFaultException;
+import org.apache.ws.resource.faults.Description;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import javax.xml.namespace.QName;
+
+/**
+ * @author Sal Campana
+ */
+public class InsertResourcePropertyRequestFailedFaultException
+ extends AbstractBaseFaultException
+{
+ private QName m_name;
+
+ /**
+ * Creates a new {@link InsertResourcePropertyRequestFailedFaultException} object.
+ *
+ * @param namespaces DOCUMENT_ME
+ * @param description DOCUMENT_ME
+ */
+ public InsertResourcePropertyRequestFailedFaultException( NamespaceVersionHolder namespaces,
+ Description[] description )
+ {
+ super( namespaces, "" );
+ m_name =
+ new QName( namespaces.getPropertiesXsdNamespace( ),
+ "InsertResourcePropertyRequestFailedFault",
+ "wsrp" );
+ }
+
+ /**
+ * Returns the element name for this base fault.
+ *
+ * @return the element name for this base fault
+ */
+ public QName getBaseFaultName( )
+ {
+ return m_name;
+ }
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidInsertResourcePropertiesRequestContentFaultException.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidInsertResourcePropertiesRequestContentFaultException.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidInsertResourcePropertiesRequestContentFaultException.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidInsertResourcePropertiesRequestContentFaultException.java Tue Aug 2 09:28:49 2005
@@ -1,57 +1,55 @@
-/*=============================================================================*
- * 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.ws.resource.properties.faults;
-
-import org.apache.ws.resource.faults.AbstractBaseFaultException;
-import org.apache.ws.resource.properties.NamespaceVersionHolder;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Sal Campana
- */
-public class InvalidInsertResourcePropertiesRequestContentFaultException
- extends AbstractBaseFaultException
-{
-
- private QName m_name;
-
- /**
- * Creates a new {@link InvalidInsertResourcePropertiesRequestContentFaultException} object.
- *
- * @param namespaces DOCUMENT_ME
- * @param description DOCUMENT_ME
- */
- public InvalidInsertResourcePropertiesRequestContentFaultException( NamespaceVersionHolder namespaces,
- String description )
- {
- super( namespaces, description );
- m_name = new QName( namespaces.getPropertiesXsdNamespace(),
- "InvalidInsertResourcePropertiesRequestContentFault",
- "wsrp" );
- }
-
- /**
- * Returns the element name for this base fault.
- *
- * @return the element name for this base fault
- */
- public QName getBaseFaultName()
- {
- return m_name;
- }
-
+/*=============================================================================*
+ * 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.ws.resource.properties.faults;
+
+import org.apache.ws.resource.faults.AbstractBaseFaultException;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import javax.xml.namespace.QName;
+
+/**
+ * @author Sal Campana
+ */
+public class InvalidInsertResourcePropertiesRequestContentFaultException
+ extends AbstractBaseFaultException
+{
+ private QName m_name;
+
+ /**
+ * Creates a new {@link InvalidInsertResourcePropertiesRequestContentFaultException} object.
+ *
+ * @param namespaces DOCUMENT_ME
+ * @param description DOCUMENT_ME
+ */
+ public InvalidInsertResourcePropertiesRequestContentFaultException( NamespaceVersionHolder namespaces,
+ String description )
+ {
+ super( namespaces, description );
+ m_name =
+ new QName( namespaces.getPropertiesXsdNamespace( ),
+ "InvalidInsertResourcePropertiesRequestContentFault",
+ "wsrp" );
+ }
+
+ /**
+ * Returns the element name for this base fault.
+ *
+ * @return the element name for this base fault
+ */
+ public QName getBaseFaultName( )
+ {
+ return m_name;
+ }
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java Tue Aug 2 09:28:49 2005
@@ -22,7 +22,6 @@
import org.apache.ws.resource.properties.query.QueryExpression;
import org.apache.ws.resource.properties.query.xpath.XPathExpression;
import org.apache.ws.util.i18n.Messages;
-
import javax.xml.namespace.QName;
/**
@@ -31,42 +30,46 @@
* @author Ian P. Springer
*/
public class InvalidQueryExpressionFaultException
- extends AbstractBaseFaultException
+ extends AbstractBaseFaultException
{
+ private static final Messages MSG = MessagesImpl.getInstance( );
+ private QName m_name;
- private static final Messages MSG = MessagesImpl.getInstance();
-
- private QName m_name;
-
- /**
- * Constructs a new InvalidQueryExpressionFaultException.
- *
- * @param queryExpr the invalid expression
- */
- public InvalidQueryExpressionFaultException( NamespaceVersionHolder namespaces, QueryExpression queryExpr )
- {
- super( namespaces, MSG.getMessage( Keys.INVALID_EXPRESSION, queryExpr ) );
- m_name = new QName( getNamespaceSet().getPropertiesXsdNamespace(), "InvalidQueryExpressionFault", "wsrp" );
- }
-
- /**
- * Constructs a new BaseFaultException with the specified SOAP message and actor.
- *
- * @param xpathExpr the invalid expression
- */
- public InvalidQueryExpressionFaultException( NamespaceVersionHolder namespaces, XPathExpression xpathExpr )
- {
- super( namespaces, MSG.getMessage( Keys.INVALID_EXPRESSION, xpathExpr ) );
- }
-
- /**
- * Returns the element name for this base fault.
- *
- * @return the element name for this base fault
- */
- public QName getBaseFaultName()
- {
- return m_name;
- }
-
+ /**
+ * Constructs a new InvalidQueryExpressionFaultException.
+ *
+ * @param queryExpr the invalid expression
+ */
+ public InvalidQueryExpressionFaultException( NamespaceVersionHolder namespaces,
+ QueryExpression queryExpr )
+ {
+ super( namespaces,
+ MSG.getMessage( Keys.INVALID_EXPRESSION, queryExpr ) );
+ m_name =
+ new QName( getNamespaceSet( ).getPropertiesXsdNamespace( ),
+ "InvalidQueryExpressionFault",
+ "wsrp" );
+ }
+
+ /**
+ * Constructs a new BaseFaultException with the specified SOAP message and actor.
+ *
+ * @param xpathExpr the invalid expression
+ */
+ public InvalidQueryExpressionFaultException( NamespaceVersionHolder namespaces,
+ XPathExpression xpathExpr )
+ {
+ super( namespaces,
+ MSG.getMessage( Keys.INVALID_EXPRESSION, xpathExpr ) );
+ }
+
+ /**
+ * Returns the element name for this base fault.
+ *
+ * @return the element name for this base fault
+ */
+ public QName getBaseFaultName( )
+ {
+ return m_name;
+ }
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java Tue Aug 2 09:28:49 2005
@@ -20,7 +20,6 @@
import org.apache.ws.resource.i18n.MessagesImpl;
import org.apache.ws.resource.properties.NamespaceVersionHolder;
import org.apache.ws.util.i18n.Messages;
-
import javax.xml.namespace.QName;
/**
@@ -29,32 +28,34 @@
* @author Ian P. Springer
*/
public class InvalidResourcePropertyQNameFaultException
- extends AbstractBaseFaultException
+ extends AbstractBaseFaultException
{
+ private static final Messages MSG = MessagesImpl.getInstance( );
+ private QName m_name;
- private static final Messages MSG = MessagesImpl.getInstance();
-
- private QName m_name;
-
- /**
- * Constructs a new InvalidResourcePropertyQNameFaultException.
- *
- * @param propName the invalid property QName
- */
- public InvalidResourcePropertyQNameFaultException( NamespaceVersionHolder namespaces, QName propName )
- {
- super( namespaces, MSG.getMessage( Keys.INVALID_PROP_NAME, propName ) );
- m_name = new QName( getNamespaceSet().getPropertiesXsdNamespace(), "InvalidResourcePropertyQNameFault", "wsrp" );
- }
-
- /**
- * Returns the element name for this base fault.
- *
- * @return the element name for this base fault
- */
- public QName getBaseFaultName()
- {
- return m_name;
- }
-
+ /**
+ * Constructs a new InvalidResourcePropertyQNameFaultException.
+ *
+ * @param propName the invalid property QName
+ */
+ public InvalidResourcePropertyQNameFaultException( NamespaceVersionHolder namespaces,
+ QName propName )
+ {
+ super( namespaces,
+ MSG.getMessage( Keys.INVALID_PROP_NAME, propName ) );
+ m_name =
+ new QName( getNamespaceSet( ).getPropertiesXsdNamespace( ),
+ "InvalidResourcePropertyQNameFault",
+ "wsrp" );
+ }
+
+ /**
+ * Returns the element name for this base fault.
+ *
+ * @return the element name for this base fault
+ */
+ public QName getBaseFaultName( )
+ {
+ return m_name;
+ }
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java Tue Aug 2 09:28:49 2005
@@ -18,7 +18,6 @@
import org.apache.ws.resource.faults.AbstractBaseFaultException;
import org.apache.ws.resource.properties.MetaDataViolationException;
import org.apache.ws.resource.properties.NamespaceVersionHolder;
-
import javax.xml.namespace.QName;
/**
@@ -28,42 +27,44 @@
* @author Ian P. Springer
*/
public class InvalidSetResourcePropertiesRequestContentFaultException
- extends AbstractBaseFaultException
+ extends AbstractBaseFaultException
{
+ private QName m_name;
- private QName m_name;
-
- /**
- * Constructs a new InvalidSetResourcePropertiesRequestContentFaultException.
- *
- * @param description a WS-BaseFaults description
- */
- public InvalidSetResourcePropertiesRequestContentFaultException( NamespaceVersionHolder namespaces,
- String description )
- {
- super( namespaces, description );
- m_name = new QName( namespaces.getPropertiesXsdNamespace(), "InvalidSetResourcePropertiesRequestContentFault",
- "wsrp" );
- }
-
- /**
- * Constructs a new BaseFaultException with the specified SOAP message and actor.
- *
- * @param mdve
- */
- public InvalidSetResourcePropertiesRequestContentFaultException( NamespaceVersionHolder namespaces,
- MetaDataViolationException mdve )
- {
- this( namespaces, mdve.toString() );
- }
-
- /**
- * Returns the element name for this base fault.
- *
- * @return the element name for this base fault
- */
- public QName getBaseFaultName()
- {
- return m_name;
- }
+ /**
+ * Constructs a new InvalidSetResourcePropertiesRequestContentFaultException.
+ *
+ * @param description a WS-BaseFaults description
+ */
+ public InvalidSetResourcePropertiesRequestContentFaultException( NamespaceVersionHolder namespaces,
+ String description )
+ {
+ super( namespaces, description );
+ m_name =
+ new QName( namespaces.getPropertiesXsdNamespace( ),
+ "InvalidSetResourcePropertiesRequestContentFault",
+ "wsrp" );
+ }
+
+ /**
+ * Constructs a new BaseFaultException with the specified SOAP message and actor.
+ *
+ * @param mdve
+ */
+ public InvalidSetResourcePropertiesRequestContentFaultException( NamespaceVersionHolder namespaces,
+ MetaDataViolationException mdve )
+ {
+ this( namespaces,
+ mdve.toString( ) );
+ }
+
+ /**
+ * Returns the element name for this base fault.
+ *
+ * @return the element name for this base fault
+ */
+ public QName getBaseFaultName( )
+ {
+ return m_name;
+ }
}