You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-commits@ws.apache.org by sc...@apache.org on 2005/08/02 18:30:44 UTC

svn commit: r227033 [7/27] - in /webservices/wsrf/trunk: ./ src/java/org/apache/ws/ src/java/org/apache/ws/addressing/ src/java/org/apache/ws/addressing/v2003_03/ src/java/org/apache/ws/addressing/v2004_08_10/ src/java/org/apache/ws/resource/ src/java/...

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/impl/ResourceTerminationEventImpl.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/impl/ResourceTerminationEventImpl.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/impl/ResourceTerminationEventImpl.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/impl/ResourceTerminationEventImpl.java Tue Aug  2 09:28:49 2005
@@ -1,92 +1,120 @@
-package org.apache.ws.resource.lifetime.impl;
-
-import org.apache.ws.resource.lifetime.ResourceTerminationEvent;
-import org.apache.ws.resource.properties.NamespaceVersionHolder;
-import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlString;
-
-import java.util.Calendar;
-
-
-/**
- * @author Sal Campana
- */
-public class ResourceTerminationEventImpl extends AbstractResourceTerminationEvent
-        implements ResourceTerminationEvent
-{
-    /**
-     * Sets termination time and reason to passed in params.
-     *
-     * @param resourceId      The resource Id of the resource being destroyed.
-     * @param terminationTime
-     * @param reason
-     */
-    public ResourceTerminationEventImpl(Object resourceId, Calendar terminationTime, Object reason)
-    {
-        super(resourceId, terminationTime, reason);
-    }
-
-    /**
-     * Constructor creates termination time upon construction.  Reason is null.
-     *
-     * @param resourceId The resource Id of the resource being destroyed.
-     */
-    public ResourceTerminationEventImpl(Object resourceId)
-    {
-        super(resourceId);
-    }
-
-    /**
-     * Set the reson to the object specified and termination time is set upon construction.
-     *
-     * @param resourceId The resource Id of the resource being destroyed.
-     * @param reason
-     */
-    public ResourceTerminationEventImpl(Object resourceId, Object reason)
-    {
-        super(resourceId, reason);
-    }
-
-
-    public XmlObject getTerminationNotifDocXmlBean(NamespaceVersionHolder namespaces)
-    {
-        Object reason = getReason();
-        if (!(reason instanceof XmlObject))
-        {
-            reason = XmlString.Factory.newInstance();
-            ((XmlString) reason).setStringValue(reason.toString());
-        }
-
-        if (namespaces instanceof org.apache.ws.resource.properties.v2004_11.impl.NamespaceVersionHolderImpl)
-        {
-            org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.TerminationNotificationDocument notifDoc = org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.TerminationNotificationDocument.Factory.newInstance();
-            org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.TerminationNotificationDocument.TerminationNotification terminationNotification = notifDoc.addNewTerminationNotification();
-            terminationNotification.setTerminationTime(getTerminationTime());
-
-            if (reason != null)
-            {
-                terminationNotification.setTerminationReason((XmlObject) reason);
-            }
-
-            return notifDoc;
-        }
-        else if (namespaces instanceof org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl)
-        {
-            org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.TerminationNotificationDocument notifDoc = org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.TerminationNotificationDocument.Factory.newInstance();
-            org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.TerminationNotificationDocument.TerminationNotification terminationNotification = notifDoc.addNewTerminationNotification();
-            terminationNotification.setTerminationTime(getTerminationTime());
-
-
-            if (reason != null)
-            {
-                terminationNotification.setTerminationReason((XmlObject) reason);
-            }
-
-            return notifDoc;
-        }
-        else throw new org.apache.ws.resource.impl.UnsupportedVersionException(namespaces);
-
-
-    }
-
-}
+/*=============================================================================*
+ *  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.impl;
+
+import org.apache.ws.resource.lifetime.ResourceTerminationEvent;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlString;
+import java.util.Calendar;
+
+/**
+ * @author Sal Campana
+ */
+public class ResourceTerminationEventImpl
+   extends AbstractResourceTerminationEvent
+   implements ResourceTerminationEvent
+{
+   /**
+    * Sets termination time and reason to passed in params.
+    *
+    * @param resourceId      The resource Id of the resource being destroyed.
+    * @param terminationTime
+    * @param reason
+    */
+   public ResourceTerminationEventImpl( Object   resourceId,
+                                        Calendar terminationTime,
+                                        Object   reason )
+   {
+      super( resourceId, terminationTime, reason );
+   }
+
+   /**
+    * Constructor creates termination time upon construction.  Reason is null.
+    *
+    * @param resourceId The resource Id of the resource being destroyed.
+    */
+   public ResourceTerminationEventImpl( Object resourceId )
+   {
+      super( resourceId );
+   }
+
+   /**
+    * Set the reson to the object specified and termination time is set upon construction.
+    *
+    * @param resourceId The resource Id of the resource being destroyed.
+    * @param reason
+    */
+   public ResourceTerminationEventImpl( Object resourceId,
+                                        Object reason )
+   {
+      super( resourceId, reason );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param namespaces DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public XmlObject getTerminationNotifDocXmlBean( NamespaceVersionHolder namespaces )
+   {
+      Object reason = getReason(  );
+      if ( !( reason instanceof XmlObject ) )
+      {
+         reason = XmlString.Factory.newInstance(  );
+         ( (XmlString) reason ).setStringValue( reason.toString(  ) );
+      }
+
+      if ( namespaces instanceof org.apache.ws.resource.properties.v2004_11.impl.NamespaceVersionHolderImpl )
+      {
+         org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.TerminationNotificationDocument                         notifDoc                =
+            org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.TerminationNotificationDocument.Factory
+            .newInstance(  );
+         org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.TerminationNotificationDocument.TerminationNotification terminationNotification =
+            notifDoc.addNewTerminationNotification(  );
+         terminationNotification.setTerminationTime( getTerminationTime(  ) );
+
+         if ( reason != null )
+         {
+            terminationNotification.setTerminationReason( (XmlObject) reason );
+         }
+
+         return notifDoc;
+      }
+      else if ( namespaces instanceof org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl )
+      {
+         org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.TerminationNotificationDocument                         notifDoc                =
+            org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.TerminationNotificationDocument.Factory
+            .newInstance(  );
+         org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.TerminationNotificationDocument.TerminationNotification terminationNotification =
+            notifDoc.addNewTerminationNotification(  );
+         terminationNotification.setTerminationTime( getTerminationTime(  ) );
+
+         if ( reason != null )
+         {
+            terminationNotification.setTerminationReason( (XmlObject) reason );
+         }
+
+         return notifDoc;
+      }
+      else
+      {
+         throw new org.apache.ws.resource.impl.UnsupportedVersionException( namespaces );
+      }
+   }
+}
\ No newline at end of file

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/ResourceLifetimeConstants.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/ResourceLifetimeConstants.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/ResourceLifetimeConstants.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/ResourceLifetimeConstants.java Tue Aug  2 09:28:49 2005
@@ -1,46 +1,44 @@
-/*=============================================================================*
- *  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";
-
+/*=============================================================================*
+ *  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";
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ImmediateResourceTerminationPortType.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ImmediateResourceTerminationPortType.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ImmediateResourceTerminationPortType.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ImmediateResourceTerminationPortType.java Tue Aug  2 09:28:49 2005
@@ -1,42 +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.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 );
+/*=============================================================================*
+ *  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
+{
+   /** DOCUMENT_ME */
+   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 );
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ScheduledResourceTerminationPortType.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ScheduledResourceTerminationPortType.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ScheduledResourceTerminationPortType.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ScheduledResourceTerminationPortType.java Tue Aug  2 09:28:49 2005
@@ -1,53 +1,57 @@
-/*=============================================================================*
- *  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 );
-
+/*=============================================================================*
+ *  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
+{
+   /** DOCUMENT_ME */
+   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 );
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java Tue Aug  2 09:28:49 2005
@@ -1,95 +1,104 @@
-/*=============================================================================*
- *  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( getResource().getID() ) ) );
-        try
-        {
-            getResourceContext().getResourceHome().remove( getResource().getID() );
-        }
-        catch ( ResourceException re )
-        {
-            throw new ResourceNotDestroyedFaultException( NAMESPACE_SET, String.valueOf(
-                    String.valueOf( getResource().getID() ) ),
-                    getResourceContext().getServiceName() );
-        }
-
-        return createResponseDocument();
-    }
-
-    protected NamespaceVersionHolder getNamespaceSet()
-    {
-        return NAMESPACE_SET;
-    }
-
-    private DestroyResponseDocument createResponseDocument()
-    {
-        DestroyResponseDocument responseDoc = DestroyResponseDocument.Factory.newInstance();
-        responseDoc.addNewDestroyResponse();
-        return responseDoc;
-    }
+/*=============================================================================*
+ *  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(  ) );
+
+   /** DOCUMENT_ME */
+   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( getResource(  ).getID(  ) ) ) );
+      try
+      {
+         getResourceContext(  ).getResourceHome(  ).remove( getResource(  ).getID(  ) );
+      }
+      catch ( ResourceException re )
+      {
+         throw new ResourceNotDestroyedFaultException( NAMESPACE_SET,
+                                                       String.valueOf( String.valueOf( getResource(  ).getID(  ) ) ),
+                                                       getResourceContext(  ).getServiceName(  ) );
+      }
+
+      return createResponseDocument(  );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   protected NamespaceVersionHolder getNamespaceSet(  )
+   {
+      return NAMESPACE_SET;
+   }
+
+   private DestroyResponseDocument createResponseDocument(  )
+   {
+      DestroyResponseDocument responseDoc = DestroyResponseDocument.Factory.newInstance(  );
+      responseDoc.addNewDestroyResponse(  );
+      return responseDoc;
+   }
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java Tue Aug  2 09:28:49 2005
@@ -1,140 +1,146 @@
-/*=============================================================================*
- *  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() ) )
-        {
-            try
-            {
-                destroyResource();
-            }
-            catch ( ResourceException re )
-            {
-                throw new UnableToSetTerminationTimeFaultException( NAMESPACE_SET, null );
-            }
-            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() throws ResourceException
-    {
-        LOG.debug( MSG.getMessage( Keys.DESTROYING_RESOURCE, getResourceContext().getServiceName(),
-                String.valueOf( getResource().getID() ) ) );
-        getResourceContext().getResourceHome().remove( getResource().getID() );
-    }
-
-    private void populateResponseDocument( SetTerminationTimeResponseDocument responseDoc,
-                                           Calendar currentTime,
-                                           Calendar newTermTime )
-    {
-        SetTerminationTimeResponseDocument.SetTerminationTimeResponse response =
-                responseDoc.getSetTerminationTimeResponse();
-        response.setCurrentTime( currentTime );
-        response.setNewTerminationTime( newTermTime );
-    }
+/*=============================================================================*
+ *  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(  ) ) )
+      {
+         try
+         {
+            destroyResource(  );
+         }
+         catch ( ResourceException re )
+         {
+            throw new UnableToSetTerminationTimeFaultException( NAMESPACE_SET, null );
+         }
+
+         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(  );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   protected NamespaceVersionHolder getNamespaceSet(  )
+   {
+      return NAMESPACE_SET;
+   }
+
+   private SetTerminationTimeResponseDocument createResponseDocument(  )
+   {
+      SetTerminationTimeResponseDocument responseDoc = SetTerminationTimeResponseDocument.Factory.newInstance(  );
+      responseDoc.addNewSetTerminationTimeResponse(  );
+      return responseDoc;
+   }
+
+   private void destroyResource(  )
+   throws ResourceException
+   {
+      LOG.debug( MSG.getMessage( Keys.DESTROYING_RESOURCE,
+                                 getResourceContext(  ).getServiceName(  ),
+                                 String.valueOf( getResource(  ).getID(  ) ) ) );
+      getResourceContext(  ).getResourceHome(  ).remove( getResource(  ).getID(  ) );
+   }
+
+   private void populateResponseDocument( SetTerminationTimeResponseDocument responseDoc,
+                                          Calendar                           currentTime,
+                                          Calendar                           newTermTime )
+   {
+      SetTerminationTimeResponseDocument.SetTerminationTimeResponse response =
+         responseDoc.getSetTerminationTimeResponse(  );
+      response.setCurrentTime( currentTime );
+      response.setNewTerminationTime( newTermTime );
+   }
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/ResourceLifetimeConstants.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/ResourceLifetimeConstants.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/ResourceLifetimeConstants.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/ResourceLifetimeConstants.java Tue Aug  2 09:28:49 2005
@@ -1,46 +1,44 @@
-/*=============================================================================*
- *  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";
-
+/*=============================================================================*
+ *  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";
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ImmediateResourceTerminationPortType.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ImmediateResourceTerminationPortType.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ImmediateResourceTerminationPortType.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ImmediateResourceTerminationPortType.java Tue Aug  2 09:28:49 2005
@@ -1,42 +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.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 );
+/*=============================================================================*
+ *  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
+{
+   /** DOCUMENT_ME */
+   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 );
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ScheduledResourceTerminationPortType.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ScheduledResourceTerminationPortType.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ScheduledResourceTerminationPortType.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ScheduledResourceTerminationPortType.java Tue Aug  2 09:28:49 2005
@@ -1,54 +1,57 @@
-/*=============================================================================*
- *  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 );
-
+/*=============================================================================*
+ *  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
+{
+   /** DOCUMENT_ME */
+   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 );
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java Tue Aug  2 09:28:49 2005
@@ -1,96 +1,105 @@
-/*=============================================================================*
- *  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(getResource().getID())) );
-      try
-      {
-         getResourceContext().getResourceHome(  ).remove( getResource().getID() );
-      }
-      catch ( ResourceException re )
-      {
-         throw new ResourceNotDestroyedFaultException(NAMESPACE_SET, String.valueOf( getResource().getID() ),
-                                                       getResourceContext(  ).getServiceName(  ) );
-      }
-
-      return createResponseDocument(  );
-   }
-
-   private DestroyResponseDocument createResponseDocument(  )
-   {
-      DestroyResponseDocument responseDoc = DestroyResponseDocument.Factory.newInstance(  );
-      responseDoc.addNewDestroyResponse(  );
-      return responseDoc;
-   }
+/*=============================================================================*
+ *  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.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(  ) );
+
+   /** DOCUMENT_ME */
+   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( getResource(  ).getID(  ) ) ) );
+      try
+      {
+         getResourceContext(  ).getResourceHome(  ).remove( getResource(  ).getID(  ) );
+      }
+      catch ( ResourceException re )
+      {
+         throw new ResourceNotDestroyedFaultException( NAMESPACE_SET,
+                                                       String.valueOf( getResource(  ).getID(  ) ),
+                                                       getResourceContext(  ).getServiceName(  ) );
+      }
+
+      return createResponseDocument(  );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   protected NamespaceVersionHolder getNamespaceSet(  )
+   {
+      return NAMESPACE_SET;
+   }
+
+   private DestroyResponseDocument createResponseDocument(  )
+   {
+      DestroyResponseDocument responseDoc = DestroyResponseDocument.Factory.newInstance(  );
+      responseDoc.addNewDestroyResponse(  );
+      return responseDoc;
+   }
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java Tue Aug  2 09:28:49 2005
@@ -1,139 +1,146 @@
-/*=============================================================================*
- *  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.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() ) )
-        {
-            try
-            {
-                destroyResource();
-            }
-            catch ( ResourceException re )
-            {
-                throw new UnableToSetTerminationTimeFaultException( NAMESPACE_SET, null );
-            }
-            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() throws ResourceException
-    {
-        LOG.debug( MSG.getMessage( Keys.DESTROYING_RESOURCE, getResourceContext().getServiceName(),
-                String.valueOf( getResource().getID() ) ) );
-        getResourceContext().getResourceHome().remove( getResource().getID() );
-    }
-
-    private void populateResponseDocument( SetTerminationTimeResponseDocument responseDoc,
-                                           Calendar currentTime,
-                                           Calendar newTermTime )
-    {
-        SetTerminationTimeResponseDocument.SetTerminationTimeResponse response =
-                responseDoc.getSetTerminationTimeResponse();
-        response.setCurrentTime( currentTime );
-        response.setNewTerminationTime( newTermTime );
-    }
+/*=============================================================================*
+ *  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.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 );
+   }
+
+   /**
+    * 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(  ) ) )
+      {
+         try
+         {
+            destroyResource(  );
+         }
+         catch ( ResourceException re )
+         {
+            throw new UnableToSetTerminationTimeFaultException( NAMESPACE_SET, null );
+         }
+
+         newTermTime = currentTime;
+      }
+      else
+      {
+         newTermTime = requestedTermTime;
+      }
+
+      getResourceState(  ).setTerminationTime( newTermTime );
+      populateResponseDocument( responseDoc, currentTime, newTermTime );
+      return responseDoc;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   protected NamespaceVersionHolder getNamespaceSet(  )
+   {
+      return NAMESPACE_SET;
+   }
+
+   /**
+    * 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(  )
+   throws ResourceException
+   {
+      LOG.debug( MSG.getMessage( Keys.DESTROYING_RESOURCE,
+                                 getResourceContext(  ).getServiceName(  ),
+                                 String.valueOf( getResource(  ).getID(  ) ) ) );
+      getResourceContext(  ).getResourceHome(  ).remove( getResource(  ).getID(  ) );
+   }
+
+   private void populateResponseDocument( SetTerminationTimeResponseDocument responseDoc,
+                                          Calendar                           currentTime,
+                                          Calendar                           newTermTime )
+   {
+      SetTerminationTimeResponseDocument.SetTerminationTimeResponse response =
+         responseDoc.getSetTerminationTimeResponse(  );
+      response.setCurrentTime( currentTime );
+      response.setNewTerminationTime( newTermTime );
+   }
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/MetadataExchangeConstants.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/MetadataExchangeConstants.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/MetadataExchangeConstants.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/MetadataExchangeConstants.java Tue Aug  2 09:28:49 2005
@@ -1,54 +1,53 @@
-/*=============================================================================*
- *  Copyright 2005 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *=============================================================================*/
-package org.apache.ws.resource.metadataexchange.v2004_09;
-
-/**
- * Constants for WS-MEX.
- */
-public interface MetadataExchangeConstants
-{
-
-    /**
-     * The namespace URI for WS-MEX.
-     */
-    String NSURI = "http://schemas.xmlsoap.org/ws/2004/09/mex";
-
-    /**
-     * A prefix for the WS-MEX namespace.
-     */
-    String NSPREFIX = "wsmex";
-
-    /**
-     * wsa:Action URI for Get requests.
-     */
-    String ACTION_GET_REQUEST = NSURI + "/Get/Request";
-
-    /**
-     * wsa:Action URI for Get responses.
-     */
-    String ACTION_GET_RESPONSE = NSURI + "/Get/Response";
-
-    /**
-     * wsa:Action URI for GetMetadata requests.
-     */
-    String ACTION_GETMETADATA_REQUEST = NSURI + "/GetMetadata/Request";
-
-    /**
-     * wsa:Action URI for GetMetadata requests.
-     */
-    String ACTION_GETMETADATA_RESPONSE = NSURI + "/GetMetadata/Response";
-
-}
+/*=============================================================================*
+ *  Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource.metadataexchange.v2004_09;
+
+
+/**
+ * Constants for WS-MEX.
+ */
+public interface MetadataExchangeConstants
+{
+   /**
+    * The namespace URI for WS-MEX.
+    */
+   String NSURI = "http://schemas.xmlsoap.org/ws/2004/09/mex";
+
+   /**
+    * A prefix for the WS-MEX namespace.
+    */
+   String NSPREFIX = "wsmex";
+
+   /**
+    * wsa:Action URI for Get requests.
+    */
+   String ACTION_GET_REQUEST = NSURI + "/Get/Request";
+
+   /**
+    * wsa:Action URI for Get responses.
+    */
+   String ACTION_GET_RESPONSE = NSURI + "/Get/Response";
+
+   /**
+    * wsa:Action URI for GetMetadata requests.
+    */
+   String ACTION_GETMETADATA_REQUEST = NSURI + "/GetMetadata/Request";
+
+   /**
+    * wsa:Action URI for GetMetadata requests.
+    */
+   String ACTION_GETMETADATA_RESPONSE = NSURI + "/GetMetadata/Response";
+}
\ No newline at end of file

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/MetadataExchangePortType.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/MetadataExchangePortType.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/MetadataExchangePortType.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/MetadataExchangePortType.java Tue Aug  2 09:28:49 2005
@@ -1,35 +1,48 @@
-/*=============================================================================*
- *  Copyright 2005 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *=============================================================================*/
-package org.apache.ws.resource.metadataexchange.v2004_09.porttype;
-
-import org.apache.ws.resource.metadataexchange.v2004_09.MetadataExchangeConstants;
-import org.xmlsoap.schemas.ws.x2004.x09.mex.GetMetadataDocument;
-import org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataDocument;
-import org.xmlsoap.schemas.ws.x2004.x09.mex.AnyXmlType;
-
-import javax.xml.namespace.QName;
-
-/**
- * The WS-MEX MetadataExchange portType.
- */
-public interface MetadataExchangePortType
-{
-    QName NAME = new QName( MetadataExchangeConstants.NSURI, "MetadataExchange", MetadataExchangeConstants.NSPREFIX );
-
-    MetadataDocument getMetadata( GetMetadataDocument request);
-
-    AnyXmlType get();
-}
+/*=============================================================================*
+ *  Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource.metadataexchange.v2004_09.porttype;
+
+import org.apache.ws.resource.metadataexchange.v2004_09.MetadataExchangeConstants;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.AnyXmlType;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.GetMetadataDocument;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataDocument;
+import javax.xml.namespace.QName;
+
+/**
+ * The WS-MEX MetadataExchange portType.
+ */
+public interface MetadataExchangePortType
+{
+   /** DOCUMENT_ME */
+   QName NAME =
+      new QName( MetadataExchangeConstants.NSURI, "MetadataExchange", MetadataExchangeConstants.NSPREFIX );
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param request DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   MetadataDocument getMetadata( GetMetadataDocument request );
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   AnyXmlType get(  );
+}
\ No newline at end of file