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

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


                Util.getGovernanceSystemRegistry(MultitenantConstants.SUPER_TENANT_ID);
        String domainValidatorInfoPath = StratosConstants.DOMAIN_VALIDATOR_INFO_PATH +
                                         RegistryConstants.PATH_SEPARATOR +
                                         domain + RegistryConstants.PATH_SEPARATOR +
                                         StratosConstants.VALIDATION_KEY_RESOURCE_NAME;
        if (governanceSystemRegistry.resourceExists(domainValidatorInfoPath)) {
            Resource resource = governanceSystemRegistry.get(domainValidatorInfoPath);
            Object contentObj = resource.getContent();
            if (contentObj instanceof String) {
                return (String) contentObj;
            } else if (contentObj instanceof byte[]) {
View Full Code Here


                                         RegistryConstants.PATH_SEPARATOR +
                                         domain + RegistryConstants.PATH_SEPARATOR +
                                         StratosConstants.VALIDATION_KEY_RESOURCE_NAME;
       
        String domainValidationKey = "";
        if (!governanceSystemRegistry.resourceExists(domainValidatorInfoPath)) {
            return "false";
        }
        Resource resource = governanceSystemRegistry.get(domainValidatorInfoPath);
        Object content = resource.getContent();
        if (content instanceof String) {
View Full Code Here

        String domainValidatorInfoPath = StratosConstants.DOMAIN_VALIDATOR_INFO_PATH +
                                         RegistryConstants.PATH_SEPARATOR +
                                         domain + RegistryConstants.PATH_SEPARATOR +
                                         StratosConstants.VALIDATION_KEY_RESOURCE_NAME;
        String domainValidationKey = "";
        if (!governanceSystemRegistry.resourceExists(domainValidatorInfoPath)) {
            return "false";
        }
        Resource resource = governanceSystemRegistry.get(domainValidatorInfoPath);
        Object content = resource.getContent();
        if (content instanceof String) {
View Full Code Here

                            log.debug("Resource Deleted: Resource at " + path +
                                    " will be deleted from Indexing Server");
                        }
                    } else if (indexingManager.canIndex(path) &&
                            IndexingUtils.isAuthorized(registry, path, ActionConstants.GET) &&
                            registry.resourceExists(path) &&
                            indexingManager.isIndexable(resourceToIndex = registry.get(path))) {
                        if (logEntry.getAction() == LogEntry.UPDATE) {
                            indexingManager.submitFileForIndexing(resourceToIndex, path, null);
                            if (log.isDebugEnabled()) {
                                log.debug("Resource Updated: Resource at " + path +
View Full Code Here

        UserRegistry superTenantSystemRegistry = TenantMgtServiceComponent
                .getGovernanceSystemRegistry(MultitenantConstants.SUPER_TENANT_ID);
        String adminManagementPath = StratosConstants.ADMIN_MANAGEMENT_FLAG_PATH +
                                     RegistryConstants.PATH_SEPARATOR + tenantId;
        Resource resource = null;
        if (superTenantSystemRegistry.resourceExists(adminManagementPath)) {
            resource = superTenantSystemRegistry.get(adminManagementPath);
            String actualConfirmationKey = null;
            Object content = resource.getContent();
            if (content instanceof String) {
                actualConfirmationKey = (String) content;
View Full Code Here

     */
    public RegistryMessageBoxHandler() throws MessageBoxException {

        try {
            UserRegistry userRegistry = Utils.getUserRegistry();
            if (!userRegistry.resourceExists(MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH)) {
                userRegistry.put(MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH,
                                 userRegistry.newCollection());
            }
        } catch (RegistryException e) {
            throw new MessageBoxException("Can not access the user registry ", e);
View Full Code Here

            throws MessageBoxException {
        // create a new collection for this message box
        // here we need to store the message boxes with the user
        try {
            UserRegistry userRegistry = Utils.getUserRegistry();
            if (!userRegistry.resourceExists(MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH)) {
                userRegistry.put(MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH,
                                 userRegistry.newCollection());
            }
            Collection collection = userRegistry.newCollection();
            collection.setProperty(MessageBoxConstants.MB_PROPERYY_VISIBILITY_TIMEOUT,
View Full Code Here

     */
    private String getUserName(String accessKeyId)
            throws MessageBoxException {
        try {
            UserRegistry userRegistry = Utils.getUserRegistry();
            if (userRegistry.resourceExists(MessageBoxConstants.REGISTRY_ACCESS_KEY_INDEX_PATH)) {
                org.wso2.carbon.registry.api.Collection userCollection =
                        (org.wso2.carbon.registry.api.Collection) userRegistry.
                                get(MessageBoxConstants.REGISTRY_ACCESS_KEY_INDEX_PATH);
                if (userCollection != null) {
                    return userCollection.getProperty(accessKeyId);
View Full Code Here

        }
        Resource resource;
        String emailVerificationPath = StratosConstants.ADMIN_EMAIL_VERIFICATION_FLAG_PATH +
                                       RegistryConstants.PATH_SEPARATOR + tenantId;
        try {
            if (superTenantGovernanceSystemRegistry.resourceExists(emailVerificationPath)) {
                resource = superTenantGovernanceSystemRegistry.get(emailVerificationPath);
            } else {
                resource = superTenantGovernanceSystemRegistry.newResource();
            }
            resource.setContent(confirmationKey);
View Full Code Here

        Resource resource;
        String adminManagementPath = StratosConstants.ADMIN_MANAGEMENT_FLAG_PATH +
                                     RegistryConstants.PATH_SEPARATOR + tenantId;

        if (superTenantGovernanceSystemRegistry.resourceExists(adminManagementPath)) {
            resource = superTenantGovernanceSystemRegistry.get(adminManagementPath);
        } else {
            resource = superTenantGovernanceSystemRegistry.newResource();
        }
        resource.setContent(confirmationKey);
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.