wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r819209 - in /incubator/wink/trunk: wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/xml/ wink-server/src/test/java/org/apache/wink/server/ wink-server/src/test/resources/org/apache/wink/server/categories/ wink-ser...
Date Sat, 26 Sep 2009 20:47:50 GMT
Author: bluk
Date: Sat Sep 26 20:47:49 2009
New Revision: 819209

URL: http://svn.apache.org/viewvc?rev=819209&view=rev
Log:
Remove service doc from default XmlFormattingOptions

See [WINK-202]

Modified:
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/xml/XMLFormattingOptionsProvider.java
    incubator/wink/trunk/wink-server/src/test/java/org/apache/wink/server/AbstractResourceBeanTest.java
    incubator/wink/trunk/wink-server/src/test/java/org/apache/wink/server/AbstractResourceWithDuplicateWorkspaceTest.java
    incubator/wink/trunk/wink-server/src/test/resources/org/apache/wink/server/categories/collection_categories_document.xml
    incubator/wink/trunk/wink-server/src/test/resources/org/apache/wink/server/internal/providers/entity/atom_categories_document.xml

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/xml/XMLFormattingOptionsProvider.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/xml/XMLFormattingOptionsProvider.java?rev=819209&r1=819208&r2=819209&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/xml/XMLFormattingOptionsProvider.java
(original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/xml/XMLFormattingOptionsProvider.java
Sat Sep 26 20:47:49 2009
@@ -25,8 +25,6 @@
 import javax.ws.rs.ext.Provider;
 
 import org.apache.wink.common.model.XmlFormattingOptions;
-import org.apache.wink.common.model.app.AppCategories;
-import org.apache.wink.common.model.app.AppService;
 import org.apache.wink.common.model.atom.AtomEntry;
 import org.apache.wink.common.model.atom.AtomFeed;
 
@@ -39,8 +37,6 @@
     public XMLFormattingOptionsProvider() {
         classesWithDefault.add(AtomFeed.class);
         classesWithDefault.add(AtomEntry.class);
-        classesWithDefault.add(AppCategories.class);
-        classesWithDefault.add(AppService.class);
     }
 
     public XmlFormattingOptions getContext(Class<?> type) {

Modified: incubator/wink/trunk/wink-server/src/test/java/org/apache/wink/server/AbstractResourceBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/test/java/org/apache/wink/server/AbstractResourceBeanTest.java?rev=819209&r1=819208&r2=819209&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/test/java/org/apache/wink/server/AbstractResourceBeanTest.java
(original)
+++ incubator/wink/trunk/wink-server/src/test/java/org/apache/wink/server/AbstractResourceBeanTest.java
Sat Sep 26 20:47:49 2009
@@ -112,14 +112,14 @@
     private static final String EXPECTED_SERVICE_COLLECTION    = "expected service collection";
 
     private static final String EXPECTED_SERVICE_DOCUMENT      =
-                                                                   "<service xmlns:atom=\"http://www.w3.org/2005/Atom\"
xmlns=\"http://www.w3.org/2007/app\">\n" + "    <workspace>\n"
-                                                                       + "        <atom:title>Services
Workspace Title</atom:title>\n"
-                                                                       + "        <collection
href=\"http://localhost:80/services/workspaceAndTitle\">\n"
-                                                                       + "            <atom:title>Services
Collection Title</atom:title>\n"
-                                                                       + "            <accept/>\n"
-                                                                       + "        </collection>\n"
-                                                                       + "    </workspace>\n"
-                                                                       + "</service>\n";
+                                                                   "<service xmlns:atom=\"http://www.w3.org/2005/Atom\"
xmlns=\"http://www.w3.org/2007/app\">" + "<workspace>"
+                                                                       + "<atom:title>Services
Workspace Title</atom:title>"
+                                                                       + "<collection
href=\"http://localhost:80/services/workspaceAndTitle\">"
+                                                                       + "<atom:title>Services
Collection Title</atom:title>"
+                                                                       + "<accept/>"
+                                                                       + "</collection>"
+                                                                       + "</workspace>"
+                                                                       + "</service>";
 
     private static final String EXPECTED_SINGLE_ENTRY          = "expected single entry ";
 
@@ -205,8 +205,8 @@
         response = invoke(mockRequest);
         responseContent = response.getContentAsString();
         String msg =
-            TestUtils
-                .diffIgnoreUpdateWithAttributeQualifier(EXPECTED_SERVICE_DOCUMENT, responseContent);
+            TestUtils.diffIgnoreUpdateWithAttributeQualifier(EXPECTED_SERVICE_DOCUMENT,
+                                                             responseContent);
         assertNull(msg, msg);
     }
 

Modified: incubator/wink/trunk/wink-server/src/test/java/org/apache/wink/server/AbstractResourceWithDuplicateWorkspaceTest.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/test/java/org/apache/wink/server/AbstractResourceWithDuplicateWorkspaceTest.java?rev=819209&r1=819208&r2=819209&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/test/java/org/apache/wink/server/AbstractResourceWithDuplicateWorkspaceTest.java
(original)
+++ incubator/wink/trunk/wink-server/src/test/java/org/apache/wink/server/AbstractResourceWithDuplicateWorkspaceTest.java
Sat Sep 26 20:47:49 2009
@@ -46,15 +46,13 @@
             Set<Object> set = new HashSet<Object>();
             AbstractTestWithWorkspaceResource servicesCollectionWithWorskapce =
                 new AbstractTestWithWorkspaceResource();
-            servicesCollectionWithWorskapce
-                .setPath("/services/withWorkspace");
+            servicesCollectionWithWorskapce.setPath("/services/withWorkspace");
             servicesCollectionWithWorskapce.setCollectionTitle("Spring Collection");
             servicesCollectionWithWorskapce.setWorkspaceTitle("Spring Workspace");
 
             AbstractTestWithWorkspaceResource servicesCollectionWithoutWorskapce =
                 new AbstractTestWithWorkspaceResource();
-            servicesCollectionWithoutWorskapce
-                .setPath("/services/withoutWorkspace");
+            servicesCollectionWithoutWorskapce.setPath("/services/withoutWorkspace");
 
             set.add(servicesCollectionWithWorskapce);
             set.add(servicesCollectionWithoutWorskapce);
@@ -70,21 +68,21 @@
     private static final String EXPECTED_SERVICE_COLLECTION = "expected service collection
1";
 
     private static final String EXPECTED_SERVICE_DOCUMENT   =
-                                                                "<service xmlns:atom=\"http://www.w3.org/2005/Atom\"
xmlns=\"http://www.w3.org/2007/app\">\n" + "    <workspace>\n"
-                                                                    + "        <atom:title>Annotated
Workspace</atom:title>\n"
-                                                                    + "        <collection
href=\"http://localhost:80/services/withoutWorkspace\">\n"
-                                                                    + "            <atom:title>Annotated
Collection</atom:title>\n"
-                                                                    + "            <accept/>\n"
-                                                                    + "        </collection>\n"
-                                                                    + "    </workspace>\n"
-                                                                    + "    <workspace>\n"
-                                                                    + "        <atom:title>Spring
Workspace</atom:title>\n"
-                                                                    + "        <collection
href=\"http://localhost:80/services/withWorkspace\">\n"
-                                                                    + "            <atom:title>Spring
Collection</atom:title>\n"
-                                                                    + "            <accept/>\n"
-                                                                    + "        </collection>\n"
-                                                                    + "    </workspace>\n"
-                                                                    + "</service>\n";
+                                                                "<service xmlns:atom=\"http://www.w3.org/2005/Atom\"
xmlns=\"http://www.w3.org/2007/app\">" + "<workspace>"
+                                                                    + "<atom:title>Annotated
Workspace</atom:title>"
+                                                                    + "<collection href=\"http://localhost:80/services/withoutWorkspace\">"
+                                                                    + "<atom:title>Annotated
Collection</atom:title>"
+                                                                    + "<accept/>"
+                                                                    + "</collection>"
+                                                                    + "</workspace>"
+                                                                    + "<workspace>"
+                                                                    + "<atom:title>Spring
Workspace</atom:title>"
+                                                                    + "<collection href=\"http://localhost:80/services/withWorkspace\">"
+                                                                    + "<atom:title>Spring
Collection</atom:title>"
+                                                                    + "<accept/>"
+                                                                    + "</collection>"
+                                                                    + "</workspace>"
+                                                                    + "</service>";
 
     @Workspace(workspaceTitle = "Annotated Workspace", collectionTitle = "Annotated Collection")
     public static class AbstractTestWithWorkspaceResource extends AbstractDynamicResource
{
@@ -104,7 +102,8 @@
         MockHttpServletResponse response = invoke(mockRequest);
         String responseContent = response.getContentAsString();
         String msg =
-            TestUtils.diffIgnoreUpdateWithAttributeQualifier(EXPECTED_SERVICE_DOCUMENT, responseContent);
+            TestUtils.diffIgnoreUpdateWithAttributeQualifier(EXPECTED_SERVICE_DOCUMENT,
+                                                             responseContent);
         assertNull(msg, msg);
     }
 

Modified: incubator/wink/trunk/wink-server/src/test/resources/org/apache/wink/server/categories/collection_categories_document.xml
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/test/resources/org/apache/wink/server/categories/collection_categories_document.xml?rev=819209&r1=819208&r2=819209&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/test/resources/org/apache/wink/server/categories/collection_categories_document.xml
(original)
+++ incubator/wink/trunk/wink-server/src/test/resources/org/apache/wink/server/categories/collection_categories_document.xml
Sat Sep 26 20:47:49 2009
@@ -17,24 +17,5 @@
     specific language governing permissions and limitations
     under the License.
 -->
-
-<service xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://www.w3.org/2007/app">
-    <workspace>
-        <atom:title>Workspace</atom:title>
-        <collection href="http://localhost:80/cat">
-            <atom:title>Title</atom:title>
-            <accept/>
-            <categories href="http://localhost:80/categories/severity?alt=application%2Fatomcat%2Bxml"/>
-            <categories href="http://localhost:80/categories/severity?alt=application%2Fatomcat%2Bxml"/>
-            <categories scheme="urn:com:hp:qadefects:categories:status" fixed="yes">
-                <atom:category label="Assigned" scheme="urn:com:hp:qadefects:categories:status"
term="Assigned"/>
-                <atom:category label="Fixed" scheme="urn:com:hp:qadefects:categories:status"
term="Fixed"/>
-                <atom:category label="New" scheme="urn:com:hp:qadefects:categories:status"
term="New"/>
-                <atom:category label="Rejected" scheme="urn:com:hp:qadefects:categories:status"
term="Rejected"/>
-                <atom:category label="Deffered" scheme="urn:com:hp:qadefects:categories:status"
term="Deffered"/>
-                <atom:category term="Approved"/>
-            </categories>
-        </collection>
-    </workspace>
-</service>
+<service xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://www.w3.org/2007/app"><workspace><atom:title>Workspace</atom:title><collection
href="http://localhost:80/cat"><atom:title>Title</atom:title><accept/><categories
href="http://localhost:80/categories/severity?alt=application%2Fatomcat%2Bxml"/><categories
href="http://localhost:80/categories/severity?alt=application%2Fatomcat%2Bxml"/><categories
scheme="urn:com:hp:qadefects:categories:status" fixed="yes"><atom:category label="Assigned"
scheme="urn:com:hp:qadefects:categories:status" term="Assigned"/><atom:category label="Fixed"
scheme="urn:com:hp:qadefects:categories:status" term="Fixed"/><atom:category label="New"
scheme="urn:com:hp:qadefects:categories:status" term="New"/><atom:category label="Rejected"
scheme="urn:com:hp:qadefects:categories:status" term="Rejected"/><atom:category label="Deffered"
scheme="urn:com:hp:qadefects:categories:status" term="Deffered"/><atom:category term="Approved"/></categories></colle
 ction></workspace></service>
 

Modified: incubator/wink/trunk/wink-server/src/test/resources/org/apache/wink/server/internal/providers/entity/atom_categories_document.xml
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/test/resources/org/apache/wink/server/internal/providers/entity/atom_categories_document.xml?rev=819209&r1=819208&r2=819209&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/test/resources/org/apache/wink/server/internal/providers/entity/atom_categories_document.xml
(original)
+++ incubator/wink/trunk/wink-server/src/test/resources/org/apache/wink/server/internal/providers/entity/atom_categories_document.xml
Sat Sep 26 20:47:49 2009
@@ -17,10 +17,4 @@
     specific language governing permissions and limitations
     under the License.
 -->
-
-<categories scheme="urn:org.apache.wink.example.default.scheme" fixed="yes" xmlns="http://www.w3.org/2007/app">
-    <atom:category label="label0" scheme="urn:org.apache.wink.scheme0" term="term0" xmlns:atom="http://www.w3.org/2005/Atom"/>
-    <atom:category label="label1" scheme="urn:org.apache.wink.scheme1" term="term1" xmlns:atom="http://www.w3.org/2005/Atom"/>
-    <atom:category label="label2" scheme="urn:org.apache.wink.scheme2" term="term2" xmlns:atom="http://www.w3.org/2005/Atom"/>
-    <atom:category label="label3" scheme="urn:org.apache.wink.scheme3" term="term3" xmlns:atom="http://www.w3.org/2005/Atom"/>
-</categories>
+<categories scheme="urn:org.apache.wink.example.default.scheme" fixed="yes" xmlns="http://www.w3.org/2007/app"><atom:category
label="label0" scheme="urn:org.apache.wink.scheme0" term="term0" xmlns:atom="http://www.w3.org/2005/Atom"/><atom:category
label="label1" scheme="urn:org.apache.wink.scheme1" term="term1" xmlns:atom="http://www.w3.org/2005/Atom"/><atom:category
label="label2" scheme="urn:org.apache.wink.scheme2" term="term2" xmlns:atom="http://www.w3.org/2005/Atom"/><atom:category
label="label3" scheme="urn:org.apache.wink.scheme3" term="term3" xmlns:atom="http://www.w3.org/2005/Atom"/></categories>



Mime
View raw message