Package org.wso2.carbon.registry.core

Examples of org.wso2.carbon.registry.core.Resource.removeProperty()


    public void dissociate(RequestContext context) {
        Resource resource = context.getResource();
        if (resource != null) {
            resource.removeProperty(stateProperty);
            resource.removeProperty(lifecycleProperty);
        }
    }

    public String getCurrentState(Resource resource) {
        return resource.getProperty(stateProperty);
View Full Code Here


                    boolean transactionStarted = Transaction.isStarted();
                    if (!transactionStarted) {
                        registry.beginTransaction();
                    }
                    Resource resource = registry.get(servicePath);
                    resource.removeProperty(RegistryResources.ServiceProperties.IS_UT_ENABLED);
                    List<String> transports = getAllTransports();
                    setServiceTransports(serviceName, transports);

                    // Fire the transport binding added event
                    AxisEvent event = new AxisEvent(CarbonConstants.AxisEvent.TRANSPORT_BINDING_ADDED,
View Full Code Here

                + RegistryResources.SERVICES + serviceName;
        try {
            if (registry.resourceExists(servicePath)) {
                Resource resource = registry.get(servicePath);
                if (resource.getProperty(SecurityConstants.PROP_RAHAS_SCT_ISSUER) != null) {
                    resource.removeProperty(SecurityConstants.PROP_RAHAS_SCT_ISSUER);
                    registry.put(servicePath, resource);
                }
            }
        } catch (Exception e) {
            throw new AxisFault("Could not configure Rahas parameters", e);
View Full Code Here

                    resource = registry.get(resourcePath);
                } else {
                    resource = registry.newResource();
                }
                if (resource.getProperty(trustedService) != null) {
                    resource.removeProperty(trustedService);
                }
                resource.addProperty(trustedService, certAlias);
                registry.put(resourcePath, resource);
            }
        } catch (Exception e) {
View Full Code Here

            registry = getConfigSystemRegistry(); //TODO: Multitenancy
            if (registry != null) {
                if (registry.resourceExists(resourcePath)) {
                    resource = registry.get(resourcePath);
                    if (resource.getProperty(trustedService) != null) {
                        resource.removeProperty(trustedService);
                    }
                    registry.put(resourcePath, resource);
                }
            }
        } catch (Exception e) {
View Full Code Here

        r1.setProperty("p1", "v1");
        r1.setProperty("p2", "v2");
        registry.put("/props/t1/r1", r1);

        Resource r1e1 = registry.get("/props/t1/r1");
        r1e1.removeProperty("p1");
        registry.put("/props/t1/r1", r1e1);

        Resource r1e2 = registry.get("/props/t1/r1");

        assertEquals("Property is not removed.", r1e2.getProperty("p1"), null);
View Full Code Here

            String globalPath = PersistenceUtils.getResourcePath(cachingModule);
            if (configRegistry.resourceExists(globalPath)) {
                Resource resource = configRegistry.get(globalPath);
                if (!Boolean.parseBoolean(resource
                        .getProperty(GLOBALLY_ENGAGED_CUSTOM))) {
                    resource.removeProperty(GLOBALLY_ENGAGED_CUSTOM);
                    resource.addProperty(GLOBALLY_ENGAGED_CUSTOM, "true");
                    configRegistry.put(globalPath, resource);
                }
            } else {
                Resource globalResource = configRegistry.newResource();
View Full Code Here

            String globalPath = PersistenceUtils.getResourcePath(module);
            if (configRegistry.resourceExists(globalPath)) {
                Resource resource = configRegistry.get(globalPath);
                if (Boolean.parseBoolean(resource
                        .getProperty(GLOBALLY_ENGAGED_CUSTOM))) {
                    resource.removeProperty(GLOBALLY_ENGAGED_CUSTOM);
                    resource.addProperty(GLOBALLY_ENGAGED_CUSTOM, "false");
                    configRegistry.put(globalPath, resource);
                }
            }
View Full Code Here

                }
                // There might be updated subscription properties. Set them too.
                Subscription currentSubscription = JavaUtil.getSubscription(subscriptionResource);
                Map<String, String> properties = currentSubscription.getProperties();
                for (String key : properties.keySet()) {
                    subscriptionResource.removeProperty(key);
                }
                properties = subscription.getProperties();
                for (String key : properties.keySet()) {
                    subscriptionResource.setProperty(key, properties.get(key));
                }
View Full Code Here

                // is not saved to registry and hence the topic name
                if (topicName != null){
                    userRegistry.delete(getResourcePath(subscriptionID, topicName));
                }

                topicIndexResource.removeProperty(subscriptionID);

                userRegistry.put(fullPath, topicIndexResource);
            }

        } catch (RegistryException e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.