Package org.wso2.carbon.registry.core

Examples of org.wso2.carbon.registry.core.Registry.beginTransaction()


                continue;
            }
            Boolean isLifecycleAspect = lifecycleAspects.get(aspectToAdd);
            if (isLifecycleAspect == null) {
                if (!isTransactionStarted) {
                    registry.beginTransaction();
                    isTransactionStarted = true;
                }
                systemRegistry.put(tempResourcePath, systemRegistry.newResource());
                systemRegistry.associateAspect(tempResourcePath, aspectToAdd);
                Resource r  = systemRegistry.get(tempResourcePath);
View Full Code Here


    public void updateThrottlingRules(String ruleContent) throws Exception {
        // updating the rule content
        boolean updateSuccess = false;
        UserRegistry systemRegistry = Util.getSuperTenantGovernanceSystemRegistry();
        try {
            systemRegistry.beginTransaction();
            Resource ruleContentResource = systemRegistry.get(StratosConstants.THROTTLING_RULES_PATH);
            ruleContentResource.setContent(ruleContent);
            systemRegistry.put(StratosConstants.THROTTLING_RULES_PATH, ruleContentResource);

            List<Task> tasks = Util.getTasks();
View Full Code Here

    public void move (String sourcePath, String targetPath) throws RegistryException {

        UserRegistry registry = initRegistry();

        try {
            registry.beginTransaction();
            registry.move(sourcePath, targetPath);
            registry.commitTransaction();

        } catch (RegistryException e) {
            String errorMsg = "Could not move the resource at "+ sourcePath + " to " + targetPath;
View Full Code Here

    public void delete (String resourcePath) throws RegistryException {

        UserRegistry registry = initRegistry();

        try {
            registry.beginTransaction();
            registry.delete(resourcePath);
            registry.commitTransaction();

        } catch (RegistryException e) {
            String errorMsg = "Could not delete resource at "+ resourcePath;
View Full Code Here

    public void persist (String path, byte [] resourceBytes, String tag) throws RegistryException {

        UserRegistry registry = initRegistry();

        try {
            registry.beginTransaction();
            Resource nodeResource = registry.newResource();
            nodeResource.setContent(resourceBytes);
            // store the resource in the registry
            registry.put(path, nodeResource);
            if (tag != null) {
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.