1 /** 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 20 /* 21 * XSEC 22 * 23 * XKMSCompoundRequestImpl := Implementation of CompoundRequest Messages 24 * 25 * $Id: XKMSCompoundRequestImpl.hpp 1820685 2018-01-09 17:48:51Z scantor $ 26 * 27 */ 28 29 #ifndef XKMSCOMPOUNDREQUESTIMPL_INCLUDE 30 #define XKMSCOMPOUNDREQUESTIMPL_INCLUDE 31 32 // XSEC Includes 33 34 #include <xsec/framework/XSECDefs.hpp> 35 #include <xsec/xkms/XKMSCompoundRequest.hpp> 36 37 #ifdef XSEC_XKMS_ENABLED 38 39 #include "XKMSRequestAbstractTypeImpl.hpp" 40 #include "XKMSMessageFactoryImpl.hpp" 41 42 class XKMSQueryKeyRequestImpl; 43 44 class XKMSCompoundRequestImpl : public XKMSCompoundRequest { 45 46 public: 47 48 XKMSRequestAbstractTypeImpl m_request; 49 XKMSMessageAbstractTypeImpl &m_msg; 50 51 public: 52 53 XKMSCompoundRequestImpl( 54 const XSECEnv * env 55 ); 56 57 XKMSCompoundRequestImpl( 58 const XSECEnv * env, 59 XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * node 60 ); 61 62 virtual ~XKMSCompoundRequestImpl(); 63 64 // Load elements 65 void load(); 66 67 // Creation 68 XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * 69 createBlankCompoundRequest( 70 const XMLCh * service, 71 const XMLCh * id = NULL); 72 73 // Getter methods 74 75 virtual int getRequestListSize(void); 76 virtual XKMSRequestAbstractType * getRequestListItem(int item); 77 78 /* Implemented from MessageAbstractType */ 79 virtual messageType getMessageType(void); 80 81 // Setter Methods 82 83 virtual XKMSLocateRequest * createLocateRequest( 84 const XMLCh * service, 85 const XMLCh * id = NULL); 86 87 virtual XKMSValidateRequest * createValidateRequest( 88 const XMLCh * service, 89 const XMLCh * id = NULL); 90 virtual XKMSRegisterRequest * createRegisterRequest( 91 const XMLCh * service, 92 const XMLCh * id = NULL); 93 virtual XKMSRevokeRequest * createRevokeRequest( 94 const XMLCh * service, 95 const XMLCh * id = NULL); 96 virtual XKMSRecoverRequest * createRecoverRequest( 97 const XMLCh * service, 98 const XMLCh * id = NULL); 99 virtual XKMSReissueRequest * createReissueRequest( 100 const XMLCh * service, 101 const XMLCh * id = NULL); 102 103 /* Forced inheritance from XKMSMessageAbstractTypeImpl */ 104 XKMS_MESSAGEABSTRACTYPE_IMPL_METHODS 105 106 /* Forced inheritance from RequestAbstractType */ 107 XKMS_REQUESTABSTRACTYPE_IMPL_METHODS 108 109 private: 110 111 #if defined(XSEC_NO_NAMESPACES) 112 typedef vector<XKMSRequestAbstractTypeImpl *> RequestListVectorType; 113 #else 114 typedef std::vector<XKMSRequestAbstractTypeImpl *> RequestListVectorType; 115 #endif 116 117 RequestListVectorType m_requestList; 118 119 /* Used to consume and produce messages in the list */ 120 XKMSMessageFactoryImpl m_factory; 121 122 // Unimplemented 123 XKMSCompoundRequestImpl(const XKMSCompoundRequestImpl &); 124 XKMSCompoundRequestImpl & operator = (const XKMSCompoundRequestImpl &); 125 126 }; 127 128 #endif /* XSEC_XKMS_ENABLED */ 129 #endif /* XKMSCOMPOUNDREQUESTIMPL_INCLUDE */ 130