Package org.wso2.carbon.dataservices.core.engine

Examples of org.wso2.carbon.dataservices.core.engine.DataService.beginTransaction()


        Registry registry = null;
        try {
            registry = getConfigSystemRegistry();
            // Need not do any null checks for registry, as if so, we'll never
            // get here.
            registry.beginTransaction();
            Resource userTabResource = registry.get(dashboardTabPath);

            // First generate the new Id
            String nextTabId = userTabResource
                    .getProperty(DashboardConstants.NEXT_TAB_ID);
View Full Code Here


            registry = getConfigSystemRegistry();
            // Need not do any null checks for registry, as if so, we'll never
            // get here.

            if (!Transaction.isStarted()) {
                registry.beginTransaction();
                transactionStarted = true;
            }
            Resource userTabResource = registry.get(dashboardTabPath);

            // First remove this tab from the tab layout
View Full Code Here

        } else {
            log.error("Failed to save template policies in throttling component");
            return;
        }
        try {
            registry.beginTransaction();
            ThrottlingUtils.saveTemplatePoliciesToRegistry(registry);
            registry.commitTransaction();
        } catch (Exception e) {
            registry.rollbackTransaction();
            String msg = "Failed to save template policies in throttling component";
View Full Code Here

        boolean transactionStarted = Transaction.isStarted();
        try {
            Registry registry = IdentityTenantUtil.getConfigRegistry(tenantId);
            try {
                if (!transactionStarted) {
                    registry.beginTransaction();
                }
                Association[] associations = registry.getAssociations(profilePath,
                        IdentityRegistryResources.ASSOCIATION_USER_INFOCARD);
                deleteTargets(registry, associations);
                associations = registry.getAssociations(profilePath,
View Full Code Here

            UserRegistry registry = DashboardPopulatorContext.getRegistry(tenantId);

            // Creating the default gadget collection resource
            Collection defaultGadgetCollection = registry.newCollection();
            try {
                registry.beginTransaction();
                registry.put(gadgetsPath, defaultGadgetCollection);

                transferDirectoryContentToRegistry(rootDirectory, registry, rootPath, tenantId);
                registry.commitTransaction();
            } catch (Exception e) {
View Full Code Here

        UserRegistry registry = getRegistry(tenantId);

        // Creating the default gadget collection resource
        Collection defaultGadgetCollection = registry.newCollection();
        try {
            registry.beginTransaction();
            registry.put(REGISTRY_GADGET_STORAGE_PATH, defaultGadgetCollection);

            transferDirectoryContentToRegistry(rootDirectory, registry, rootPath, tenantId);
            registry.commitTransaction();
        } catch (Exception e) {
View Full Code Here

        UserRegistry registry = getRegistry(tenantId);

        // Creating the default gadget collection resource
        Collection defaultGadgetCollection = registry.newCollection();
        try {
            registry.beginTransaction();
            registry.put(REGISTRY_GADGET_STORAGE_PATH, defaultGadgetCollection);

            transferDirectoryContentToRegistry(rootDirectory, registry, rootPath, tenantId);
            registry.commitTransaction();
        } catch (Exception e) {
View Full Code Here

                                             SYSTEM_GADGETS_PATH, ActionConstants.GET))  {
                accessControlAdmin.authorizeUser(RegistryConstants.ANONYMOUS_USER,
                                             SYSTEM_GADGETS_PATH, ActionConstants.GET);
            }
            try {
                registry.beginTransaction();
                registry.put(SYSTEM_GADGETS_PATH, defaultGadgetCollection);

                transferDirectoryContentToRegistry(rootDirectory, registry, rootPath);
                registry.commitTransaction();
            } catch (Exception e) {
View Full Code Here

            if (!systemRegistry.resourceExists("/system")) {

                try {
                    boolean inTransaction = Transaction.isStarted();
                    if (!inTransaction) {
                        systemRegistry.beginTransaction();
                    }
                    Collection systemCollection = systemRegistry.newCollection();
                    String systemDesc = "This collection is used to store system data of the " +
                            "WSO2 Registry server. User nor the admins of the registry are not expected " +
                            "to edit any content of this collection. Changing content of this collection " +
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

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.