Add new builder base class to indicate support for "argument-less" construction.
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Thu, 13 Mar 2008 03:32:19 +0000 (03:32 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Thu, 13 Mar 2008 03:32:19 +0000 (03:32 +0000)
Move sig/enc object implementations out of lite build.

git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@473 de75baf8-a10c-0410-a50a-987c0e22f00f

13 files changed:
.cproject
xmltooling/ConcreteXMLObjectBuilder.h [new file with mode: 0644]
xmltooling/Makefile.am
xmltooling/XMLObjectBuilder.h
xmltooling/XMLToolingConfig.cpp
xmltooling/base.h
xmltooling/encryption/Encryption.h
xmltooling/security/CredentialContext.h
xmltooling/signature/KeyInfo.h
xmltooling/signature/Signature.h
xmltooling/soap/SOAP.h
xmltooling/xmltooling-lite.vcproj
xmltooling/xmltooling.vcproj

index ad22b26..8cb2825 100644 (file)
--- a/.cproject
+++ b/.cproject
@@ -1,7 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<?fileVersion 4.0.0?>\r
-\r
-<cproject>\r
+<?xml version="1.0" encoding="UTF-8"?><?fileVersion 4.0.0?><cproject>\r
 <storageModule moduleId="org.eclipse.cdt.core.settings">\r
 <cconfiguration id="converted.config.943130369">\r
 <storageModule moduleId="scannerConfiguration">\r
diff --git a/xmltooling/ConcreteXMLObjectBuilder.h b/xmltooling/ConcreteXMLObjectBuilder.h
new file mode 100644 (file)
index 0000000..41c1dbf
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ *  Copyright 2001-2007 Internet2
+ * 
+ * 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.
+ */
+
+/**
+ * @file xmltooling/ConcreteXMLObjectBuilder.h
+ * 
+ * Factory interface for concrete XMLObjects, supporting default construction. 
+ */
+
+#ifndef __xmltooling_concxmlobjbuilder_h__
+#define __xmltooling_concxmlobjbuilder_h__
+
+#include <xmltooling/XMLObjectBuilder.h>
+
+namespace xmltooling {
+
+    /**
+     * A factory interface for obtaining XMLObjects.
+     * Subclasses MAY supply additional factory methods.
+     */
+    class XMLTOOL_API ConcreteXMLObjectBuilder : public XMLObjectBuilder
+    {
+    public:
+        virtual ~ConcreteXMLObjectBuilder() {}
+
+        /**
+         * Creates an empty XMLObject with a defaulted element name and/or type.
+         * 
+         * @return the empty XMLObject
+         */
+        virtual XMLObject* buildObject() const=0;
+
+    protected:
+        ConcreteXMLObjectBuilder() {}
+    };
+
+};
+
+#endif /* __xmltooling_concxmlobjbuilder_h__ */
index d61b2ec..1a6cf05 100644 (file)
@@ -32,6 +32,7 @@ libxmltoolinginclude_HEADERS = \
        AbstractXMLObject.h \
        AttributeExtensibleXMLObject.h \
        base.h \
+       ConcreteXMLObjectBuilder.h \
        config_pub.h \
        ElementExtensibleXMLObject.h \
        ElementProxy.h \
@@ -126,6 +127,8 @@ xmlsec_sources = \
        encryption/impl/Decrypter.cpp \
        encryption/impl/EncryptedKeyResolver.cpp \
        encryption/impl/Encrypter.cpp \
+    encryption/impl/EncryptionImpl.cpp \
+    encryption/impl/EncryptionSchemaValidators.cpp \
        impl/MemoryStorageService.cpp \
        security/impl/AbstractPKIXTrustEngine.cpp \
        security/impl/BasicX509Credential.cpp \
@@ -141,6 +144,8 @@ xmlsec_sources = \
        security/impl/StaticPKIXTrustEngine.cpp \
        security/impl/TrustEngine.cpp \
        security/impl/XSECCryptoX509CRL.cpp \
+    signature/impl/KeyInfoImpl.cpp \
+    signature/impl/KeyInfoSchemaValidators.cpp \
        signature/impl/SignatureValidator.cpp \
        signature/impl/XMLSecSignatureImpl.cpp \
        soap/impl/CURLSOAPTransport.cpp \
@@ -167,15 +172,11 @@ common_sources = \
        unicode.cpp \
        XMLObjectBuilder.cpp \
        XMLToolingConfig.cpp \
-       encryption/impl/EncryptionImpl.cpp \
-       encryption/impl/EncryptionSchemaValidators.cpp \
        impl/AnyElement.cpp \
        impl/UnknownElement.cpp \
        io/AbstractXMLObjectMarshaller.cpp \
        io/AbstractXMLObjectUnmarshaller.cpp \
        io/HTTPRequest.cpp \
-       signature/impl/KeyInfoImpl.cpp \
-       signature/impl/KeyInfoSchemaValidators.cpp \
        soap/impl/SOAPClient.cpp \
        soap/impl/SOAPImpl.cpp \
        soap/impl/SOAPSchemaValidators.cpp \
index bc16bbc..80fa690 100644 (file)
@@ -17,7 +17,7 @@
 /**
  * @file xmltooling/XMLObjectBuilder.h
  * 
- * Factory interface for XMLObjects 
+ * Factory interface for XMLObjects.
  */
 
 #ifndef __xmltooling_xmlobjbuilder_h__
@@ -47,7 +47,7 @@ namespace xmltooling {
         
         /**
          * Creates an empty XMLObject with a particular element name.
-         * The results are undefined if localName is NULL or empty.
+         * <p>The results are undefined if localName is NULL or empty.
          * 
          * @param nsURI         namespace URI for element
          * @param localName     local name of element
index 82dbc8d..ee9cc3c 100644 (file)
@@ -65,8 +65,6 @@
 #endif
 
 using namespace soap11;
-using namespace xmlencryption;
-using namespace xmlsignature;
 using namespace xmltooling::logging;
 using namespace xmltooling;
 using namespace std;
@@ -82,6 +80,8 @@ DECL_XMLTOOLING_EXCEPTION_FACTORY(ValidationException,xmltooling);
 DECL_XMLTOOLING_EXCEPTION_FACTORY(IOException,xmltooling);
 
 #ifndef XMLTOOLING_NO_XMLSEC
+using namespace xmlencryption;
+using namespace xmlsignature;
     DECL_XMLTOOLING_EXCEPTION_FACTORY(XMLSecurityException,xmltooling);
     DECL_XMLTOOLING_EXCEPTION_FACTORY(SignatureException,xmlsignature);
     DECL_XMLTOOLING_EXCEPTION_FACTORY(EncryptionException,xmlencryption);
@@ -256,8 +256,6 @@ bool XMLToolingInternalConfig::init()
         // default registrations
         XMLObjectBuilder::registerDefaultBuilder(new UnknownElementBuilder());
 
-        registerKeyInfoClasses();
-        registerEncryptionClasses();
         registerSOAPClasses();
 
         REGISTER_XMLTOOLING_EXCEPTION_FACTORY(XMLParserException,xmltooling);
@@ -274,6 +272,8 @@ bool XMLToolingInternalConfig::init()
         REGISTER_XMLTOOLING_EXCEPTION_FACTORY(XMLSecurityException,xmltooling);
         REGISTER_XMLTOOLING_EXCEPTION_FACTORY(SignatureException,xmlsignature);
         REGISTER_XMLTOOLING_EXCEPTION_FACTORY(EncryptionException,xmlencryption);
+        registerKeyInfoClasses();
+        registerEncryptionClasses();
         registerKeyInfoResolvers();
         registerCredentialResolvers();
         registerTrustEngines();
index 76fdc50..4936a8a 100644 (file)
  */
 #define BEGIN_XMLOBJECTBUILDER(linkage,cname,namespaceURI,namespacePrefix) \
     XMLTOOLING_DOXYGEN(Builder for cname objects.) \
-    class linkage cname##Builder : public xmltooling::XMLObjectBuilder { \
+    class linkage cname##Builder : public xmltooling::ConcreteXMLObjectBuilder { \
     public: \
         virtual ~cname##Builder() {} \
         XMLTOOLING_DOXYGEN(Default builder.) \
  */
 #define BEGIN_XMLOBJECTBUILDER(linkage,cname,namespaceURI,namespacePrefix) \
     XMLTOOLING_DOXYGEN(Builder for cname objects.) \
-    class linkage cname##Builder : public xmltooling::XMLObjectBuilder { \
+    class linkage cname##Builder : public xmltooling::ConcreteXMLObjectBuilder { \
     public: \
         virtual ~cname##Builder() {} \
         XMLTOOLING_DOXYGEN(Default builder.) \
index 3c1ee40..c1fb590 100644 (file)
@@ -20,7 +20,7 @@
  * XMLObjects representing XML Encryption content
  */
 
-#ifndef __xmltooling_encryption_h__
+#if !defined(__xmltooling_encryption_h__) && !defined(XMLTOOLING_NO_XMLSEC)
 #define __xmltooling_encryption_h__
 
 #include <xmltooling/signature/KeyInfo.h>
index 4add335..7cd3abd 100644 (file)
@@ -17,7 +17,7 @@
 /**
  * @file xmltooling/security/CredentialContext.h
  * 
- * Marker interface for implementations which hold information specific to a\r
+ * Marker interface for implementations which hold information specific to a
  * particular context within which a CredentialResolver resolves a Credential.
  */
 
 
 namespace xmltooling {
 
-    /**\r
-     * Marker interface for implementations which hold information specific to a\r
-     * particular context within which a CredentialResolver resolves a Credential.\r
-     */\r
+    /**
+     * Marker interface for implementations which hold information specific to a
+     * particular context within which a CredentialResolver resolves a Credential.
+     */
     class XMLTOOL_API CredentialContext
     {
         MAKE_NONCOPYABLE(CredentialContext);
index d9382a8..931caa9 100644 (file)
  * and related content.
  */
 
-#ifndef __xmltooling_keyinfo_h__
+#if !defined(__xmltooling_keyinfo_h__) && !defined(XMLTOOLING_NO_XMLSEC)
 #define __xmltooling_keyinfo_h__
 
+#include <xmltooling/ConcreteXMLObjectBuilder.h>
 #include <xmltooling/ElementProxy.h>
-#include <xmltooling/XMLObjectBuilder.h>
 #include <xmltooling/util/XMLConstants.h>
 
 /**
index 4196295..77aabda 100644 (file)
@@ -23,8 +23,8 @@
 #if !defined(__xmltooling_sig_h__) && !defined(XMLTOOLING_NO_XMLSEC)
 #define __xmltooling_sig_h__
 
+#include <xmltooling/ConcreteXMLObjectBuilder.h>
 #include <xmltooling/exceptions.h>
-#include <xmltooling/XMLObjectBuilder.h>
 #include <xmltooling/signature/ContentReference.h>
 #include <xmltooling/util/XMLConstants.h>
 
index 031599b..ff2de77 100644 (file)
@@ -23,8 +23,8 @@
 #ifndef __xmltooling_soap_h__
 #define __xmltooling_soap_h__
 
+#include <xmltooling/ConcreteXMLObjectBuilder.h>
 #include <xmltooling/ElementProxy.h>
-#include <xmltooling/XMLObjectBuilder.h>
 #include <xmltooling/util/XMLConstants.h>
 #include <xercesc/util/XMLUniDefs.hpp>
 
@@ -51,13 +51,13 @@ namespace soap11 {
         /** Sets the QName content of the element. */
         virtual void setCode(const xmltooling::QName* qname)=0;
         /** Client Fault code. **/
-        static xmltooling::QName CLIENT;\r
-        /** Server Fault code. **/\r
-        static xmltooling::QName SERVER;\r
-        /** MustUnderstand Fault code. **/\r
-        static xmltooling::QName MUSTUNDERSTAND;\r
-        /** Version Mismatch Fault code. **/\r
-        static xmltooling::QName VERSIONMISMATCH;\r
+        static xmltooling::QName CLIENT;
+        /** Server Fault code. **/
+        static xmltooling::QName SERVER;
+        /** MustUnderstand Fault code. **/
+        static xmltooling::QName MUSTUNDERSTAND;
+        /** Version Mismatch Fault code. **/
+        static xmltooling::QName VERSIONMISMATCH;
     END_XMLOBJECT;
 
     BEGIN_XMLOBJECT(XMLTOOL_API,Detail,xmltooling::ElementProxy,SOAP 1.1 detail element);
index a13eaf8..f98c241 100644 (file)
                                </File>\r
                        </Filter>\r
                        <Filter\r
-                               Name="signature"\r
-                               >\r
-                               <Filter\r
-                                       Name="impl"\r
-                                       >\r
-                                       <File\r
-                                               RelativePath=".\signature\impl\KeyInfoImpl.cpp"\r
-                                               >\r
-                                       </File>\r
-                                       <File\r
-                                               RelativePath=".\signature\impl\KeyInfoSchemaValidators.cpp"\r
-                                               >\r
-                                       </File>\r
-                               </Filter>\r
-                       </Filter>\r
-                       <Filter\r
-                               Name="encryption"\r
-                               >\r
-                               <Filter\r
-                                       Name="impl"\r
-                                       >\r
-                                       <File\r
-                                               RelativePath=".\encryption\impl\EncryptionImpl.cpp"\r
-                                               >\r
-                                       </File>\r
-                                       <File\r
-                                               RelativePath=".\encryption\impl\EncryptionSchemaValidators.cpp"\r
-                                               >\r
-                                       </File>\r
-                               </Filter>\r
-                       </Filter>\r
-                       <Filter\r
                                Name="soap"\r
                                >\r
                                <Filter\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\ConcreteXMLObjectBuilder.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\config_pub_win32.h"\r
                                >\r
                        </File>\r
                                </File>\r
                        </Filter>\r
                        <Filter\r
-                               Name="signature"\r
-                               >\r
-                               <File\r
-                                       RelativePath=".\signature\KeyInfo.h"\r
-                                       >\r
-                               </File>\r
-                       </Filter>\r
-                       <Filter\r
-                               Name="encryption"\r
-                               >\r
-                               <File\r
-                                       RelativePath=".\encryption\Encryption.h"\r
-                                       >\r
-                               </File>\r
-                       </Filter>\r
-                       <Filter\r
                                Name="soap"\r
                                >\r
                                <File\r
index 04c8bbc..d058b7a 100644 (file)
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\ConcreteXMLObjectBuilder.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\config_pub_win32.h"\r
                                >\r
                        </File>\r