Package org.wso2.carbon.registry.api

Examples of org.wso2.carbon.registry.api.Registry.newCollection()


                        elementMappingResource.addProperty(CEPConstants.CEP_REGISTRY_NS, elementMapping.getNamespace());
                        registry.put(queryPath + elementMappingPathString +
                                CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_DETAILS, elementMappingResource);

                        registry.put(queryPath + elementMappingPathString +
                                CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_PROPERTIES, registry.newCollection());
                        for (Property property : elementMapping.getProperties()) {
                            Resource elementMappingProperties = registry.newResource();
                            elementMappingProperties.addProperty(CEPConstants.CEP_REGISTRY_NAME, property.getName());
                            elementMappingProperties.addProperty(CEPConstants.CEP_REGISTRY_XML_FIELD_NAME, property.getXmlFieldName());
                            elementMappingProperties.addProperty(CEPConstants.CEP_REGISTRY_XML_FIELD_TYPE, property.getXmlFieldType());
View Full Code Here


                    } else {
                        registry.put(queryPath +
                                CEPConstants.CEP_REGISTRY_BS +
                                CEPConstants.CEP_REGISTRY_OUTPUT +
                                CEPConstants.CEP_REGISTRY_BS +
                                CEPConstants.CEP_REGISTRY_XML_MAPPING, registry.newCollection());
                        Resource xmlMappingResource = registry.newResource();
                        xmlMappingResource.addProperty(CEPConstants.CEP_REGISTRY_TEXT, output.getXmlMapping().getMappingXMLText());
                        registry.put(queryPath +
                                CEPConstants.CEP_REGISTRY_BS +
                                CEPConstants.CEP_REGISTRY_OUTPUT +
View Full Code Here

            boolean transactionStarted = Transaction.isStarted();
            if (!transactionStarted) {
                registry.beginTransaction();
            }
            if (!registry.resourceExists(SecurityConstants.KEY_STORES)) {
                Collection kstores = registry.newCollection();
                registry.put(SecurityConstants.KEY_STORES, kstores);

                Resource primResource = registry.newResource();
                if (!registry.resourceExists(RegistryResources.SecurityManagement.PRIMARY_KEYSTORE_PHANTOM_RESOURCE)) {
                    registry.put(RegistryResources.SecurityManagement.PRIMARY_KEYSTORE_PHANTOM_RESOURCE,
View Full Code Here

            ByteArrayOutputStream byteOut = new ByteArrayOutputStream();

            if (zipentry.isDirectory()) {
                //if the entry is a directory creating a collection
                Collection col = sysRegistry.newCollection();
                sysRegistry.put(DashboardConstants.GS_REGISTRY_ROOT +
                                DashboardConstants.GADGET_PATH + gadgetName
                                + RegistryConstants.PATH_SEPARATOR + entryName, col);
            } else {
                //if a file, creating a resource
View Full Code Here

            Registry registry = UserMgtDSComponent.getRegistryService().getGovernanceSystemRegistry();
            for (ManagementPermission uiPermission : uiPermissions) {
                if (registry.resourceExists(uiPermission.getResourceId())) {
                    continue;
                }
                Collection resource = registry.newCollection();
                resource.setProperty(UserMgtConstants.DISPLAY_NAME, uiPermission.getDisplayName());
                registry.put(uiPermission.getResourceId(), resource);
            }
        }
    }
View Full Code Here

                            uiPermission.getResourceId().startsWith(
                                    CarbonConstants.UI_PROTECTED_PERMISSION_COLLECTION) ||
                            registry.resourceExists(uiPermission.getResourceId())) {
                        continue;
                    }
                    Collection resource = registry.newCollection();
                    resource.setProperty(UserMgtConstants.DISPLAY_NAME,
                            uiPermission.getDisplayName());
                    registry.put(uiPermission.getResourceId(), resource);
                }
            }
View Full Code Here

            for (PrivacyFieldDTO pair : profileData) {
                fullProfileDataPath = profileDataPath + pair.getFieldName();
                try {
                    profileDataResource = registry.get(fullProfileDataPath);
                } catch (RegistryException e) {
                    profileDataResource = registry.newCollection();
                }

                profileDataResource.setProperty(SocialUtils.USER_PROFILE_FIELD_VISIBILITY, pair.getVisibilityValue());
                registry.put(fullProfileDataPath, profileDataResource);
            }
View Full Code Here

            Resource gadgetLayout;

            if (registry.resourceExists(gadgetLayoutPath)) {
                gadgetLayout = registry.get(gadgetLayoutPath);
            } else {
                gadgetLayout = registry.newCollection();
            }
            // Storing the gadget layout
            gadgetLayout.setProperty(DashboardConstants.CURRENT_GADGET_LAYOUT,
                    newLayout);
            registry.put(gadgetLayoutPath, gadgetLayout);
View Full Code Here

            if (registry.resourceExists(gadgetLayoutPath)) {
                gadgetLayout = registry.get(gadgetLayoutPath);
            } else {
                // If the layout is not there, this might be a new tab. Create
                // new resource
                gadgetLayout = registry.newCollection();
                registry.put(gadgetLayoutPath, gadgetLayout);
            }

            // Retrieving the gadget layout
            response = gadgetLayout
View Full Code Here

            Resource gadgetLayout;
            if (registry.resourceExists(tabLayoutPath)) {
                gadgetLayout = registry.get(tabLayoutPath);
            } else {
                // If not found we need to create the first gadget tab
                gadgetLayout = registry.newCollection();
            }

            // Retrieving the current tab layout
            response = gadgetLayout
                    .getProperty(DashboardConstants.CURRENT_TAB_LAYOUT);
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.