Package org.wso2.carbon.registry.core.session

Examples of org.wso2.carbon.registry.core.session.UserRegistry.newCollection()


            Resource gadgetLayout;
            if (registry.resourceExists(gadgetLayoutPath)) {
                gadgetLayout = registry.get(gadgetLayoutPath);
            } else {
                gadgetLayout = registry.newCollection();
            }

            //get the column which the new gadget should be added to have a equal distribution <column, numberOfGadgets>
            HashMap<Integer, Integer> gadgets = new HashMap<Integer, Integer>();
            String layout = getGadgetLayout(userId, tabId, dashboardName);
View Full Code Here


            userTabResource.setProperty(DashboardConstants.NEXT_TAB_ID, String
                    .valueOf(Integer.parseInt(nextTabId) + 1));
            registry.put(dashboardTabPath, userTabResource);

            // Creating a new tab resource
            Resource newTab = registry.newCollection();

            // Storing the name of the tab
            if ("".equals(tabTitle)) {
                tabTitle = "Tab " + nextTabId;
            }
View Full Code Here

           throw new BMConfigurationException("Error in getting registry for the super tenant", e);
        }
        try {
            // create broker base if not exists
            if (!registry.resourceExists(BROKER_BASE)) {
                registry.put(BROKER_BASE, registry.newCollection());
            }
        } catch (RegistryException e) {
            if (log.isErrorEnabled()) {
                log.error("Failed to create new collection in registry", e);
            }
View Full Code Here

                Registry registry = registryService.getConfigSystemRegistry(tenantId);
                String path = RegistryConstants.PROFILES_PATH + username;
                Collection profile = null;
                if (!registry.resourceExists(path)) {
                    profile = registry.newCollection();
                    registry.put(path, profile);
                } else {
                    profile = (Collection) registry.get(path);
                }
                Date date = new Date();
View Full Code Here

            String rootPath = rootDirectory.getAbsolutePath();

            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);
View Full Code Here

        String rootPath = rootDirectory.getAbsolutePath();

        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);
View Full Code Here

        String rootPath = rootDirectory.getAbsolutePath();

        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);
View Full Code Here

            String rootPath = rootDirectory.getAbsolutePath();

            UserRegistry registry = DashboardPopulatorContext.getRegistry();

            // Creating the default gadget collection resource
            Collection defaultGadgetCollection = registry.newCollection();

            // Set permission for annonymous read
            AuthorizationManager accessControlAdmin =
                    registry.getUserRealm().getAuthorizationManager();
           
View Full Code Here

            } catch (ResourceNotFoundException e) {
                // If this is a straight-ahead POST to a non-existent directory, create it?
                if (method.equals("POST") && parts.length == 1) {
                    // Need to create it.
                    try {
                        Collection c = registry.newCollection();
                        registry.put(uri, c);
                        resource = registry.get(uri);
                    } catch (RegistryException e1) {
                        log.error(e1);
                        return null;
View Full Code Here

                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 " +
                            "may result in unexpected behaviors.";
                    systemCollection.setDescription(systemDesc);
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.