Examples of ValidationInfoRetriever


Examples of org.wso2.carbon.throttling.agent.validation.ValidationInfoRetriever

        }
        CurrentSession.setAttribute(StratosConstants.REGISTRY_ACTION_VALIDATED_SESSION_ATTR, true);

        int tenantId = CurrentSession.getTenantId();

        ValidationInfoRetriever validationInfoRetriever = Util.getValidationInfoRetriever();
        ValidationInfo validationInfo;
        try {
            validationInfo = validationInfoRetriever.getValidationInfo(action, tenantId);
        } catch (ValidationException e) {
            String msg = "Error in getting the validation information.";
            log.error(msg, e);
            throw new RegistryException(msg, e);
        }
View Full Code Here

Examples of org.wso2.carbon.throttling.agent.validation.ValidationInfoRetriever

    }

    public static void initializeValidationInfoRetriever(BundleContext bundleContext)
            throws Exception {
        UserRegistry superTenantGovernanceRegistry = registryService.getGovernanceSystemRegistry();
        validationInfoRetriever = new ValidationInfoRetriever(superTenantGovernanceRegistry);

        if (bundleContext != null) {
            bundleContext.registerService(ValidationInfoRetriever.class.getName(),
                    validationInfoRetriever, null);
        }
View Full Code Here

Examples of org.wso2.carbon.throttling.agent.validation.ValidationInfoRetriever

        if(tenantId <= 0){
            //We can allow all super tenant actions
            return InvocationResponse.CONTINUE;
        }
       
        ValidationInfoRetriever validationInfoRetriever = Util.getValidationInfoRetriever();
        String[] actions = new String[]{StratosConstants.THROTTLING_SERVICE_IN_BANDWIDTH_ACTION,
                                        StratosConstants.THROTTLING_SERVICE_OUT_BANDWIDTH_ACTION,
                                        StratosConstants.THROTTLING_SERVICE_REQUEST_ACTION,
                                        StratosConstants.THROTTLING_SERVICE_RESPONSE_ACTION
                                        };
        ValidationInfo validationInfo;
        try {
            validationInfo = validationInfoRetriever.getValidationInfo(actions, tenantId);
        } catch (ValidationException e) {
            String msg = "Error in getting the validation information.";
            log.error(msg, e);
            throw new AxisFault(msg, e);
        }
View Full Code Here

Examples of org.wso2.carbon.throttling.agent.validation.ValidationInfoRetriever

            String msg = "Error in executing the throttling rules in manager.";
            log.error(msg + " tenantId: " + tenantId + ".", e1);
            throw new UserStoreException(msg, e1);
        }

        ValidationInfoRetriever validationInforRetriever = Util.getValidationInfoRetriever();
        ValidationInfo validationInfo;
        try {
            validationInfo = validationInforRetriever.getValidationInfo(
                            StratosConstants.THROTTLING_ADD_USER_ACTION, tenantId);
        } catch (ValidationException e) {
            String msg = "Error in getting the validation information.";
            log.error(msg, e);
            throw new UserStoreException(msg, e);
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.