Examples of resourceExists()


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

        try {
            resourcePath = RegistryResources.SERVICE_GROUPS + groupName
                    + RegistryResources.SERVICES + serviceName + "/trustedServices";
            registry = getConfigSystemRegistry(); //TODO: Multitenancy
            if (registry != null) {
                if (registry.resourceExists(resourcePath)) {
                    resource = registry.get(resourcePath);
                } else {
                    resource = registry.newResource();
                }
                if (resource.getProperty(trustedService) != null) {
View Full Code Here

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

        try {
            resourcePath = RegistryResources.SERVICE_GROUPS + groupName
                    + RegistryResources.SERVICES + serviceName + "/trustedServices";
            registry = getConfigSystemRegistry(); //TODO: Multitenancy
            if (registry != null) {
                if (registry.resourceExists(resourcePath)) {
                    resource = registry.get(resourcePath);
                    if (resource.getProperty(trustedService) != null) {
                        resource.removeProperty(trustedService);
                    }
                    registry.put(resourcePath, resource);
View Full Code Here

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

        if (uiPermissions != null) {
            // at the starup we are only adding permission only to tenant 0
            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

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

            for (Mount mount : registryContext.getMounts()) {
                if (isFixedMount(registry, mount.getPath(), mount.getTargetPath(), isSuperTenant)) {
                    addFixedMount(tenantId, superTenantRegistry, mount.getPath());
                    continue;
                }
                if (!registry.resourceExists(mount.getPath())) {
                    if (isSuperTenant) {
                        superTenantRegistry.createLink(mount.getPath(), mount.getInstanceId(),
                                mount.getTargetPath());
                    } else {
                        createPseudoLink(registry, mount.getPath(), mount.getInstanceId(),
View Full Code Here

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

                    log.error("Unable to create remote mount. A resource already exists at the " +
                            "given location: " + mount.getPath());
                    continue;
                }
                try {
                    if (!registry.resourceExists(mount.getPath())) {
                        log.warn("Target path does not exist for the given mount: " +
                                mount.getPath());
                    }
                } catch (Exception e) {
                    log.warn("Target path does not exist for the given mount: " +
View Full Code Here

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

        Registry registry = getConfigSystemRegistry();
        try {
            String resourcePath = moduleResourcePath + RegistryResources.PARAMETERS + paramName;
            Resource paramResource = null;
            if (registry.resourceExists(resourcePath)) {
                paramResource = registry.get(resourcePath);
                paramResource.setContent("<parameter name=\"" + paramName + "\" locked=\"false\">" + paramValue + "</parameter>");
                registry.put(resourcePath, paramResource);
            } else {
                paramResource = registry.newResource();
View Full Code Here

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

            if (serverName.length() > 0) {
                gadgetsPath = SYSTEM_GADGETS_PATH + "/" + serverPrefix;
            }*/

            if (!registry.resourceExists(REGISTRY_SYSTEM_DASHBOARDS_ROOT + "/" + serverName)) {
                // Creating an OMElement from file
                File dashboardConfigXml = new File(dashboardConfigFile);

                if (dashboardConfigXml.exists()) {
                    FileReader dashboardConfigXmlReader = new FileReader(dashboardConfigXml);
View Full Code Here

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

        String keyStoreLocation = SecurityConstants.KEY_STORES + "/" + keyStoreName;
        boolean isKeyStoreExisting = false;
        try {
            UserRegistry govRegistry = IdentityProviderServiceComponent.getRegistryService().
                    getGovernanceSystemRegistry();
            if(govRegistry.resourceExists(keyStoreLocation)){
                isKeyStoreExisting = true;
            }
        } catch (RegistryException e) {
            String errorMsg = "Error when checking the existence of " + keyStorePath + " in the Governance" +
                              "Registry.";
View Full Code Here

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

        int tenantId = ((UserRegistry)registry).getTenantId();
        UserRegistry govRegistry = SecurityServiceHolder.getRegistryService().
                getGovernanceSystemRegistry(tenantId);
        try {
            KeyStoreManager keyMan = KeyStoreManager.getInstance(govRegistry);
            if (govRegistry.resourceExists(SecurityConstants.KEY_STORES)) {
                Collection collection = (Collection) govRegistry.get(SecurityConstants.KEY_STORES);
                String[] ks = collection.getChildren();

                for (int i = 0; i < ks.length; i++) {
View Full Code Here

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

            if (log.isTraceEnabled()) {
                log.trace("Creating system collections used in WSO2 Registry server.");
            }

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

                try {
                    boolean inTransaction = Transaction.isStarted();
                    if (!inTransaction) {
                        systemRegistry.beginTransaction();
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.