Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make generated client instantiatable #119

Open
berezovskyi opened this issue Jul 27, 2019 · 0 comments
Open

Make generated client instantiatable #119

berezovskyi opened this issue Jul 27, 2019 · 0 comments
Assignees

Comments

@berezovskyi
Copy link
Contributor

diff --git a/adaptor-rm-webapp/src/main/java/com/sample/rm/clients/GenericRequiredAdaptorClient.java b/adaptor-rm-webapp/src/main/java/com/sample/rm/clients/GenericRequiredAdaptorClient.java
index 9bd60e33..b6ba47bc 100644
--- a/adaptor-rm-webapp/src/main/java/com/sample/rm/clients/GenericRequiredAdaptorClient.java
+++ b/adaptor-rm-webapp/src/main/java/com/sample/rm/clients/GenericRequiredAdaptorClient.java
@@ -13,7 +13,7 @@
  * Contributors:
  *
  *     Jad El-khoury        - initial implementation of client code
- *
+ *
  *******************************************************************************/
 // End of user code

@@ -36,13 +36,21 @@ public class GenericRequiredAdaptorClient

     // Start of user code class_attributes
     // End of user code
-
+
     // Start of user code class_methods
     // End of user code

-    static String serviceProviderCatalogURI = "http://your.host/adaptor/services/catalog/singleton";
+    private String serviceProviderCatalogURI = "http://your.host/adaptor/services/catalog/singleton";
+
+    public GenericRequiredAdaptorClient() {
+    }
+
+    public GenericRequiredAdaptorClient(String serviceProviderCatalogURI) {
+        this.serviceProviderCatalogURI = serviceProviderCatalogURI;
+    }
+

-    public static ServiceProviderCatalog getServiceProviderCatalog() throws Exception {
+    public ServiceProviderCatalog getServiceProviderCatalog() throws Exception {
         OslcClient client = new OslcClient();
         ClientResponse response = null;
         ServiceProviderCatalog catalog = null;

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=518933

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants