Package org.wso2.carbon.registry.core

Examples of org.wso2.carbon.registry.core.Registry.resourceExists()


        try {
            Registry registry = GadgetServerUserManagementContext.getRegistry(tenantId);

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


        try {
            Registry registry = GadgetServerUserManagementContext.getRegistry(tenantId);

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

        try {
            Registry registry = GadgetServerUserManagementContext.getRegistry(tenantId);

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

        try {
            Registry registry = GadgetServerUserManagementContext.getRegistry(tenantId);

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

                String storedValue = regAdminDataResource
View Full Code Here

                        + gadgetId + DashboardConstants.GADGET_PREFERENCE_PATH + prefId;
            }

            Resource gadgetPreferences;

            if (registry.resourceExists(gadgetPrefPath)) {
                gadgetPreferences = registry.get(gadgetPrefPath);
            } else {
                gadgetPreferences = registry.newResource();
            }
View Full Code Here

                return false;
            }

            Resource gadgetLayout;

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

                        + tabId
                        + DashboardConstants.CURRENT_GADGET_LAYOUT_PATH;
            }

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

            Resource resource;
            Registry governanceSystemRegistry = getGovernanceSystemRegistry(registry);
            if (governanceSystemRegistry == null) {
                governanceSystemRegistry = registry;
            }
            if (governanceSystemRegistry.resourceExists(
                    GovernanceConstants.GOVERNANCE_ARTIFACT_INDEX_PATH)) {
                resource = governanceSystemRegistry.get(
                        GovernanceConstants.GOVERNANCE_ARTIFACT_INDEX_PATH);
            } else {
                String msg = "The artifact index doesn't exist. artifact index path: " +
View Full Code Here

        try {
            Registry governanceSystemRegistry = getGovernanceSystemRegistry(registry);
            if (governanceSystemRegistry == null) {
                governanceSystemRegistry = registry;
            }
            if (!governanceSystemRegistry.resourceExists(
                    GovernanceConstants.GOVERNANCE_ARTIFACT_INDEX_PATH)) {
                String msg = "The artifact index doesn't exist. artifact index path: " +
                        GovernanceConstants.GOVERNANCE_ARTIFACT_INDEX_PATH + ".";
                if (log.isDebugEnabled()) {
                    log.debug(msg);
View Full Code Here

                tabLayoutPath = DashboardConstants.SYSTEM_DASHBOARDS_REGISTRY_ROOT
                        + dashboardName + DashboardConstants.TAB_PATH;
            }

            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();
            }
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.