You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2007/03/24 14:21:56 UTC

svn commit: r522023 [3/7] - in /webservices/muse/trunk/modules: muse-wsrf-api/src/org/apache/muse/ws/resource/ muse-wsrf-api/src/org/apache/muse/ws/resource/basefaults/ muse-wsrf-api/src/org/apache/muse/ws/resource/ext/ muse-wsrf-api/src/org/apache/mus...

Modified: webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/ServiceGroupPersistence.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/ServiceGroupPersistence.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/ServiceGroupPersistence.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/ServiceGroupPersistence.java Sat Mar 24 06:21:51 2007
@@ -1,40 +1,44 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.sg;
-
-import org.apache.muse.core.Persistence;
-import org.apache.muse.core.ResourceManagerListener;
-import org.apache.muse.ws.resource.WsResource;
-
-/**
- * 
- * ServiceGroupPersistence is an extension of the basic 
- * {@linkplain Persistence Persistence API} to provide a link to the 
- * {@linkplain ServiceGroup ServiceGroup API} and resource lifecycle events. 
- * Implementations of the ServiceGroup capability should use instances of 
- * this interface for persistence of service group state.
- *
- * @author Dan Jemiolo (danj)
- *
- */
-
-public interface ServiceGroupPersistence extends Persistence, ResourceManagerListener
-{
-    WsResource getServiceGroup();
-    
-    void setServiceGroup(WsResource serviceGroup);
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.sg;
+
+import org.apache.muse.core.Persistence;
+import org.apache.muse.core.ResourceManagerListener;
+import org.apache.muse.ws.resource.WsResource;
+
+/**
+ * 
+ * ServiceGroupPersistence is an extension of the basic 
+ * {@linkplain Persistence Persistence API} to provide a link to the 
+ * {@linkplain ServiceGroup ServiceGroup API} and resource lifecycle events. 
+ * Implementations of the ServiceGroup capability should use instances of 
+ * this interface for persistence of service group state.
+ *
+ * @author Dan Jemiolo (danj)
+ *
+ */
+
+public interface ServiceGroupPersistence extends Persistence, ResourceManagerListener
+{
+    WsResource getServiceGroup();
+    
+    void setServiceGroup(WsResource serviceGroup);
+}

Modified: webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/ServiceGroupRegistration.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/ServiceGroupRegistration.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/ServiceGroupRegistration.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/ServiceGroupRegistration.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.sg;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/WssgConstants.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/WssgConstants.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/WssgConstants.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/WssgConstants.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.sg;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/faults/AddRefusedFault.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/faults/AddRefusedFault.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/faults/AddRefusedFault.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/faults/AddRefusedFault.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.sg.faults;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/faults/ContentCreationFailedFault.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/faults/ContentCreationFailedFault.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/faults/ContentCreationFailedFault.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/faults/ContentCreationFailedFault.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.sg.faults;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/faults/UnsupportedMemberInterfaceFault.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/faults/UnsupportedMemberInterfaceFault.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/faults/UnsupportedMemberInterfaceFault.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-api/src/org/apache/muse/ws/resource/sg/faults/UnsupportedMemberInterfaceFault.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.sg.faults;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/AbstractWsResourceCapability.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/AbstractWsResourceCapability.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/AbstractWsResourceCapability.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/AbstractWsResourceCapability.java Sat Mar 24 06:21:51 2007
@@ -1,414 +1,418 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.impl;
-
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-import org.apache.muse.core.AbstractCapability;
-import org.apache.muse.core.Resource;
-import org.apache.muse.core.serializer.Serializer;
-import org.apache.muse.core.serializer.SerializerRegistry;
-import org.apache.muse.util.ReflectUtils;
-import org.apache.muse.util.messages.Messages;
-import org.apache.muse.util.messages.MessagesFactory;
-import org.apache.muse.util.xml.XmlUtils;
-import org.apache.muse.ws.addressing.soap.SoapFault;
-import org.apache.muse.ws.resource.WsResource;
-import org.apache.muse.ws.resource.WsResourceCapability;
-import org.apache.muse.ws.resource.basefaults.BaseFault;
-import org.apache.muse.ws.resource.basefaults.WsbfUtils;
-import org.apache.muse.ws.resource.properties.ResourcePropertyCollection;
-
-/**
- * 
- * AbstractWsResourceCapability is a foundation for user-defined capabilities 
- * for WSRF-based resources. It builds on the utilities of its 
- * {@linkplain AbstractCapability parent class} by providing the plumbing 
- * code needed to map WSRP requests to getter/setter methods in the 
- * concrete capability class. For example, it provides the logic needed to 
- * map a WSRP GetResourceProperty request for property myns:Widget to 
- * the getWidget() method in the concrete class (if getWidget() is not 
- * defined, a fault is thrown at initialization time).
- * <br><br>
- * This class allows users to implement their capabilities' properties 
- * using simple getter/setter logic (like a traditional Java bean) or 
- * more complicated APIs, but they do not have to worry about the XML and 
- * spec restrictions that are needed to implement WSRP operations. The 
- * combination of the getter/setter methods and the WSRP document schema 
- * gives this class everything it needs to transform Java beans into the 
- * foundation for WSRP.
- *
- * @author Dan Jemiolo (danj)
- *
- */
-public abstract class AbstractWsResourceCapability 
-    extends AbstractCapability implements WsResourceCapability
-{
-    //
-    // Used to look up all error messages
-    //
-    private static Messages _MESSAGES = MessagesFactory.get(AbstractWsResourceCapability.class);
-    
-    private static final QName[] _NO_PROPERTIES = new QName[0];
-
-    private static final Element[] _NO_VALUES = new Element[0];
-    
-    //
-    // the Java getXXX methods for all resource properties
-    //
-    private Map _gettersByQName = new HashMap();
-    
-    //
-    // the Java setXXX methods for all resource properties THAT 
-    // PROVIDE WRITE ACCESS
-    //
-    private Map _settersByQName = new HashMap();
-    
-    protected void createGettersAndSetters(QName propertyName)
-    {
-        Class theClass = getClass();
-        
-        //
-        // get the local name of the property - namespace is not 
-        // referenced in the Java method name
-        //
-        String name = propertyName.getLocalPart();
-        name = Character.toUpperCase(name.charAt(0)) + name.substring(1);
-        
-        String getName = "get" + name;
-        String setName = "set" + name;
-        
-        //
-        // find the getXXX method, which must have zero params and 
-        // a non-void return type
-        //
-        
-        Method getMethod = null;
-        
-        try
-        {
-            getMethod = theClass.getMethod(getName, new Class[0]);
-        }
-        
-        catch (Throwable error)
-        {
-            Object[] filler = { theClass.getName(), getName, propertyName };
-            throw new RuntimeException(_MESSAGES.get("NoGetter", filler));
-        }
-        
-        //
-        // make sure getter isn't returning void
-        //
-        if (getMethod.getReturnType() == void.class)
-        {
-            Object[] filler = { theClass.getName(), getName, propertyName };
-            throw new RuntimeException(_MESSAGES.get("NoVoidGetters", filler));
-        }
-        
-        _gettersByQName.put(propertyName, getMethod);
-        
-        //
-        // find the setXXX method, which must take on param and 
-        // can have any return type (will be ignored by this class)
-        //
-        
-        Method setMethod = ReflectUtils.getFirstMethod(theClass, setName);
-        
-        if (setMethod != null)
-        {
-            Class[] paramTypes = setMethod.getParameterTypes();
-            
-            //
-            // the setXXX method has to have one parameter - for the 
-            // parameter value
-            //
-            if (paramTypes.length != 1)
-            {
-                Object[] filler = { theClass.getName(), setName, propertyName };
-                throw new RuntimeException(_MESSAGES.get("SettersOneParam", filler));
-            }
-            
-            _settersByQName.put(propertyName, setMethod);
-        }
-    }
-    
-    public void deleteProperty(QName propertyQName) 
-        throws BaseFault
-    {
-        //
-        // 'update' with null value
-        //
-        Method method = getSetter(propertyQName);
-        invokeMethod(method, new Object[]{ null });
-    }
-    
-    private Object deserializeValue(Serializer ser, Element value)
-        throws BaseFault
-    {
-        try
-        {
-            return ser.fromXML(value);
-        }
-        
-        catch (SoapFault error)
-        {
-            throw WsbfUtils.convertToFault(error);
-        }
-    }
-    
-    protected Method getGetter(QName propertyQName)
-    {
-        return (Method)_gettersByQName.get(propertyQName);
-    }
-    
-    public Element[] getProperty(QName propertyQName) 
-        throws BaseFault
-    {
-        Method method = getGetter(propertyQName);
-        Object result = invokeMethod(method, null);
-        return getPropertyElements(propertyQName, result);
-    }
-    
-    /**
-     * 
-     * @param name
-     * @param value
-     * 
-     * @return The XML representation of the resource property value(s).
-     *
-     */
-    protected Element[] getPropertyElements(QName name, Object value)
-        throws BaseFault
-    {
-        //
-        // in this case, we have to determine if there IS a property 
-        // and it's null, or there is no property
-        //
-        if (value == null)
-        {
-            ResourcePropertyCollection props = getWsResource().getPropertyCollection();
-            
-            //
-            // property is nillable - we say it exists. not 100% accurate, 
-            // but as close as we're going to get
-            //
-            if (props.getSchema().isNillable(name))
-                return new Element[]{ XmlUtils.createElement(name) };
-            
-            //
-            // not nillable - must not exist
-            //
-            return _NO_VALUES;
-        }
-        
-        //
-        // in all other cases, we determine the type of the property 
-        // values and use that to serialize into XML
-        //
-        Object valuesArray = null;
-        Class type = null;
-        
-        if (value.getClass().isArray())
-        {
-            valuesArray = value;
-            type = ReflectUtils.getClassFromArrayClass(value.getClass());
-        }
-        
-        else
-        {
-            valuesArray = new Object[]{ value };
-            type = value.getClass();
-        }
-
-        int length = Array.getLength(valuesArray);
-        Element[] properties = new Element[length];
-        
-        SerializerRegistry registry = SerializerRegistry.getInstance();
-        Serializer ser = registry.getSerializer(type);
-        
-        for (int n = 0; n < length; ++n)
-            properties[n] = serializeValue(ser, Array.get(valuesArray, n), name);
-        
-        return properties;
-    }
-    
-    public QName[] getPropertyNames()
-    {
-        return _NO_PROPERTIES;
-    }
-    
-    protected Method getSetter(QName propertyQName)
-    {
-        return (Method)_settersByQName.get(propertyQName);
-    }
-    
-    public WsResource getWsResource()
-    {
-        return (WsResource)getResource();
-    }
-
-    /**
-     * 
-     * {@inheritDoc}
-     * <br><br>
-     * AbstractWsResourceCapability continues the initialization process 
-     * by inspecting the concrete class to find all of the getters (and, 
-     * if applicable, setters) for its resource properties. It then 
-     * registers itself with the resource's WSRP collection so that read 
-     * and write requests for its properties are delegated to it.
-     * 
-     */
-    public void initialize() 
-        throws SoapFault
-    {
-        super.initialize();
-        
-        QName[] propertyNames = getPropertyNames();
-        
-        //
-        // make sure we have appropriate getter/setter methods
-        //
-        for (int n = 0; n < propertyNames.length; ++n)
-            createGettersAndSetters(propertyNames[n]);
-        
-        //
-        // tell WSRP container about us - all read/write requests for 
-        // our properties will now be sent to us
-        //
-        ResourcePropertyCollection props = getWsResource().getPropertyCollection();
-        props.addCapability(this);
-    }
-
-    public void insertProperty(QName propertyQName, Element[] values) 
-        throws BaseFault
-    {
-        //
-        // make one big array with the current values and the new values, 
-        // and then 'update' with this new array
-        //
-        Element[] current = getProperty(propertyQName);
-        Element[] all = new Element[current.length + values.length];
-        System.arraycopy(current, 0, all, 0, current.length);
-        System.arraycopy(values, 0, all, current.length, values.length);
-        
-        updateProperty(propertyQName, all);
-    }
-
-    protected Object invokeMethod(Method method, Object[] params)
-        throws BaseFault
-    {
-        Object result = null;
-        
-        try
-        {
-            result = method.invoke(this, params);
-        }
-        
-        catch (Throwable error)
-        {
-            Throwable cause = error.getCause();
-            
-            if (cause != null)
-                error = cause;
-            
-            throw WsbfUtils.convertToFault(error);
-        }
-        
-        return result;
-    }
-
-    private Element serializeValue(Serializer ser, Object value, QName name)
-        throws BaseFault
-    {
-        try
-        {
-            return ser.toXML(value, name);
-        }
-        
-        catch (SoapFault error)
-        {
-            throw WsbfUtils.convertToFault(error);
-        }
-    }
-
-    public void setResource(Resource resource)
-    {
-        Class theClass = resource.getClass();
-        
-        //
-        // sanity check - only ws-resources should use ws-rf
-        //
-        if (!WsResource.class.isAssignableFrom(theClass))
-        {
-            Object[] filler = { theClass, WsResource.class };
-            throw new RuntimeException(_MESSAGES.get("NotWSRF", filler));
-        }
-        
-        super.setResource(resource);
-    }
-    
-    public void updateProperty(QName propertyQName, Element[] values) 
-        throws BaseFault
-    {
-        Method method = getSetter(propertyQName);
-        
-        //
-        // sanity check - make sure sets are allowed
-        //
-        if (method == null)
-        {
-            Object[] filler = { getClass(), propertyQName };
-            throw new RuntimeException(_MESSAGES.get("NoSetter", filler));
-        }
-        
-        Class[] paramTypes = method.getParameterTypes();
-        boolean isArray = paramTypes[0].isArray();
-        
-        Object[] params = new Object[1];
-        
-        //
-        // convert all values into POJOs before calling the setXXX method
-        //
-        SerializerRegistry registry = SerializerRegistry.getInstance();
-        
-        if (isArray)
-        {
-            Class theClass = ReflectUtils.getClassFromArrayClass(paramTypes[0]);
-            Serializer ser = registry.getSerializer(theClass);
-            
-            params[0] = Array.newInstance(theClass, values.length);
-            
-            for (int n = 0; n < values.length; ++n)
-                Array.set(params[0], n, deserializeValue(ser, values[n]));
-        }
-        
-        else
-        {
-            Serializer ser = registry.getSerializer(paramTypes[0]);
-            params[0] = deserializeValue(ser, values[0]);
-        }
-        
-        invokeMethod(method, params);
-    }
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.impl;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+
+import org.apache.muse.core.AbstractCapability;
+import org.apache.muse.core.Resource;
+import org.apache.muse.core.serializer.Serializer;
+import org.apache.muse.core.serializer.SerializerRegistry;
+import org.apache.muse.util.ReflectUtils;
+import org.apache.muse.util.messages.Messages;
+import org.apache.muse.util.messages.MessagesFactory;
+import org.apache.muse.util.xml.XmlUtils;
+import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.muse.ws.resource.WsResource;
+import org.apache.muse.ws.resource.WsResourceCapability;
+import org.apache.muse.ws.resource.basefaults.BaseFault;
+import org.apache.muse.ws.resource.basefaults.WsbfUtils;
+import org.apache.muse.ws.resource.properties.ResourcePropertyCollection;
+
+/**
+ * 
+ * AbstractWsResourceCapability is a foundation for user-defined capabilities 
+ * for WSRF-based resources. It builds on the utilities of its 
+ * {@linkplain AbstractCapability parent class} by providing the plumbing 
+ * code needed to map WSRP requests to getter/setter methods in the 
+ * concrete capability class. For example, it provides the logic needed to 
+ * map a WSRP GetResourceProperty request for property myns:Widget to 
+ * the getWidget() method in the concrete class (if getWidget() is not 
+ * defined, a fault is thrown at initialization time).
+ * <br><br>
+ * This class allows users to implement their capabilities' properties 
+ * using simple getter/setter logic (like a traditional Java bean) or 
+ * more complicated APIs, but they do not have to worry about the XML and 
+ * spec restrictions that are needed to implement WSRP operations. The 
+ * combination of the getter/setter methods and the WSRP document schema 
+ * gives this class everything it needs to transform Java beans into the 
+ * foundation for WSRP.
+ *
+ * @author Dan Jemiolo (danj)
+ *
+ */
+public abstract class AbstractWsResourceCapability 
+    extends AbstractCapability implements WsResourceCapability
+{
+    //
+    // Used to look up all error messages
+    //
+    private static Messages _MESSAGES = MessagesFactory.get(AbstractWsResourceCapability.class);
+    
+    private static final QName[] _NO_PROPERTIES = new QName[0];
+
+    private static final Element[] _NO_VALUES = new Element[0];
+    
+    //
+    // the Java getXXX methods for all resource properties
+    //
+    private Map _gettersByQName = new HashMap();
+    
+    //
+    // the Java setXXX methods for all resource properties THAT 
+    // PROVIDE WRITE ACCESS
+    //
+    private Map _settersByQName = new HashMap();
+    
+    protected void createGettersAndSetters(QName propertyName)
+    {
+        Class theClass = getClass();
+        
+        //
+        // get the local name of the property - namespace is not 
+        // referenced in the Java method name
+        //
+        String name = propertyName.getLocalPart();
+        name = Character.toUpperCase(name.charAt(0)) + name.substring(1);
+        
+        String getName = "get" + name;
+        String setName = "set" + name;
+        
+        //
+        // find the getXXX method, which must have zero params and 
+        // a non-void return type
+        //
+        
+        Method getMethod = null;
+        
+        try
+        {
+            getMethod = theClass.getMethod(getName, new Class[0]);
+        }
+        
+        catch (Throwable error)
+        {
+            Object[] filler = { theClass.getName(), getName, propertyName };
+            throw new RuntimeException(_MESSAGES.get("NoGetter", filler));
+        }
+        
+        //
+        // make sure getter isn't returning void
+        //
+        if (getMethod.getReturnType() == void.class)
+        {
+            Object[] filler = { theClass.getName(), getName, propertyName };
+            throw new RuntimeException(_MESSAGES.get("NoVoidGetters", filler));
+        }
+        
+        _gettersByQName.put(propertyName, getMethod);
+        
+        //
+        // find the setXXX method, which must take on param and 
+        // can have any return type (will be ignored by this class)
+        //
+        
+        Method setMethod = ReflectUtils.getFirstMethod(theClass, setName);
+        
+        if (setMethod != null)
+        {
+            Class[] paramTypes = setMethod.getParameterTypes();
+            
+            //
+            // the setXXX method has to have one parameter - for the 
+            // parameter value
+            //
+            if (paramTypes.length != 1)
+            {
+                Object[] filler = { theClass.getName(), setName, propertyName };
+                throw new RuntimeException(_MESSAGES.get("SettersOneParam", filler));
+            }
+            
+            _settersByQName.put(propertyName, setMethod);
+        }
+    }
+    
+    public void deleteProperty(QName propertyQName) 
+        throws BaseFault
+    {
+        //
+        // 'update' with null value
+        //
+        Method method = getSetter(propertyQName);
+        invokeMethod(method, new Object[]{ null });
+    }
+    
+    private Object deserializeValue(Serializer ser, Element value)
+        throws BaseFault
+    {
+        try
+        {
+            return ser.fromXML(value);
+        }
+        
+        catch (SoapFault error)
+        {
+            throw WsbfUtils.convertToFault(error);
+        }
+    }
+    
+    protected Method getGetter(QName propertyQName)
+    {
+        return (Method)_gettersByQName.get(propertyQName);
+    }
+    
+    public Element[] getProperty(QName propertyQName) 
+        throws BaseFault
+    {
+        Method method = getGetter(propertyQName);
+        Object result = invokeMethod(method, null);
+        return getPropertyElements(propertyQName, result);
+    }
+    
+    /**
+     * 
+     * @param name
+     * @param value
+     * 
+     * @return The XML representation of the resource property value(s).
+     *
+     */
+    protected Element[] getPropertyElements(QName name, Object value)
+        throws BaseFault
+    {
+        //
+        // in this case, we have to determine if there IS a property 
+        // and it's null, or there is no property
+        //
+        if (value == null)
+        {
+            ResourcePropertyCollection props = getWsResource().getPropertyCollection();
+            
+            //
+            // property is nillable - we say it exists. not 100% accurate, 
+            // but as close as we're going to get
+            //
+            if (props.getSchema().isNillable(name))
+                return new Element[]{ XmlUtils.createElement(name) };
+            
+            //
+            // not nillable - must not exist
+            //
+            return _NO_VALUES;
+        }
+        
+        //
+        // in all other cases, we determine the type of the property 
+        // values and use that to serialize into XML
+        //
+        Object valuesArray = null;
+        Class type = null;
+        
+        if (value.getClass().isArray())
+        {
+            valuesArray = value;
+            type = ReflectUtils.getClassFromArrayClass(value.getClass());
+        }
+        
+        else
+        {
+            valuesArray = new Object[]{ value };
+            type = value.getClass();
+        }
+
+        int length = Array.getLength(valuesArray);
+        Element[] properties = new Element[length];
+        
+        SerializerRegistry registry = SerializerRegistry.getInstance();
+        Serializer ser = registry.getSerializer(type);
+        
+        for (int n = 0; n < length; ++n)
+            properties[n] = serializeValue(ser, Array.get(valuesArray, n), name);
+        
+        return properties;
+    }
+    
+    public QName[] getPropertyNames()
+    {
+        return _NO_PROPERTIES;
+    }
+    
+    protected Method getSetter(QName propertyQName)
+    {
+        return (Method)_settersByQName.get(propertyQName);
+    }
+    
+    public WsResource getWsResource()
+    {
+        return (WsResource)getResource();
+    }
+
+    /**
+     * 
+     * {@inheritDoc}
+     * <br><br>
+     * AbstractWsResourceCapability continues the initialization process 
+     * by inspecting the concrete class to find all of the getters (and, 
+     * if applicable, setters) for its resource properties. It then 
+     * registers itself with the resource's WSRP collection so that read 
+     * and write requests for its properties are delegated to it.
+     * 
+     */
+    public void initialize() 
+        throws SoapFault
+    {
+        super.initialize();
+        
+        QName[] propertyNames = getPropertyNames();
+        
+        //
+        // make sure we have appropriate getter/setter methods
+        //
+        for (int n = 0; n < propertyNames.length; ++n)
+            createGettersAndSetters(propertyNames[n]);
+        
+        //
+        // tell WSRP container about us - all read/write requests for 
+        // our properties will now be sent to us
+        //
+        ResourcePropertyCollection props = getWsResource().getPropertyCollection();
+        props.addCapability(this);
+    }
+
+    public void insertProperty(QName propertyQName, Element[] values) 
+        throws BaseFault
+    {
+        //
+        // make one big array with the current values and the new values, 
+        // and then 'update' with this new array
+        //
+        Element[] current = getProperty(propertyQName);
+        Element[] all = new Element[current.length + values.length];
+        System.arraycopy(current, 0, all, 0, current.length);
+        System.arraycopy(values, 0, all, current.length, values.length);
+        
+        updateProperty(propertyQName, all);
+    }
+
+    protected Object invokeMethod(Method method, Object[] params)
+        throws BaseFault
+    {
+        Object result = null;
+        
+        try
+        {
+            result = method.invoke(this, params);
+        }
+        
+        catch (Throwable error)
+        {
+            Throwable cause = error.getCause();
+            
+            if (cause != null)
+                error = cause;
+            
+            throw WsbfUtils.convertToFault(error);
+        }
+        
+        return result;
+    }
+
+    private Element serializeValue(Serializer ser, Object value, QName name)
+        throws BaseFault
+    {
+        try
+        {
+            return ser.toXML(value, name);
+        }
+        
+        catch (SoapFault error)
+        {
+            throw WsbfUtils.convertToFault(error);
+        }
+    }
+
+    public void setResource(Resource resource)
+    {
+        Class theClass = resource.getClass();
+        
+        //
+        // sanity check - only ws-resources should use ws-rf
+        //
+        if (!WsResource.class.isAssignableFrom(theClass))
+        {
+            Object[] filler = { theClass, WsResource.class };
+            throw new RuntimeException(_MESSAGES.get("NotWSRF", filler));
+        }
+        
+        super.setResource(resource);
+    }
+    
+    public void updateProperty(QName propertyQName, Element[] values) 
+        throws BaseFault
+    {
+        Method method = getSetter(propertyQName);
+        
+        //
+        // sanity check - make sure sets are allowed
+        //
+        if (method == null)
+        {
+            Object[] filler = { getClass(), propertyQName };
+            throw new RuntimeException(_MESSAGES.get("NoSetter", filler));
+        }
+        
+        Class[] paramTypes = method.getParameterTypes();
+        boolean isArray = paramTypes[0].isArray();
+        
+        Object[] params = new Object[1];
+        
+        //
+        // convert all values into POJOs before calling the setXXX method
+        //
+        SerializerRegistry registry = SerializerRegistry.getInstance();
+        
+        if (isArray)
+        {
+            Class theClass = ReflectUtils.getClassFromArrayClass(paramTypes[0]);
+            Serializer ser = registry.getSerializer(theClass);
+            
+            params[0] = Array.newInstance(theClass, values.length);
+            
+            for (int n = 0; n < values.length; ++n)
+                Array.set(params[0], n, deserializeValue(ser, values[n]));
+        }
+        
+        else
+        {
+            Serializer ser = registry.getSerializer(paramTypes[0]);
+            params[0] = deserializeValue(ser, values[0]);
+        }
+        
+        invokeMethod(method, params);
+    }
+}

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/SimpleWsResource.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/SimpleWsResource.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/SimpleWsResource.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/SimpleWsResource.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/WsResourceRouter.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/WsResourceRouter.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/WsResourceRouter.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/WsResourceRouter.java Sat Mar 24 06:21:51 2007
@@ -1,50 +1,54 @@
-/*=============================================================================*
- *  Copyright 2007 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.muse.ws.resource.impl;
-
-import org.apache.muse.core.Resource;
-import org.apache.muse.core.routing.SimpleResourceRouter;
-import org.apache.muse.ws.addressing.soap.SoapFault;
-import org.apache.muse.ws.resource.faults.ResourceUnknownFault;
-
-/**
- *
- * WsResourceRouter is a sub-class of SimpleResourceRouter that wraps all 
- * WS-A DestinationUnreachable faults in a WS-RF ResourceUnknownFault. These 
- * two faults have the same functional role, but WS-RF messages advertise 
- * the ResourceUnknownFault, so we use it instead of the WS-A fault.
- *
- * @author Dan Jemiolo (danj)
- *
- */
-
-public class WsResourceRouter extends SimpleResourceRouter
-{
-    protected Resource getTargetResource()
-        throws SoapFault
-    {
-        try
-        {
-            return super.getTargetResource();
-        }
-        
-        catch (SoapFault error)
-        {
-            throw new ResourceUnknownFault(error);
-        }
-    }
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.impl;
+
+import org.apache.muse.core.Resource;
+import org.apache.muse.core.routing.SimpleResourceRouter;
+import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.muse.ws.resource.faults.ResourceUnknownFault;
+
+/**
+ *
+ * WsResourceRouter is a sub-class of SimpleResourceRouter that wraps all 
+ * WS-A DestinationUnreachable faults in a WS-RF ResourceUnknownFault. These 
+ * two faults have the same functional role, but WS-RF messages advertise 
+ * the ResourceUnknownFault, so we use it instead of the WS-A fault.
+ *
+ * @author Dan Jemiolo (danj)
+ *
+ */
+
+public class WsResourceRouter extends SimpleResourceRouter
+{
+    protected Resource getTargetResource()
+        throws SoapFault
+    {
+        try
+        {
+            return super.getTargetResource();
+        }
+        
+        catch (SoapFault error)
+        {
+            throw new ResourceUnknownFault(error);
+        }
+    }
+}

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SetTerminationTime.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SetTerminationTime.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SetTerminationTime.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SetTerminationTime.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.lifetime.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SetTerminationTimeHandler.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SetTerminationTimeHandler.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SetTerminationTimeHandler.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SetTerminationTimeHandler.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.lifetime.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SetTerminationTimeResponse.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SetTerminationTimeResponse.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SetTerminationTimeResponse.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SetTerminationTimeResponse.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.lifetime.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SimpleImmediateTermination.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SimpleImmediateTermination.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SimpleImmediateTermination.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SimpleImmediateTermination.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.lifetime.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SimpleScheduledTermination.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SimpleScheduledTermination.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SimpleScheduledTermination.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/lifetime/impl/SimpleScheduledTermination.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.lifetime.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/ExternalChangeApprover.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/ExternalChangeApprover.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/ExternalChangeApprover.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/ExternalChangeApprover.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.metadata.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/InsertOnlyApprover.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/InsertOnlyApprover.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/InsertOnlyApprover.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/InsertOnlyApprover.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.metadata.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/PropertyMetadata.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/PropertyMetadata.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/PropertyMetadata.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/PropertyMetadata.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.metadata.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/ReadOnlyApprover.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/ReadOnlyApprover.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/ReadOnlyApprover.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/ReadOnlyApprover.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.metadata.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.metadata.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/StaticValuesApprover.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/StaticValuesApprover.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/StaticValuesApprover.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/StaticValuesApprover.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.metadata.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/ValidValuesApprover.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/ValidValuesApprover.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/ValidValuesApprover.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/ValidValuesApprover.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.metadata.impl;
 

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/WsrmdUtils.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/WsrmdUtils.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/WsrmdUtils.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/WsrmdUtils.java Sat Mar 24 06:21:51 2007
@@ -1,84 +1,88 @@
-/*=============================================================================*
- *  Copyright 2006 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.muse.ws.resource.metadata.impl;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import org.apache.muse.util.xml.XmlUtils;
-import org.apache.muse.ws.resource.metadata.MetadataDescriptor;
-import org.apache.muse.ws.resource.metadata.WsrmdConstants;
-
-/**
- * 
- * WsrmdUtils is a set of convenience methods related to WS-RMD 1.0.
- *
- * @author Dan Jemiolo (danj)
- *
- */
-
-public class WsrmdUtils
-{
-    /**
-     * 
-     * This method serializes the given descriptor into XML and then wraps 
-     * it in a wsrmd:Definitions element so it can be written or published 
-     * as a valid WSRMD document.
-     * 
-     * @param rmd
-     * 
-     * @return The XML for the given MetadataDescriptor, wrapped in a 
-     *         wsrmd:Definitions element.
-     *         
-     */
-    public static Element createMetadataDocument(MetadataDescriptor rmd)
-    {
-        Element root = XmlUtils.createElement(WsrmdConstants.DEFINITIONS_QNAME);
-        Element rmdXML = rmd.toXML();
-        root.appendChild(rmdXML);
-        return root;
-    }
-    
-    /**
-     * 
-     * @param rmd
-     *        An XML document containing a root element named wsrmd:Definitions.
-     *        
-     * @param name
-     *        The value of the <em>name</em> attribute for the desired 
-     *        metadata descriptor.
-     *        
-     * @return The metadata descriptor in the document that has the given name, 
-     *         or null if the name is not found.
-     *
-     */
-    public static Element getMetadataDescriptor(Document rmd, String name)
-    {
-        Element root = XmlUtils.getFirstElement(rmd);  // wsrmd:Definitions
-        Element[] descriptors = XmlUtils.getElements(root, WsrmdConstants.DESCRIPTOR_QNAME);
-        
-        for (int n = 0; n < descriptors.length; ++n)
-        {
-            String nextAttr = descriptors[n].getAttribute(WsrmdConstants.NAME);
-            
-            if (nextAttr != null && nextAttr.equals(name))
-                return descriptors[n];
-        }
-        
-        return null;
-    }
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.muse.ws.resource.metadata.impl;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import org.apache.muse.util.xml.XmlUtils;
+import org.apache.muse.ws.resource.metadata.MetadataDescriptor;
+import org.apache.muse.ws.resource.metadata.WsrmdConstants;
+
+/**
+ * 
+ * WsrmdUtils is a set of convenience methods related to WS-RMD 1.0.
+ *
+ * @author Dan Jemiolo (danj)
+ *
+ */
+
+public class WsrmdUtils
+{
+    /**
+     * 
+     * This method serializes the given descriptor into XML and then wraps 
+     * it in a wsrmd:Definitions element so it can be written or published 
+     * as a valid WSRMD document.
+     * 
+     * @param rmd
+     * 
+     * @return The XML for the given MetadataDescriptor, wrapped in a 
+     *         wsrmd:Definitions element.
+     *         
+     */
+    public static Element createMetadataDocument(MetadataDescriptor rmd)
+    {
+        Element root = XmlUtils.createElement(WsrmdConstants.DEFINITIONS_QNAME);
+        Element rmdXML = rmd.toXML();
+        root.appendChild(rmdXML);
+        return root;
+    }
+    
+    /**
+     * 
+     * @param rmd
+     *        An XML document containing a root element named wsrmd:Definitions.
+     *        
+     * @param name
+     *        The value of the <em>name</em> attribute for the desired 
+     *        metadata descriptor.
+     *        
+     * @return The metadata descriptor in the document that has the given name, 
+     *         or null if the name is not found.
+     *
+     */
+    public static Element getMetadataDescriptor(Document rmd, String name)
+    {
+        Element root = XmlUtils.getFirstElement(rmd);  // wsrmd:Definitions
+        Element[] descriptors = XmlUtils.getElements(root, WsrmdConstants.DESCRIPTOR_QNAME);
+        
+        for (int n = 0; n < descriptors.length; ++n)
+        {
+            String nextAttr = descriptors[n].getAttribute(WsrmdConstants.NAME);
+            
+            if (nextAttr != null && nextAttr.equals(name))
+                return descriptors[n];
+        }
+        
+        return null;
+    }
+}

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/properties/get/impl/GetDocumentHandler.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/properties/get/impl/GetDocumentHandler.java?view=diff&rev=522023&r1=522022&r2=522023
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/properties/get/impl/GetDocumentHandler.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/properties/get/impl/GetDocumentHandler.java Sat Mar 24 06:21:51 2007
@@ -1,18 +1,22 @@
-/*=============================================================================*
- *  Copyright 2006 The Apache Software Foundation
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
  *
- *  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.muse.ws.resource.properties.get.impl;
 



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