You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by ip...@apache.org on 2004/12/23 17:12:34 UTC
svn commit: r123204 - in incubator/apollo/trunk/src: java/org/apache/ws/resource/handler java/org/apache/ws/resource/impl java/org/apache/ws/resource/lifetime java/org/apache/ws/resource/lifetime/porttype java/org/apache/ws/resource/lifetime/v1_2 java/org/apache/ws/resource/lifetime/v1_2/porttype java/org/apache/ws/resource/lifetime/v1_2/porttype/impl java/org/apache/ws/resource/properties java/org/apache/ws/resource/properties/faults java/org/apache/ws/resource/properties/porttype java/org/apache/ws/resource/properties/v1_2 java/org/apache/ws/resource/properties/v1_2/porttype java/org/apache/ws/resource/properties/v1_2/porttype/impl java/org/apache/ws/resource/properties/v1_3 java/org/apache/ws/resource/servicegroup java/org/apache/ws/resource/servicegroup/v1_2 java/org/apache/ws/resource/servicegroup/v1_2/porttype java/org/apache/ws/util test/org/apache/ws/resource/properties test/org/apache/ws/resource/properties/v1_2/porttype/impl test/xmlbeans
Author: ips
Date: Thu Dec 23 08:12:32 2004
New Revision: 123204
URL: http://svn.apache.org/viewcvs?view=rev&rev=123204
Log:
Added:
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/ResourceLifetime1_2Constants.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/ImmediateResourceTerminationPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/ScheduledResourceTerminationPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/impl/
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/ResourceProperties1_2Constants.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/GetMultipleResourcePropertiesPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/GetResourcePropertyPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/QueryResourcePropertiesPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/SetResourcePropertiesPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/AbstractResourcePropertiesPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/GetMultipleResourcePropertiesProvider.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/GetResourcePropertyProvider.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/QueryResourcePropertiesProvider.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/SetResourcePropertiesProvider.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_3/
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_3/ResourceProperties1_3Constants.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/
incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/
incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/ServiceGroup1_2Constants.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/
incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/ServiceGroupEntryPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/ServiceGroupPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/ServiceGroupRegistrationPortType.java
Removed:
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/ResourceLifetime1_2Constants.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/porttype/
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperties1_1Constants.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperties1_2Constants.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/porttype/
incubator/apollo/trunk/src/test/xmlbeans/
Modified:
incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/QueryEvaluationErrorFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/ResourceUnknownFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/SetResourcePropertyRequestFailedFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnableToModifyResourcePropertyFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnknownQueryExpressionDialectFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/util/WsrfWsdlUtils.java
incubator/apollo/trunk/src/java/org/apache/ws/util/XmlUtils.java
incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java
incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractSushiService.java
incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/AbstractWsrpPortTypeImplTestCase.java
incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetMultipleResourcePropertiesProviderTestCase.java
incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetResourcePropertyProviderTestCase.java
incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/QueryResourcePropertiesProviderTestCase.java
incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/SetResourcePropertiesProviderTestCase.java
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java&r1=123203&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java Thu Dec 23 08:12:32 2004
@@ -15,7 +15,7 @@
*=============================================================================*/
package org.apache.ws.resource.handler;
-import org.apache.ws.resource.properties.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_2.ResourceProperties1_2Constants;
import org.apache.ws.resource.lifetime.ResourceLifetime1_2Constants;
import javax.xml.namespace.QName;
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java&r1=123203&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java Thu Dec 23 08:12:32 2004
@@ -17,8 +17,8 @@
import org.apache.ws.resource.InvalidWsrfWsdlException;
import org.apache.ws.resource.ResourceDefinition;
-import org.apache.ws.resource.properties.ResourceProperties1_1Constants;
-import org.apache.ws.resource.properties.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_2.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_3.ResourceProperties1_3Constants;
import org.apache.ws.util.WsdlUtils;
import org.apache.ws.util.WsrfWsdlUtils;
@@ -110,8 +110,8 @@
{
if ( hasProperties() )
{
- if ( !m_implementedResourceDefs.containsKey( ResourceProperties1_1Constants.PORT_TYPE_NAME_GET_RESOURCE_PROPERTY ) &&
- !m_implementedResourceDefs.containsKey( ResourceProperties1_2Constants.PORT_TYPE_NAME_GET_RESOURCE_PROPERTY )
+ if ( !m_implementedResourceDefs.containsKey( ResourceProperties1_2Constants.PORT_TYPE_NAME_GET_RESOURCE_PROPERTY ) &&
+ !m_implementedResourceDefs.containsKey( ResourceProperties1_3Constants.PORT_TYPE_NAME_GET_RESOURCE_PROPERTY )
)
{
throw new InvalidWsrfWsdlException( "PortType " + m_portType.getQName() + " defines a wsrp:ResourceProperties attribute but does not implement the WSRF-RP GetResourceProperty portType." );
@@ -119,14 +119,14 @@
}
else
{
- if ( m_implementedResourceDefs.containsKey( ResourceProperties1_1Constants.PORT_TYPE_NAME_GET_RESOURCE_PROPERTY ) ||
- m_implementedResourceDefs.containsKey( ResourceProperties1_2Constants.PORT_TYPE_NAME_GET_RESOURCE_PROPERTY ) ||
- m_implementedResourceDefs.containsKey( ResourceProperties1_1Constants.PORT_TYPE_NAME_GET_MULTIPLE_RESOURCE_PROPERTIES ) ||
+ if ( m_implementedResourceDefs.containsKey( ResourceProperties1_2Constants.PORT_TYPE_NAME_GET_RESOURCE_PROPERTY ) ||
+ m_implementedResourceDefs.containsKey( ResourceProperties1_3Constants.PORT_TYPE_NAME_GET_RESOURCE_PROPERTY ) ||
m_implementedResourceDefs.containsKey( ResourceProperties1_2Constants.PORT_TYPE_NAME_GET_MULTIPLE_RESOURCE_PROPERTIES ) ||
- m_implementedResourceDefs.containsKey( ResourceProperties1_1Constants.PORT_TYPE_NAME_SET_RESOURCE_PROPERTIES ) ||
+ m_implementedResourceDefs.containsKey( ResourceProperties1_3Constants.PORT_TYPE_NAME_GET_MULTIPLE_RESOURCE_PROPERTIES ) ||
m_implementedResourceDefs.containsKey( ResourceProperties1_2Constants.PORT_TYPE_NAME_SET_RESOURCE_PROPERTIES ) ||
- m_implementedResourceDefs.containsKey( ResourceProperties1_1Constants.PORT_TYPE_NAME_QUERY_RESOURCE_PROPERTIES ) ||
- m_implementedResourceDefs.containsKey( ResourceProperties1_2Constants.PORT_TYPE_NAME_QUERY_RESOURCE_PROPERTIES )
+ m_implementedResourceDefs.containsKey( ResourceProperties1_3Constants.PORT_TYPE_NAME_SET_RESOURCE_PROPERTIES ) ||
+ m_implementedResourceDefs.containsKey( ResourceProperties1_2Constants.PORT_TYPE_NAME_QUERY_RESOURCE_PROPERTIES ) ||
+ m_implementedResourceDefs.containsKey( ResourceProperties1_3Constants.PORT_TYPE_NAME_QUERY_RESOURCE_PROPERTIES )
)
{
throw new InvalidWsrfWsdlException( "PortType " + m_portType.getQName() + " does not define a wsrp:ResourceProperties attribute but implements one or more WSRF-RP portTypes." );
Deleted: /incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/ResourceLifetime1_2Constants.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/ResourceLifetime1_2Constants.java?view=auto&rev=123203
==============================================================================
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/ResourceLifetime1_2Constants.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/ResourceLifetime1_2Constants.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/ResourceLifetime1_2Constants.java Thu Dec 23 08:12:32 2004
@@ -0,0 +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.lifetime;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author Ian P. Springer
+ */
+public interface ResourceLifetime1_2Constants
+{
+ /**
+ * DOCUMENT_ME
+ */
+ String NSURI_WSRL_SCHEMA = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSPREFIX_WSRL_SCHEMA = "wsrl";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSURI_WSRL_WSDL = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSPREFIX_WSRL_WSDL = "wsrlw";
+
+ /*----------------------------- Resource property QNames ----------------------------*/
+
+ /**
+ * CurrentTime property
+ */
+ QName PROP_QNAME_CURRENT_TIME = new QName( NSURI_WSRL_SCHEMA, "CurrentTime", NSPREFIX_WSRL_SCHEMA );
+
+ /**
+ * TerminationTime property
+ */
+ QName PROP_QNAME_TERMINATION_TIME = new QName( NSURI_WSRL_SCHEMA, "TerminationTime", NSPREFIX_WSRL_SCHEMA );
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/ImmediateResourceTerminationPortType.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/ImmediateResourceTerminationPortType.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/ImmediateResourceTerminationPortType.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,36 @@
+/*=============================================================================*
+ * 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.lifetime.v1_2.porttype;
+
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyResponseDocument;
+
+/**
+ * The WSRF-RL ImmediateResourceTermination portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface ImmediateResourceTerminationPortType
+{
+ /**
+ * DOCUMENT_ME
+ *
+ * @param requestDoc DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ DestroyResponseDocument destroy( DestroyDocument requestDoc );
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/ScheduledResourceTerminationPortType.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/ScheduledResourceTerminationPortType.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/ScheduledResourceTerminationPortType.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,36 @@
+/*=============================================================================*
+ * 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.lifetime.v1_2.porttype;
+
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeResponseDocument;
+
+/**
+ * The WSRF-RL ScheduledResourceTermination portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface ScheduledResourceTerminationPortType
+{
+ /**
+ * DOCUMENT_ME
+ *
+ * @param requestDoc DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ SetTerminationTimeResponseDocument setTerminationTime( SetTerminationTimeDocument requestDoc );
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,86 @@
+/*=============================================================================*
+ * 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.lifetime.v1_2.porttype.impl;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.resource.AbstractPortType;
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.ResourceException;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.resource.i18n.Keys;
+import org.apache.ws.resource.lifetime.faults.ResourceNotDestroyedFaultException;
+import org.apache.ws.resource.lifetime.v1_2.porttype.ImmediateResourceTerminationPortType;
+import org.apache.ws.util.i18n.Messages;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyResponseDocument;
+
+/**
+ * LOG-DONE
+ * An implementation of the wsrlw:ImmediateResourceTermination portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public class ImmediateResourceTerminationPortTypeImpl
+ extends AbstractPortType
+ implements ImmediateResourceTerminationPortType
+{
+ /**
+ * DOCUMENT_ME
+ */
+ private static final Log LOG = LogFactory.getLog( ImmediateResourceTerminationPortTypeImpl.class.getName( ) );
+ public static final Messages MSG = MessagesImpl.getInstance();
+ /**
+ * Creates a new {@link ImmediateResourceTerminationPortTypeImpl} object.
+ *
+ * @param resourceContext DOCUMENT_ME
+ */
+ public ImmediateResourceTerminationPortTypeImpl( ResourceContext resourceContext )
+ {
+ super( resourceContext );
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param requestDoc DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public DestroyResponseDocument destroy( DestroyDocument requestDoc )
+ {
+ LOG.debug( MSG.getMessage( Keys.DESTROYING_RESOURCE ,getResourceContext( ).getServiceName( ) ,
+ String.valueOf(getResourceKey( ))) );
+ try
+ {
+ getResourceHome( ).remove( getResourceKey( ) );
+ }
+ catch ( ResourceException re )
+ {
+ throw new ResourceNotDestroyedFaultException( String.valueOf( getResourceKey( ).getValue( ) ),
+ getResourceContext( ).getServiceName( ) );
+ }
+
+ return createResponseDocument( );
+ }
+
+ private DestroyResponseDocument createResponseDocument( )
+ {
+ DestroyResponseDocument responseDoc = DestroyResponseDocument.Factory.newInstance( );
+ responseDoc.addNewDestroyResponse( );
+ return responseDoc;
+ }
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,127 @@
+/*=============================================================================*
+ * 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.lifetime.v1_2.porttype.impl;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.ResourceException;
+import org.apache.ws.resource.i18n.Keys;
+import org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource;
+import org.apache.ws.resource.lifetime.faults.UnableToSetTerminationTimeFaultException;
+import org.apache.ws.resource.lifetime.v1_2.porttype.ScheduledResourceTerminationPortType;
+import org.apache.ws.resource.properties.v1_2.porttype.impl.AbstractResourcePropertiesPortType;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeResponseDocument;
+import java.util.Calendar;
+
+/**
+ * LOG-DONE
+ * An implementation of the wsrlw:ScheduledResourceTermination portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public class ScheduledResourceTerminationPortTypeImpl
+ extends AbstractResourcePropertiesPortType
+ implements ScheduledResourceTerminationPortType
+{
+ /**
+ * DOCUMENT_ME
+ */
+ private static final Log LOG = LogFactory.getLog( ScheduledResourceTerminationPortTypeImpl.class.getName( ) );
+
+ /**
+ * Creates a new {@link ScheduledResourceTerminationPortTypeImpl} object.
+ *
+ * @param resourceContext DOCUMENT_ME
+ */
+ public ScheduledResourceTerminationPortTypeImpl( ResourceContext resourceContext )
+ {
+ super( resourceContext );
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param requestDoc DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public SetTerminationTimeResponseDocument setTerminationTime( SetTerminationTimeDocument requestDoc )
+ {
+ SetTerminationTimeResponseDocument responseDoc = createResponseDocument( );
+ Calendar currentTime = Calendar.getInstance( );
+ Calendar requestedTermTime =
+ requestDoc.getSetTerminationTime( ).getRequestedTerminationTime( );
+ Calendar newTermTime = null;
+
+ // if requested termination time is in the past, destroy immediately
+ if ( ( requestedTermTime != null ) && requestedTermTime.getTime( ).before( currentTime.getTime( ) ) )
+ {
+ destroyResource( );
+ newTermTime = currentTime;
+ }
+ else
+ {
+ newTermTime = requestedTermTime;
+ }
+
+ getResourceState( ).setTerminationTime( newTermTime );
+ populateResponseDocument( responseDoc, currentTime, newTermTime );
+ return responseDoc;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ protected final ScheduledResourceTerminationResource getResourceState( )
+ {
+ return (ScheduledResourceTerminationResource) getResource( );
+ }
+
+ private SetTerminationTimeResponseDocument createResponseDocument( )
+ {
+ SetTerminationTimeResponseDocument responseDoc = SetTerminationTimeResponseDocument.Factory.newInstance( );
+ responseDoc.addNewSetTerminationTimeResponse( );
+ return responseDoc;
+ }
+
+ private void destroyResource( )
+ {
+ LOG.debug( MSG.getMessage( Keys.DESTROYING_RESOURCE,getResourceContext( ).getServiceName( ),
+ String.valueOf( getResourceKey( ))) );
+ try
+ {
+ getResourceHome( ).remove( getResourceKey( ) );
+ }
+ catch ( ResourceException re )
+ {
+ throw new UnableToSetTerminationTimeFaultException( null );
+ }
+ }
+
+ private void populateResponseDocument( SetTerminationTimeResponseDocument responseDoc,
+ Calendar currentTime,
+ Calendar newTermTime )
+ {
+ SetTerminationTimeResponseDocument.SetTerminationTimeResponse response =
+ responseDoc.getSetTerminationTimeResponse( );
+ response.setCurrentTime( currentTime );
+ response.setNewTerminationTime( newTermTime );
+ }
+}
\ No newline at end of file
Deleted: /incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperties1_1Constants.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperties1_1Constants.java?view=auto&rev=123203
==============================================================================
Deleted: /incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperties1_2Constants.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperties1_2Constants.java?view=auto&rev=123203
==============================================================================
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java&r1=123203&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java Thu Dec 23 08:12:32 2004
@@ -16,7 +16,7 @@
package org.apache.ws.resource.properties.faults;
import org.apache.ws.resource.faults.BaseFaultException;
-import org.apache.ws.resource.properties.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_2.ResourceProperties1_2Constants;
import org.apache.ws.resource.properties.query.QueryExpression;
import org.apache.ws.resource.properties.query.xpath.XPathExpression;
import org.apache.ws.resource.i18n.MessagesImpl;
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java&r1=123203&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java Thu Dec 23 08:12:32 2004
@@ -16,7 +16,7 @@
package org.apache.ws.resource.properties.faults;
import org.apache.ws.resource.faults.BaseFaultException;
-import org.apache.ws.resource.properties.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_2.ResourceProperties1_2Constants;
import org.apache.ws.resource.i18n.MessagesImpl;
import org.apache.ws.resource.i18n.Keys;
import org.apache.ws.util.i18n.Messages;
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java&r1=123203&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java Thu Dec 23 08:12:32 2004
@@ -17,7 +17,7 @@
import org.apache.ws.resource.faults.BaseFaultException;
import org.apache.ws.resource.properties.MetaDataViolationException;
-import org.apache.ws.resource.properties.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_2.ResourceProperties1_2Constants;
import javax.xml.namespace.QName;
/**
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/QueryEvaluationErrorFaultException.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/QueryEvaluationErrorFaultException.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/QueryEvaluationErrorFaultException.java&r1=123203&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/QueryEvaluationErrorFaultException.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/QueryEvaluationErrorFaultException.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/QueryEvaluationErrorFaultException.java Thu Dec 23 08:12:32 2004
@@ -16,7 +16,7 @@
package org.apache.ws.resource.properties.faults;
import org.apache.ws.resource.faults.BaseFaultException;
-import org.apache.ws.resource.properties.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_2.ResourceProperties1_2Constants;
import javax.xml.namespace.QName;
/**
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/ResourceUnknownFaultException.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/ResourceUnknownFaultException.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/ResourceUnknownFaultException.java&r1=123203&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/ResourceUnknownFaultException.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/ResourceUnknownFaultException.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/ResourceUnknownFaultException.java Thu Dec 23 08:12:32 2004
@@ -19,7 +19,7 @@
import org.apache.ws.resource.i18n.MessagesImpl;
import org.apache.ws.resource.i18n.Keys;
import org.apache.ws.resource.faults.BaseFaultException;
-import org.apache.ws.resource.properties.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_2.ResourceProperties1_2Constants;
import org.apache.ws.util.i18n.Messages;
import javax.xml.namespace.QName;
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/SetResourcePropertyRequestFailedFaultException.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/SetResourcePropertyRequestFailedFaultException.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/SetResourcePropertyRequestFailedFaultException.java&r1=123203&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/SetResourcePropertyRequestFailedFaultException.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/SetResourcePropertyRequestFailedFaultException.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/SetResourcePropertyRequestFailedFaultException.java Thu Dec 23 08:12:32 2004
@@ -17,7 +17,7 @@
import org.apache.ws.Soap1_1Constants;
import org.apache.ws.resource.faults.BaseFaultException;
-import org.apache.ws.resource.properties.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_2.ResourceProperties1_2Constants;
import javax.xml.namespace.QName;
/**
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnableToModifyResourcePropertyFaultException.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnableToModifyResourcePropertyFaultException.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnableToModifyResourcePropertyFaultException.java&r1=123203&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnableToModifyResourcePropertyFaultException.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnableToModifyResourcePropertyFaultException.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnableToModifyResourcePropertyFaultException.java Thu Dec 23 08:12:32 2004
@@ -16,7 +16,7 @@
package org.apache.ws.resource.properties.faults;
import org.apache.ws.resource.faults.BaseFaultException;
-import org.apache.ws.resource.properties.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_2.ResourceProperties1_2Constants;
import org.apache.ws.resource.i18n.MessagesImpl;
import org.apache.ws.resource.i18n.Keys;
import org.apache.ws.util.i18n.Messages;
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnknownQueryExpressionDialectFaultException.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnknownQueryExpressionDialectFaultException.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnknownQueryExpressionDialectFaultException.java&r1=123203&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnknownQueryExpressionDialectFaultException.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnknownQueryExpressionDialectFaultException.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnknownQueryExpressionDialectFaultException.java Thu Dec 23 08:12:32 2004
@@ -17,7 +17,7 @@
import org.apache.ws.resource.faults.BaseFaultException;
import org.apache.ws.resource.i18n.Keys;
-import org.apache.ws.resource.properties.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_2.ResourceProperties1_2Constants;
import javax.xml.namespace.QName;
import java.net.URI;
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/ResourceProperties1_2Constants.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/ResourceProperties1_2Constants.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/ResourceProperties1_2Constants.java Thu Dec 23 08:12:32 2004
@@ -0,0 +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.v1_2;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author Ian P. Springer
+ */
+public interface ResourceProperties1_2Constants
+{
+ /**
+ * DOCUMENT_ME
+ */
+ String NSURI_WSRP_SCHEMA =
+ "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSPREFIX_WSRP_SCHEMA = "wsrp";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSURI_WSRP_WSDL = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSPREFIX_WSRP_WSDL = "wsrpw";
+
+ QName PORT_TYPE_NAME_GET_RESOURCE_PROPERTY = new QName( NSURI_WSRP_WSDL, "GetResourceProperty", NSPREFIX_WSRP_SCHEMA );
+ QName PORT_TYPE_NAME_GET_MULTIPLE_RESOURCE_PROPERTIES = new QName( NSURI_WSRP_WSDL, "GetMultipleResourceProperties", NSPREFIX_WSRP_SCHEMA );
+ QName PORT_TYPE_NAME_SET_RESOURCE_PROPERTIES = new QName( NSURI_WSRP_WSDL, "SetResourceProperties", NSPREFIX_WSRP_SCHEMA );
+ QName PORT_TYPE_NAME_QUERY_RESOURCE_PROPERTIES = new QName( NSURI_WSRP_WSDL, "QueryResourceProperties", NSPREFIX_WSRP_SCHEMA );
+
+ /**
+ * QName of the "ResourceProperties" portType attribute.
+ */
+ QName RESOURCE_PROPERTIES_PORTTYPE_ATTRIB =
+ new QName( NSURI_WSRP_SCHEMA, "ResourceProperties", NSPREFIX_WSRP_SCHEMA );
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/GetMultipleResourcePropertiesPortType.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/GetMultipleResourcePropertiesPortType.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/GetMultipleResourcePropertiesPortType.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,36 @@
+/*=============================================================================*
+ * 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.v1_2.porttype;
+
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesResponseDocument;
+
+/**
+ * The WSRF-RP GetResourceProperties portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface GetMultipleResourcePropertiesPortType
+{
+ /**
+ * DOCUMENT_ME
+ *
+ * @param requestDoc DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ GetMultipleResourcePropertiesResponseDocument getMultipleResourceProperties( GetMultipleResourcePropertiesDocument requestDoc );
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/GetResourcePropertyPortType.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/GetResourcePropertyPortType.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/GetResourcePropertyPortType.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,36 @@
+/*=============================================================================*
+ * 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.v1_2.porttype;
+
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument;
+
+/**
+ * The WSRF-RP GetResourceProperty portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface GetResourcePropertyPortType
+{
+ /**
+ * DOCUMENT_ME
+ *
+ * @param requestDoc DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ GetResourcePropertyResponseDocument getResourceProperty( GetResourcePropertyDocument requestDoc );
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/QueryResourcePropertiesPortType.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/QueryResourcePropertiesPortType.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/QueryResourcePropertiesPortType.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,36 @@
+/*=============================================================================*
+ * 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.v1_2.porttype;
+
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesResponseDocument;
+
+/**
+ * The WSRF-RP QueryResourceProperties portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface QueryResourcePropertiesPortType
+{
+ /**
+ * DOCUMENT_ME
+ *
+ * @param requestDoc DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ QueryResourcePropertiesResponseDocument queryResourceProperties( QueryResourcePropertiesDocument requestDoc );
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/SetResourcePropertiesPortType.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/SetResourcePropertiesPortType.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/SetResourcePropertiesPortType.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,36 @@
+/*=============================================================================*
+ * 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.v1_2.porttype;
+
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesResponseDocument;
+
+/**
+ * The WSRF-RP SetResourceProperties portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface SetResourcePropertiesPortType
+{
+ /**
+ * DOCUMENT_ME
+ *
+ * @param requestDoc DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ SetResourcePropertiesResponseDocument setResourceProperties( SetResourcePropertiesDocument requestDoc );
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/AbstractResourcePropertiesPortType.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/AbstractResourcePropertiesPortType.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/AbstractResourcePropertiesPortType.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,82 @@
+/*=============================================================================*
+ * 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.v1_2.porttype.impl;
+
+import org.apache.ws.resource.AbstractPortType;
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.PropertiesResource;
+import org.apache.ws.resource.i18n.Keys;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.ResourcePropertyCallback;
+import org.apache.ws.resource.properties.ResourcePropertySet;
+import org.apache.ws.util.i18n.Messages;
+
+import javax.xml.rpc.JAXRPCException;
+import java.util.Iterator;
+
+/**
+ * LOG-DONE
+ * @author Ian P. Springer
+ */
+public abstract class AbstractResourcePropertiesPortType
+ extends AbstractPortType
+{
+
+ protected static final Messages MSG = MessagesImpl.getInstance();
+
+ /**
+ * Creates a new {@link AbstractResourcePropertiesPortType} object.
+ *
+ * @param resourceContext DOCUMENT_ME
+ */
+ protected AbstractResourcePropertiesPortType( ResourceContext resourceContext )
+ {
+ super( resourceContext );
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ protected final ResourcePropertySet getProperties( )
+ {
+ if ( !( getResource( ) instanceof PropertiesResource ) )
+ {
+ throw new JAXRPCException( MSG.getMessage( Keys.CALL_WSRP_OP_ON_NOPROP) );
+ }
+
+ return ( (PropertiesResource) getResource( ) ).getResourcePropertySet( );
+ }
+
+ protected void refreshAllProperties()
+ {
+ Iterator iterator = getProperties().iterator();
+ while (iterator.hasNext())
+ {
+ refreshProperty((ResourceProperty)iterator.next());
+ }
+ }
+ protected void refreshProperty( ResourceProperty prop )
+ {
+ ResourcePropertyCallback callBack = prop.getCallBack( );
+ if ( callBack != null )
+ {
+ callBack.refreshProperty( prop );
+ }
+ }
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/GetMultipleResourcePropertiesProvider.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/GetMultipleResourcePropertiesProvider.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/GetMultipleResourcePropertiesProvider.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,121 @@
+/*=============================================================================*
+ * 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.v1_2.porttype.impl;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.i18n.Keys;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.faults.InvalidResourcePropertyQNameFaultException;
+import org.apache.ws.resource.properties.v1_2.porttype.GetMultipleResourcePropertiesPortType;
+import org.apache.ws.util.XmlBeanUtils;
+import org.apache.ws.util.i18n.Messages;
+import org.apache.xmlbeans.XmlObject;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesResponseDocument;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+
+/**
+ * LOG-DONE An operation provider for wsrp:GetMultipleResourceProperties.
+ *
+ * @author Ian P. Springer
+ */
+public class GetMultipleResourcePropertiesProvider
+ extends AbstractResourcePropertiesPortType
+ implements GetMultipleResourcePropertiesPortType
+{
+
+ private static final Log LOG = LogFactory.getLog( GetMultipleResourcePropertiesProvider.class );
+ private static final Messages MSG = MessagesImpl.getInstance();
+
+ /**
+ * Creates a new {@link GetMultipleResourcePropertiesProvider} object.
+ *
+ * @param resourceContext DOCUMENT_ME
+ */
+ public GetMultipleResourcePropertiesProvider( ResourceContext resourceContext )
+ {
+ super( resourceContext );
+ }
+
+ /**
+ * Implementation of the wsrp:GetMultipleResourceProperties operation.
+ *
+ * @param requestDoc the requestDoc XMLBean
+ *
+ * @return the response XMLBean
+ *
+ * @throws InvalidResourcePropertyQNameFaultException
+ *
+ * @throws org.apache.ws.resource.faults.ResoureKeyHeaderNotFoundFaultException
+ *
+ */
+ public GetMultipleResourcePropertiesResponseDocument getMultipleResourceProperties( GetMultipleResourcePropertiesDocument requestDoc )
+ {
+ if ( LOG.isDebugEnabled() )
+ {
+ LOG.debug( MSG.getMessage( Keys.GET_MULTI_RP_REQ,
+ requestDoc.toString() ) );
+ }
+
+ GetMultipleResourcePropertiesResponseDocument responseDoc = createResponseDocument();
+ QName[] propNames =
+ requestDoc.getGetMultipleResourceProperties().getResourcePropertyArray();
+
+ for ( int i = 0; i < propNames.length; i++ )
+ {
+ ResourceProperty prop = getProperties().get( propNames[i] );
+ if ( prop == null )
+ {
+ throw new InvalidResourcePropertyQNameFaultException( propNames[i] );
+ }
+ refreshProperty( prop );
+ if ( prop == null )
+ {
+ throw new InvalidResourcePropertyQNameFaultException( propNames[i] );
+ }
+
+ addPropertyToResponse( prop,
+ responseDoc.getGetMultipleResourcePropertiesResponse() );
+ }
+
+ return responseDoc;
+ }
+
+ private void addPropertyToResponse( ResourceProperty prop,
+ GetMultipleResourcePropertiesResponseDocument.GetMultipleResourcePropertiesResponse response )
+ {
+ Iterator propElemIter = prop.iterator();
+ while ( propElemIter.hasNext() )
+ {
+ XmlObject propElem = (XmlObject) propElemIter.next();
+ XmlBeanUtils.addChildElement( response, propElem );
+ }
+ }
+
+ private GetMultipleResourcePropertiesResponseDocument createResponseDocument()
+ {
+ GetMultipleResourcePropertiesResponseDocument responseDoc =
+ GetMultipleResourcePropertiesResponseDocument.Factory.newInstance();
+ responseDoc.addNewGetMultipleResourcePropertiesResponse();
+ return responseDoc;
+ }
+
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/GetResourcePropertyProvider.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/GetResourcePropertyProvider.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/GetResourcePropertyProvider.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,101 @@
+/*=============================================================================*
+ * 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.v1_2.porttype.impl;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.i18n.Keys;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.faults.InvalidResourcePropertyQNameFaultException;
+import org.apache.ws.resource.properties.v1_2.porttype.GetResourcePropertyPortType;
+import org.apache.ws.util.XmlBeanUtils;
+import org.apache.ws.util.i18n.Messages;
+import org.apache.xmlbeans.XmlObject;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+
+/**
+ * An operation provider for wsrp:GetResourceProperty.
+ *
+ * @author Ian P. Springer
+ */
+public class GetResourcePropertyProvider
+ extends AbstractResourcePropertiesPortType
+ implements GetResourcePropertyPortType
+{
+
+ private static final Log LOG = LogFactory.getLog( GetResourcePropertyProvider.class );
+ private static final Messages MSG = MessagesImpl.getInstance();
+
+ /**
+ * Creates a new {@link GetResourcePropertyProvider} object.
+ *
+ * @param resourceContext DOCUMENT_ME
+ */
+ public GetResourcePropertyProvider( ResourceContext resourceContext )
+ {
+ super( resourceContext );
+ }
+
+ /**
+ * Implementation of the wsrp:GetResourceProperty operation.
+ *
+ * @param requestDoc the requestDoc XMLBean
+ *
+ * @return the response XMLBean
+ *
+ * @throws InvalidResourcePropertyQNameFaultException
+ *
+ * @throws org.apache.ws.resource.faults.ResoureKeyHeaderNotFoundFaultException
+ *
+ */
+ public GetResourcePropertyResponseDocument getResourceProperty( GetResourcePropertyDocument requestDoc )
+ {
+ if ( LOG.isDebugEnabled() )
+ {
+ LOG.debug( MSG.getMessage( Keys.GET_RP_REQ, requestDoc.toString() ) );
+ }
+ GetResourcePropertyResponseDocument responseDoc = createResponseDocument();
+ QName propName = requestDoc.getGetResourceProperty();
+ ResourceProperty prop = getProperties().get( propName );
+ if ( prop == null )
+ {
+ throw new InvalidResourcePropertyQNameFaultException( propName );
+ }
+ refreshProperty( prop );
+ Iterator propElemIter = prop.iterator();
+ while ( propElemIter.hasNext() )
+ {
+ XmlObject propElem = (XmlObject) propElemIter.next();
+ XmlBeanUtils.addChildElement( responseDoc.getGetResourcePropertyResponse(),
+ propElem );
+ }
+ return responseDoc;
+ }
+
+ private GetResourcePropertyResponseDocument createResponseDocument()
+ {
+ GetResourcePropertyResponseDocument responseDoc =
+ GetResourcePropertyResponseDocument.Factory.newInstance();
+ responseDoc.addNewGetResourcePropertyResponse();
+ return responseDoc;
+ }
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/QueryResourcePropertiesProvider.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/QueryResourcePropertiesProvider.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/QueryResourcePropertiesProvider.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,178 @@
+/*=============================================================================*
+ * 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.v1_2.porttype.impl;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.i18n.Keys;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.resource.properties.faults.InvalidQueryExpressionFaultException;
+import org.apache.ws.resource.properties.faults.QueryEvaluationErrorFaultException;
+import org.apache.ws.resource.properties.faults.UnknownQueryExpressionDialectFaultException;
+import org.apache.ws.resource.properties.v1_2.porttype.QueryResourcePropertiesPortType;
+import org.apache.ws.resource.properties.query.InvalidQueryExpressionException;
+import org.apache.ws.resource.properties.query.QueryEngine;
+import org.apache.ws.resource.properties.query.QueryEvaluationErrorException;
+import org.apache.ws.resource.properties.query.UnknownQueryExpressionDialectException;
+import org.apache.ws.resource.properties.query.impl.QueryEngineImpl;
+import org.apache.ws.resource.properties.query.impl.XmlBeansQueryExpression;
+import org.apache.ws.util.XmlBeanUtils;
+import org.apache.ws.util.i18n.Messages;
+import org.apache.xmlbeans.XmlObject;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryExpressionType;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesResponseDocument;
+import javax.naming.directory.SchemaViolationException;
+import javax.xml.rpc.JAXRPCException;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import java.lang.reflect.Array;
+
+/**
+ * LOG-DONE
+ * An operation provider for wsrp:QueryResourceProperties.
+ *
+ * @author Ian P. Springer
+ */
+public class QueryResourcePropertiesProvider
+ extends AbstractResourcePropertiesPortType
+ implements QueryResourcePropertiesPortType
+{
+
+ private static final Log LOG = LogFactory.getLog( QueryResourcePropertiesProvider.class );
+ private static final Messages MSG = MessagesImpl.getInstance( );
+
+ /**
+ * DOCUMENT_ME
+ */
+ private static final QueryEngine QUERY_ENGINE = new QueryEngineImpl( );
+
+ /**
+ * Creates a new {@link QueryResourcePropertiesProvider} object.
+ *
+ * @param resourceContext DOCUMENT_ME
+ */
+ public QueryResourcePropertiesProvider( ResourceContext resourceContext )
+ {
+ super( resourceContext );
+ }
+
+ /**
+ * Implementation of the wsrp:QueryResourceProperties operation.
+ *
+ * @param requestDoc the requestDoc XMLBean
+ *
+ * @return the response XMLBean
+ *
+ * @throws org.apache.ws.resource.faults.ResoureKeyHeaderNotFoundFaultException
+ *
+ * @throws org.apache.ws.resource.properties.faults.UnknownQueryExpressionDialectFaultException
+ * if query dialect is unsupported.
+ * @throws org.apache.ws.resource.properties.faults.QueryEvaluationErrorFaultException
+ * if query evaluation fails.
+ * @throws org.apache.ws.resource.properties.faults.InvalidQueryExpressionFaultException
+ * if query expression is invalid.
+ */
+ public QueryResourcePropertiesResponseDocument queryResourceProperties( QueryResourcePropertiesDocument requestDoc )
+ {
+ if ( LOG.isDebugEnabled( ) )
+ {
+ LOG.debug( MSG.getMessage( Keys.QUERY_RP_REQ,
+ requestDoc.toString( ) ) );
+ }
+
+ QueryResourcePropertiesResponseDocument responseDoc = createResponseDocument( );
+ QueryExpressionType queryExprElem =
+ requestDoc.getQueryResourceProperties( ).getQueryExpression( );
+ SOAPEnvelope envelope;
+ try
+ {
+ envelope = getResourceContext( ).getSOAPMessage( ).getSOAPPart( ).getEnvelope( );
+ }
+ catch ( SOAPException soape )
+ {
+ throw new JAXRPCException( MSG.getMessage( Keys.FAILED_TO_EXTRACT_SOAP_ENV, soape ) );
+ }
+
+ XmlBeansQueryExpression queryExpr = null;
+ try
+ {
+ queryExpr = new XmlBeansQueryExpression( queryExprElem );
+ }
+ catch ( SchemaViolationException sve )
+ {
+ throw new JAXRPCException( sve );
+ }
+
+ refreshAllProperties( );
+ Object result = null;
+ try
+ {
+ result = QUERY_ENGINE.executeQuery( queryExpr,
+ getProperties( ),
+ envelope );
+ }
+ catch ( UnknownQueryExpressionDialectException uqede )
+ {
+ throw new UnknownQueryExpressionDialectFaultException( uqede.getDialect( ) );
+ }
+ catch ( QueryEvaluationErrorException qeee )
+ {
+ throw new QueryEvaluationErrorFaultException( qeee.getMessage( ) );
+ }
+ catch ( InvalidQueryExpressionException iqee )
+ {
+ throw new InvalidQueryExpressionFaultException( queryExpr );
+ }
+
+ QueryResourcePropertiesResponseDocument.QueryResourcePropertiesResponse responseElem =
+ responseDoc.getQueryResourcePropertiesResponse( );
+ if ( result.getClass( ).isArray( ) )
+ {
+ for ( int i = 0; i < Array.getLength( result ); i++ )
+ {
+ Object resultItem = Array.get( result, i );
+ XmlObject resultXBean = null;
+ try
+ {
+ resultXBean = XmlBeanUtils.toXmlObject( resultItem );
+ }
+ catch ( Exception e )
+ {
+ throw new JAXRPCException( e );
+ }
+
+ XmlBeanUtils.addChildElement( responseElem, resultXBean );
+ }
+ }
+ else
+ {
+ XmlBeanUtils.setValue( responseElem,
+ result.toString( ) );
+ }
+
+ return responseDoc;
+ }
+
+ private QueryResourcePropertiesResponseDocument createResponseDocument( )
+ {
+ QueryResourcePropertiesResponseDocument responseDoc =
+ QueryResourcePropertiesResponseDocument.Factory.newInstance( );
+ responseDoc.addNewQueryResourcePropertiesResponse( );
+ return responseDoc;
+ }
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/SetResourcePropertiesProvider.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/SetResourcePropertiesProvider.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2/porttype/impl/SetResourcePropertiesProvider.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,399 @@
+/*=============================================================================*
+ * 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.v1_2.porttype.impl;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.i18n.Keys;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.resource.properties.MetaDataViolationException;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.ResourcePropertyCallback;
+import org.apache.ws.resource.properties.ResourcePropertyMetaData;
+import org.apache.ws.resource.properties.SetResourcePropertyCallback;
+import org.apache.ws.resource.properties.faults.InvalidResourcePropertyQNameFaultException;
+import org.apache.ws.resource.properties.faults.InvalidSetResourcePropertiesRequestContentFaultException;
+import org.apache.ws.resource.properties.faults.SetResourcePropertyRequestFailedFaultException;
+import org.apache.ws.resource.properties.faults.UnableToModifyResourcePropertyFaultException;
+import org.apache.ws.resource.properties.impl.AnyResourcePropertyMetaData;
+import org.apache.ws.resource.properties.v1_2.porttype.SetResourcePropertiesPortType;
+import org.apache.ws.util.XmlBeanUtils;
+import org.apache.ws.util.i18n.Messages;
+import org.apache.xmlbeans.XmlObject;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.DeleteType;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.InsertType;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesResponseDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.UpdateType;
+
+import javax.xml.namespace.QName;
+
+/**
+ * LOG-DONE An operation provider for wsrp:SetResourceProperties.
+ *
+ * @author Ian P. Springer
+ */
+public class SetResourcePropertiesProvider
+ extends AbstractResourcePropertiesPortType
+ implements SetResourcePropertiesPortType
+{
+
+ private static final Log LOG = LogFactory.getLog( SetResourcePropertiesProvider.class );
+ private static final Messages MSG = MessagesImpl.getInstance();
+
+ /**
+ * Creates a new {@link SetResourcePropertiesProvider} object.
+ *
+ * @param resourceContext DOCUMENT_ME
+ */
+ public SetResourcePropertiesProvider( ResourceContext resourceContext )
+ {
+ super( resourceContext );
+ }
+
+ /**
+ * Implementation of the wsrp:SetResourceProperties operation.
+ *
+ * @param requestDoc the requestDoc XMLBean
+ *
+ * @return the response XMLBean
+ *
+ * @throws org.apache.ws.resource.properties.faults.InvalidResourcePropertyQNameFaultException
+ *
+ * @throws org.apache.ws.resource.faults.ResoureKeyHeaderNotFoundFaultException
+ *
+ */
+ public SetResourcePropertiesResponseDocument setResourceProperties( SetResourcePropertiesDocument requestDoc )
+ {
+ if ( LOG.isDebugEnabled() )
+ {
+ LOG.debug( MSG.getMessage( Keys.SET_RP_REQ,
+ requestDoc.toString() ) );
+ }
+
+ SetResourcePropertiesResponseDocument responseDoc = createResponseDocument();
+ SetResourcePropertiesDocument.SetResourceProperties requestElem = requestDoc.getSetResourceProperties();
+
+ InsertType[] insertElems = requestElem.getInsertArray();
+ for ( int i = 0; i < insertElems.length; i++ )
+ {
+ insertResourceProperty( insertElems[i] );
+ }
+
+ DeleteType[] deleteElems = requestElem.getDeleteArray();
+ for ( int i = 0; i < deleteElems.length; i++ )
+ {
+ deleteResourceProperty( deleteElems[i] );
+ }
+
+ UpdateType[] updateElems = requestElem.getUpdateArray();
+ for ( int i = 0; i < updateElems.length; i++ )
+ {
+ updateResourceProperty( updateElems[i] );
+ }
+
+ return responseDoc;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param deleteElem DOCUMENT_ME
+ */
+ protected void deleteResourceProperty( DeleteType deleteElem )
+ {
+ if ( LOG.isDebugEnabled() )
+ {
+ LOG.debug( MSG.getMessage( Keys.DEL_RP_REQ,
+ deleteElem.toString() ) );
+ }
+ QName nameOfPropToBeDeleted = deleteElem.getResourceProperty();
+ if ( nameOfPropToBeDeleted == null )
+ {
+ throw new InvalidSetResourcePropertiesRequestContentFaultException( MSG.getMessage( Keys.DEL_MISSING_RP_ATTRIB ) );
+ }
+ ResourceProperty prop = getProperties().get( nameOfPropToBeDeleted );
+ if ( prop == null )
+ {
+ if ( getProperties().getMetaData().isOpenContent() )
+ {
+ return;
+ } else
+ {
+ throw new InvalidResourcePropertyQNameFaultException( nameOfPropToBeDeleted );
+ }
+ }
+ throwFaultIfPropertyIsReadOnly( prop );
+ throwFaultIfDeletionViolatesSchema( prop );
+ //refreshProperty( prop );
+ try
+ {
+ deletePropertyCallback( prop );
+ }
+ catch ( RuntimeException re )
+ {
+ throw new SetResourcePropertyRequestFailedFaultException( re.toString() );
+ }
+ prop.clear();
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param insertElem DOCUMENT_ME
+ */
+ protected void insertResourceProperty( InsertType insertElem )
+ {
+ if ( LOG.isDebugEnabled() )
+ {
+ LOG.debug( MSG.getMessage( Keys.INSERT_RP_REQ,
+ insertElem.toString() ) );
+ }
+
+ XmlObject[] propElemsToBeInserted = XmlBeanUtils.getChildElements( insertElem );
+ if ( propElemsToBeInserted.length == 0 )
+ {
+ return; // nothing to do
+ }
+ throwFaultIfElementNamesHeterogenous( propElemsToBeInserted );
+
+ QName propName = XmlBeanUtils.getName( propElemsToBeInserted[0] );
+ ResourceProperty prop = getProperty( propName );
+
+ if(prop == null)
+ {
+ prop = createAnyProperty(propName);
+ getProperties().add(prop);
+ }
+
+ if(!prop.getMetaData().isAny())
+ {
+ //todo probably need to check this for xsd:any to check for possible violations
+ //refreshProperty( prop );
+ throwFaultIfInsertionViolatesSchema( prop, propElemsToBeInserted );
+ }
+
+ throwFaultIfPropertyIsReadOnly( prop );
+
+ try
+ {
+ insertPropertyCallback( prop, propElemsToBeInserted );
+ }
+ catch ( RuntimeException re )
+ {
+ throw new SetResourcePropertyRequestFailedFaultException( re.toString() );
+ }
+
+ for ( int i = 0; i < propElemsToBeInserted.length; i++ )
+ {
+ try
+ {
+ prop.add( propElemsToBeInserted[i] );
+ }
+ catch ( MetaDataViolationException mdve )
+ {
+ throw new InvalidSetResourcePropertiesRequestContentFaultException( mdve );
+ }
+ }
+ }
+
+ private ResourceProperty createAnyProperty(QName propName)
+ {
+ ResourceProperty prop;
+ ResourcePropertyMetaData propMetaData = new AnyResourcePropertyMetaData( propName );
+ prop = propMetaData.create( getProperties() );
+ return prop;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param updateElem DOCUMENT_ME
+ */
+ protected void updateResourceProperty( UpdateType updateElem )
+ {
+ if ( LOG.isDebugEnabled() )
+ {
+ LOG.debug( MSG.getMessage( Keys.UPDATE_RP_REQ,
+ updateElem.toString() ) );
+ }
+
+ XmlObject[] newPropElems = XmlBeanUtils.getChildElements( updateElem );
+ if ( newPropElems.length == 0 )
+ {
+ return; // nothing to do
+ }
+
+ QName propName = XmlBeanUtils.getName( newPropElems[0] );
+ ResourceProperty prop = getProperty( propName );
+
+ //refreshProperty( prop );
+
+ throwFaultIfPropertyIsReadOnly( prop );
+ throwFaultIfElementNamesHeterogenous( newPropElems );
+ throwFaultIfUpdateViolatesSchema( prop, newPropElems );
+
+ try
+ {
+ updatePropertyCallback( prop, newPropElems );
+ }
+ catch ( RuntimeException re )
+ {
+ throw new SetResourcePropertyRequestFailedFaultException( re.toString() );
+ }
+
+ try
+ {
+
+ prop.clear();
+ for ( int i = 0; i < newPropElems.length; i++ )
+ {
+ prop.add( newPropElems[i] );
+ }
+ }
+ catch ( MetaDataViolationException mdve )
+ {
+ throw new InvalidSetResourcePropertiesRequestContentFaultException( mdve );
+ }
+ }
+
+ private ResourceProperty getProperty( QName propName )
+ {
+ LOG.debug( MSG.getMessage( Keys.GET_RP_WITH_NAME,
+ propName.toString() ) );
+ ResourceProperty prop = getProperties().get( propName );
+ if ( prop == null )
+ {
+ if ( !getProperties().getMetaData().isOpenContent() )
+ {
+ throw new InvalidResourcePropertyQNameFaultException( propName );
+ }
+ }
+
+ return prop;
+ }
+
+ private void throwFaultIfElementNamesHeterogenous( XmlObject[] propElems )
+ {
+ QName firstPropElemName = XmlBeanUtils.getName( propElems[0] );
+ for ( int i = 1; i < propElems.length; i++ )
+ {
+ QName propElemName = XmlBeanUtils.getName( propElems[i] );
+ if ( !firstPropElemName.equals( propElemName ) )
+ {
+ throw new InvalidSetResourcePropertiesRequestContentFaultException( MSG.getMessage( Keys.ERROR_PROPERTY_INSERT_VIOLATES_SCHEMA,
+ ( ( propElems.length > 1 )
+ ? "s" : "" ),
+ firstPropElemName ) );
+ }
+ }
+ }
+
+ private void throwFaultIfDeletionViolatesSchema( ResourceProperty prop )
+ {
+ if ( prop.getMetaData().getMinOccurs() != 0 )
+ {
+ throw new InvalidSetResourcePropertiesRequestContentFaultException( MSG.getMessage( Keys.ERROR_PROPERTY_DELETE_VIOLATES_SCHEMA,
+ prop.getMetaData().getName() ) );
+ }
+ }
+
+ private void throwFaultIfInsertionViolatesSchema( ResourceProperty prop, XmlObject[] propElemsToBeInserted )
+ { //todo probably need to check this for xsd:any to check for possible violations
+ if ( prop.getMetaData().getMaxOccurs() != -1 &&( prop.size() + propElemsToBeInserted.length ) > prop.getMetaData().getMaxOccurs() )
+ {
+ throw new InvalidSetResourcePropertiesRequestContentFaultException( MSG.getMessage( Keys.ERROR_PROPERTY_INSERT_VIOLATES_SCHEMA,
+ ( ( propElemsToBeInserted.length > 1 )
+ ? "s" : "" ),
+ prop.getMetaData().getName() ) );
+ }
+ }
+
+ private void throwFaultIfUpdateViolatesSchema( ResourceProperty prop, XmlObject[] newPropElems )
+ {
+ if ( prop.getMetaData().getMaxOccurs() != -1 && newPropElems.length > prop.getMetaData().getMaxOccurs() )
+ {
+ throw new InvalidSetResourcePropertiesRequestContentFaultException( MSG.getMessage( Keys.ERROR_PROPERTY_UPDATE_VIOLATES_SCHEMA,
+ prop.getMetaData().getName() ) );
+ }
+ }
+
+ /**
+ * Returns SetResourcePropertyCallback or null
+ *
+ * @param prop
+ *
+ * @return SetResourcePropertyCallback or null
+ */
+ private SetResourcePropertyCallback getSetResourcePropertyCallback( ResourceProperty prop )
+ {
+ SetResourcePropertyCallback setResourcePropertyCallback = null;
+ ResourcePropertyCallback callBack = prop.getCallBack();
+ if ( callBack instanceof SetResourcePropertyCallback )
+ {
+ setResourcePropertyCallback = (SetResourcePropertyCallback) callBack;
+ }
+
+ return setResourcePropertyCallback;
+ }
+
+ private SetResourcePropertiesResponseDocument createResponseDocument()
+ {
+ SetResourcePropertiesResponseDocument responseDoc =
+ SetResourcePropertiesResponseDocument.Factory.newInstance();
+ responseDoc.addNewSetResourcePropertiesResponse();
+ return responseDoc;
+ }
+
+ private void deletePropertyCallback( ResourceProperty prop )
+ {
+ QName nameOfPropToBeDeleted = prop.getMetaData().getName();
+ SetResourcePropertyCallback setResourcePropertyCallback = getSetResourcePropertyCallback( prop );
+ if ( setResourcePropertyCallback != null )
+ {
+ setResourcePropertyCallback.deleteProperty( nameOfPropToBeDeleted );
+ }
+ }
+
+ private void insertPropertyCallback( ResourceProperty prop,
+ XmlObject[] propElemsToBeInserted )
+ {
+ SetResourcePropertyCallback setResourcePropertyCallback = getSetResourcePropertyCallback( prop );
+ if ( setResourcePropertyCallback != null )
+ {
+ setResourcePropertyCallback.insertProperty( propElemsToBeInserted );
+ }
+ }
+
+ private void throwFaultIfPropertyIsReadOnly( ResourceProperty prop )
+ {
+ if ( prop.getMetaData().isReadOnly() )
+ {
+ throw new UnableToModifyResourcePropertyFaultException( prop.getMetaData().getName() );
+ }
+ }
+
+ private void updatePropertyCallback( ResourceProperty prop,
+ XmlObject[] newPropElems )
+ {
+ SetResourcePropertyCallback setResourcePropertyCallback = getSetResourcePropertyCallback( prop );
+ if ( setResourcePropertyCallback != null )
+ {
+ setResourcePropertyCallback.updateProperty( newPropElems );
+ }
+ }
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_3/ResourceProperties1_3Constants.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_3/ResourceProperties1_3Constants.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_3/ResourceProperties1_3Constants.java Thu Dec 23 08:12:32 2004
@@ -0,0 +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.v1_3;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author Ian P. Springer
+ */
+public interface ResourceProperties1_3Constants
+{
+ /**
+ * DOCUMENT_ME
+ */
+ String NSURI_WSRP_SCHEMA =
+ "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceProperties-1.2-draft-05.xsd";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSPREFIX_WSRP_SCHEMA = "wsrf-rp";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSURI_WSRP_WSDL = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceProperties-1.2-draft-05.wsdl";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSPREFIX_WSRP_WSDL = "wsrf-rpw";
+
+ QName PORT_TYPE_NAME_GET_RESOURCE_PROPERTY = new QName( NSURI_WSRP_WSDL, "GetResourceProperty", NSPREFIX_WSRP_SCHEMA );
+ QName PORT_TYPE_NAME_GET_MULTIPLE_RESOURCE_PROPERTIES = new QName( NSURI_WSRP_WSDL, "GetMultipleResourceProperties", NSPREFIX_WSRP_SCHEMA );
+ QName PORT_TYPE_NAME_SET_RESOURCE_PROPERTIES = new QName( NSURI_WSRP_WSDL, "SetResourceProperties", NSPREFIX_WSRP_SCHEMA );
+ QName PORT_TYPE_NAME_QUERY_RESOURCE_PROPERTIES = new QName( NSURI_WSRP_WSDL, "QueryResourceProperties", NSPREFIX_WSRP_SCHEMA );
+
+ /**
+ * QName of the "ResourceProperties" portType attribute.
+ */
+ QName RESOURCE_PROPERTIES_PORTTYPE_ATTRIB =
+ new QName( NSURI_WSRP_SCHEMA, "ResourceProperties", NSPREFIX_WSRP_SCHEMA );
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/ServiceGroup1_2Constants.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/ServiceGroup1_2Constants.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/ServiceGroup1_2Constants.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,50 @@
+/*=============================================================================*
+ * 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.servicegroup;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author Ian P. Springer
+ */
+public interface ServiceGroup1_2Constants
+{
+ /**
+ * DOCUMENT_ME
+ */
+ String NSURI_WSSG_SCHEMA =
+ "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSPREFIX_WSSG_SCHEMA = "wssg";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSURI_WSSG_WSDL = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.wsdl";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSPREFIX_WSSG_WSDL = "wssgw";
+
+ QName PORT_TYPE_NAME_SERVICE_GROUP = new QName( NSURI_WSSG_WSDL, "ServiceGroup", NSPREFIX_WSSG_SCHEMA );
+ QName PORT_TYPE_NAME_SERVICE_GROUP_ENTRY = new QName( NSURI_WSSG_WSDL, "ServiceGroupEntry", NSPREFIX_WSSG_SCHEMA );
+ QName PORT_TYPE_NAME_SERVICE_GROUP_REGISTRATION = new QName( NSURI_WSSG_WSDL, "ServiceGroupRegistration", NSPREFIX_WSSG_SCHEMA );
+
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/ServiceGroupEntryPortType.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/ServiceGroupEntryPortType.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/ServiceGroupEntryPortType.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,35 @@
+/*
+ * 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.servicegroup.porttype;
+
+import org.apache.ws.resource.servicegroup.ServiceGroup1_2Constants;
+import org.apache.ws.resource.properties.v1_2.porttype.GetResourcePropertyPortType;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The WSRF-SG ServiceGroupEntry portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface ServiceGroupEntryPortType extends GetResourcePropertyPortType
+{
+
+ QName PROP_NAME_SERVICE_GROUP_EPR = new QName( ServiceGroup1_2Constants.NSURI_WSSG_SCHEMA, "ServiceGroupEPR", ServiceGroup1_2Constants.NSPREFIX_WSSG_SCHEMA );
+ QName PROP_NAME_MEMBER_EPR = new QName( ServiceGroup1_2Constants.NSURI_WSSG_SCHEMA, "MemberEPR", ServiceGroup1_2Constants.NSPREFIX_WSSG_SCHEMA );
+ QName PROP_NAME_CONTENT = new QName( ServiceGroup1_2Constants.NSURI_WSSG_SCHEMA, "Content", ServiceGroup1_2Constants.NSPREFIX_WSSG_SCHEMA );
+
+}
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/ServiceGroupPortType.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/ServiceGroupPortType.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/ServiceGroupPortType.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,34 @@
+/*
+ * 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.servicegroup.porttype;
+
+import org.apache.ws.resource.servicegroup.ServiceGroup1_2Constants;
+import org.apache.ws.resource.properties.v1_2.porttype.GetResourcePropertyPortType;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The WSRF-SG ServiceGroup portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface ServiceGroupPortType extends GetResourcePropertyPortType
+{
+
+ QName PROP_NAME_MEMBERSHIP_CONTENT_RULE = new QName( ServiceGroup1_2Constants.NSURI_WSSG_SCHEMA, "MembershipContentRule", ServiceGroup1_2Constants.NSPREFIX_WSSG_SCHEMA );
+ QName PROP_NAME_ENTRY = new QName( ServiceGroup1_2Constants.NSURI_WSSG_SCHEMA, "Entry", ServiceGroup1_2Constants.NSPREFIX_WSSG_SCHEMA );
+
+}
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/ServiceGroupRegistrationPortType.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/ServiceGroupRegistrationPortType.java?view=auto&rev=123204
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2/porttype/ServiceGroupRegistrationPortType.java Thu Dec 23 08:12:32 2004
@@ -0,0 +1,43 @@
+/*
+ * 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.servicegroup.porttype;
+
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSServiceGroup12Draft01.AddResponseDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSServiceGroup12Draft01.AddDocument;
+import org.apache.ws.resource.servicegroup.ServiceGroup1_2Constants;
+import org.apache.ws.resource.properties.v1_2.porttype.GetResourcePropertyPortType;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The WSRF-SG ServiceGroupRegistration portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface ServiceGroupRegistrationPortType extends GetResourcePropertyPortType
+{
+
+ QName PROP_NAME_MEMBERSHIP_CONTENT_RULE = new QName( ServiceGroup1_2Constants.NSURI_WSSG_SCHEMA, "MembershipContentRule", ServiceGroup1_2Constants.NSPREFIX_WSSG_SCHEMA );
+ QName PROP_NAME_ENTRY = new QName( ServiceGroup1_2Constants.NSURI_WSSG_SCHEMA, "Entry", ServiceGroup1_2Constants.NSPREFIX_WSSG_SCHEMA );
+
+ /**
+ *
+ * @param requestDoc
+ * @return
+ */
+ AddResponseDocument add( AddDocument requestDoc );
+
+}
Modified: incubator/apollo/trunk/src/java/org/apache/ws/util/WsrfWsdlUtils.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/util/WsrfWsdlUtils.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/java/org/apache/ws/util/WsrfWsdlUtils.java&r1=123203&p2=incubator/apollo/trunk/src/java/org/apache/ws/util/WsrfWsdlUtils.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/util/WsrfWsdlUtils.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/util/WsrfWsdlUtils.java Thu Dec 23 08:12:32 2004
@@ -15,8 +15,8 @@
*=============================================================================*/
package org.apache.ws.util;
-import org.apache.ws.resource.properties.ResourceProperties1_1Constants;
-import org.apache.ws.resource.properties.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_2.ResourceProperties1_2Constants;
+import org.apache.ws.resource.properties.v1_3.ResourceProperties1_3Constants;
import org.apache.xml.utils.PrefixResolver;
import org.apache.xml.utils.PrefixResolverDefault;
import org.w3c.dom.Element;
@@ -194,11 +194,11 @@
{
Map extAttribs = portType.getExtensionAttributes();
QName rpDocDefQName =
- (QName) extAttribs.get( ResourceProperties1_2Constants.RESOURCE_PROPERTIES_PORTTYPE_ATTRIB );
+ (QName) extAttribs.get( ResourceProperties1_3Constants.RESOURCE_PROPERTIES_PORTTYPE_ATTRIB );
if ( rpDocDefQName == null )
{
rpDocDefQName =
- (QName) extAttribs.get( ResourceProperties1_1Constants.RESOURCE_PROPERTIES_PORTTYPE_ATTRIB );
+ (QName) extAttribs.get( ResourceProperties1_2Constants.RESOURCE_PROPERTIES_PORTTYPE_ATTRIB );
}
return rpDocDefQName;
Modified: incubator/apollo/trunk/src/java/org/apache/ws/util/XmlUtils.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/util/XmlUtils.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/java/org/apache/ws/util/XmlUtils.java&r1=123203&p2=incubator/apollo/trunk/src/java/org/apache/ws/util/XmlUtils.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/util/XmlUtils.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/util/XmlUtils.java Thu Dec 23 08:12:32 2004
@@ -46,7 +46,7 @@
{
private static Log LOG = LogFactory.getLog( XmlUtils.class.getName( ) );
public static final Messages MSG = MessagesImpl.getInstance();
- private static DocumentBuilderFactory dbf = getDOMFactory( );
+ private static DocumentBuilderFactory s_dbf = getDOMFactory( );
/**
* Get an empty new Document
@@ -58,9 +58,9 @@
public static Document newDocument( )
throws ParserConfigurationException
{
- synchronized ( dbf )
+ synchronized ( s_dbf )
{
- return dbf.newDocumentBuilder( ).newDocument( );
+ return s_dbf.newDocumentBuilder( ).newDocument( );
}
}
@@ -82,9 +82,9 @@
{
DocumentBuilder db;
- synchronized ( dbf )
+ synchronized ( s_dbf )
{
- db = dbf.newDocumentBuilder( );
+ db = s_dbf.newDocumentBuilder( );
}
db.setErrorHandler( new XMLUtils.ParserErrorHandler( ) );
Modified: incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java&r1=123203&p2=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java (original)
+++ incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java Thu Dec 23 08:12:32 2004
@@ -17,16 +17,11 @@
import junit.framework.TestCase;
import org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet;
-import org.apache.ws.resource.properties.porttype.impl.SetResourcePropertiesProvider;
import org.apache.ws.util.IoUtils;
-import org.apache.ws.util.XmlBeanUtils;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlOptions;
import org.apache.xmlbeans.impl.common.XmlErrorPrinter;
import org.apache.xmlbeans.impl.tool.SchemaCompiler;
-import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.InsertDocument;
-import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.InsertType;
import java.io.File;
import java.io.IOException;
Modified: incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractSushiService.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractSushiService.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractSushiService.java&r1=123203&p2=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractSushiService.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractSushiService.java (original)
+++ incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractSushiService.java Thu Dec 23 08:12:32 2004
@@ -16,17 +16,17 @@
package org.apache.ws.resource.properties;
import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.properties.v1_2.porttype.SetResourcePropertiesPortType;
+import org.apache.ws.resource.properties.v1_2.porttype.GetMultipleResourcePropertiesPortType;
+import org.apache.ws.resource.properties.v1_2.porttype.GetResourcePropertyPortType;
+import org.apache.ws.resource.properties.v1_2.porttype.QueryResourcePropertiesPortType;
+import org.apache.ws.resource.properties.v1_2.porttype.impl.GetMultipleResourcePropertiesProvider;
+import org.apache.ws.resource.properties.v1_2.porttype.impl.SetResourcePropertiesProvider;
+import org.apache.ws.resource.properties.v1_2.porttype.impl.GetResourcePropertyProvider;
+import org.apache.ws.resource.properties.v1_2.porttype.impl.QueryResourcePropertiesProvider;
import org.apache.ws.resource.handler.SoapMethodNameMap;
import org.apache.ws.resource.handler.WsrfService;
import org.apache.ws.resource.handler.ServiceSoapMethodNameMap;
-import org.apache.ws.resource.properties.porttype.GetMultipleResourcePropertiesPortType;
-import org.apache.ws.resource.properties.porttype.GetResourcePropertyPortType;
-import org.apache.ws.resource.properties.porttype.QueryResourcePropertiesPortType;
-import org.apache.ws.resource.properties.porttype.SetResourcePropertiesPortType;
-import org.apache.ws.resource.properties.porttype.impl.GetMultipleResourcePropertiesProvider;
-import org.apache.ws.resource.properties.porttype.impl.GetResourcePropertyProvider;
-import org.apache.ws.resource.properties.porttype.impl.QueryResourcePropertiesProvider;
-import org.apache.ws.resource.properties.porttype.impl.SetResourcePropertiesProvider;
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesDocument;
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesResponseDocument;
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument;
@@ -36,17 +36,16 @@
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesDocument;
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesResponseDocument;
import javax.xml.namespace.QName;
-import java.util.HashMap;
/**
* @author Sal Campana
*/
public abstract class AbstractSushiService
implements WsrfService,
- GetResourcePropertyPortType,
- GetMultipleResourcePropertiesPortType,
- SetResourcePropertiesPortType,
- QueryResourcePropertiesPortType
+ GetResourcePropertyPortType,
+ GetMultipleResourcePropertiesPortType,
+ SetResourcePropertiesPortType,
+ QueryResourcePropertiesPortType
{
/** DOCUMENT_ME */
public static final String TARGET_NSURI = "http://ws.apache.org/resource/sushi";
Modified: incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/AbstractWsrpPortTypeImplTestCase.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/AbstractWsrpPortTypeImplTestCase.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/AbstractWsrpPortTypeImplTestCase.java&r1=123203&p2=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/AbstractWsrpPortTypeImplTestCase.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/AbstractWsrpPortTypeImplTestCase.java (original)
+++ incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/AbstractWsrpPortTypeImplTestCase.java Thu Dec 23 08:12:32 2004
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*=============================================================================*/
-package org.apache.ws.resource.properties.porttype.impl;
+package org.apache.ws.resource.properties.v1_2.porttype.impl;
import org.apache.ws.resource.properties.AbstractResourcePropertiesTestCase;
import org.apache.ws.util.XmlBeanUtils;
Modified: incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetMultipleResourcePropertiesProviderTestCase.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetMultipleResourcePropertiesProviderTestCase.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetMultipleResourcePropertiesProviderTestCase.java&r1=123203&p2=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetMultipleResourcePropertiesProviderTestCase.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetMultipleResourcePropertiesProviderTestCase.java (original)
+++ incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetMultipleResourcePropertiesProviderTestCase.java Thu Dec 23 08:12:32 2004
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*=============================================================================*/
-package org.apache.ws.resource.properties.porttype.impl;
+package org.apache.ws.resource.properties.v1_2.porttype.impl;
import org.apache.ws.resource.properties.ResourceProperty;
import org.apache.ws.resource.properties.SushiCallback;
Modified: incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetResourcePropertyProviderTestCase.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetResourcePropertyProviderTestCase.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetResourcePropertyProviderTestCase.java&r1=123203&p2=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetResourcePropertyProviderTestCase.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetResourcePropertyProviderTestCase.java (original)
+++ incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/GetResourcePropertyProviderTestCase.java Thu Dec 23 08:12:32 2004
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*=============================================================================*/
-package org.apache.ws.resource.properties.porttype.impl;
+package org.apache.ws.resource.properties.v1_2.porttype.impl;
import org.apache.ws.resource.properties.ResourceProperty;
import org.apache.ws.resource.properties.SushiCallback;
Modified: incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/QueryResourcePropertiesProviderTestCase.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/QueryResourcePropertiesProviderTestCase.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/QueryResourcePropertiesProviderTestCase.java&r1=123203&p2=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/QueryResourcePropertiesProviderTestCase.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/QueryResourcePropertiesProviderTestCase.java (original)
+++ incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/QueryResourcePropertiesProviderTestCase.java Thu Dec 23 08:12:32 2004
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*=============================================================================*/
-package org.apache.ws.resource.properties.porttype.impl;
+package org.apache.ws.resource.properties.v1_2.porttype.impl;
import org.apache.ws.resource.ResourceContextException;
import org.apache.ws.resource.ResourceException;
Modified: incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/SetResourcePropertiesProviderTestCase.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/SetResourcePropertiesProviderTestCase.java?view=diff&rev=123204&p1=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/SetResourcePropertiesProviderTestCase.java&r1=123203&p2=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/SetResourcePropertiesProviderTestCase.java&r2=123204
==============================================================================
--- incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/SetResourcePropertiesProviderTestCase.java (original)
+++ incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/v1_2/porttype/impl/SetResourcePropertiesProviderTestCase.java Thu Dec 23 08:12:32 2004
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*=============================================================================*/
-package org.apache.ws.resource.properties.porttype.impl;
+package org.apache.ws.resource.properties.v1_2.porttype.impl;
import org.apache.ws.resource.ResourceContextException;
import org.apache.ws.resource.ResourceException;
---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org