Author: scamp
Date: Mon May 16 10:19:09 2005
New Revision: 170411

URL: http://svn.apache.org/viewcvs?rev=170411&view=rev
Log: (empty)

Added:
    incubator/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java
    
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/AdvertisementCapability.java
    
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserResource.java
    
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserService.java
    
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserCustomOperationsPortType.java
    
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java
    
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserPropertyQNames.java
    
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java
    
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserService.java
Modified:
    incubator/muse/trunk/maven.xml
    incubator/muse/trunk/project.xml
    
incubator/muse/trunk/src/templates/v2004_12/Relationships-AbstractResource_init.txt

Modified: incubator/muse/trunk/maven.xml
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/maven.xml?rev=170411&r1=170410&r2=170411&view=diff
==============================================================================
--- incubator/muse/trunk/maven.xml (original)
+++ incubator/muse/trunk/maven.xml Mon May 16 10:19:09 2005
@@ -109,12 +109,7 @@
     <j:set var="wsdljar" 
value="${pom.getDependencyPath('muse:wsdm-xbeans')}"/>    
     <attainGoal name="extract-wsdl-jar"/>
     
-    <attainGoal name="dep-license-files" />
-    
-    <!-- Extract the Advertiser Wsdl -->
-    <j:set var="wsdl.extract.location.dir" 
value="${maven.war.webapp.dir}/wsdl"/>
-    <j:set var="wsdljar" 
value="${pom.getDependencyPath('muse:advertiser-xbeans')}"/> 
-    <attainGoal name="extract-wsdl-jar"/>
+    <attainGoal name="dep-license-files" />    
     
   </postGoal>
   

Modified: incubator/muse/trunk/project.xml
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/project.xml?rev=170411&r1=170410&r2=170411&view=diff
==============================================================================
--- incubator/muse/trunk/project.xml (original)
+++ incubator/muse/trunk/project.xml Mon May 16 10:19:09 2005
@@ -574,6 +574,11 @@
          <include>templates/**</include>
         </includes>
         <filtering>false</filtering>
+      </resource>  
+
+      <resource>
+        <directory>advertiser-xbeans/src/wsdl</directory>
+        <targetPath>wsdl</targetPath>             
       </resource>      
 
     </resources>

Added: incubator/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java?rev=170411&view=auto
==============================================================================
--- incubator/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java (added)
+++ incubator/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java Mon May 16 
10:19:09 2005
@@ -0,0 +1,47 @@
+package org.apache.ws.muws;
+
+import org.apache.ws.resource.properties.ResourcePropertySet;
+import org.apache.ws.notification.topics.TopicSpaceSet;
+import org.apache.ws.notification.topics.TopicSpace;
+import org.apache.ws.notification.topics.Topic;
+import org.apache.ws.notification.topics.impl.TopicSpaceImpl;
+import org.apache.ws.muws.v1_0.MuwsConstants;
+import org.apache.ws.muws.v1_0.capability.RelationshipsCapability;
+
+
+/**
+ * @author Sal Campana
+ */
+public class MuwsUtils
+{
+
+    /**
+     * Replaces the default resoruce property for Relationships with a 
XmlBeansRelationshipResourceProperty
+     *
+     * @param propSet
+     */
+    public void updateRelationshipResourceProperty(ResourcePropertySet propSet)
+    {
+        //init the RelationshipsProperties Resource
+
+        org.apache.ws.muws.v1_0.impl.XmlBeansRelationshipResourceProperty 
relationshipResourceProperty = new 
org.apache.ws.muws.v1_0.impl.XmlBeansRelationshipResourceProperty(propSet.getMetaData().getPropertyMetaData(org.apache.ws.muws.v1_0.capability.RelationshipsCapability.PROP_NAME_RELATIONSHIP),
+                                                                               
                                                                                
                
(org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet) propSet, 
(org.apache.ws.notification.base.NotificationProducerResource) this);
+        ((org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet) 
propSet).set(relationshipResourceProperty);
+
+    }
+
+    /**
+     * Initializes the Muws Relationship topics in the TopicSet
+     *
+     * @param set
+     * @throws Exception
+     */
+    public void addRelationshipTopics(TopicSpaceSet set) throws Exception
+    {
+        TopicSpace topicSpace = new 
TopicSpaceImpl(MuwsConstants.NSURI_MUWS_PART2_TOPICS);
+        Topic topic = topicSpace.addTopic(RelationshipsCapability.TOPIC_NAME);
+        
topic.addTopic(RelationshipsCapability.SUBTOPIC_NAME_RELATIONSHIP_CREATED);
+        
topic.addTopic(RelationshipsCapability.SUBTOPIC_NAME_RELATIONSHIP_DELETED);
+        set.addTopicSpace(topicSpace);
+    }
+}

Added: 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/AdvertisementCapability.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/AdvertisementCapability.java?rev=170411&view=auto
==============================================================================
--- 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/AdvertisementCapability.java
 (added)
+++ 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/AdvertisementCapability.java
 Mon May 16 10:19:09 2005
@@ -0,0 +1,37 @@
+package org.apache.ws.muws.v1_0.capability;
+
+import org.apache.ws.muws.v1_0.MuwsConstants;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The MUWS Advertisement manageability capability.
+ *
+ * @author Sal Campana
+ */
+public interface AdvertisementCapability
+{
+    /**
+     * Name of this capability.
+     */
+    String NAME = "Advertisement";
+
+
+    /**
+     * Manageability capability URI.
+     */
+    String URI = MuwsConstants.BASE_URI_MUWS_CAPABILITIES + NAME;
+
+    /**
+     * Topic names.
+     */
+    String TOPIC_MANAGEABILITY_ENPOINT_CREATION_NAME = 
"ManageabilityEndpointCreation";
+
+    String TOPIC_MANAGEABLE_RESOURCE_CREATION_NAME = 
"ManageableResourceCreation";
+
+    String TOPIC_MANAGEABILITY_ENPOINT_DESTRUCTION_NAME = 
"ManageabilityEndpointDestruction";
+
+    String TOPIC_MANAGEABLE_RESOURCE_DESTRUCTION_NAME = 
"ManageableResourceDestruction";
+
+
+}

Added: 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserResource.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserResource.java?rev=170411&view=auto
==============================================================================
--- 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserResource.java
 (added)
+++ 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserResource.java
 Mon May 16 10:19:09 2005
@@ -0,0 +1,143 @@
+
+package org.apache.ws.muws.v1_0.impl.advertiser;
+
+import org.apache.ws.addressing.EndpointReference;
+
+/**
+ * An abstract ResourceAdvertiser WS-Resource.
+ * <p/>
+ * NOTE: This class is generated and is NOT meant to be modified.
+ */
+public abstract class AbstractResourceAdvertiserResource  implements 
org.apache.ws.resource.PropertiesResource, 
org.apache.ws.notification.base.NotificationProducerResource {
+
+    /**
+     * The resource ID of the instance.
+     */
+    protected String m_id;
+
+    /** The EndpointReference for this resource **/
+    protected EndpointReference m_endpointReference;
+
+        /**
+     * The set of properties associated with this resource.
+     */
+    protected org.apache.ws.resource.properties.ResourcePropertySet m_propSet;
+
+
+    /**
+     * A list of termination listeners to be notified when the resource is 
terminated.
+     */
+    private java.util.List m_terminationListeners = new java.util.ArrayList();
+
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @param id DOCUMENT_ME
+     */
+    public void setID( Object id )
+    {
+        if ( m_id != null )
+        {
+            throw new IllegalStateException( "This resource's ID has already 
been set." );
+        }
+
+        try
+        {
+            m_id = (String) id;
+        }
+        catch ( ClassCastException cce )
+        {
+            throw new IllegalArgumentException( "Specified ID is not a 
String." );
+        }
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @param listener DOCUMENT_ME
+     */
+    public void addTerminationListener( 
org.apache.ws.resource.lifetime.ResourceTerminationListener listener)
+    {
+         m_terminationListeners.add(listener);
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    public Object getID()
+    {
+        return m_id;
+    }
+
+    public void destroy()
+    {
+       org.apache.ws.resource.lifetime.ResourceTerminationEvent rte = new 
org.apache.ws.resource.lifetime.impl.ResourceTerminationEventImpl(getID(),"Resource
 Destroyed");
+       for (int i = 0; i < m_terminationListeners.size(); i++)
+       {
+           org.apache.ws.resource.lifetime.ResourceTerminationListener 
resourceTerminationEventListener = 
(org.apache.ws.resource.lifetime.ResourceTerminationListener) 
m_terminationListeners.get(i);
+           resourceTerminationEventListener.terminationOccurred(rte);
+       }
+        return;
+    }
+
+    public void init()
+    {
+
+                
org.apache.ws.muws.advertiser.base.service.AdvertiserResourcePropertiesDocument 
propsDoc = 
org.apache.ws.muws.advertiser.base.service.AdvertiserResourcePropertiesDocument.Factory.newInstance();
+        m_propSet = new 
org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet( propsDoc );
+
+
+
+    }
+
+   /**
+    * Returns the EndpointReference associated with this Resource.
+    *
+    * @return The Resource's EndpointReference or null if the 
EndpointReference has not been set.
+    *
+    * Note: It is the responsibility of the Resource creator to set the 
EndpointReference (i.e. ResourceHome impl)
+    */
+    public EndpointReference getEndpointReference()
+    {
+            return m_endpointReference;
+    }
+
+   /**
+    * Sets the EndpointReference associated with this Resource.
+    *
+    * @param epr The Resource's EndpointReference.
+    *
+    * Note: It is the responsibility of the Resource creator to set the 
EndpointReference (i.e. ResourceHome impl)
+    */
+    public void setEndpointReference(EndpointReference epr)
+    {
+            m_endpointReference = epr;
+    }
+
+
+    /**
+     * @see 
org.apache.ws.resource.PropertiesResource#setResourcePropertySet(org.apache.ws.resource.properties.ResourcePropertySet)
+     */
+    public void setResourcePropertySet( 
org.apache.ws.resource.properties.ResourcePropertySet propSet )
+    {
+        m_propSet = propSet;
+    }
+
+    /**
+     * @see org.apache.ws.resource.PropertiesResource#getResourcePropertySet()
+     */
+    public org.apache.ws.resource.properties.ResourcePropertySet 
getResourcePropertySet()
+    {
+        return m_propSet;
+    }
+       org.apache.ws.notification.topics.TopicSpaceSet m_topicSpaceSet = new 
org.apache.ws.notification.topics.impl.TopicSpaceSetImpl(true);
+
+       public org.apache.ws.notification.topics.TopicSpaceSet 
getTopicSpaceSet()
+       {
+               return m_topicSpaceSet;
+       }
+
+}

Added: 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserService.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserService.java?rev=170411&view=auto
==============================================================================
--- 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserService.java
 (added)
+++ 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserService.java
 Mon May 16 10:19:09 2005
@@ -0,0 +1,135 @@
+
+package org.apache.ws.muws.v1_0.impl.advertiser;
+
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.handler.SoapMethodNameMap;
+import org.apache.ws.resource.handler.WsrfService;
+import org.apache.ws.resource.AbstractPortType;
+import org.apache.ws.resource.handler.ServiceSoapMethodNameMap;
+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 AbstractResourceAdvertiserService 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_6.porttype.NotificationProducerPortType {
+
+   public static final String TARGET_NSURI = 
"http://ws.apache.org/muws/advertiser/base/service/";;
+   public static final String TARGET_NSPREFIX = "service";
+
+   /**
+    * DOCUMENT_ME
+    */
+   private ServiceSoapMethodNameMap m_methodNameMap;
+
+   /**
+    * DOCUMENT_ME
+    */
+   private boolean m_isInitialized;
+
+   public AbstractResourceAdvertiserService( ResourceContext resourceContext )
+   {
+      super(resourceContext);
+   }
+
+   /**
+    * 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
+       */
+   public void init(  )
+   {
+      m_methodNameMap    = new ServiceSoapMethodNameMap( getResourceContext(  
) );
+      m_isInitialized      = true;
+   }
+
+
+      /**
+       * DOCUMENT_ME
+       *
+       * @return DOCUMENT_ME
+       */
+   protected final boolean isInitialized(  )
+   {
+         return m_isInitialized;
+   }
+
+   /**
+    * 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
+    *
+    * @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_6.porttype.impl.NotificationProducerPortTypeImpl(
 getResourceContext(  ) ).subscribe( requestDoc );
+   }
+
+   /**
+    * 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_6.porttype.impl.NotificationProducerPortTypeImpl(
 getResourceContext(  ) ).getCurrentMessage( requestDoc );
+   }
+
+
+
+}

Added: 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserCustomOperationsPortType.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserCustomOperationsPortType.java?rev=170411&view=auto
==============================================================================
--- 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserCustomOperationsPortType.java
 (added)
+++ 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserCustomOperationsPortType.java
 Mon May 16 10:19:09 2005
@@ -0,0 +1,14 @@
+
+package org.apache.ws.muws.v1_0.impl.advertiser;
+
+/**
+ * Custom operations portType.
+ *
+ * NOTE: This class is generated and is NOT meant to be modified.
+ *
+ */
+public interface ResourceAdvertiserCustomOperationsPortType
+{
+
+
+}

Added: 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java?rev=170411&view=auto
==============================================================================
--- 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java
 (added)
+++ 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java
 Mon May 16 10:19:09 2005
@@ -0,0 +1,91 @@
+
+package org.apache.ws.muws.v1_0.impl.advertiser;
+
+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.addressing.EndpointReference;
+
+import javax.xml.namespace.QName;
+
+import java.io.Serializable;
+
+/**
+ * Home for ResourceAdvertiser WS-Resources.
+ */
+public class ResourceAdvertiserHome
+        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/muws/advertiser/base/service/}ResourceAdvertiser";);
+
+    /** 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/muws/advertiser/base/service/}AdvertiserPortType";);
+
+    /** The WSDL Port name associated with the resource. This is useful for 
building EPR's. **/
+    public static final String PORT_NAME = "ResourceAdvertiser";
+
+    /** The name of the resource key for this resource. **/
+    public static final QName RESOURCE_KEY_NAME = 
javax.xml.namespace.QName.valueOf("{${resourcekey.NamespaceURI}}${resourcekey.LocalPart}");
+
+        /**
+     * 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;
+    private ResourceAdvertiserResource m_resource;
+
+    /**
+     *
+     * @param resourceContext
+     *
+     * @return A Resource
+     *
+     * @throws ResourceException
+     * @throws ResourceContextException
+     * @throws ResourceUnknownException
+     */
+    public Resource getInstance( ResourceContext resourceContext )
+            throws ResourceException,
+            ResourceContextException,
+            ResourceUnknownException
+    {
+
+        if (m_resource == null)
+        {
+            m_resource = new ResourceAdvertiserResource();
+            m_resource.init();
+        }
+
+        return m_resource;
+
+    }
+
+    public QName getServiceName()
+    {
+        return SERVICE_NAME;
+    }
+
+    public QName getPortType()
+    {
+        return PORT_TYPE;
+    }
+
+    public String getServicePortName()
+    {
+        return PORT_NAME;
+    }
+
+    public QName getResourceKeyNameQName()
+    {
+        return RESOURCE_KEY_NAME;
+    }
+}

Added: 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserPropertyQNames.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserPropertyQNames.java?rev=170411&view=auto
==============================================================================
--- 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserPropertyQNames.java
 (added)
+++ 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserPropertyQNames.java
 Mon May 16 10:19:09 2005
@@ -0,0 +1,25 @@
+package org.apache.ws.muws.v1_0.impl.advertiser;
+
+import javax.xml.namespace.QName;
+
+/**
+ * QNames of the resource properties defined by ResourceAdvertiser WSDL.
+ * <p/>
+ * NOTE: This class is generated and is NOT meant to be modified.
+ *
+ */
+public interface ResourceAdvertiserPropertyQNames
+{
+
+            QName MANAGEABILITYCAPABILITY =
+            new QName( 
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd";, 
"ManageabilityCapability", "muws-p1-xs");
+            QName TOPICEXPRESSIONDIALECTS =
+            new QName( 
"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd";,
 "TopicExpressionDialects", "wsnt");
+            QName RESOURCEID =
+            new QName( 
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd";, 
"ResourceId", "muws-p1-xs");
+            QName FIXEDTOPICSET =
+            new QName( 
"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd";,
 "FixedTopicSet", "wsnt");
+            QName TOPIC =
+            new QName( 
"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd";,
 "Topic", "wsnt");
+
+}

Added: 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java?rev=170411&view=auto
==============================================================================
--- 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java
 (added)
+++ 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java
 Mon May 16 10:19:09 2005
@@ -0,0 +1,158 @@
+
+package org.apache.ws.muws.v1_0.impl.advertiser;
+
+import org.apache.ws.muws.v1_0.MuwsConstants;
+import org.apache.ws.muws.v1_0.capability.AdvertisementCapability;
+import org.apache.ws.muws.v1_0.topics.impl.XmlBeansAdvertisementTopicImpl;
+import org.apache.ws.notification.topics.Topic;
+import org.apache.ws.notification.topics.TopicSpace;
+import org.apache.ws.notification.topics.impl.TopicSpaceImpl;
+import org.apache.ws.resource.impl.AbstractResourceHome;
+
+import javax.naming.Binding;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A ResourceAdvertiser WS-Resource.
+ * <p/>
+ * NOTE: This class is generated but IS meant to be modified.
+ */
+public class ResourceAdvertiserResource extends 
AbstractResourceAdvertiserResource
+
+{
+
+        /**
+     * 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();
+
+    public ResourceAdvertiserResource()
+    {
+        //init();
+    }
+
+    /**
+     * 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{
+               // init the 
{http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ManageabilityCapability
 Resource Property
+               resourceProperty = 
resourcePropertySet.get(ResourceAdvertiserPropertyQNames.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(AdvertisementCapability.URI);
+               resourceProperty.add(prop_manageabilitycapability);
+
+               // init the 
{http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ResourceId 
Resource Property
+               resourceProperty = 
resourcePropertySet.get(ResourceAdvertiserPropertyQNames.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(" ");  //singleton
+               resourceProperty.add(prop_resourceid);
+
+        org.apache.ws.notification.topics.TopicSpaceSet topicSpaceSet = 
getTopicSpaceSet();
+        TopicSpace topicSpace = new 
TopicSpaceImpl(MuwsConstants.NSURI_MUWS_PART2_TOPICS);
+
+        Topic manageabilityEndpointCreation = new 
XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_CREATION_NAME);
+        Topic manageabilityEndpointDestruction = new 
XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_DESTRUCTION_NAME);
+
+        XmlBeansAdvertisementTopicImpl manageableResourceCreation = new 
XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_CREATION_NAME);
+        XmlBeansAdvertisementTopicImpl manageableResourceDestruction = new 
XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_DESTRUCTION_NAME);
+
+        //todo associate these with all the homes....
+        InitialContext ctx = new InitialContext();
+        List homes = findHomes(ctx, new ArrayList(),"");
+        for (int i = 0; i < homes.size(); i++)
+        {
+            String home = (String) homes.get(i);
+            //do not register its own home
+            if( ! home.equals(ResourceAdvertiserHome.HOME_LOCATION))
+            {
+                AbstractResourceHome absHome = (AbstractResourceHome) 
ctx.lookup(home);
+                
absHome.addResourceCreationListener(manageableResourceCreation);
+                
absHome.addResourceDestructionListener(manageableResourceDestruction);
+            }
+        }
+
+        manageabilityEndpointCreation.addTopic(manageableResourceCreation);
+        
manageabilityEndpointDestruction.addTopic(manageableResourceDestruction);
+        topicSpace.addTopic(manageabilityEndpointCreation);
+        topicSpace.addTopic(manageabilityEndpointDestruction);
+        topicSpaceSet.addTopicSpace(topicSpace);
+
+               }
+       catch (Exception e)
+       {
+          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 
[EMAIL PROTECTED] 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());
+        }
+
+
+    /**
+     * Locates the JNDI-deployed homes and returns a list containing their 
lookup strings
+     *
+     * @param ctx
+     * @param list
+     * @param fullname
+     * @return A list of homes.
+     * @throws NamingException
+     */
+    public List findHomes(Context ctx, List list, String fullname) throws 
NamingException
+    {
+        NamingEnumeration namingEnumeration = ctx.listBindings("");
+        while(namingEnumeration.hasMore())
+        {
+            Binding o = (Binding) namingEnumeration.next();
+            String name = o.getName();
+            Object value = o.getObject();
+
+            if(name.equals("home"))
+            {
+               list.add( fullname + "/home" );
+            }
+            else if (value instanceof Context)
+            {
+                findHomes((Context)value,list, fullname + "/" + name);
+            }
+            else
+            {
+                fullname = "";
+            }
+        }
+
+        return list;
+    }
+}

Added: 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserService.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserService.java?rev=170411&view=auto
==============================================================================
--- 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserService.java
 (added)
+++ 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserService.java
 Mon May 16 10:19:09 2005
@@ -0,0 +1,53 @@
+package org.apache.ws.muws.v1_0.impl.advertiser;
+
+import org.apache.ws.resource.ResourceContext;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlException;
+
+import javax.xml.rpc.JAXRPCException;
+
+/**
+ * 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 ResourceAdvertiserService
+   extends AbstractResourceAdvertiserService
+   implements ResourceAdvertiserCustomOperationsPortType
+{
+
+
+   /**
+    * 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 [EMAIL PROTECTED] ResourceAdvertiserService } object.
+    *
+    * @param resourceContext DOCUMENT_ME
+    */
+   public ResourceAdvertiserService( ResourceContext resourceContext )
+   {
+      super(resourceContext);
+      init();
+   }
+
+      /**
+    * 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;
+   }
+
+
+}

Modified: 
incubator/muse/trunk/src/templates/v2004_12/Relationships-AbstractResource_init.txt
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/templates/v2004_12/Relationships-AbstractResource_init.txt?rev=170411&r1=170410&r2=170411&view=diff
==============================================================================
--- 
incubator/muse/trunk/src/templates/v2004_12/Relationships-AbstractResource_init.txt
 (original)
+++ 
incubator/muse/trunk/src/templates/v2004_12/Relationships-AbstractResource_init.txt
 Mon May 16 10:19:09 2005
@@ -1,9 +1,5 @@
 #if ($notificationProducer)
-     //init the RelationshipsProperties Resource
-
-     org.apache.ws.muws.v1_0.impl.XmlBeansRelationshipResourceProperty 
relationshipResourceProperty = new 
org.apache.ws.muws.v1_0.impl.XmlBeansRelationshipResourceProperty(
-             
m_propSet.getMetaData().getPropertyMetaData(org.apache.ws.muws.v1_0.capability.RelationshipsCapability.PROP_NAME_RELATIONSHIP),
 
-             
(org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet)m_propSet, 
(org.apache.ws.notification.base.NotificationProducerResource)this);
-     
((org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet)m_propSet).set(relationshipResourceProperty);
-
+     //init the RelationshipsProperties Resource for sending Relationship 
events...NOTE: THIS DOES NOT REGISTER THE TOPICS
+     
org.apache.ws.muws.MuwsUtils.updateRelationshipResourceProperty(m_propSet);
+     
 #end



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to