Configuration
-- Please add something like: If you need help for the configuration please read the here. -
-
- <% - TopicMapODataProducer producer = TopicMapODataProducerFactory.getProducerInstance(); - TopicMapMetadata mt = producer.getService(); - boolean local = false; - String namespace = null; - Properties prop = null; - String file = null; - String url = null; - String apiKey = null; - boolean flatAssociation = false; - /* - * is get request - */ - if (request.getMethod().equalsIgnoreCase("GET")) { - local = MemoryOdataContentProvider.class.isAssignableFrom(mt.getContentProviderClass()); - namespace = mt.getNamespace(); - prop = mt.getProperties(); - file = ""; - apiKey = !local ? (prop.containsKey("api-key")?prop.get("api-key").toString():"") : ""; - url = !local ? prop.get("server").toString() : ""; - flatAssociation = prop.get("association-mode").toString().equalsIgnoreCase(EContentProviderConfiguration.FLAT_ASSOCIATION.name()); - } - /* - * is post - */ - else if (request.getMethod().equalsIgnoreCase("POST")) { - /* - * - */ - ODataConfiguration cfg = IOUtis.post(request); - /* - * update ODATA service - */ - mt.reload(cfg.getClazz(), cfg.getProperties(), cfg.getNamespace()); - TopicMapODataProducerFactory.writeProperties(cfg.getClazz(), cfg.getProperties(), cfg.getNamespace()); - /* - * set outside values - */ - local = MemoryOdataContentProvider.class.isAssignableFrom(cfg.getClazz()); - namespace = cfg.getNamespace(); - prop = cfg.getProperties(); - file = ""; - apiKey = !local ? (prop.containsKey("api-key")?prop.get("api-key").toString():"") : ""; - url = !local ? prop.get("server").toString() : ""; - flatAssociation = prop.get("association-mode").toString().equalsIgnoreCase(EContentProviderConfiguration.FLAT_ASSOCIATION.name()); - } - %> - -
-
- Available services listed "> here
-
-