Search in sources :

Example 91 with Attribute

use of org.wso2.charon3.core.attributes.Attribute in project carbon-apimgt by wso2.

the class SubscriptionThrottlePolicyMappingUtil method fromSubscriptionThrottlePolicyToDTO.

/**
 * Converts a single Subscription Policy model into REST API DTO
 *
 * @param policy Subscription Policy model object
 * @return Converted Subscription policy REST API DTO object
 * @throws SubscriptionThrottlePolicyException - If error occurs
 */
public static SubscriptionThrottlePolicyDTO fromSubscriptionThrottlePolicyToDTO(SubscriptionPolicy policy) throws SubscriptionThrottlePolicyException {
    try {
        SubscriptionThrottlePolicyDTO policyDTO = new SubscriptionThrottlePolicyDTO();
        policyDTO = CommonThrottleMappingUtil.updateFieldsFromToPolicyToDTO(policy, policyDTO);
        SubscriptionPolicy subscriptionPolicy = policy;
        policyDTO.setBillingPlan(subscriptionPolicy.getBillingPlan());
        policyDTO.setRateLimitCount(subscriptionPolicy.getRateLimitCount());
        policyDTO.setRateLimitTimeUnit(subscriptionPolicy.getRateLimitTimeUnit());
        policyDTO.setStopOnQuotaReach(subscriptionPolicy.isStopOnQuotaReach());
        byte[] customAttributes = subscriptionPolicy.getCustomAttributes();
        if (customAttributes != null && customAttributes.length > 0) {
            List<CustomAttributeDTO> customAttributeDTOs = new ArrayList<>();
            JSONParser parser = new JSONParser();
            JSONArray attributeArray = (JSONArray) parser.parse(new String(customAttributes, StandardCharsets.UTF_8));
            for (Object attributeObj : attributeArray) {
                JSONObject attribute = (JSONObject) attributeObj;
                CustomAttributeDTO customAttributeDTO = CommonThrottleMappingUtil.getCustomAttribute(attribute.get(RestApiConstants.THROTTLING_CUSTOM_ATTRIBUTE_NAME).toString(), attribute.get(RestApiConstants.THROTTLING_CUSTOM_ATTRIBUTE_VALUE).toString());
                customAttributeDTOs.add(customAttributeDTO);
            }
            policyDTO.setCustomAttributes(customAttributeDTOs);
        }
        if (policy.getDefaultQuotaPolicy() != null) {
            policyDTO.setDefaultLimit(CommonThrottleMappingUtil.fromQuotaPolicyToDTO(policy.getDefaultQuotaPolicy()));
        }
        return policyDTO;
    } catch (ParseException | UnsupportedThrottleLimitTypeException e) {
        throw new SubscriptionThrottlePolicyException(e.getMessage(), e);
    }
}
Also used : SubscriptionThrottlePolicyDTO(org.wso2.carbon.apimgt.rest.api.admin.dto.SubscriptionThrottlePolicyDTO) ArrayList(java.util.ArrayList) JSONArray(org.json.simple.JSONArray) SubscriptionThrottlePolicyException(org.wso2.carbon.apimgt.rest.api.admin.exceptions.SubscriptionThrottlePolicyException) UnsupportedThrottleLimitTypeException(org.wso2.carbon.apimgt.rest.api.admin.exceptions.UnsupportedThrottleLimitTypeException) JSONObject(org.json.simple.JSONObject) SubscriptionPolicy(org.wso2.carbon.apimgt.core.models.policy.SubscriptionPolicy) JSONParser(org.json.simple.parser.JSONParser) JSONObject(org.json.simple.JSONObject) ParseException(org.json.simple.parser.ParseException) CustomAttributeDTO(org.wso2.carbon.apimgt.rest.api.admin.dto.CustomAttributeDTO)

Example 92 with Attribute

use of org.wso2.charon3.core.attributes.Attribute in project carbon-apimgt by wso2.

the class PolicyDAOImplIT method testGetSubscriptionPolicies.

@Test(description = "Get Subscription Policies")
public void testGetSubscriptionPolicies() throws Exception {
    SubscriptionPolicy policy = SampleTestObjectCreator.createDefaultSubscriptionPolicy();
    SubscriptionPolicy policy2 = SampleTestObjectCreator.createSubscriptionPolicyWithBandwithLimit();
    // policy 1 has following 2 true. checking for fault scenario from policy2
    policy2.setStopOnQuotaReach(false);
    policy2.setDeployed(false);
    PolicyDAO policyDAO = DAOFactory.getPolicyDAO();
    // add policy
    policyDAO.addSubscriptionPolicy(policy);
    policyDAO.addSubscriptionPolicy(policy2);
    List<SubscriptionPolicy> policyList = policyDAO.getSubscriptionPolicies();
    Assert.assertNotNull(policyList);
    SubscriptionPolicy retrievedPolicy = null;
    SubscriptionPolicy retrievedPolicy2 = null;
    // there are defaut policies already there
    for (Iterator iterator = policyList.iterator(); iterator.hasNext(); ) {
        SubscriptionPolicy subscriptionPolicy = (SubscriptionPolicy) iterator.next();
        if (subscriptionPolicy.getPolicyName().equals(policy.getPolicyName())) {
            retrievedPolicy = policy;
        }
        if (subscriptionPolicy.getPolicyName().equals(policy2.getPolicyName())) {
            retrievedPolicy2 = policy2;
        }
    }
    Assert.assertNotNull(retrievedPolicy, "Policy " + policy.getPolicyName() + " not in DB");
    Assert.assertNotNull(retrievedPolicy2, "Policy " + policy2.getPolicyName() + " not in DB");
    Assert.assertEquals(retrievedPolicy.getPolicyName(), policy.getPolicyName(), "Subscription policy name mismatch");
    Assert.assertEquals(retrievedPolicy.getDisplayName(), policy.getDisplayName(), "Subscription policy display name mismatch");
    Assert.assertEquals(retrievedPolicy.getDescription(), policy.getDescription(), "Subscription policy description mismatch");
    Assert.assertEquals(retrievedPolicy.isDeployed(), policy.isDeployed(), "Subscription policy isDeployed mismatch");
    Assert.assertEquals(retrievedPolicy.getRateLimitCount(), policy.getRateLimitCount(), "Subscription policy rate limit mismatch");
    Assert.assertEquals(retrievedPolicy.getRateLimitTimeUnit(), policy.getRateLimitTimeUnit(), "Subscription policy rate limit mismatch");
    Assert.assertEquals(retrievedPolicy.isStopOnQuotaReach(), policy.isStopOnQuotaReach(), "Subscription policy stop on quota reach mismatch");
    Assert.assertEquals(retrievedPolicy.getCustomAttributes(), policy.getCustomAttributes(), "Subscription policy custom attribute mismatch");
    Assert.assertEquals(retrievedPolicy.getDefaultQuotaPolicy().getType(), policy.getDefaultQuotaPolicy().getType(), "Subscription policy default quota type mismatch");
    RequestCountLimit limitRetrieved = (RequestCountLimit) retrievedPolicy.getDefaultQuotaPolicy().getLimit();
    RequestCountLimit policyLimit = (RequestCountLimit) policy.getDefaultQuotaPolicy().getLimit();
    Assert.assertEquals(limitRetrieved.getRequestCount(), policyLimit.getRequestCount(), "Subscription policy default quota count mismatch");
    Assert.assertEquals(limitRetrieved.getTimeUnit(), policyLimit.getTimeUnit(), "Subscription policy default quota time unit mismatch");
    Assert.assertEquals(limitRetrieved.getUnitTime(), policyLimit.getUnitTime(), "Subscription policy default quota unit time mismatch");
    // check policy related properties for policy 2
    Assert.assertEquals(retrievedPolicy2.getPolicyName(), policy2.getPolicyName(), "Subscription policy name mismatch");
    Assert.assertEquals(retrievedPolicy2.getDisplayName(), policy2.getDisplayName(), "Subscription policy display name mismatch");
    Assert.assertEquals(retrievedPolicy2.getDescription(), policy2.getDescription(), "Subscription policy description mismatch");
    Assert.assertEquals(retrievedPolicy2.isDeployed(), policy2.isDeployed(), "Subscription policy isDeployed mismatch");
    Assert.assertEquals(retrievedPolicy2.getRateLimitCount(), policy2.getRateLimitCount(), "Subscription policy rate limit mismatch");
    Assert.assertEquals(retrievedPolicy2.getRateLimitTimeUnit(), policy2.getRateLimitTimeUnit(), "Subscription policy rate limit mismatch");
    Assert.assertEquals(retrievedPolicy2.isStopOnQuotaReach(), policy2.isStopOnQuotaReach(), "Subscription policy stop on quota reach mismatch");
    Assert.assertEquals(retrievedPolicy2.getCustomAttributes(), policy2.getCustomAttributes(), "Subscription policy custom attribute mismatch");
    Assert.assertEquals(retrievedPolicy2.getDefaultQuotaPolicy().getType(), policy2.getDefaultQuotaPolicy().getType(), "Subscription policy default quota type mismatch");
    BandwidthLimit limitRetrieved2 = (BandwidthLimit) retrievedPolicy2.getDefaultQuotaPolicy().getLimit();
    BandwidthLimit policyLimit2 = (BandwidthLimit) policy2.getDefaultQuotaPolicy().getLimit();
    Assert.assertEquals(limitRetrieved2.getDataAmount(), policyLimit2.getDataAmount(), "Subscription policy default quota data amount mismatch");
    Assert.assertEquals(limitRetrieved2.getDataUnit(), policyLimit2.getDataUnit(), "Subscription policy default quota data amount mismatch");
    Assert.assertEquals(limitRetrieved2.getTimeUnit(), policyLimit2.getTimeUnit(), "Subscription policy default quota time unit mismatch");
    Assert.assertEquals(limitRetrieved2.getUnitTime(), policyLimit2.getUnitTime(), "Subscription policy default quota unit time mismatch");
}
Also used : RequestCountLimit(org.wso2.carbon.apimgt.core.models.policy.RequestCountLimit) SubscriptionPolicy(org.wso2.carbon.apimgt.core.models.policy.SubscriptionPolicy) Iterator(java.util.Iterator) PolicyDAO(org.wso2.carbon.apimgt.core.dao.PolicyDAO) BandwidthLimit(org.wso2.carbon.apimgt.core.models.policy.BandwidthLimit) Test(org.testng.annotations.Test)

Example 93 with Attribute

use of org.wso2.charon3.core.attributes.Attribute in project carbon-apimgt by wso2.

the class PolicyDAOImplIT method testGetSubscriptionPolicyByUUIDandName.

@Test(description = "Get Subscription Policy by Name and UUID")
public void testGetSubscriptionPolicyByUUIDandName() throws Exception {
    SubscriptionPolicy policy = SampleTestObjectCreator.createDefaultSubscriptionPolicy();
    PolicyDAO policyDAO = DAOFactory.getPolicyDAO();
    // add policy
    policyDAO.addSubscriptionPolicy(policy);
    SubscriptionPolicy retrievedPolicy = policyDAO.getSubscriptionPolicy(policy.getPolicyName());
    Assert.assertNotNull(retrievedPolicy);
    Assert.assertEquals(retrievedPolicy.getPolicyName(), policy.getPolicyName(), "Subscription policy name mismatch");
    Assert.assertEquals(retrievedPolicy.getDisplayName(), policy.getDisplayName(), "Subscription policy display name mismatch");
    Assert.assertEquals(retrievedPolicy.getDescription(), policy.getDescription(), "Subscription policy description mismatch");
    Assert.assertEquals(retrievedPolicy.isDeployed(), policy.isDeployed(), "Subscription policy isDeployed mismatch");
    Assert.assertEquals(retrievedPolicy.getRateLimitCount(), policy.getRateLimitCount(), "Subscription policy rate limit mismatch");
    Assert.assertEquals(retrievedPolicy.getRateLimitTimeUnit(), policy.getRateLimitTimeUnit(), "Subscription policy rate limit mismatch");
    Assert.assertEquals(retrievedPolicy.isStopOnQuotaReach(), policy.isStopOnQuotaReach(), "Subscription policy stop on quota reach mismatch");
    Assert.assertEquals(retrievedPolicy.getCustomAttributes(), policy.getCustomAttributes(), "Subscription policy custom attribute mismatch");
    Assert.assertEquals(retrievedPolicy.getDefaultQuotaPolicy().getType(), policy.getDefaultQuotaPolicy().getType(), "Subscription policy default quota type mismatch");
    RequestCountLimit limitRetrieved = (RequestCountLimit) retrievedPolicy.getDefaultQuotaPolicy().getLimit();
    RequestCountLimit policyLimit = (RequestCountLimit) policy.getDefaultQuotaPolicy().getLimit();
    Assert.assertEquals(limitRetrieved.getRequestCount(), policyLimit.getRequestCount(), "Subscription policy default quota count mismatch");
    Assert.assertEquals(limitRetrieved.getTimeUnit(), policyLimit.getTimeUnit(), "Subscription policy default quota time unit mismatch");
    Assert.assertEquals(limitRetrieved.getUnitTime(), policyLimit.getUnitTime(), "Subscription policy default quota unit time mismatch");
    // get the UUID of the created policy. since this value is generated in the code, we use previously retrieved
    // policy to get the uuid and again query the policy
    String uuid = retrievedPolicy.getUuid();
    retrievedPolicy = policyDAO.getSubscriptionPolicyByUuid(uuid);
    Assert.assertNotNull(retrievedPolicy);
    Assert.assertEquals(retrievedPolicy.getPolicyName(), policy.getPolicyName(), "Subscription policy name mismatch");
    Assert.assertEquals(retrievedPolicy.getDisplayName(), policy.getDisplayName(), "Subscription policy display name mismatch");
    Assert.assertEquals(retrievedPolicy.getDescription(), policy.getDescription(), "Subscription policy description mismatch");
    Assert.assertEquals(retrievedPolicy.isDeployed(), policy.isDeployed(), "Subscription policy isDeployed mismatch");
    Assert.assertEquals(retrievedPolicy.getRateLimitCount(), policy.getRateLimitCount(), "Subscription policy rate limit mismatch");
    Assert.assertEquals(retrievedPolicy.getRateLimitTimeUnit(), policy.getRateLimitTimeUnit(), "Subscription policy rate limit mismatch");
    Assert.assertEquals(retrievedPolicy.isStopOnQuotaReach(), policy.isStopOnQuotaReach(), "Subscription policy stop on quota reach mismatch");
    Assert.assertEquals(retrievedPolicy.getCustomAttributes(), policy.getCustomAttributes(), "Subscription policy custom attribute mismatch");
    Assert.assertEquals(retrievedPolicy.getDefaultQuotaPolicy().getType(), policy.getDefaultQuotaPolicy().getType(), "Subscription policy default quota type mismatch");
    limitRetrieved = (RequestCountLimit) retrievedPolicy.getDefaultQuotaPolicy().getLimit();
    policyLimit = (RequestCountLimit) policy.getDefaultQuotaPolicy().getLimit();
    Assert.assertEquals(limitRetrieved.getRequestCount(), policyLimit.getRequestCount(), "Subscription policy default quota count mismatch");
    Assert.assertEquals(limitRetrieved.getTimeUnit(), policyLimit.getTimeUnit(), "Subscription policy default quota time unit mismatch");
    Assert.assertEquals(limitRetrieved.getUnitTime(), policyLimit.getUnitTime(), "Subscription policy default quota unit time mismatch");
}
Also used : RequestCountLimit(org.wso2.carbon.apimgt.core.models.policy.RequestCountLimit) SubscriptionPolicy(org.wso2.carbon.apimgt.core.models.policy.SubscriptionPolicy) PolicyDAO(org.wso2.carbon.apimgt.core.dao.PolicyDAO) Test(org.testng.annotations.Test)

Example 94 with Attribute

use of org.wso2.charon3.core.attributes.Attribute in project carbon-apimgt by wso2.

the class APIStoreImplTestCase method testAddApplicationUpdateWorkflowReject.

@Test(description = "Test Application update workflow reject")
public void testAddApplicationUpdateWorkflowReject() throws APIManagementException {
    /*
         * This test is to validate the rollback the application to its previous state for application
         * update request rejection
         */
    ApplicationDAO applicationDAO = Mockito.mock(ApplicationDAO.class);
    PolicyDAO policyDAO = Mockito.mock(PolicyDAO.class);
    WorkflowDAO workflowDAO = Mockito.mock(WorkflowDAO.class);
    Policy policy = Mockito.mock(Policy.class);
    APIStore apiStore = getApiStoreImpl(applicationDAO, policyDAO, workflowDAO);
    Application application = new Application(APP_NAME, USER_NAME);
    application.setStatus(ApplicationStatus.APPLICATION_APPROVED);
    application.setPolicy(new ApplicationPolicy(TIER));
    application.setId(UUID);
    application.setPermissionString("[{\"groupId\": \"testGroup\",\"permission\":[\"READ\",\"UPDATE\",\"DELETE\",\"SUBSCRIPTION\"]}]");
    Mockito.when(applicationDAO.isApplicationNameExists(APP_NAME)).thenReturn(false);
    Mockito.when(policyDAO.getPolicyByLevelAndName(APIMgtAdminService.PolicyLevel.application, TIER)).thenReturn(policy);
    // following section mock the workflow callback api
    DefaultWorkflowExecutor executor = Mockito.mock(DefaultWorkflowExecutor.class);
    APIGateway apiGateway = Mockito.mock(APIGateway.class);
    Workflow workflow = new ApplicationUpdateWorkflow(applicationDAO, workflowDAO, apiGateway);
    workflow.setWorkflowReference(application.getId());
    workflow.setExternalWorkflowReference(UUID);
    // validate the rejection flow
    // here we assume the application is an approve state before update
    // this attribute is set internally based on the workflow data
    workflow.setAttribute(WorkflowConstants.ATTRIBUTE_APPLICATION_EXISTIN_APP_STATUS, ApplicationStatus.APPLICATION_APPROVED);
    WorkflowResponse response = new GeneralWorkflowResponse();
    response.setWorkflowStatus(WorkflowStatus.REJECTED);
    Mockito.when(executor.complete(workflow)).thenReturn(response);
    apiStore.completeWorkflow(executor, workflow);
    Mockito.verify(applicationDAO, Mockito.times(1)).updateApplicationState(application.getId(), ApplicationStatus.APPLICATION_APPROVED);
    // here we assume the application is an rejected state before update.
    workflow.setAttribute(WorkflowConstants.ATTRIBUTE_APPLICATION_EXISTIN_APP_STATUS, ApplicationStatus.APPLICATION_REJECTED);
    apiStore.completeWorkflow(executor, workflow);
    Mockito.verify(applicationDAO, Mockito.times(1)).updateApplicationState(application.getId(), ApplicationStatus.APPLICATION_REJECTED);
}
Also used : ApplicationPolicy(org.wso2.carbon.apimgt.core.models.policy.ApplicationPolicy) SubscriptionPolicy(org.wso2.carbon.apimgt.core.models.policy.SubscriptionPolicy) Policy(org.wso2.carbon.apimgt.core.models.policy.Policy) ApplicationUpdateWorkflow(org.wso2.carbon.apimgt.core.workflow.ApplicationUpdateWorkflow) GeneralWorkflowResponse(org.wso2.carbon.apimgt.core.workflow.GeneralWorkflowResponse) Workflow(org.wso2.carbon.apimgt.core.workflow.Workflow) ApplicationCreationWorkflow(org.wso2.carbon.apimgt.core.workflow.ApplicationCreationWorkflow) ApplicationUpdateWorkflow(org.wso2.carbon.apimgt.core.workflow.ApplicationUpdateWorkflow) SubscriptionCreationWorkflow(org.wso2.carbon.apimgt.core.workflow.SubscriptionCreationWorkflow) ApplicationDAO(org.wso2.carbon.apimgt.core.dao.ApplicationDAO) DefaultWorkflowExecutor(org.wso2.carbon.apimgt.core.workflow.DefaultWorkflowExecutor) WorkflowDAO(org.wso2.carbon.apimgt.core.dao.WorkflowDAO) ApplicationPolicy(org.wso2.carbon.apimgt.core.models.policy.ApplicationPolicy) WorkflowResponse(org.wso2.carbon.apimgt.core.api.WorkflowResponse) GeneralWorkflowResponse(org.wso2.carbon.apimgt.core.workflow.GeneralWorkflowResponse) APIGateway(org.wso2.carbon.apimgt.core.api.APIGateway) Application(org.wso2.carbon.apimgt.core.models.Application) PolicyDAO(org.wso2.carbon.apimgt.core.dao.PolicyDAO) APIStore(org.wso2.carbon.apimgt.core.api.APIStore) Test(org.testng.annotations.Test) BeforeTest(org.testng.annotations.BeforeTest)

Example 95 with Attribute

use of org.wso2.charon3.core.attributes.Attribute in project ballerina by ballerina-lang.

the class SignatureHelpUtil method getSignatureInfoModel.

/**
 * Get the required signature information filled model.
 *
 * @param bInvokableSymbol                  Invokable symbol
 * @param signatureContext                  Signature operation context
 * @return {@link SignatureInfoModel}       SignatureInfoModel containing signature information
 */
private static SignatureInfoModel getSignatureInfoModel(BInvokableSymbol bInvokableSymbol, TextDocumentServiceContext signatureContext) {
    Map<String, String> paramDescMap = new HashMap<>();
    SignatureInfoModel signatureInfoModel = new SignatureInfoModel();
    List<ParameterInfoModel> paramModels = new ArrayList<>();
    String functionName = signatureContext.get(SignatureKeys.CALLABLE_ITEM_NAME);
    CompilerContext compilerContext = signatureContext.get(DocumentServiceKeys.COMPILER_CONTEXT_KEY);
    BLangPackage bLangPackage = signatureContext.get(DocumentServiceKeys.LS_PACKAGE_CACHE_KEY).findPackage(compilerContext, bInvokableSymbol.pkgID);
    BLangFunction blangFunction = bLangPackage.getFunctions().stream().filter(bLangFunction -> bLangFunction.getName().getValue().equals(functionName)).findFirst().orElse(null);
    if (!blangFunction.getDocumentationAttachments().isEmpty()) {
        // Get the first documentation attachment
        BLangDocumentation bLangDocumentation = blangFunction.getDocumentationAttachments().get(0);
        signatureInfoModel.setSignatureDescription(bLangDocumentation.documentationText.trim());
        bLangDocumentation.attributes.forEach(attribute -> {
            if (attribute.docTag.equals(DocTag.PARAM)) {
                paramDescMap.put(attribute.documentationField.getValue(), attribute.documentationText.trim());
            }
        });
    } else {
        // TODO: Should be deprecated in due course
        // Iterate over the attachments list and extract the attachment Description Map
        blangFunction.getAnnotationAttachments().forEach(annotationAttachment -> {
            BLangExpression expr = annotationAttachment.expr;
            if (expr instanceof BLangRecordLiteral) {
                List<BLangRecordLiteral.BLangRecordKeyValue> recordKeyValues = ((BLangRecordLiteral) expr).keyValuePairs;
                for (BLangRecordLiteral.BLangRecordKeyValue recordKeyValue : recordKeyValues) {
                    BLangExpression key = recordKeyValue.key.expr;
                    BLangExpression value = recordKeyValue.getValue();
                    if (key instanceof BLangSimpleVarRef && ((BLangSimpleVarRef) key).getVariableName().getValue().equals("value") && value instanceof BLangLiteral) {
                        String annotationValue = ((BLangLiteral) value).getValue().toString();
                        if (annotationAttachment.getAnnotationName().getValue().equals("Param")) {
                            String paramName = annotationValue.substring(0, annotationValue.indexOf(UtilSymbolKeys.PKG_DELIMITER_KEYWORD));
                            String annotationDesc = annotationValue.substring(annotationValue.indexOf(UtilSymbolKeys.PKG_DELIMITER_KEYWORD) + 1).trim();
                            paramDescMap.put(paramName, annotationDesc);
                        } else if (annotationAttachment.getAnnotationName().getValue().equals("Description")) {
                            signatureInfoModel.setSignatureDescription(annotationValue);
                        }
                    }
                }
            }
        });
    }
    bInvokableSymbol.getParameters().forEach(bVarSymbol -> {
        ParameterInfoModel parameterInfoModel = new ParameterInfoModel();
        parameterInfoModel.setParamType(bVarSymbol.getType().toString());
        parameterInfoModel.setParamValue(bVarSymbol.getName().getValue());
        parameterInfoModel.setDescription(paramDescMap.get(bVarSymbol.getName().getValue()));
        paramModels.add(parameterInfoModel);
    });
    signatureInfoModel.setParameterInfoModels(paramModels);
    return signatureInfoModel;
}
Also used : BLangLiteral(org.wso2.ballerinalang.compiler.tree.expressions.BLangLiteral) HashMap(java.util.HashMap) BLangFunction(org.wso2.ballerinalang.compiler.tree.BLangFunction) CompilerContext(org.wso2.ballerinalang.compiler.util.CompilerContext) ArrayList(java.util.ArrayList) BLangPackage(org.wso2.ballerinalang.compiler.tree.BLangPackage) BLangSimpleVarRef(org.wso2.ballerinalang.compiler.tree.expressions.BLangSimpleVarRef) BLangDocumentation(org.wso2.ballerinalang.compiler.tree.BLangDocumentation) BLangRecordLiteral(org.wso2.ballerinalang.compiler.tree.expressions.BLangRecordLiteral) BLangExpression(org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression)

Aggregations

Test (org.testng.annotations.Test)126 StreamDefinition (org.wso2.siddhi.query.api.definition.StreamDefinition)103 SiddhiAppRuntime (org.wso2.siddhi.core.SiddhiAppRuntime)89 SiddhiManager (org.wso2.siddhi.core.SiddhiManager)89 Event (org.wso2.siddhi.core.event.Event)85 InputHandler (org.wso2.siddhi.core.stream.input.InputHandler)83 SiddhiApp (org.wso2.siddhi.query.api.SiddhiApp)83 Query (org.wso2.siddhi.query.api.execution.query.Query)83 QueryCallback (org.wso2.siddhi.core.query.output.callback.QueryCallback)73 ArrayList (java.util.ArrayList)52 HashMap (java.util.HashMap)47 SimpleAttribute (org.wso2.charon3.core.attributes.SimpleAttribute)44 Attribute (org.wso2.siddhi.query.api.definition.Attribute)42 ComplexAttribute (org.wso2.charon3.core.attributes.ComplexAttribute)38 Attribute (org.wso2.charon3.core.attributes.Attribute)36 MultiValuedAttribute (org.wso2.charon3.core.attributes.MultiValuedAttribute)36 BadRequestException (org.wso2.charon3.core.exceptions.BadRequestException)34 CharonException (org.wso2.charon3.core.exceptions.CharonException)29 Map (java.util.Map)23 MetaStreamEvent (org.wso2.siddhi.core.event.stream.MetaStreamEvent)22