Package org.wso2.carbon.registry.core

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


     * @throws RegistryException - on registry error
     */
    protected List getPropertyValues(String resourcePath, String property) throws RegistryException {
        Resource resource = configRegistry.get(resourcePath);
        List values = resource.getPropertyValues(property);
        resource.discard();
        return values;
    }

    /**
     * Load the documentation of an AxisDescription instance
View Full Code Here


                    Resource policyResource = configRegistry.get(policyResourcePath);
                    if (!(policyResource instanceof Collection)) {
                        Policy policy = PolicyEngine.getPolicy(policyResource.getContentStream());
                        ad.getPolicySubject().attachPolicy(policy);
                    }
                    policyResource.discard();
                } else {
                    log.error("Failed to load Policy with ID " + currentPolicyUUID
                            + ". The Policy does not exist.");
                }
            }
View Full Code Here

    protected boolean isGloballyEngaged(String resourcePath) throws RegistryException {
        if (configRegistry.resourceExists(resourcePath)) {
            Resource resource = configRegistry.get(resourcePath);
            boolean globallyEngaged = Boolean.parseBoolean(resource
                    .getProperty(RegistryResources.ModuleProperties.GLOBALLY_ENGAGED));
            resource.discard();
            return globallyEngaged;
        }
        return false;
    }
View Full Code Here

        }
        AxisModule existingModule = null;
        if (configRegistry.resourceExists(modulePath)) {
            Resource givenResource = configRegistry.get(modulePath);
            existingModule = getAxisModule(givenResource);
            givenResource.discard();
        }
        // if the existingModule is null, check whether there are new versions..
        if (existingModule == null) {
            String temp = modulePath.substring(0, modulePath.lastIndexOf('/'));
            if (configRegistry.resourceExists(temp)) {
View Full Code Here

                // exists in the system
                for (String versionPath : moduleVersions.getChildren()) {
                    Resource versionResource = configRegistry.get(versionPath);
                    existingModule = getAxisModule(versionResource);
                    if (existingModule != null) {
                        versionResource.discard();
                        break;
                    }
                    versionResource.discard();
                }
                moduleVersions.discard();
View Full Code Here

                    existingModule = getAxisModule(versionResource);
                    if (existingModule != null) {
                        versionResource.discard();
                        break;
                    }
                    versionResource.discard();
                }
                moduleVersions.discard();
            }
        }
        if (existingModule == null) {
View Full Code Here

            registryContext.getHandlerManager().invokeAspect(context);
            if (!context.isSimulation()) {
                if (!context.isProcessingComplete()) {
                    aspect.invoke(context, action);
                }
                resource.discard();

                // transaction succeeded
                transactionSucceeded = true;
            }
        } finally {
View Full Code Here

            registryContext.getHandlerManager().invokeAspect(context);
            if (!context.isSimulation()) {
                if (!context.isProcessingComplete()) {
                    aspect.invoke(context, action, parameters);
                }
                resource.discard();

                // transaction succeeded
                transactionSucceeded = true;
            }
        } finally {
View Full Code Here

                CurrentSession.setAttribute(Repository.IS_LOGGING_ACTIVITY, false);
                repository.put(path, resource);
            } finally {
                CurrentSession.removeAttribute(Repository.IS_LOGGING_ACTIVITY);
            }
            resource.discard();
            HandlerManager hm = registryContext.getHandlerManager();

            ResourcePath resourcePath = new ResourcePath(path);
            context.setResourcePath(resourcePath);
            context.setTargetPath(target);
View Full Code Here

                CurrentSession.setAttribute(Repository.IS_LOGGING_ACTIVITY, false);
                repository.put(path, resource);
            } finally {
                CurrentSession.removeAttribute(Repository.IS_LOGGING_ACTIVITY);
            }
            resource.discard();

            HandlerManager hm = registryContext.getHandlerManager();

            ResourcePath resourcePath = new ResourcePath(path);
            context.setResourcePath(resourcePath);
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.