Package org.wso2.carbon.registry.core

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


        Resource resource = registry.get(path);
        if (oldName.equals(name)) {
            resource.setProperty(name, value);
        } else {
            resource.setProperty(name, value);
            resource.removeProperty(oldName);
        }
        registry.put(resource.getPath(), resource);
        resource.discard();
    }
View Full Code Here


        UserRegistry registry = (UserRegistry) getRootRegistry();
        if (RegistryUtils.isRegistryReadOnly(registry.getRegistryContext())) {
            return;
        }
        Resource resource = registry.get(path);
        resource.removeProperty(name);
        registry.put(resource.getPath(), resource);
        resource.discard();
    }

    /**
 
View Full Code Here

            throw new RegistryException("User is not authorized to change retention properties" +
                    " of this resource. Resource path = " + path);
        }

        if (bean == null) {
            resource.removeProperty(CommonConstants.RETENTION_USERNAME_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_FROM_DATE_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_TO_DATE_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_WRITE_LOCKED_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_DELETE_LOCKED_PROP_NAME);
        } else {
View Full Code Here

                    " of this resource. Resource path = " + path);
        }

        if (bean == null) {
            resource.removeProperty(CommonConstants.RETENTION_USERNAME_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_FROM_DATE_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_TO_DATE_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_WRITE_LOCKED_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_DELETE_LOCKED_PROP_NAME);
        } else {
            resource.setProperty(CommonConstants.RETENTION_USERNAME_PROP_NAME, registry.getUserName());
View Full Code Here

        }

        if (bean == null) {
            resource.removeProperty(CommonConstants.RETENTION_USERNAME_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_FROM_DATE_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_TO_DATE_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_WRITE_LOCKED_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_DELETE_LOCKED_PROP_NAME);
        } else {
            resource.setProperty(CommonConstants.RETENTION_USERNAME_PROP_NAME, registry.getUserName());
            resource.setProperty(CommonConstants.RETENTION_FROM_DATE_PROP_NAME, bean.getFromDate());
View Full Code Here

        if (bean == null) {
            resource.removeProperty(CommonConstants.RETENTION_USERNAME_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_FROM_DATE_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_TO_DATE_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_WRITE_LOCKED_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_DELETE_LOCKED_PROP_NAME);
        } else {
            resource.setProperty(CommonConstants.RETENTION_USERNAME_PROP_NAME, registry.getUserName());
            resource.setProperty(CommonConstants.RETENTION_FROM_DATE_PROP_NAME, bean.getFromDate());
            resource.setProperty(CommonConstants.RETENTION_TO_DATE_PROP_NAME, bean.getToDate());
View Full Code Here

        if (bean == null) {
            resource.removeProperty(CommonConstants.RETENTION_USERNAME_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_FROM_DATE_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_TO_DATE_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_WRITE_LOCKED_PROP_NAME);
            resource.removeProperty(CommonConstants.RETENTION_DELETE_LOCKED_PROP_NAME);
        } else {
            resource.setProperty(CommonConstants.RETENTION_USERNAME_PROP_NAME, registry.getUserName());
            resource.setProperty(CommonConstants.RETENTION_FROM_DATE_PROP_NAME, bean.getFromDate());
            resource.setProperty(CommonConstants.RETENTION_TO_DATE_PROP_NAME, bean.getToDate());
            resource.setProperty(CommonConstants.RETENTION_WRITE_LOCKED_PROP_NAME,
View Full Code Here

    }

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

    public String getCurrentState(Resource resource) {
View Full Code Here

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

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

                                         SocialImplConstants.SEPARATOR + appId +
                                         SocialImplConstants.SEPARATOR + userId;
            if (registry.resourceExists(appDataResourcePath)) {
                appDataResource = registry.get(appDataResourcePath);
                for (String key : fields) {
                    appDataResource.removeProperty(key);
                }
                registry.put(appDataResourcePath, appDataResource);
            }
        } catch (RegistryException e) {
            log.error(e.getMessage(), 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.