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 2005/03/19 00:16:05 UTC

svn commit: r158163 [1/3] - in incubator/apollo/trunk/src: java/org/apache/ws/resource/faults/v2004_06/ java/org/apache/ws/resource/faults/v2004_11/ java/org/apache/ws/resource/lifetime/v2004_06/ java/org/apache/ws/resource/lifetime/v2004_06/porttype/ java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ java/org/apache/ws/resource/lifetime/v2004_11/ java/org/apache/ws/resource/lifetime/v2004_11/porttype/ java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ java/org/apache/ws/resource/properties/v2004_06/ java/org/apache/ws/resource/properties/v2004_06/impl/ java/org/apache/ws/resource/properties/v2004_06/porttype/ java/org/apache/ws/resource/properties/v2004_06/porttype/impl/ java/org/apache/ws/resource/properties/v2004_11/ java/org/apache/ws/resource/properties/v2004_11/impl/ java/org/apache/ws/resource/properties/v2004_11/porttype/ java/org/apache/ws/resource/properties/v2004_11/porttype/impl/ java/org/apache/ws/resource/servicegroup/v2004_06/ java/org/apache/ws/resource/servicegroup/v2004_06/porttype/ java/org/apache/ws/resource/servicegroup/v2004_11/ test/org/apache/ws/resource/properties/

Author: ips
Date: Fri Mar 18 15:15:56 2005
New Revision: 158163

URL: http://svn.apache.org/viewcvs?view=rev&rev=158163
Log:
package name refactoring

Added:
    incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v2004_06/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v2004_06/FaultsConstants.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v2004_11/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v2004_11/FaultsConstants.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/ResourceLifetimeConstants.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ImmediateResourceTerminationPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ScheduledResourceTerminationPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/ResourceLifetimeConstants.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ImmediateResourceTerminationPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ScheduledResourceTerminationPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/ResourcePropertiesConstants.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/NamespaceVersionHolderImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/XmlBeansResourcePropertyValueChangeEvent.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/GetMultipleResourcePropertiesPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/GetResourcePropertyPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/QueryResourcePropertiesPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/SetResourcePropertiesPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetMultipleResourcePropertiesPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetResourcePropertyPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/QueryResourcePropertiesPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/SetResourcePropertiesPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/ResourcePropertiesConstants.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/impl/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/impl/NamespaceVersionHolderImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/impl/XmlBeansResourcePropertyValueChangeEvent.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/DeleteResourcePropertiesPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/GetMultipleResourcePropertiesPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/GetResourcePropertyDocumentPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/GetResourcePropertyPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/InsertResourcePropertiesPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/QueryResourcePropertiesPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/SetResourcePropertiesPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/UpdateResourcePropertiesPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/DeleteResourcePropertiesPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/GetMultipleResourcePropertiesPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/GetResourcePropertyDocumentPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/GetResourcePropertyPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/InsertResourcePropertiesPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/QueryResourcePropertiesPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/SetResourcePropertiesPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/UpdateResourcePropertiesPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v2004_06/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v2004_06/ServiceGroupConstants.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v2004_06/porttype/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v2004_06/porttype/ServiceGroupEntryPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v2004_06/porttype/ServiceGroupPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v2004_06/porttype/ServiceGroupRegistrationPortType.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v2004_11/
    incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v2004_11/ServiceGroupConstants.java
Modified:
    incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractSushiService.java
    incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiResourceContext.java

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v2004_06/FaultsConstants.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v2004_06/FaultsConstants.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v2004_06/FaultsConstants.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v2004_06/FaultsConstants.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,46 @@
+/*=============================================================================*
+ *  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.faults.v2004_06;
+
+import org.apache.ws.resource.v2004_06.WsrfConstants;
+
+/**
+ * Constants for namespaces defined by the 2004/06 version of the WSRF BaseFaults specification.
+ */
+public interface FaultsConstants
+{
+
+    /**
+     * Namespace URI for WS-BaseFaults schema.
+     */
+    String NSURI_BASEFAULTS_SCHEMA = WsrfConstants.BASE_URI_WSRF + "wsrf-WS-BaseFaults-1.2-draft-01.xsd";
+
+    /**
+     * Namespace prefix for WS-BaseFaults schema.
+     */
+    String NSPREFIX_BASEFAULTS_SCHEMA = "wsbf";
+
+    /**
+     * Namespace URI for WS-BaseFaults WSDL.
+     */
+    String NSURI_BASEFAULTS_WSDL = WsrfConstants.BASE_URI_WSRF + "wsrf-WS-BaseFaults-1.2-draft-01.wsdl";
+
+    /**
+     * Namespace prefix for WS-BaseFaults WSDL.
+     */
+    String NSPREFIX_BASEFAULTS_WSDL = "wsbfw";
+
+}
\ No newline at end of file

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v2004_11/FaultsConstants.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v2004_11/FaultsConstants.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v2004_11/FaultsConstants.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v2004_11/FaultsConstants.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,46 @@
+/*=============================================================================*
+ *  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.faults.v2004_11;
+
+import org.apache.ws.resource.v2004_11.WsrfConstants;
+
+/**
+ * Constants for namespaces defined by the 2004/11 version of the WSRF BaseFaults specification.
+ */
+public interface FaultsConstants
+{
+
+    /**
+     * Namespace URI for WS-BaseFaults schema.
+     */
+    String NSURI_BASEFAULTS_SCHEMA = WsrfConstants.BASE_URI_WSRF + "wsrf-WS-BaseFaults-1.2-draft-03.xsd";
+
+    /**
+     * Namespace prefix for WS-BaseFaults schema.
+     */
+    String NSPREFIX_BASEFAULTS_SCHEMA = "wsrf-bf";
+
+    /**
+     * Namespace URI for WS-BaseFaults WSDL.
+     */
+    String NSURI_BASEFAULTS_WSDL = WsrfConstants.BASE_URI_WSRF + "wsrf-WS-BaseFaults-1.2-draft-03.wsdl";
+
+    /**
+     * Namespace prefix for WS-BaseFaults WSDL.
+     */
+    String NSPREFIX_BASEFAULTS_WSDL = "wsrf-bfw";
+
+}
\ No newline at end of file

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/ResourceLifetimeConstants.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/ResourceLifetimeConstants.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/ResourceLifetimeConstants.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/ResourceLifetimeConstants.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,46 @@
+/*=============================================================================*
+ *  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.v2004_06;
+
+import org.apache.ws.resource.v2004_06.WsrfConstants;
+
+/**
+ * Constants for namespaces defined by the 2004/06 version of the WSRF ResourceLifetime specification.
+ */
+public interface ResourceLifetimeConstants
+{
+
+   /**
+    * Namespace URI for WS-ResourceLifetime schema.
+    */
+   String NSURI_WSRL_SCHEMA = WsrfConstants.BASE_URI_WSRF + "wsrf-WS-ResourceLifetime-1.2-draft-01.xsd";
+
+   /**
+    * Namespace prefix for WS-ResourceLifetime schema.
+    */
+   String NSPREFIX_WSRL_SCHEMA = "wsrl";
+
+   /**
+    * Namespace URI for WS-ResourceLifetime WSDL.
+    */
+   String NSURI_WSRL_WSDL = WsrfConstants.BASE_URI_WSRF + "wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl";
+
+   /**
+    * Namespace prefix for WS-ResourceLifetime WSDL.
+    */
+   String NSPREFIX_WSRL_WSDL = "wsrlw";
+
+}
\ No newline at end of file

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ImmediateResourceTerminationPortType.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ImmediateResourceTerminationPortType.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ImmediateResourceTerminationPortType.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ImmediateResourceTerminationPortType.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,42 @@
+/*=============================================================================*
+ *  Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource.lifetime.v2004_06.porttype;
+
+import org.apache.ws.resource.lifetime.v2004_06.ResourceLifetimeConstants;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyResponseDocument;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The WSRF-RL ImmediateResourceTermination portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface ImmediateResourceTerminationPortType
+{
+
+   QName NAME = new QName( ResourceLifetimeConstants.NSURI_WSRL_WSDL, "ImmediateResourceTermination", ResourceLifetimeConstants.NSPREFIX_WSRL_WSDL );
+
+    /**
+    * 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/v2004_06/porttype/ScheduledResourceTerminationPortType.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ScheduledResourceTerminationPortType.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ScheduledResourceTerminationPortType.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ScheduledResourceTerminationPortType.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,53 @@
+/*=============================================================================*
+ *  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.v2004_06.porttype;
+
+import org.apache.ws.resource.lifetime.v2004_06.ResourceLifetimeConstants;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeResponseDocument;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The WSRF-RL ScheduledResourceTermination portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface ScheduledResourceTerminationPortType
+{
+
+    QName NAME = new QName( ResourceLifetimeConstants.NSURI_WSRL_WSDL, "ScheduledResourceTermination", ResourceLifetimeConstants.NSPREFIX_WSRL_WSDL );
+
+    /**
+     * CurrentTime property name.
+     */
+    QName PROP_QNAME_CURRENT_TIME = new QName( ResourceLifetimeConstants.NSURI_WSRL_SCHEMA, "CurrentTime", ResourceLifetimeConstants.NSPREFIX_WSRL_SCHEMA );
+
+    /**
+     * TerminationTime property name.
+     */
+    QName PROP_QNAME_TERMINATION_TIME = new QName( ResourceLifetimeConstants.NSURI_WSRL_SCHEMA, "TerminationTime", ResourceLifetimeConstants.NSPREFIX_WSRL_SCHEMA );
+
+    /**
+     * 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/v2004_06/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,95 @@
+/*=============================================================================*
+ *  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.v2004_06.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.Keys;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.resource.lifetime.faults.ResourceNotDestroyedFaultException;
+import org.apache.ws.resource.lifetime.v2004_06.porttype.ImmediateResourceTerminationPortType;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl;
+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();
+    private static final NamespaceVersionHolder NAMESPACE_SET = new NamespaceVersionHolderImpl();
+
+    /**
+     * 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( NAMESPACE_SET, String.valueOf(
+                    getResourceKey().getValue() ),
+                    getResourceContext().getServiceName() );
+        }
+
+        return createResponseDocument();
+    }
+
+    protected NamespaceVersionHolder getNamespaceSet()
+    {
+        return NAMESPACE_SET;
+    }
+
+    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/v2004_06/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,140 @@
+/*=============================================================================*
+ *  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.v2004_06.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.i18n.MessagesImpl;
+import org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource;
+import org.apache.ws.resource.lifetime.faults.UnableToSetTerminationTimeFaultException;
+import org.apache.ws.resource.lifetime.v2004_06.porttype.ScheduledResourceTerminationPortType;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.impl.AbstractResourcePropertiesPortType;
+import org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl;
+import org.apache.ws.util.i18n.Messages;
+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() );
+
+    private static final Messages MSG = MessagesImpl.getInstance();
+
+    private static final NamespaceVersionHolder NAMESPACE_SET = new NamespaceVersionHolderImpl();
+
+    /**
+     * 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();
+    }
+
+    protected NamespaceVersionHolder getNamespaceSet()
+    {
+        return NAMESPACE_SET;
+    }
+
+    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( NAMESPACE_SET, 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

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/ResourceLifetimeConstants.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/ResourceLifetimeConstants.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/ResourceLifetimeConstants.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/ResourceLifetimeConstants.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,46 @@
+/*=============================================================================*
+ *  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.v2004_11;
+
+import org.apache.ws.resource.v2004_11.WsrfConstants;
+
+/**
+ * Constants for namespaces defined by the 2004/11 version of the WSRF ResourceLifetime specification.
+ */
+public interface ResourceLifetimeConstants
+{
+
+   /**
+    * Namespace URI for WS-ResourceLifetime schema.
+    */
+   String NSURI_WSRL_SCHEMA = WsrfConstants.BASE_URI_WSRF + "wsrf-WS-ResourceLifetime-1.2-draft-04.xsd";
+
+   /**
+    * Namespace prefix for WS-ResourceLifetime schema.
+    */
+   String NSPREFIX_WSRL_SCHEMA = "wsrf-rl";
+
+   /**
+    * Namespace URI for WS-ResourceLifetime WSDL.
+    */
+   String NSURI_WSRL_WSDL = WsrfConstants.BASE_URI_WSRF + "wsrf-WS-ResourceLifetime-1.2-draft-04.wsdl";
+
+   /**
+    * Namespace prefix for WS-ResourceLifetime WSDL.
+    */
+   String NSPREFIX_WSRL_WSDL = "wsrf-rlw";
+
+}
\ No newline at end of file

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ImmediateResourceTerminationPortType.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ImmediateResourceTerminationPortType.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ImmediateResourceTerminationPortType.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ImmediateResourceTerminationPortType.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,42 @@
+/*=============================================================================*
+ *  Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource.lifetime.v2004_11.porttype;
+
+import org.apache.ws.resource.lifetime.v2004_11.ResourceLifetimeConstants;
+import org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.DestroyDocument;
+import org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.DestroyResponseDocument;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The WSRF-RL ImmediateResourceTermination portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface ImmediateResourceTerminationPortType
+{
+
+   QName NAME = new QName( ResourceLifetimeConstants.NSURI_WSRL_WSDL, "ImmediateResourceTermination", ResourceLifetimeConstants.NSPREFIX_WSRL_WSDL );
+
+    /**
+    * 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/v2004_11/porttype/ScheduledResourceTerminationPortType.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ScheduledResourceTerminationPortType.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ScheduledResourceTerminationPortType.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ScheduledResourceTerminationPortType.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,54 @@
+/*=============================================================================*
+ *  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.v2004_11.porttype;
+
+
+import org.apache.ws.resource.lifetime.v2004_11.ResourceLifetimeConstants;
+import org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.SetTerminationTimeDocument;
+import org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.SetTerminationTimeResponseDocument;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The WSRF-RL ScheduledResourceTermination portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface ScheduledResourceTerminationPortType
+{
+
+    QName NAME = new QName( ResourceLifetimeConstants.NSURI_WSRL_WSDL, "ScheduledResourceTermination", ResourceLifetimeConstants.NSPREFIX_WSRL_WSDL );
+
+    /**
+     * CurrentTime property name.
+     */
+    QName PROP_QNAME_CURRENT_TIME = new QName( ResourceLifetimeConstants.NSURI_WSRL_SCHEMA, "CurrentTime", ResourceLifetimeConstants.NSPREFIX_WSRL_SCHEMA );
+
+    /**
+     * TerminationTime property name.
+     */
+    QName PROP_QNAME_TERMINATION_TIME = new QName( ResourceLifetimeConstants.NSURI_WSRL_SCHEMA, "TerminationTime", ResourceLifetimeConstants.NSPREFIX_WSRL_SCHEMA );
+
+    /**
+     * 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/v2004_11/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,96 @@
+/*=============================================================================*
+ *  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.v2004_11.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.Keys;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.resource.lifetime.faults.ResourceNotDestroyedFaultException;
+import org.apache.ws.resource.lifetime.v2004_11.porttype.ImmediateResourceTerminationPortType;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.v2004_11.impl.NamespaceVersionHolderImpl;
+import org.apache.ws.resource.properties.v2004_11.impl.NamespaceVersionHolderImpl;
+import org.apache.ws.util.i18n.Messages;
+import org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.DestroyDocument;
+import org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.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();
+   private static final NamespaceVersionHolder NAMESPACE_SET = new NamespaceVersionHolderImpl() ;
+
+   /**
+    * Creates a new {@link ImmediateResourceTerminationPortTypeImpl} object.
+    *
+    * @param resourceContext DOCUMENT_ME
+    */
+   public ImmediateResourceTerminationPortTypeImpl( ResourceContext resourceContext )
+   {
+      super( resourceContext );
+   }
+
+    protected NamespaceVersionHolder getNamespaceSet()
+    {
+        return NAMESPACE_SET;
+    }
+
+    /**
+    * 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(NAMESPACE_SET, 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/v2004_11/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,141 @@
+/*=============================================================================*
+ *  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.v2004_11.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.i18n.MessagesImpl;
+import org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource;
+import org.apache.ws.resource.lifetime.faults.UnableToSetTerminationTimeFaultException;
+import org.apache.ws.resource.lifetime.v2004_11.porttype.ScheduledResourceTerminationPortType;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.impl.AbstractResourcePropertiesPortType;
+import org.apache.ws.resource.properties.v2004_11.impl.NamespaceVersionHolderImpl;
+import org.apache.ws.resource.properties.v2004_11.impl.NamespaceVersionHolderImpl;
+import org.apache.ws.util.i18n.Messages;
+import org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.SetTerminationTimeDocument;
+import org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.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(  ) );
+
+   private static final Messages MSG = MessagesImpl.getInstance();
+   private static final NamespaceVersionHolder NAMESPACE_SET = new NamespaceVersionHolderImpl() ;
+
+   /**
+    * Creates a new {@link ScheduledResourceTerminationPortTypeImpl} object.
+    *
+    * @param resourceContext DOCUMENT_ME
+    */
+   public ScheduledResourceTerminationPortTypeImpl( ResourceContext resourceContext )
+   {
+      super( resourceContext );
+   }
+
+    protected NamespaceVersionHolder getNamespaceSet()
+    {
+        return NAMESPACE_SET;
+    }
+
+    /**
+    * 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(NAMESPACE_SET, 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

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/ResourcePropertiesConstants.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/ResourcePropertiesConstants.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/ResourcePropertiesConstants.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/ResourcePropertiesConstants.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,54 @@
+/*=============================================================================*
+ *  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.v2004_06;
+
+import org.apache.ws.resource.v2004_06.WsrfConstants;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Constants for namespaces defined by the 2004/06 version of the WSRF ResourceProperties specification.
+ */
+public interface ResourcePropertiesConstants
+{
+
+    /**
+     * Namespace URI for WS-ResourceProperties schema.
+     */
+    String NSURI_WSRP_SCHEMA = WsrfConstants.BASE_URI_WSRF + "wsrf-WS-ResourceProperties-1.2-draft-01.xsd";
+
+    /**
+     * Namespace prefix for WS-ResourceProperties schema.
+     */
+    String NSPREFIX_WSRP_SCHEMA = "wsrp";
+
+    /**
+     * Namespace URI for WS-ResourceProperties WSDL.
+     */
+    String NSURI_WSRP_WSDL = WsrfConstants.BASE_URI_WSRF + "wsrf-WS-ResourceProperties-1.2-draft-01.wsdl";
+
+    /**
+     * Namespace prefix for WS-ResourceProperties WSDL.
+     */
+    String NSPREFIX_WSRP_WSDL = "wsrpw";
+
+    /**
+     * 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/v2004_06/impl/NamespaceVersionHolderImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/NamespaceVersionHolderImpl.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/NamespaceVersionHolderImpl.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/NamespaceVersionHolderImpl.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,41 @@
+package org.apache.ws.resource.properties.v2004_06.impl;
+
+import org.apache.axis.message.addressing.Constants;
+import org.apache.ws.resource.faults.v2004_06.FaultsConstants;
+import org.apache.ws.resource.lifetime.v2004_06.ResourceLifetimeConstants;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.v2004_06.ResourcePropertiesConstants;
+import org.apache.ws.resource.servicegroup.v2004_06.ServiceGroupConstants;
+
+
+/**
+ * @author Sal Campana
+ */
+public class NamespaceVersionHolderImpl implements NamespaceVersionHolder
+{
+
+    public String getPropertiesXsdNamespace()
+    {
+        return ResourcePropertiesConstants.NSURI_WSRP_SCHEMA;
+    }
+
+    public String getLifetimeXsdNamespace()
+    {
+        return ResourceLifetimeConstants.NSURI_WSRL_SCHEMA;
+    }
+
+    public String getBaseFaultsXsdNamespace()
+    {
+        return FaultsConstants.NSURI_BASEFAULTS_SCHEMA;
+    }
+
+    public String getAddressingNamespace()
+    {
+        return Constants.NS_URI_ADDRESSING_2003_03;
+    }
+
+    public String getServiceGroupsXsdNamespace()
+    {
+        return ServiceGroupConstants.NSURI_WSSG_SCHEMA;
+    }
+}

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/XmlBeansResourcePropertyValueChangeEvent.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/XmlBeansResourcePropertyValueChangeEvent.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/XmlBeansResourcePropertyValueChangeEvent.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/impl/XmlBeansResourcePropertyValueChangeEvent.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,67 @@
+/*
+ * 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.v2004_06.impl;
+
+import org.apache.ws.XmlObjectWrapper;
+import org.apache.ws.resource.properties.ResourcePropertyValueChangeEvent;
+import org.apache.ws.resource.properties.impl.AbstractXmlBeansResourcePropertyValueChangeEvent;
+import org.apache.ws.util.XmlBeanUtils;
+import org.apache.xmlbeans.XmlObject;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.ResourcePropertyValueChangeNotificationDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.ResourcePropertyValueChangeNotificationType;
+
+/**
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public class XmlBeansResourcePropertyValueChangeEvent extends AbstractXmlBeansResourcePropertyValueChangeEvent implements ResourcePropertyValueChangeEvent, XmlObjectWrapper
+{
+    public XmlBeansResourcePropertyValueChangeEvent(Object[] oldValue, Object[] newValue)
+    {
+        super(oldValue, newValue);
+    }
+
+    protected XmlObject buildPropValueChangeNotifDocXmlBean( Object[] oldValue, Object[] newValue )
+    {
+        ResourcePropertyValueChangeNotificationDocument propValueChangeNotifDocXBean = ResourcePropertyValueChangeNotificationDocument.Factory.newInstance();
+        ResourcePropertyValueChangeNotificationType propValueChangeNotifXBean = propValueChangeNotifDocXBean.addNewResourcePropertyValueChangeNotification();
+        ResourcePropertyValueChangeNotificationType.OldValue oldValueXBean = propValueChangeNotifXBean.addNewOldValue();
+        if ( oldValue != null )
+        {
+            for ( int i = 0; i < oldValue.length; i++ )
+            {
+                XmlBeanUtils.addChildElement( oldValueXBean, (XmlObject) oldValue[i] );
+            }
+        }
+        else
+        {
+            oldValueXBean.setNil();
+        }
+        ResourcePropertyValueChangeNotificationType.NewValue newValueXBean = propValueChangeNotifXBean.addNewNewValue();
+        if ( newValue != null )
+        {
+            for ( int i = 0; i < oldValue.length; i++ )
+            {
+                XmlBeanUtils.addChildElement( newValueXBean, (XmlObject) newValue[i] );
+            }
+        }
+        else
+        {
+            newValueXBean.setNil();
+        }
+        return propValueChangeNotifDocXBean;
+    }
+
+}

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/GetMultipleResourcePropertiesPortType.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/GetMultipleResourcePropertiesPortType.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/GetMultipleResourcePropertiesPortType.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/GetMultipleResourcePropertiesPortType.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,41 @@
+/*=============================================================================*
+ *  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.v2004_06.porttype;
+
+import org.apache.ws.resource.properties.v2004_06.ResourcePropertiesConstants;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesResponseDocument;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The WSRF-RP GetMultipleResourceProperties portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface GetMultipleResourcePropertiesPortType
+{
+    QName NAME = new QName( ResourcePropertiesConstants.NSURI_WSRP_WSDL, "GetMultipleResourceProperties", ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA );
+
+    /**
+    * 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/v2004_06/porttype/GetResourcePropertyPortType.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/GetResourcePropertyPortType.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/GetResourcePropertyPortType.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/GetResourcePropertyPortType.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,41 @@
+/*=============================================================================*
+ *  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.v2004_06.porttype;
+
+import org.apache.ws.resource.properties.v2004_06.ResourcePropertiesConstants;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The WSRF-RP GetResourceProperty portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface GetResourcePropertyPortType
+{
+    QName NAME = new QName( ResourcePropertiesConstants.NSURI_WSRP_WSDL, "GetResourceProperty", ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA );
+
+    /**
+    * 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/v2004_06/porttype/QueryResourcePropertiesPortType.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/QueryResourcePropertiesPortType.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/QueryResourcePropertiesPortType.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/QueryResourcePropertiesPortType.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,41 @@
+/*=============================================================================*
+ *  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.v2004_06.porttype;
+
+import org.apache.ws.resource.properties.v2004_06.ResourcePropertiesConstants;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesResponseDocument;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The WSRF-RP QueryResourceProperties portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface QueryResourcePropertiesPortType
+{
+    QName NAME = new QName( ResourcePropertiesConstants.NSURI_WSRP_WSDL, "QueryResourceProperties", ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA );
+
+    /**
+    * 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/v2004_06/porttype/SetResourcePropertiesPortType.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/SetResourcePropertiesPortType.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/SetResourcePropertiesPortType.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/SetResourcePropertiesPortType.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,41 @@
+/*=============================================================================*
+ *  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.v2004_06.porttype;
+
+import org.apache.ws.resource.properties.v2004_06.ResourcePropertiesConstants;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesResponseDocument;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The WSRF-RP SetResourceProperties portType.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public interface SetResourcePropertiesPortType
+{
+    QName NAME = new QName( ResourcePropertiesConstants.NSURI_WSRP_WSDL, "SetResourceProperties", ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA );
+
+    /**
+    * 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/v2004_06/porttype/impl/GetMultipleResourcePropertiesPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetMultipleResourcePropertiesPortTypeImpl.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetMultipleResourcePropertiesPortTypeImpl.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetMultipleResourcePropertiesPortTypeImpl.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,84 @@
+/*=============================================================================*
+ *  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.v2004_06.porttype.impl;
+
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.faults.InvalidResourcePropertyQNameFaultException;
+import org.apache.ws.resource.properties.impl.AbstractGetResourcePropertiesPortType;
+import org.apache.ws.resource.properties.v2004_06.porttype.GetMultipleResourcePropertiesPortType;
+import org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesResponseDocument;
+
+import javax.xml.namespace.QName;
+
+/**
+ * LOG-DONE An operation provider for wsrp:GetMultipleResourceProperties.
+ *
+ * @author Ian P. Springer
+ */
+public class GetMultipleResourcePropertiesPortTypeImpl
+        extends AbstractGetResourcePropertiesPortType
+        implements GetMultipleResourcePropertiesPortType
+{
+
+    private static final NamespaceVersionHolder NAMESPACE_SET = new NamespaceVersionHolderImpl() ;
+
+    /**
+     * Creates a new {@link GetMultipleResourcePropertiesPortTypeImpl} object.
+     *
+     * @param resourceContext DOCUMENT_ME
+     */
+    public GetMultipleResourcePropertiesPortTypeImpl( 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.ResourceKeyHeaderNotFoundFaultException
+     */
+    public GetMultipleResourcePropertiesResponseDocument getMultipleResourceProperties( GetMultipleResourcePropertiesDocument requestDoc )
+    {
+        GetMultipleResourcePropertiesResponseDocument responseDoc = createResponseDocument();
+        QName[] propNames = requestDoc.getGetMultipleResourceProperties().getResourcePropertyArray();
+        ResourceProperty[] props = getMultipleProperties( propNames );
+        addPropertiesToResponse( props, responseDoc.getGetMultipleResourcePropertiesResponse() );
+        return responseDoc;
+    }
+
+    private GetMultipleResourcePropertiesResponseDocument createResponseDocument()
+    {
+        GetMultipleResourcePropertiesResponseDocument responseDoc = GetMultipleResourcePropertiesResponseDocument.Factory.newInstance();
+        responseDoc.addNewGetMultipleResourcePropertiesResponse();
+        return responseDoc;
+    }
+
+    protected NamespaceVersionHolder getNamespaceSet()
+    {
+        return NAMESPACE_SET;
+    }
+
+}
\ No newline at end of file

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetResourcePropertyPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetResourcePropertyPortTypeImpl.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetResourcePropertyPortTypeImpl.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetResourcePropertyPortTypeImpl.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,95 @@
+/*=============================================================================*
+ *  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.v2004_06.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.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.faults.InvalidResourcePropertyQNameFaultException;
+import org.apache.ws.resource.properties.impl.AbstractGetResourcePropertiesPortType;
+import org.apache.ws.resource.properties.v2004_06.porttype.GetResourcePropertyPortType;
+import org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl;
+import org.apache.ws.util.i18n.Messages;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument;
+
+import javax.xml.namespace.QName;
+
+/**
+ * An operation provider for wsrp:GetResourceProperty.
+ *
+ * @author Ian P. Springer
+ */
+public class GetResourcePropertyPortTypeImpl
+        extends AbstractGetResourcePropertiesPortType
+        implements GetResourcePropertyPortType
+{
+
+    private static final Log LOG = LogFactory.getLog( GetResourcePropertyPortTypeImpl.class );
+    private static final Messages MSG = MessagesImpl.getInstance();
+    private static final NamespaceVersionHolder NAMESPACE_SET = new NamespaceVersionHolderImpl() ;
+
+    /**
+     * Creates a new {@link GetResourcePropertyPortTypeImpl} object.
+     *
+     * @param resourceContext DOCUMENT_ME
+     */
+    public GetResourcePropertyPortTypeImpl( 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.ResourceKeyHeaderNotFoundFaultException
+     */
+    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 = getProperty( propName );
+        addPropertyToResponse( prop, responseDoc.getGetResourcePropertyResponse() );
+        return responseDoc;
+    }
+
+    private GetResourcePropertyResponseDocument createResponseDocument()
+    {
+        GetResourcePropertyResponseDocument responseDoc = GetResourcePropertyResponseDocument.Factory.newInstance();
+        responseDoc.addNewGetResourcePropertyResponse();
+        return responseDoc;
+    }
+
+    protected NamespaceVersionHolder getNamespaceSet()
+    {
+        return NAMESPACE_SET;
+    }
+
+}
\ No newline at end of file

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/QueryResourcePropertiesPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/QueryResourcePropertiesPortTypeImpl.java?view=auto&rev=158163
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/QueryResourcePropertiesPortTypeImpl.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/QueryResourcePropertiesPortTypeImpl.java Fri Mar 18 15:15:56 2005
@@ -0,0 +1,180 @@
+/*=============================================================================*
+ *  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.v2004_06.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.NamespaceVersionHolder;
+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.impl.AbstractResourcePropertiesPortType;
+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.resource.properties.v2004_06.porttype.QueryResourcePropertiesPortType;
+import org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl;
+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.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.
+ *
+ * TODO: factor out a common base class to be shared across spec versions
+ *
+ * @author Ian P. Springer
+ */
+public class QueryResourcePropertiesPortTypeImpl
+        extends AbstractResourcePropertiesPortType
+        implements QueryResourcePropertiesPortType
+{
+
+    private static final Log LOG = LogFactory.getLog( QueryResourcePropertiesPortTypeImpl.class );
+    private static final Messages MSG = MessagesImpl.getInstance();
+    private static final NamespaceVersionHolder NAMESPACE_SET = new NamespaceVersionHolderImpl() ;
+
+    /**
+     * DOCUMENT_ME
+     */
+    private static final QueryEngine QUERY_ENGINE = new QueryEngineImpl();
+
+    /**
+     * Creates a new {@link QueryResourcePropertiesPortTypeImpl} object.
+     *
+     * @param resourceContext DOCUMENT_ME
+     */
+    public QueryResourcePropertiesPortTypeImpl( ResourceContext resourceContext )
+    {
+        super( resourceContext );
+    }
+
+    protected NamespaceVersionHolder getNamespaceSet()
+    {
+        return NAMESPACE_SET;
+    }
+
+    /**
+     * Implementation of the wsrp:QueryResourceProperties operation.
+     *
+     * @param requestDoc the requestDoc XMLBean
+     *
+     * @return the response XMLBean
+     *
+     * @throws org.apache.ws.resource.faults.ResourceKeyHeaderNotFoundFaultException
+     *
+     * @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 = new XmlBeansQueryExpression( queryExprElem );
+
+        refreshAllProperties();
+        Object result = null;
+        try
+        {
+            result = QUERY_ENGINE.executeQuery( queryExpr,
+                    getProperties(),
+                    envelope );
+        }
+        catch ( UnknownQueryExpressionDialectException uqede )
+        {
+            throw new UnknownQueryExpressionDialectFaultException(NAMESPACE_SET, uqede.getDialect() );
+        }
+        catch ( QueryEvaluationErrorException qeee )
+        {
+            throw new QueryEvaluationErrorFaultException(NAMESPACE_SET, qeee.getMessage() );
+        }
+        catch ( InvalidQueryExpressionException iqee )
+        {
+            throw new InvalidQueryExpressionFaultException(NAMESPACE_SET, 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



---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org