diff options
Diffstat (limited to 'tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model')
8 files changed, 0 insertions, 602 deletions
diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.cpp b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.cpp deleted file mode 100644 index 63f1672ec5..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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. - */ - -/* $Rev$ $Date$ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/php/model/PHPImplementation.h" -#include "tuscany/sca/php/model/PHPServiceBinding.h" -#include "tuscany/sca/php/model/PHPReferenceBinding.h" -#include "tuscany/sca/model/Component.h" -#include "tuscany/sca/model/Service.h" -#include "tuscany/sca/model/Reference.h" -#include "tuscany/sca/util/Utils.h" - -using namespace std; -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - - namespace php - { - - // Constructor - PHPImplementation::PHPImplementation(Composite* composite, const string& module, const string& className) - : ComponentType(composite, module), - module(module), className(className) - { - logentry(); - } - - PHPImplementation::~PHPImplementation() - { - logentry(); - } - - void PHPImplementation::initializeComponent(Component* component) - { - logentry(); - ComponentType::initializeComponent(component); - - // Create PHP bindings for all the services - const Component::SERVICE_MAP& services = component->getServices(); - Component::SERVICE_MAP::const_iterator iter = services.begin(); - for (unsigned int i=0; i< services.size(); i++) - { - Service *service = iter->second; - PHPServiceBinding* binding = new PHPServiceBinding(service); - service->setBinding(binding); - iter++; - } - - // Create PHP bindings for all the references - const Component::REFERENCE_MAP& references = component->getReferences(); - Component::REFERENCE_MAP::const_iterator refiter = references.begin(); - for (int ri=0; ri< references.size(); ri++) - { - Reference *reference = refiter->second; - PHPReferenceBinding* binding = new PHPReferenceBinding(reference); - reference->setBinding(binding); - refiter++; - } - } - - } // End namespace php - } // End namespace sca -} // End namespace tuscany diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.h b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.h deleted file mode 100644 index 78e678dff5..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPImplementation.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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. - */ - -/* $Rev$ $Date$ */ - -#ifndef tuscany_sca_php_model_phpimplementation_h -#define tuscany_sca_php_model_phpimplementation_h - -#include <string> - -#include "tuscany/sca/model/ComponentType.h" - - -namespace tuscany -{ - namespace sca - { - namespace php - { - /** - * Holds information about an SCA implementation written in PHP - */ - class PHPImplementation : public tuscany::sca::model::ComponentType - { - - public: - /** - * Constructor. - * @param composite Composite containing this implementation. - * @param module Name of the module. - * @param modulePath Path to the module (could be a blank string - * if this is not specified). - * @param className Name of the class in the module (could be a blank string - * if this is not specified). - */ - PHPImplementation(tuscany::sca::model::Composite* composite, const std::string& module, const std::string& className); - - /** - * Destructor - */ - virtual ~PHPImplementation(); - - /** - * Initialize a component of this type. - * @param component The component to initialize. - */ - virtual void initializeComponent(tuscany::sca::model::Component* component); - - /** - * Returns the name of the module. - * @return The name of the module. - */ - const std::string& getModule() const { return module; } - - /** - * Get the name of the class. - * @return The class name if specified. - */ - const std::string& getClass() const { return className; } - - private: - - /** - * Name of the module. - */ - std::string module; - - /** - * Name of the class in the header file declaring the implementation. - * May be an empty string if not set in the SCDL file. - */ - std::string className; - }; - - } // End namespace php - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_php_model_phpimplementation_h diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPInterface.cpp b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPInterface.cpp deleted file mode 100644 index cbea3f2b71..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPInterface.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - -/* $Rev$ $Date$ */ - - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/php/export.h" -#include "tuscany/sca/php/model/PHPInterface.h" - -using namespace std; - -namespace tuscany -{ - namespace sca - { - namespace php - { - const string PHPInterface::typeQName("http://www.osoa.org/xmlns/sca/1.0#PHPInterface"); - - // Constructor - PHPInterface::PHPInterface( - bool remotable, - bool conversational) - : Interface(remotable, conversational) - { - logentry(); - } - - PHPInterface::~PHPInterface() - { - logentry(); - } - - } // End namespace php - } // End namespace sca -} // End namespace tuscany diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPInterface.h b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPInterface.h deleted file mode 100644 index 9a4f658eb0..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPInterface.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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. - */ - -/* $Rev$ $Date$ */ - - -#ifndef tuscany_sca_php_model_phpinterface_h -#define tuscany_sca_php_model_phpinterface_h - -#include <string> - -#include "tuscany/sca/php/export.h" -#include "tuscany/sca/model/Interface.h" - -namespace tuscany -{ - namespace sca - { - namespace php - { - /** - * Holds information about an interface described using a PHP - * header file. - */ - class PHPInterface : public tuscany::sca::model::Interface - { - - public: - /** - * Constuctor. - * @param scope The scope of the interface (stateless or composite). - * @param remotable True if the interface is remotable. - */ - PHPInterface( - bool remotable, - bool conversational); - - /** - * Destructor. - */ - virtual ~PHPInterface(); - - /** - * return the QName of the schema type for this interface type - * (e.g. "http://www.osoa.org/xmlns/sca/1.0#interface.cpp") - */ - const std::string& getInterfaceTypeQName() { return typeQName; }; - - /** - * The QName of the schema type for this interface type. - */ - SCA_PHP_API static const std::string typeQName; - - }; - - } // End namespace php - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_php_model_phpinterface_h - diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPReferenceBinding.cpp b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPReferenceBinding.cpp deleted file mode 100644 index 8a8d15fe40..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPReferenceBinding.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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. - */ - -/* $Rev$ $Date$ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/php/model/PHPReferenceBinding.h" -#include "tuscany/sca/php/PHPServiceProxy.h" - -using namespace std; -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace php - { - - // Constructor - PHPReferenceBinding::PHPReferenceBinding(Reference* reference) - : ReferenceBinding(reference, ""), serviceProxy(NULL) - { - } - - // Destructor - PHPReferenceBinding::~PHPReferenceBinding() - { - } - - ServiceProxy* PHPReferenceBinding::getServiceProxy() - { - return serviceProxy; - } - - void PHPReferenceBinding::configure(ServiceBinding* binding) - { - targetServiceBinding = binding; - - serviceProxy = new PHPServiceProxy(getReference()); - } - - } // End namespace - } // End namespace sca -} // End namespace tuscany diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPReferenceBinding.h b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPReferenceBinding.h deleted file mode 100644 index 8010752980..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPReferenceBinding.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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. - */ - -/* $Rev$ $Date$ */ - -#ifndef tuscany_sca_php_model_phpreferencebinding_h -#define tuscany_sca_php_model_phpreferencebinding_h - -#include <string> - -#include "tuscany/sca/model/ReferenceBinding.h" - - -namespace tuscany -{ - namespace sca - { - namespace php - { - /** - * Information about a PHP service binding for service or a reference. - */ - class PHPReferenceBinding : public tuscany::sca::model::ReferenceBinding - { - public: - - /** - * Constructor. - */ - PHPReferenceBinding(tuscany::sca::model::Reference* reference); - - /** - * Destructor. - */ - virtual ~PHPReferenceBinding(); - - /** - * Returns the type of binding. - */ - virtual std::string getType() { return "http://www.osoa.org/xmlns/sca/1.0#PHPImplementationBinding"; }; - - /** - * Create a proxy representing the reference to the - * client component. - */ - virtual ServiceProxy* getServiceProxy(); - - /** - * Configure this binding from a service binding. - */ - virtual void configure(tuscany::sca::model::ServiceBinding* serviceBinding); - - /** - * Returns the target service binding. - */ - tuscany::sca::model::ServiceBinding* getTargetServiceBinding() const { return targetServiceBinding; }; - - private: - - /** - * The proxy representing the reference to the client - * component. - */ - ServiceProxy* serviceProxy; - - /** - * The service binding of the target - */ - tuscany::sca::model::ServiceBinding* targetServiceBinding; - }; - - } // End namespace php - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_php_model_phpreferencebinding_h diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.cpp b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.cpp deleted file mode 100644 index 4d18424ae2..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - -/* $Rev$ $Date$ */ - -#include "tuscany/sca/util/Logging.h" -#include "tuscany/sca/php/model/PHPServiceBinding.h" -#include "tuscany/sca/php/PHPServiceWrapper.h" - -using namespace std; -using namespace tuscany::sca::model; - -namespace tuscany -{ - namespace sca - { - namespace php - { - - // Constructor - PHPServiceBinding::PHPServiceBinding(Service* service) - : ServiceBinding(service, "") - { - logentry(); - serviceWrapper = PHPServiceWrapper::getServiceWrapper(service); - } - - // Destructor - PHPServiceBinding::~PHPServiceBinding() - { - logentry(); - } - - ServiceWrapper* PHPServiceBinding::getServiceWrapper() - { - logentry(); - return (ServiceWrapper*)serviceWrapper; - } - - } // End namespace php - } // End namespace sca -} // End namespace tuscany diff --git a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.h b/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.h deleted file mode 100644 index ef3d6b1604..0000000000 --- a/tags/native-sca-1.0.incubating-M3-RC4/runtime/extensions/php/src/tuscany/sca/php/model/PHPServiceBinding.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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. - */ - -/* $Rev$ $Date$ */ - -#ifndef tuscany_sca_php_model_phpservicebinding_h -#define tuscany_sca_php_model_phpservicebinding_h - -#include <string> - -#include "tuscany/sca/model/ServiceBinding.h" - - -namespace tuscany -{ - namespace sca - { - namespace php - { - /** - * Information about a PHP service binding for service or a reference. - */ - class PHPServiceBinding : public tuscany::sca::model::ServiceBinding - { - public: - - /** - * Constructor. - * @param uri The uri of the binding. - * @param port The definition of the port to which the entrypoint - * or external service is to be bound. This is of the form - * "namespace"#endpoint("service"/"port") - */ - PHPServiceBinding(tuscany::sca::model::Service* service); - - /** - * Destructor. - */ - virtual ~PHPServiceBinding(); - - /** - * Returns the type of binding. - */ - virtual std::string getType() { return "http://www.osoa.org/xmlns/sca/1.0#PHPImplementationBinding"; }; - - /** - * Create a wrapper for the service configured by this - * binding. - */ - virtual ServiceWrapper* getServiceWrapper(); - - private: - - /** - * The wrapper for the service configured by this binding. - */ - ServiceWrapper* serviceWrapper; - - }; - - } // End namespace php - } // End namespace sca -} // End namespace tuscany - -#endif // tuscany_sca_php_model_phpservicebinding_h |