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

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


            if (registry.resourceExists(
                    DashboardConstants.REGISTRY_ADMIN_PROPERTIES_PATH)) {
                regAdminDataResource = registry.get(
                        DashboardConstants.REGISTRY_ADMIN_PROPERTIES_PATH);
            } else {
                regAdminDataResource = registry.newResource();
            }

            regAdminDataResource
                    .setProperty(
                            DashboardConstants.USER_EXTERNAL_GADGET_ADD_PROPERTY_ID,
View Full Code Here


            if (registry.resourceExists(
                    DashboardConstants.REGISTRY_ADMIN_PROPERTIES_PATH)) {
                regAdminDataResource = registry.get(
                        DashboardConstants.REGISTRY_ADMIN_PROPERTIES_PATH);
            } else {
                regAdminDataResource = registry.newResource();
            }

            regAdminDataResource
                    .setProperty(
                            DashboardConstants.ANON_MODE_ACT,
View Full Code Here

        try {
            Registry registry = GadgetServerSocialDataMgtServiceContext.getRegistry();
            if (registry.resourceExists(profileImagePath)) {
                profileImageRes = registry.get(profileImagePath);
            } else {
                profileImageRes = registry.newResource();
            }
            byte[] imgData = Base64.decode(profileImage);
            profileImageRes.setContent(imgData);
            profileImageRes.setMediaType(mediaType);
            registry.put(profileImagePath, profileImageRes);
View Full Code Here

        try {
            if (reg.resourceExists(DashboardConstants.OAUTH_KEY_STORE + "/" + entry.getService()) && "new".equals(mode)) {
                throw new AxisFault("Consumer already exists", new IllegalArgumentException());
            } else {
                Resource res = reg.newResource();
                if ("update".equals(mode)) {
                    res = reg.get(DashboardConstants.OAUTH_KEY_STORE + "/" + entry.getService());
                }
                res.setProperty(DashboardConstants.CONSUMER_KEY_KEY, entry.getConsumerKey());
                res.setProperty(DashboardConstants.CONSUMER_SECRET_KEY, entry.getConsumerSecret());
View Full Code Here

            Resource regAdminDataResource;
            if (registry.resourceExists(
                    DashboardConstants.REGISTRY_ADMIN_PROPERTIES_PATH)) {
                regAdminDataResource = registry.get(DashboardConstants.REGISTRY_ADMIN_PROPERTIES_PATH);
            } else {
                regAdminDataResource = registry.newResource();
            }

            regAdminDataResource
                    .setProperty(DashboardConstants.USER_SELF_REG_PROPERTY_ID,
                            String.valueOf(flag));
View Full Code Here

            if (registry.resourceExists(
                    DashboardConstants.REGISTRY_ADMIN_PROPERTIES_PATH)) {
                regAdminDataResource = registry.get(
                        DashboardConstants.REGISTRY_ADMIN_PROPERTIES_PATH);
            } else {
                regAdminDataResource = registry.newResource();
            }

            regAdminDataResource
                    .setProperty(
                            DashboardConstants.USER_EXTERNAL_GADGET_ADD_PROPERTY_ID,
View Full Code Here

                    log.info("Successfully populated the default Gadgets.");
                } else {
                    log.info("Couldn't find contents at '" + gadgetsDiskLocation +
                            "'. Giving up.");
                }
                registry.put(REGISTRY_SYSTEM_DASHBOARDS_ROOT + "/" + serverName, registry.newResource());
            }

        } catch (Exception e) {
            log.debug("Failed to activate Dashboard Populator for Governance bundle ");
        }
View Full Code Here

                if (!scenarioId.equals(SecurityConstants.SCENARIO_DISABLE_SECURITY) &&
                        !scenarioId.equals(SecurityConstants.POLICY_FROM_REG_SCENARIO)) {
                    String resourceUri = SecurityConstants.SECURITY_POLICY + "/" + scenarioId;
                    if (!scenarioId.equals(SecurityConstants.SCENARIO_DISABLE_SECURITY) &&
                            !scenarioId.equals(SecurityConstants.POLICY_FROM_REG_SCENARIO)) {
                        Resource scenarioResource = tenantUserRegistry.newResource();
                        URL resource =
                                       IdentitySTSMgtServiceComponent.getBundleContext().
                                                                      getBundle().
                                                                      getResource(scenarioId +
                                                                                  "-policy.xml");
View Full Code Here

    public void testVirtualRoots() throws Exception {

        RealmConfiguration realmConfig = ctx.getRealmService().getBootstrapRealmConfiguration();
        UserRegistry registry1 =
                embeddedRegistryService.getUserRegistry(realmConfig.getAdminUserName(), 0);
        Resource r = registry1.newResource();
        registry1.put("/test", r);

        r = registry1.get("/");
        r.addProperty("name", "value");
        registry1.put("/", r);
View Full Code Here

        RealmConfiguration realmConfig = ctx.getRealmService().getBootstrapRealmConfiguration();
        // first we will fill the user store for tenant 0
        UserRegistry registry1 =
                embeddedRegistryService.getUserRegistry(realmConfig.getAdminUserName(), 0);

        Resource r = registry1.newResource();
        registry1.put("/test2", r);

        UserRealm userRealm1 = registry1.getUserRealm();
        UserStoreManager userStoreManager1;
        try {
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.