Package org.wso2.carbon.registry.core

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


            UserRegistry userRegistry = Utils.getUserRegistry();
            String resourcePath = MessageBoxConstants.MB_QUEUE_STORAGE_PATH + "/" + queueName;

            if (userRegistry.resourceExists(resourcePath)) {
                Collection collection = (Collection) userRegistry.get(resourcePath);
                collection.removeProperty(MessageBoxConstants.MB_QUEUE_PROPERTY_UPDATED_TIME);
                collection.setProperty(MessageBoxConstants.MB_QUEUE_PROPERTY_UPDATED_TIME,
                                       ConverterUtil.convertToString(Calendar.getInstance()));
                userRegistry.put(resourcePath, collection);
            }
        } catch (RegistryException e) {
View Full Code Here


            if (!transactionStarted) {
                registry.beginTransaction();
            }

            userResource.removeProperty("OpenIDRememberMeToken");
            userResource.addProperty("OpenIDRememberMeToken", rememberMe.getToken());
            registry.put(RegistryConstants.PROFILES_PATH + rememberMe.getUserName(), userResource);

            if (!transactionStarted) {
                registry.commitTransaction();
View Full Code Here

                    registry.put(RegistryConstants.PROFILES_PATH + consumer.getConsumerKey(),
                            userResource);
                } else {
                    userResource = (Collection) registry.get(RegistryConstants.PROFILES_PATH
                            + consumer.getConsumerKey());
                    userResource.removeProperty(IdentityRegistryResources.OAUTH_CONSUMER_PATH);
                }

                userResource.addProperty(IdentityRegistryResources.OAUTH_CONSUMER_PATH, consumer
                        .getConsumerSecret());
View Full Code Here

            if (!transactionStarted) {
                registry.beginTransaction();
            }

            userResource.removeProperty("RememberMeToken");
            userResource.setProperty("RememberMeToken", value);
            registry.put(RegistryConstants.PROFILES_PATH + userName, userResource);

            if (!transactionStarted) {
                registry.commitTransaction();
View Full Code Here

                    profile = (Collection) registry.get(path);
                }
                Date date = new Date();
                int ttl = 300000; // 5 seconds in ms
                key = "Key:=" + key + "&Timestamp:=" + date.getTime() + "&TTL:=" + ttl;
                profile.removeProperty(RegistryConstants.USER_TOKEN);
                profile.addProperty(RegistryConstants.USER_TOKEN, key);
                registry.put(path, profile);
                sessionStore.put(baseString, getHttpSession());
                return baseString;
View Full Code Here

        } else if (value == null) {

            try {

                CollectionImpl collec = (CollectionImpl) registrySession.getUserRegistry().get(nodePath);
                collec.removeProperty(s);
                registrySession.getUserRegistry().put(nodePath, collec);

            } catch (RegistryException e) {
                String msg = "failed to resolve the path of the given node or violation of repository syntax " + this;
                log.debug(msg);
View Full Code Here

                coll.setProperty(s, properties);
                registrySession.getUserRegistry().put(nodePath, coll);
            } else {

                coll = (CollectionImpl) registrySession.getUserRegistry().get(nodePath);
                coll.removeProperty(s);
                registrySession.getUserRegistry().put(nodePath, coll);


            }
View Full Code Here

                registrySession.getUserRegistry().put(nodePath, collc);

            } else {

                collc = (CollectionImpl) registrySession.getUserRegistry().get(nodePath);
                collc.removeProperty(s);
                registrySession.getUserRegistry().put(nodePath, collc);

            }

        } catch (RegistryException e) {
View Full Code Here

    }

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

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

    }

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

    public String getCurrentState(Resource resource) {
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.