You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by ip...@apache.org on 2005/06/21 01:28:44 UTC

svn commit: r191585 [23/30] - in /incubator/muse/site: ./ dev_guide/ example/ example/epr/ example/images/ example/lib/ example/logic/ example/logic/src/ example/logic/src/java/ example/logic/src/java/org/ example/logic/src/java/org/apache/ example/log...

Added: incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/AbstractBusinessprocesstypeService.java
URL: http://svn.apache.org/viewcvs/incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/AbstractBusinessprocesstypeService.java?rev=191585&view=auto
==============================================================================
--- incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/AbstractBusinessprocesstypeService.java (added)
+++ incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/AbstractBusinessprocesstypeService.java Mon Jun 20 16:28:31 2005
@@ -0,0 +1,194 @@
+/*=============================================================================*
+ *  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.muse.example.businessprocesstype;
+
+import org.apache.ws.resource.AbstractPortType;
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.handler.ServiceSoapMethodNameMap;
+import org.apache.ws.resource.handler.SoapMethodNameMap;
+import javax.xml.namespace.QName;
+
+/**
+ * This class should be generated on every "generation" against the WSDL.
+ * This will ensure it is always up-to-date with the WSDL.
+ *
+ * NOTE: This class is generated and is NOT meant to be modified.
+ */
+public abstract class AbstractBusinessprocesstypeService
+   extends AbstractPortType
+   implements org.apache.ws.resource.handler.WsrfService,
+              org.apache.ws.resource.properties.v2004_06.porttype.GetMultipleResourcePropertiesPortType,
+              org.apache.ws.resource.properties.v2004_06.porttype.GetResourcePropertyPortType,
+              org.apache.ws.notification.base.v2004_06.porttype.NotificationProducerPortType
+{
+   /** DOCUMENT_ME */
+   public static final String TARGET_NSURI    = "http://ws.apache.org/muse/example/businessprocesstype";
+
+   /** DOCUMENT_ME */
+   public static final String TARGET_NSPREFIX = "businessprocesstype";
+
+   /**
+    * DOCUMENT_ME
+    */
+   private ServiceSoapMethodNameMap m_methodNameMap;
+
+   /**
+    * DOCUMENT_ME
+    */
+   private boolean m_isInitialized;
+
+   /**
+    * Creates a new {@link AbstractBusinessprocesstypeService} object.
+    *
+    * @param resourceContext DOCUMENT_ME
+    */
+   public AbstractBusinessprocesstypeService( ResourceContext resourceContext )
+   {
+      super( resourceContext );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.GetCurrentMessageResponseDocument getCurrentMessage( org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.GetCurrentMessageDocument requestDoc )
+   {
+      return new org.apache.ws.notification.base.v2004_06.porttype.impl.NotificationProducerPortTypeImpl( getResourceContext(  ) )
+             .getCurrentMessage( requestDoc );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestQname DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public String getMethodName( QName requestQname )
+   {
+      if ( !m_isInitialized )
+      {
+         init(  );
+      }
+
+      return m_methodNameMap.getMethodName( requestQname );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public final SoapMethodNameMap getMethodNameMap(  )
+   {
+      return m_methodNameMap;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesResponseDocument getMultipleResourceProperties( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesDocument requestDoc )
+   {
+      return new org.apache.ws.resource.properties.v2004_06.porttype.impl.GetMultipleResourcePropertiesPortTypeImpl( getResourceContext(  ) )
+             .getMultipleResourceProperties( requestDoc );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument getResourceProperty( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument requestDoc )
+   {
+      return new org.apache.ws.resource.properties.v2004_06.porttype.impl.GetResourcePropertyPortTypeImpl( getResourceContext(  ) )
+             .getResourceProperty( requestDoc );
+   }
+
+   /**
+    * DOCUMENT_ME
+    */
+   public void init(  )
+   {
+      m_methodNameMap = new ServiceSoapMethodNameMap( getResourceContext(  ) );
+      m_methodNameMap.addMapping( javax.xml.namespace.QName.valueOf( "{http://ws.apache.org/muse/example/businessprocesstype/properties}Terminate" ),
+                                  "Terminate" );
+      m_methodNameMap.addMapping( javax.xml.namespace.QName.valueOf( "{http://ws.apache.org/muse/example/businessprocesstype/properties}Resume" ),
+                                  "Resume" );
+      m_methodNameMap.addMapping( javax.xml.namespace.QName.valueOf( "{http://ws.apache.org/muse/example/businessprocesstype/properties}Suspend" ),
+                                  "Suspend" );
+      m_methodNameMap.addMapping( javax.xml.namespace.QName.valueOf( "{http://schemas.xmlsoap.org/ws/2004/09/mex}GetMetadata" ),
+                                  "GetMetadata" );
+      m_isInitialized = true;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesResponseDocument queryResourceProperties( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesDocument requestDoc )
+   {
+      return new org.apache.ws.resource.properties.v2004_06.porttype.impl.QueryResourcePropertiesPortTypeImpl( getResourceContext(  ) )
+             .queryResourceProperties( requestDoc );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.SubscribeResponseDocument subscribe( org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.SubscribeDocument requestDoc )
+   {
+      return new org.apache.ws.notification.base.v2004_06.porttype.impl.NotificationProducerPortTypeImpl( getResourceContext(  ) )
+             .subscribe( requestDoc );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   protected final boolean isInitialized(  )
+   {
+      return m_isInitialized;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.QueryRelationshipsByTypeResponseDocument queryRelationshipsByType( org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.QueryRelationshipsByTypeDocument requestDoc )
+   {
+      return new org.apache.ws.muws.v1_0.capability.impl.RelationshipsCapabilityImpl( getResourceContext(  ) )
+             .queryRelationshipsByType( requestDoc );
+   }
+}
\ No newline at end of file

Added: incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeCustomOperationsPortType.java
URL: http://svn.apache.org/viewcvs/incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeCustomOperationsPortType.java?rev=191585&view=auto
==============================================================================
--- incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeCustomOperationsPortType.java (added)
+++ incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeCustomOperationsPortType.java Mon Jun 20 16:28:31 2005
@@ -0,0 +1,64 @@
+/*=============================================================================*
+ *  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.muse.example.businessprocesstype;
+
+
+/**
+ * **** WARNING: This file will be overwritten during generation ****
+ *
+ * Custom operations portType.
+ *
+ * NOTE: This class is generated and is NOT meant to be modified.
+ *
+ */
+public interface BusinessprocesstypeCustomOperationsPortType
+{
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataDocument GetMetadata( org.xmlsoap.schemas.ws.x2004.x09.mex.GetMetadataDocument requestDoc );
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.apache.ws.muse.example.businessprocesstype.properties.ResumeResponseDocument Resume( org.apache.ws.muse.example.businessprocesstype.properties.ResumeDocument requestDoc );
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.apache.ws.muse.example.businessprocesstype.properties.SuspendResponseDocument Suspend( org.apache.ws.muse.example.businessprocesstype.properties.SuspendDocument requestDoc );
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.apache.ws.muse.example.businessprocesstype.properties.TerminateResponseDocument Terminate( org.apache.ws.muse.example.businessprocesstype.properties.TerminateDocument requestDoc );
+}
\ No newline at end of file

Added: incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeHome.java
URL: http://svn.apache.org/viewcvs/incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeHome.java?rev=191585&view=auto
==============================================================================
--- incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeHome.java (added)
+++ incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeHome.java Mon Jun 20 16:28:31 2005
@@ -0,0 +1,198 @@
+/*=============================================================================*
+ *  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.muse.example.businessprocesstype;
+
+import org.apache.ws.addressing.EndpointReference;
+import org.apache.ws.muse.example.ExampleConstants;
+import org.apache.ws.muse.example.resourceadmin.properties.CreateParamsType;
+import org.apache.ws.muse.example.utils.ResourceKeyFactory;
+import org.apache.ws.resource.Resource;
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.ResourceContextException;
+import org.apache.ws.resource.ResourceException;
+import org.apache.ws.resource.ResourceKey;
+import org.apache.ws.resource.ResourceUnknownException;
+import org.apache.ws.resource.impl.AbstractResourceHome;
+import org.apache.ws.resource.impl.SimpleTypeResourceKey;
+import javax.xml.namespace.QName;
+import java.io.Serializable;
+
+/**
+ * @author Kinga Dziembowski
+ * 
+ * Home for Businessprocesstype WS-Resources.
+ */
+public class BusinessprocesstypeHome
+   extends AbstractResourceHome
+   implements Serializable
+{
+   /**  The service endpoint name as registered with the SOAP Platform.  This is useful for building EPR's. **/
+   public static final QName SERVICE_NAME =
+      javax.xml.namespace.QName.valueOf( "{http://ws.apache.org/muse/example/businessprocesstype}businessprocesstype" );
+
+   /** DOCUMENT_ME */
+   public static final QName RESOURCE_ID =
+      javax.xml.namespace.QName.valueOf( "{http://ws.apache.org/muse/example/businessprocesstype}ResourceID" );
+
+   /** The management PortType associated with this resource. This is useful for building EPR's.**/
+   public static final QName PORT_TYPE =
+      javax.xml.namespace.QName.valueOf( "{http://ws.apache.org/muse/example/businessprocesstype}BusinessProcessTypePortType" );
+
+   /** The WSDL Port name associated with the resource. This is useful for building EPR's. **/
+   public static final String PORT_NAME = "businessprocesstype";
+
+   /** The name of the resource key for this resource. **/
+   public static final QName RESOURCE_KEY_NAME = RESOURCE_ID;
+
+   /**
+    * A NamespaceVerionHolder which maintains the QNames of Spec Wsdls
+    */
+   public static final org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl SPEC_NAMESPACE_SET =
+      new org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl(  );
+
+   /** A constant for the JNDI Lookup name for this home. **/
+   public static final String HOME_LOCATION =
+      org.apache.ws.resource.JndiConstants.CONTEXT_NAME_SERVICES + "/" + SERVICE_NAME.getLocalPart(  ) + "/"
+      + org.apache.ws.resource.JndiConstants.ATOMIC_NAME_HOME;
+
+   //keeps track of instances ids
+   private long m_instances = 0;
+
+   /**
+    *
+    * @param resourceContext
+    *
+    * @return A Resource
+    *
+    * @throws ResourceException
+    * @throws ResourceContextException
+    * @throws ResourceUnknownException
+    */
+   public Resource getInstance( ResourceContext resourceContext )
+   throws ResourceException, 
+          ResourceContextException, 
+          ResourceUnknownException
+   {
+      ResourceKey key      = resourceContext.getResourceKey(  );
+      Resource    resource = null;
+      try
+      {
+         resource = find( key );
+      }
+      catch ( ResourceException re )
+      {
+         throw new ResourceUnknownException( key.getValue(  ),
+                                             resourceContext.getServiceName(  ) );
+
+         //TODO add any checking for key validity
+
+         /**
+          * You can build an EndpointReference for a Resource you create by uncommenting the following code.
+          * Note: You can set the EndpointReference on your Resource using the setter (not in Resource interface)
+          */
+
+         //EndpointReference epr = getEndpointReference(resourceContext.getBaseURL(  ) + "/" + getServiceName().getLocalPart() , key, SPEC_NAMESPACE_SET.getAddressingNamespace());
+      }
+
+      return resource;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public QName getPortType(  )
+   {
+      return PORT_TYPE;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public QName getResourceKeyNameQName(  )
+   {
+      return RESOURCE_KEY_NAME;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public QName getServiceName(  )
+   {
+      return SERVICE_NAME;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public String getServicePortName(  )
+   {
+      return PORT_NAME;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param resourceContext DOCUMENT_ME
+    * @param params DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    *
+    * @throws ResourceException DOCUMENT_ME
+    * @throws ResourceContextException DOCUMENT_ME
+    * @throws ResourceUnknownException DOCUMENT_ME
+    */
+   public Resource create( ResourceContext  resourceContext,
+                           CreateParamsType params )
+   throws ResourceException, 
+          ResourceContextException, 
+          ResourceUnknownException
+   {
+      Resource              resource  = null;
+      long                  currentId = ++m_instances;
+      SimpleTypeResourceKey aKey      =
+         ResourceKeyFactory.createKey( RESOURCE_ID, SERVICE_NAME + Long.toString( currentId ) );
+      try
+      {
+         //resource = createInstance(aKey);
+         resource = new BusinessprocesstypeResource( aKey, params );
+
+         //The EPRs should be build using "http://schemas.xmlsoap.org/ws/2003/03/addressing" addressing namespace. It introduces spec conflicts
+         //To work around thes problem the "http://schemas.xmlsoap.org/ws/2004/08/addressing" is used as namespace for addressing
+         //EndpointReference epr = getEndpointReference(resourceContext.getBaseURL(  ) + "/" + getServiceName().getLocalPart() , null, SPEC_NAMESPACE_SET.getAddressingNamespace());
+         EndpointReference epr =
+            getEndpointReference( resourceContext.getBaseURL(  ) + "/" + getServiceName(  ).getLocalPart(  ),
+                                  aKey,
+                                  ExampleConstants.getAddressingNamespace(  ) );
+         ( (BusinessprocesstypeResource) resource ).setEndpointReference( epr );
+         resource.init(  );
+         add( aKey, resource );
+      }
+      catch ( Exception e )
+      {
+         throw new ResourceException( e );
+      }
+
+      return resource;
+   }
+}
\ No newline at end of file

Added: incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypePropertyQNames.java
URL: http://svn.apache.org/viewcvs/incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypePropertyQNames.java?rev=191585&view=auto
==============================================================================
--- incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypePropertyQNames.java (added)
+++ incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypePropertyQNames.java Mon Jun 20 16:28:31 2005
@@ -0,0 +1,109 @@
+/*=============================================================================*
+ *  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.muse.example.businessprocesstype;
+
+import javax.xml.namespace.QName;
+
+/**
+ * **** WARNING: This file will be overwritten during generation ****
+ *
+ * QNames of the resource properties defined by Businessprocesstype WSDL.
+ * <p/>
+ * NOTE: This class is generated and is NOT meant to be modified.
+ *
+ */
+public interface BusinessprocesstypePropertyQNames
+{
+   /** DOCUMENT_ME */
+   QName TOPICEXPRESSIONDIALECTS =
+      new QName( "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd",
+                 "TopicExpressionDialects", "wsnt" );
+
+   /** DOCUMENT_ME */
+   QName TOTALNUMBEROFCOMPLETEDPROCESSES =
+      new QName( "http://ws.apache.org/muse/example/businessprocesstype/properties",
+                 "TotalNumberOfCompletedProcesses", "bpt-prop" );
+
+   /** DOCUMENT_ME */
+   QName RESOURCEID =
+      new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd", "ResourceId", "muws-p1-xs" );
+
+   /** DOCUMENT_ME */
+   QName CUMULATIVEEXECUTIONTIME =
+      new QName( "http://ws.apache.org/muse/example/shared", "CumulativeExecutionTime", "example-wsf" );
+
+   /** DOCUMENT_ME */
+   QName RESOURCEHOSTNAME =
+      new QName( "http://ws.apache.org/namespaces/muse/muws-ext-1.xsd", "ResourceHostname", "ws-ext" );
+
+   /** DOCUMENT_ME */
+   QName TOTALNUMBEROFTERMINATEDPROCESSES =
+      new QName( "http://ws.apache.org/muse/example/businessprocesstype/properties",
+                 "TotalNumberOfTerminatedProcesses", "bpt-prop" );
+
+   /** DOCUMENT_ME */
+   QName VERSION =
+      new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "Version", "muws-p2-xs" );
+
+   /** DOCUMENT_ME */
+   QName CAPTION =
+      new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "Caption", "muws-p2-xs" );
+
+   /** DOCUMENT_ME */
+   QName MANAGEABILITYCAPABILITY =
+      new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd", "ManageabilityCapability",
+                 "muws-p1-xs" );
+
+   /** DOCUMENT_ME */
+   QName TOTALNUMBEROFABORTEDPROCESSES =
+      new QName( "http://ws.apache.org/muse/example/businessprocesstype/properties",
+                 "TotalNumberOfAbortedProcesses", "bpt-prop" );
+
+   /** DOCUMENT_ME */
+   QName NUMBEROFRUNNINGPROCESSES =
+      new QName( "http://ws.apache.org/muse/example/businessprocesstype/properties", "NumberOfRunningProcesses",
+                 "bpt-prop" );
+
+   /** DOCUMENT_ME */
+   QName DESCRIPTION =
+      new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "Description", "muws-p2-xs" );
+
+   /** DOCUMENT_ME */
+   QName NUMBEROFSUSPENDEDPROCESSES =
+      new QName( "http://ws.apache.org/muse/example/businessprocesstype/properties", "NumberOfSuspendedProcesses",
+                 "bpt-prop" );
+
+   /** DOCUMENT_ME */
+   QName FIXEDTOPICSET =
+      new QName( "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd",
+                 "FixedTopicSet", "wsnt" );
+
+   /** DOCUMENT_ME */
+   QName CURRENTTIME =
+      new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "CurrentTime", "muws-p2-xs" );
+
+   /** DOCUMENT_ME */
+   QName RESOURCETYPE =
+      new QName( "http://ws.apache.org/namespaces/muse/muws-ext-1.xsd", "ResourceType", "ws-ext" );
+
+   /** DOCUMENT_ME */
+   QName RELATIONSHIP =
+      new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "Relationship", "muws-p2-xs" );
+
+   /** DOCUMENT_ME */
+   QName TOPIC =
+      new QName( "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", "Topic", "wsnt" );
+}
\ No newline at end of file

Added: incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeResource.java
URL: http://svn.apache.org/viewcvs/incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeResource.java?rev=191585&view=auto
==============================================================================
--- incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeResource.java (added)
+++ incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeResource.java Mon Jun 20 16:28:31 2005
@@ -0,0 +1,513 @@
+/*=============================================================================*
+ *  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.muse.example.businessprocesstype;
+
+import org.apache.ws.mows.v1_0.MowsConstants;
+import org.apache.ws.mows.v1_0.capability.MetricsCapability;
+import org.apache.ws.muse.example.ExampleConstants;
+import org.apache.ws.muse.example.ExampleUtils;
+import org.apache.ws.muse.example.application.ApplicationPropertyQNames;
+import org.apache.ws.muse.example.businessprocesstype.BusinessprocesstypePropertyQNames;
+import org.apache.ws.muse.example.businessprocesstype.backend.BusinessProcessInstance;
+import org.apache.ws.muse.example.businessprocesstype.callback.CumulativeExecutionTimeCallback;
+import org.apache.ws.muse.example.businessprocesstype.callback.NumberOfRunningProcessesCallback;
+import org.apache.ws.muse.example.businessprocesstype.callback.NumberOfSuspendedProcessesCallback;
+import org.apache.ws.muse.example.businessprocesstype.callback.TotalNumberOfAbortedProcessesCallback;
+import org.apache.ws.muse.example.businessprocesstype.callback.TotalNumberOfCompletedProcessesCallback;
+import org.apache.ws.muse.example.businessprocesstype.callback.TotalNumberOfTerminatedProcessesCallback;
+import org.apache.ws.muse.example.resourceadmin.properties.CreateParamsType;
+import org.apache.ws.muws.MuwsUtils;
+import org.apache.ws.muws.v1_0.MuwsConstants;
+import org.apache.ws.muws.v1_0.capability.DescriptionCapability;
+import org.apache.ws.muws.v1_0.capability.IdentityCapability;
+import org.apache.ws.muws.v1_0.capability.ManageabilityCharacteristicsCapability;
+import org.apache.ws.muws.v1_0.capability.RelationshipsCapability;
+import org.apache.ws.muws.v1_0.topics.ManagementEventTopic;
+import org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl;
+import org.apache.ws.notification.topics.TopicSpace;
+import org.apache.ws.notification.topics.TopicSpaceSet;
+import org.apache.ws.notification.topics.impl.TopicSpaceImpl;
+import org.apache.ws.resource.ResourceKey;
+import org.apache.ws.util.XmlBeanUtils;
+import org.apache.xmlbeans.XmlObject;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.CurrentTimeDocument;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.LangString;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDocument;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipParticipantType;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipType;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipTypeType;
+import java.util.Calendar;
+
+/**
+ * 
+ * @author Kinga Dziembowski
+ * 
+ * A Businessprocesstype WS-Resource.
+ * <p/>
+ * NOTE: This class is generated but IS meant to be modified.
+ */
+public class BusinessprocesstypeResource
+   extends AbstractBusinessprocesstypeResource
+{
+   /**
+    * A NamespaceVerionHolder which maintains the QNames of Spec Wsdls
+    */
+   public static final org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl SPEC_NAMESPACE_SET =
+      new org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl(  );
+
+   /**  The value for the ImplementationProfile property **/
+   public static final String RESOURCE_TYPE = "BusinessProcess";
+
+   /**  The value for the Caption property **/
+   public static final String CAPTION = "BusinessProcess";
+
+   /**  The value for the Version property **/
+   public static final String VERSION = "1.0";
+
+   /**  The value for the description property **/
+   public static final String DESCRIPTION = "Business process resource";
+
+   /** A resource variable to hold the reference for backend */
+   private BusinessProcessInstance m_instance = null;
+
+   /**
+    * Creates a new {@link BusinessprocesstypeResource} object.
+    *
+    * @param key DOCUMENT_ME
+    * @param params DOCUMENT_ME
+    */
+   public BusinessprocesstypeResource( ResourceKey      key,
+                                       CreateParamsType params )
+   {
+      setID( ( key != null ) ? key.getValue(  ) : null );
+
+      // params can have any important information for the creation of Resource
+      // in this example it is not used.
+      // It is very powerfull mechanizm to initialize desired state of resource.
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @throws Exception DOCUMENT_ME
+    */
+   public void setRelationship( org.apache.ws.muse.example.resourceadmin.properties.SetRelationshipDocument requestDoc )
+   throws Exception
+   {
+      org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet                   =
+         getResourcePropertySet(  );
+      org.apache.ws.resource.properties.ResourceProperty    resourceProperty = null;
+      resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.RELATIONSHIP );
+      org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDocument prop_relationship =
+         org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDocument.Factory.newInstance(  );
+      RelationshipType                                                          relationshipType =
+         prop_relationship.addNewRelationship(  );
+      relationshipType.setType( requestDoc.getSetRelationship(  ).getType(  ) );
+
+      RelationshipParticipantType[] partTo              =
+         requestDoc.getSetRelationship(  ).getRelationshipTo(  ).getParticipantArray(  );
+      int                           numOfToParticipants = partTo.length;
+      if ( numOfToParticipants > 0 )
+      {
+         //There is the from participant - will be in the first position in the array,
+         // there needs to be at least one participant to, can be more.
+         RelationshipParticipantType[] participants = new RelationshipParticipantType[numOfToParticipants + 1];
+         participants[0] = requestDoc.getSetRelationship(  ).getRelationshipFrom(  ).getParticipant(  );
+         for ( int i = 0; i < numOfToParticipants; i++ )
+         {
+            participants[i + 1] = partTo[i];
+         }
+
+         relationshipType.setParticipantArray( participants );
+         resourceProperty.add( prop_relationship );
+      }
+      else
+      {
+         throw new Exception( "Missing Relationship Participant" );
+      }
+   }
+
+   /*
+    * Initializes this resource's state (properties, etc.).
+    */
+   public void init(  )
+   {
+      super.init(  );
+
+      /**
+       * The ResourcePropertySet which contains all the defined ResourceProperties
+       */
+      org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet = getResourcePropertySet(  );
+      org.apache.ws.resource.properties.ResourceProperty    resourceProperty = null;
+
+      try
+      {
+         //create the backend object associated with this resource
+         m_instance = new BusinessProcessInstance( getID(  ).toString(  ) );
+
+         TopicSpaceSet aSet = getTopicSpaceSet(  );
+         MuwsUtils.addRelationshipTopics( aSet );
+
+         //MUWS TopicSpace
+         TopicSpace muwsTopicSpace = new TopicSpaceImpl( MuwsConstants.NSURI_MUWS_PART2_TOPICS );
+         aSet.addTopicSpace( muwsTopicSpace );
+
+         ManagementEventTopic identityCapability =
+            new XmlBeansManagementEventTopicImpl( IdentityCapability.TOPIC_NAME );
+         muwsTopicSpace.addTopic( identityCapability );
+         ManagementEventTopic manageabilityCharacteristicsCapability =
+            new XmlBeansManagementEventTopicImpl( ManageabilityCharacteristicsCapability.TOPIC_NAME );
+         muwsTopicSpace.addTopic( manageabilityCharacteristicsCapability );
+
+         ManagementEventTopic muwsDescriptionCapability =
+            new XmlBeansManagementEventTopicImpl( DescriptionCapability.TOPIC_NAME );
+         muwsTopicSpace.addTopic( muwsDescriptionCapability );
+
+         ManagementEventTopic metricCapability =
+            new XmlBeansManagementEventTopicImpl( MetricsCapability.TOPIC_NAME );
+         muwsTopicSpace.addTopic( metricCapability );
+
+         //MOWS TopicSpace
+         TopicSpace mowsTopicSpace = new TopicSpaceImpl( MowsConstants.NSURI_MOWS_TOPICS );
+         getTopicSpaceSet(  ).addTopicSpace( mowsTopicSpace );
+
+         ManagementEventTopic mowsMetricsCapability =
+            new XmlBeansManagementEventTopicImpl( MetricsCapability.TOPIC_NAME );
+         mowsTopicSpace.addTopic( mowsMetricsCapability );
+
+         Calendar calendarInst = Calendar.getInstance(  );
+
+         // init the {http://ws.apache.org/muse/example/businessprocesstype/properties}TotalNumberOfCompletedProcesses Resource Property
+         resourceProperty =
+            resourcePropertySet.get( BusinessprocesstypePropertyQNames.TOTALNUMBEROFCOMPLETEDPROCESSES );
+         org.apache.ws.muse.example.businessprocesstype.properties.TotalNumberOfCompletedProcessesDocument prop_totalnumberofcompletedprocesses =
+            org.apache.ws.muse.example.businessprocesstype.properties.TotalNumberOfCompletedProcessesDocument.Factory
+            .newInstance(  );
+         org.apache.ws.namespaces.muse.muwsExt1.LongMetric                                                 totNumCompl =
+            org.apache.ws.namespaces.muse.muwsExt1.LongMetric.Factory.newInstance(  );
+         totNumCompl.setLongValue( m_instance.getTotalNumberOfCompletedProcesses(  ) );
+         totNumCompl.setLastUpdated( calendarInst );
+         prop_totalnumberofcompletedprocesses.setTotalNumberOfCompletedProcesses( totNumCompl );
+         resourceProperty.add( prop_totalnumberofcompletedprocesses );
+         resourceProperty.setCallback( new TotalNumberOfCompletedProcessesCallback( m_instance ) );
+
+         // init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ResourceId Resource Property
+         resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.RESOURCEID );
+         org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ResourceIdDocument prop_resourceid =
+            org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ResourceIdDocument.Factory.newInstance(  );
+         prop_resourceid.setResourceId( getID(  ).toString(  ) );
+         resourceProperty.add( prop_resourceid );
+         resourceProperty.addChangeListener( identityCapability );
+
+         // init the {http://ws.apache.org/muse/example/shared}CumulativeExecutionTime Resource Property
+         resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.CUMULATIVEEXECUTIONTIME );
+         org.apache.ws.muse.example.shared.CumulativeExecutionTimeDocument prop_cumulativeexecutiontime =
+            org.apache.ws.muse.example.shared.CumulativeExecutionTimeDocument.Factory.newInstance(  );
+         org.apache.ws.namespaces.muse.muwsExt1.LongMetric                 cumExecTime =
+            org.apache.ws.namespaces.muse.muwsExt1.LongMetric.Factory.newInstance(  );
+         cumExecTime.setLongValue( m_instance.getCumulativeExecutionTime(  ) );
+         cumExecTime.setLastUpdated( calendarInst );
+         prop_cumulativeexecutiontime.setCumulativeExecutionTime( cumExecTime );
+         resourceProperty.add( prop_cumulativeexecutiontime );
+         resourceProperty.setCallback( new CumulativeExecutionTimeCallback( m_instance ) );
+
+         // init the {http://ws.apache.org/muse/example/shared}ResourceHostname Resource Property
+         resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.RESOURCEHOSTNAME );
+         org.apache.ws.namespaces.muse.muwsExt1.ResourceHostnameDocument prop_resourcehostname =
+            org.apache.ws.namespaces.muse.muwsExt1.ResourceHostnameDocument.Factory.newInstance(  );
+         prop_resourcehostname.setResourceHostname( getHostName(  ) );
+         resourceProperty.add( prop_resourcehostname );
+
+         // init the {http://ws.apache.org/muse/example/businessprocesstype/properties}TotalNumberOfTerminatedProcesses Resource Property
+         resourceProperty =
+            resourcePropertySet.get( BusinessprocesstypePropertyQNames.TOTALNUMBEROFTERMINATEDPROCESSES );
+         org.apache.ws.muse.example.businessprocesstype.properties.TotalNumberOfTerminatedProcessesDocument prop_totalnumberofterminatedprocesses =
+            org.apache.ws.muse.example.businessprocesstype.properties.TotalNumberOfTerminatedProcessesDocument.Factory
+            .newInstance(  );
+         org.apache.ws.namespaces.muse.muwsExt1.LongMetric                                                  totTermP =
+            org.apache.ws.namespaces.muse.muwsExt1.LongMetric.Factory.newInstance(  );
+         totTermP.setLongValue( m_instance.getTotalNumberOfTerminatedProcesses(  ) );
+         totTermP.setLastUpdated( calendarInst );
+         prop_totalnumberofterminatedprocesses.setTotalNumberOfTerminatedProcesses( totTermP );
+         resourceProperty.add( prop_totalnumberofterminatedprocesses );
+         resourceProperty.setCallback( new TotalNumberOfTerminatedProcessesCallback( m_instance ) );
+
+         // init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}Version Resource Property
+         resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.VERSION );
+         org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.VersionDocument prop_version =
+            org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.VersionDocument.Factory.newInstance(  );
+         prop_version.setVersion( VERSION );
+         resourceProperty.add( prop_version );
+         resourceProperty.addChangeListener( muwsDescriptionCapability );
+
+         // init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}Caption Resource Property
+         resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.CAPTION );
+         org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.CaptionDocument prop_caption =
+            org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.CaptionDocument.Factory.newInstance(  );
+         org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.LangString      lStringCap =
+            LangString.Factory.newInstance(  );
+         lStringCap.setStringValue( CAPTION + "-" + getID(  ).toString(  ) );
+         lStringCap.setLang( "en" );
+         prop_caption.setCaption( lStringCap );
+         resourceProperty.add( prop_caption );
+         resourceProperty.addChangeListener( muwsDescriptionCapability );
+
+         // init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ManageabilityCapability Resource Property
+         resourceProperty = resourcePropertySet.get( ApplicationPropertyQNames.MANAGEABILITYCAPABILITY );
+         org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument prop_manageabilitycapability =
+            org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument.Factory
+            .newInstance(  );
+         prop_manageabilitycapability.setManageabilityCapability( IdentityCapability.URI );
+         resourceProperty.add( prop_manageabilitycapability );
+
+         resourceProperty.addChangeListener( manageabilityCharacteristicsCapability );
+         prop_manageabilitycapability = ManageabilityCapabilityDocument.Factory.newInstance(  );
+         prop_manageabilitycapability.setManageabilityCapability( org.apache.ws.muws.v1_0.capability.MetricsCapability.URI );
+         resourceProperty.add( prop_manageabilitycapability );
+
+         prop_manageabilitycapability = ManageabilityCapabilityDocument.Factory.newInstance(  );
+         prop_manageabilitycapability.setManageabilityCapability( RelationshipsCapability.URI );
+         resourceProperty.add( prop_manageabilitycapability );
+
+         prop_manageabilitycapability = ManageabilityCapabilityDocument.Factory.newInstance(  );
+         prop_manageabilitycapability.setManageabilityCapability( DescriptionCapability.URI );
+         resourceProperty.add( prop_manageabilitycapability );
+
+         prop_manageabilitycapability = ManageabilityCapabilityDocument.Factory.newInstance(  );
+         prop_manageabilitycapability.setManageabilityCapability( MetricsCapability.URI );
+         resourceProperty.add( prop_manageabilitycapability );
+
+         prop_manageabilitycapability = ManageabilityCapabilityDocument.Factory.newInstance(  );
+         prop_manageabilitycapability.setManageabilityCapability( ExampleConstants.MUWS_EXT_CAPABILITY_URI );
+         resourceProperty.add( prop_manageabilitycapability );
+
+         resourceProperty.addChangeListener( manageabilityCharacteristicsCapability );
+
+         // init the {http://ws.apache.org/muse/example/businessprocesstype/properties}TotalNumberOfAbortedProcesses Resource Property
+         resourceProperty =
+            resourcePropertySet.get( BusinessprocesstypePropertyQNames.TOTALNUMBEROFABORTEDPROCESSES );
+         org.apache.ws.muse.example.businessprocesstype.properties.TotalNumberOfAbortedProcessesDocument prop_totalnumberofabortedprocesses =
+            org.apache.ws.muse.example.businessprocesstype.properties.TotalNumberOfAbortedProcessesDocument.Factory
+            .newInstance(  );
+         org.apache.ws.namespaces.muse.muwsExt1.LongMetric                                               totNumAborPro =
+            org.apache.ws.namespaces.muse.muwsExt1.LongMetric.Factory.newInstance(  );
+         totNumAborPro.setLongValue( m_instance.getTotalNumberOfAbortedProcesses(  ) );
+         totTermP.setLastUpdated( calendarInst );
+         prop_totalnumberofabortedprocesses.setTotalNumberOfAbortedProcesses( totNumAborPro );
+         resourceProperty.add( prop_totalnumberofabortedprocesses );
+         resourceProperty.setCallback( new TotalNumberOfAbortedProcessesCallback( m_instance ) );
+
+         // init the {http://ws.apache.org/muse/example/businessprocesstype/properties}NumberOfRunningProcesses Resource Property
+         resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.NUMBEROFRUNNINGPROCESSES );
+         org.apache.ws.muse.example.businessprocesstype.properties.NumberOfRunningProcessesDocument prop_numberofrunningprocesses =
+            org.apache.ws.muse.example.businessprocesstype.properties.NumberOfRunningProcessesDocument.Factory
+            .newInstance(  );
+         org.apache.ws.namespaces.muse.muwsExt1.IntMetric                                           totRunningP =
+            org.apache.ws.namespaces.muse.muwsExt1.IntMetric.Factory.newInstance(  );
+         totRunningP.setIntValue( m_instance.getNumberOfRunningProcesses(  ) );
+         totRunningP.setLastUpdated( calendarInst );
+         prop_numberofrunningprocesses.setNumberOfRunningProcesses( totRunningP );
+         resourceProperty.add( prop_numberofrunningprocesses );
+         resourceProperty.setCallback( new NumberOfRunningProcessesCallback( m_instance ) );
+
+         // init the {http://ws.apache.org/muse/example/businessprocesstype/properties}NumberOfSuspendedProcesses Resource Property
+         resourceProperty =
+            resourcePropertySet.get( BusinessprocesstypePropertyQNames.NUMBEROFSUSPENDEDPROCESSES );
+         org.apache.ws.muse.example.businessprocesstype.properties.NumberOfSuspendedProcessesDocument prop_numberofsuspendedprocesses =
+            org.apache.ws.muse.example.businessprocesstype.properties.NumberOfSuspendedProcessesDocument.Factory
+            .newInstance(  );
+         org.apache.ws.namespaces.muse.muwsExt1.IntMetric                                             numSuspP =
+            org.apache.ws.namespaces.muse.muwsExt1.IntMetric.Factory.newInstance(  );
+         numSuspP.setIntValue( m_instance.getNumberOfSuspendedProcesses(  ) );
+         numSuspP.setLastUpdated( calendarInst );
+         prop_numberofsuspendedprocesses.setNumberOfSuspendedProcesses( numSuspP );
+         resourceProperty.add( prop_numberofsuspendedprocesses );
+         resourceProperty.setCallback( new NumberOfSuspendedProcessesCallback( m_instance ) );
+
+         // init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}Description Resource Property
+         resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.DESCRIPTION );
+         org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.DescriptionDocument prop_description =
+            org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.DescriptionDocument.Factory.newInstance(  );
+         org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.LangString          lString =
+            LangString.Factory.newInstance(  );
+         lString.setStringValue( DESCRIPTION );
+         lString.setLang( "en" );
+         prop_description.setDescription( lString );
+         resourceProperty.add( prop_description );
+         resourceProperty.addChangeListener( muwsDescriptionCapability );
+
+         // init the {http://ws.apache.org/muse/example/shared}ResourceType Resource Property
+         resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.RESOURCETYPE );
+         org.apache.ws.namespaces.muse.muwsExt1.ResourceTypeDocument prop_resourcetype =
+            org.apache.ws.namespaces.muse.muwsExt1.ResourceTypeDocument.Factory.newInstance(  );
+         prop_resourcetype.setResourceType( RESOURCE_TYPE );
+         resourceProperty.add( prop_resourcetype );
+
+         // init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}Relationship Resource Property
+         resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.RELATIONSHIP );
+         org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDocument prop_relationship    =
+            org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDocument.Factory.newInstance(  );
+         RelationshipDocument                                                      relationshipDocument =
+            RelationshipDocument.Factory.newInstance(  );
+
+         //add new type
+         RelationshipType     relationshipType     = relationshipDocument.addNewRelationship(  );
+         RelationshipTypeType relationshipTypeType = relationshipType.addNewType(  );
+         XmlObject            relationType         =
+            XmlObject.Factory.parse( "<" + ExampleConstants.RELATIONSHIP_RELATION.getPrefix(  ) + ":"
+                                     + ExampleConstants.RELATIONSHIP_RELATION.getLocalPart(  ) + " xmlns:"
+                                     + ExampleConstants.RELATIONSHIP_RELATION.getPrefix(  ) + "=" + "\""
+                                     + ExampleConstants.RELATIONSHIP_RELATION.getNamespaceURI(  ) + "\" />" );
+         XmlBeanUtils.addChildElement( relationshipTypeType, relationType );
+         prop_relationship.setRelationship( relationshipType );
+         resourceProperty.add( prop_relationship );
+
+         //		 init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}CurrentTime ResourceProperty
+         resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.CURRENTTIME );
+         CurrentTimeDocument currentTimeDocument = CurrentTimeDocument.Factory.newInstance(  );
+         currentTimeDocument.setCurrentTime( Calendar.getInstance(  ) );
+         resourceProperty.add( currentTimeDocument );
+         resourceProperty.setCallback( new org.apache.ws.resource.lifetime.callback.CurrentTimeCallback(  ) );
+         resourceProperty.addChangeListener( metricCapability );
+      }
+      catch ( Exception e )
+      {
+         e.printStackTrace(  );
+         throw new javax.xml.rpc.JAXRPCException( "There was a problem in initializing your resource properties.  Please check your init() method. Cause: "
+                                                  + e.getLocalizedMessage(  ) );
+      }
+
+      // Resource Property {http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}FixedTopicSet is implemented by the framework.
+      // Resource Property {http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}Topic is implemented by the framework.
+      // Resource Property {http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}TopicExpressionDialects is implemented by the framework.
+      /**
+       * Initializes the Topic, TopicExpressionDialects and FixedTopicSet resource properties
+       * </br>
+       * FixedTopicSet will be set based on the value returned from the {@see TopicSpaceSet#isFixed()} method.
+       * </br>
+       * Topic will have all root topics in the TopicSpaceSet, set to Simple dialect AND all child topics set to
+       * Concrete dialect.
+       * </br>
+       *
+       * TopicExpressionDialects will be set to the engine's known Topic Dialects acquired from the TopicExpressionEngine
+       *
+       * If this is not the behavior you would like, you will need to remove the following line of code and initialize the properties
+       * individually.
+       */
+      org.apache.ws.notification.topics.util.TopicUtils.initNotificationProducerProperties( getTopicSpaceSet(  ),
+                                                                                            getResourcePropertySet(  ) );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @throws Exception DOCUMENT_ME
+    */
+   public void removeRelationship( org.apache.ws.muse.example.resourceadmin.properties.RemoveRelationshipDocument requestDoc )
+   throws Exception
+   {
+      // get participants of relationship to be removed
+      RelationshipType relationshipRemove = requestDoc.getRemoveRelationship(  ).getRelationship(  );
+
+      // get the relationship property from properties set
+      // then walk all relationships and compare them with the relationship which needs to be removed.
+      // when the match exist the relationship will be removed from the relationship properties list
+      // this will genarate realtionshipremoved notification
+      org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet = getResourcePropertySet(  );
+      org.apache.ws.resource.properties.ResourceProperty    resourceProperty = null;
+      resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.RELATIONSHIP );
+
+      if ( resourceProperty.isEmpty(  ) )
+      {
+         return;
+      }
+
+      for ( int i = 0; i < resourceProperty.size(  ); i++ )
+      {
+         Object relationObj = resourceProperty.get( i );
+         if ( relationObj instanceof RelationshipType )
+         {
+            RelationshipType relationship = (RelationshipType) relationObj;
+            if ( ExampleUtils.CompareRelationships( relationshipRemove, relationship ) )
+            {
+               resourceProperty.remove( relationObj );
+
+               //continue to walk - you can have more then one this same relationship
+               //the notification will be sent to wsdm:RelationshipsCapability/RelationshipDeleted topic
+            }
+         }
+      }
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param processId DOCUMENT_ME
+    */
+   public void resume( String processId )
+   {
+      m_instance.resume( processId );
+      return;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param processId DOCUMENT_ME
+    */
+   public void suspend( String processId )
+   {
+      m_instance.suspend( processId );
+      return;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param processId DOCUMENT_ME
+    */
+   public void terminate( String processId )
+   {
+      m_instance.terminate( processId );
+      return;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   protected String getHostName(  )
+   {
+      String name = null;
+      try
+      {
+         java.net.InetAddress localMachine = java.net.InetAddress.getLocalHost(  );
+         name = localMachine.getHostName(  );
+      }
+      catch ( java.net.UnknownHostException uhe )
+      {
+         System.out.println( "Error getting HostName" );
+      }
+
+      return name;
+   }
+}
\ No newline at end of file

Added: incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeService.java
URL: http://svn.apache.org/viewcvs/incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeService.java?rev=191585&view=auto
==============================================================================
--- incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeService.java (added)
+++ incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/BusinessprocesstypeService.java Mon Jun 20 16:28:31 2005
@@ -0,0 +1,140 @@
+/*=============================================================================*
+ *  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.muse.example.businessprocesstype;
+
+import org.apache.ws.resource.ResourceContext;
+
+/**
+ * 
+ * @author Kinga Dziembowski
+ * 
+ * This class should be generated ONCE (and not overwritten) to maintain user-added code.
+ * If there is a change to the WSDL, then the generated implemented interfaces
+ * (representing the "base" portTypes) will change, thus showing a compile error to the
+ * user.
+ *
+ * NOTE: This class is generated. However, it will not be overwritten by subsequent
+ *       calls to the code generator.
+ *
+ */
+public class BusinessprocesstypeService
+   extends AbstractBusinessprocesstypeService
+   implements BusinessprocesstypeCustomOperationsPortType
+{
+   /**
+    * A NamespaceVerionHolder which maintains the QNames of Spec Wsdls
+    */
+   public static final org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl SPEC_NAMESPACE_SET =
+      new org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl(  );
+
+   /**
+    * Creates a new {@link BusinessprocesstypeService } object.
+    *
+    * @param resourceContext DOCUMENT_ME
+    */
+   public BusinessprocesstypeService( ResourceContext resourceContext )
+   {
+      super( resourceContext );
+      init(  );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataDocument GetMetadata( org.xmlsoap.schemas.ws.x2004.x09.mex.GetMetadataDocument requestDoc )
+   {
+      org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataDocument          responseDocument =
+         org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataDocument.Factory.newInstance(  );
+      org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataDocument.Metadata response =
+         responseDocument.addNewMetadata(  );
+
+      //TODO implement method and populate the response object 
+      return responseDocument;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.apache.ws.muse.example.businessprocesstype.properties.ResumeResponseDocument Resume( org.apache.ws.muse.example.businessprocesstype.properties.ResumeDocument requestDoc )
+   {
+      org.apache.ws.muse.example.businessprocesstype.properties.ResumeResponseDocument                responseDocument =
+         org.apache.ws.muse.example.businessprocesstype.properties.ResumeResponseDocument.Factory.newInstance(  );
+      org.apache.ws.muse.example.businessprocesstype.properties.ResumeResponseDocument.ResumeResponse response  =
+         responseDocument.addNewResumeResponse(  );
+      BusinessprocesstypeResource                                                                     aResource =
+         (BusinessprocesstypeResource) getResource(  );
+      aResource.resume( requestDoc.getResume(  ) );
+      return responseDocument;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.apache.ws.muse.example.businessprocesstype.properties.SuspendResponseDocument Suspend( org.apache.ws.muse.example.businessprocesstype.properties.SuspendDocument requestDoc )
+   {
+      org.apache.ws.muse.example.businessprocesstype.properties.SuspendResponseDocument                 responseDocument =
+         org.apache.ws.muse.example.businessprocesstype.properties.SuspendResponseDocument.Factory.newInstance(  );
+      org.apache.ws.muse.example.businessprocesstype.properties.SuspendResponseDocument.SuspendResponse response  =
+         responseDocument.addNewSuspendResponse(  );
+      BusinessprocesstypeResource                                                                       aResource =
+         (BusinessprocesstypeResource) getResource(  );
+      aResource.suspend( requestDoc.getSuspend(  ) );
+      return responseDocument;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.apache.ws.muse.example.businessprocesstype.properties.TerminateResponseDocument Terminate( org.apache.ws.muse.example.businessprocesstype.properties.TerminateDocument requestDoc )
+   {
+      org.apache.ws.muse.example.businessprocesstype.properties.TerminateResponseDocument                   responseDocument =
+         org.apache.ws.muse.example.businessprocesstype.properties.TerminateResponseDocument.Factory.newInstance(  );
+      org.apache.ws.muse.example.businessprocesstype.properties.TerminateResponseDocument.TerminateResponse response  =
+         responseDocument.addNewTerminateResponse(  );
+      BusinessprocesstypeResource                                                                           aResource =
+         (BusinessprocesstypeResource) getResource(  );
+      aResource.terminate( requestDoc.getTerminate(  ) );
+
+      return responseDocument;
+   }
+
+   /**
+    * Returns a collection of Spec Namespaces associated with this Service
+    *
+    * @return A NamespaceVersionHolder impl which represents the collection of spec namespaces
+    *         associated with this service.
+    */
+   protected org.apache.ws.resource.properties.NamespaceVersionHolder getNamespaceSet(  )
+   {
+      return SPEC_NAMESPACE_SET;
+   }
+}
\ No newline at end of file

Added: incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/Businessprocesstype_deploy.wsdd
URL: http://svn.apache.org/viewcvs/incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/Businessprocesstype_deploy.wsdd?rev=191585&view=auto
==============================================================================
--- incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/Businessprocesstype_deploy.wsdd (added)
+++ incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/Businessprocesstype_deploy.wsdd Mon Jun 20 16:28:31 2005
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+
+<deployment xmlns="http://xml.apache.org/axis/wsdd/" 
+            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
+
+   <service name="businessprocesstype" provider="java:WSRF" style="document" use="literal">
+      
+      <wsdlFile>/wsdl/businessprocesstype.wsdl</wsdlFile>      
+      
+      <requestFlow>
+         <handler type="java:org.apache.axis.handlers.JAXRPCHandler">
+            <parameter name="className" value="org.apache.axis.message.addressing.handler.AxisServerSideAddressingHandler" />
+            <parameter name="referencePropertyNames" value="*" />
+         </handler>
+      </requestFlow>      
+      
+      <responseFlow>
+         <handler type="java:org.apache.axis.handlers.JAXRPCHandler">
+            <parameter name="className" value="org.apache.axis.message.addressing.handler.AxisServerSideAddressingHandler" />
+            <parameter name="referencePropertyNames" value="*" />
+         </handler>
+      </responseFlow>            
+      
+   </service>
+
+</deployment>

Added: incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/Businessprocesstype_jndi-config.xml
URL: http://svn.apache.org/viewcvs/incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/Businessprocesstype_jndi-config.xml?rev=191585&view=auto
==============================================================================
--- incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/Businessprocesstype_jndi-config.xml (added)
+++ incubator/muse/site/example/services/businessprocesstype/src/java/org/apache/ws/muse/example/businessprocesstype/Businessprocesstype_jndi-config.xml Mon Jun 20 16:28:31 2005
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<jndiConfig xmlns="http://www.apache.org/wsfx/wsrf/jndi/config">
+
+   <service name="businessprocesstype">
+      <resource name="home" type="org.apache.ws.muse.example.businessprocesstype.BusinessprocesstypeHome">
+         <resourceParams>
+            <parameter>
+               <name>serviceClassName</name>
+               <value>org.apache.ws.muse.example.businessprocesstype.BusinessprocesstypeService</value>
+            </parameter>
+            <parameter>
+               <name>resourceClassName</name>
+               <value>org.apache.ws.muse.example.businessprocesstype.BusinessprocesstypeResource</value>
+            </parameter>
+            <parameter>
+               <name>wsdlTargetNamespace</name>
+               <value>http://ws.apache.org/muse/example/businessprocesstype</value>
+            </parameter>
+            
+            <parameter>
+               <name>resourceKeyName</name>
+               <value>{http://ws.apache.org/muse/example/businessprocesstype}ResourceID</value>
+            </parameter>
+            
+
+         </resourceParams>
+      </resource>
+   </service>
+
+</jndiConfig>
+



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