Showing preview only (1,161K chars total). Download the full file or copy to clipboard to get everything.
Repository: alibaba/COLA
Branch: master
Commit: d948f204d58f
Files: 749
Total size: 912.1 KB
Directory structure:
gitextract_s6zpyxns/
├── .editorconfig
├── .github/
│ ├── dependabot.yml
│ └── workflows/
│ ├── ci.yaml
│ └── ci_by_multiply_java_versions.yaml
├── .gitignore
├── .gitmodules
├── .mvn/
│ └── wrapper/
│ └── maven-wrapper.properties
├── LICENSE
├── README.md
├── cola-archetypes/
│ ├── cola-archetype-light/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── resources/
│ │ │ ├── META-INF/
│ │ │ │ └── maven/
│ │ │ │ └── archetype-metadata.xml
│ │ │ └── archetype-resources/
│ │ │ ├── README.md
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ ├── main/
│ │ │ │ ├── java/
│ │ │ │ │ ├── Application.java
│ │ │ │ │ ├── adapter/
│ │ │ │ │ │ └── ChargeController.java
│ │ │ │ │ ├── application/
│ │ │ │ │ │ ├── ChargeServiceI.java
│ │ │ │ │ │ ├── ChargeServiceImpl.java
│ │ │ │ │ │ └── dto/
│ │ │ │ │ │ ├── BeginSessionRequest.java
│ │ │ │ │ │ ├── ChargeRecordDto.java
│ │ │ │ │ │ ├── ChargeRequest.java
│ │ │ │ │ │ ├── EndSessionRequest.java
│ │ │ │ │ │ ├── MultiResponse.java
│ │ │ │ │ │ ├── Response.java
│ │ │ │ │ │ └── SingleResponse.java
│ │ │ │ │ ├── domain/
│ │ │ │ │ │ ├── ApplicationContextHelper.java
│ │ │ │ │ │ ├── BizException.java
│ │ │ │ │ │ ├── DomainFactory.java
│ │ │ │ │ │ ├── Entity.java
│ │ │ │ │ │ ├── account/
│ │ │ │ │ │ │ ├── Account.java
│ │ │ │ │ │ │ └── AccountDomainService.java
│ │ │ │ │ │ ├── charge/
│ │ │ │ │ │ │ ├── CallType.java
│ │ │ │ │ │ │ ├── ChargeContext.java
│ │ │ │ │ │ │ ├── ChargeRecord.java
│ │ │ │ │ │ │ ├── Money.java
│ │ │ │ │ │ │ ├── MoneyConverter.java
│ │ │ │ │ │ │ ├── Session.java
│ │ │ │ │ │ │ ├── chargeplan/
│ │ │ │ │ │ │ │ ├── BasicChargePlan.java
│ │ │ │ │ │ │ │ ├── ChargePlan.java
│ │ │ │ │ │ │ │ ├── ChargePlanType.java
│ │ │ │ │ │ │ │ ├── FamilyChargePlan.java
│ │ │ │ │ │ │ │ ├── FixedTimeChangePlan.java
│ │ │ │ │ │ │ │ └── Resource.java
│ │ │ │ │ │ │ └── chargerule/
│ │ │ │ │ │ │ ├── AbstractChargeRule.java
│ │ │ │ │ │ │ ├── BasicChargeRule.java
│ │ │ │ │ │ │ ├── ChargeRule.java
│ │ │ │ │ │ │ ├── ChargeRuleFactory.java
│ │ │ │ │ │ │ ├── CompositeChargeRule.java
│ │ │ │ │ │ │ ├── FamilyChargeRule.java
│ │ │ │ │ │ │ └── FixedTimeChargeRule.java
│ │ │ │ │ │ └── gateway/
│ │ │ │ │ │ ├── AccountGateway.java
│ │ │ │ │ │ ├── ChargeGateway.java
│ │ │ │ │ │ └── SessionGateway.java
│ │ │ │ │ └── infrastructure/
│ │ │ │ │ ├── AccountGatewayImpl.java
│ │ │ │ │ ├── RestClientBean.java
│ │ │ │ │ └── SessionGatewayImpl.java
│ │ │ │ └── resources/
│ │ │ │ ├── application.yml
│ │ │ │ └── logback.xml
│ │ │ └── test/
│ │ │ ├── charge.http
│ │ │ ├── java/
│ │ │ │ ├── CleanArchTest.java
│ │ │ │ ├── TestsContainerBoot.java
│ │ │ │ ├── application/
│ │ │ │ │ └── ChargeServiceTest.java
│ │ │ │ ├── domain/
│ │ │ │ │ ├── ChargeRecordPlanTest.java
│ │ │ │ │ ├── ChargeRecordRuleTest.java
│ │ │ │ │ └── CompositeChargeRuleTestRecord.java
│ │ │ │ └── infrastructure/
│ │ │ │ ├── AccountGatewayTest.java
│ │ │ │ ├── ChargeRecordRepoTest.java
│ │ │ │ ├── FixtureLoader.java
│ │ │ │ ├── JSONTest.java
│ │ │ │ ├── SpingBootConfTest.java
│ │ │ │ ├── WireMockBasicTest.java
│ │ │ │ └── WireMockRegister.java
│ │ │ └── resources/
│ │ │ ├── application-test.yml
│ │ │ ├── application.yml
│ │ │ ├── fixture/
│ │ │ │ └── wiremock/
│ │ │ │ ├── stub_account.json
│ │ │ │ ├── stub_insufficient_account.json
│ │ │ │ └── stub_wire_mock_basic.json
│ │ │ └── logback-test.xml
│ │ └── test/
│ │ └── resources/
│ │ └── projects/
│ │ └── basic/
│ │ ├── archetype.properties
│ │ └── goal.txt
│ ├── cola-archetype-service/
│ │ ├── .gitignore
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── resources/
│ │ │ ├── META-INF/
│ │ │ │ └── maven/
│ │ │ │ └── archetype-metadata.xml
│ │ │ └── archetype-resources/
│ │ │ ├── __gitignore__
│ │ │ ├── __rootArtifactId__-app/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ └── java/
│ │ │ │ │ ├── customer/
│ │ │ │ │ │ ├── CustomerServiceImpl.java
│ │ │ │ │ │ └── executor/
│ │ │ │ │ │ ├── CustomerAddCmdExe.java
│ │ │ │ │ │ └── query/
│ │ │ │ │ │ └── CustomerListByNameQryExe.java
│ │ │ │ │ └── order/
│ │ │ │ │ └── OrderServiceImpl.java
│ │ │ │ └── test/
│ │ │ │ └── java/
│ │ │ │ └── app/
│ │ │ │ ├── CustomerConvertorTest.java
│ │ │ │ └── CustomerValidatorTest.java
│ │ │ ├── __rootArtifactId__-client/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ └── main/
│ │ │ │ └── java/
│ │ │ │ ├── api/
│ │ │ │ │ └── CustomerServiceI.java
│ │ │ │ └── dto/
│ │ │ │ ├── CustomerAddCmd.java
│ │ │ │ ├── CustomerListByNameQry.java
│ │ │ │ ├── data/
│ │ │ │ │ ├── CustomerDTO.java
│ │ │ │ │ └── ErrorCode.java
│ │ │ │ └── event/
│ │ │ │ ├── CustomerCreatedEvent.java
│ │ │ │ └── DomainEventConstant.java
│ │ │ ├── __rootArtifactId__-domain/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ └── java/
│ │ │ │ │ └── domain/
│ │ │ │ │ ├── customer/
│ │ │ │ │ │ ├── CompanyType.java
│ │ │ │ │ │ ├── Credit.java
│ │ │ │ │ │ ├── Customer.java
│ │ │ │ │ │ ├── CustomerType.java
│ │ │ │ │ │ ├── SourceType.java
│ │ │ │ │ │ ├── domainservice/
│ │ │ │ │ │ │ └── CreditChecker.java
│ │ │ │ │ │ └── gateway/
│ │ │ │ │ │ ├── CreditGateway.java
│ │ │ │ │ │ └── CustomerGateway.java
│ │ │ │ │ ├── order/
│ │ │ │ │ │ └── Order.java
│ │ │ │ │ └── package-info.java
│ │ │ │ └── test/
│ │ │ │ └── java/
│ │ │ │ └── domain/
│ │ │ │ └── CustomerEntityTest.java
│ │ │ ├── __rootArtifactId__-infrastructure/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ ├── java/
│ │ │ │ │ │ ├── config/
│ │ │ │ │ │ │ └── DiamondConfig.java
│ │ │ │ │ │ ├── customer/
│ │ │ │ │ │ │ ├── CreditGatewayImpl.java
│ │ │ │ │ │ │ ├── CustomerDO.java
│ │ │ │ │ │ │ ├── CustomerGatewayImpl.java
│ │ │ │ │ │ │ └── CustomerMapper.java
│ │ │ │ │ │ └── order/
│ │ │ │ │ │ └── OrderGatewayImpl.java
│ │ │ │ │ └── resources/
│ │ │ │ │ ├── logback-spring.xml
│ │ │ │ │ └── mybatis/
│ │ │ │ │ ├── customer-mapper.xml
│ │ │ │ │ └── mybatis-config.xml
│ │ │ │ └── test/
│ │ │ │ ├── java/
│ │ │ │ │ └── repository/
│ │ │ │ │ └── CustomerMapperTest.java
│ │ │ │ └── resources/
│ │ │ │ └── sample.properties
│ │ │ ├── pom.xml
│ │ │ └── start/
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ ├── main/
│ │ │ │ ├── java/
│ │ │ │ │ └── Application.java
│ │ │ │ └── resources/
│ │ │ │ ├── application.properties
│ │ │ │ └── logback-spring.xml
│ │ │ └── test/
│ │ │ ├── java/
│ │ │ │ ├── TestApplication.java
│ │ │ │ └── test/
│ │ │ │ └── CustomerServiceTest.java
│ │ │ └── resources/
│ │ │ ├── logback-test.xml
│ │ │ └── test.properties
│ │ └── test/
│ │ └── resources/
│ │ └── projects/
│ │ └── basic/
│ │ ├── archetype.properties
│ │ └── goal.txt
│ ├── cola-archetype-web/
│ │ ├── .gitignore
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── resources/
│ │ │ ├── META-INF/
│ │ │ │ └── maven/
│ │ │ │ └── archetype-metadata.xml
│ │ │ └── archetype-resources/
│ │ │ ├── __gitignore__
│ │ │ ├── __rootArtifactId__-adapter/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ └── main/
│ │ │ │ └── java/
│ │ │ │ ├── mobile/
│ │ │ │ │ └── CustomerMobileAdaptor.java
│ │ │ │ ├── wap/
│ │ │ │ │ └── CustomerWapAdaptor.java
│ │ │ │ └── web/
│ │ │ │ └── CustomerController.java
│ │ │ ├── __rootArtifactId__-app/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ └── java/
│ │ │ │ │ ├── customer/
│ │ │ │ │ │ ├── CustomerServiceImpl.java
│ │ │ │ │ │ └── executor/
│ │ │ │ │ │ ├── CustomerAddCmdExe.java
│ │ │ │ │ │ └── query/
│ │ │ │ │ │ └── CustomerListByNameQryExe.java
│ │ │ │ │ └── order/
│ │ │ │ │ └── OrderServiceImpl.java
│ │ │ │ └── test/
│ │ │ │ └── java/
│ │ │ │ └── app/
│ │ │ │ ├── CustomerConvertorTest.java
│ │ │ │ └── CustomerValidatorTest.java
│ │ │ ├── __rootArtifactId__-client/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ └── main/
│ │ │ │ └── java/
│ │ │ │ ├── api/
│ │ │ │ │ └── CustomerServiceI.java
│ │ │ │ └── dto/
│ │ │ │ ├── CustomerAddCmd.java
│ │ │ │ ├── CustomerListByNameQry.java
│ │ │ │ ├── data/
│ │ │ │ │ ├── CustomerDTO.java
│ │ │ │ │ └── ErrorCode.java
│ │ │ │ └── event/
│ │ │ │ ├── CustomerCreatedEvent.java
│ │ │ │ └── DomainEventConstant.java
│ │ │ ├── __rootArtifactId__-domain/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ └── java/
│ │ │ │ │ └── domain/
│ │ │ │ │ ├── customer/
│ │ │ │ │ │ ├── CompanyType.java
│ │ │ │ │ │ ├── Credit.java
│ │ │ │ │ │ ├── Customer.java
│ │ │ │ │ │ ├── CustomerType.java
│ │ │ │ │ │ ├── SourceType.java
│ │ │ │ │ │ ├── domainservice/
│ │ │ │ │ │ │ └── CreditChecker.java
│ │ │ │ │ │ └── gateway/
│ │ │ │ │ │ ├── CreditGateway.java
│ │ │ │ │ │ └── CustomerGateway.java
│ │ │ │ │ ├── order/
│ │ │ │ │ │ └── Order.java
│ │ │ │ │ └── package-info.java
│ │ │ │ └── test/
│ │ │ │ └── java/
│ │ │ │ └── domain/
│ │ │ │ └── CustomerEntityTest.java
│ │ │ ├── __rootArtifactId__-infrastructure/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ ├── java/
│ │ │ │ │ │ ├── config/
│ │ │ │ │ │ │ └── DiamondConfig.java
│ │ │ │ │ │ ├── customer/
│ │ │ │ │ │ │ ├── CreditGatewayImpl.java
│ │ │ │ │ │ │ ├── CustomerDO.java
│ │ │ │ │ │ │ ├── CustomerGatewayImpl.java
│ │ │ │ │ │ │ └── CustomerMapper.java
│ │ │ │ │ │ └── order/
│ │ │ │ │ │ └── OrderGatewayImpl.java
│ │ │ │ │ └── resources/
│ │ │ │ │ ├── logback-spring.xml
│ │ │ │ │ └── mybatis/
│ │ │ │ │ ├── customer-mapper.xml
│ │ │ │ │ └── mybatis-config.xml
│ │ │ │ └── test/
│ │ │ │ ├── java/
│ │ │ │ │ └── repository/
│ │ │ │ │ └── CustomerMapperTest.java
│ │ │ │ └── resources/
│ │ │ │ └── sample.properties
│ │ │ ├── pom.xml
│ │ │ └── start/
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ ├── main/
│ │ │ │ ├── java/
│ │ │ │ │ └── Application.java
│ │ │ │ └── resources/
│ │ │ │ ├── application.properties
│ │ │ │ └── logback-spring.xml
│ │ │ └── test/
│ │ │ ├── java/
│ │ │ │ ├── TestApplication.java
│ │ │ │ └── test/
│ │ │ │ └── CustomerServiceTest.java
│ │ │ └── resources/
│ │ │ ├── logback-test.xml
│ │ │ └── test.properties
│ │ └── test/
│ │ └── resources/
│ │ └── projects/
│ │ └── basic/
│ │ ├── archetype.properties
│ │ └── goal.txt
│ └── pom.xml
├── cola-components/
│ ├── cola-component-catchlog-starter/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── alibaba/
│ │ │ │ └── cola/
│ │ │ │ └── catchlog/
│ │ │ │ ├── ApplicationContextHelper.java
│ │ │ │ ├── CatchAndLog.java
│ │ │ │ ├── CatchLogAspect.java
│ │ │ │ ├── CatchLogAutoConfiguration.java
│ │ │ │ ├── DefaultResponseHandler.java
│ │ │ │ ├── ResponseHandlerFactory.java
│ │ │ │ └── ResponseHandlerI.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── spring.factories
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── catchlog/
│ │ │ └── test/
│ │ │ ├── Application.java
│ │ │ ├── CatchLogTest.java
│ │ │ ├── CustomResponseHandler.java
│ │ │ └── Demo.java
│ │ └── resources/
│ │ ├── application.properties
│ │ └── logback-test.xml
│ ├── cola-component-domain-starter/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── alibaba/
│ │ │ │ └── cola/
│ │ │ │ └── domain/
│ │ │ │ ├── ApplicationContextHelper.java
│ │ │ │ ├── DomainAutoConfiguration.java
│ │ │ │ ├── DomainFactory.java
│ │ │ │ └── Entity.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── spring.factories
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── domain/
│ │ │ ├── Application.java
│ │ │ ├── Customer.java
│ │ │ └── PurchasePowerGateway.java
│ │ └── resources/
│ │ ├── application.properties
│ │ └── logback-test.xml
│ ├── cola-component-dto/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ ├── dto/
│ │ │ │ ├── ClientObject.java
│ │ │ │ ├── Command.java
│ │ │ │ ├── DTO.java
│ │ │ │ ├── MultiResponse.java
│ │ │ │ ├── PageQuery.java
│ │ │ │ ├── PageResponse.java
│ │ │ │ ├── Query.java
│ │ │ │ ├── Response.java
│ │ │ │ ├── Scope.java
│ │ │ │ └── SingleResponse.java
│ │ │ └── extension/
│ │ │ └── BizScenario.java
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── Test.java
│ │ └── resources/
│ │ └── logback-test.xml
│ ├── cola-component-exception/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── exception/
│ │ │ ├── Assert.java
│ │ │ ├── BaseException.java
│ │ │ ├── BizException.java
│ │ │ ├── ExceptionFactory.java
│ │ │ └── SysException.java
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── exception/
│ │ │ └── Test.java
│ │ └── resources/
│ │ └── logback-test.xml
│ ├── cola-component-extension-starter/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── alibaba/
│ │ │ │ └── cola/
│ │ │ │ └── extension/
│ │ │ │ ├── Extension.java
│ │ │ │ ├── ExtensionAutoConfiguration.java
│ │ │ │ ├── ExtensionCoordinate.java
│ │ │ │ ├── ExtensionException.java
│ │ │ │ ├── ExtensionExecutor.java
│ │ │ │ ├── ExtensionPointI.java
│ │ │ │ ├── ExtensionRepository.java
│ │ │ │ ├── Extensions.java
│ │ │ │ └── register/
│ │ │ │ ├── AbstractComponentExecutor.java
│ │ │ │ ├── ExtensionBootstrap.java
│ │ │ │ └── ExtensionRegister.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── spring.factories
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── extension/
│ │ │ ├── Application.java
│ │ │ ├── ExtensionTest.java
│ │ │ ├── MultiCoordinateTests.java
│ │ │ ├── customer/
│ │ │ │ ├── app/
│ │ │ │ │ ├── AddCustomerCmdExe.java
│ │ │ │ │ ├── CustomerCreatedEventHandler.java
│ │ │ │ │ ├── CustomerServiceImpl.java
│ │ │ │ │ ├── GetOneCustomerQryExe.java
│ │ │ │ │ ├── extension/
│ │ │ │ │ │ ├── AddCustomerBiz1UseCase1Scenario1Validator.java
│ │ │ │ │ │ ├── AddCustomerBiz1UseCase1Validator.java
│ │ │ │ │ │ ├── AddCustomerBizOneValidator.java
│ │ │ │ │ │ ├── AddCustomerBizTwoValidator.java
│ │ │ │ │ │ ├── CustomerBizOneConvertorExt.java
│ │ │ │ │ │ ├── CustomerBizTwoConvertorExt.java
│ │ │ │ │ │ ├── CustomerConvertor.java
│ │ │ │ │ │ └── StatusNameConvertorExt.java
│ │ │ │ │ └── extensionpoint/
│ │ │ │ │ ├── AddCustomerValidatorExtPt.java
│ │ │ │ │ ├── CustomerConvertorExtPt.java
│ │ │ │ │ └── StatusNameConvertorExtPt.java
│ │ │ │ ├── client/
│ │ │ │ │ ├── AddCustomerCmd.java
│ │ │ │ │ ├── Constants.java
│ │ │ │ │ ├── CustomerCreatedEvent.java
│ │ │ │ │ ├── CustomerDTO.java
│ │ │ │ │ ├── CustomerServiceI.java
│ │ │ │ │ └── GetOneCustomerQry.java
│ │ │ │ ├── domain/
│ │ │ │ │ ├── CustomerEntity.java
│ │ │ │ │ ├── CustomerType.java
│ │ │ │ │ ├── SourceType.java
│ │ │ │ │ └── rule/
│ │ │ │ │ ├── CustomerBizOneRuleExt.java
│ │ │ │ │ ├── CustomerBizTwoRuleExt.java
│ │ │ │ │ └── CustomerRuleExtPt.java
│ │ │ │ └── infrastructure/
│ │ │ │ ├── CustomerDO.java
│ │ │ │ ├── CustomerRepository.java
│ │ │ │ └── DomainEventPublisher.java
│ │ │ └── register/
│ │ │ ├── CglibProxyFactory.java
│ │ │ ├── ExtensionRegisterTest.java
│ │ │ ├── SomeExtPt.java
│ │ │ ├── SomeExtensionA.java
│ │ │ └── SomeExtensionB.java
│ │ └── resources/
│ │ ├── application.properties
│ │ └── logback-test.xml
│ ├── cola-component-job/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── alibaba/
│ │ │ │ └── cola/
│ │ │ │ └── job/
│ │ │ │ ├── BatchJobLauncher.java
│ │ │ │ ├── ExecutionContext.java
│ │ │ │ ├── JobBuilderFactory.java
│ │ │ │ ├── JobException.java
│ │ │ │ ├── JobLauncher.java
│ │ │ │ ├── UuidGenerator.java
│ │ │ │ ├── config/
│ │ │ │ │ ├── DBAutoConfiguration.java
│ │ │ │ │ ├── EnableColaJob.java
│ │ │ │ │ ├── EnableJobConfiguration.java
│ │ │ │ │ ├── JobProperties.java
│ │ │ │ │ └── RedisConfig.java
│ │ │ │ ├── model/
│ │ │ │ │ ├── AbstractStep.java
│ │ │ │ │ ├── BatchJob.java
│ │ │ │ │ ├── BatchJobExecution.java
│ │ │ │ │ ├── ExecutionStatus.java
│ │ │ │ │ ├── Job.java
│ │ │ │ │ ├── JobExecution.java
│ │ │ │ │ ├── JobInstance.java
│ │ │ │ │ ├── Step.java
│ │ │ │ │ └── StepExecution.java
│ │ │ │ └── repository/
│ │ │ │ ├── AbstractJobRepository.java
│ │ │ │ ├── JobRepository.java
│ │ │ │ ├── JsonUtil.java
│ │ │ │ ├── RepositoryType.java
│ │ │ │ ├── db/
│ │ │ │ │ ├── BatchJobExecutionRepository.java
│ │ │ │ │ ├── DataBaseJobRepository.java
│ │ │ │ │ ├── JobExecutionRepository.java
│ │ │ │ │ └── StepExecutionRepository.java
│ │ │ │ ├── memory/
│ │ │ │ │ └── MemoryJobRepository.java
│ │ │ │ └── redis/
│ │ │ │ └── RedisJobRepository.java
│ │ │ └── resources/
│ │ │ └── schema-mysql.sql
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── job/
│ │ │ └── test/
│ │ │ ├── AbstractBaseJobTest.java
│ │ │ ├── MemoryDBJobTest.java
│ │ │ ├── MemoryJobTest.java
│ │ │ ├── MySQLJobTest.java
│ │ │ ├── RedisJobTest.java
│ │ │ ├── TestApplication.java
│ │ │ ├── TestsContainerBoot.java
│ │ │ └── steps/
│ │ │ ├── FailedStep.java
│ │ │ ├── LongTimeStep.java
│ │ │ ├── MyStep1.java
│ │ │ ├── MyStep2.java
│ │ │ ├── MyStep3.java
│ │ │ ├── MyStep4.java
│ │ │ ├── MyStep5.java
│ │ │ └── SwitchStep.java
│ │ └── resources/
│ │ ├── application-h2-test.yml
│ │ ├── application-mysql-test.yml
│ │ ├── application-redis-test.yml
│ │ └── logback-test.xml
│ ├── cola-component-ruleengine/
│ │ ├── README.md
│ │ ├── gitignore.txt
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── ruleengine/
│ │ │ ├── api/
│ │ │ │ ├── Action.java
│ │ │ │ ├── Condition.java
│ │ │ │ ├── Fact.java
│ │ │ │ ├── Facts.java
│ │ │ │ ├── Rule.java
│ │ │ │ └── RuleEngine.java
│ │ │ └── core/
│ │ │ ├── AbstractRule.java
│ │ │ ├── AllRules.java
│ │ │ ├── AnyRules.java
│ │ │ ├── CompositeRule.java
│ │ │ ├── DefaultRule.java
│ │ │ ├── DefaultRuleEngine.java
│ │ │ ├── NaturalRules.java
│ │ │ └── RuleBuilder.java
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── ruleengine/
│ │ │ ├── CompositeRuleTest.java
│ │ │ ├── FactsTest.java
│ │ │ ├── FizzBuzz.java
│ │ │ ├── HelloWorld.java
│ │ │ ├── PriorityTest.java
│ │ │ ├── RuleBuilderTest.java
│ │ │ ├── RuleEngineTest.java
│ │ │ └── fizzbuzz/
│ │ │ ├── FizzBuzzTest.java
│ │ │ ├── v1/
│ │ │ │ └── FizzBuzz.java
│ │ │ └── v2/
│ │ │ ├── Action.java
│ │ │ ├── Condition.java
│ │ │ ├── FizzBuzz.java
│ │ │ ├── Rule.java
│ │ │ ├── SimpleRuleEngine.java
│ │ │ └── TimesCondition.java
│ │ └── resources/
│ │ └── logback-test.xml
│ ├── cola-component-statemachine/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── statemachine/
│ │ │ ├── Action.java
│ │ │ ├── Condition.java
│ │ │ ├── State.java
│ │ │ ├── StateContext.java
│ │ │ ├── StateMachine.java
│ │ │ ├── StateMachineFactory.java
│ │ │ ├── Transition.java
│ │ │ ├── Visitable.java
│ │ │ ├── Visitor.java
│ │ │ ├── builder/
│ │ │ │ ├── AbstractParallelTransitionBuilder.java
│ │ │ │ ├── AbstractTransitionBuilder.java
│ │ │ │ ├── AlertFailCallback.java
│ │ │ │ ├── ExternalParallelTransitionBuilder.java
│ │ │ │ ├── ExternalTransitionBuilder.java
│ │ │ │ ├── ExternalTransitionsBuilder.java
│ │ │ │ ├── FailCallback.java
│ │ │ │ ├── From.java
│ │ │ │ ├── InternalTransitionBuilder.java
│ │ │ │ ├── NumbFailCallback.java
│ │ │ │ ├── On.java
│ │ │ │ ├── ParallelFrom.java
│ │ │ │ ├── ParallelTransitionBuilderImpl.java
│ │ │ │ ├── StateMachineBuilder.java
│ │ │ │ ├── StateMachineBuilderFactory.java
│ │ │ │ ├── StateMachineBuilderImpl.java
│ │ │ │ ├── To.java
│ │ │ │ ├── TransitionBuilderImpl.java
│ │ │ │ ├── TransitionsBuilderImpl.java
│ │ │ │ ├── When.java
│ │ │ │ └── package-info.java
│ │ │ ├── exception/
│ │ │ │ └── TransitionFailException.java
│ │ │ └── impl/
│ │ │ ├── Debugger.java
│ │ │ ├── EventTransitions.java
│ │ │ ├── PlantUMLVisitor.java
│ │ │ ├── StateHelper.java
│ │ │ ├── StateImpl.java
│ │ │ ├── StateMachineException.java
│ │ │ ├── StateMachineImpl.java
│ │ │ ├── SysOutVisitor.java
│ │ │ ├── TransitionImpl.java
│ │ │ └── TransitionType.java
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── alibaba/
│ │ └── cola/
│ │ └── test/
│ │ ├── StateMachineChoiceTest.java
│ │ ├── StateMachinePlantUMLTest.java
│ │ ├── StateMachineTest.java
│ │ └── StateMachineUnNormalTest.java
│ ├── cola-component-test-container/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── test/
│ │ │ ├── BeanMetaUtils.java
│ │ │ ├── TestExecutor.java
│ │ │ ├── TestsContainer.java
│ │ │ └── command/
│ │ │ ├── AbstractCommand.java
│ │ │ ├── CommandEnum.java
│ │ │ ├── GuideCmd.java
│ │ │ ├── TestClassRunCmd.java
│ │ │ └── TestMethodRunCmd.java
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── test/
│ │ │ ├── Demo.java
│ │ │ ├── DemoWithExtension.java
│ │ │ ├── SpringBootConfig.java
│ │ │ ├── SpringConfig.java
│ │ │ └── TestsContainerTest.java
│ │ └── resources/
│ │ └── logback-test.xml
│ ├── cola-component-unittest/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── unittest/
│ │ │ ├── FixtureLoader.java
│ │ │ ├── kafka/
│ │ │ │ ├── KafkaExtension.java
│ │ │ │ ├── MessageData.java
│ │ │ │ └── ProduceMessage.java
│ │ │ ├── redis/
│ │ │ │ ├── ExpectRedis.java
│ │ │ │ ├── RedisData.java
│ │ │ │ ├── RedisExtension.java
│ │ │ │ └── SetupRedis.java
│ │ │ └── wiremock/
│ │ │ └── WireMockRegister.java
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── unittest/
│ │ │ ├── Application.java
│ │ │ ├── TestsContainerBoot.java
│ │ │ ├── db/
│ │ │ │ ├── DBSetupTest.java
│ │ │ │ ├── Person.java
│ │ │ │ └── PersonRepository.java
│ │ │ ├── kafka/
│ │ │ │ ├── KafkaConsumer.java
│ │ │ │ └── KafkaExtensionTest.java
│ │ │ ├── redis/
│ │ │ │ └── RedisExtensionTest.java
│ │ │ └── wiremock/
│ │ │ ├── Account.java
│ │ │ └── WireMockBasicTest.java
│ │ └── resources/
│ │ ├── application.properties
│ │ ├── fixture/
│ │ │ ├── db/
│ │ │ │ └── sample-data.xml
│ │ │ ├── kafka/
│ │ │ │ └── produce-message.json
│ │ │ ├── redis/
│ │ │ │ ├── array-setup.json
│ │ │ │ ├── hash-setup.json
│ │ │ │ ├── string-expect.json
│ │ │ │ └── string-setup.json
│ │ │ └── wiremock/
│ │ │ ├── stub-account.json
│ │ │ └── stub-wire-mock-basic.json
│ │ └── logback-test.xml
│ ├── cola-components-bom/
│ │ └── pom.xml
│ ├── dev-util-archetypes/
│ │ ├── README.md
│ │ ├── cola-normal-component-archetype/
│ │ │ ├── .gitignore
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ ├── main/
│ │ │ │ └── resources/
│ │ │ │ ├── META-INF/
│ │ │ │ │ └── maven/
│ │ │ │ │ └── archetype-metadata.xml
│ │ │ │ └── archetype-resources/
│ │ │ │ ├── gitignore.txt
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ └── java/
│ │ │ │ │ └── Dummy.java
│ │ │ │ └── test/
│ │ │ │ └── resources/
│ │ │ │ └── logback-test.xml
│ │ │ └── test/
│ │ │ └── resources/
│ │ │ └── projects/
│ │ │ └── basic/
│ │ │ ├── archetype.properties
│ │ │ └── goal.txt
│ │ ├── cola-starter-component-archetype/
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ ├── main/
│ │ │ │ └── resources/
│ │ │ │ ├── META-INF/
│ │ │ │ │ └── maven/
│ │ │ │ │ └── archetype-metadata.xml
│ │ │ │ └── archetype-resources/
│ │ │ │ ├── README.md
│ │ │ │ ├── gitignore.txt
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ ├── java/
│ │ │ │ │ │ ├── CatchAndLog.java
│ │ │ │ │ │ ├── CatchLogAspect.java
│ │ │ │ │ │ └── CatchLogAutoConfiguration.java
│ │ │ │ │ └── resources/
│ │ │ │ │ └── META-INF/
│ │ │ │ │ └── spring.factories
│ │ │ │ └── test/
│ │ │ │ ├── java/
│ │ │ │ │ └── test/
│ │ │ │ │ └── Application.java
│ │ │ │ └── resources/
│ │ │ │ ├── application.properties
│ │ │ │ └── logback-test.xml
│ │ │ └── test/
│ │ │ └── resources/
│ │ │ └── projects/
│ │ │ └── basic/
│ │ │ ├── archetype.properties
│ │ │ └── goal.txt
│ │ ├── new-cola-normal-component.sh
│ │ └── new-cola-starter-component.sh
│ └── pom.xml
├── cola-samples/
│ ├── charge/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── huawei/
│ │ │ │ └── charging/
│ │ │ │ ├── Application.java
│ │ │ │ ├── adapter/
│ │ │ │ │ └── ChargeController.java
│ │ │ │ ├── application/
│ │ │ │ │ ├── ChargeServiceI.java
│ │ │ │ │ ├── ChargeServiceImpl.java
│ │ │ │ │ └── dto/
│ │ │ │ │ ├── BeginSessionRequest.java
│ │ │ │ │ ├── ChargeRecordDto.java
│ │ │ │ │ ├── ChargeRequest.java
│ │ │ │ │ ├── EndSessionRequest.java
│ │ │ │ │ ├── MultiResponse.java
│ │ │ │ │ ├── Response.java
│ │ │ │ │ └── SingleResponse.java
│ │ │ │ ├── domain/
│ │ │ │ │ ├── ApplicationContextHelper.java
│ │ │ │ │ ├── BizException.java
│ │ │ │ │ ├── DomainFactory.java
│ │ │ │ │ ├── Entity.java
│ │ │ │ │ ├── account/
│ │ │ │ │ │ ├── Account.java
│ │ │ │ │ │ └── AccountDomainService.java
│ │ │ │ │ ├── charge/
│ │ │ │ │ │ ├── CallType.java
│ │ │ │ │ │ ├── ChargeContext.java
│ │ │ │ │ │ ├── ChargeRecord.java
│ │ │ │ │ │ ├── Money.java
│ │ │ │ │ │ ├── MoneyConverter.java
│ │ │ │ │ │ ├── Session.java
│ │ │ │ │ │ ├── chargeplan/
│ │ │ │ │ │ │ ├── BasicChargePlan.java
│ │ │ │ │ │ │ ├── ChargePlan.java
│ │ │ │ │ │ │ ├── ChargePlanType.java
│ │ │ │ │ │ │ ├── FamilyChargePlan.java
│ │ │ │ │ │ │ ├── FixedTimeChangePlan.java
│ │ │ │ │ │ │ └── Resource.java
│ │ │ │ │ │ └── chargerule/
│ │ │ │ │ │ ├── AbstractChargeRule.java
│ │ │ │ │ │ ├── BasicChargeRule.java
│ │ │ │ │ │ ├── ChargeRule.java
│ │ │ │ │ │ ├── ChargeRuleFactory.java
│ │ │ │ │ │ ├── CompositeChargeRule.java
│ │ │ │ │ │ ├── FamilyChargeRule.java
│ │ │ │ │ │ └── FixedTimeChargeRule.java
│ │ │ │ │ └── gateway/
│ │ │ │ │ ├── AccountGateway.java
│ │ │ │ │ ├── ChargeGateway.java
│ │ │ │ │ └── SessionGateway.java
│ │ │ │ └── infrastructure/
│ │ │ │ ├── AccountGatewayImpl.java
│ │ │ │ ├── RestClientBean.java
│ │ │ │ └── SessionGatewayImpl.java
│ │ │ └── resources/
│ │ │ ├── application.yml
│ │ │ └── logback.xml
│ │ └── test/
│ │ ├── charge.http
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── huawei/
│ │ │ └── charging/
│ │ │ ├── CleanArchTest.java
│ │ │ ├── TestsContainerBoot.java
│ │ │ ├── application/
│ │ │ │ └── ChargeServiceTest.java
│ │ │ ├── domain/
│ │ │ │ ├── ChargeRecordPlanTest.java
│ │ │ │ ├── ChargeRecordRuleTest.java
│ │ │ │ └── CompositeChargeRuleTestRecord.java
│ │ │ └── infrastructure/
│ │ │ ├── AccountGatewayTest.java
│ │ │ ├── ChargeRecordRepoTest.java
│ │ │ ├── FixtureLoader.java
│ │ │ ├── JSONTest.java
│ │ │ ├── SpingBootConfTest.java
│ │ │ ├── WireMockBasicTest.java
│ │ │ └── WireMockRegister.java
│ │ └── resources/
│ │ ├── application-test.yml
│ │ ├── application.yml
│ │ ├── fixture/
│ │ │ └── wiremock/
│ │ │ ├── stub_account.json
│ │ │ ├── stub_insufficient_account.json
│ │ │ └── stub_wire_mock_basic.json
│ │ └── logback-test.xml
│ └── craftsman/
│ ├── craftsman-adapter/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── alibaba/
│ │ └── craftsman/
│ │ └── web/
│ │ └── MetricsController.java
│ ├── craftsman-app/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── craftsman/
│ │ │ ├── command/
│ │ │ │ ├── ATAMetricAddCmdExe.java
│ │ │ │ ├── CodeReviewMetricAddCmdExe.java
│ │ │ │ ├── MetricDeleteCmdExe.java
│ │ │ │ ├── MiscMetricAddCmdExe.java
│ │ │ │ ├── PaperMetricAddCmdExe.java
│ │ │ │ ├── PatentMetricAddCmdExe.java
│ │ │ │ ├── RefactoringMetricAddCmdExe.java
│ │ │ │ ├── RefreshScoreCmdExe.java
│ │ │ │ ├── SharingMetricAddCmdExe.java
│ │ │ │ ├── UserProfileAddCmdExe.java
│ │ │ │ ├── UserProfileUpdateCmdExe.java
│ │ │ │ ├── package-info.java
│ │ │ │ └── query/
│ │ │ │ ├── ATAMetricQryExe.java
│ │ │ │ ├── UserProfileGetQryExe.java
│ │ │ │ ├── UserProfileListQryExe.java
│ │ │ │ └── package-info.java
│ │ │ ├── event/
│ │ │ │ └── handler/
│ │ │ │ └── MetricItemCreatedHandler.java
│ │ │ └── service/
│ │ │ ├── MetricsServiceImpl.java
│ │ │ ├── UserProfileServiceImpl.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── craftsman/
│ │ │ └── app/
│ │ │ └── ContextInterceptorTest.java
│ │ └── resources/
│ │ └── logback-test.xml
│ ├── craftsman-client/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── alibaba/
│ │ └── craftsman/
│ │ ├── api/
│ │ │ ├── MetricsServiceI.java
│ │ │ └── UserProfileServiceI.java
│ │ ├── context/
│ │ │ └── UserContext.java
│ │ └── dto/
│ │ ├── ATAMetricAddCmd.java
│ │ ├── ATAMetricQry.java
│ │ ├── CodeReviewMetricAddCmd.java
│ │ ├── CommonCommand.java
│ │ ├── MetricDeleteCmd.java
│ │ ├── MiscMetricAddCmd.java
│ │ ├── PaperMetricAddCmd.java
│ │ ├── PatentMetricAddCmd.java
│ │ ├── RefactoringMetricAddCmd.java
│ │ ├── RefreshScoreCmd.java
│ │ ├── SharingMetricAddCmd.java
│ │ ├── UserProfileAddCmd.java
│ │ ├── UserProfileGetQry.java
│ │ ├── UserProfileListQry.java
│ │ ├── UserProfileUpdateCmd.java
│ │ ├── clientobject/
│ │ │ ├── ATAMetricCO.java
│ │ │ ├── AbstractMetricCO.java
│ │ │ ├── MiscMetricCO.java
│ │ │ ├── PaperMetricCO.java
│ │ │ ├── PatentMetricCO.java
│ │ │ ├── RefactoringMetricCO.java
│ │ │ ├── SharingMetricCO.java
│ │ │ └── UserProfileCO.java
│ │ └── domainevent/
│ │ ├── CustomerCreatedEvent.java
│ │ └── MetricItemCreatedEvent.java
│ ├── craftsman-domain/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── craftsman/
│ │ │ └── domain/
│ │ │ ├── DomainFactory.java
│ │ │ ├── gateway/
│ │ │ │ ├── MetricGateway.java
│ │ │ │ └── UserProfileGateway.java
│ │ │ ├── metrics/
│ │ │ │ ├── JSONPropertyFilter.java
│ │ │ │ ├── MainMetric.java
│ │ │ │ ├── MainMetricType.java
│ │ │ │ ├── Measurable.java
│ │ │ │ ├── Metric.java
│ │ │ │ ├── MetricItem.java
│ │ │ │ ├── SubMetric.java
│ │ │ │ ├── SubMetricType.java
│ │ │ │ ├── appquality/
│ │ │ │ │ ├── AppMetric.java
│ │ │ │ │ ├── AppMetricItem.java
│ │ │ │ │ └── AppQualityMetric.java
│ │ │ │ ├── devquality/
│ │ │ │ │ ├── BugMetric.java
│ │ │ │ │ ├── BugMetricItem.java
│ │ │ │ │ └── DevQualityMetric.java
│ │ │ │ ├── techcontribution/
│ │ │ │ │ ├── CodeReviewMetric.java
│ │ │ │ │ ├── CodeReviewMetricItem.java
│ │ │ │ │ ├── ContributionMetric.java
│ │ │ │ │ ├── MiscMetric.java
│ │ │ │ │ ├── MiscMetricItem.java
│ │ │ │ │ ├── RefactoringLevel.java
│ │ │ │ │ ├── RefactoringMetric.java
│ │ │ │ │ └── RefactoringMetricItem.java
│ │ │ │ ├── techinfluence/
│ │ │ │ │ ├── ATAMetric.java
│ │ │ │ │ ├── ATAMetricItem.java
│ │ │ │ │ ├── AuthorType.java
│ │ │ │ │ ├── InfluenceMetric.java
│ │ │ │ │ ├── PaperMetric.java
│ │ │ │ │ ├── PaperMetricItem.java
│ │ │ │ │ ├── PatentMetric.java
│ │ │ │ │ ├── PatentMetricItem.java
│ │ │ │ │ ├── SharingMetric.java
│ │ │ │ │ ├── SharingMetricItem.java
│ │ │ │ │ └── SharingScope.java
│ │ │ │ └── weight/
│ │ │ │ ├── DevWeight.java
│ │ │ │ ├── OtherWeight.java
│ │ │ │ ├── QAWeight.java
│ │ │ │ ├── Weight.java
│ │ │ │ └── WeightFactory.java
│ │ │ ├── package-info.java
│ │ │ └── user/
│ │ │ ├── Role.java
│ │ │ └── UserProfile.java
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── alibaba/
│ │ └── craftsman/
│ │ └── domain/
│ │ ├── ATAMetricTest.java
│ │ ├── AppMetricTest.java
│ │ ├── BugMetricTest.java
│ │ ├── InfluenceMetricTest.java
│ │ ├── PatentMetricTest.java
│ │ ├── SharingMetricTest.java
│ │ └── UserProfileTest.java
│ ├── craftsman-infrastructure/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── alibaba/
│ │ │ │ └── craftsman/
│ │ │ │ ├── common/
│ │ │ │ │ ├── BizCode.java
│ │ │ │ │ ├── event/
│ │ │ │ │ │ └── DomainEventPublisher.java
│ │ │ │ │ └── exception/
│ │ │ │ │ └── ErrorCode.java
│ │ │ │ ├── config/
│ │ │ │ │ └── CraftsmanConfig.java
│ │ │ │ ├── convertor/
│ │ │ │ │ ├── MetricConvertor.java
│ │ │ │ │ └── UserProfileConvertor.java
│ │ │ │ └── gatewayimpl/
│ │ │ │ ├── MetricGatewayImpl.java
│ │ │ │ ├── UserProfileGatewayImpl.java
│ │ │ │ ├── database/
│ │ │ │ │ ├── MetricMapper.java
│ │ │ │ │ ├── UserProfileMapper.java
│ │ │ │ │ └── dataobject/
│ │ │ │ │ ├── BaseDO.java
│ │ │ │ │ ├── MetricDO.java
│ │ │ │ │ └── UserProfileDO.java
│ │ │ │ └── rpc/
│ │ │ │ ├── AppMetricMapper.java
│ │ │ │ ├── BugMetricMapper.java
│ │ │ │ └── dataobject/
│ │ │ │ ├── AppMetricDO.java
│ │ │ │ └── BugMetricDO.java
│ │ │ └── resources/
│ │ │ ├── TableCreationDDL.sql
│ │ │ ├── mybatis/
│ │ │ │ ├── MetricMapper.xml
│ │ │ │ └── UserProfileMapper.xml
│ │ │ └── mybatis-config.xml
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── craftsman/
│ │ │ └── gatewayimpl/
│ │ │ ├── Mybatis3Utils.java
│ │ │ └── MybatisTest.java
│ │ └── resources/
│ │ ├── logback-test.xml
│ │ └── mybatis-config-test.xml
│ ├── pom.xml
│ └── start/
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── craftsman/
│ │ │ └── Application.java
│ │ └── resources/
│ │ ├── application.properties
│ │ └── logback-spring.xml
│ └── test/
│ ├── java/
│ │ └── com/
│ │ └── alibaba/
│ │ └── craftsman/
│ │ ├── TestApplication.java
│ │ └── gatewayimpl/
│ │ ├── MetricTunnelTest.java
│ │ └── UserProfileTunnelTest.java
│ ├── resources/
│ │ ├── logback-test.xml
│ │ ├── mockfile/
│ │ │ ├── com.alibaba.craftsman.app.ATAMetricAddCmdExeTest_testATAMetricAddSuccess
│ │ │ ├── com.alibaba.craftsman.app.ATAMetricAddCmdExeTest_testATAMetricAddSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.CodeReviewMetricAddCmdExeTest_testSuccess
│ │ │ ├── com.alibaba.craftsman.app.CodeReviewMetricAddCmdExeTest_testSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.MetricDeleteCmdExeTest_testSuccess
│ │ │ ├── com.alibaba.craftsman.app.MetricDeleteCmdExeTest_testSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.MiscMetricAddCmdExeTest_testSuccess
│ │ │ ├── com.alibaba.craftsman.app.MiscMetricAddCmdExeTest_testSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.PaperMetricAddCmdExeTest_testPaperMetricAddSuccess
│ │ │ ├── com.alibaba.craftsman.app.PaperMetricAddCmdExeTest_testPaperMetricAddSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.PatentMetricAddCmdExeTest_testPatentMetricAddSuccess
│ │ │ ├── com.alibaba.craftsman.app.PatentMetricAddCmdExeTest_testPatentMetricAddSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.RefactoringMetricAddCmdExeTest_testSuccess
│ │ │ ├── com.alibaba.craftsman.app.RefactoringMetricAddCmdExeTest_testSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.ScoreRecalculateTest_testDevSuccess
│ │ │ ├── com.alibaba.craftsman.app.ScoreRecalculateTest_testDevSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.SharingMetricAddCmdExeTest_testSharingMetricAddSuccess
│ │ │ ├── com.alibaba.craftsman.app.SharingMetricAddCmdExeTest_testSharingMetricAddSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.UserProfileCmdExeTest_testSuccessAdd
│ │ │ ├── com.alibaba.craftsman.app.UserProfileCmdExeTest_testSuccessAdd_inputParams
│ │ │ ├── com.alibaba.craftsman.app.UserProfileCmdExeTest_testSuccessUpdate
│ │ │ ├── com.alibaba.craftsman.app.UserProfileCmdExeTest_testSuccessUpdate_inputParams
│ │ │ └── service.list
│ │ └── spring-mock-test.xml
│ ├── testAddCmd.http
│ └── testQry.http
├── mvnw
├── mvnw.cmd
├── pom.xml
└── scripts/
├── bump_cola_version
├── integration_test
└── maven-deploy.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
tab_width = 4
indent_style = space
trim_trailing_whitespace = true
[*.xml]
indent_size = 4
[*.{yml,yaml}]
indent_size = 2
[*.{md,mkd,markdown}]
indent_size = 4
trim_trailing_whitespace = false
================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "maven" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
open-pull-requests-limit: 32
================================================
FILE: .github/workflows/ci.yaml
================================================
# Quickstart for GitHub Actions
# https://docs.github.com/en/actions/quickstart
name: Fast CI
on: [ push, pull_request, workflow_dispatch ]
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
java: [ 17 ]
fail-fast: false
max-parallel: 64
name: fast test on Java ${{ matrix.java }} OS ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: zulu
cache: maven
- name: Build with Maven
run: ./mvnw -V --no-transfer-progress clean install
- name: remove cola self maven install files for OS *nix
run: rm -rf $HOME/.m2/repository/com/alibaba/{cola,craftsman}
# https://docs.github.com/en/actions/learn-github-actions/variables#detecting-the-operating-system
# https://docs.github.com/en/actions/learn-github-actions/expressions
if: runner.os != 'Windows'
- name: remove cola self maven install files for OS Windows
run: |
Remove-Item -Recurse -Force $home/.m2/repository/com/alibaba/cola
Remove-Item -Recurse -Force $home/.m2/repository/com/alibaba/craftsman
if: runner.os == 'Windows'
================================================
FILE: .github/workflows/ci_by_multiply_java_versions.yaml
================================================
# Quickstart for GitHub Actions
# https://docs.github.com/en/actions/quickstart
name: Strong CI with multiply java versions
on: [ push, pull_request, workflow_dispatch ]
jobs:
test:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners
runs-on: ubuntu-latest
timeout-minutes: 20
name: test by multiply java versions
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Java
uses: actions/setup-java@v4
with:
# https://github.com/actions/setup-java?tab=readme-ov-file#install-multiple-jdks
java-version: |
17
21
22
distribution: zulu
cache: maven
- run: scripts/integration_test
env:
JAVA17_HOME: ${{ env.JAVA_HOME_17_X64 }}
JAVA21_HOME: ${{ env.JAVA_HOME_21_X64 }}
JAVA22_HOME: ${{ env.JAVA_HOME_22_X64 }}
- name: remove cola self maven install files
run: rm -rf $HOME/.m2/repository/com/alibaba/{cola,craftsman}
================================================
FILE: .gitignore
================================================
target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### BUILD ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
bin/
doc/
target/
out/
.DS_Store
.vscode/settings.json
${project.build.directory}
================================================
FILE: .gitmodules
================================================
[submodule "scripts/bash-buddy"]
path = scripts/bash-buddy
url = https://github.com/foldright/bash-buddy.git
================================================
FILE: .mvn/wrapper/maven-wrapper.properties
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip
================================================
FILE: LICENSE
================================================
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random
Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
================================================
FILE: README.md
================================================
# 🥤 COLA v5
[](https://github.com/alibaba/cola/actions/workflows/ci.yaml)
[](https://github.com/alibaba/cola/actions/workflows/ci_by_multiply_java_versions.yaml)
[](LICENSE)
[](https://openjdk.java.net/)
[](https://central.sonatype.com/namespace/com.alibaba.cola)
[](https://github.com/alibaba/COLA/releases)
[](https://github.com/alibaba/COLA/stargazers)
[](https://github.com/alibaba/COLA/fork)
[](https://github.com/alibaba/COLA/network/dependents)
[](https://github.com/alibaba/COLA/issues)
[](https://github.com/alibaba/COLA/graphs/contributors)
[](https://gitpod.io/#https://github.com/alibaba/COLA)
<strong>COLA 是 Clean Object-Oriented and Layered Architecture的缩写,代表“整洁面向对象分层架构”。
目前COLA已经发展到[COLA v5](#版本迭代)。</strong>
> - 想了解更多COLA信息,请关注微信公众号:
> <a href="#dummy"><img src="https://img-blog.csdnimg.cn/2020110314110321.png" width="25%" alt="qrcode" /></a>
> - 想了解更多COLA背后的故事,请支持我的新书[《程序员的底层思维》](https://item.jd.com/13652002.html)
COLA分为两个部分,COLA架构和COLA组件。
# 一、COLA架构
## COLA 概述
**架构**的**意义** 就是 要素结构:
- 要素 是 组成架构的重要元素;
- 结构 是 要素之间的关系。
而 **应用架构**的**意义** 就在于
- 定义一套良好的结构;
- 治理应用复杂度,降低系统熵值;
- 从随心所欲的混乱状态,走向井井有条的有序状态。
<a href="#dummy"><img src="https://img-blog.csdnimg.cn/e27c22d706084ead900c8838326135f3.png" alt="arch why" /></a>
COLA架构就是为此而生,其核心职责就是定义良好的应用结构,提供最佳应用架构的最佳实践。通过不断探索,我们发现良好的分层结构,良好的包结构定义,可以帮助我们治理混乱不堪的业务应用系统。
<a href="#dummy"><img src="https://img-blog.csdnimg.cn/2020120918285068.png" alt="cure" /></a>
经过多次迭代,我们定义出了相对稳定、可靠的应用架构:
<a href="#dummy"><img src="https://img-blog.csdnimg.cn/6549230c6723448fb3ab51ca74829e80.png" alt="cola arch" /></a>
## COLA Archetypes
好的应用架构,都遵循一些共同模式,不管是六边形架构、洋葱圈架构、整洁架构、还是COLA架构,**都提倡以业务为核心,解耦外部依赖,分离业务复杂度和技术复杂度等**。
COLA架构区别于这些架构的地方,在于除了思想之外,我们还提供了可落地的工具和实践指导。
为了能够快速创建满足COLA架构的应用,我们提供了两个`archetype`,位于[`cola-archetypes`目录](cola-archetypes)下:
1. `cola-archetype-service`:用来创建纯后端服务的`archetype`。
2. `cola-archetype-web`:用来创建`adapter`和后端服务一体的`web`应用`archetype`。
# 二、COLA组件
此外,我们还提供了一些非常有用的通用组件,这些组件可以帮助我们提升研发效率。
这些功能组件被收拢在[`cola-components`目录](cola-components)下面。到目前为止,我们已经沉淀了以下组件:
组件名称 | 功能 | 依赖
------ | ---- | ----
`cola-component-dto` | 定义了`DTO`格式,包括分页 |无
`cola-component-exception` | 定义了异常格式,<br>主要有`BizException`和`SysException` |无
`cola-component-statemachine` | 状态机组件 | 无
`cola-component-domain-starter` | `Spring`托管的领域实体组件 | 无
`cola-component-catchlog-starter` | 异常处理和日志组件 | `exception`、`dto`组件
`cola-component-extension-starter` | 扩展点组件 | 无
`cola-component-test-container` | 测试容器组件 | 无
# 三、如何使用COLA
## 1. 创建应用
执行以下命令:
```bash
mvn archetype:generate \
-DgroupId=com.alibaba.cola.demo.web \
-DartifactId=demo-web \
-Dversion=1.0.0-SNAPSHOT \
-Dpackage=com.alibaba.demo \
-DarchetypeArtifactId=cola-framework-archetype-web \
-DarchetypeGroupId=com.alibaba.cola \
-DarchetypeVersion=5.0.0
```
命令执行成功的话,会看到如下的应用代码结构:
<a href="#dummy"><img src="https://img-blog.csdnimg.cn/20201209192258840.png" alt="demo struture" /></a>
## 2. 运行应用
- 在`项目`目录下运行`mvn install`(如果不想运行测试,可以加上`-DskipTests`参数)。
- 进入`start`目录,执行`mvn spring-boot:run`。
运行成功的话,可以看到`SpringBoot`启动成功的界面。
- 生成的应用中,已经实现了一个简单的`Rest`请求,可以在浏览器中输入 http://localhost:8080/helloworld 进行测试。
如果要生成不是`web`工程而是`service`工程也类似,执行的是下面的命令:
```bash
mvn archetype:generate \
-DgroupId=com.alibaba.cola.demo.service \
-DartifactId=demo-service \
-Dversion=1.0.0-SNAPSHOT \
-Dpackage=com.alibaba.demo \
-DarchetypeArtifactId=cola-framework-archetype-service \
-DarchetypeGroupId=com.alibaba.cola \
-DarchetypeVersion=5.0.0
```
# 版本迭代
## 5.0.0 版本
1. 支持jdk17和SpringBoot 3.x
2. 增加cola-archetype-light,支持新的基于package轻量级分层架构
3. 增加cola-component-unittest组件,支持[新的单元测试](https://blog.csdn.net/significantfrank/article/details/137495244)
4. 增强cola-component-test-container组件,支持Junit5的Extension
## 4.0.0 版本
https://blog.csdn.net/significantfrank/article/details/110934799
## 3.1.0 版本
https://blog.csdn.net/significantfrank/article/details/109529311
1. 进一步简化了`cola-core`,只保留了扩展能力。
2. 将`exception`从`cola-core`移入到`cola-common`。
3. 对`archetype`中的分包逻辑进行重构,改成按照`domain`做划分。
4. 将`cola-archetype-web`中的`controller`改名为`adapter`,为了呼应六边形架构的命名。
## 3.0.0 版本
https://blog.csdn.net/significantfrank/article/details/106976804
## 2.0.0 版本
https://blog.csdn.net/significantfrank/article/details/100074716
## 1.0.0 版本
https://blog.csdn.net/significantfrank/article/details/85785565
================================================
FILE: cola-archetypes/cola-archetype-light/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.alibaba.cola</groupId>
<artifactId>cola-framework-archetypes-parent</artifactId>
<version>5.x-SNAPSHOT</version>
</parent>
<artifactId>cola-archetype-light</artifactId>
<packaging>maven-archetype</packaging>
<name>${project.artifactId}</name>
<description>${project.artifactId}</description>
<url>https://github.com/alibaba/COLA</url>
<licenses>
<license>
<name>GNU Lesser General Public License v2.1</name>
<url>https://github.com/alibaba/COLA/blob/master/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:https://github.com/alibaba/COLA.git</connection>
<developerConnection>scm:git:https://github.com/alibaba/COLA.git</developerConnection>
<url>https://github.com/alibaba/COLA</url>
</scm>
<issueManagement>
<url>https://github.com/alibaba/COLA/issues</url>
<system>GitHub Issues</system>
</issueManagement>
<developers>
<developer>
<id>significantfrank</id>
<name>Frank Zhang</name>
<email>25216348(at)qq.com</email>
<roles>
<role>Developer</role>
<role>Architect</role>
</roles>
<timezone>+8</timezone>
<url>https://github.com/significantfrank</url>
</developer>
</developers>
</project>
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/META-INF/maven/archetype-metadata.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor xsi:schemaLocation="https://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0 http://maven.apache.org/xsd/archetype-descriptor-1.1.0.xsd" name="charging-system"
xmlns="https://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory>src/main/resources</directory>
<includes>
<include>**/*.yml</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/test/resources</directory>
<includes>
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory>src/test</directory>
<includes>
<include>**/*.http</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory>src/test/resources</directory>
<includes>
<include>**/*.json</include>
<include>**/*.yml</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>.idea</directory>
<includes>
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory>.idea</directory>
<includes>
<include>**/*.gitignore</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory></directory>
<includes>
<include>img_1.png</include>
<include>charge-parent.iml</include>
<include>charge.iml</include>
<include>img.png</include>
<include>charging-system.iml</include>
<include>README.md</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/README.md
================================================
# 运营商计费系统
计费系统是一个典型的复杂问题场景,比较适合采用COLA架构,且发挥Domain层的价值。故将其作为COLA的另一个Sample。
运营商计费系统的需求如下:
运营商向用户提供电话服务,支持用户拨打/接听电话,并对通话收取费用。
如:主动拨打电话收取 0.5 元/分钟的通话费用;接听电话收取 0.4 元/分钟的通话费用。
运营商为了吸引客户,定义了若干电话套餐,总共有三种类型的套餐。我们要设计一个**计费系统**用于套餐计费规则的执行,保存计费记录,并通知**账户系统**扣减费用。
_注意:在一次通话过程中,通话控制系统可能会调用多次计费系统进行计费。_
- 基础套餐
1. 主叫收费 0.5 元/分钟
2. 被叫收费 0.4 元/分钟
- 固定时长套餐
1. 套餐月固定费 100 元,包含:200 分钟主叫通话时间+200 分钟被叫接听时间
2. 套餐外部分不再参与打折优惠,主叫 0.5 元/分钟,被叫 0.4 元/分钟
- 家庭套餐
1. 套餐月固定费 20 元
2. 用户可以指定 N 个号码作为自己的亲情号
3. 用户接听/拨打亲情号均不收费
4. 与亲情号之外的号码通话,主叫 0.5 元/分钟,被叫 0.4 元/分钟
# 系统设计
## 统一语言
我经常说,建模就是在分析语言,对于任何问题域,熟悉领域知识、理清概念、统一语言都是非常必要且重要的事情。
对于这个系统也不例外。

## 计费系统和周边系统的关系

================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<springfox.version>3.0.0</springfox.version>
<archunit.version>1.3.0</archunit.version>
<spring.boot.version>3.2.0</spring.boot.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.33</version>
</dependency>
<!-- Unit Test Support start-->
<dependency>
<groupId>com.alibaba.cola</groupId>
<artifactId>cola-component-test-container</artifactId>
<version>4.4.0-SNAPSHOT</version>
</dependency>
<!--this for embedded database unit test-->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<!--this for dependent service mock, to avoid conflict, we'd better use standalone -->
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>3.5.4</version>
<scope>test</scope>
</dependency>
<!-- Unit Test Support End-->
</dependencies>
</project>
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/Application.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package};
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/adapter/ChargeController.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.adapter;
import ${package}.application.ChargeServiceI;
import ${package}.application.dto.*;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
@RestController
@Slf4j
public class ChargeController {
@Resource
private ChargeServiceI chargeService;
@PostMapping("session/{sessionId}/begin")
public Response begin(@PathVariable(name = "sessionId") String sessionId,
@RequestParam("callingPhoneNo") String callingPhoneNo,
@RequestParam("calledPhoneNo") String calledPhoneNo) {
log.debug(sessionId + " " + callingPhoneNo + " " + calledPhoneNo);
BeginSessionRequest request = new BeginSessionRequest(sessionId, Long.valueOf(callingPhoneNo), Long.valueOf(calledPhoneNo));
return chargeService.begin(request);
}
@PostMapping("session/{sessionId}/charge")
public Response charge(@PathVariable(name = "sessionId") String sessionId,
@RequestParam int duration) {
log.debug(sessionId + " " + duration);
ChargeRequest request = new ChargeRequest(sessionId, duration);
return chargeService.charge(request);
}
@PostMapping("session/{sessionId}/end")
public Response end(@PathVariable(name = "sessionId") String sessionId,
@RequestParam int duration) {
log.debug(sessionId + " " + duration);
EndSessionRequest request = new EndSessionRequest(sessionId, duration);
return chargeService.end(request);
}
@GetMapping("{sessionId}/chargeRecords")
public MultiResponse<ChargeRecordDto> getChargeRecord(@PathVariable(name = "sessionId") String sessionId) {
return chargeService.listChargeRecords(sessionId);
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/ChargeServiceI.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.application;
import ${package}.application.dto.*;
public interface ChargeServiceI {
Response begin(BeginSessionRequest request);
Response charge(ChargeRequest request);
Response end(EndSessionRequest request);
MultiResponse<ChargeRecordDto> listChargeRecords(String sessionId);
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/ChargeServiceImpl.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.application;
import ${package}.application.dto.*;
import ${package}.domain.account.Account;
import ${package}.domain.account.AccountDomainService;
import ${package}.domain.charge.CallType;
import ${package}.domain.charge.ChargeContext;
import ${package}.domain.charge.ChargeRecord;
import ${package}.domain.charge.Session;
import ${package}.domain.gateway.AccountGateway;
import ${package}.domain.gateway.ChargeGateway;
import ${package}.domain.gateway.SessionGateway;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service
@Slf4j
public class ChargeServiceImpl implements ChargeServiceI {
@Resource
private SessionGateway sessionGateway;
@Resource
private AccountGateway accountGateway;
@Resource
private AccountDomainService accountDomainService;
@Resource
private ChargeGateway chargeGateway;
@Override
public Response begin(BeginSessionRequest request) {
Session session = request.toSession();
accountDomainService.canSessionStart(session);
sessionGateway.create(session);
log.debug("Session created successfully :" + session);
return Response.buildSuccess();
}
@Override
public Response charge(ChargeRequest request) {
log.debug("Do charge : " + request);
Session session = sessionGateway.get(request.getSessionId());
int durationToCharge = request.getDuration() - session.getChargedDuration();
List<ChargeRecord> chargeRecordList = new ArrayList<>();
chargeCalling(session, durationToCharge, chargeRecordList);
chargeCalled(session, durationToCharge, chargeRecordList);
chargeGateway.saveAll(chargeRecordList);
session.setChargedDuration(request.getDuration());
return Response.buildSuccess();
}
private void chargeCalling(Session session, int durationToCharge, List<ChargeRecord> chargeRecordList) {
Account callingAccount = accountGateway.getAccount(session.getCallingPhoneNo());
ChargeContext callingCtx = new ChargeContext(CallType.CALLING, session.getCallingPhoneNo(), session.getCalledPhoneNo(), durationToCharge);
callingCtx.session = session;
callingCtx.account = callingAccount;
chargeRecordList.addAll(callingAccount.charge(callingCtx));
}
private void chargeCalled(Session session, int durationToCharge, List<ChargeRecord> chargeRecordList) {
Account calledAccount = accountGateway.getAccount(session.getCalledPhoneNo());
ChargeContext calledCtx = new ChargeContext(CallType.CALLED, session.getCalledPhoneNo(), session.getCallingPhoneNo(), durationToCharge);
calledCtx.session = session;
calledCtx.account = calledAccount;
chargeRecordList.addAll(calledAccount.charge(calledCtx));
}
@Override
public Response end(EndSessionRequest request) {
charge(request.toChargeRequest());
sessionGateway.end(request.getSessionId());
return Response.buildSuccess();
}
@Override
public MultiResponse<ChargeRecordDto> listChargeRecords(String sessionId) {
List<ChargeRecord> chargeRecordList = chargeGateway.findBySessionId(sessionId);
List<ChargeRecordDto> chargeRecordDtoList = new ArrayList<>();
for (ChargeRecord chargeRecord : chargeRecordList) {
chargeRecordDtoList.add(ChargeRecordDto.fromEntity(chargeRecord));
}
return MultiResponse.of(chargeRecordDtoList);
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/BeginSessionRequest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.application.dto;
import ${package}.domain.charge.Session;
import lombok.Data;
@Data
public class BeginSessionRequest {
/**
* 本次通话的UUID
*/
private String sessionId;
/**
* 主叫电话号码
*/
private long callingPhoneNo;
/**
* 被叫电话号码
*/
private long calledPhoneNo;
public Session toSession(){
return new Session(sessionId, callingPhoneNo, calledPhoneNo);
}
public BeginSessionRequest() {
}
public BeginSessionRequest(String sessionId, long callingPhoneNo, long calledPhoneNo) {
this.sessionId = sessionId;
this.callingPhoneNo = callingPhoneNo;
this.calledPhoneNo = calledPhoneNo;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/ChargeRecordDto.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.application.dto;
import ${package}.domain.charge.CallType;
import ${package}.domain.charge.ChargeRecord;
import ${package}.domain.charge.chargeplan.ChargePlanType;
public class ChargeRecordDto {
public Long id;
public String sessionId;
public long phoneNo;
public int chargeDuration;
public long cost;
public CallType callType;
public ChargePlanType chargePlanType;
public static ChargeRecordDto fromEntity(ChargeRecord chargeRecord){
ChargeRecordDto dto = new ChargeRecordDto();
dto.id = chargeRecord.getId();
dto.sessionId = chargeRecord.getSessionId();
dto.phoneNo = chargeRecord.getPhoneNo();
dto.chargeDuration = chargeRecord.getChargeDuration();
dto.cost = chargeRecord.getCost().getAmount();
dto.callType = chargeRecord.getCallType();
dto.chargePlanType = chargeRecord.getChargePlanType();
return dto;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/ChargeRequest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.application.dto;
import lombok.Data;
@Data
public class ChargeRequest {
private String sessionId;
/**
* 当前通话,截止目前的累计时间
*/
private int duration;
public ChargeRequest() {
}
public ChargeRequest(String sessionId, int duration) {
this.sessionId = sessionId;
this.duration = duration;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/EndSessionRequest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.application.dto;
import lombok.Data;
@Data
public class EndSessionRequest {
private String sessionId;
/**
* 当前通话,截止目前的累计时间
*/
private int duration;
public ChargeRequest toChargeRequest() {
ChargeRequest chargeRequest = new ChargeRequest();
chargeRequest.setSessionId(sessionId);
chargeRequest.setDuration(duration);
return chargeRequest;
}
public EndSessionRequest() {
}
public EndSessionRequest(String sessionId, int duration) {
this.sessionId = sessionId;
this.duration = duration;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/MultiResponse.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.application.dto;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
public class MultiResponse<T> extends Response {
private static final long serialVersionUID = 1L;
private Collection<T> data;
public List<T> getData() {
if (null == data) {
return Collections.emptyList();
}
if (data instanceof List) {
return (List<T>) data;
}
return new ArrayList<>(data);
}
public void setData(Collection<T> data) {
this.data = data;
}
public boolean isEmpty() {
return data == null || data.isEmpty();
}
public boolean isNotEmpty() {
return !isEmpty();
}
public static MultiResponse buildSuccess() {
MultiResponse response = new MultiResponse();
response.setSuccess(true);
return response;
}
public static MultiResponse buildFailure(String errCode, String errMessage) {
MultiResponse response = new MultiResponse();
response.setSuccess(false);
response.setErrCode(errCode);
response.setErrMessage(errMessage);
return response;
}
public static <T> MultiResponse<T> of(Collection<T> data) {
MultiResponse<T> response = new MultiResponse<>();
response.setSuccess(true);
response.setData(data);
return response;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/Response.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.application.dto;
public class Response {
private boolean success;
private String errCode;
private String errMessage;
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public String getErrCode() {
return errCode;
}
public void setErrCode(String errCode) {
this.errCode = errCode;
}
public String getErrMessage() {
return errMessage;
}
public void setErrMessage(String errMessage) {
this.errMessage = errMessage;
}
@Override
public String toString() {
return "Response [success=" + success + ", errCode=" + errCode + ", errMessage=" + errMessage + "]";
}
public static Response buildSuccess() {
Response response = new Response();
response.setSuccess(true);
return response;
}
public static Response buildFailure(String errCode, String errMessage) {
Response response = new Response();
response.setSuccess(false);
response.setErrCode(errCode);
response.setErrMessage(errMessage);
return response;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/SingleResponse.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.application.dto;
public class SingleResponse<T> extends Response {
private static final long serialVersionUID = 1L;
private T data;
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
public static SingleResponse buildSuccess() {
SingleResponse response = new SingleResponse();
response.setSuccess(true);
return response;
}
public static SingleResponse buildFailure(String errCode, String errMessage) {
SingleResponse response = new SingleResponse();
response.setSuccess(false);
response.setErrCode(errCode);
response.setErrMessage(errMessage);
return response;
}
public static <T> SingleResponse<T> of(T data) {
SingleResponse<T> response = new SingleResponse<>();
response.setSuccess(true);
response.setData(data);
return response;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/ApplicationContextHelper.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
@Component
public class ApplicationContextHelper implements ApplicationContextAware {
private static ApplicationContext applicationContext;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
ApplicationContextHelper.applicationContext = applicationContext;
}
public static <T> T getBean(Class<T> targetClz) {
T beanInstance = null;
//优先按type查
try {
beanInstance = (T)applicationContext.getBean(targetClz);
} catch (Exception e) {
}
//按name查
if (beanInstance == null) {
String simpleName = targetClz.getSimpleName();
//首字母小写
simpleName = Character.toLowerCase(simpleName.charAt(0)) + simpleName.substring(1);
beanInstance = (T)applicationContext.getBean(simpleName);
}
if (beanInstance == null) {
throw new RuntimeException("Component " + targetClz + " can not be found in Spring Container");
}
return beanInstance;
}
public static Object getBean(String claz) {
return ApplicationContextHelper.applicationContext.getBean(claz);
}
public static <T> T getBean(String name, Class<T> requiredType) {
return ApplicationContextHelper.applicationContext.getBean(name, requiredType);
}
public static <T> T getBean(Class<T> requiredType, Object... params) {
return ApplicationContextHelper.applicationContext.getBean(requiredType, params);
}
public static ApplicationContext getApplicationContext() {
return applicationContext;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/BizException.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain;
public class BizException extends RuntimeException{
public BizException(String errMessage) {
super(errMessage);
}
public static BizException of(String errMessage){
return new BizException(errMessage);
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/DomainFactory.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain;
public class DomainFactory {
public static <T> T get(Class<T> entityClz){
return ApplicationContextHelper.getBean(entityClz);
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/Entity.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.lang.annotation.*;
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Component
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public @interface Entity {
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/account/Account.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.account;
import com.fasterxml.jackson.annotation.JsonIgnore;
import ${package}.domain.BizException;
import ${package}.domain.DomainFactory;
import ${package}.domain.Entity;
import ${package}.domain.charge.*;
import ${package}.domain.charge.chargeplan.BasicChargePlan;
import ${package}.domain.charge.chargeplan.ChargePlan;
import ${package}.domain.charge.chargerule.ChargeRuleFactory;
import ${package}.domain.charge.chargerule.CompositeChargeRule;
import ${package}.domain.gateway.AccountGateway;
import jakarta.annotation.Resource;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.List;
@Data
@Entity
@Slf4j
public class Account {
/**
* 用户号码
*/
private long phoneNo;
/**
* 账户余额
*/
private Money remaining;
/**
* 账户所拥有的套餐
*/
@JsonIgnore
private List<ChargePlan> chargePlanList = new ArrayList<>();;
@Resource
private AccountGateway accountGateway;
private String name;
public Account(){
}
public Account(long phoneNo, Money amount, List<ChargePlan> chargePlanList){
this.phoneNo = phoneNo;
this.remaining = amount;
this.chargePlanList = chargePlanList;
}
public static Account valueOf(long phoneNo, Money amount) {
Account account = DomainFactory.get(Account.class);
account.setPhoneNo(phoneNo);
account.setRemaining(amount);
account.chargePlanList.add(new BasicChargePlan());
return account;
}
/**
* 检查账户余额是否足够
*/
public void checkRemaining() {
if (remaining.isLessThan(Money.of(0))) {
throw BizException.of(this.phoneNo + " has insufficient amount");
}
}
public List<ChargeRecord> charge(ChargeContext ctx) {
CompositeChargeRule compositeChargeRule = ChargeRuleFactory.get(chargePlanList);
List<ChargeRecord> chargeRecords = compositeChargeRule.doCharge(ctx);
log.debug("Charges: "+ chargeRecords);
//跟新账户系统
accountGateway.sync(phoneNo, chargeRecords);
return chargeRecords;
}
@Override
public String toString() {
return "Account{" +
"phoneNo=" + phoneNo +
", remaining=" + remaining +
", chargePlanList=" + chargePlanList +
", name=" + name +
'}';
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/account/AccountDomainService.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.account;
import ${package}.domain.charge.Session;
import ${package}.domain.gateway.AccountGateway;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;
@Component
public class AccountDomainService {
@Resource
private AccountGateway accountGateway;
public void canSessionStart(Session session){
Account callingAccount = accountGateway.getAccount(session.getCallingPhoneNo());
Account calledAccount = accountGateway.getAccount(session.getCalledPhoneNo());
callingAccount.checkRemaining();
calledAccount.checkRemaining();
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/CallType.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge;
public enum CallType {
/**
* 主叫
*/
CALLING,
/**
* 被叫
*/
CALLED
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/ChargeContext.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge;
import ${package}.domain.account.Account;
import lombok.Data;
@Data
public class ChargeContext {
/**
* 本次通话的Session
*/
public Session session;
/**
* 呼叫类型
*/
public CallType callType;
/**
* 账号号码
*/
public long phoneNo;
/**
* 通话另一端号码
*/
public long otherSidePhoneNo;
/**
* 当前需要被扣费的时长
*/
public int durationToCharge;
/**
* 被Charge的账号
*/
public Account account;
public ChargeContext(CallType callType, long phoneNo, long otherSidePhoneNo, int durationToCharge) {
this.callType = callType;
this.phoneNo = phoneNo;
this.otherSidePhoneNo = otherSidePhoneNo;
this.durationToCharge = durationToCharge;
}
public boolean needCharge(){
return durationToCharge >0;
}
public boolean isCalling(){
return CallType.CALLING == this.callType;
}
public boolean isCalled(){
return CallType.CALLED == this.callType;
}
@Override
public String toString() {
return "ChargeContext{" +
"callType=" + callType +
", phoneNo=" + phoneNo +
", otherSidePhoneNo=" + otherSidePhoneNo +
", durationToCharge=" + durationToCharge +
", account=" + account +
'}';
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/ChargeRecord.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge;
import ${package}.domain.charge.chargeplan.ChargePlanType;
import lombok.Data;
import jakarta.persistence.*;
import java.util.Date;
@Entity
@Table(name = "charge_record")
@Data
public class ChargeRecord {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long Id;
private String sessionId;
private long phoneNo;
/**
* 呼叫类型
*/
@Enumerated(EnumType.STRING)
private CallType callType;
/**
* 计费记录所对应的呼叫时长
*/
private int chargeDuration;
/**
* 所属计费套餐
*/
@Enumerated(EnumType.STRING)
private ChargePlanType chargePlanType;
private Money cost;
@Temporal(TemporalType.TIMESTAMP)
public Date createTime;
@Temporal(TemporalType.TIMESTAMP)
public Date updateTime;
public ChargeRecord() {
}
public ChargeRecord(long phoneNo, CallType callType, int chargeDuration, ChargePlanType chargePlanType, Money cost) {
this.phoneNo = phoneNo;
this.callType = callType;
this.chargeDuration = chargeDuration;
this.chargePlanType = chargePlanType;
this.cost = cost;
}
@Override
public String toString() {
return "Charge{" +
"phoneNo=" + phoneNo +
", callType=" + callType +
", chargeDuration=" + chargeDuration +
", chargePlanType=" + chargePlanType +
", cost=" + cost +
'}';
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/Money.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge;
import lombok.Data;
import java.util.Objects;
/**
* 这个Money是简化版的,真实场景应该用BigDecimal
*/
@Data
public class Money {
/**
* 单位是角,1代表0.1元, 10代表1元
*/
private int amount;
public Money(int amount) {
this.amount = amount;
}
public static Money of(int amount){
return new Money(amount);
}
public boolean isLessThan(Money money){
return this.amount <= money.getAmount();
}
public void minus(Money money){
this.amount = this.amount - money.getAmount();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Money money = (Money) o;
return amount == money.amount;
}
@Override
public int hashCode() {
return Objects.hash(amount);
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/MoneyConverter.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge;
import jakarta.persistence.AttributeConverter;
import jakarta.persistence.Converter;
@Converter(autoApply = true)
public class MoneyConverter implements AttributeConverter<Money,Long> {
@Override
public Long convertToDatabaseColumn(Money entityData) {
return Long.valueOf(entityData.getAmount());
}
@Override
public Money convertToEntityAttribute(Long dbData) {
return Money.of(dbData.intValue());
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/Session.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class Session {
private String sessionId;
/**
* 主叫电话号码
*/
private long callingPhoneNo;
/**
* 被叫电话号码
*/
private long calledPhoneNo;
/**
* 当前通话已扣费的时长
*
*/
private int chargedDuration;
/**
* 当前通话产生的Charge记录
*/
private List<ChargeRecord> chargeRecordList = new ArrayList<>();
public Session(String sessionId, long callingPhoneNo, long calledPhoneNo) {
this.sessionId = sessionId;
this.callingPhoneNo = callingPhoneNo;
this.calledPhoneNo = calledPhoneNo;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/BasicChargePlan.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargeplan;
public class BasicChargePlan extends ChargePlan<BasicChargePlan.BasicChargeFee>{
public BasicChargePlan(){
this.priority = 0;
}
@Override
public BasicChargeFee getResource() {
return new BasicChargeFee();
}
@Override
public ChargePlanType getType() {
return ChargePlanType.BASIC;
}
public static class BasicChargeFee implements Resource{
/**
* 主叫单价。单位是角,5表示0.5元每分钟
*/
public final int CALLING_PRICE = 5;
/**
* 主叫单价。单位是角,4表示0.4元每分钟
*/
public final int CALLED_PRICE = 4;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/ChargePlan.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargeplan;
public abstract class ChargePlan<T extends Resource> implements Comparable<ChargePlan>{
protected int priority;
public abstract T getResource();
public abstract ChargePlanType getType();
public ChargePlan(){
}
/**
* 不同套餐之间的优先级关系
* @param other the object to be compared.
* @return
*/
@Override
public int compareTo(ChargePlan other) {
return other.priority - this.priority;
}
@Override
public String toString() {
return "ChargePlan{chargeType=" + getType()+
", priority=" + priority +
'}';
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/ChargePlanType.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargeplan;
public enum ChargePlanType {
/**
* 基础套餐
*/
BASIC,
/**
* 固定时常套餐
*/
FIXED_TIME,
/**
* 家庭套餐
*/
FAMILY
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/FamilyChargePlan.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargeplan;
import java.util.HashSet;
import java.util.Set;
public class FamilyChargePlan extends ChargePlan<FamilyChargePlan.FamilyMember> {
public FamilyChargePlan() {
this.priority = 2;
}
@Override
public FamilyMember getResource() {
return new FamilyMember();
}
@Override
public ChargePlanType getType() {
return ChargePlanType.FAMILY;
}
public static class FamilyMember implements Resource{
private Set<Long> familyMembers = new HashSet<>();
/**
* Mock here, 真实场景,情亲号码肯定也是从外系统获取的
*/
public FamilyMember() {
familyMembers.add(13681874561L);
familyMembers.add(15921582125L);
}
public boolean isMember(long phoneNo) {
return familyMembers.contains(phoneNo);
}
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/FixedTimeChangePlan.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargeplan;
public class FixedTimeChangePlan extends ChargePlan<FixedTimeChangePlan.FreeCallTime>{
public FixedTimeChangePlan() {
this.priority=1;
}
@Override
public FreeCallTime getResource() {
return new FreeCallTime();
}
@Override
public ChargePlanType getType() {
return ChargePlanType.FIXED_TIME;
}
public static class FreeCallTime implements Resource{
public static int FREE_CALLING_TIME = 200;
public static int FREE_CALLED_TIME = 200;
public boolean isCallingTimeRemaining(){
return FREE_CALLING_TIME > 0;
}
/**
* 扣减固定时长套餐的费用
* @param duration 扣减时长
* @return 剩余还需要扣减的时长
*/
public int chargeFreeCallingTime(int duration){
if(duration > FREE_CALLING_TIME){
int durationToCharge = duration - FREE_CALLING_TIME;
FREE_CALLING_TIME = 0;
return durationToCharge;
}
else{
FREE_CALLING_TIME = FREE_CALLING_TIME - duration;
return 0;
}
}
public boolean isCalledTimeRemaining(){
return FREE_CALLED_TIME > 0;
}
/**
* 扣减固定时长套餐的费用
* @param duration 扣减时长
* @return 剩余还需要扣减的时长
*/
public int chargeFreeCalledTime(int duration){
if(duration > FREE_CALLED_TIME){
int durationToCharge = duration - FREE_CALLED_TIME;
FREE_CALLED_TIME = 0;
return durationToCharge;
}
else{
FREE_CALLED_TIME = FREE_CALLED_TIME - duration;
return 0;
}
}
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/Resource.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargeplan;
/**
* 套餐背后所绑定的资源
*/
public interface Resource {
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/AbstractChargeRule.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargerule;
import ${package}.domain.charge.chargeplan.ChargePlan;
public abstract class AbstractChargeRule implements ChargeRule{
protected ChargePlan chargePlan;
@Override
public void belongsTo(ChargePlan chargePlan){
this.chargePlan = chargePlan;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/BasicChargeRule.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargerule;
import ${package}.domain.charge.*;
import ${package}.domain.charge.chargeplan.BasicChargePlan;
import ${package}.domain.charge.chargeplan.ChargePlanType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class BasicChargeRule extends AbstractChargeRule{
@Override
public ChargeRecord doCharge(ChargeContext ctx) {
if(!ctx.needCharge()){
log.debug("No need charge for : "+ctx);
return null;
}
BasicChargePlan basicChargePlan = (BasicChargePlan)chargePlan;
BasicChargePlan.BasicChargeFee chargeFee = basicChargePlan.getResource();
Money cost;
int duration = ctx.durationToCharge;
if (ctx.callType == CallType.CALLING) {
cost = Money.of(duration * chargeFee.CALLING_PRICE);
} else {
cost = Money.of(duration * chargeFee.CALLED_PRICE);
}
ChargeRecord chargeRecord = new ChargeRecord(ctx.phoneNo, ctx.callType, duration, ChargePlanType.BASIC, cost);
//在账号上扣减费用
ctx.account.getRemaining().minus(cost);
ctx.setDurationToCharge(0);
return chargeRecord;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/ChargeRule.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargerule;
import ${package}.domain.charge.ChargeRecord;
import ${package}.domain.charge.ChargeContext;
import ${package}.domain.charge.chargeplan.ChargePlan;
public interface ChargeRule {
ChargeRecord doCharge(ChargeContext ctx);
void belongsTo(ChargePlan chargePlan);
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/ChargeRuleFactory.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargerule;
import ${package}.domain.ApplicationContextHelper;
import ${package}.domain.charge.chargeplan.ChargePlan;
import ${package}.domain.charge.chargeplan.ChargePlanType;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class ChargeRuleFactory {
public static CompositeChargeRule get(List<ChargePlan> chargePlanList) {
//按套餐的优先级进行排序
Collections.sort(chargePlanList);
List<ChargeRule> chargeRules = new ArrayList<>();
for (ChargePlan chargePlan : chargePlanList) {
ChargeRule chargeRule;
if (chargePlan.getType() == ChargePlanType.FAMILY) {
chargeRule = ApplicationContextHelper.getBean(FamilyChargeRule.class);
} else if (chargePlan.getType() == ChargePlanType.FIXED_TIME) {
chargeRule = ApplicationContextHelper.getBean(FixedTimeChargeRule.class);
} else {
chargeRule = ApplicationContextHelper.getBean(BasicChargeRule.class);
}
chargeRule.belongsTo(chargePlan);
chargeRules.add(chargeRule);
}
CompositeChargeRule compositeChargeRule = new CompositeChargeRule();
compositeChargeRule.chargeRules = chargeRules;
return compositeChargeRule;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/CompositeChargeRule.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargerule;
import ${package}.domain.charge.ChargeRecord;
import ${package}.domain.charge.ChargeContext;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 为了应对套餐组合
* 组合模式(Composite pattern)
*/
public class CompositeChargeRule {
public List<ChargeRule> chargeRules;
public List<ChargeRecord> doCharge(ChargeContext chargeContext){
List<ChargeRecord> chargeRecords = new ArrayList<>();
for(ChargeRule chargeRule : chargeRules){
ChargeRecord chargeRecord = chargeRule.doCharge(chargeContext);
if(chargeRecord != null){
chargeRecord.setSessionId(chargeContext.getSession().getSessionId());
//fill fields for persistence needs
chargeRecord.setCreateTime(new Date());
chargeRecord.setUpdateTime(new Date());
chargeRecords.add(chargeRecord);
}
}
return chargeRecords;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/FamilyChargeRule.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargerule;
import ${package}.domain.charge.ChargeRecord;
import ${package}.domain.charge.ChargeContext;
import ${package}.domain.charge.Money;
import ${package}.domain.charge.chargeplan.ChargePlanType;
import ${package}.domain.charge.chargeplan.FamilyChargePlan;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class FamilyChargeRule extends AbstractChargeRule {
@Override
public ChargeRecord doCharge(ChargeContext ctx) {
FamilyChargePlan familyChargePlan = (FamilyChargePlan) chargePlan;
FamilyChargePlan.FamilyMember familyMember = familyChargePlan.getResource();
if (familyMember.isMember(ctx.otherSidePhoneNo)) {
log.debug("Family Charge plan for Account : " + ctx.account);
ChargeRecord chargeRecord = new ChargeRecord(ctx.phoneNo, ctx.callType, ctx.durationToCharge, ChargePlanType.FAMILY, Money.of(0));
ctx.setDurationToCharge(0);
return chargeRecord;
}
return null;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/FixedTimeChargeRule.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.charge.chargerule;
import ${package}.domain.charge.ChargeRecord;
import ${package}.domain.charge.ChargeContext;
import ${package}.domain.charge.Money;
import ${package}.domain.charge.chargeplan.ChargePlanType;
import ${package}.domain.charge.chargeplan.FixedTimeChangePlan;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class FixedTimeChargeRule extends AbstractChargeRule {
@Override
public ChargeRecord doCharge(ChargeContext ctx) {
if(!ctx.needCharge()){
log.debug("No need charge for : "+ctx);
return null;
}
FixedTimeChangePlan fixedTimeChangePlan = (FixedTimeChangePlan) chargePlan;
FixedTimeChangePlan.FreeCallTime freeCallTime = fixedTimeChangePlan.getResource();
if (ctx.isCalling() && freeCallTime.isCallingTimeRemaining()) {
int leftDuration = freeCallTime.chargeFreeCallingTime(ctx.durationToCharge);
log.debug("Calling Left Duration after FixedTimeCharge : " + leftDuration);
ChargeRecord chargeRecord = new ChargeRecord(ctx.phoneNo, ctx.callType, ctx.durationToCharge - leftDuration, ChargePlanType.FIXED_TIME, Money.of(0));
ctx.setDurationToCharge(leftDuration);
return chargeRecord;
}
if (ctx.isCalled() && freeCallTime.isCalledTimeRemaining()) {
int leftDuration = freeCallTime.chargeFreeCalledTime(ctx.durationToCharge);
log.debug("Called Left Duration after FixedTimeCharge : " + leftDuration);
ChargeRecord chargeRecord = new ChargeRecord(ctx.phoneNo, ctx.callType, ctx.durationToCharge - leftDuration, ChargePlanType.FIXED_TIME, Money.of(0));
ctx.setDurationToCharge(leftDuration);
return chargeRecord;
}
return null;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/gateway/AccountGateway.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.gateway;
import ${package}.domain.account.Account;
import ${package}.domain.charge.ChargeRecord;
import java.util.List;
/**
* 跟账户系统交互的网关(Gateway)
*
* @version 1.0
*/
public interface AccountGateway {
/**
* 根据用户号码获取账户信息(含计费项余额等信息)
*
* @param phoneNo 电话号码
* @return 账户信息
*/
Account getAccount(long phoneNo);
/**
* 将扣费记录同步到账户中
*
* @param phoneNo 电话号码
* @param records 扣费记录
*/
void sync(long phoneNo, List<ChargeRecord> records);
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/gateway/ChargeGateway.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.gateway;
import ${package}.domain.charge.ChargeRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface ChargeGateway extends JpaRepository<ChargeRecord, Long> {
public List<ChargeRecord> findBySessionId(String sessionId);
public ChargeRecord getBySessionId(String sessionId);
public List<ChargeRecord> findByPhoneNo(long phoneNo);
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/gateway/SessionGateway.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.gateway;
import ${package}.domain.charge.Session;
public interface SessionGateway {
void create(Session session);
Session get(String sessionId);
void end(String sessionId);
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/infrastructure/AccountGatewayImpl.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.infrastructure;
import ${package}.domain.account.Account;
import ${package}.domain.charge.ChargeRecord;
import ${package}.domain.charge.Money;
import ${package}.domain.gateway.AccountGateway;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestClient;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component
@Slf4j
public class AccountGatewayImpl implements AccountGateway {
private static final String GET_ACCOUNT_PATH = "/v1/api/account/{account}";
private static final String SYNC_ACCOUNT_PATH = "/v1/api/account/account/{account}/sync";
private Map<Long, Account> accountMap = new HashMap<>();
@Autowired
private RestClient restClient;
@Override
public Account getAccount(long phoneNo) {
Account account = restClient.get()
.uri(GET_ACCOUNT_PATH, phoneNo)
.accept(MediaType.APPLICATION_JSON)
.retrieve()
.body(Account.class);
return account;
}
@Override
public void sync(long phoneNo, List<ChargeRecord> records) {
// 更新账户系统
log.info("sync account info, to be implemented");
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/infrastructure/RestClientBean.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.infrastructure;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestClient;
@Configuration
public class RestClientBean {
@Value("${symbol_dollar}{REMOTE_BASE_URI:http://localhost:8080}")
String baseURI;
@Bean
RestClient restClient() {
return RestClient.create(baseURI);
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/infrastructure/SessionGatewayImpl.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.infrastructure;
import ${package}.domain.BizException;
import ${package}.domain.charge.Session;
import ${package}.domain.gateway.SessionGateway;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Map;
@Component
public class SessionGatewayImpl implements SessionGateway {
private Map<String, Session> sessionMap = new HashMap<>();
@Override
public void create(Session session) {
sessionMap.put(session.getSessionId(), session);
}
@Override
public Session get(String sessionId) {
return sessionMap.get(sessionId);
}
@Override
public void end(String sessionId) {
//真实场景是逻辑删除,比如把session的状态标记为“已结束”。
sessionMap.remove(sessionId);
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/resources/application.yml
================================================
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${MYSQL_SERVER:localhost}:${MYSQL_PORT:3306}/${MYSQL_DB_NAME:chargeDB}?serverTimezone=UTC
#如果运行出错,可以把连接写成下面的路径进行测试
#url: jdbc:mysql://localhost:3306/blogDB?useUnicode=true&characterEncoding=utf-8
username: ${MYSQL_USER_TEST:root}
password: ${MYSQL_PASSWORD_TEST:root}
jpa:
hibernate:
ddl-auto: update
show-sql: true
server:
port: 8081
my-name: default
my-age: default
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/resources/logback.xml
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
<charset>utf8</charset>
</encoder>
</appender>
<!--rootLogger是默认的logger-->
<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
<!--应用日志-->
<!--这个logger没有指定appender,它会继承root节点中定义的那些appender-->
<logger name="${groupId}" level="DEBUG"/>
<!--全局的访问日志-->
<logger name="com.alibaba.cola.catchlog" level="DEBUG"/>
</configuration>
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/charge.http
================================================
### list charge records by sessionId
GET http://localhost:8080/123145/chargeRecords
Accept: application/json
### end session
POST http://localhost:8080/session/123145/end?duration=10
Content-Type: application/x-www-form-urlencoded
duration=10
### do charge
POST http://localhost:8080/session/123145/charge?duration=10
### begin Session
POST http://localhost:8080/session/123145/begin?callingPhoneNo=13681874561&calledPhoneNo=15921252125
<> 2022-11-03T150743.200.json
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/CleanArchTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package};
import org.junit.jupiter.api.Test;
public class CleanArchTest {
@Test
public void protect_clean_arch() {
// JavaClasses classes = new ClassFileImporter()
// .withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_TESTS)
// .importPackages("${package}");
//
// layeredArchitecture()
// .consideringOnlyDependenciesInLayers()
// .layer("adapter").definedBy("${package}.adapter")
// .layer("application").definedBy("${package}.application")
// .layer("domain").definedBy("${package}.domain")
// .layer("infrastructure").definedBy("${package}.infrastructure")
// .whereLayer("adapter").mayNotBeAccessedByAnyLayer()
// //.whereLayer("domain").mayOnlyBeAccessedByLayers("application", "infrastructure")
// .as("The layer dependencies must be respected")
// .because("we must follow the Clean Architecture principle")
// .check(classes);
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/TestsContainerBoot.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package};
import com.alibaba.cola.test.TestsContainer;
public class TestsContainerBoot {
public static void main(String[] args) {
TestsContainer.start();
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/application/ChargeServiceTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.application;
import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo;
import com.github.tomakehurst.wiremock.junit5.WireMockTest;
import ${package}.Application;
import ${package}.application.dto.BeginSessionRequest;
import ${package}.domain.BizException;
import ${package}.domain.gateway.AccountGateway;
import ${package}.domain.gateway.SessionGateway;
import ${package}.infrastructure.WireMockRegister;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
@SpringBootTest
@ContextConfiguration(classes = Application.class)
@WireMockTest(httpPort = 8080)
public class ChargeServiceTest {
@Autowired
private ChargeServiceI chargeService;
@Autowired
private SessionGateway sessionGateway;
@Autowired
private AccountGateway accountGateway;
@Test
public void test_session_create(WireMockRuntimeInfo wmRuntimeInfo) {
WireMockRegister.registerStub(wmRuntimeInfo.getWireMock(), "/fixture/wiremock/stub_account.json");
BeginSessionRequest request = new BeginSessionRequest();
String sessionId = "00002";
request.setSessionId(sessionId);
request.setCallingPhoneNo(13681874563L);
request.setCalledPhoneNo(15921582125L);
chargeService.begin(request);
Assertions.assertEquals(sessionId, sessionGateway.get(sessionId).getSessionId());
}
@Test
public void test_remaining_insufficient(WireMockRuntimeInfo wmRuntimeInfo) {
WireMockRegister.registerStub(wmRuntimeInfo.getWireMock(), "/fixture/wiremock/stub_insufficient_account.json");
BeginSessionRequest request = new BeginSessionRequest();
String sessionId = "00003";
request.setSessionId(sessionId);
request.setCallingPhoneNo(13681874561L);
request.setCalledPhoneNo(15921582125L);
Exception exception = Assertions.assertThrows(BizException.class, () -> {
chargeService.begin(request);
});
String expectedMsg = "has insufficient amount";
String actualMsg = exception.getMessage();
Assertions.assertTrue(actualMsg.contains(expectedMsg));
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/domain/ChargeRecordPlanTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain;
import ${package}.domain.charge.chargeplan.BasicChargePlan;
import ${package}.domain.charge.chargeplan.ChargePlan;
import ${package}.domain.charge.chargeplan.ChargePlanType;
import ${package}.domain.charge.chargeplan.FamilyChargePlan;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class ChargeRecordPlanTest {
@Test
public void test_priority(){
ChargePlan basicChargePlan = new BasicChargePlan();
ChargePlan familyChargePlan = new FamilyChargePlan();
ChargePlan fixedTimeChargePlan = new FamilyChargePlan();
List<ChargePlan> chargePlanList = new ArrayList<>();
chargePlanList.add(basicChargePlan);
chargePlanList.add(familyChargePlan);
chargePlanList.add(fixedTimeChargePlan);
Collections.sort(chargePlanList);
System.out.println(chargePlanList.get(0));
Assertions.assertEquals(ChargePlanType.FAMILY, chargePlanList.get(0).getType());
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/domain/ChargeRecordRuleTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain;
import ${package}.domain.account.Account;
import ${package}.domain.charge.CallType;
import ${package}.domain.charge.ChargeContext;
import ${package}.domain.charge.Money;
import ${package}.domain.charge.chargeplan.BasicChargePlan;
import ${package}.domain.charge.chargeplan.ChargePlan;
import ${package}.domain.charge.chargeplan.FamilyChargePlan;
import ${package}.domain.charge.chargeplan.FixedTimeChangePlan;
import ${package}.domain.charge.chargerule.BasicChargeRule;
import ${package}.domain.charge.chargerule.FamilyChargeRule;
import ${package}.domain.charge.chargerule.FixedTimeChargeRule;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.util.Collections;
public class ChargeRecordRuleTest {
@Test
public void test_basic_charge_rule(){
//prepare
ChargePlan chargePlan = new BasicChargePlan();
Account account = new Account(13681874561L, Money.of(200), Collections.singletonList(chargePlan));
ChargeContext ctx = new ChargeContext(CallType.CALLING, 13681874561L, 15921582125L, 20);
ctx.account = account;
System.out.println("Account before charge: "+ account);
//do
BasicChargeRule basicChargeRule = new BasicChargeRule();
basicChargeRule.belongsTo(chargePlan);
basicChargeRule.doCharge(ctx);
//check
System.out.println("Account after charge: "+ account);
Assertions.assertEquals( Money.of(100), ctx.account.getRemaining());
Assertions.assertEquals( 0, ctx.getDurationToCharge());
}
@Test
public void test_family_charge_rule(){
//prepare
FamilyChargePlan chargePlan = new FamilyChargePlan();
Account account = new Account(13681874561L, Money.of(200), Collections.singletonList(chargePlan));
ChargeContext ctx = new ChargeContext(CallType.CALLING, 13681874561L, 15921582125L, 20);
ctx.account = account;
System.out.println("Account before charge: "+ account);
//do
FamilyChargeRule familyChargeRule = new FamilyChargeRule();
familyChargeRule.belongsTo(chargePlan);
familyChargeRule.doCharge(ctx);
//check
System.out.println("Account after charge: "+ account);
Assertions.assertEquals( Money.of(200), ctx.account.getRemaining());
Assertions.assertEquals( 0, ctx.getDurationToCharge());
}
@Test
public void test_fixed_time_charge_rule(){
//prepare
FixedTimeChangePlan chargePlan = new FixedTimeChangePlan();
Account account = new Account(13681874561L, Money.of(200), Collections.singletonList(chargePlan));
ChargeContext ctx = new ChargeContext(CallType.CALLING, 13681874561L, 15921582125L, 180);
ctx.account = account;
System.out.println("Account before charge: "+ account);
//do
FixedTimeChargeRule fixedTimeChargeRule = new FixedTimeChargeRule();
fixedTimeChargeRule.belongsTo(chargePlan);
fixedTimeChargeRule.doCharge(ctx);
//check
System.out.println("Account after charge: "+ account);
Assertions.assertEquals( true, chargePlan.getResource().isCallingTimeRemaining());
Assertions.assertEquals( 0, ctx.getDurationToCharge());
// come a new charge
ChargeContext ctx2 = new ChargeContext(CallType.CALLING, 13681874561L, 15921582125L, 40);
ctx2.account = account;
fixedTimeChargeRule.doCharge(ctx2);
Assertions.assertEquals( false, chargePlan.getResource().isCallingTimeRemaining());
Assertions.assertEquals( 20, ctx2.getDurationToCharge());
//reset fixed time
FixedTimeChangePlan.FreeCallTime.FREE_CALLED_TIME = 200;
FixedTimeChangePlan.FreeCallTime.FREE_CALLING_TIME = 200;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/domain/CompositeChargeRuleTestRecord.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain;
import ${package}.Application;
import ${package}.domain.account.Account;
import ${package}.domain.charge.*;
import ${package}.domain.charge.chargeplan.BasicChargePlan;
import ${package}.domain.charge.chargeplan.ChargePlan;
import ${package}.domain.charge.chargeplan.FamilyChargePlan;
import ${package}.domain.charge.chargeplan.FixedTimeChangePlan;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@SpringBootTest
@ContextConfiguration(classes = Application.class)
public class CompositeChargeRuleTestRecord {
private long callingPhoneNo = 13681874561L;
private long calledPhoneNo = 15921582125L;
@Test
public void test_basic_and_fixedTime_charge_rule(){
// prepare
List<ChargePlan> chargePlanList = new ArrayList<>();
chargePlanList.add(new BasicChargePlan());
chargePlanList.add(new FixedTimeChangePlan());
Account account = Account.valueOf(13681874561L, Money.of(200)); // for spring bean
account.setChargePlanList(chargePlanList);
ChargeContext ctx = new ChargeContext(CallType.CALLING, 13681874561L, 15921582125L, 220);
String sessionId = UUID.randomUUID().toString();
Session session = new Session(sessionId, callingPhoneNo, calledPhoneNo);
ctx.setSession(session);
ctx.account = account;
// do
List<ChargeRecord> chargeRecords = account.charge(ctx);
System.out.println("Account after charge: "+ account);
// check
Assertions.assertEquals(2, chargeRecords.size());
}
@Test
public void test_basic_and_family_charge_rule(){
// prepare
List<ChargePlan> chargePlanList = new ArrayList<>();
chargePlanList.add(new BasicChargePlan());
chargePlanList.add(new FamilyChargePlan());
Account account = Account.valueOf(13681874561L, Money.of(200)); // for spring bean
account.setChargePlanList(chargePlanList);
ChargeContext ctx = new ChargeContext(CallType.CALLING, 13681874561L, 15921582125L, 220);
String sessionId = UUID.randomUUID().toString();
Session session = new Session(sessionId, callingPhoneNo, calledPhoneNo);
ctx.setSession(session);
ctx.account = account;
// do
List<ChargeRecord> chargeRecords = account.charge(ctx);
System.out.println("Account after charge: "+ account);
// check
Assertions.assertEquals(1, chargeRecords.size());
}
@Test
public void test_all_charge_rule(){
// prepare
List<ChargePlan> chargePlanList = new ArrayList<>();
chargePlanList.add(new BasicChargePlan());
chargePlanList.add(new FamilyChargePlan());
chargePlanList.add(new FixedTimeChangePlan());
Account account = Account.valueOf(13681874561L, Money.of(200)); // for spring bean
account.setChargePlanList(chargePlanList);
ChargeContext ctx = new ChargeContext(CallType.CALLING, 13681874561L, 15921582125L, 220);
String sessionId = UUID.randomUUID().toString();
Session session = new Session(sessionId, callingPhoneNo, calledPhoneNo);
ctx.setSession(session);
ctx.account = account;
// do
List<ChargeRecord> chargeRecords = account.charge(ctx);
System.out.println("Account after charge: "+ account);
// check
Assertions.assertEquals(1, chargeRecords.size());
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/AccountGatewayTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.infrastructure;
import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo;
import com.github.tomakehurst.wiremock.junit5.WireMockTest;
import ${package}.Application;
import ${package}.domain.account.Account;
import ${package}.domain.charge.Money;
import ${package}.domain.gateway.AccountGateway;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
@SpringBootTest
@ContextConfiguration(classes = Application.class)
@WireMockTest(httpPort = 8080)
public class AccountGatewayTest {
@Autowired
AccountGateway accountGateway;
@Test
public void testGetAccount(WireMockRuntimeInfo wmRuntimeInfo) {
WireMockRegister.registerStub(wmRuntimeInfo.getWireMock(), "/fixture/wiremock/stub_account.json");
Account account = accountGateway.getAccount(15921582125L);
System.out.println("account : " + account);
Assertions.assertEquals(account.getPhoneNo(), 15921582125L);
Assertions.assertEquals(account.getRemaining(), Money.of(400));
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/ChargeRecordRepoTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.infrastructure;
import ${package}.domain.charge.CallType;
import ${package}.domain.charge.ChargeRecord;
import ${package}.domain.charge.Money;
import ${package}.domain.charge.chargeplan.ChargePlanType;
import ${package}.domain.gateway.ChargeGateway;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@SpringBootTest
public class ChargeRecordRepoTest {
@Resource
private ChargeGateway chargeGateway;
private String sessionId;
@BeforeEach
public void setup(){
sessionId = UUID.randomUUID().toString();
}
@Test
public void testSave(){
ChargeRecord chargeRecord = new ChargeRecord(13681874561L, CallType.CALLED, 10, ChargePlanType.FAMILY, Money.of(123));
chargeRecord.setSessionId(sessionId);
chargeRecord.setCreateTime(new Date());
chargeRecord.setUpdateTime(new Date());
chargeGateway.save(chargeRecord);
chargeRecord = chargeGateway.getBySessionId(sessionId);
Assertions.assertEquals(chargeRecord.getSessionId(), sessionId);
}
@Test
public void testSaveList(){
List<ChargeRecord> chargeRecordList = new ArrayList<>();
ChargeRecord chargeRecord1 = new ChargeRecord(13681874561L, CallType.CALLED, 10, ChargePlanType.FAMILY, Money.of(123));
chargeRecord1.setSessionId(UUID.randomUUID().toString());
ChargeRecord chargeRecord2 = new ChargeRecord(13681874561L, CallType.CALLING, 10, ChargePlanType.FAMILY, Money.of(123));
chargeRecord2.setSessionId(UUID.randomUUID().toString());
chargeRecordList.add(chargeRecord1);
chargeRecordList.add(chargeRecord2);
chargeGateway.saveAll(chargeRecordList);
List<ChargeRecord> result = chargeGateway.findByPhoneNo(13681874561L);
Assertions.assertEquals(result.size(), 2);
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/FixtureLoader.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.infrastructure;
import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java.nio.charset.StandardCharsets;
import org.springframework.core.io.ClassPathResource;
import org.springframework.util.StreamUtils;
public class FixtureLoader {
public static String loadResource(String resourcePath) {
// 创建一个 ClassPathResource 对象
ClassPathResource resource = new ClassPathResource(resourcePath);
// 使用 withResource 来自动关闭输入流
String content = "";
try (InputStream inputStream = resource.getInputStream()) {
content = StreamUtils.copyToString(inputStream, StandardCharsets.UTF_8);
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException(e.getMessage());
}
return content;
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/JSONTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.infrastructure;
import com.fasterxml.jackson.databind.ObjectMapper;
import ${package}.domain.account.Account;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class JSONTest {
@Test
public void testJsonBind() {
// this will throw exception since account not recognized
String badJson = "{${symbol_escape}"account${symbol_escape}":{${symbol_escape}"name${symbol_escape}":${symbol_escape}"frank${symbol_escape}",${symbol_escape}"phoneNo${symbol_escape}":${symbol_escape}"15921582125${symbol_escape}",${symbol_escape}"remaining${symbol_escape}":${symbol_escape}"400${symbol_escape}",${symbol_escape}"chargePlanList${symbol_escape}":[{${symbol_escape}"priority${symbol_escape}":${symbol_escape}"2${symbol_escape}",${symbol_escape}"type${symbol_escape}":${symbol_escape}"fixedTime${symbol_escape}"},{${symbol_escape}"priority${symbol_escape}":${symbol_escape}"1${symbol_escape}",${symbol_escape}"type${symbol_escape}":${symbol_escape}"familyMember${symbol_escape}"}]}}";
// this is good
String goodJson = "{${symbol_escape}"name${symbol_escape}":${symbol_escape}"frank${symbol_escape}",${symbol_escape}"phoneNo${symbol_escape}":${symbol_escape}"15921582125${symbol_escape}",${symbol_escape}"remaining${symbol_escape}":${symbol_escape}"400${symbol_escape}",${symbol_escape}"chargePlanList${symbol_escape}":[{${symbol_escape}"priority${symbol_escape}":${symbol_escape}"2${symbol_escape}",${symbol_escape}"type${symbol_escape}":${symbol_escape}"fixedTime${symbol_escape}"},{${symbol_escape}"priority${symbol_escape}":${symbol_escape}"1${symbol_escape}",${symbol_escape}"type${symbol_escape}":${symbol_escape}"familyMember${symbol_escape}"}]}";
try {
ObjectMapper objectMapper = new ObjectMapper();
Account account = objectMapper.readValue(goodJson, Account.class);
Assertions.assertEquals(account.getPhoneNo(), 15921582125L);
System.out.println(account);
} catch (Exception e) {
e.printStackTrace();
}
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/SpingBootConfTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.infrastructure;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
@SpringBootTest
//use test profile, this will merge application.yml and application-test.yaml.
//but if you put an application.yml under test/resources, it will replace the project application.yml.
//the advantage of profile, is that it can inherit and override.
@ActiveProfiles("test")
public class SpingBootConfTest {
@Value("${symbol_dollar}{spring.jpa.show-sql}")
private String showSql;
@Value("${symbol_dollar}{spring.jpa.hibernate.ddl-auto}")
private String ddlAuto;
@Value("${symbol_dollar}{my-name}")
private String myName;
@Value("${symbol_dollar}{my-age}")
private String myAge;
@Value("${symbol_dollar}{my-age-test}")
private String myAgeTest;
@Test
public void test() {
System.out.println("spring.jpa.show-sql : " + showSql);
System.out.println("spring.jpa.hibernate.ddl-auto : " + ddlAuto);
System.out.println("myName : " + myName);
System.out.println("myAge : " + myAge);
System.out.println("myAgeTest : " + myAgeTest);
Assertions.assertEquals("30", myAge);
Assertions.assertEquals("40", myAgeTest);
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/WireMockBasicTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.infrastructure;
import com.github.tomakehurst.wiremock.client.WireMock;
import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo;
import com.github.tomakehurst.wiremock.junit5.WireMockTest;
import ${package}.Application;
import ${package}.domain.account.Account;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.web.reactive.server.WebTestClient;
import static com.github.tomakehurst.wiremock.client.WireMock.*;
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@WireMockTest(httpPort = 8080)
@Slf4j
public class WireMockBasicTest {
@Autowired
protected WebTestClient webClient;
@Test
public void testWireMockBasic() {
// The static DSL will be automatically configured for you
stubFor(get("/static-dsl").willReturn(ok()));
webClient.get()
.uri("http://localhost:8080/static-dsl")
.exchange()
.expectStatus()
.isEqualTo(200);
}
@Test
public void testWireMockStub(WireMockRuntimeInfo wmRuntimeInfo) {
WireMock wireMock = wmRuntimeInfo.getWireMock();
WireMockRegister.registerStub(wireMock, "/fixture/wiremock/stub_wire_mock_basic.json");
webClient.get()
.uri("http://localhost:8080/v1/wiremock/basic")
.exchange()
.expectStatus()
.isEqualTo(200)
.expectHeader()
.contentType(MediaType.APPLICATION_JSON);
System.out.println("wire mock serer port : " + wmRuntimeInfo.getHttpPort());
}
@Test
public void testWireMockAccount(WireMockRuntimeInfo wmRuntimeInfo) {
WireMockRegister.registerStub(wmRuntimeInfo.getWireMock(), "/fixture/wiremock/stub_account.json");
long phoneNo = 123456789;
webClient.get()
.uri("http://localhost:8080/v1/api/account/"+phoneNo)
.exchange()
.expectStatus()
.isEqualTo(200)
.expectHeader()
.contentType(MediaType.APPLICATION_JSON)
.returnResult(Account.class)
.getResponseBody()
.map(account -> {
log.info(account.toString());
Assertions.assertEquals("frank", account.getName());
Assertions.assertEquals(phoneNo, account.getPhoneNo());
return account;
})
.subscribe();
log.info("wire mock serer port : " + wmRuntimeInfo.getHttpPort());
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/WireMockRegister.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.infrastructure;
import com.github.tomakehurst.wiremock.client.WireMock;
import com.github.tomakehurst.wiremock.stubbing.StubMapping;
public class WireMockRegister {
public static void registerStub(WireMock wireMock, String resourcePath){
StubMapping stubMapping = StubMapping.buildFrom(FixtureLoader.loadResource(resourcePath));
wireMock.register(stubMapping);
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/resources/application-test.yml
================================================
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
# hard code for test purpose
url: jdbc:mysql://localhost:3306/chargeDB?serverTimezone=UTC
username: root
password: root
jpa:
hibernate:
ddl-auto: update
show-sql: true
# this will override config in test/resources/application.yml and resources/application.yml
my-age: 30
my-age-test: 40
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/resources/application.yml
================================================
spring:
datasource:
driver-class-name: org.h2.Driver
url: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=1
username: sa
password:
jpa:
hibernate:
ddl-auto: update
show-sql: true
server:
port: 8081
my-name: frank
my-age: 35
REMOTE_BASE_URI: http://localhost:8080
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/resources/fixture/wiremock/stub_account.json
================================================
{
"request": {
"urlPathPattern": "/v1/api/account/[0-9]+",
"method": "GET"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"transformers": [
"response-template"
],
"jsonBody": {
"name": "frank",
"phoneNo": "{{request.path.[3]}}",
"remaining": "400",
"chargePlanList": [
{
"priority": "2",
"type": "fixedTime"
},
{
"priority": "1",
"type": "familyMember"
}
]
}
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/resources/fixture/wiremock/stub_insufficient_account.json
================================================
{
"request": {
"urlPathPattern": "/v1/api/account/[0-9]+",
"method": "GET"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"transformers": [
"response-template"
],
"jsonBody": {
"name": "frank",
"phoneNo": "{{request.path.[3]}}",
"remaining": "0",
"chargePlanList": [
{
"priority": "2",
"type": "fixedTime"
},
{
"priority": "1",
"type": "familyMember"
}
]
}
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/resources/fixture/wiremock/stub_wire_mock_basic.json
================================================
{
"request": {
"urlPathPattern": "/v1/wiremock/basic",
"method": "GET"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"jsonBody": {
"request_id": "f7f9e747-f073-4ea8-8360-b42fc754a049",
"hyper_switch": {
"id": "switch1",
"name": "1520-001",
"device_model": "1520",
"role": "tor",
"mgmt_ip": "192.168.0.1",
"rack_code": "kw14b2-1k-01-08",
"sn": "21980119523GP8000745",
"node_id": "node1",
"xpod_id": "pod1",
"op_status": "online",
"created_at": "2024-02-04 15:11:13",
"updated_at": "2020-02-04 15:11:13",
"type": "l1"
}
}
}
}
================================================
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/resources/logback-test.xml
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%date{HH:mm:ss} %highlight(%-5level) [%blue(%t)] %yellow(%C{35}): %msg%n%throwable</pattern>
<charset>utf8</charset>
</encoder>
</appender>
<!--rootLogger是默认的logger-->
<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
<!--应用日志-->
<!--这个logger没有指定appender,它会继承root节点中定义的那些appender-->
<logger name="${groupId}" level="DEBUG"/>
<!--hibernate6以上的配置,SQL参数绑定日志-->
<logger name="org.hibernate.SQL" level="debug"/>
<logger name="org.hibernate.orm.jdbc.bind" level="trace"/>
<!--全局的访问日志-->
<logger name="com.alibaba.cola.catchlog" level="DEBUG"/>
</configuration>
================================================
FILE: cola-archetypes/cola-archetype-light/src/test/resources/projects/basic/archetype.properties
================================================
#Sun May 12 20:30:31 CST 2024
package=it.pkg
groupId=archetype.it
artifactId=basic
version=0.1-SNAPSHOT
================================================
FILE: cola-archetypes/cola-archetype-light/src/test/resources/projects/basic/goal.txt
================================================
================================================
FILE: cola-archetypes/cola-archetype-service/.gitignore
================================================
target/
### eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
bin/
doc/
.DS_Store
================================================
FILE: cola-archetypes/cola-archetype-service/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.alibaba.cola</groupId>
<artifactId>cola-framework-archetypes-parent</artifactId>
<version>5.x-SNAPSHOT</version>
</parent>
<artifactId>cola-framework-archetype-service</artifactId>
<packaging>maven-archetype</packaging>
<name>${project.artifactId}</name>
<description>${project.artifactId}</description>
<url>https://github.com/alibaba/COLA</url>
<licenses>
<license>
<name>GNU Lesser General Public License v2.1</name>
<url>https://github.com/alibaba/COLA/blob/master/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:https://github.com/alibaba/COLA.git</connection>
<developerConnection>scm:git:https://github.com/alibaba/COLA.git</developerConnection>
<url>https://github.com/alibaba/COLA</url>
</scm>
<issueManagement>
<url>https://github.com/alibaba/COLA/issues</url>
<system>GitHub Issues</system>
</issueManagement>
<developers>
<developer>
<id>significantfrank</id>
<name>Frank Zhang</name>
<email>25216348(at)qq.com</email>
<roles>
<role>Developer</role>
<role>Architect</role>
</roles>
<timezone>+8</timezone>
<url>https://github.com/significantfrank</url>
</developer>
<developer>
<id>oldratlee</id>
<name>Jerry Lee</name>
<email>oldratlee(at)gmail.com</email>
<roles>
<role>Developer</role>
<role>CI/SCM Engineer</role>
</roles>
<timezone>+8</timezone>
<url>https://github.com/oldratlee</url>
</developer>
</developers>
</project>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/META-INF/maven/archetype-metadata.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
name="demo"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0">
<requiredProperties>
<requiredProperty key="gitignore">
<defaultValue>.gitignore</defaultValue>
</requiredProperty>
</requiredProperties>
<fileSets>
<fileSet>
<directory></directory>
<includes>
<include>__gitignore__</include>
</includes>
</fileSet>
</fileSets>
<modules>
<module id="${rootArtifactId}-client" dir="__rootArtifactId__-client" name="${rootArtifactId}-client">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="${rootArtifactId}-app" dir="__rootArtifactId__-app" name="${rootArtifactId}-app">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="${rootArtifactId}-domain" dir="__rootArtifactId__-domain" name="${rootArtifactId}-domain">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="${rootArtifactId}-infrastructure" dir="__rootArtifactId__-infrastructure"
name="${rootArtifactId}-infrastructure">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/test/resources</directory>
<includes>
<include>**/*.properties</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="start" dir="start" name="start">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/test/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
</fileSets>
</module>
</modules>
</archetype-descriptor>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__gitignore__
================================================
target/
### eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
bin/
doc/
.DS_Store
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-parent</artifactId>
<version>${version}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>${artifactId}</artifactId>
<packaging>jar</packaging>
<name>${artifactId}</name>
<dependencies>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-client</artifactId>
</dependency>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-infrastructure</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cola</groupId>
<artifactId>cola-component-catchlog-starter</artifactId>
</dependency>
<!-- JSR 303 Validation -->
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
</dependency>
<!-- JSR 303 Validation End-->
</dependencies>
</project>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/CustomerServiceImpl.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.customer;
import com.alibaba.cola.dto.MultiResponse;
import com.alibaba.cola.dto.Response;
import com.alibaba.cola.catchlog.CatchAndLog;
import ${package}.api.CustomerServiceI;
import ${package}.dto.CustomerAddCmd;
import ${package}.dto.CustomerListByNameQry;
import ${package}.dto.data.CustomerDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ${package}.customer.executor.CustomerAddCmdExe;
import ${package}.customer.executor.query.CustomerListByNameQryExe;
import javax.annotation.Resource;
@Service
@CatchAndLog
public class CustomerServiceImpl implements CustomerServiceI {
@Resource
private CustomerAddCmdExe customerAddCmdExe;
@Resource
private CustomerListByNameQryExe customerListByNameQryExe;
public Response addCustomer(CustomerAddCmd customerAddCmd) {
return customerAddCmdExe.execute(customerAddCmd);
}
@Override
public MultiResponse<CustomerDTO> listByName(CustomerListByNameQry customerListByNameQry) {
return customerListByNameQryExe.execute(customerListByNameQry);
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/executor/CustomerAddCmdExe.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.customer.executor;
import com.alibaba.cola.dto.Response;
import com.alibaba.cola.exception.BizException;
import ${package}.dto.CustomerAddCmd;
import ${package}.dto.data.ErrorCode;
import org.springframework.stereotype.Component;
@Component
public class CustomerAddCmdExe{
public Response execute(CustomerAddCmd cmd) {
//The flow of usecase is defined here.
//The core ablility should be implemented in Domain. or sink to Domian gradually
if(cmd.getCustomerDTO().getCompanyName().equals("ConflictCompanyName")){
throw new BizException(ErrorCode.B_CUSTOMER_companyNameConflict, "公司名冲突");
}
return Response.buildSuccess();
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/executor/query/CustomerListByNameQryExe.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.customer.executor.query;
import com.alibaba.cola.dto.MultiResponse;
import ${package}.dto.CustomerListByNameQry;
import ${package}.dto.data.CustomerDTO;
import java.util.ArrayList;
import java.util.List;
import org.springframework.stereotype.Component;
@Component
public class CustomerListByNameQryExe{
public MultiResponse<CustomerDTO> execute(CustomerListByNameQry cmd) {
List<CustomerDTO> customerDTOList = new ArrayList<>();
CustomerDTO customerDTO = new CustomerDTO();
customerDTO.setCustomerName("Frank");
customerDTOList.add(customerDTO);
return MultiResponse.of(customerDTOList);
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/order/OrderServiceImpl.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.order;
//package by domain, not by duty
public class OrderServiceImpl{
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/app/CustomerConvertorTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.app;
public class CustomerConvertorTest {
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/app/CustomerValidatorTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.app;
import org.junit.Test;
public class CustomerValidatorTest {
@Test
public void testValidation(){
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-parent</artifactId>
<version>${version}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>${artifactId}</artifactId>
<packaging>jar</packaging>
<name>${parentArtifactId}-client</name>
<dependencies>
<dependency>
<groupId>com.alibaba.cola</groupId>
<artifactId>cola-component-dto</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
</dependencies>
</project>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/api/CustomerServiceI.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.api;
import com.alibaba.cola.dto.MultiResponse;
import com.alibaba.cola.dto.Response;
import ${package}.dto.CustomerAddCmd;
import ${package}.dto.CustomerListByNameQry;
import ${package}.dto.data.CustomerDTO;
public interface CustomerServiceI {
Response addCustomer(CustomerAddCmd customerAddCmd);
MultiResponse<CustomerDTO> listByName(CustomerListByNameQry customerListByNameQry);
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/CustomerAddCmd.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.dto;
import ${package}.dto.data.CustomerDTO;
import lombok.Data;
@Data
public class CustomerAddCmd{
private CustomerDTO customerDTO;
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/CustomerListByNameQry.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.dto;
import com.alibaba.cola.dto.Query;
import lombok.Data;
@Data
public class CustomerListByNameQry extends Query{
private String name;
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/data/CustomerDTO.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.dto.data;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@Data
public class CustomerDTO{
private String customerId;
private String memberId;
private String customerName;
private String customerType;
@NotEmpty
private String companyName;
@NotEmpty
private String source;
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/data/ErrorCode.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.dto.data;
public class ErrorCode {
public static final String B_CUSTOMER_companyNameConflict = "B_CUSTOMER_companyNameConflict";
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/event/CustomerCreatedEvent.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.dto.event;
import static ${package}.dto.event.DomainEventConstant.CUSTOMER_CREATED_TOPIC;
/**
* CustomerCreatedEvent
*
* @author Frank Zhang
* @date 2019-01-04 10:32 AM
*/
public class CustomerCreatedEvent{
private String customerId;
public String getCustomerId() {
return customerId;
}
public void setCustomerId(String customerId) {
this.customerId = customerId;
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/event/DomainEventConstant.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.dto.event;
/**
* @author niexiaolong
* @date 2019/4/16
*/
public class DomainEventConstant {
public static final String CUSTOMER_CREATED_TOPIC = "CRM_CUSTOMER_CREATED_DOMAIN_EVENT_TOPIC";
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-parent</artifactId>
<version>${version}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>${artifactId}</artifactId>
<packaging>jar</packaging>
<name>${artifactId}</name>
<dependencies>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-client</artifactId>
</dependency>
<!-- COLA components -->
<dependency>
<groupId>com.alibaba.cola</groupId>
<artifactId>cola-component-domain-starter</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cola</groupId>
<artifactId>cola-component-exception</artifactId>
</dependency>
<!-- COLA components End-->
</dependencies>
</project>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/CompanyType.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.customer;
/**
* CompanyType
*
* @author Frank Zhang
* @date 2018-01-08 11:02 AM
*/
public enum CompanyType {
POTENTIAL,
INTENTIONAL,
IMPORTANT,
VIP;
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/Credit.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.customer;
import com.alibaba.cola.domain.Entity;
import lombok.Data;
@Data
@Entity
public class Credit{
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/Customer.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.customer;
import com.alibaba.cola.domain.Entity;
import com.alibaba.cola.exception.BizException;
import lombok.Data;
//Domain Entity can choose to extends the domain model which is used for DTO
@Data
@Entity
public class Customer{
private String customerId;
private String memberId;
private String globalId;
private long registeredCapital;
private String companyName;
private SourceType sourceType;
private CompanyType companyType;
public Customer() {
}
public boolean isBigCompany() {
return registeredCapital > 10000000; //注册资金大于1000万的是大企业
}
public boolean isSME() {
return registeredCapital > 10000 && registeredCapital < 1000000; //注册资金大于10万小于100万的为中小企业
}
public void checkConflict(){
//Per different biz, the check policy could be different, if so, use ExtensionPoint
if("ConflictCompanyName".equals(this.companyName)){
throw new BizException(this.companyName+" has already existed, you can not add it");
}
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/CustomerType.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.customer;
/**
* CustomerType
*
* @author Frank Zhang
* @date 2018-01-08 8:51 AM
*/
public enum CustomerType {
POTENTIAL,
INTENTIONAL,
IMPORTANT,
VIP;
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/SourceType.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.customer;
/**
* SourceType
*
* @author Frank Zhang
* @date 2018-01-08 11:09 AM
*/
public enum SourceType {
BIZ_ONE, //From biz one
BIZ_TWO; //From biz two
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/domainservice/CreditChecker.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.customer.domainservice;
//The domain's ablility can also be placed here
public class CreditChecker{
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/gateway/CreditGateway.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.customer.gateway;
import ${package}.domain.customer.Customer;
import ${package}.domain.customer.Credit;
//Assume that the credit info is in antoher distributed Service
public interface CreditGateway {
Credit getCredit(String customerId);
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/gateway/CustomerGateway.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.customer.gateway;
import ${package}.domain.customer.Customer;
public interface CustomerGateway {
Customer getByById(String customerId);
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/order/Order.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain.order;
public class Order{
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/package-info.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
/**
* This is domain module, the core business logic is implemented here.
*
* @author fulan.zjf
*/
package ${package}.domain;
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/test/java/domain/CustomerEntityTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.domain;
public class CustomerEntityTest {
public void testCustomerConflict() {
System.out.println("Please mock gatewayimpl, test pure Domain Knowledge");
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-parent</artifactId>
<version>${version}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>${artifactId}</artifactId>
<packaging>jar</packaging>
<name>${artifactId}</name>
<dependencies>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-domain</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/config/DiamondConfig.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.config;
public class DiamondConfig {
public final static String DummyConfig = "DummyConfig";
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CreditGatewayImpl.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.customer;
import ${package}.domain.customer.Credit;
import ${package}.domain.customer.gateway.CreditGateway;
public class CreditGatewayImpl implements CreditGateway {
public Credit getCredit(String customerId){
return null;
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerDO.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.customer;
import lombok.Data;
@Data
public class CustomerDO{
private String customerId;
private String memberId;
private String globalId;
private long registeredCapital;
private String companyName;
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerGatewayImpl.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.customer;
import ${package}.domain.customer.Customer;
import ${package}.domain.customer.gateway.CustomerGateway;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class CustomerGatewayImpl implements CustomerGateway {
@Autowired
private CustomerMapper customerMapper;
public Customer getByById(String customerId){
CustomerDO customerDO = customerMapper.getById(customerId);
//Convert to Customer
return null;
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerMapper.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.customer;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface CustomerMapper{
CustomerDO getById(String customerId);
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/order/OrderGatewayImpl.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.order;
public class OrderGatewayImpl{
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/resources/logback-spring.xml
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- https://github.com/spring-projects/spring-boot/blob/v1.4.2.RELEASE/spring-boot/src/main/resources/org/springframework/boot/logging/logback/defaults.xml -->
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
<property name="APP_NAME" value="${parentArtifactId}" />
<property name="LOG_PATH" value="${symbol_dollar}{user.home}/${symbol_dollar}{APP_NAME}/logs" />
<property name="LOG_FILE" value="${symbol_dollar}{LOG_PATH}/application.log" />
<appender name="APPLICATION"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${symbol_dollar}{LOG_FILE}</file>
<encoder>
<pattern>${symbol_dollar}{FILE_LOG_PATTERN}</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${symbol_dollar}{LOG_FILE}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxHistory>7</maxHistory>
<maxFileSize>50MB</maxFileSize>
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
</appender>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${symbol_dollar}{CONSOLE_LOG_PATTERN}</pattern>
<charset>utf8</charset>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="CONSOLE" />
<appender-ref ref="APPLICATION" />
</root>
</configuration>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/resources/mybatis/customer-mapper.xml
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${package}.datatunnel.CustomerTunnelI">
<select id="findByCriteria" resultType="${package}.database.dataobject.CustomerDO" resultMap="customerMap">
select * from customer where customer_id = ${symbol_pound}{id}
</select>
<resultMap type="${package}.database.dataobject.CustomerDO" id="customerMap">
<result property="customerId" column="emp_no"/>
<result property="memberId" column="salary"/>
<result property="globalId" column="from_date"/>
</resultMap>
</mapper>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/resources/mybatis/mybatis-config.xml
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?xml version="1.0" encoding="UTF-8" ?>
<!-- mybatis的配置文件 -->
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<mappers>
<mapper resource="mybatis/customer-mapper.xml"/>
</mappers>
</configuration>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/test/java/repository/CustomerMapperTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.repository;
public class CustomerMapperTest {
public void testFindByID() {
System.out.println("Write your test here");
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/test/resources/sample.properties
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}-parent</artifactId>
<version>${version}</version>
<packaging>pom</packaging>
<name>${artifactId}</name>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.deploy.skip>true</maven.deploy.skip>
<cola.components.version>5.x-SNAPSHOT</cola.components.version>
<spring-boot.version>2.7.2</spring-boot.version>
<mybatis-starter.version>2.2.2</mybatis-starter.version>
</properties>
<modules>
<module>${rootArtifactId}-client</module>
<module>${rootArtifactId}-app</module>
<module>${rootArtifactId}-domain</module>
<module>${rootArtifactId}-infrastructure</module>
<module>start</module>
</modules>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<!--Project modules-->
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-app</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-domain</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-infrastructure</artifactId>
<version>${project.version}</version>
</dependency>
<!--Project modules End-->
<dependency>
<groupId>com.alibaba.cola</groupId>
<artifactId>cola-components-bom</artifactId>
<version>${cola.components.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-starter.version}</version>
</dependency>
<!--Validation API-->
<!--
- javax.validation:javax.validation
- org.hibernate.validator:hibernate-validator
- org.glassfish:jakarta.el
are declared in spring-boot-dependencies
-->
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>3.0.0</version>
</dependency>
<!--Validation API End -->
<!-- Misc -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.83</version>
</dependency>
<!-- Misc End -->
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-parent</artifactId>
<version>${version}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>${artifactId}</artifactId>
<packaging>jar</packaging>
<name>${artifactId}</name>
<dependencies>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-app</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/main/java/Application.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package};
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* Spring Boot Starter
*
*
* @author Frank Zhang
*/
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/main/resources/application.properties
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
project.name=${artifactId}
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/test
spring.datasource.username=root
spring.datasource.password=root
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/main/resources/logback-spring.xml
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
<!--定义参数,后面可以通过${symbol_dollar}{APP_NAME}使用-->
<property name="APP_NAME" value="${artifactId}" />
<property name="LOG_PATH" value="${symbol_dollar}{user.home}/${symbol_dollar}{APP_NAME}/logs" />
<property name="LOG_FILE" value="${symbol_dollar}{LOG_PATH}/application.log" />
<appender name="APPLICATION"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<!--定义日志输出的路径-->
<file>${symbol_dollar}{LOG_FILE}</file>
<encoder>
<pattern>${symbol_dollar}{FILE_LOG_PATTERN}</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${symbol_dollar}{LOG_FILE}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxHistory>7</maxHistory>
<maxFileSize>50MB</maxFileSize>
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
</appender>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${symbol_dollar}{CONSOLE_LOG_PATTERN}</pattern>
<charset>utf8</charset>
</encoder>
</appender>
<!--rootLogger是默认的logger-->
<root level="INFO">
<!--定义了两个appender,日志会通过往这两个appender里面写-->
<appender-ref ref="CONSOLE" />
<appender-ref ref="APPLICATION" />
</root>
<!--应用日志-->
<!--这个logger没有指定appender,它会继承root节点中定义的那些appender-->
<logger name="${package}" level="DEBUG"/>
<!--数据库日志-->
<!--由于这个logger自动继承了root的appender,root中已经有stdout的appender了,自己这边又引入了stdout的appender-->
<!--如果没有设置 additivity="false" ,就会导致一条日志在控制台输出两次的情况-->
<!--additivity表示要不要使用rootLogger配置的appender进行输出-->
<logger name="com.apache.ibatis" level="TRACE" additivity="false">
<appender-ref ref="CONSOLE"/>
</logger>
</configuration>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/test/java/TestApplication.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package};
import org.springframework.boot.SpringApplication;
import org.springframework.context.ApplicationContext;
public class TestApplication {
public static void main(String[] args) {
//这里填的是TestApplication
ApplicationContext context = SpringApplication.run(Application.class, args);
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/test/java/test/CustomerServiceTest.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.test;
import com.alibaba.cola.dto.Response;
import ${package}.api.CustomerServiceI;
import ${package}.dto.CustomerAddCmd;
import ${package}.dto.data.CustomerDTO;
import ${package}.dto.data.ErrorCode;
import ${package}.Application;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
/**
* This is for integration test.
*
* Created by fulan.zjf on 2017/11/29.
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
public class CustomerServiceTest {
@Autowired
private CustomerServiceI customerService;
@Before
public void setUp() {
}
@Test
public void testCustomerAddSuccess(){
//1.prepare
CustomerAddCmd customerAddCmd = new CustomerAddCmd();
CustomerDTO customerDTO = new CustomerDTO();
customerDTO.setCompanyName("NormalName");
customerAddCmd.setCustomerDTO(customerDTO);
//2.execute
Response response = customerService.addCustomer(customerAddCmd);
//3.assert
Assert.assertTrue(response.isSuccess());
}
@Test
public void testCustomerAddCompanyNameConflict(){
//1.prepare
CustomerAddCmd customerAddCmd = new CustomerAddCmd();
CustomerDTO customerDTO = new CustomerDTO();
customerDTO.setCompanyName("ConflictCompanyName");
customerAddCmd.setCustomerDTO(customerDTO);
//2.execute
Response response = customerService.addCustomer(customerAddCmd);
//3.Exception
Assert.assertEquals(ErrorCode.B_CUSTOMER_companyNameConflict, response.getErrCode());
}
}
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/test/resources/logback-test.xml
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
<charset>utf8</charset>
</encoder>
</appender>
<!--rootLogger是默认的logger-->
<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
<!--应用日志-->
<!--这个logger没有指定appender,它会继承root节点中定义的那些appender-->
<logger name="${package}" level="DEBUG"/>
<!--全局的访问日志-->
<logger name="com.alibaba.cola.catchlog" level="DEBUG"/>
</configuration>
================================================
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/test/resources/test.properties
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}tddl
spring.tddl.app=TDDL6_APP
spring.tddl.sharding=false
mybatis.config-location=classpath:mybatis/mybatis-config.xml
${symbol_pound}app
spring.hsf.group=HSF
spring.hsf.version=1.0.0.DAILY
spring.hsf.timeout=2000
${symbol_pound}tair
spring.tair.config-id=mdbcomm-daily
spring.tair.dynamic-config=true
${symbol_pound}notify
spring.notify.subscriber.group-id=S-pb-test-subscriber1
spring.notify.subscriber.messageListener=messageListener
spring.notify.subscriber.binding.key=type
spring.notify.subscriber.binding.topic=pandora-boot-test-topic
spring.notify.publisher.group-id=P-pb-test
spring.notify.publisher.topics=pandora-boot-test-topic2, pandora-boot-test-topic
================================================
FILE: cola-archetypes/cola-archetype-service/src/test/resources/projects/basic/archetype.properties
================================================
#Tue Apr 16 18:52:28 CST 2019
package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
artifactId=basic
gitignore=.gitignore
================================================
FILE: cola-archetypes/cola-archetype-service/src/test/resources/projects/basic/goal.txt
================================================
================================================
FILE: cola-archetypes/cola-archetype-web/.gitignore
================================================
target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
bin/
doc/
.DS_Store
================================================
FILE: cola-archetypes/cola-archetype-web/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.alibaba.cola</groupId>
<artifactId>cola-framework-archetypes-parent</artifactId>
<version>5.x-SNAPSHOT</version>
</parent>
<artifactId>cola-framework-archetype-web</artifactId>
<packaging>maven-archetype</packaging>
<name>${project.artifactId}</name>
<description>${project.artifactId}</description>
<url>https://github.com/alibaba/COLA</url>
<licenses>
<license>
<name>GNU Lesser General Public License v2.1</name>
<url>https://github.com/alibaba/COLA/blob/master/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:https://github.com/alibaba/COLA.git</connection>
<developerConnection>scm:git:https://github.com/alibaba/COLA.git</developerConnection>
<url>https://github.com/alibaba/COLA</url>
</scm>
<issueManagement>
<url>https://github.com/alibaba/COLA/issues</url>
<system>GitHub Issues</system>
</issueManagement>
<developers>
<developer>
<id>significantfrank</id>
<name>Frank Zhang</name>
<email>25216348(at)qq.com</email>
<roles>
<role>Developer</role>
<role>Architect</role>
</roles>
<timezone>+8</timezone>
<url>https://github.com/significantfrank</url>
</developer>
<developer>
<id>oldratlee</id>
<name>Jerry Lee</name>
<email>oldratlee(at)gmail.com</email>
<roles>
<role>Developer</role>
<role>CI/SCM Engineer</role>
</roles>
<timezone>+8</timezone>
<url>https://github.com/oldratlee</url>
</developer>
</developers>
</project>
================================================
FILE: cola-archetypes/cola-archetype-web/src/main/resources/META-INF/maven/archetype-metadata.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
name="demo"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0">
<requiredProperties>
<requiredProperty key="gitignore">
<defaultValue>.gitignore</defaultValue>
</requiredProperty>
</requiredProperties>
<fileSets>
<fileSet>
<directory></directory>
<includes>
<include>__gitignore__</include>
</includes>
</fileSet>
</fileSets>
<modules>
<module id="${rootArtifactId}-client" dir="__rootArtifactId__-client" name="${rootArtifactId}-client">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="${rootArtifactId}-adapter" dir="__rootArtifactId__-adapter" name="${rootArtifactId}-adapter">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="${rootArtifactId}-app" dir="__rootArtifactId__-app" name="${rootArtifactId}-app">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="${rootArtifactId}-domain" dir="__rootArtifactId__-domain" name="${rootArtifactId}-domain">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="${rootArtifactId}-infrastructure" dir="__rootArtifactId__-infrastructure"
name="${rootArtifactId}-infrastructure">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/test/resources</directory>
<includes>
<include>**/*.properties</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="start" dir="start" name="start">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/test/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
</fileSets>
</module>
</modules>
</archetype-descriptor>
================================================
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__gitignore__
================================================
target/
### eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
bin/
doc/
.DS_Store
================================================
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-adapter/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-parent</artifactId>
<version>${version}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>${artifactId}</artifactId>
<packaging>jar</packaging>
<name>${artifactId}</name>
<dependencies>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-app</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
================================================
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-adapter/src/main/java/mobile/CustomerMobileAdaptor.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.mobile;
/**
* Customer Mobile Adaptor
*
*
* @author Frank Zhang
* @date 2020-10-27 8:04 PM
*/
public class CustomerMobileAdaptor {
}
================================================
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-adapter/src/main/java/wap/CustomerWapAdaptor.java
================================================
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.wap;
/**
* Customer Wap Adaptor
*
* WAP : Wireless Application Protocol)
*
* @author Frank Zhang
* @date 2020-10-27 8:03 PM
*/
public class CustomerWapAdaptor {
}
========================
gitextract_s6zpyxns/
├── .editorconfig
├── .github/
│ ├── dependabot.yml
│ └── workflows/
│ ├── ci.yaml
│ └── ci_by_multiply_java_versions.yaml
├── .gitignore
├── .gitmodules
├── .mvn/
│ └── wrapper/
│ └── maven-wrapper.properties
├── LICENSE
├── README.md
├── cola-archetypes/
│ ├── cola-archetype-light/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── resources/
│ │ │ ├── META-INF/
│ │ │ │ └── maven/
│ │ │ │ └── archetype-metadata.xml
│ │ │ └── archetype-resources/
│ │ │ ├── README.md
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ ├── main/
│ │ │ │ ├── java/
│ │ │ │ │ ├── Application.java
│ │ │ │ │ ├── adapter/
│ │ │ │ │ │ └── ChargeController.java
│ │ │ │ │ ├── application/
│ │ │ │ │ │ ├── ChargeServiceI.java
│ │ │ │ │ │ ├── ChargeServiceImpl.java
│ │ │ │ │ │ └── dto/
│ │ │ │ │ │ ├── BeginSessionRequest.java
│ │ │ │ │ │ ├── ChargeRecordDto.java
│ │ │ │ │ │ ├── ChargeRequest.java
│ │ │ │ │ │ ├── EndSessionRequest.java
│ │ │ │ │ │ ├── MultiResponse.java
│ │ │ │ │ │ ├── Response.java
│ │ │ │ │ │ └── SingleResponse.java
│ │ │ │ │ ├── domain/
│ │ │ │ │ │ ├── ApplicationContextHelper.java
│ │ │ │ │ │ ├── BizException.java
│ │ │ │ │ │ ├── DomainFactory.java
│ │ │ │ │ │ ├── Entity.java
│ │ │ │ │ │ ├── account/
│ │ │ │ │ │ │ ├── Account.java
│ │ │ │ │ │ │ └── AccountDomainService.java
│ │ │ │ │ │ ├── charge/
│ │ │ │ │ │ │ ├── CallType.java
│ │ │ │ │ │ │ ├── ChargeContext.java
│ │ │ │ │ │ │ ├── ChargeRecord.java
│ │ │ │ │ │ │ ├── Money.java
│ │ │ │ │ │ │ ├── MoneyConverter.java
│ │ │ │ │ │ │ ├── Session.java
│ │ │ │ │ │ │ ├── chargeplan/
│ │ │ │ │ │ │ │ ├── BasicChargePlan.java
│ │ │ │ │ │ │ │ ├── ChargePlan.java
│ │ │ │ │ │ │ │ ├── ChargePlanType.java
│ │ │ │ │ │ │ │ ├── FamilyChargePlan.java
│ │ │ │ │ │ │ │ ├── FixedTimeChangePlan.java
│ │ │ │ │ │ │ │ └── Resource.java
│ │ │ │ │ │ │ └── chargerule/
│ │ │ │ │ │ │ ├── AbstractChargeRule.java
│ │ │ │ │ │ │ ├── BasicChargeRule.java
│ │ │ │ │ │ │ ├── ChargeRule.java
│ │ │ │ │ │ │ ├── ChargeRuleFactory.java
│ │ │ │ │ │ │ ├── CompositeChargeRule.java
│ │ │ │ │ │ │ ├── FamilyChargeRule.java
│ │ │ │ │ │ │ └── FixedTimeChargeRule.java
│ │ │ │ │ │ └── gateway/
│ │ │ │ │ │ ├── AccountGateway.java
│ │ │ │ │ │ ├── ChargeGateway.java
│ │ │ │ │ │ └── SessionGateway.java
│ │ │ │ │ └── infrastructure/
│ │ │ │ │ ├── AccountGatewayImpl.java
│ │ │ │ │ ├── RestClientBean.java
│ │ │ │ │ └── SessionGatewayImpl.java
│ │ │ │ └── resources/
│ │ │ │ ├── application.yml
│ │ │ │ └── logback.xml
│ │ │ └── test/
│ │ │ ├── charge.http
│ │ │ ├── java/
│ │ │ │ ├── CleanArchTest.java
│ │ │ │ ├── TestsContainerBoot.java
│ │ │ │ ├── application/
│ │ │ │ │ └── ChargeServiceTest.java
│ │ │ │ ├── domain/
│ │ │ │ │ ├── ChargeRecordPlanTest.java
│ │ │ │ │ ├── ChargeRecordRuleTest.java
│ │ │ │ │ └── CompositeChargeRuleTestRecord.java
│ │ │ │ └── infrastructure/
│ │ │ │ ├── AccountGatewayTest.java
│ │ │ │ ├── ChargeRecordRepoTest.java
│ │ │ │ ├── FixtureLoader.java
│ │ │ │ ├── JSONTest.java
│ │ │ │ ├── SpingBootConfTest.java
│ │ │ │ ├── WireMockBasicTest.java
│ │ │ │ └── WireMockRegister.java
│ │ │ └── resources/
│ │ │ ├── application-test.yml
│ │ │ ├── application.yml
│ │ │ ├── fixture/
│ │ │ │ └── wiremock/
│ │ │ │ ├── stub_account.json
│ │ │ │ ├── stub_insufficient_account.json
│ │ │ │ └── stub_wire_mock_basic.json
│ │ │ └── logback-test.xml
│ │ └── test/
│ │ └── resources/
│ │ └── projects/
│ │ └── basic/
│ │ ├── archetype.properties
│ │ └── goal.txt
│ ├── cola-archetype-service/
│ │ ├── .gitignore
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── resources/
│ │ │ ├── META-INF/
│ │ │ │ └── maven/
│ │ │ │ └── archetype-metadata.xml
│ │ │ └── archetype-resources/
│ │ │ ├── __gitignore__
│ │ │ ├── __rootArtifactId__-app/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ └── java/
│ │ │ │ │ ├── customer/
│ │ │ │ │ │ ├── CustomerServiceImpl.java
│ │ │ │ │ │ └── executor/
│ │ │ │ │ │ ├── CustomerAddCmdExe.java
│ │ │ │ │ │ └── query/
│ │ │ │ │ │ └── CustomerListByNameQryExe.java
│ │ │ │ │ └── order/
│ │ │ │ │ └── OrderServiceImpl.java
│ │ │ │ └── test/
│ │ │ │ └── java/
│ │ │ │ └── app/
│ │ │ │ ├── CustomerConvertorTest.java
│ │ │ │ └── CustomerValidatorTest.java
│ │ │ ├── __rootArtifactId__-client/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ └── main/
│ │ │ │ └── java/
│ │ │ │ ├── api/
│ │ │ │ │ └── CustomerServiceI.java
│ │ │ │ └── dto/
│ │ │ │ ├── CustomerAddCmd.java
│ │ │ │ ├── CustomerListByNameQry.java
│ │ │ │ ├── data/
│ │ │ │ │ ├── CustomerDTO.java
│ │ │ │ │ └── ErrorCode.java
│ │ │ │ └── event/
│ │ │ │ ├── CustomerCreatedEvent.java
│ │ │ │ └── DomainEventConstant.java
│ │ │ ├── __rootArtifactId__-domain/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ └── java/
│ │ │ │ │ └── domain/
│ │ │ │ │ ├── customer/
│ │ │ │ │ │ ├── CompanyType.java
│ │ │ │ │ │ ├── Credit.java
│ │ │ │ │ │ ├── Customer.java
│ │ │ │ │ │ ├── CustomerType.java
│ │ │ │ │ │ ├── SourceType.java
│ │ │ │ │ │ ├── domainservice/
│ │ │ │ │ │ │ └── CreditChecker.java
│ │ │ │ │ │ └── gateway/
│ │ │ │ │ │ ├── CreditGateway.java
│ │ │ │ │ │ └── CustomerGateway.java
│ │ │ │ │ ├── order/
│ │ │ │ │ │ └── Order.java
│ │ │ │ │ └── package-info.java
│ │ │ │ └── test/
│ │ │ │ └── java/
│ │ │ │ └── domain/
│ │ │ │ └── CustomerEntityTest.java
│ │ │ ├── __rootArtifactId__-infrastructure/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ ├── java/
│ │ │ │ │ │ ├── config/
│ │ │ │ │ │ │ └── DiamondConfig.java
│ │ │ │ │ │ ├── customer/
│ │ │ │ │ │ │ ├── CreditGatewayImpl.java
│ │ │ │ │ │ │ ├── CustomerDO.java
│ │ │ │ │ │ │ ├── CustomerGatewayImpl.java
│ │ │ │ │ │ │ └── CustomerMapper.java
│ │ │ │ │ │ └── order/
│ │ │ │ │ │ └── OrderGatewayImpl.java
│ │ │ │ │ └── resources/
│ │ │ │ │ ├── logback-spring.xml
│ │ │ │ │ └── mybatis/
│ │ │ │ │ ├── customer-mapper.xml
│ │ │ │ │ └── mybatis-config.xml
│ │ │ │ └── test/
│ │ │ │ ├── java/
│ │ │ │ │ └── repository/
│ │ │ │ │ └── CustomerMapperTest.java
│ │ │ │ └── resources/
│ │ │ │ └── sample.properties
│ │ │ ├── pom.xml
│ │ │ └── start/
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ ├── main/
│ │ │ │ ├── java/
│ │ │ │ │ └── Application.java
│ │ │ │ └── resources/
│ │ │ │ ├── application.properties
│ │ │ │ └── logback-spring.xml
│ │ │ └── test/
│ │ │ ├── java/
│ │ │ │ ├── TestApplication.java
│ │ │ │ └── test/
│ │ │ │ └── CustomerServiceTest.java
│ │ │ └── resources/
│ │ │ ├── logback-test.xml
│ │ │ └── test.properties
│ │ └── test/
│ │ └── resources/
│ │ └── projects/
│ │ └── basic/
│ │ ├── archetype.properties
│ │ └── goal.txt
│ ├── cola-archetype-web/
│ │ ├── .gitignore
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── resources/
│ │ │ ├── META-INF/
│ │ │ │ └── maven/
│ │ │ │ └── archetype-metadata.xml
│ │ │ └── archetype-resources/
│ │ │ ├── __gitignore__
│ │ │ ├── __rootArtifactId__-adapter/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ └── main/
│ │ │ │ └── java/
│ │ │ │ ├── mobile/
│ │ │ │ │ └── CustomerMobileAdaptor.java
│ │ │ │ ├── wap/
│ │ │ │ │ └── CustomerWapAdaptor.java
│ │ │ │ └── web/
│ │ │ │ └── CustomerController.java
│ │ │ ├── __rootArtifactId__-app/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ └── java/
│ │ │ │ │ ├── customer/
│ │ │ │ │ │ ├── CustomerServiceImpl.java
│ │ │ │ │ │ └── executor/
│ │ │ │ │ │ ├── CustomerAddCmdExe.java
│ │ │ │ │ │ └── query/
│ │ │ │ │ │ └── CustomerListByNameQryExe.java
│ │ │ │ │ └── order/
│ │ │ │ │ └── OrderServiceImpl.java
│ │ │ │ └── test/
│ │ │ │ └── java/
│ │ │ │ └── app/
│ │ │ │ ├── CustomerConvertorTest.java
│ │ │ │ └── CustomerValidatorTest.java
│ │ │ ├── __rootArtifactId__-client/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ └── main/
│ │ │ │ └── java/
│ │ │ │ ├── api/
│ │ │ │ │ └── CustomerServiceI.java
│ │ │ │ └── dto/
│ │ │ │ ├── CustomerAddCmd.java
│ │ │ │ ├── CustomerListByNameQry.java
│ │ │ │ ├── data/
│ │ │ │ │ ├── CustomerDTO.java
│ │ │ │ │ └── ErrorCode.java
│ │ │ │ └── event/
│ │ │ │ ├── CustomerCreatedEvent.java
│ │ │ │ └── DomainEventConstant.java
│ │ │ ├── __rootArtifactId__-domain/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ └── java/
│ │ │ │ │ └── domain/
│ │ │ │ │ ├── customer/
│ │ │ │ │ │ ├── CompanyType.java
│ │ │ │ │ │ ├── Credit.java
│ │ │ │ │ │ ├── Customer.java
│ │ │ │ │ │ ├── CustomerType.java
│ │ │ │ │ │ ├── SourceType.java
│ │ │ │ │ │ ├── domainservice/
│ │ │ │ │ │ │ └── CreditChecker.java
│ │ │ │ │ │ └── gateway/
│ │ │ │ │ │ ├── CreditGateway.java
│ │ │ │ │ │ └── CustomerGateway.java
│ │ │ │ │ ├── order/
│ │ │ │ │ │ └── Order.java
│ │ │ │ │ └── package-info.java
│ │ │ │ └── test/
│ │ │ │ └── java/
│ │ │ │ └── domain/
│ │ │ │ └── CustomerEntityTest.java
│ │ │ ├── __rootArtifactId__-infrastructure/
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ ├── java/
│ │ │ │ │ │ ├── config/
│ │ │ │ │ │ │ └── DiamondConfig.java
│ │ │ │ │ │ ├── customer/
│ │ │ │ │ │ │ ├── CreditGatewayImpl.java
│ │ │ │ │ │ │ ├── CustomerDO.java
│ │ │ │ │ │ │ ├── CustomerGatewayImpl.java
│ │ │ │ │ │ │ └── CustomerMapper.java
│ │ │ │ │ │ └── order/
│ │ │ │ │ │ └── OrderGatewayImpl.java
│ │ │ │ │ └── resources/
│ │ │ │ │ ├── logback-spring.xml
│ │ │ │ │ └── mybatis/
│ │ │ │ │ ├── customer-mapper.xml
│ │ │ │ │ └── mybatis-config.xml
│ │ │ │ └── test/
│ │ │ │ ├── java/
│ │ │ │ │ └── repository/
│ │ │ │ │ └── CustomerMapperTest.java
│ │ │ │ └── resources/
│ │ │ │ └── sample.properties
│ │ │ ├── pom.xml
│ │ │ └── start/
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ ├── main/
│ │ │ │ ├── java/
│ │ │ │ │ └── Application.java
│ │ │ │ └── resources/
│ │ │ │ ├── application.properties
│ │ │ │ └── logback-spring.xml
│ │ │ └── test/
│ │ │ ├── java/
│ │ │ │ ├── TestApplication.java
│ │ │ │ └── test/
│ │ │ │ └── CustomerServiceTest.java
│ │ │ └── resources/
│ │ │ ├── logback-test.xml
│ │ │ └── test.properties
│ │ └── test/
│ │ └── resources/
│ │ └── projects/
│ │ └── basic/
│ │ ├── archetype.properties
│ │ └── goal.txt
│ └── pom.xml
├── cola-components/
│ ├── cola-component-catchlog-starter/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── alibaba/
│ │ │ │ └── cola/
│ │ │ │ └── catchlog/
│ │ │ │ ├── ApplicationContextHelper.java
│ │ │ │ ├── CatchAndLog.java
│ │ │ │ ├── CatchLogAspect.java
│ │ │ │ ├── CatchLogAutoConfiguration.java
│ │ │ │ ├── DefaultResponseHandler.java
│ │ │ │ ├── ResponseHandlerFactory.java
│ │ │ │ └── ResponseHandlerI.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── spring.factories
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── catchlog/
│ │ │ └── test/
│ │ │ ├── Application.java
│ │ │ ├── CatchLogTest.java
│ │ │ ├── CustomResponseHandler.java
│ │ │ └── Demo.java
│ │ └── resources/
│ │ ├── application.properties
│ │ └── logback-test.xml
│ ├── cola-component-domain-starter/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── alibaba/
│ │ │ │ └── cola/
│ │ │ │ └── domain/
│ │ │ │ ├── ApplicationContextHelper.java
│ │ │ │ ├── DomainAutoConfiguration.java
│ │ │ │ ├── DomainFactory.java
│ │ │ │ └── Entity.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── spring.factories
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── domain/
│ │ │ ├── Application.java
│ │ │ ├── Customer.java
│ │ │ └── PurchasePowerGateway.java
│ │ └── resources/
│ │ ├── application.properties
│ │ └── logback-test.xml
│ ├── cola-component-dto/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ ├── dto/
│ │ │ │ ├── ClientObject.java
│ │ │ │ ├── Command.java
│ │ │ │ ├── DTO.java
│ │ │ │ ├── MultiResponse.java
│ │ │ │ ├── PageQuery.java
│ │ │ │ ├── PageResponse.java
│ │ │ │ ├── Query.java
│ │ │ │ ├── Response.java
│ │ │ │ ├── Scope.java
│ │ │ │ └── SingleResponse.java
│ │ │ └── extension/
│ │ │ └── BizScenario.java
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── Test.java
│ │ └── resources/
│ │ └── logback-test.xml
│ ├── cola-component-exception/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── exception/
│ │ │ ├── Assert.java
│ │ │ ├── BaseException.java
│ │ │ ├── BizException.java
│ │ │ ├── ExceptionFactory.java
│ │ │ └── SysException.java
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── exception/
│ │ │ └── Test.java
│ │ └── resources/
│ │ └── logback-test.xml
│ ├── cola-component-extension-starter/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── alibaba/
│ │ │ │ └── cola/
│ │ │ │ └── extension/
│ │ │ │ ├── Extension.java
│ │ │ │ ├── ExtensionAutoConfiguration.java
│ │ │ │ ├── ExtensionCoordinate.java
│ │ │ │ ├── ExtensionException.java
│ │ │ │ ├── ExtensionExecutor.java
│ │ │ │ ├── ExtensionPointI.java
│ │ │ │ ├── ExtensionRepository.java
│ │ │ │ ├── Extensions.java
│ │ │ │ └── register/
│ │ │ │ ├── AbstractComponentExecutor.java
│ │ │ │ ├── ExtensionBootstrap.java
│ │ │ │ └── ExtensionRegister.java
│ │ │ └── resources/
│ │ │ └── META-INF/
│ │ │ └── spring.factories
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── extension/
│ │ │ ├── Application.java
│ │ │ ├── ExtensionTest.java
│ │ │ ├── MultiCoordinateTests.java
│ │ │ ├── customer/
│ │ │ │ ├── app/
│ │ │ │ │ ├── AddCustomerCmdExe.java
│ │ │ │ │ ├── CustomerCreatedEventHandler.java
│ │ │ │ │ ├── CustomerServiceImpl.java
│ │ │ │ │ ├── GetOneCustomerQryExe.java
│ │ │ │ │ ├── extension/
│ │ │ │ │ │ ├── AddCustomerBiz1UseCase1Scenario1Validator.java
│ │ │ │ │ │ ├── AddCustomerBiz1UseCase1Validator.java
│ │ │ │ │ │ ├── AddCustomerBizOneValidator.java
│ │ │ │ │ │ ├── AddCustomerBizTwoValidator.java
│ │ │ │ │ │ ├── CustomerBizOneConvertorExt.java
│ │ │ │ │ │ ├── CustomerBizTwoConvertorExt.java
│ │ │ │ │ │ ├── CustomerConvertor.java
│ │ │ │ │ │ └── StatusNameConvertorExt.java
│ │ │ │ │ └── extensionpoint/
│ │ │ │ │ ├── AddCustomerValidatorExtPt.java
│ │ │ │ │ ├── CustomerConvertorExtPt.java
│ │ │ │ │ └── StatusNameConvertorExtPt.java
│ │ │ │ ├── client/
│ │ │ │ │ ├── AddCustomerCmd.java
│ │ │ │ │ ├── Constants.java
│ │ │ │ │ ├── CustomerCreatedEvent.java
│ │ │ │ │ ├── CustomerDTO.java
│ │ │ │ │ ├── CustomerServiceI.java
│ │ │ │ │ └── GetOneCustomerQry.java
│ │ │ │ ├── domain/
│ │ │ │ │ ├── CustomerEntity.java
│ │ │ │ │ ├── CustomerType.java
│ │ │ │ │ ├── SourceType.java
│ │ │ │ │ └── rule/
│ │ │ │ │ ├── CustomerBizOneRuleExt.java
│ │ │ │ │ ├── CustomerBizTwoRuleExt.java
│ │ │ │ │ └── CustomerRuleExtPt.java
│ │ │ │ └── infrastructure/
│ │ │ │ ├── CustomerDO.java
│ │ │ │ ├── CustomerRepository.java
│ │ │ │ └── DomainEventPublisher.java
│ │ │ └── register/
│ │ │ ├── CglibProxyFactory.java
│ │ │ ├── ExtensionRegisterTest.java
│ │ │ ├── SomeExtPt.java
│ │ │ ├── SomeExtensionA.java
│ │ │ └── SomeExtensionB.java
│ │ └── resources/
│ │ ├── application.properties
│ │ └── logback-test.xml
│ ├── cola-component-job/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── alibaba/
│ │ │ │ └── cola/
│ │ │ │ └── job/
│ │ │ │ ├── BatchJobLauncher.java
│ │ │ │ ├── ExecutionContext.java
│ │ │ │ ├── JobBuilderFactory.java
│ │ │ │ ├── JobException.java
│ │ │ │ ├── JobLauncher.java
│ │ │ │ ├── UuidGenerator.java
│ │ │ │ ├── config/
│ │ │ │ │ ├── DBAutoConfiguration.java
│ │ │ │ │ ├── EnableColaJob.java
│ │ │ │ │ ├── EnableJobConfiguration.java
│ │ │ │ │ ├── JobProperties.java
│ │ │ │ │ └── RedisConfig.java
│ │ │ │ ├── model/
│ │ │ │ │ ├── AbstractStep.java
│ │ │ │ │ ├── BatchJob.java
│ │ │ │ │ ├── BatchJobExecution.java
│ │ │ │ │ ├── ExecutionStatus.java
│ │ │ │ │ ├── Job.java
│ │ │ │ │ ├── JobExecution.java
│ │ │ │ │ ├── JobInstance.java
│ │ │ │ │ ├── Step.java
│ │ │ │ │ └── StepExecution.java
│ │ │ │ └── repository/
│ │ │ │ ├── AbstractJobRepository.java
│ │ │ │ ├── JobRepository.java
│ │ │ │ ├── JsonUtil.java
│ │ │ │ ├── RepositoryType.java
│ │ │ │ ├── db/
│ │ │ │ │ ├── BatchJobExecutionRepository.java
│ │ │ │ │ ├── DataBaseJobRepository.java
│ │ │ │ │ ├── JobExecutionRepository.java
│ │ │ │ │ └── StepExecutionRepository.java
│ │ │ │ ├── memory/
│ │ │ │ │ └── MemoryJobRepository.java
│ │ │ │ └── redis/
│ │ │ │ └── RedisJobRepository.java
│ │ │ └── resources/
│ │ │ └── schema-mysql.sql
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── job/
│ │ │ └── test/
│ │ │ ├── AbstractBaseJobTest.java
│ │ │ ├── MemoryDBJobTest.java
│ │ │ ├── MemoryJobTest.java
│ │ │ ├── MySQLJobTest.java
│ │ │ ├── RedisJobTest.java
│ │ │ ├── TestApplication.java
│ │ │ ├── TestsContainerBoot.java
│ │ │ └── steps/
│ │ │ ├── FailedStep.java
│ │ │ ├── LongTimeStep.java
│ │ │ ├── MyStep1.java
│ │ │ ├── MyStep2.java
│ │ │ ├── MyStep3.java
│ │ │ ├── MyStep4.java
│ │ │ ├── MyStep5.java
│ │ │ └── SwitchStep.java
│ │ └── resources/
│ │ ├── application-h2-test.yml
│ │ ├── application-mysql-test.yml
│ │ ├── application-redis-test.yml
│ │ └── logback-test.xml
│ ├── cola-component-ruleengine/
│ │ ├── README.md
│ │ ├── gitignore.txt
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── ruleengine/
│ │ │ ├── api/
│ │ │ │ ├── Action.java
│ │ │ │ ├── Condition.java
│ │ │ │ ├── Fact.java
│ │ │ │ ├── Facts.java
│ │ │ │ ├── Rule.java
│ │ │ │ └── RuleEngine.java
│ │ │ └── core/
│ │ │ ├── AbstractRule.java
│ │ │ ├── AllRules.java
│ │ │ ├── AnyRules.java
│ │ │ ├── CompositeRule.java
│ │ │ ├── DefaultRule.java
│ │ │ ├── DefaultRuleEngine.java
│ │ │ ├── NaturalRules.java
│ │ │ └── RuleBuilder.java
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── ruleengine/
│ │ │ ├── CompositeRuleTest.java
│ │ │ ├── FactsTest.java
│ │ │ ├── FizzBuzz.java
│ │ │ ├── HelloWorld.java
│ │ │ ├── PriorityTest.java
│ │ │ ├── RuleBuilderTest.java
│ │ │ ├── RuleEngineTest.java
│ │ │ └── fizzbuzz/
│ │ │ ├── FizzBuzzTest.java
│ │ │ ├── v1/
│ │ │ │ └── FizzBuzz.java
│ │ │ └── v2/
│ │ │ ├── Action.java
│ │ │ ├── Condition.java
│ │ │ ├── FizzBuzz.java
│ │ │ ├── Rule.java
│ │ │ ├── SimpleRuleEngine.java
│ │ │ └── TimesCondition.java
│ │ └── resources/
│ │ └── logback-test.xml
│ ├── cola-component-statemachine/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── statemachine/
│ │ │ ├── Action.java
│ │ │ ├── Condition.java
│ │ │ ├── State.java
│ │ │ ├── StateContext.java
│ │ │ ├── StateMachine.java
│ │ │ ├── StateMachineFactory.java
│ │ │ ├── Transition.java
│ │ │ ├── Visitable.java
│ │ │ ├── Visitor.java
│ │ │ ├── builder/
│ │ │ │ ├── AbstractParallelTransitionBuilder.java
│ │ │ │ ├── AbstractTransitionBuilder.java
│ │ │ │ ├── AlertFailCallback.java
│ │ │ │ ├── ExternalParallelTransitionBuilder.java
│ │ │ │ ├── ExternalTransitionBuilder.java
│ │ │ │ ├── ExternalTransitionsBuilder.java
│ │ │ │ ├── FailCallback.java
│ │ │ │ ├── From.java
│ │ │ │ ├── InternalTransitionBuilder.java
│ │ │ │ ├── NumbFailCallback.java
│ │ │ │ ├── On.java
│ │ │ │ ├── ParallelFrom.java
│ │ │ │ ├── ParallelTransitionBuilderImpl.java
│ │ │ │ ├── StateMachineBuilder.java
│ │ │ │ ├── StateMachineBuilderFactory.java
│ │ │ │ ├── StateMachineBuilderImpl.java
│ │ │ │ ├── To.java
│ │ │ │ ├── TransitionBuilderImpl.java
│ │ │ │ ├── TransitionsBuilderImpl.java
│ │ │ │ ├── When.java
│ │ │ │ └── package-info.java
│ │ │ ├── exception/
│ │ │ │ └── TransitionFailException.java
│ │ │ └── impl/
│ │ │ ├── Debugger.java
│ │ │ ├── EventTransitions.java
│ │ │ ├── PlantUMLVisitor.java
│ │ │ ├── StateHelper.java
│ │ │ ├── StateImpl.java
│ │ │ ├── StateMachineException.java
│ │ │ ├── StateMachineImpl.java
│ │ │ ├── SysOutVisitor.java
│ │ │ ├── TransitionImpl.java
│ │ │ └── TransitionType.java
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── alibaba/
│ │ └── cola/
│ │ └── test/
│ │ ├── StateMachineChoiceTest.java
│ │ ├── StateMachinePlantUMLTest.java
│ │ ├── StateMachineTest.java
│ │ └── StateMachineUnNormalTest.java
│ ├── cola-component-test-container/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── test/
│ │ │ ├── BeanMetaUtils.java
│ │ │ ├── TestExecutor.java
│ │ │ ├── TestsContainer.java
│ │ │ └── command/
│ │ │ ├── AbstractCommand.java
│ │ │ ├── CommandEnum.java
│ │ │ ├── GuideCmd.java
│ │ │ ├── TestClassRunCmd.java
│ │ │ └── TestMethodRunCmd.java
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── test/
│ │ │ ├── Demo.java
│ │ │ ├── DemoWithExtension.java
│ │ │ ├── SpringBootConfig.java
│ │ │ ├── SpringConfig.java
│ │ │ └── TestsContainerTest.java
│ │ └── resources/
│ │ └── logback-test.xml
│ ├── cola-component-unittest/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── unittest/
│ │ │ ├── FixtureLoader.java
│ │ │ ├── kafka/
│ │ │ │ ├── KafkaExtension.java
│ │ │ │ ├── MessageData.java
│ │ │ │ └── ProduceMessage.java
│ │ │ ├── redis/
│ │ │ │ ├── ExpectRedis.java
│ │ │ │ ├── RedisData.java
│ │ │ │ ├── RedisExtension.java
│ │ │ │ └── SetupRedis.java
│ │ │ └── wiremock/
│ │ │ └── WireMockRegister.java
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── cola/
│ │ │ └── unittest/
│ │ │ ├── Application.java
│ │ │ ├── TestsContainerBoot.java
│ │ │ ├── db/
│ │ │ │ ├── DBSetupTest.java
│ │ │ │ ├── Person.java
│ │ │ │ └── PersonRepository.java
│ │ │ ├── kafka/
│ │ │ │ ├── KafkaConsumer.java
│ │ │ │ └── KafkaExtensionTest.java
│ │ │ ├── redis/
│ │ │ │ └── RedisExtensionTest.java
│ │ │ └── wiremock/
│ │ │ ├── Account.java
│ │ │ └── WireMockBasicTest.java
│ │ └── resources/
│ │ ├── application.properties
│ │ ├── fixture/
│ │ │ ├── db/
│ │ │ │ └── sample-data.xml
│ │ │ ├── kafka/
│ │ │ │ └── produce-message.json
│ │ │ ├── redis/
│ │ │ │ ├── array-setup.json
│ │ │ │ ├── hash-setup.json
│ │ │ │ ├── string-expect.json
│ │ │ │ └── string-setup.json
│ │ │ └── wiremock/
│ │ │ ├── stub-account.json
│ │ │ └── stub-wire-mock-basic.json
│ │ └── logback-test.xml
│ ├── cola-components-bom/
│ │ └── pom.xml
│ ├── dev-util-archetypes/
│ │ ├── README.md
│ │ ├── cola-normal-component-archetype/
│ │ │ ├── .gitignore
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ ├── main/
│ │ │ │ └── resources/
│ │ │ │ ├── META-INF/
│ │ │ │ │ └── maven/
│ │ │ │ │ └── archetype-metadata.xml
│ │ │ │ └── archetype-resources/
│ │ │ │ ├── gitignore.txt
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ └── java/
│ │ │ │ │ └── Dummy.java
│ │ │ │ └── test/
│ │ │ │ └── resources/
│ │ │ │ └── logback-test.xml
│ │ │ └── test/
│ │ │ └── resources/
│ │ │ └── projects/
│ │ │ └── basic/
│ │ │ ├── archetype.properties
│ │ │ └── goal.txt
│ │ ├── cola-starter-component-archetype/
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ ├── main/
│ │ │ │ └── resources/
│ │ │ │ ├── META-INF/
│ │ │ │ │ └── maven/
│ │ │ │ │ └── archetype-metadata.xml
│ │ │ │ └── archetype-resources/
│ │ │ │ ├── README.md
│ │ │ │ ├── gitignore.txt
│ │ │ │ ├── pom.xml
│ │ │ │ └── src/
│ │ │ │ ├── main/
│ │ │ │ │ ├── java/
│ │ │ │ │ │ ├── CatchAndLog.java
│ │ │ │ │ │ ├── CatchLogAspect.java
│ │ │ │ │ │ └── CatchLogAutoConfiguration.java
│ │ │ │ │ └── resources/
│ │ │ │ │ └── META-INF/
│ │ │ │ │ └── spring.factories
│ │ │ │ └── test/
│ │ │ │ ├── java/
│ │ │ │ │ └── test/
│ │ │ │ │ └── Application.java
│ │ │ │ └── resources/
│ │ │ │ ├── application.properties
│ │ │ │ └── logback-test.xml
│ │ │ └── test/
│ │ │ └── resources/
│ │ │ └── projects/
│ │ │ └── basic/
│ │ │ ├── archetype.properties
│ │ │ └── goal.txt
│ │ ├── new-cola-normal-component.sh
│ │ └── new-cola-starter-component.sh
│ └── pom.xml
├── cola-samples/
│ ├── charge/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── huawei/
│ │ │ │ └── charging/
│ │ │ │ ├── Application.java
│ │ │ │ ├── adapter/
│ │ │ │ │ └── ChargeController.java
│ │ │ │ ├── application/
│ │ │ │ │ ├── ChargeServiceI.java
│ │ │ │ │ ├── ChargeServiceImpl.java
│ │ │ │ │ └── dto/
│ │ │ │ │ ├── BeginSessionRequest.java
│ │ │ │ │ ├── ChargeRecordDto.java
│ │ │ │ │ ├── ChargeRequest.java
│ │ │ │ │ ├── EndSessionRequest.java
│ │ │ │ │ ├── MultiResponse.java
│ │ │ │ │ ├── Response.java
│ │ │ │ │ └── SingleResponse.java
│ │ │ │ ├── domain/
│ │ │ │ │ ├── ApplicationContextHelper.java
│ │ │ │ │ ├── BizException.java
│ │ │ │ │ ├── DomainFactory.java
│ │ │ │ │ ├── Entity.java
│ │ │ │ │ ├── account/
│ │ │ │ │ │ ├── Account.java
│ │ │ │ │ │ └── AccountDomainService.java
│ │ │ │ │ ├── charge/
│ │ │ │ │ │ ├── CallType.java
│ │ │ │ │ │ ├── ChargeContext.java
│ │ │ │ │ │ ├── ChargeRecord.java
│ │ │ │ │ │ ├── Money.java
│ │ │ │ │ │ ├── MoneyConverter.java
│ │ │ │ │ │ ├── Session.java
│ │ │ │ │ │ ├── chargeplan/
│ │ │ │ │ │ │ ├── BasicChargePlan.java
│ │ │ │ │ │ │ ├── ChargePlan.java
│ │ │ │ │ │ │ ├── ChargePlanType.java
│ │ │ │ │ │ │ ├── FamilyChargePlan.java
│ │ │ │ │ │ │ ├── FixedTimeChangePlan.java
│ │ │ │ │ │ │ └── Resource.java
│ │ │ │ │ │ └── chargerule/
│ │ │ │ │ │ ├── AbstractChargeRule.java
│ │ │ │ │ │ ├── BasicChargeRule.java
│ │ │ │ │ │ ├── ChargeRule.java
│ │ │ │ │ │ ├── ChargeRuleFactory.java
│ │ │ │ │ │ ├── CompositeChargeRule.java
│ │ │ │ │ │ ├── FamilyChargeRule.java
│ │ │ │ │ │ └── FixedTimeChargeRule.java
│ │ │ │ │ └── gateway/
│ │ │ │ │ ├── AccountGateway.java
│ │ │ │ │ ├── ChargeGateway.java
│ │ │ │ │ └── SessionGateway.java
│ │ │ │ └── infrastructure/
│ │ │ │ ├── AccountGatewayImpl.java
│ │ │ │ ├── RestClientBean.java
│ │ │ │ └── SessionGatewayImpl.java
│ │ │ └── resources/
│ │ │ ├── application.yml
│ │ │ └── logback.xml
│ │ └── test/
│ │ ├── charge.http
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── huawei/
│ │ │ └── charging/
│ │ │ ├── CleanArchTest.java
│ │ │ ├── TestsContainerBoot.java
│ │ │ ├── application/
│ │ │ │ └── ChargeServiceTest.java
│ │ │ ├── domain/
│ │ │ │ ├── ChargeRecordPlanTest.java
│ │ │ │ ├── ChargeRecordRuleTest.java
│ │ │ │ └── CompositeChargeRuleTestRecord.java
│ │ │ └── infrastructure/
│ │ │ ├── AccountGatewayTest.java
│ │ │ ├── ChargeRecordRepoTest.java
│ │ │ ├── FixtureLoader.java
│ │ │ ├── JSONTest.java
│ │ │ ├── SpingBootConfTest.java
│ │ │ ├── WireMockBasicTest.java
│ │ │ └── WireMockRegister.java
│ │ └── resources/
│ │ ├── application-test.yml
│ │ ├── application.yml
│ │ ├── fixture/
│ │ │ └── wiremock/
│ │ │ ├── stub_account.json
│ │ │ ├── stub_insufficient_account.json
│ │ │ └── stub_wire_mock_basic.json
│ │ └── logback-test.xml
│ └── craftsman/
│ ├── craftsman-adapter/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── alibaba/
│ │ └── craftsman/
│ │ └── web/
│ │ └── MetricsController.java
│ ├── craftsman-app/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── craftsman/
│ │ │ ├── command/
│ │ │ │ ├── ATAMetricAddCmdExe.java
│ │ │ │ ├── CodeReviewMetricAddCmdExe.java
│ │ │ │ ├── MetricDeleteCmdExe.java
│ │ │ │ ├── MiscMetricAddCmdExe.java
│ │ │ │ ├── PaperMetricAddCmdExe.java
│ │ │ │ ├── PatentMetricAddCmdExe.java
│ │ │ │ ├── RefactoringMetricAddCmdExe.java
│ │ │ │ ├── RefreshScoreCmdExe.java
│ │ │ │ ├── SharingMetricAddCmdExe.java
│ │ │ │ ├── UserProfileAddCmdExe.java
│ │ │ │ ├── UserProfileUpdateCmdExe.java
│ │ │ │ ├── package-info.java
│ │ │ │ └── query/
│ │ │ │ ├── ATAMetricQryExe.java
│ │ │ │ ├── UserProfileGetQryExe.java
│ │ │ │ ├── UserProfileListQryExe.java
│ │ │ │ └── package-info.java
│ │ │ ├── event/
│ │ │ │ └── handler/
│ │ │ │ └── MetricItemCreatedHandler.java
│ │ │ └── service/
│ │ │ ├── MetricsServiceImpl.java
│ │ │ ├── UserProfileServiceImpl.java
│ │ │ └── package-info.java
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── craftsman/
│ │ │ └── app/
│ │ │ └── ContextInterceptorTest.java
│ │ └── resources/
│ │ └── logback-test.xml
│ ├── craftsman-client/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── alibaba/
│ │ └── craftsman/
│ │ ├── api/
│ │ │ ├── MetricsServiceI.java
│ │ │ └── UserProfileServiceI.java
│ │ ├── context/
│ │ │ └── UserContext.java
│ │ └── dto/
│ │ ├── ATAMetricAddCmd.java
│ │ ├── ATAMetricQry.java
│ │ ├── CodeReviewMetricAddCmd.java
│ │ ├── CommonCommand.java
│ │ ├── MetricDeleteCmd.java
│ │ ├── MiscMetricAddCmd.java
│ │ ├── PaperMetricAddCmd.java
│ │ ├── PatentMetricAddCmd.java
│ │ ├── RefactoringMetricAddCmd.java
│ │ ├── RefreshScoreCmd.java
│ │ ├── SharingMetricAddCmd.java
│ │ ├── UserProfileAddCmd.java
│ │ ├── UserProfileGetQry.java
│ │ ├── UserProfileListQry.java
│ │ ├── UserProfileUpdateCmd.java
│ │ ├── clientobject/
│ │ │ ├── ATAMetricCO.java
│ │ │ ├── AbstractMetricCO.java
│ │ │ ├── MiscMetricCO.java
│ │ │ ├── PaperMetricCO.java
│ │ │ ├── PatentMetricCO.java
│ │ │ ├── RefactoringMetricCO.java
│ │ │ ├── SharingMetricCO.java
│ │ │ └── UserProfileCO.java
│ │ └── domainevent/
│ │ ├── CustomerCreatedEvent.java
│ │ └── MetricItemCreatedEvent.java
│ ├── craftsman-domain/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── craftsman/
│ │ │ └── domain/
│ │ │ ├── DomainFactory.java
│ │ │ ├── gateway/
│ │ │ │ ├── MetricGateway.java
│ │ │ │ └── UserProfileGateway.java
│ │ │ ├── metrics/
│ │ │ │ ├── JSONPropertyFilter.java
│ │ │ │ ├── MainMetric.java
│ │ │ │ ├── MainMetricType.java
│ │ │ │ ├── Measurable.java
│ │ │ │ ├── Metric.java
│ │ │ │ ├── MetricItem.java
│ │ │ │ ├── SubMetric.java
│ │ │ │ ├── SubMetricType.java
│ │ │ │ ├── appquality/
│ │ │ │ │ ├── AppMetric.java
│ │ │ │ │ ├── AppMetricItem.java
│ │ │ │ │ └── AppQualityMetric.java
│ │ │ │ ├── devquality/
│ │ │ │ │ ├── BugMetric.java
│ │ │ │ │ ├── BugMetricItem.java
│ │ │ │ │ └── DevQualityMetric.java
│ │ │ │ ├── techcontribution/
│ │ │ │ │ ├── CodeReviewMetric.java
│ │ │ │ │ ├── CodeReviewMetricItem.java
│ │ │ │ │ ├── ContributionMetric.java
│ │ │ │ │ ├── MiscMetric.java
│ │ │ │ │ ├── MiscMetricItem.java
│ │ │ │ │ ├── RefactoringLevel.java
│ │ │ │ │ ├── RefactoringMetric.java
│ │ │ │ │ └── RefactoringMetricItem.java
│ │ │ │ ├── techinfluence/
│ │ │ │ │ ├── ATAMetric.java
│ │ │ │ │ ├── ATAMetricItem.java
│ │ │ │ │ ├── AuthorType.java
│ │ │ │ │ ├── InfluenceMetric.java
│ │ │ │ │ ├── PaperMetric.java
│ │ │ │ │ ├── PaperMetricItem.java
│ │ │ │ │ ├── PatentMetric.java
│ │ │ │ │ ├── PatentMetricItem.java
│ │ │ │ │ ├── SharingMetric.java
│ │ │ │ │ ├── SharingMetricItem.java
│ │ │ │ │ └── SharingScope.java
│ │ │ │ └── weight/
│ │ │ │ ├── DevWeight.java
│ │ │ │ ├── OtherWeight.java
│ │ │ │ ├── QAWeight.java
│ │ │ │ ├── Weight.java
│ │ │ │ └── WeightFactory.java
│ │ │ ├── package-info.java
│ │ │ └── user/
│ │ │ ├── Role.java
│ │ │ └── UserProfile.java
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── alibaba/
│ │ └── craftsman/
│ │ └── domain/
│ │ ├── ATAMetricTest.java
│ │ ├── AppMetricTest.java
│ │ ├── BugMetricTest.java
│ │ ├── InfluenceMetricTest.java
│ │ ├── PatentMetricTest.java
│ │ ├── SharingMetricTest.java
│ │ └── UserProfileTest.java
│ ├── craftsman-infrastructure/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── alibaba/
│ │ │ │ └── craftsman/
│ │ │ │ ├── common/
│ │ │ │ │ ├── BizCode.java
│ │ │ │ │ ├── event/
│ │ │ │ │ │ └── DomainEventPublisher.java
│ │ │ │ │ └── exception/
│ │ │ │ │ └── ErrorCode.java
│ │ │ │ ├── config/
│ │ │ │ │ └── CraftsmanConfig.java
│ │ │ │ ├── convertor/
│ │ │ │ │ ├── MetricConvertor.java
│ │ │ │ │ └── UserProfileConvertor.java
│ │ │ │ └── gatewayimpl/
│ │ │ │ ├── MetricGatewayImpl.java
│ │ │ │ ├── UserProfileGatewayImpl.java
│ │ │ │ ├── database/
│ │ │ │ │ ├── MetricMapper.java
│ │ │ │ │ ├── UserProfileMapper.java
│ │ │ │ │ └── dataobject/
│ │ │ │ │ ├── BaseDO.java
│ │ │ │ │ ├── MetricDO.java
│ │ │ │ │ └── UserProfileDO.java
│ │ │ │ └── rpc/
│ │ │ │ ├── AppMetricMapper.java
│ │ │ │ ├── BugMetricMapper.java
│ │ │ │ └── dataobject/
│ │ │ │ ├── AppMetricDO.java
│ │ │ │ └── BugMetricDO.java
│ │ │ └── resources/
│ │ │ ├── TableCreationDDL.sql
│ │ │ ├── mybatis/
│ │ │ │ ├── MetricMapper.xml
│ │ │ │ └── UserProfileMapper.xml
│ │ │ └── mybatis-config.xml
│ │ └── test/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── craftsman/
│ │ │ └── gatewayimpl/
│ │ │ ├── Mybatis3Utils.java
│ │ │ └── MybatisTest.java
│ │ └── resources/
│ │ ├── logback-test.xml
│ │ └── mybatis-config-test.xml
│ ├── pom.xml
│ └── start/
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── alibaba/
│ │ │ └── craftsman/
│ │ │ └── Application.java
│ │ └── resources/
│ │ ├── application.properties
│ │ └── logback-spring.xml
│ └── test/
│ ├── java/
│ │ └── com/
│ │ └── alibaba/
│ │ └── craftsman/
│ │ ├── TestApplication.java
│ │ └── gatewayimpl/
│ │ ├── MetricTunnelTest.java
│ │ └── UserProfileTunnelTest.java
│ ├── resources/
│ │ ├── logback-test.xml
│ │ ├── mockfile/
│ │ │ ├── com.alibaba.craftsman.app.ATAMetricAddCmdExeTest_testATAMetricAddSuccess
│ │ │ ├── com.alibaba.craftsman.app.ATAMetricAddCmdExeTest_testATAMetricAddSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.CodeReviewMetricAddCmdExeTest_testSuccess
│ │ │ ├── com.alibaba.craftsman.app.CodeReviewMetricAddCmdExeTest_testSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.MetricDeleteCmdExeTest_testSuccess
│ │ │ ├── com.alibaba.craftsman.app.MetricDeleteCmdExeTest_testSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.MiscMetricAddCmdExeTest_testSuccess
│ │ │ ├── com.alibaba.craftsman.app.MiscMetricAddCmdExeTest_testSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.PaperMetricAddCmdExeTest_testPaperMetricAddSuccess
│ │ │ ├── com.alibaba.craftsman.app.PaperMetricAddCmdExeTest_testPaperMetricAddSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.PatentMetricAddCmdExeTest_testPatentMetricAddSuccess
│ │ │ ├── com.alibaba.craftsman.app.PatentMetricAddCmdExeTest_testPatentMetricAddSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.RefactoringMetricAddCmdExeTest_testSuccess
│ │ │ ├── com.alibaba.craftsman.app.RefactoringMetricAddCmdExeTest_testSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.ScoreRecalculateTest_testDevSuccess
│ │ │ ├── com.alibaba.craftsman.app.ScoreRecalculateTest_testDevSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.SharingMetricAddCmdExeTest_testSharingMetricAddSuccess
│ │ │ ├── com.alibaba.craftsman.app.SharingMetricAddCmdExeTest_testSharingMetricAddSuccess_inputParams
│ │ │ ├── com.alibaba.craftsman.app.UserProfileCmdExeTest_testSuccessAdd
│ │ │ ├── com.alibaba.craftsman.app.UserProfileCmdExeTest_testSuccessAdd_inputParams
│ │ │ ├── com.alibaba.craftsman.app.UserProfileCmdExeTest_testSuccessUpdate
│ │ │ ├── com.alibaba.craftsman.app.UserProfileCmdExeTest_testSuccessUpdate_inputParams
│ │ │ └── service.list
│ │ └── spring-mock-test.xml
│ ├── testAddCmd.http
│ └── testQry.http
├── mvnw
├── mvnw.cmd
├── pom.xml
└── scripts/
├── bump_cola_version
├── integration_test
└── maven-deploy.md
Showing preview only (209K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2114 symbols across 530 files)
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/Application.java
class Application (line 9) | @SpringBootApplication
method main (line 12) | public static void main(String[] args) {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/adapter/ChargeController.java
class ChargeController (line 13) | @RestController
method begin (line 20) | @PostMapping("session/{sessionId}/begin")
method charge (line 29) | @PostMapping("session/{sessionId}/charge")
method end (line 37) | @PostMapping("session/{sessionId}/end")
method getChargeRecord (line 45) | @GetMapping("{sessionId}/chargeRecords")
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/ChargeServiceI.java
type ChargeServiceI (line 8) | public interface ChargeServiceI {
method begin (line 9) | Response begin(BeginSessionRequest request);
method charge (line 11) | Response charge(ChargeRequest request);
method end (line 13) | Response end(EndSessionRequest request);
method listChargeRecords (line 15) | MultiResponse<ChargeRecordDto> listChargeRecords(String sessionId);
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/ChargeServiceImpl.java
class ChargeServiceImpl (line 23) | @Service
method begin (line 39) | @Override
method charge (line 48) | @Override
method chargeCalling (line 61) | private void chargeCalling(Session session, int durationToCharge, List...
method chargeCalled (line 69) | private void chargeCalled(Session session, int durationToCharge, List<...
method end (line 77) | @Override
method listChargeRecords (line 84) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/BeginSessionRequest.java
class BeginSessionRequest (line 9) | @Data
method toSession (line 27) | public Session toSession(){
method BeginSessionRequest (line 31) | public BeginSessionRequest() {
method BeginSessionRequest (line 34) | public BeginSessionRequest(String sessionId, long callingPhoneNo, long...
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/ChargeRecordDto.java
class ChargeRecordDto (line 10) | public class ChargeRecordDto {
method fromEntity (line 19) | public static ChargeRecordDto fromEntity(ChargeRecord chargeRecord){
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/ChargeRequest.java
class ChargeRequest (line 8) | @Data
method ChargeRequest (line 18) | public ChargeRequest() {
method ChargeRequest (line 21) | public ChargeRequest(String sessionId, int duration) {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/EndSessionRequest.java
class EndSessionRequest (line 8) | @Data
method toChargeRequest (line 17) | public ChargeRequest toChargeRequest() {
method EndSessionRequest (line 24) | public EndSessionRequest() {
method EndSessionRequest (line 27) | public EndSessionRequest(String sessionId, int duration) {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/MultiResponse.java
class MultiResponse (line 11) | public class MultiResponse<T> extends Response {
method getData (line 17) | public List<T> getData() {
method setData (line 27) | public void setData(Collection<T> data) {
method isEmpty (line 31) | public boolean isEmpty() {
method isNotEmpty (line 35) | public boolean isNotEmpty() {
method buildSuccess (line 39) | public static MultiResponse buildSuccess() {
method buildFailure (line 45) | public static MultiResponse buildFailure(String errCode, String errMes...
method of (line 53) | public static <T> MultiResponse<T> of(Collection<T> data) {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/Response.java
class Response (line 6) | public class Response {
method isSuccess (line 13) | public boolean isSuccess() {
method setSuccess (line 17) | public void setSuccess(boolean success) {
method getErrCode (line 21) | public String getErrCode() {
method setErrCode (line 25) | public void setErrCode(String errCode) {
method getErrMessage (line 29) | public String getErrMessage() {
method setErrMessage (line 33) | public void setErrMessage(String errMessage) {
method toString (line 37) | @Override
method buildSuccess (line 42) | public static Response buildSuccess() {
method buildFailure (line 48) | public static Response buildFailure(String errCode, String errMessage) {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/SingleResponse.java
class SingleResponse (line 6) | public class SingleResponse<T> extends Response {
method getData (line 12) | public T getData() {
method setData (line 16) | public void setData(T data) {
method buildSuccess (line 20) | public static SingleResponse buildSuccess() {
method buildFailure (line 26) | public static SingleResponse buildFailure(String errCode, String errMe...
method of (line 34) | public static <T> SingleResponse<T> of(T data) {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/ApplicationContextHelper.java
class ApplicationContextHelper (line 11) | @Component
method setApplicationContext (line 15) | @Override
method getBean (line 20) | public static <T> T getBean(Class<T> targetClz) {
method getBean (line 40) | public static Object getBean(String claz) {
method getBean (line 44) | public static <T> T getBean(String name, Class<T> requiredType) {
method getBean (line 48) | public static <T> T getBean(Class<T> requiredType, Object... params) {
method getApplicationContext (line 52) | public static ApplicationContext getApplicationContext() {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/BizException.java
class BizException (line 6) | public class BizException extends RuntimeException{
method BizException (line 8) | public BizException(String errMessage) {
method of (line 12) | public static BizException of(String errMessage){
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/DomainFactory.java
class DomainFactory (line 6) | public class DomainFactory {
method get (line 8) | public static <T> T get(Class<T> entityClz){
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/account/Account.java
class Account (line 25) | @Data
method Account (line 50) | public Account(){
method Account (line 54) | public Account(long phoneNo, Money amount, List<ChargePlan> chargePlan...
method valueOf (line 60) | public static Account valueOf(long phoneNo, Money amount) {
method checkRemaining (line 71) | public void checkRemaining() {
method charge (line 77) | public List<ChargeRecord> charge(ChargeContext ctx) {
method toString (line 87) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/account/AccountDomainService.java
class AccountDomainService (line 12) | @Component
method canSessionStart (line 18) | public void canSessionStart(Session session){
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/CallType.java
type CallType (line 6) | public enum CallType {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/ChargeContext.java
class ChargeContext (line 9) | @Data
method ChargeContext (line 41) | public ChargeContext(CallType callType, long phoneNo, long otherSidePh...
method needCharge (line 48) | public boolean needCharge(){
method isCalling (line 52) | public boolean isCalling(){
method isCalled (line 56) | public boolean isCalled(){
method toString (line 60) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/ChargeRecord.java
class ChargeRecord (line 12) | @Entity
method ChargeRecord (line 50) | public ChargeRecord() {
method ChargeRecord (line 53) | public ChargeRecord(long phoneNo, CallType callType, int chargeDuratio...
method toString (line 61) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/Money.java
class Money (line 14) | @Data
method Money (line 22) | public Money(int amount) {
method of (line 26) | public static Money of(int amount){
method isLessThan (line 30) | public boolean isLessThan(Money money){
method minus (line 34) | public void minus(Money money){
method equals (line 38) | @Override
method hashCode (line 46) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/MoneyConverter.java
class MoneyConverter (line 10) | @Converter(autoApply = true)
method convertToDatabaseColumn (line 12) | @Override
method convertToEntityAttribute (line 17) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/Session.java
class Session (line 11) | @Data
method Session (line 36) | public Session(String sessionId, long callingPhoneNo, long calledPhone...
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/BasicChargePlan.java
class BasicChargePlan (line 6) | public class BasicChargePlan extends ChargePlan<BasicChargePlan.BasicCha...
method BasicChargePlan (line 8) | public BasicChargePlan(){
method getResource (line 12) | @Override
method getType (line 17) | @Override
class BasicChargeFee (line 22) | public static class BasicChargeFee implements Resource{
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/ChargePlan.java
class ChargePlan (line 6) | public abstract class ChargePlan<T extends Resource> implements Comparab...
method getResource (line 10) | public abstract T getResource();
method getType (line 12) | public abstract ChargePlanType getType();
method ChargePlan (line 14) | public ChargePlan(){
method compareTo (line 22) | @Override
method toString (line 27) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/ChargePlanType.java
type ChargePlanType (line 6) | public enum ChargePlanType {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/FamilyChargePlan.java
class FamilyChargePlan (line 9) | public class FamilyChargePlan extends ChargePlan<FamilyChargePlan.Family...
method FamilyChargePlan (line 11) | public FamilyChargePlan() {
method getResource (line 15) | @Override
method getType (line 20) | @Override
class FamilyMember (line 25) | public static class FamilyMember implements Resource{
method FamilyMember (line 31) | public FamilyMember() {
method isMember (line 36) | public boolean isMember(long phoneNo) {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/FixedTimeChangePlan.java
class FixedTimeChangePlan (line 6) | public class FixedTimeChangePlan extends ChargePlan<FixedTimeChangePlan....
method FixedTimeChangePlan (line 8) | public FixedTimeChangePlan() {
method getResource (line 12) | @Override
method getType (line 17) | @Override
class FreeCallTime (line 22) | public static class FreeCallTime implements Resource{
method isCallingTimeRemaining (line 26) | public boolean isCallingTimeRemaining(){
method chargeFreeCallingTime (line 35) | public int chargeFreeCallingTime(int duration){
method isCalledTimeRemaining (line 47) | public boolean isCalledTimeRemaining(){
method chargeFreeCalledTime (line 56) | public int chargeFreeCalledTime(int duration){
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/Resource.java
type Resource (line 9) | public interface Resource {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/AbstractChargeRule.java
class AbstractChargeRule (line 8) | public abstract class AbstractChargeRule implements ChargeRule{
method belongsTo (line 11) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/BasicChargeRule.java
class BasicChargeRule (line 12) | @Component
method doCharge (line 15) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/ChargeRule.java
type ChargeRule (line 10) | public interface ChargeRule {
method doCharge (line 11) | ChargeRecord doCharge(ChargeContext ctx);
method belongsTo (line 13) | void belongsTo(ChargePlan chargePlan);
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/ChargeRuleFactory.java
class ChargeRuleFactory (line 14) | public class ChargeRuleFactory {
method get (line 15) | public static CompositeChargeRule get(List<ChargePlan> chargePlanList) {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/CompositeChargeRule.java
class CompositeChargeRule (line 17) | public class CompositeChargeRule {
method doCharge (line 20) | public List<ChargeRecord> doCharge(ChargeContext chargeContext){
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/FamilyChargeRule.java
class FamilyChargeRule (line 14) | @Component
method doCharge (line 18) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/FixedTimeChargeRule.java
class FixedTimeChargeRule (line 14) | @Component
method doCharge (line 17) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/gateway/AccountGateway.java
type AccountGateway (line 16) | public interface AccountGateway {
method getAccount (line 24) | Account getAccount(long phoneNo);
method sync (line 32) | void sync(long phoneNo, List<ChargeRecord> records);
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/gateway/ChargeGateway.java
type ChargeGateway (line 12) | @Repository
method findBySessionId (line 14) | public List<ChargeRecord> findBySessionId(String sessionId);
method getBySessionId (line 16) | public ChargeRecord getBySessionId(String sessionId);
method findByPhoneNo (line 18) | public List<ChargeRecord> findByPhoneNo(long phoneNo);
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/gateway/SessionGateway.java
type SessionGateway (line 8) | public interface SessionGateway {
method create (line 10) | void create(Session session);
method get (line 12) | Session get(String sessionId);
method end (line 14) | void end(String sessionId);
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/infrastructure/AccountGatewayImpl.java
class AccountGatewayImpl (line 22) | @Component
method getAccount (line 33) | @Override
method sync (line 44) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/infrastructure/RestClientBean.java
class RestClientBean (line 11) | @Configuration
method restClient (line 17) | @Bean
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/infrastructure/SessionGatewayImpl.java
class SessionGatewayImpl (line 14) | @Component
method create (line 18) | @Override
method get (line 23) | @Override
method end (line 28) | @Override
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/CleanArchTest.java
class CleanArchTest (line 8) | public class CleanArchTest {
method protect_clean_arch (line 9) | @Test
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/TestsContainerBoot.java
class TestsContainerBoot (line 8) | public class TestsContainerBoot {
method main (line 9) | public static void main(String[] args) {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/application/ChargeServiceTest.java
class ChargeServiceTest (line 22) | @SpringBootTest
method test_session_create (line 37) | @Test
method test_remaining_insufficient (line 52) | @Test
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/domain/ChargeRecordPlanTest.java
class ChargeRecordPlanTest (line 19) | public class ChargeRecordPlanTest {
method test_priority (line 21) | @Test
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/domain/ChargeRecordRuleTest.java
class ChargeRecordRuleTest (line 22) | public class ChargeRecordRuleTest {
method test_basic_charge_rule (line 24) | @Test
method test_family_charge_rule (line 44) | @Test
method test_fixed_time_charge_rule (line 64) | @Test
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/domain/CompositeChargeRuleTestRecord.java
class CompositeChargeRuleTestRecord (line 23) | @SpringBootTest
method test_basic_and_fixedTime_charge_rule (line 30) | @Test
method test_basic_and_family_charge_rule (line 51) | @Test
method test_all_charge_rule (line 72) | @Test
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/AccountGatewayTest.java
class AccountGatewayTest (line 18) | @SpringBootTest
method testGetAccount (line 26) | @Test
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/ChargeRecordRepoTest.java
class ChargeRecordRepoTest (line 23) | @SpringBootTest
method setup (line 30) | @BeforeEach
method testSave (line 35) | @Test
method testSaveList (line 48) | @Test
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/FixtureLoader.java
class FixtureLoader (line 14) | public class FixtureLoader {
method loadResource (line 16) | public static String loadResource(String resourcePath) {
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/JSONTest.java
class JSONTest (line 11) | public class JSONTest {
method testJsonBind (line 13) | @Test
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/SpingBootConfTest.java
class SpingBootConfTest (line 14) | @SpringBootTest
method test (line 37) | @Test
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/WireMockBasicTest.java
class WireMockBasicTest (line 22) | @SpringBootTest(classes = Application.class, webEnvironment = SpringBoot...
method testWireMockBasic (line 30) | @Test
method testWireMockStub (line 42) | @Test
method testWireMockAccount (line 58) | @Test
FILE: cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/WireMockRegister.java
class WireMockRegister (line 9) | public class WireMockRegister {
method registerStub (line 11) | public static void registerStub(WireMock wireMock, String resourcePath){
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/CustomerServiceImpl.java
class CustomerServiceImpl (line 21) | @Service
method addCustomer (line 31) | public Response addCustomer(CustomerAddCmd customerAddCmd) {
method listByName (line 35) | @Override
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/executor/CustomerAddCmdExe.java
class CustomerAddCmdExe (line 14) | @Component
method execute (line 17) | public Response execute(CustomerAddCmd cmd) {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/executor/query/CustomerListByNameQryExe.java
class CustomerListByNameQryExe (line 14) | @Component
method execute (line 16) | public MultiResponse<CustomerDTO> execute(CustomerListByNameQry cmd) {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/order/OrderServiceImpl.java
class OrderServiceImpl (line 9) | public class OrderServiceImpl{
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/app/CustomerConvertorTest.java
class CustomerConvertorTest (line 7) | public class CustomerConvertorTest {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/app/CustomerValidatorTest.java
class CustomerValidatorTest (line 8) | public class CustomerValidatorTest {
method testValidation (line 10) | @Test
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/api/CustomerServiceI.java
type CustomerServiceI (line 12) | public interface CustomerServiceI {
method addCustomer (line 14) | Response addCustomer(CustomerAddCmd customerAddCmd);
method listByName (line 16) | MultiResponse<CustomerDTO> listByName(CustomerListByNameQry customerLi...
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/CustomerAddCmd.java
class CustomerAddCmd (line 9) | @Data
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/CustomerListByNameQry.java
class CustomerListByNameQry (line 9) | @Data
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/data/CustomerDTO.java
class CustomerDTO (line 10) | @Data
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/data/ErrorCode.java
class ErrorCode (line 7) | public class ErrorCode {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/event/CustomerCreatedEvent.java
class CustomerCreatedEvent (line 14) | public class CustomerCreatedEvent{
method getCustomerId (line 18) | public String getCustomerId() {
method setCustomerId (line 22) | public void setCustomerId(String customerId) {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/event/DomainEventConstant.java
class DomainEventConstant (line 10) | public class DomainEventConstant {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/CompanyType.java
type CompanyType (line 12) | public enum CompanyType {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/Credit.java
class Credit (line 9) | @Data
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/Customer.java
class Customer (line 11) | @Data
method Customer (line 23) | public Customer() {
method isBigCompany (line 26) | public boolean isBigCompany() {
method isSME (line 30) | public boolean isSME() {
method checkConflict (line 34) | public void checkConflict(){
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/CustomerType.java
type CustomerType (line 12) | public enum CustomerType {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/SourceType.java
type SourceType (line 12) | public enum SourceType {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/domainservice/CreditChecker.java
class CreditChecker (line 7) | public class CreditChecker{
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/gateway/CreditGateway.java
type CreditGateway (line 10) | public interface CreditGateway {
method getCredit (line 11) | Credit getCredit(String customerId);
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/gateway/CustomerGateway.java
type CustomerGateway (line 8) | public interface CustomerGateway {
method getByById (line 9) | Customer getByById(String customerId);
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/order/Order.java
class Order (line 6) | public class Order{
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/test/java/domain/CustomerEntityTest.java
class CustomerEntityTest (line 7) | public class CustomerEntityTest {
method testCustomerConflict (line 9) | public void testCustomerConflict() {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/config/DiamondConfig.java
class DiamondConfig (line 6) | public class DiamondConfig {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CreditGatewayImpl.java
class CreditGatewayImpl (line 9) | public class CreditGatewayImpl implements CreditGateway {
method getCredit (line 10) | public Credit getCredit(String customerId){
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerDO.java
class CustomerDO (line 8) | @Data
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerGatewayImpl.java
class CustomerGatewayImpl (line 12) | @Component
method getByById (line 17) | public Customer getByById(String customerId){
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerMapper.java
type CustomerMapper (line 8) | @Mapper
method getById (line 11) | CustomerDO getById(String customerId);
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/order/OrderGatewayImpl.java
class OrderGatewayImpl (line 6) | public class OrderGatewayImpl{
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/test/java/repository/CustomerMapperTest.java
class CustomerMapperTest (line 7) | public class CustomerMapperTest {
method testFindByID (line 9) | public void testFindByID() {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/main/java/Application.java
class Application (line 16) | @SpringBootApplication
method main (line 19) | public static void main(String[] args) {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/test/java/TestApplication.java
class TestApplication (line 9) | public class TestApplication {
method main (line 11) | public static void main(String[] args) {
FILE: cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/test/java/test/CustomerServiceTest.java
class CustomerServiceTest (line 25) | @RunWith(SpringRunner.class)
method setUp (line 33) | @Before
method testCustomerAddSuccess (line 38) | @Test
method testCustomerAddCompanyNameConflict (line 53) | @Test
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-adapter/src/main/java/mobile/CustomerMobileAdaptor.java
class CustomerMobileAdaptor (line 13) | public class CustomerMobileAdaptor {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-adapter/src/main/java/wap/CustomerWapAdaptor.java
class CustomerWapAdaptor (line 14) | public class CustomerWapAdaptor {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-adapter/src/main/java/web/CustomerController.java
class CustomerController (line 15) | @RestController
method helloWorld (line 21) | @GetMapping(value = "/helloworld")
method listCustomerByName (line 26) | @GetMapping(value = "/customer")
method addCustomer (line 33) | @PostMapping(value = "/customer")
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/CustomerServiceImpl.java
class CustomerServiceImpl (line 22) | @Service
method addCustomer (line 32) | public Response addCustomer(CustomerAddCmd customerAddCmd) {
method listByName (line 36) | @Override
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/executor/CustomerAddCmdExe.java
class CustomerAddCmdExe (line 14) | @Component
method execute (line 17) | public Response execute(CustomerAddCmd cmd) {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/executor/query/CustomerListByNameQryExe.java
class CustomerListByNameQryExe (line 14) | @Component
method execute (line 16) | public MultiResponse<CustomerDTO> execute(CustomerListByNameQry cmd) {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/order/OrderServiceImpl.java
class OrderServiceImpl (line 9) | public class OrderServiceImpl{
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/app/CustomerConvertorTest.java
class CustomerConvertorTest (line 7) | public class CustomerConvertorTest {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/app/CustomerValidatorTest.java
class CustomerValidatorTest (line 8) | public class CustomerValidatorTest {
method testValidation (line 10) | @Test
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/api/CustomerServiceI.java
type CustomerServiceI (line 12) | public interface CustomerServiceI {
method addCustomer (line 14) | Response addCustomer(CustomerAddCmd customerAddCmd);
method listByName (line 16) | MultiResponse<CustomerDTO> listByName(CustomerListByNameQry customerLi...
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/CustomerAddCmd.java
class CustomerAddCmd (line 9) | @Data
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/CustomerListByNameQry.java
class CustomerListByNameQry (line 9) | @Data
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/data/CustomerDTO.java
class CustomerDTO (line 10) | @Data
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/data/ErrorCode.java
type ErrorCode (line 6) | public enum ErrorCode{
method ErrorCode (line 12) | private ErrorCode(String errCode, String errDesc) {
method getErrCode (line 17) | public String getErrCode() {
method getErrDesc (line 21) | public String getErrDesc() {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/event/CustomerCreatedEvent.java
class CustomerCreatedEvent (line 14) | public class CustomerCreatedEvent{
method getCustomerId (line 18) | public String getCustomerId() {
method setCustomerId (line 22) | public void setCustomerId(String customerId) {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/event/DomainEventConstant.java
class DomainEventConstant (line 10) | public class DomainEventConstant {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/CompanyType.java
type CompanyType (line 12) | public enum CompanyType {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/Credit.java
class Credit (line 9) | @Data
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/Customer.java
class Customer (line 11) | @Data
method Customer (line 23) | public Customer() {
method isBigCompany (line 26) | public boolean isBigCompany() {
method isSME (line 30) | public boolean isSME() {
method checkConflict (line 34) | public void checkConflict(){
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/CustomerType.java
type CustomerType (line 12) | public enum CustomerType {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/SourceType.java
type SourceType (line 12) | public enum SourceType {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/domainservice/CreditChecker.java
class CreditChecker (line 7) | public class CreditChecker{
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/gateway/CreditGateway.java
type CreditGateway (line 9) | public interface CreditGateway {
method getCredit (line 10) | Credit getCredit(String customerId);
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/gateway/CustomerGateway.java
type CustomerGateway (line 8) | public interface CustomerGateway {
method getByById (line 9) | Customer getByById(String customerId);
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/order/Order.java
class Order (line 6) | public class Order{
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/test/java/domain/CustomerEntityTest.java
class CustomerEntityTest (line 7) | public class CustomerEntityTest {
method testCustomerConflict (line 9) | public void testCustomerConflict() {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/config/DiamondConfig.java
class DiamondConfig (line 6) | public class DiamondConfig {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CreditGatewayImpl.java
class CreditGatewayImpl (line 9) | public class CreditGatewayImpl implements CreditGateway {
method getCredit (line 10) | public Credit getCredit(String customerId){
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerDO.java
class CustomerDO (line 8) | @Data
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerGatewayImpl.java
class CustomerGatewayImpl (line 12) | @Component
method getByById (line 17) | public Customer getByById(String customerId){
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerMapper.java
type CustomerMapper (line 8) | @Mapper
method getById (line 11) | CustomerDO getById(String customerId);
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/order/OrderGatewayImpl.java
class OrderGatewayImpl (line 6) | public class OrderGatewayImpl{
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/test/java/repository/CustomerMapperTest.java
class CustomerMapperTest (line 7) | public class CustomerMapperTest {
method testFindByID (line 9) | public void testFindByID() {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/start/src/main/java/Application.java
class Application (line 15) | @SpringBootApplication(scanBasePackages = {"${package}", "com.alibaba.co...
method main (line 18) | public static void main(String[] args) {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/start/src/test/java/TestApplication.java
class TestApplication (line 9) | public class TestApplication {
method main (line 11) | public static void main(String[] args) {
FILE: cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/start/src/test/java/test/CustomerServiceTest.java
class CustomerServiceTest (line 24) | @RunWith(SpringRunner.class)
method setUp (line 32) | @Before
method testCustomerAddSuccess (line 37) | @Test
method testCustomerAddCompanyNameConflict (line 52) | @Test
FILE: cola-components/cola-component-catchlog-starter/src/main/java/com/alibaba/cola/catchlog/ApplicationContextHelper.java
class ApplicationContextHelper (line 15) | @Component("colaCatchLogApplicationContextHelper")
method setApplicationContext (line 20) | @Override
method getBean (line 25) | public static <T> T getBean(Class<T> targetClz) {
method getBean (line 48) | public static Object getBean(String claz) {
method getBean (line 52) | public static <T> T getBean(String name, Class<T> requiredType) {
method getBean (line 56) | public static <T> T getBean(Class<T> requiredType, Object... params) {
method getApplicationContext (line 60) | public static ApplicationContext getApplicationContext() {
FILE: cola-components/cola-component-catchlog-starter/src/main/java/com/alibaba/cola/catchlog/CatchLogAspect.java
class CatchLogAspect (line 21) | @Aspect
method pointcut (line 29) | @Pointcut("@within(CatchAndLog) && execution(public * *(..))")
method around (line 33) | @Around(value = "pointcut()")
method handleException (line 51) | private Object handleException(ProceedingJoinPoint joinPoint, Throwabl...
method logResponse (line 74) | private void logResponse(long startTime, Object response) {
method logRequest (line 87) | private void logRequest(ProceedingJoinPoint joinPoint) {
FILE: cola-components/cola-component-catchlog-starter/src/main/java/com/alibaba/cola/catchlog/CatchLogAutoConfiguration.java
class CatchLogAutoConfiguration (line 14) | @Configuration
method catchLogAspect (line 18) | @Bean
FILE: cola-components/cola-component-catchlog-starter/src/main/java/com/alibaba/cola/catchlog/DefaultResponseHandler.java
class DefaultResponseHandler (line 15) | @Slf4j
method handle (line 18) | @Override
method handle (line 26) | public Object handle(Class returnType, BaseException e){
method handleColaResponse (line 31) | private static Object handleColaResponse(Class returnType, String errC...
method isColaResponse (line 45) | private static boolean isColaResponse(Class returnType) {
FILE: cola-components/cola-component-catchlog-starter/src/main/java/com/alibaba/cola/catchlog/ResponseHandlerFactory.java
class ResponseHandlerFactory (line 5) | public class ResponseHandlerFactory {
method get (line 7) | public static ResponseHandlerI get(){
FILE: cola-components/cola-component-catchlog-starter/src/main/java/com/alibaba/cola/catchlog/ResponseHandlerI.java
type ResponseHandlerI (line 5) | public interface ResponseHandlerI {
method handle (line 6) | public Object handle(Class returnType, String errCode, String errMsg);
FILE: cola-components/cola-component-catchlog-starter/src/test/java/com/alibaba/cola/catchlog/test/Application.java
class Application (line 12) | @SpringBootApplication(scanBasePackages = {"com.alibaba.cola.catchlog"})
method main (line 15) | public static void main(String[] args) {
FILE: cola-components/cola-component-catchlog-starter/src/test/java/com/alibaba/cola/catchlog/test/CatchLogTest.java
class CatchLogTest (line 12) | @SpringBootTest(classes = {CatchLogAutoConfiguration.class, Demo.class, ...
method testAspect (line 18) | @Test
method testCatchAndLog (line 23) | @Test
method testExecuteWithResponse (line 31) | @Test
method testExecuteWithVoid (line 39) | @Test
method testExecuteWithExceptionAndVoid (line 44) | @Test
method testExecuteWithExceptionAndDemoResponse (line 49) | @Test
method testExecuteWithBizExceptionAndResponse (line 54) | @Test
method testExecuteWithSysExceptionAndResponse (line 59) | @Test
method testExecuteWithExceptionAndResponse (line 64) | @Test
FILE: cola-components/cola-component-catchlog-starter/src/test/java/com/alibaba/cola/catchlog/test/CustomResponseHandler.java
class CustomResponseHandler (line 6) | @Component
method handle (line 9) | @Override
FILE: cola-components/cola-component-catchlog-starter/src/test/java/com/alibaba/cola/catchlog/test/Demo.java
class Demo (line 21) | @Configuration
method doSomething (line 26) | public void doSomething(){
method doSomethingInner (line 33) | private void doSomethingInner(){
method execute (line 37) | public DemoResponse execute(Request request){
method executeWithExceptionAndDemoResponse (line 42) | public DemoResponse executeWithExceptionAndDemoResponse(){
method executeWithResponse (line 49) | public Response executeWithResponse(Request request){
method executeWithExceptionAndResponse (line 54) | public Response executeWithExceptionAndResponse(){
method executeWithVoid (line 61) | public void executeWithVoid(){
method executeWithExceptionAndVoid (line 65) | public void executeWithExceptionAndVoid(){
method executeWithBizExceptionAndResponse (line 71) | public Response executeWithBizExceptionAndResponse(){
method executeWithSysExceptionAndResponse (line 78) | public Response executeWithSysExceptionAndResponse(){
method setApplicationContext (line 86) | @Override
class Request (line 91) | public static class Request {
class DemoResponse (line 96) | @AllArgsConstructor
method DemoResponse (line 101) | public DemoResponse(){
FILE: cola-components/cola-component-domain-starter/src/main/java/com/alibaba/cola/domain/ApplicationContextHelper.java
class ApplicationContextHelper (line 14) | @Component("colaDomainApplicationContextHelper")
method setApplicationContext (line 18) | @Override
method getBean (line 23) | public static <T> T getBean(Class<T> targetClz) {
method getBean (line 43) | public static Object getBean(String claz) {
method getBean (line 47) | public static <T> T getBean(String name, Class<T> requiredType) {
method getBean (line 51) | public static <T> T getBean(Class<T> requiredType, Object... params) {
method getApplicationContext (line 55) | public static ApplicationContext getApplicationContext() {
FILE: cola-components/cola-component-domain-starter/src/main/java/com/alibaba/cola/domain/DomainAutoConfiguration.java
class DomainAutoConfiguration (line 14) | @Configuration
method applicationContextHelper (line 17) | @Bean
FILE: cola-components/cola-component-domain-starter/src/main/java/com/alibaba/cola/domain/DomainFactory.java
class DomainFactory (line 9) | public class DomainFactory {
method create (line 11) | public static <T> T create(Class<T> entityClz){
FILE: cola-components/cola-component-domain-starter/src/test/java/com/alibaba/cola/domain/Application.java
class Application (line 12) | @SpringBootApplication
method main (line 15) | public static void main(String[] args) {
FILE: cola-components/cola-component-domain-starter/src/test/java/com/alibaba/cola/domain/Customer.java
class Customer (line 13) | @Entity
method getAge (line 22) | public Integer getAge() {
method setAge (line 26) | public void setAge(Integer age) {
method getName (line 30) | public String getName() {
method setName (line 34) | public void setName(String name) {
method getPurchasePowerScore (line 38) | public Long getPurchasePowerScore(){
FILE: cola-components/cola-component-domain-starter/src/test/java/com/alibaba/cola/domain/PurchasePowerGateway.java
class PurchasePowerGateway (line 11) | @Component
method getScore (line 14) | public Long getScore(){
FILE: cola-components/cola-component-dto/src/main/java/com/alibaba/cola/dto/ClientObject.java
class ClientObject (line 12) | public abstract class ClientObject implements Serializable{
method getExtField (line 21) | public Object getExtField(String key){
method putExtField (line 28) | public void putExtField(String fieldName, Object value){
method getExtValues (line 32) | public Map<String, Object> getExtValues() {
method setExtValues (line 36) | public void setExtValues(Map<String, Object> extValues) {
FILE: cola-components/cola-component-dto/src/main/java/com/alibaba/cola/dto/Command.java
class Command (line 9) | public abstract class Command extends DTO {
FILE: cola-components/cola-component-dto/src/main/java/com/alibaba/cola/dto/DTO.java
class DTO (line 13) | public abstract class DTO implements Serializable {
FILE: cola-components/cola-component-dto/src/main/java/com/alibaba/cola/dto/MultiResponse.java
class MultiResponse (line 14) | public class MultiResponse<T> extends Response {
method getData (line 20) | public List<T> getData() {
method setData (line 30) | public void setData(Collection<T> data) {
method isEmpty (line 34) | public boolean isEmpty() {
method isNotEmpty (line 38) | public boolean isNotEmpty() {
method buildSuccess (line 42) | public static MultiResponse buildSuccess() {
method buildFailure (line 48) | public static MultiResponse buildFailure(String errCode, String errMes...
method of (line 56) | public static <T> MultiResponse<T> of(Collection<T> data) {
FILE: cola-components/cola-component-dto/src/main/java/com/alibaba/cola/dto/PageQuery.java
class PageQuery (line 8) | public abstract class PageQuery extends Query {
method getPageIndex (line 29) | public int getPageIndex() {
method setPageIndex (line 36) | public PageQuery setPageIndex(int pageIndex) {
method getPageSize (line 41) | public int getPageSize() {
method setPageSize (line 48) | public PageQuery setPageSize(int pageSize) {
method getOffset (line 56) | public int getOffset() {
method getOrderBy (line 60) | public String getOrderBy() {
method setOrderBy (line 64) | public PageQuery setOrderBy(String orderBy) {
method getOrderDirection (line 69) | public String getOrderDirection() {
method setOrderDirection (line 73) | public PageQuery setOrderDirection(String orderDirection) {
method getGroupBy (line 80) | public String getGroupBy() {
method setGroupBy (line 84) | public void setGroupBy(String groupBy) {
method isNeedTotalCount (line 88) | public boolean isNeedTotalCount() {
method setNeedTotalCount (line 92) | public void setNeedTotalCount(boolean needTotalCount) {
FILE: cola-components/cola-component-dto/src/main/java/com/alibaba/cola/dto/PageResponse.java
class PageResponse (line 14) | public class PageResponse<T> extends Response {
method getTotalCount (line 26) | public int getTotalCount() {
method setTotalCount (line 30) | public void setTotalCount(int totalCount) {
method getPageSize (line 34) | public int getPageSize() {
method setPageSize (line 41) | public void setPageSize(int pageSize) {
method getPageIndex (line 49) | public int getPageIndex() {
method setPageIndex (line 56) | public void setPageIndex(int pageIndex) {
method getData (line 64) | public List<T> getData() {
method setData (line 74) | public void setData(Collection<T> data) {
method getTotalPages (line 78) | public int getTotalPages() {
method isEmpty (line 83) | public boolean isEmpty() {
method isNotEmpty (line 87) | public boolean isNotEmpty() {
method buildSuccess (line 91) | public static PageResponse buildSuccess() {
method buildFailure (line 97) | public static PageResponse buildFailure(String errCode, String errMess...
method of (line 105) | public static <T> PageResponse<T> of(int pageSize, int pageIndex) {
method of (line 115) | public static <T> PageResponse<T> of(Collection<T> data, int totalCoun...
FILE: cola-components/cola-component-dto/src/main/java/com/alibaba/cola/dto/Query.java
class Query (line 9) | public abstract class Query extends Command {
FILE: cola-components/cola-component-dto/src/main/java/com/alibaba/cola/dto/Response.java
class Response (line 8) | public class Response extends DTO {
method isSuccess (line 18) | public boolean isSuccess() {
method setSuccess (line 22) | public void setSuccess(boolean success) {
method getErrCode (line 26) | public String getErrCode() {
method setErrCode (line 30) | public void setErrCode(String errCode) {
method getErrMessage (line 34) | public String getErrMessage() {
method setErrMessage (line 38) | public void setErrMessage(String errMessage) {
method toString (line 42) | @Override
method buildSuccess (line 47) | public static Response buildSuccess() {
method buildFailure (line 53) | public static Response buildFailure(String errCode, String errMessage) {
FILE: cola-components/cola-component-dto/src/main/java/com/alibaba/cola/dto/Scope.java
class Scope (line 8) | public abstract class Scope extends DTO {
FILE: cola-components/cola-component-dto/src/main/java/com/alibaba/cola/dto/SingleResponse.java
class SingleResponse (line 8) | public class SingleResponse<T> extends Response {
method getData (line 14) | public T getData() {
method setData (line 18) | public void setData(T data) {
method buildSuccess (line 22) | public static SingleResponse buildSuccess() {
method buildFailure (line 28) | public static SingleResponse buildFailure(String errCode, String errMe...
method of (line 36) | public static <T> SingleResponse<T> of(T data) {
FILE: cola-components/cola-component-dto/src/main/java/com/alibaba/cola/extension/BizScenario.java
class BizScenario (line 10) | public class BizScenario {
method getUniqueIdentity (line 37) | public String getUniqueIdentity(){
method valueOf (line 41) | public static BizScenario valueOf(String bizId, String useCase, String...
method valueOf (line 49) | public static BizScenario valueOf(String bizId, String useCase){
method valueOf (line 53) | public static BizScenario valueOf(String bizId){
method newDefault (line 57) | public static BizScenario newDefault(){
method getIdentityWithDefaultScenario (line 61) | public String getIdentityWithDefaultScenario(){
method getIdentityWithDefaultUseCase (line 65) | public String getIdentityWithDefaultUseCase(){
FILE: cola-components/cola-component-dto/src/test/java/com/alibaba/cola/Test.java
class Test (line 3) | public class Test {
FILE: cola-components/cola-component-exception/src/main/java/com/alibaba/cola/exception/Assert.java
class Assert (line 26) | public abstract class Assert {
method isTrue (line 40) | public static void isTrue(boolean expression, String errorCode, String...
method isFalse (line 55) | public static void isFalse(boolean expression, String errorCode, Strin...
method isTrue (line 61) | public static void isTrue(boolean expression, String errMessage) {
method isFalse (line 67) | public static void isFalse(boolean expression, String errMessage) {
method isTrue (line 73) | public static void isTrue(boolean expression) {
method isFalse (line 77) | public static void isFalse(boolean expression) {
method notNull (line 81) | public static void notNull(Object object, String errorCode, String err...
method notNull (line 87) | public static void notNull(Object object, String errMessage) {
method notNull (line 93) | public static void notNull(Object object) {
method notEmpty (line 97) | public static void notEmpty(Collection<?> collection, String errorCode...
method notEmpty (line 103) | public static void notEmpty(Collection<?> collection, String errMessag...
method notEmpty (line 109) | public static void notEmpty(Collection<?> collection) {
method notEmpty (line 113) | public static void notEmpty(Map<?, ?> map, String errorCode, String er...
method notEmpty (line 119) | public static void notEmpty(Map<?, ?> map, String errMessage) {
method notEmpty (line 125) | public static void notEmpty(Map<?, ?> map) {
FILE: cola-components/cola-component-exception/src/main/java/com/alibaba/cola/exception/BaseException.java
class BaseException (line 8) | public abstract class BaseException extends RuntimeException {
method BaseException (line 14) | public BaseException(String errMessage) {
method BaseException (line 18) | public BaseException(String errCode, String errMessage) {
method BaseException (line 23) | public BaseException(String errMessage, Throwable e) {
method BaseException (line 27) | public BaseException(String errCode, String errMessage, Throwable e) {
method getErrCode (line 32) | public String getErrCode() {
method setErrCode (line 36) | public void setErrCode(String errCode) {
FILE: cola-components/cola-component-exception/src/main/java/com/alibaba/cola/exception/BizException.java
class BizException (line 8) | public class BizException extends BaseException {
method BizException (line 14) | public BizException(String errMessage) {
method BizException (line 18) | public BizException(String errCode, String errMessage) {
method BizException (line 22) | public BizException(String errMessage, Throwable e) {
method BizException (line 26) | public BizException(String errorCode, String errMessage, Throwable e) {
FILE: cola-components/cola-component-exception/src/main/java/com/alibaba/cola/exception/ExceptionFactory.java
class ExceptionFactory (line 9) | public class ExceptionFactory {
method bizException (line 11) | public static BizException bizException(String errorMessage) {
method bizException (line 15) | public static BizException bizException(String errorCode, String error...
method sysException (line 19) | public static SysException sysException(String errorMessage) {
method sysException (line 23) | public static SysException sysException(String errorCode, String error...
method sysException (line 27) | public static SysException sysException(String errorMessage, Throwable...
method sysException (line 31) | public static SysException sysException(String errorCode, String error...
FILE: cola-components/cola-component-exception/src/main/java/com/alibaba/cola/exception/SysException.java
class SysException (line 8) | public class SysException extends BaseException {
method SysException (line 14) | public SysException(String errMessage) {
method SysException (line 18) | public SysException(String errCode, String errMessage) {
method SysException (line 22) | public SysException(String errMessage, Throwable e) {
method SysException (line 26) | public SysException(String errorCode, String errMessage, Throwable e) {
FILE: cola-components/cola-component-exception/src/test/java/com/alibaba/cola/exception/Test.java
class Test (line 3) | public class Test {
FILE: cola-components/cola-component-extension-starter/src/main/java/com/alibaba/cola/extension/ExtensionAutoConfiguration.java
class ExtensionAutoConfiguration (line 16) | @Configuration
method bootstrap (line 19) | @Bean(initMethod = "init")
method repository (line 25) | @Bean
method executor (line 31) | @Bean
method register (line 37) | @Bean
FILE: cola-components/cola-component-extension-starter/src/main/java/com/alibaba/cola/extension/ExtensionCoordinate.java
class ExtensionCoordinate (line 14) | public class ExtensionCoordinate {
method getExtensionPointClass (line 25) | public Class getExtensionPointClass() {
method getBizScenario (line 29) | public BizScenario getBizScenario() {
method valueOf (line 33) | public static ExtensionCoordinate valueOf(Class<?> extPtClass, BizScen...
method ExtensionCoordinate (line 37) | public ExtensionCoordinate(Class<?> extPtClass, BizScenario bizScenario){
method ExtensionCoordinate (line 44) | public ExtensionCoordinate(String extensionPoint, String bizScenario){
method hashCode (line 49) | @Override
method equals (line 57) | @Override
method toString (line 86) | @Override
FILE: cola-components/cola-component-extension-starter/src/main/java/com/alibaba/cola/extension/ExtensionException.java
class ExtensionException (line 13) | public class ExtensionException extends RuntimeException {
method ExtensionException (line 17) | public ExtensionException(String errMessage) {
method ExtensionException (line 21) | public ExtensionException(String errCode, String errMessage) {
method ExtensionException (line 26) | public ExtensionException(String errMessage, Throwable e) {
method ExtensionException (line 30) | public ExtensionException(String errCode, String errMessage, Throwable...
method getErrCode (line 35) | public String getErrCode() {
method setErrCode (line 39) | public void setErrCode(String errCode) {
FILE: cola-components/cola-component-extension-starter/src/main/java/com/alibaba/cola/extension/ExtensionExecutor.java
class ExtensionExecutor (line 22) | @Component
method locateComponent (line 32) | @Override
method locateExtension (line 50) | protected <Ext> Ext locateExtension(Class<Ext> targetClz, BizScenario ...
method firstTry (line 85) | private <Ext> Ext firstTry(Class<Ext> targetClz, BizScenario bizScenar...
method secondTry (line 95) | private <Ext> Ext secondTry(Class<Ext> targetClz, BizScenario bizScena...
method defaultUseCaseTry (line 105) | private <Ext> Ext defaultUseCaseTry(Class<Ext> targetClz, BizScenario ...
method locate (line 110) | private <Ext> Ext locate(String name, String uniqueIdentity) {
method checkNull (line 116) | private void checkNull(BizScenario bizScenario) {
FILE: cola-components/cola-component-extension-starter/src/main/java/com/alibaba/cola/extension/ExtensionPointI.java
type ExtensionPointI (line 8) | public interface ExtensionPointI {
FILE: cola-components/cola-component-extension-starter/src/main/java/com/alibaba/cola/extension/ExtensionRepository.java
class ExtensionRepository (line 19) | @Component
method getExtensionRepo (line 22) | public Map<ExtensionCoordinate, ExtensionPointI> getExtensionRepo() {
FILE: cola-components/cola-component-extension-starter/src/main/java/com/alibaba/cola/extension/register/AbstractComponentExecutor.java
class AbstractComponentExecutor (line 13) | public abstract class AbstractComponentExecutor {
method execute (line 25) | public <R, T> R execute(Class<T> targetClz, BizScenario bizScenario, F...
method execute (line 30) | public <R, T> R execute(ExtensionCoordinate extensionCoordinate, Funct...
method executeVoid (line 42) | public <T> void executeVoid(Class<T> targetClz, BizScenario context, C...
method executeVoid (line 47) | public <T> void executeVoid(ExtensionCoordinate extensionCoordinate, C...
method locateComponent (line 51) | protected abstract <C> C locateComponent(Class<C> targetClz, BizScenar...
FILE: cola-components/cola-component-extension-starter/src/main/java/com/alibaba/cola/extension/register/ExtensionBootstrap.java
class ExtensionBootstrap (line 23) | @Slf4j
method init (line 32) | @PostConstruct
method setApplicationContext (line 46) | @Override
FILE: cola-components/cola-component-extension-starter/src/main/java/com/alibaba/cola/extension/register/ExtensionRegister.java
class ExtensionRegister (line 24) | @Component
method doRegistration (line 46) | public void doRegistration(ExtensionPointI extensionObject) {
method doRegistrationExtensions (line 61) | public void doRegistrationExtensions(ExtensionPointI extensionObject){
method calculateExtensionPoint (line 92) | private String calculateExtensionPoint(Class<?> targetClz) {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/Application.java
class Application (line 13) | @SpringBootApplication
method main (line 17) | public static void main(String[] args) {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/ExtensionTest.java
class ExtensionTest (line 23) | @SpringBootTest(classes = Application.class)
method testBiz1UseCase1Scenario1AddCustomerSuccess (line 28) | @Test
method testBiz1UseCase1AddCustomerSuccess (line 47) | @Test
method testBiz1AddCustomerSuccess (line 66) | @Test
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/MultiCoordinateTests.java
class MultiCoordinateTests (line 17) | @SpringBootTest(classes = Application.class)
method testMultiCoordinate (line 25) | @Test
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/AddCustomerCmdExe.java
class AddCustomerCmdExe (line 20) | @Component
method execute (line 32) | public Response execute(AddCustomerCmd cmd) {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/CustomerCreatedEventHandler.java
class CustomerCreatedEventHandler (line 12) | public class CustomerCreatedEventHandler {
method execute (line 14) | public Response execute(CustomerCreatedEvent customerCreatedEvent) {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/CustomerServiceImpl.java
class CustomerServiceImpl (line 17) | @Service
method addCustomer (line 27) | @Override
method getCustomer (line 32) | @Override
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/GetOneCustomerQryExe.java
class GetOneCustomerQryExe (line 13) | @Component
method execute (line 16) | public SingleResponse execute(GetOneCustomerQry getOneCustomerQry){
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/extension/AddCustomerBiz1UseCase1Scenario1Validator.java
class AddCustomerBiz1UseCase1Scenario1Validator (line 14) | @Extension(bizId = Constants.BIZ_1, useCase = Constants.USE_CASE_1, scen...
method validate (line 16) | public void validate(AddCustomerCmd addCustomerCmd) {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/extension/AddCustomerBiz1UseCase1Validator.java
class AddCustomerBiz1UseCase1Validator (line 14) | @Extension(bizId = Constants.BIZ_1, useCase = Constants.USE_CASE_1)
method validate (line 16) | public void validate(AddCustomerCmd addCustomerCmd) {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/extension/AddCustomerBizOneValidator.java
class AddCustomerBizOneValidator (line 16) | @Extension(bizId = Constants.BIZ_1)
method validate (line 19) | public void validate(AddCustomerCmd addCustomerCmd) {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/extension/AddCustomerBizTwoValidator.java
class AddCustomerBizTwoValidator (line 15) | @Extension(bizId = Constants.BIZ_2)
method validate (line 18) | public void validate(AddCustomerCmd addCustomerCmd) {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/extension/CustomerBizOneConvertorExt.java
class CustomerBizOneConvertorExt (line 18) | @Extension(bizId = Constants.BIZ_1)
method clientToEntity (line 24) | @Override
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/extension/CustomerBizTwoConvertorExt.java
class CustomerBizTwoConvertorExt (line 17) | @Extension(bizId = Constants.BIZ_2)
method clientToEntity (line 23) | @Override
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/extension/CustomerConvertor.java
class CustomerConvertor (line 15) | @Component
method clientToEntity (line 18) | public CustomerEntity clientToEntity(Object clientObject){
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/extension/StatusNameConvertorExt.java
class StatusNameConvertorExt (line 12) | @Extensions(bizId = {"Samsung", "Motorola"}, useCase = {"order", "parts"...
method statusNameConvertor (line 31) | @Override
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/extensionpoint/AddCustomerValidatorExtPt.java
type AddCustomerValidatorExtPt (line 12) | public interface AddCustomerValidatorExtPt extends ExtensionPointI {
method validate (line 14) | public void validate(AddCustomerCmd addCustomerCmd);
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/extensionpoint/CustomerConvertorExtPt.java
type CustomerConvertorExtPt (line 13) | public interface CustomerConvertorExtPt extends ExtensionPointI {
method clientToEntity (line 15) | public CustomerEntity clientToEntity(AddCustomerCmd addCustomerCmd);
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/app/extensionpoint/StatusNameConvertorExtPt.java
type StatusNameConvertorExtPt (line 11) | public interface StatusNameConvertorExtPt extends ExtensionPointI {
method statusNameConvertor (line 12) | String statusNameConvertor(Integer statusCode);
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/client/AddCustomerCmd.java
class AddCustomerCmd (line 13) | @Data
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/client/Constants.java
class Constants (line 9) | public class Constants {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/client/CustomerCreatedEvent.java
class CustomerCreatedEvent (line 9) | public class CustomerCreatedEvent {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/client/CustomerDTO.java
class CustomerDTO (line 12) | public class CustomerDTO extends DTO {
method getCompanyName (line 18) | public String getCompanyName() {
method setCompanyName (line 22) | public void setCompanyName(String companyName) {
method getSource (line 26) | public String getSource() {
method setSource (line 30) | public void setSource(String source) {
method getCustomerType (line 34) | public CustomerType getCustomerType() {
method setCustomerType (line 38) | public void setCustomerType(CustomerType customerType) {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/client/CustomerServiceI.java
type CustomerServiceI (line 11) | public interface CustomerServiceI {
method addCustomer (line 12) | public Response addCustomer(AddCustomerCmd addCustomerCmd);
method getCustomer (line 13) | public SingleResponse<CustomerDTO> getCustomer(GetOneCustomerQry getOn...
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/client/GetOneCustomerQry.java
class GetOneCustomerQry (line 10) | public class GetOneCustomerQry extends Query{
method getCustomerId (line 14) | public long getCustomerId() {
method setCustomerId (line 18) | public void setCustomerId(long customerId) {
method getCompanyName (line 22) | public String getCompanyName() {
method setCompanyName (line 26) | public void setCompanyName(String companyName) {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/domain/CustomerEntity.java
class CustomerEntity (line 17) | @Entity
method CustomerEntity (line 32) | public CustomerEntity() {
method addNewCustomer (line 36) | public void addNewCustomer() {
method getCompanyName (line 45) | public String getCompanyName() {
method setCompanyName (line 49) | public void setCompanyName(String companyName) {
method getSourceType (line 53) | public SourceType getSourceType() {
method setSourceType (line 57) | public void setSourceType(SourceType sourceType) {
method getCustomerType (line 61) | public CustomerType getCustomerType() {
method setCustomerType (line 65) | public void setCustomerType(CustomerType customerType) {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/domain/CustomerType.java
type CustomerType (line 8) | public enum CustomerType {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/domain/SourceType.java
type SourceType (line 9) | public enum SourceType {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/domain/rule/CustomerBizOneRuleExt.java
class CustomerBizOneRuleExt (line 15) | @Extension(bizId = Constants.BIZ_1)
method addCustomerCheck (line 18) | @Override
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/domain/rule/CustomerBizTwoRuleExt.java
class CustomerBizTwoRuleExt (line 13) | @Extension(bizId = Constants.BIZ_2)
method addCustomerCheck (line 16) | @Override
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/domain/rule/CustomerRuleExtPt.java
type CustomerRuleExtPt (line 12) | public interface CustomerRuleExtPt extends ExtensionPointI {
method addCustomerCheck (line 15) | public boolean addCustomerCheck(CustomerEntity customerEntity);
method customerUpgradePolicy (line 18) | default public void customerUpgradePolicy(CustomerEntity customerEntity){
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/infrastructure/CustomerDO.java
class CustomerDO (line 10) | public class CustomerDO implements java.io.Serializable {
method getCustomerId (line 18) | public String getCustomerId() {
method setCustomerId (line 22) | public void setCustomerId(String customerId) {
method getMemberId (line 26) | public String getMemberId() {
method setMemberId (line 30) | public void setMemberId(String memberId) {
method getGlobalId (line 34) | public String getGlobalId() {
method setGlobalId (line 38) | public void setGlobalId(String globalId) {
method getCompanyName (line 42) | public String getCompanyName() {
method setCompanyName (line 46) | public void setCompanyName(String companyName) {
method getSource (line 50) | public String getSource() {
method setSource (line 54) | public void setSource(String source) {
method getCompanyType (line 58) | public String getCompanyType() {
method setCompanyType (line 62) | public void setCompanyType(String companyType) {
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/infrastructure/CustomerRepository.java
class CustomerRepository (line 12) | @Repository
method persist (line 15) | public void persist(CustomerEntity customerEntity){
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/customer/infrastructure/DomainEventPublisher.java
class DomainEventPublisher (line 11) | @Component
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/register/CglibProxyFactory.java
class CglibProxyFactory (line 9) | public class CglibProxyFactory {
method createProxy (line 11) | public static <T> T createProxy(T object) {
class ProxyCallback (line 18) | public static class ProxyCallback implements MethodInterceptor {
method ProxyCallback (line 22) | public ProxyCallback(Object target) {
method intercept (line 26) | @Override
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/register/ExtensionRegisterTest.java
class ExtensionRegisterTest (line 12) | @SpringBootTest(classes = Application.class)
method testDuplicateRegistration (line 21) | @Test
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/register/SomeExtPt.java
type SomeExtPt (line 5) | public interface SomeExtPt extends ExtensionPointI {
method doSomeThing (line 7) | public void doSomeThing();
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/register/SomeExtensionA.java
class SomeExtensionA (line 7) | @Extension(bizId = "A")
method doSomeThing (line 11) | @Override
FILE: cola-components/cola-component-extension-starter/src/test/java/com/alibaba/cola/extension/register/SomeExtensionB.java
class SomeExtensionB (line 7) | @Extension(bizId = "B")
method doSomeThing (line 11) | @Override
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/BatchJobLauncher.java
class BatchJobLauncher (line 15) | @Slf4j
method execute (line 17) | public static BatchJobExecution execute(BatchJob batchJob) {
method checkAndRefresh (line 34) | public static boolean checkAndRefresh(BatchJob batchJob, String batchJ...
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/ExecutionContext.java
class ExecutionContext (line 14) | @ToString
method getParam (line 49) | public T getParam() {
method getParam (line 53) | @SuppressWarnings("unchecked")
method setParam (line 65) | public void setParam(T param) {
method getJobId (line 69) | public String getJobId() {
method setJobId (line 73) | public void setJobId(String jobId) {
method getBatchJobId (line 77) | public String getBatchJobId() {
method setBatchJobId (line 81) | public void setBatchJobId(String batchJobId) {
method ExecutionContext (line 85) | public ExecutionContext() {
method ExecutionContext (line 90) | public ExecutionContext(String jobId) {
method ExecutionContext (line 95) | public ExecutionContext(Map<String, Object> extensions) {
method putString (line 100) | public void putString(String key, @Nullable String value) {
method putTemp (line 104) | public void putTemp(String key, Object value){
method getTemp (line 108) | public Object getTemp(String key){
method getString (line 112) | public String getString(String key) {
method getString (line 116) | public String getString(String key, String defaultString) {
method put (line 120) | public void put(String key, @Nullable Object value) {
method get (line 128) | @Nullable
method get (line 133) | @Nullable
method get (line 139) | @Nullable
method containsKey (line 153) | public boolean containsKey(String key) {
method remove (line 157) | @Nullable
method containsValue (line 162) | public boolean containsValue(Object value) {
method fromJsonString (line 166) | public ExecutionContext<?> fromJsonString(String jsonString) {
method toString (line 170) | @Override
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/JobBuilderFactory.java
class JobBuilderFactory (line 7) | public class JobBuilderFactory {
method create (line 8) | public static JobBuilder create() {
class JobBuilder (line 12) | public static class JobBuilder {
method addStep (line 15) | public JobBuilder addStep(Step step) {
method name (line 21) | public JobBuilder name(String name) {
method needRollback (line 26) | public JobBuilder needRollback(boolean needRollback) {
method isAsync (line 31) | public JobBuilder isAsync(boolean isAsync) {
method jobRepository (line 36) | public JobBuilder jobRepository(JobRepository jobRepository) {
method build (line 41) | public Job build(String name, JobRepository jobRepository) {
method build (line 47) | public Job build() {
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/JobException.java
class JobException (line 3) | public class JobException extends RuntimeException{
method JobException (line 4) | public JobException(String message){
method JobException (line 8) | public JobException(Exception e){
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/JobLauncher.java
class JobLauncher (line 13) | @Slf4j
method executeSync (line 23) | public static JobExecution executeSync(Job job) {
method executeSync (line 34) | public static JobExecution executeSync(Job job, ExecutionContext execu...
method executeAsync (line 49) | public static String executeAsync(Job job) {
method executeAsync (line 53) | public static String executeAsync(Job job, ExecutorService executorSer...
method executeAsync (line 57) | public static String executeAsync(Job job, ExecutionContext executionC...
method executeAsync (line 61) | public static String executeAsync(Job job, ExecutionContext executionC...
method createJobExecution (line 82) | private static JobExecution createJobExecution(Job job, ExecutionConte...
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/UuidGenerator.java
class UuidGenerator (line 8) | public class UuidGenerator {
method nextJobId (line 21) | public static String nextJobId() {
method nextJobId (line 32) | public static String nextJobId(String jobName){
method nextBatchJobId (line 40) | public static String nextBatchJobId() {
class NanoIdUtils (line 50) | public final class NanoIdUtils {
method NanoIdUtils (line 55) | private NanoIdUtils() {
method randomNanoId (line 58) | public static String randomNanoId() {
method randomNanoId (line 62) | public static String randomNanoId(Random random, char[] alphabet, in...
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/config/DBAutoConfiguration.java
class DBAutoConfiguration (line 19) | @Slf4j
method init (line 34) | @PostConstruct
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/config/EnableJobConfiguration.java
class EnableJobConfiguration (line 16) | @Slf4j
method jobRepository (line 24) | @Bean
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/config/JobProperties.java
class JobProperties (line 8) | @Data
class DatabaseProperties (line 16) | @Data
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/config/RedisConfig.java
class RedisConfig (line 13) | @Configuration
method jobRedisTemplate (line 16) | @Bean("jobRedisTemplate")
method stepRedisTemplate (line 21) | @Bean("stepRedisTemplate")
method batchJobRedisTemplate (line 26) | @Bean("batchJobRedisTemplate")
method buildTemplate (line 31) | private RedisTemplate<String, Object> buildTemplate(RedisConnectionFac...
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/model/AbstractStep.java
class AbstractStep (line 8) | @Data
method setJob (line 14) | @Override
method getJob (line 19) | @Override
method execute (line 24) | @Override
method rollback (line 46) | @Override
method updateStepExecution (line 55) | private void updateStepExecution(StepExecution stepExecution) {
method internalRollback (line 61) | private void internalRollback(StepExecution stepExecution) {
method doExecute (line 78) | public abstract void doExecute(StepExecution stepExecution);
method doRollback (line 80) | public void doRollback(StepExecution stepExecution) {
method needRollBack (line 85) | @Override
method logInfo (line 90) | private void logInfo(StepExecution stepExecution, String message) {
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/model/BatchJob.java
class BatchJob (line 14) | public class BatchJob {
method BatchJob (line 28) | public BatchJob() {
method jobRepository (line 32) | public BatchJob jobRepository(JobRepository jobRepository) {
method executorService (line 37) | public BatchJob executorService(ExecutorService executorService) {
method add (line 42) | public BatchJob add(JobInstance jobInstance) {
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/model/BatchJobExecution.java
class BatchJobExecution (line 24) | @Data
method BatchJobExecution (line 52) | public BatchJobExecution() {
method BatchJobExecution (line 55) | public BatchJobExecution(String batchJobId) {
method addJobExecution (line 59) | public void addJobExecution(String jobExecutionId) {
method put (line 63) | public void put(String jobExecutionId, ExecutionStatus executionStatus) {
method isCompleted (line 67) | public boolean isCompleted() {
method isBatchJobCompleted (line 74) | public boolean isBatchJobCompleted() {
method isChildrenJobsCompleted (line 78) | public boolean isChildrenJobsCompleted() {
method isAllJobsCompleted (line 87) | public boolean isAllJobsCompleted() {
method isTerminated (line 101) | public boolean isTerminated(){
method isFailed (line 110) | public boolean isFailed() {
class ResultsConverter (line 121) | class ResultsConverter implements AttributeConverter<Map<String, Executi...
method convertToDatabaseColumn (line 122) | @Override
method convertToEntityAttribute (line 127) | @Override
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/model/ExecutionStatus.java
type ExecutionStatus (line 8) | public enum ExecutionStatus {
method fromValue (line 22) | @JsonCreator
method isRollback (line 32) | public static boolean isRollback(ExecutionStatus executionStatus) {
method isTerminated (line 36) | public static boolean isTerminated(ExecutionStatus executionStatus) {
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/model/Job.java
class Job (line 18) | @Slf4j
method execute (line 34) | public void execute(JobExecution jobExecution) {
method run (line 42) | private void run(JobExecution jobExecution) {
method onFailToRollback (line 72) | private void onFailToRollback(Exception e, JobExecution jobExecution) {
method rollbackStep (line 88) | private void rollbackStep(Step step, JobExecution jobExecution) {
method runStep (line 107) | private void runStep(Step step, JobExecution jobExecution) {
method rollback (line 133) | private void rollback(JobExecution jobExecution) {
method getReverseSteps (line 165) | public List<Step> getReverseSteps() {
method onException (line 171) | private void onException(Exception e, JobExecution jobExecution, Execu...
method onFinally (line 178) | private void onFinally(JobExecution jobExecution) {
method equals (line 184) | @Override
method hashCode (line 201) | @Override
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/model/JobExecution.java
class JobExecution (line 27) | @Data
method setStepExecutionList (line 76) | public void setStepExecutionList(List<StepExecution> stepExecutions) {
method isCompleted (line 86) | public boolean isCompleted() {
method isFailOrRollback (line 90) | public boolean isFailOrRollback() {
method toString (line 94) | @Override
method getRollbackSteps (line 100) | @JsonIgnore
class ContextConverter (line 108) | class ContextConverter implements AttributeConverter<ExecutionContext, S...
method convertToDatabaseColumn (line 109) | @Override
method convertToEntityAttribute (line 114) | @Override
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/model/JobInstance.java
class JobInstance (line 12) | @Data
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/model/Step.java
type Step (line 3) | public interface Step {
method execute (line 5) | void execute(StepExecution stepExecution);
method rollback (line 7) | void rollback(StepExecution stepExecution);
method needRollBack (line 9) | boolean needRollBack(StepExecution stepExecution);
method setJob (line 11) | void setJob(Job job);
method getJob (line 13) | Job getJob();
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/model/StepExecution.java
class StepExecution (line 25) | @Data
method isCompleted (line 69) | public boolean isCompleted() {
method isRollbacked (line 72) | public boolean isRollbacked() {
method StepExecution (line 76) | public StepExecution(){
method StepExecution (line 79) | public StepExecution(Step step) {
method setJobExecution (line 84) | public void setJobExecution(JobExecution jobExecution) {
method getExecutionContext (line 91) | public ExecutionContext getExecutionContext() {
method getRepository (line 98) | @JsonIgnore
method toString (line 105) | @Override
method equals (line 110) | @Override
method hashCode (line 124) | @Override
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/repository/AbstractJobRepository.java
class AbstractJobRepository (line 8) | public abstract class AbstractJobRepository implements JobRepository {
method findNotCompletedBatchJobsOlderThan (line 9) | @Override
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/repository/JobRepository.java
type JobRepository (line 11) | public interface JobRepository {
method saveBatchJobExecution (line 12) | BatchJobExecution saveBatchJobExecution(BatchJobExecution batchJobExec...
method updateBatchJobExecution (line 14) | void updateBatchJobExecution(BatchJobExecution batchJobExecution);
method getBatchJobExecutionByBatchJobId (line 16) | BatchJobExecution getBatchJobExecutionByBatchJobId(String batchJobId);
method saveJobExecution (line 18) | JobExecution saveJobExecution(JobExecution jobExecution);
method updateJobExecution (line 20) | void updateJobExecution(JobExecution jobExecution);
method getJobExecutionByJobId (line 22) | JobExecution getJobExecutionByJobId(String jobId);
method saveStepExecution (line 24) | void saveStepExecution(StepExecution stepExecution);
method updateStepExecution (line 26) | void updateStepExecution(StepExecution stepExecution);
method getStepExecution (line 28) | StepExecution getStepExecution(String jobExecutionId, String stepName);
method listStepExecutions (line 30) | List<StepExecution> listStepExecutions(String jobExecutionId);
method findNotCompletedBatchJobsOlderThan (line 32) | List<BatchJobExecution> findNotCompletedBatchJobsOlderThan(LocalDateTi...
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/repository/JsonUtil.java
class JsonUtil (line 14) | public final class JsonUtil {
method encode (line 17) | public static String encode(Object object) {
method decode (line 21) | public static <T> T decode(String source, Class<T> valueType) {
method decode (line 25) | public static <T> T decode(String src, TypeReference<T> valueTypeRef) {
method invoke (line 29) | private static <T> T invoke(Callable<T> callable) {
class ObjectMapperFactory (line 37) | public class ObjectMapperFactory {
method getObjectMapper (line 47) | public static ObjectMapper getObjectMapper() {
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/repository/RepositoryType.java
type RepositoryType (line 3) | public enum RepositoryType {
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/repository/db/BatchJobExecutionRepository.java
type BatchJobExecutionRepository (line 13) | @Repository
method getByBatchJobId (line 15) | BatchJobExecution getByBatchJobId(String batchJobId);
method findNotCompletedBatchJobsOlderThan (line 17) | @Query("SELECT b FROM BatchJobExecution b " +
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/repository/db/DataBaseJobRepository.java
class DataBaseJobRepository (line 13) | public class DataBaseJobRepository extends AbstractJobRepository {
method getJobExecutionByJobId (line 24) | @Override
method saveBatchJobExecution (line 29) | @Override
method updateBatchJobExecution (line 34) | @Override
method getBatchJobExecutionByBatchJobId (line 39) | @Override
method saveJobExecution (line 44) | @Override
method updateJobExecution (line 49) | @Override
method saveStepExecution (line 54) | @Override
method updateStepExecution (line 59) | @Override
method getStepExecution (line 64) | @Override
method listStepExecutions (line 69) | @Override
method findNotCompletedBatchJobsOlderThan (line 74) | @Override
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/repository/db/JobExecutionRepository.java
type JobExecutionRepository (line 8) | @Repository
method getByJobId (line 10) | JobExecution getByJobId(String jobId);
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/repository/db/StepExecutionRepository.java
type StepExecutionRepository (line 9) | @Repository
method getByStepId (line 11) | StepExecution getByStepId(String stepId);
method getByJobIdAndStepName (line 12) | StepExecution getByJobIdAndStepName(String jobId, String stepName);
method findByJobId (line 13) | List<StepExecution> findByJobId(String jobId);
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/repository/memory/MemoryJobRepository.java
class MemoryJobRepository (line 21) | public class MemoryJobRepository extends AbstractJobRepository {
method getJobExecutionByJobId (line 35) | @Override
method saveBatchJobExecution (line 40) | @Override
method updateBatchJobExecution (line 46) | @Override
method getBatchJobExecutionByBatchJobId (line 51) | @Override
method saveJobExecution (line 56) | @Override
method updateJobExecution (line 65) | @Override
method saveStepExecution (line 77) | @Override
method updateStepExecution (line 91) | @Override
method getStepExecution (line 105) | @Override
method listStepExecutions (line 110) | @Override
FILE: cola-components/cola-component-job/src/main/java/com/alibaba/cola/job/repository/redis/RedisJobRepository.java
class RedisJobRepository (line 20) | public class RedisJobRepository extends AbstractJobRepository {
method init (line 34) | @PostConstruct
method saveBatchJobExecution (line 43) | @Override
method updateBatchJobExecution (line 50) | @Override
method getBatchJobExecutionByBatchJobId (line 56) | @Override
method saveJobExecution (line 63) | @Override
method updateJobExecution (line 70) | @Override
method getJobExecutionByJobId (line 76) | @Override
method saveStepExecution (line 82) | @Override
method updateStepExecution (line 88) | @Override
method getStepExecution (line 94) | @Override
method listStepExecutions (line 101) | @Override
FILE: cola-components/cola-component-job/src/main/resources/schema-mysql.sql
type BATCH_JOB_EXECUTION (line 1) | CREATE TABLE IF NOT EXISTS BATCH_JOB_EXECUTION
type JOB_EXECUTION (line 11) | CREATE TABLE IF NOT EXISTS JOB_EXECUTION
type STEP_EXECUTION (line 23) | CREATE TABLE IF NOT EXISTS STEP_EXECUTION
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/AbstractBaseJobTest.java
class AbstractBaseJobTest (line 19) | @Slf4j
method getJobRepository (line 22) | public abstract JobRepository getJobRepository();
method testBatchJobCompleted (line 24) | public abstract void testBatchJobCompleted();
method batchJobCompleted (line 26) | public void batchJobCompleted() {
method buildExecutorService (line 61) | public ExecutorService buildExecutorService() {
method testBatchJobFailed (line 85) | public abstract void testBatchJobFailed();
method batchJobFailed (line 87) | public void batchJobFailed() {
method testJobCompleted (line 120) | public abstract void testJobCompleted();
method jobCompleted (line 122) | public void jobCompleted() {
method jobRunning (line 133) | public void jobRunning() {
method testJobWithCustomizedParam (line 145) | public abstract void testJobWithCustomizedParam();
method jobWithCustomizedParam (line 147) | public void jobWithCustomizedParam() {
method testJobRerunSkipNext (line 160) | public abstract void testJobRerunSkipNext();
method jobRerunSkipNext (line 162) | public void jobRerunSkipNext() {
method testJobRerunFixPreviousFail (line 176) | public abstract void testJobRerunFixPreviousFail();
method jobRerunFixPreviousFail (line 178) | public void jobRerunFixPreviousFail() {
method testStepRollBack (line 194) | public abstract void testStepRollBack();
method stepRollBack (line 196) | public void stepRollBack() {
method testStepRollbackFailed (line 212) | public abstract void testStepRollbackFailed();
method stepRollbackFailed (line 214) | public void stepRollbackFailed() {
method jobRollBack (line 230) | public void jobRollBack() {
method jobRollBackFailed (line 247) | public void jobRollBackFailed() {
method expectedStatus (line 278) | public void expectedStatus(String executionId, Map<String, ExecutionSt...
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/MemoryDBJobTest.java
class MemoryDBJobTest (line 12) | @Slf4j
method getJobRepository (line 20) | @Override
method testBatchJobCompleted (line 25) | @Test
method testBatchJobFailed (line 30) | @Test
method testJobCompleted (line 35) | @Test
method testJobWithCustomizedParam (line 40) | @Test
method testJobRerunSkipNext (line 45) | @Test
method testJobRerunFixPreviousFail (line 50) | @Test
method testStepRollBack (line 55) | @Test
method testStepRollbackFailed (line 60) | @Test
method testJobRollback (line 65) | @Test
method test (line 70) | @Test
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/MemoryJobTest.java
class MemoryJobTest (line 8) | public class MemoryJobTest extends AbstractBaseJobTest {
method getJobRepository (line 12) | @Override
method testBatchJobCompleted (line 17) | @Test
method testBatchJobFailed (line 22) | @Test
method testJobCompleted (line 27) | @Test
method testJobWithCustomizedParam (line 32) | @Test
method testJobRerunSkipNext (line 37) | @Test
method testJobRerunFixPreviousFail (line 42) | @Test
method testStepRollBack (line 47) | @Test
method testStepRollbackFailed (line 52) | @Test
method testJobRollback (line 57) | @Test
method testJobRollbackFailed (line 62) | @Test
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/MySQLJobTest.java
class MySQLJobTest (line 11) | @Slf4j
method getJobRepository (line 20) | @Override
method testBatchJobCompleted (line 25) | @Test
method testBatchJobFailed (line 30) | @Test
method testJobCompleted (line 35) | @Test
method testJobWithCustomizedParam (line 40) | @Test
method testJobRerunSkipNext (line 45) | @Test
method testJobRerunFixPreviousFail (line 50) | @Test
method testStepRollBack (line 55) | @Test
method testStepRollbackFailed (line 60) | @Test
method testJobRollback (line 65) | @Test
method test (line 70) | @Test
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/RedisJobTest.java
class RedisJobTest (line 21) | @Slf4j
method getJobRepository (line 30) | @Override
method testBatchJobCompleted (line 35) | @Test
method testBatchJobFailed (line 40) | @Test
method testJobCompleted (line 45) | @Test
method testJobRunning (line 50) | @Test
method testJobFailed (line 55) | @Test
method testJobWithCustomizedParam (line 67) | @Test
method testJobRerunSkipNext (line 72) | @Test
method testJobRerunFixPreviousFail (line 77) | @Test
method testStepRollBack (line 82) | @Test
method testStepRollbackFailed (line 87) | @Test
method testJobRollback (line 92) | @Test
method testJobRollBackFailed (line 97) | @Test
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/TestApplication.java
class TestApplication (line 6) | @SpringBootApplication
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/TestsContainerBoot.java
class TestsContainerBoot (line 5) | public class TestsContainerBoot {
method main (line 6) | public static void main(String[] args) {
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/steps/FailedStep.java
class FailedStep (line 7) | public class FailedStep extends AbstractStep {
method doExecute (line 8) | @Override
method doRollback (line 14) | @Override
method needRollBack (line 19) | @Override
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/steps/LongTimeStep.java
class LongTimeStep (line 8) | public class LongTimeStep extends AbstractStep {
method doExecute (line 9) | @Override
method doRollback (line 19) | @Override
method needRollBack (line 24) | @Override
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/steps/MyStep1.java
class MyStep1 (line 7) | public class MyStep1 extends AbstractStep {
method doRollback (line 9) | @Override
method doExecute (line 14) | @Override
method needRollBack (line 20) | @Override
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/steps/MyStep2.java
class MyStep2 (line 7) | public class MyStep2 extends AbstractStep {
method doRollback (line 9) | @Override
method doExecute (line 14) | @Override
method needRollBack (line 20) | @Override
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/steps/MyStep3.java
class MyStep3 (line 7) | public class MyStep3 extends AbstractStep {
method doRollback (line 9) | @Override
method doExecute (line 14) | @Override
method needRollBack (line 20) | @Override
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/steps/MyStep4.java
class MyStep4 (line 6) | public class MyStep4 extends AbstractStep {
method doRollback (line 8) | @Override
method doExecute (line 14) | @Override
method needRollBack (line 20) | @Override
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/steps/MyStep5.java
class MyStep5 (line 8) | public class MyStep5 extends AbstractStep {
method doRollback (line 13) | @Override
method doExecute (line 21) | @Override
method needRollBack (line 26) | @Override
FILE: cola-components/cola-component-job/src/test/java/com/alibaba/cola/job/test/steps/SwitchStep.java
class SwitchStep (line 8) | @Slf4j
method doExecute (line 12) | @Override
method doRollback (line 22) | @Override
method needRollBack (line 27) | @Override
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/api/Action.java
type Action (line 3) | @FunctionalInterface
method execute (line 5) | void execute(Facts facts);
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/api/Condition.java
type Condition (line 5) | @FunctionalInterface
method evaluate (line 8) | boolean evaluate(Facts facts);
method and (line 11) | default Condition and(Condition other) {
method or (line 19) | default Condition or(Condition other) {
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/api/Fact.java
class Fact (line 5) | public class Fact<T> {
method Fact (line 15) | public Fact(String name, T value) {
method getName (line 26) | public String getName() {
method getValue (line 34) | public T getValue() {
method toString (line 38) | @Override
method equals (line 51) | @Override
method hashCode (line 59) | @Override
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/api/Facts.java
class Facts (line 5) | public class Facts implements Iterable<Fact<?>> {
method put (line 15) | public <T> void put(String name, T value) {
method add (line 30) | public <T> void add(Fact<T> fact) {
method remove (line 44) | public void remove(String factName) {
method remove (line 57) | public <T> void remove(Fact<T> fact) {
method get (line 71) | @SuppressWarnings("unchecked")
method getFact (line 87) | public Fact<?> getFact(String factName) {
method contains (line 95) | public boolean contains(String factName){
method contains (line 99) | public boolean contains(Fact fact){
method size (line 106) | public int size(){
method asMap (line 116) | public Map<String, Object> asMap() {
method iterator (line 130) | @Override
method clear (line 138) | public void clear() {
method toString (line 142) | @Override
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/api/Rule.java
type Rule (line 3) | public interface Rule extends Comparable<Rule> {
method getName (line 24) | default String getName() {
method getDescription (line 32) | default String getDescription() {
method getPriority (line 40) | default int getPriority() {
method evaluate (line 50) | boolean evaluate(Facts facts);
method execute (line 56) | void execute(Facts facts);
method apply (line 63) | boolean apply(Facts facts);
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/api/RuleEngine.java
type RuleEngine (line 3) | public interface RuleEngine {
method fire (line 7) | void fire(Rule rule, Facts facts);
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/core/AbstractRule.java
class AbstractRule (line 39) | public abstract class AbstractRule implements Rule {
method AbstractRule (line 59) | public AbstractRule() {
method AbstractRule (line 68) | public AbstractRule(final String name) {
method AbstractRule (line 72) | public AbstractRule(final int priority) {
method AbstractRule (line 82) | public AbstractRule(final String name, final String description) {
method AbstractRule (line 93) | public AbstractRule(final String name, final String description, final...
method evaluate (line 99) | public abstract boolean evaluate(Facts facts);
method execute (line 101) | public abstract void execute(Facts facts);
method apply (line 103) | public abstract boolean apply(Facts facts);
method getName (line 105) | public String getName() {
method getDescription (line 109) | public String getDescription() {
method setDescription (line 113) | public void setDescription(final String description) {
method getPriority (line 117) | public int getPriority() {
method setPriority (line 121) | public void setPriority(final int priority) {
method equals (line 129) | @Override
method hashCode (line 146) | @Override
method toString (line 154) | @Override
method compareTo (line 159) | @Override
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/core/AllRules.java
class AllRules (line 10) | public class AllRules extends CompositeRule{
method allOf (line 15) | public static CompositeRule allOf(Rule... rules) {
method evaluate (line 21) | @Override
method execute (line 28) | @Override
method doApply (line 35) | @Override
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/core/AnyRules.java
class AnyRules (line 8) | public class AnyRules extends CompositeRule{
method anyOf (line 10) | public static CompositeRule anyOf(Rule... rules) {
method evaluate (line 16) | @Override
method execute (line 23) | @Override
method doApply (line 29) | @Override
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/core/CompositeRule.java
class CompositeRule (line 12) | public abstract class CompositeRule extends AbstractRule {
method priority (line 19) | public CompositeRule priority(int priority) {
method name (line 24) | public CompositeRule name(String name){
method CompositeRule (line 29) | public CompositeRule() {
method apply (line 33) | @Override
method doApply (line 39) | protected abstract boolean doApply(Facts facts);
method sort (line 41) | protected void sort(){
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/core/DefaultRule.java
class DefaultRule (line 33) | public class DefaultRule extends AbstractRule {
method DefaultRule (line 38) | public DefaultRule(Condition condition, Action action){
method DefaultRule (line 44) | public DefaultRule(Condition condition, List<Action> actions){
method DefaultRule (line 49) | public DefaultRule(String name, String description, int priority, Cond...
method evaluate (line 55) | @Override
method execute (line 60) | @Override
method apply (line 67) | @Override
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/core/DefaultRuleEngine.java
class DefaultRuleEngine (line 9) | public class DefaultRuleEngine implements RuleEngine {
method fire (line 12) | @Override
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/core/NaturalRules.java
class NaturalRules (line 13) | public class NaturalRules extends CompositeRule{
method of (line 16) | public static CompositeRule of(Rule... rules) {
method evaluate (line 22) | @Override
method execute (line 28) | @Override
method doApply (line 34) | @Override
FILE: cola-components/cola-component-ruleengine/src/main/java/com/alibaba/cola/ruleengine/core/RuleBuilder.java
class RuleBuilder (line 10) | public class RuleBuilder {
method name (line 25) | public RuleBuilder name(String name) {
method description (line 36) | public RuleBuilder description(String description) {
method priority (line 47) | public RuleBuilder priority(int priority) {
method when (line 58) | public RuleBuilder when(Condition condition) {
method then (line 69) | public RuleBuilder then(Action action) {
method build (line 79) | public Rule build() {
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/CompositeRuleTest.java
class CompositeRuleTest (line 11) | public class CompositeRuleTest {
method setUp (line 15) | @BeforeEach
method test_fizz_first (line 22) | @Test
method test_buzz_first (line 33) | @Test
method test_fizzBuzz_first (line 44) | @Test
method assembleRules (line 57) | private Rule assembleRules(int fizzPriority, int BuzzPriority, int Fiz...
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/FactsTest.java
class FactsTest (line 10) | public class FactsTest {
method factsMustHaveUniqueName (line 14) | @Test
method testAdd (line 24) | @Test
method testPut (line 35) | @Test
method testRemove (line 44) | @Test
method testRemoveByName (line 53) | @Test
method testGet (line 62) | @Test
method testGetFact (line 70) | @Test
method testAsMap (line 78) | @Test
method testClear (line 89) | @Test
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/FizzBuzz.java
class FizzBuzz (line 11) | public class FizzBuzz {
method main (line 12) | public static void main(String[] args) {
method assembleFizzBuzzRule (line 23) | public static Rule assembleFizzBuzzRule() {
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/HelloWorld.java
class HelloWorld (line 8) | public class HelloWorld {
method main (line 9) | public static void main(String[] args) {
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/PriorityTest.java
class PriorityTest (line 14) | public class PriorityTest {
method setUp (line 18) | @BeforeEach
method testNoPriority (line 24) | @Test
method testPriority (line 33) | @Test
method test_natural_rule (line 41) | @Test
class DummyRule (line 54) | static class DummyRule extends DefaultRule {
method DummyRule (line 57) | public DummyRule(int priority) {
method evaluate (line 61) | @Override
method execute (line 66) | @Override
method apply (line 71) | @Override
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/RuleBuilderTest.java
class RuleBuilderTest (line 9) | public class RuleBuilderTest {
method testFizzBuzz (line 11) | @Test
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/RuleEngineTest.java
class RuleEngineTest (line 9) | public class RuleEngineTest {
method testRuleEngine (line 11) | @Test
method testFizzBuzz (line 17) | @Test
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/fizzbuzz/FizzBuzzTest.java
class FizzBuzzTest (line 9) | public class FizzBuzzTest {
method num_given_1 (line 11) | @Test
method fizz_given_3 (line 21) | @Test
method buzz_given_5 (line 31) | @Test
method fizz_buzz_given_15 (line 41) | @Test
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/fizzbuzz/v1/FizzBuzz.java
class FizzBuzz (line 3) | public class FizzBuzz {
method count (line 4) | public static String count(int n){
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/fizzbuzz/v2/Action.java
type Action (line 3) | @FunctionalInterface
method execute (line 5) | String execute(int n);
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/fizzbuzz/v2/Condition.java
type Condition (line 5) | @FunctionalInterface
method evaluate (line 8) | boolean evaluate(int n);
method and (line 11) | default Condition and(Condition other) {
method or (line 19) | default Condition or(Condition other) {
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/fizzbuzz/v2/FizzBuzz.java
class FizzBuzz (line 9) | public class FizzBuzz {
method count (line 10) | public static String count(int i){
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/fizzbuzz/v2/Rule.java
type Rule (line 3) | @FunctionalInterface
method apply (line 5) | String apply(int n);
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/fizzbuzz/v2/SimpleRuleEngine.java
class SimpleRuleEngine (line 13) | public class SimpleRuleEngine {
method atom (line 14) | public static Rule atom(Condition condition, Action action){
method anyOf (line 18) | public static Rule anyOf(Rule... rules){
method allOf (line 22) | public static Rule allOf(Rule... rules){
method stringStream (line 26) | public static Stream<String> stringStream(int n, Rule[] rules){
FILE: cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/fizzbuzz/v2/TimesCondition.java
class TimesCondition (line 6) | public class TimesCondition {
method times (line 7) | public static Condition times(int i){
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/Action.java
type Action (line 10) | public interface Action<S, E, C> {
method execute (line 19) | public void execute(S from, S to, E event, C context);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/Condition.java
type Condition (line 9) | public interface Condition<C> {
method isSatisfied (line 15) | boolean isSatisfied(C context);
method name (line 17) | default String name(){
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/State.java
type State (line 18) | public interface State<S,E,C> extends Visitable{
method getId (line 25) | S getId();
method addTransition (line 33) | Transition<S,E,C> addTransition(E event, State<S, E, C> target, Transi...
method addTransitions (line 35) | List<Transition<S,E,C>> addTransitions(E event, List<State<S, E, C>> t...
method getEventTransitions (line 37) | List<Transition<S,E,C>> getEventTransitions(E event);
method getAllTransitions (line 39) | Collection<Transition<S,E,C>> getAllTransitions();
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/StateContext.java
type StateContext (line 9) | public interface StateContext<S, E, C> {
method getTransition (line 15) | Transition<S, E, C> getTransition();
method getStateMachine (line 22) | StateMachine<S, E, C> getStateMachine();
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/StateMachine.java
type StateMachine (line 15) | public interface StateMachine<S, E, C> extends Visitable{
method verify (line 23) | boolean verify(S sourceStateId,E event);
method fireEvent (line 33) | S fireEvent(S sourceState, E event, C ctx);
method fireParallelEvent (line 35) | List<S> fireParallelEvent(S sourceState, E event, C ctx);
method getMachineId (line 41) | String getMachineId();
method showStateMachine (line 46) | void showStateMachine();
method generatePlantUML (line 48) | String generatePlantUML();
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/StateMachineFactory.java
class StateMachineFactory (line 14) | public class StateMachineFactory {
method register (line 17) | public static <S, E, C> void register(StateMachine<S, E, C> stateMachi...
method get (line 25) | public static <S, E, C> StateMachine<S, E, C> get(String machineId){
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/Transition.java
type Transition (line 17) | public interface Transition<S, E, C>{
method getSource (line 23) | State<S,E,C> getSource();
method setSource (line 25) | void setSource(State<S, E, C> state);
method getEvent (line 27) | E getEvent();
method setEvent (line 29) | void setEvent(E event);
method setType (line 31) | void setType(TransitionType type);
method getTarget (line 37) | State<S,E,C> getTarget();
method setTarget (line 39) | void setTarget(State<S, E, C> state);
method getCondition (line 46) | Condition<C> getCondition();
method setCondition (line 48) | void setCondition(Condition<C> condition);
method getAction (line 50) | Action<S,E,C> getAction();
method setAction (line 52) | void setAction(Action<S, E, C> action);
method transit (line 60) | State<S, E, C> transit(C ctx, boolean checkCondition);
method verify (line 64) | void verify();
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/Visitable.java
type Visitable (line 9) | public interface Visitable {
method accept (line 10) | String accept(final Visitor visitor);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/Visitor.java
type Visitor (line 9) | public interface Visitor {
method visitOnEntry (line 17) | String visitOnEntry(StateMachine<?, ?, ?> visitable);
method visitOnExit (line 23) | String visitOnExit(StateMachine<?, ?, ?> visitable);
method visitOnEntry (line 29) | String visitOnEntry(State<?, ?, ?> visitable);
method visitOnExit (line 35) | String visitOnExit(State<?, ?, ?> visitable);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/AbstractParallelTransitionBuilder.java
class AbstractParallelTransitionBuilder (line 10) | abstract class AbstractParallelTransitionBuilder<S,E,C> implements Para...
method AbstractParallelTransitionBuilder (line 18) | public AbstractParallelTransitionBuilder(Map<S, State<S, E, C>> stateM...
method toAmong (line 22) | @Override
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/AbstractTransitionBuilder.java
class AbstractTransitionBuilder (line 26) | abstract class AbstractTransitionBuilder<S,E,C> implements From<S,E,C>,...
method AbstractTransitionBuilder (line 34) | public AbstractTransitionBuilder(Map<S, State<S, E, C>> stateMap, Tran...
method to (line 38) | @Override
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/AlertFailCallback.java
class AlertFailCallback (line 11) | public class AlertFailCallback<S, E, C> implements FailCallback<S, E, C> {
method onFail (line 13) | @Override
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/ExternalParallelTransitionBuilder.java
type ExternalParallelTransitionBuilder (line 4) | public interface ExternalParallelTransitionBuilder<S, E, C> {
method from (line 10) | ParallelFrom<S, E, C> from(S stateId);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/ExternalTransitionBuilder.java
type ExternalTransitionBuilder (line 9) | public interface ExternalTransitionBuilder<S, E, C> {
method from (line 15) | From<S, E, C> from(S stateId);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/ExternalTransitionsBuilder.java
type ExternalTransitionsBuilder (line 11) | public interface ExternalTransitionsBuilder<S, E, C> {
method fromAmong (line 12) | From<S, E, C> fromAmong(S... stateIds);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/FailCallback.java
type FailCallback (line 9) | @FunctionalInterface
method onFail (line 19) | void onFail(S sourceState, E event, C context);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/From.java
type From (line 9) | public interface From<S, E, C> {
method to (line 15) | To<S, E, C> to(S stateId);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/InternalTransitionBuilder.java
type InternalTransitionBuilder (line 9) | public interface InternalTransitionBuilder <S, E, C> {
method within (line 15) | To<S, E, C> within(S stateId);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/NumbFailCallback.java
class NumbFailCallback (line 9) | public class NumbFailCallback<S, E, C> implements FailCallback<S, E, C> {
method onFail (line 11) | @Override
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/On.java
type On (line 11) | public interface On<S, E, C> extends When<S, E, C>{
method when (line 17) | When<S, E, C> when(Condition<C> condition);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/ParallelFrom.java
type ParallelFrom (line 4) | public interface ParallelFrom<S, E, C> {
method toAmong (line 10) | To<S, E, C> toAmong(S ... stateIds);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/ParallelTransitionBuilderImpl.java
class ParallelTransitionBuilderImpl (line 13) | class ParallelTransitionBuilderImpl<S,E,C> extends AbstractParallelTrans...
method ParallelTransitionBuilderImpl (line 19) | public ParallelTransitionBuilderImpl(Map<S, State<S, E, C>> stateMap, ...
method from (line 23) | @Override
method when (line 29) | @Override
method on (line 37) | @Override
method perform (line 43) | @Override
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/StateMachineBuilder.java
type StateMachineBuilder (line 11) | public interface StateMachineBuilder<S, E, C> {
method externalTransition (line 17) | ExternalTransitionBuilder<S, E, C> externalTransition();
method externalTransitions (line 24) | ExternalTransitionsBuilder<S, E, C> externalTransitions();
method externalParallelTransition (line 30) | ExternalParallelTransitionBuilder<S, E, C> externalParallelTransition();
method internalTransition (line 37) | InternalTransitionBuilder<S, E, C> internalTransition();
method setFailCallback (line 44) | void setFailCallback(FailCallback<S, E, C> callback);
method build (line 46) | StateMachine<S, E, C> build(String machineId);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/StateMachineBuilderFactory.java
class StateMachineBuilderFactory (line 9) | public class StateMachineBuilderFactory {
method create (line 10) | public static <S, E, C> StateMachineBuilder<S, E, C> create(){
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/StateMachineBuilderImpl.java
class StateMachineBuilderImpl (line 18) | public class StateMachineBuilderImpl<S, E, C> implements StateMachineBui...
method externalTransition (line 27) | @Override
method externalTransitions (line 32) | @Override
method externalParallelTransition (line 37) | @Override
method internalTransition (line 42) | @Override
method setFailCallback (line 47) | @Override
method build (line 52) | @Override
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/To.java
type To (line 9) | public interface To<S, E, C> {
method on (line 15) | On<S, E, C> on(E event);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/TransitionBuilderImpl.java
class TransitionBuilderImpl (line 18) | class TransitionBuilderImpl<S,E,C> extends AbstractTransitionBuilder<S,E...
method TransitionBuilderImpl (line 24) | public TransitionBuilderImpl(Map<S, State<S, E, C>> stateMap, Transiti...
method from (line 28) | @Override
method within (line 34) | @Override
method when (line 40) | @Override
method on (line 46) | @Override
method perform (line 52) | @Override
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/TransitionsBuilderImpl.java
class TransitionsBuilderImpl (line 20) | public class TransitionsBuilderImpl<S,E,C> extends AbstractTransitionBui...
method TransitionsBuilderImpl (line 28) | public TransitionsBuilderImpl(Map<S, State<S, E, C>> stateMap, Transit...
method fromAmong (line 32) | @Override
method on (line 40) | @Override
method when (line 49) | @Override
method perform (line 57) | @Override
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/builder/When.java
type When (line 11) | public interface When<S, E, C>{
method perform (line 17) | void perform(Action<S, E, C> action);
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/exception/TransitionFailException.java
class TransitionFailException (line 7) | public class TransitionFailException extends RuntimeException {
method TransitionFailException (line 9) | public TransitionFailException(String errMsg) {
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/impl/Debugger.java
class Debugger (line 9) | public class Debugger {
method debug (line 13) | public static void debug(String message){
method enableDebug (line 19) | public static void enableDebug(){
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/impl/EventTransitions.java
class EventTransitions (line 17) | public class EventTransitions<S,E,C> {
method EventTransitions (line 20) | public EventTransitions(){
method put (line 24) | public void put(E event, Transition<S, E, C> transition){
method verify (line 42) | private void verify(List<Transition<S,E,C>> existingTransitions, Trans...
method get (line 50) | public List<Transition<S,E,C>> get(E event){
method allTransitions (line 54) | public List<Transition<S,E,C>> allTransitions(){
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/impl/PlantUMLVisitor.java
class PlantUMLVisitor (line 14) | public class PlantUMLVisitor implements Visitor {
method visitOnEntry (line 25) | @Override
method visitOnExit (line 30) | @Override
method visitOnEntry (line 35) | @Override
method visitOnExit (line 49) | @Override
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/impl/StateHelper.java
class StateHelper (line 15) | public class StateHelper {
method getState (line 16) | public static <S, E, C> State<S, E, C> getState(Map<S, State<S, E, C>>...
method getStates (line 24) | public static <C, E, S> List<State<S,E,C>> getStates(Map<S, State<S,E,...
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/impl/StateImpl.java
class StateImpl (line 17) | public class StateImpl<S,E,C> implements State<S,E,C> {
method StateImpl (line 21) | StateImpl(S stateId){
method addTransition (line 25) | @Override
method addTransitions (line 39) | @Override
method getEventTransitions (line 50) | @Override
method getAllTransitions (line 55) | @Override
method getId (line 60) | @Override
method accept (line 65) | @Override
method equals (line 72) | @Override
method toString (line 82) | @Override
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/impl/StateMachineException.java
class StateMachineException (line 9) | public class StateMachineException extends RuntimeException{
method StateMachineException (line 10) | public StateMachineException(String message){
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/impl/StateMachineImpl.java
class StateMachineImpl (line 23) | public class StateMachineImpl<S, E, C> implements StateMachine<S, E, C> {
method StateMachineImpl (line 33) | public StateMachineImpl(Map<S, State<S, E, C>> stateMap) {
method verify (line 37) | @Override
method fireEvent (line 48) | @Override
method fireParallelEvent (line 61) | @Override
method routeTransition (line 79) | private Transition<S, E, C> routeTransition(S sourceStateId, E event, ...
method routeTransitions (line 100) | private List<Transition<S,E,C>> routeTransitions(S sourceStateId, E ev...
method getState (line 120) | private State getState(S currentStateId) {
method isReady (line 129) | private void isReady() {
method accept (line 135) | @Override
method showStateMachine (line 146) | @Override
method generatePlantUML (line 152) | @Override
method getMachineId (line 158) | @Override
method setMachineId (line 163) | public void setMachineId(String machineId) {
method setReady (line 167) | public void setReady(boolean ready) {
method setFailCallback (line 171) | public void setFailCallback(FailCallback<S, E, C> failCallback) {
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/impl/SysOutVisitor.java
class SysOutVisitor (line 14) | public class SysOutVisitor implements Visitor {
method visitOnEntry (line 16) | @Override
method visitOnExit (line 23) | @Override
method visitOnEntry (line 30) | @Override
method visitOnExit (line 44) | @Override
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/impl/TransitionImpl.java
class TransitionImpl (line 16) | public class TransitionImpl<S,E,C> implements Transition<S,E,C> {
method getSource (line 30) | @Override
method setSource (line 35) | @Override
method getEvent (line 40) | @Override
method setEvent (line 45) | @Override
method setType (line 50) | @Override
method getTarget (line 55) | @Override
method setTarget (line 60) | @Override
method getCondition (line 65) | @Override
method setCondition (line 70) | @Override
method getAction (line 75) | @Override
method setAction (line 80) | @Override
method transit (line 85) | @Override
method toString (line 100) | @Override
method equals (line 105) | @Override
method verify (line 118) | @Override
FILE: cola-components/cola-component-statemachine/src/main/java/com/alibaba/cola/statemachine/impl/TransitionType.java
type TransitionType (line 9) | public enum TransitionType {
FILE: cola-components/cola-component-statemachine/src/test/java/com/alibaba/cola/test/StateMachineChoiceTest.java
class StateMachineChoiceTest (line 16) | public class StateMachineChoiceTest {
class Context (line 18) | static class Context{
method Context (line 21) | public Context(String condition){
method getCondition (line 25) | public String getCondition() {
method testChoice (line 36) | @Test
method checkCondition1 (line 66) | private Condition<Context> checkCondition1() {
method checkCondition2 (line 70) | private Condition<Context> checkCondition2() {
method checkCondition3 (line 74) | private Condition<Context> checkCondition3() {
method doAction (line 78) | private Action<StateMachineTest.States, StateMachineTest.Events, Conte...
FILE: cola-components/cola-component-statemachine/src/test/java/com/alibaba/cola/test/StateMachinePlantUMLTest.java
class StateMachinePlantUMLTest (line 23) | public class StateMachinePlantUMLTest {
type PriceAdjustmentTaskStatusEnum (line 25) | static enum PriceAdjustmentTaskStatusEnum {
type PriceAdjustmentTaskEventEnum (line 48) | static enum PriceAdjustmentTaskEventEnum {
method isSupplierTimeout (line 74) | public boolean isSupplierTimeout() {
method isSystemEvent (line 78) | public boolean isSystemEvent(){
method init (line 86) | @BeforeEach
method testPlantUML (line 91) | @Test
method checkCondition (line 177) | private Condition<StateMachineTest.Context> checkCondition() {
method doAction (line 181) | private Action<PriceAdjustmentTaskStatusEnum, PriceAdjustmentTaskEvent...
FILE: cola-components/cola-component-statemachine/src/test/java/com/alibaba/cola/test/StateMachineTest.java
class StateMachineTest (line 23) | public class StateMachineTest {
type States (line 27) | static enum States {
type Events (line 34) | static enum Events {
class Context (line 42) | static class Context {
method testExternalNormal (line 47) | @Test
method testFail (line 62) | @Test
method testVerify (line 79) | @Test
method testExternalTransitionsNormal (line 95) | @Test
method testInternalNormal (line 110) | @Test
method testExternalInternalNormal (line 125) | @Test
method buildStateMachine (line 140) | private StateMachine<States, Events, Context> buildStateMachine(String...
method testMultiThread (line 183) | @Test
method testParallel (line 215) | @Test
method checkCondition (line 242) | private Condition<Context> checkCondition() {
method doAction (line 252) | private Action<States, Events, Context> doAction() {
FILE: cola-components/cola-component-statemachine/src/test/java/com/alibaba/cola/test/StateMachineUnNormalTest.java
class StateMachineUnNormalTest (line 18) | public class StateMachineUnNormalTest {
method testConditionNotMeet (line 20) | @Test
method testDuplicatedTransition (line 36) | @Test
method testDuplicateMachine (line 56) | @Test
method checkCondition (line 72) | private Condition<StateMachineTest.Context> checkCondition() {
method checkConditionFalse (line 76) | private Condition<StateMachineTest.Context> checkConditionFalse() {
method doAction (line 80) | private Action<StateMachineTest.States, StateMachineTest.Events, State...
FILE: cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/BeanMetaUtils.java
class BeanMetaUtils (line 12) | public class BeanMetaUtils {
method findMethod (line 13) | public static Method findMethod(Class clazz, Class<? extends Annotatio...
FILE: cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/TestExecutor.java
class TestExecutor (line 25) | public class TestExecutor {
method TestExecutor (line 30) | public TestExecutor(Launcher launcher) {
method execute (line 34) | public void execute(TestClassRunCmd cmd) throws Exception {
method execute (line 39) | public void execute(TestMethodRunCmd cmd) throws Exception {
method runMethodTest (line 44) | private void runMethodTest(TestMethodRunCmd cmd, Class<?> testClz, Str...
method extractParamTypeName (line 58) | private String extractParamTypeName(Class<?> testClz, String methodNam...
method runClassTest (line 70) | private void runClassTest(TestClassRunCmd cmd, Class<?> testClz) {
class MyTestExecutionListener (line 81) | static class MyTestExecutionListener implements TestExecutionListener {
method executionFinished (line 82) | @Override
FILE: cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/TestsContainer.java
class TestsContainer (line 28) | public class TestsContainer {
method start (line 43) | public static void start(ApplicationContext context, Launcher launcher) {
method start (line 58) | public static void start(Launcher launcher) {
method start (line 67) | public static void start(ApplicationContext context) {
method start (line 74) | public static void start() {
method execute (line 78) | public static void execute(String input) {
method getTestExecutor (line 92) | public static TestExecutor getTestExecutor() {
method monitorConsole (line 96) | private static void monitorConsole() {
FILE: cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/command/AbstractCommand.java
class AbstractCommand (line 15) | public abstract class AbstractCommand {
method AbstractCommand (line 28) | public AbstractCommand(String cmdRaw){
method execute (line 36) | public void execute(){
method cleanContext (line 45) | protected void cleanContext(){}
method initParser (line 47) | protected void initParser(Options options){}
method action (line 49) | protected abstract void action();
method parse (line 51) | public CommandLine parse(){
method isEclipseMethod (line 60) | public boolean isEclipseMethod(String input) {
method isIdeaMethod (line 64) | public boolean isIdeaMethod(String input) {
method getCommandLine (line 68) | public CommandLine getCommandLine() {
method createCmd (line 72) | public static AbstractCommand createCmd(String cmdRaw){
FILE: cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/command/CommandEnum.java
type CommandEnum (line 9) | public enum CommandEnum {
method CommandEnum (line 18) | CommandEnum(String cmd, String desc){
method getCmd (line 23) | public String getCmd() {
method setCmd (line 27) | public void setCmd(String cmd) {
method getDesc (line 31) | public String getDesc() {
method setDesc (line 35) | public void setDesc(String desc) {
FILE: cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/command/GuideCmd.java
class GuideCmd (line 11) | public class GuideCmd extends AbstractCommand {
method GuideCmd (line 17) | public GuideCmd(String cmdRaw) {
method execute (line 21) | @Override
method action (line 26) | @Override
FILE: cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/command/TestClassRunCmd.java
class TestClassRunCmd (line 11) | public class TestClassRunCmd extends AbstractCommand {
method TestClassRunCmd (line 14) | public TestClassRunCmd(String cmdRaw) {
method action (line 19) | @Override
method getClassName (line 28) | public String getClassName() {
FILE: cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/command/TestMethodRunCmd.java
class TestMethodRunCmd (line 17) | public class TestMethodRunCmd extends AbstractCommand {
method TestMethodRunCmd (line 28) | public TestMethodRunCmd(String cmdRaw) {
method action (line 33) | @Override
method initParser (line 42) | @Override
method getMethodName (line 53) | public String getMethodName() {
method getClassName (line 57) | public String getClassName() {
method isSegmentRecord (line 61) | public boolean isSegmentRecord() {
method parseCommand (line 65) | private void parseCommand(){
FILE: cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/Demo.java
class Demo (line 10) | @Slf4j
method before (line 13) | @BeforeEach
method testOne (line 18) | @Test
method testTwo (line 25) | @Test
method testThree (line 30) | @Test
method testParam (line 35) | @Test
method after (line 40) | @AfterEach
FILE: cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/DemoWithExtension.java
class DemoWithExtension (line 13) | @SpringBootTest(classes = SpringBootConfig.class)
method before (line 20) | @BeforeEach
method testParam (line 25) | @Test
method testMethod1 (line 30) | @Test
method testMethod2 (line 37) | @Test
method after (line 44) | @AfterEach
class LoggingExtension (line 51) | class LoggingExtension implements BeforeEachCallback, ParameterResolver {
method beforeEach (line 52) | @Override
method supportsParameter (line 57) | @Override
method resolveParameter (line 62) | @Override
FILE: cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/SpringBootConfig.java
class SpringBootConfig (line 5) | @SpringBootApplication
FILE: cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/SpringConfig.java
class SpringConfig (line 13) | @Configuration
method generateDemo (line 17) | @Bean("demo")
FILE: cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/TestsContainerTest.java
class TestsContainerTest (line 12) | public class TestsContainerTest {
method main (line 13) | public static void main(String[] args) {
FILE: cola-components/cola-component-unittest/src/main/java/com/alibaba/cola/unittest/FixtureLoader.java
class FixtureLoader (line 11) | @Slf4j
method loadResource (line 14) | public static String loadResource(String resourcePath) {
FILE: cola-components/cola-component-unittest/src/main/java/com/alibaba/cola/unittest/kafka/KafkaExtension.java
class KafkaExtension (line 23) | @Slf4j
method beforeAll (line 29) | @Override
method beforeEach (line 41) | @Override
method createProducer (line 65) | public <K, V> KafkaTemplate<K, V> createProducer(Serializer<K> keySeri...
method createProducer (line 70) | public <V> KafkaTemplate<String, V> createProducer() {
FILE: cola-components/cola-component-unittest/src/main/java/com/alibaba/cola/unittest/kafka/MessageData.java
class MessageData (line 10) | @Data
FILE: cola-components/cola-component-unittest/src/main/java/com/alibaba/cola/unittest/redis/RedisData.java
class RedisData (line 13) | @Data
FILE: cola-components/cola-component-unittest/src/main/java/com/alibaba/cola/unittest/redis/RedisExtension.java
class RedisExtension (line 18) | @Slf4j
method afterEach (line 26) | @Override
method await (line 47) | private void await(long interval, long timeout, String key) {
method beforeEach (line 52) | @Override
method processJsonNode (line 66) | private void processJsonNode(String key, JsonNode jsonNode) {
method beforeAll (line 95) | @Override
FILE: cola-components/cola-component-unittest/src/main/java/com/alibaba/cola/unittest/wiremock/WireMockRegister.java
class WireMockRegister (line 7) | public class WireMockRegister {
method registerStub (line 9) | public static void registerStub(WireMock wireMock, String resourcePath){
FILE: cola-components/cola-component-unittest/src/test/java/com/alibaba/cola/unittest/Application.java
class Application (line 12) | @SpringBootApplication(scanBasePackages = {"com.alibaba.cola.unittest"})
method main (line 15) | public static void main(String[] args) {
FILE: cola-components/cola-component-unittest/src/test/java/com/alibaba/cola/unittest/TestsContainerBoot.java
class TestsContainerBoot (line 5) | public class TestsContainerBoot {
method main (line 6) | public static void main(String[] args) {
FILE: cola-components/cola-component-unittest/src/test/java/com/alibaba/cola/unittest/db/DBSetupTest.java
class DBSetupTest (line 16) | @SpringBootTest
method testFind (line 23) | @Test
FILE: cola-components/cola-component-unittest/src/test/java/com/alibaba/cola/unittest/db/Person.java
class Person (line 8) | @Entity
method getId (line 22) | public int getId() {
method getTitle (line 26) | public String getTitle() {
method setTitle (line 30) | public void setTitle(String title) {
method getFirstName (line 34) | public String getFirstName() {
method setFirstName (line 38) | public void setFirstName(String firstName) {
method getLastName (line 42) | public String getLastName() {
method setLastName (line 46) | public void setLastName(String lastName) {
method toString (line 50) | @Override
FILE: cola-components/cola-component-unittest/src/test/java/com/alibaba/cola/unittest/db/PersonRepository.java
class PersonRepository (line 11) | @Repository
method find (line 18) | @SuppressWarnings("unchecked")
method remove (line 25) | public void remove(int personId) {
FILE: cola-components/cola-component-unittest/src/test/java/com/alibaba/cola/unittest/kafka/KafkaConsumer.java
class KafkaConsumer (line 8) | @Slf4j
method receive (line 16) | @KafkaListener(topics = "${test.topic}", groupId = "testGroup")
method processBiz (line 26) | private void processBiz() {
method getPayload (line 35) | public String getPayload() {
FILE: cola-components/cola-component-unittest/src/test/java/com/alibaba/cola/unittest/kafka/KafkaExtensionTest.java
class KafkaExtensionTest (line 13) | @Slf4j
method testProduceMessage (line 22) | @Test
FILE: cola-components/cola-component-unittest/src/test/java/com/alibaba/cola/unittest/redis/RedisExtensionTest.java
class RedisExtensionTest (line 10) | @ExtendWith(RedisExtension.class)
method testString (line 22) | @Test
method testArray (line 39) | @Test
method testHash (line 66) | @Test
method testStringExpect (line 75) | @Test
method testVoid (line 82) | @Test
FILE: cola-components/cola-component-unittest/src/test/java/com/alibaba/cola/unittest/wiremock/Account.java
class Account (line 5) | @Data
FILE: cola-components/cola-component-unittest/src/test/java/com/alibaba/cola/unittest/wiremock/WireMockBasicTest.java
class WireMockBasicTest (line 15) | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
method testWireMockBasic (line 23) | @Test
method testWireMockStub (line 35) | @Test
method testWireMockAccount (line 50) | @Test
FILE: cola-components/dev-util-archetypes/cola-normal-component-archetype/src/main/resources/archetype-resources/src/main/java/Dummy.java
class Dummy (line 12) | public abstract class Dummy{
FILE: cola-components/dev-util-archetypes/cola-starter-component-archetype/src/main/resources/archetype-resources/src/main/java/CatchLogAspect.java
class CatchLogAspect (line 20) | @Aspect
method pointcut (line 27) | @Pointcut("@within(CatchAndLog) && execution(public * *(..))")
method around (line 31) | @Around(value = "pointcut()")
method handleException (line 51) | private Object handleException(ProceedingJoinPoint joinPoint, Throwabl...
method logResponse (line 59) | private void logResponse(long startTime, Object response) {
method logRequest (line 71) | private void logRequest(ProceedingJoinPoint joinPoint) {
FILE: cola-components/dev-util-archetypes/cola-starter-component-archetype/src/main/resources/archetype-resources/src/main/java/CatchLogAutoConfiguration.java
class CatchLogAutoConfiguration (line 17) | @Configuration
method initCatchLogAspect (line 21) | @Bean
FILE: cola-components/dev-util-archetypes/cola-starter-component-archetype/src/main/resources/archetype-resources/src/test/java/test/Application.java
class Application (line 15) | @SpringBootApplication(scanBasePackages = {"${package}"})
method main (line 18) | public static void main(String[] args) {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/Application.java
class Application (line 6) | @SpringBootApplication
method main (line 9) | public static void main(String[] args) {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/adapter/ChargeController.java
class ChargeController (line 10) | @RestController
method begin (line 17) | @PostMapping("session/{sessionId}/begin")
method charge (line 26) | @PostMapping("session/{sessionId}/charge")
method end (line 34) | @PostMapping("session/{sessionId}/end")
method getChargeRecord (line 42) | @GetMapping("{sessionId}/chargeRecords")
FILE: cola-samples/charge/src/main/java/com/huawei/charging/application/ChargeServiceI.java
type ChargeServiceI (line 5) | public interface ChargeServiceI {
method begin (line 6) | Response begin(BeginSessionRequest request);
method charge (line 8) | Response charge(ChargeRequest request);
method end (line 10) | Response end(EndSessionRequest request);
method listChargeRecords (line 12) | MultiResponse<ChargeRecordDto> listChargeRecords(String sessionId);
FILE: cola-samples/charge/src/main/java/com/huawei/charging/application/ChargeServiceImpl.java
class ChargeServiceImpl (line 20) | @Service
method begin (line 36) | @Override
method charge (line 45) | @Override
method chargeCalling (line 58) | private void chargeCalling(Session session, int durationToCharge, List...
method chargeCalled (line 66) | private void chargeCalled(Session session, int durationToCharge, List<...
method end (line 74) | @Override
method listChargeRecords (line 81) | @Override
FILE: cola-samples/charge/src/main/java/com/huawei/charging/application/dto/BeginSessionRequest.java
class BeginSessionRequest (line 6) | @Data
method toSession (line 24) | public Session toSession(){
method BeginSessionRequest (line 28) | public BeginSessionRequest() {
method BeginSessionRequest (line 31) | public BeginSessionRequest(String sessionId, long callingPhoneNo, long...
FILE: cola-samples/charge/src/main/java/com/huawei/charging/application/dto/ChargeRecordDto.java
class ChargeRecordDto (line 7) | public class ChargeRecordDto {
method fromEntity (line 16) | public static ChargeRecordDto fromEntity(ChargeRecord chargeRecord){
FILE: cola-samples/charge/src/main/java/com/huawei/charging/application/dto/ChargeRequest.java
class ChargeRequest (line 5) | @Data
method ChargeRequest (line 15) | public ChargeRequest() {
method ChargeRequest (line 18) | public ChargeRequest(String sessionId, int duration) {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/application/dto/EndSessionRequest.java
class EndSessionRequest (line 5) | @Data
method toChargeRequest (line 14) | public ChargeRequest toChargeRequest() {
method EndSessionRequest (line 21) | public EndSessionRequest() {
method EndSessionRequest (line 24) | public EndSessionRequest(String sessionId, int duration) {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/application/dto/MultiResponse.java
class MultiResponse (line 8) | public class MultiResponse<T> extends Response {
method getData (line 14) | public List<T> getData() {
method setData (line 24) | public void setData(Collection<T> data) {
method isEmpty (line 28) | public boolean isEmpty() {
method isNotEmpty (line 32) | public boolean isNotEmpty() {
method buildSuccess (line 36) | public static MultiResponse buildSuccess() {
method buildFailure (line 42) | public static MultiResponse buildFailure(String errCode, String errMes...
method of (line 50) | public static <T> MultiResponse<T> of(Collection<T> data) {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/application/dto/Response.java
class Response (line 3) | public class Response {
method isSuccess (line 10) | public boolean isSuccess() {
method setSuccess (line 14) | public void setSuccess(boolean success) {
method getErrCode (line 18) | public String getErrCode() {
method setErrCode (line 22) | public void setErrCode(String errCode) {
method getErrMessage (line 26) | public String getErrMessage() {
method setErrMessage (line 30) | public void setErrMessage(String errMessage) {
method toString (line 34) | @Override
method buildSuccess (line 39) | public static Response buildSuccess() {
method buildFailure (line 45) | public static Response buildFailure(String errCode, String errMessage) {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/application/dto/SingleResponse.java
class SingleResponse (line 3) | public class SingleResponse<T> extends Response {
method getData (line 9) | public T getData() {
method setData (line 13) | public void setData(T data) {
method buildSuccess (line 17) | public static SingleResponse buildSuccess() {
method buildFailure (line 23) | public static SingleResponse buildFailure(String errCode, String errMe...
method of (line 31) | public static <T> SingleResponse<T> of(T data) {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/ApplicationContextHelper.java
class ApplicationContextHelper (line 8) | @Component
method setApplicationContext (line 12) | @Override
method getBean (line 17) | public static <T> T getBean(Class<T> targetClz) {
method getBean (line 37) | public static Object getBean(String claz) {
method getBean (line 41) | public static <T> T getBean(String name, Class<T> requiredType) {
method getBean (line 45) | public static <T> T getBean(Class<T> requiredType, Object... params) {
method getApplicationContext (line 49) | public static ApplicationContext getApplicationContext() {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/BizException.java
class BizException (line 3) | public class BizException extends RuntimeException{
method BizException (line 5) | public BizException(String errMessage) {
method of (line 9) | public static BizException of(String errMessage){
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/DomainFactory.java
class DomainFactory (line 3) | public class DomainFactory {
method get (line 5) | public static <T> T get(Class<T> entityClz){
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/account/Account.java
class Account (line 22) | @Data
method Account (line 47) | public Account(){
method Account (line 51) | public Account(long phoneNo, Money amount, List<ChargePlan> chargePlan...
method valueOf (line 57) | public static Account valueOf(long phoneNo, Money amount) {
method checkRemaining (line 68) | public void checkRemaining() {
method charge (line 74) | public List<ChargeRecord> charge(ChargeContext ctx) {
method toString (line 84) | @Override
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/account/AccountDomainService.java
class AccountDomainService (line 9) | @Component
method canSessionStart (line 15) | public void canSessionStart(Session session){
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/CallType.java
type CallType (line 3) | public enum CallType {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/ChargeContext.java
class ChargeContext (line 6) | @Data
method ChargeContext (line 38) | public ChargeContext(CallType callType, long phoneNo, long otherSidePh...
method needCharge (line 45) | public boolean needCharge(){
method isCalling (line 49) | public boolean isCalling(){
method isCalled (line 53) | public boolean isCalled(){
method toString (line 57) | @Override
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/ChargeRecord.java
class ChargeRecord (line 9) | @Entity
method ChargeRecord (line 47) | public ChargeRecord() {
method ChargeRecord (line 50) | public ChargeRecord(long phoneNo, CallType callType, int chargeDuratio...
method toString (line 58) | @Override
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/Money.java
class Money (line 11) | @Data
method Money (line 19) | public Money(int amount) {
method of (line 23) | public static Money of(int amount){
method isLessThan (line 27) | public boolean isLessThan(Money money){
method minus (line 31) | public void minus(Money money){
method equals (line 35) | @Override
method hashCode (line 43) | @Override
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/MoneyConverter.java
class MoneyConverter (line 7) | @Converter(autoApply = true)
method convertToDatabaseColumn (line 9) | @Override
method convertToEntityAttribute (line 14) | @Override
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/Session.java
class Session (line 8) | @Data
method Session (line 33) | public Session(String sessionId, long callingPhoneNo, long calledPhone...
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargeplan/BasicChargePlan.java
class BasicChargePlan (line 3) | public class BasicChargePlan extends ChargePlan<BasicChargePlan.BasicCha...
method BasicChargePlan (line 5) | public BasicChargePlan(){
method getResource (line 9) | @Override
method getType (line 14) | @Override
class BasicChargeFee (line 19) | public static class BasicChargeFee implements Resource{
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargeplan/ChargePlan.java
class ChargePlan (line 3) | public abstract class ChargePlan<T extends Resource> implements Comparab...
method getResource (line 7) | public abstract T getResource();
method getType (line 9) | public abstract ChargePlanType getType();
method ChargePlan (line 11) | public ChargePlan(){
method compareTo (line 19) | @Override
method toString (line 24) | @Override
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargeplan/ChargePlanType.java
type ChargePlanType (line 3) | public enum ChargePlanType {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargeplan/FamilyChargePlan.java
class FamilyChargePlan (line 6) | public class FamilyChargePlan extends ChargePlan<FamilyChargePlan.Family...
method FamilyChargePlan (line 8) | public FamilyChargePlan() {
method getResource (line 12) | @Override
method getType (line 17) | @Override
class FamilyMember (line 22) | public static class FamilyMember implements Resource{
method FamilyMember (line 28) | public FamilyMember() {
method isMember (line 33) | public boolean isMember(long phoneNo) {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargeplan/FixedTimeChangePlan.java
class FixedTimeChangePlan (line 3) | public class FixedTimeChangePlan extends ChargePlan<FixedTimeChangePlan....
method FixedTimeChangePlan (line 5) | public FixedTimeChangePlan() {
method getResource (line 9) | @Override
method getType (line 14) | @Override
class FreeCallTime (line 19) | public static class FreeCallTime implements Resource{
method isCallingTimeRemaining (line 23) | public boolean isCallingTimeRemaining(){
method chargeFreeCallingTime (line 32) | public int chargeFreeCallingTime(int duration){
method isCalledTimeRemaining (line 44) | public boolean isCalledTimeRemaining(){
method chargeFreeCalledTime (line 53) | public int chargeFreeCalledTime(int duration){
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargeplan/Resource.java
type Resource (line 6) | public interface Resource {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargerule/AbstractChargeRule.java
class AbstractChargeRule (line 5) | public abstract class AbstractChargeRule implements ChargeRule{
method belongsTo (line 8) | @Override
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargerule/BasicChargeRule.java
class BasicChargeRule (line 9) | @Component
method doCharge (line 12) | @Override
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargerule/ChargeRule.java
type ChargeRule (line 7) | public interface ChargeRule {
method doCharge (line 8) | ChargeRecord doCharge(ChargeContext ctx);
method belongsTo (line 10) | void belongsTo(ChargePlan chargePlan);
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargerule/ChargeRuleFactory.java
class ChargeRuleFactory (line 11) | public class ChargeRuleFactory {
method get (line 12) | public static CompositeChargeRule get(List<ChargePlan> chargePlanList) {
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargerule/CompositeChargeRule.java
class CompositeChargeRule (line 14) | public class CompositeChargeRule {
method doCharge (line 17) | public List<ChargeRecord> doCharge(ChargeContext chargeContext){
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargerule/FamilyChargeRule.java
class FamilyChargeRule (line 11) | @Component
method doCharge (line 15) | @Override
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/charge/chargerule/FixedTimeChargeRule.java
class FixedTimeChargeRule (line 11) | @Component
method doCharge (line 14) | @Override
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/gateway/AccountGateway.java
type AccountGateway (line 13) | public interface AccountGateway {
method getAccount (line 21) | Account getAccount(long phoneNo);
method sync (line 29) | void sync(long phoneNo, List<ChargeRecord> records);
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/gateway/ChargeGateway.java
type ChargeGateway (line 9) | @Repository
method findBySessionId (line 11) | public List<ChargeRecord> findBySessionId(String sessionId);
method getBySessionId (line 13) | public ChargeRecord getBySessionId(String sessionId);
method findByPhoneNo (line 15) | public List<ChargeRecord> findByPhoneNo(long phoneNo);
FILE: cola-samples/charge/src/main/java/com/huawei/charging/domain/gateway/SessionGateway.java
type SessionGateway (line 5) | public interface SessionGateway {
method create (line 7) | void create(Session session);
method get (line 9) | Session get(String sessionId);
method end (line 11) | void end(String sessionId);
FILE: cola-samples/charge/src/main/java/com/huawei/charging/infrastructure/AccountGatewayImpl.java
class AccountGatewayImpl (line 19) | @Component
method getAccount (line 30) | @Override
method sync (line 41) | @Override
FILE: cola-samples/charge/src/main/java/com/huawei/charging/infrastructure/RestClientBean.java
class RestClientBean (line 8) | @Configuration
method restClient (line 14) | @Bean
FILE: cola-samples/charge/src/main/java/com/huawei/charging/infrastructure/SessionGatewayImpl.java
class SessionGatewayImpl (line 11) | @Component
method create (line 15) | @Override
method get (line 20) | @Override
method end (line 25) | @Override
FILE: cola-samples/charge/src/test/java/com/huawei/charging/CleanArchTest.java
class CleanArchTest (line 5) | public class CleanArchTest {
method protect_clean_arch (line 6) | @Test
FILE: cola-samples/charge/src/test/java/com/huawei/charging/TestsContainerBoot.java
class TestsContainerBoot (line 5) | public class TestsContainerBoot {
method main (line 6) | public static void main(String[] args) {
FILE: cola-samples/charge/src/test/java/com/huawei/charging/application/ChargeServiceTest.java
class ChargeServiceTest (line 19) | @SpringBootTest
method test_session_create (line 34) | @Test
method test_remaining_insufficient (line 49) | @Test
FILE: cola-samples/charge/src/test/java/com/huawei/charging/domain/ChargeRecordPlanTest.java
class ChargeRecordPlanTest (line 16) | public class ChargeRecordPlanTest {
method test_priority (line 18) | @Test
FILE: cola-samples/charge/src/test/java/com/huawei/charging/domain/ChargeRecordRuleTest.java
class ChargeRecordRuleTest (line 19) | public class ChargeRecordRuleTest {
method test_basic_charge_rule (line 21) | @Test
method test_family_charge_rule (line 41) | @Test
method test_fixed_time_charge_rule (line 61) | @Test
FILE: cola-samples/charge/src/test/java/com/huawei/charging/domain/CompositeChargeRuleTestRecord.java
class CompositeChargeRuleTestRecord (line 20) | @SpringBootTest
method test_basic_and_fixedTime_charge_rule (line 27) | @Test
method test_basic_and_family_charge_rule (line 48) | @Test
method test_all_charge_rule (line 69) | @Test
FILE: cola-samples/charge/src/test/java/com/huawei/charging/infrastructure/AccountGatewayTest.java
class AccountGatewayTest (line 15) | @SpringBootTest
method testGetAccount (line 23) | @Test
FILE: cola-samples/charge/src/test/java/com/huawei/charging/infrastructure/ChargeRecordRepoTest.java
class ChargeRecordRepoTest (line 20) | @SpringBootTest
method setup (line 27) | @BeforeEach
method testSave (line 32) | @Test
method testSaveList (line 45) | @Test
FILE: cola-samples/charge/src/test/java/com/huawei/charging/infrastructure/FixtureLoader.java
class FixtureLoader (line 11) | public class FixtureLoader {
method loadResource (line 13) | public static String loadResource(String resourcePath) {
FILE: cola-samples/charge/src/test/java/com/huawei/charging/infrastructure/JSONTest.java
class JSONTest (line 8) | public class JSONTest {
method testJsonBind (line 10) | @Test
FILE: cola-samples/charge/src/test/java/com/huawei/charging/infrastructure/SpingBootConfTest.java
class SpingBootConfTest (line 11) | @SpringBootTest
method test (line 34) | @Test
FILE: cola-samples/charge/src/test/java/com/huawei/charging/infrastructure/WireMockBasicTest.java
class WireMockBasicTest (line 19) | @SpringBootTest(classes = Application.class, webEnvironment = SpringBoot...
method testWireMockBasic (line 27) | @Test
method testWireMockStub (line 39) | @Test
method testWireMockAccount (line 55) | @Test
FILE: cola-samples/charge/src/test/java/com/huawei/charging/infrastructure/WireMockRegister.java
class WireMockRegister (line 6) | public class WireMockRegister {
method registerStub (line 8) | public static void registerStub(WireMock wireMock, String resourcePath){
FILE: cola-samples/craftsman/craftsman-adapter/src/main/java/com/alibaba/craftsman/web/MetricsController.java
class MetricsController (line 12) | @RestController
method listATAMetrics (line 18) | @GetMapping(value = "/metrics/ata")
method addATAMetric (line 25) | @PostMapping(value = "/metrics/ata")
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/ATAMetricAddCmdExe.java
class ATAMetricAddCmdExe (line 20) | @Component
method execute (line 26) | public Response execute(ATAMetricAddCmd cmd) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/CodeReviewMetricAddCmdExe.java
class CodeReviewMetricAddCmdExe (line 20) | @Component
method execute (line 26) | public Response execute(CodeReviewMetricAddCmd cmd) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/MetricDeleteCmdExe.java
class MetricDeleteCmdExe (line 16) | @Component
method execute (line 22) | public Response execute(MetricDeleteCmd cmd) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/MiscMetricAddCmdExe.java
class MiscMetricAddCmdExe (line 21) | @Component
method execute (line 27) | public Response execute(MiscMetricAddCmd cmd) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/PaperMetricAddCmdExe.java
class PaperMetricAddCmdExe (line 20) | @Component
method execute (line 26) | public Response execute(PaperMetricAddCmd cmd) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/PatentMetricAddCmdExe.java
class PatentMetricAddCmdExe (line 22) | @Component
method execute (line 28) | public Response execute(PatentMetricAddCmd cmd) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/RefactoringMetricAddCmdExe.java
class RefactoringMetricAddCmdExe (line 21) | @Component
method execute (line 27) | public Response execute(RefactoringMetricAddCmd cmd) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/RefreshScoreCmdExe.java
class RefreshScoreCmdExe (line 21) | @Component
method execute (line 30) | public Response execute(RefreshScoreCmd cmd) {
method getUserProfile (line 37) | private UserProfile getUserProfile(RefreshScoreCmd cmd) {
method calculateScore (line 43) | private void calculateScore(UserProfile userProfile) {
method loadAppQualityMetrics (line 51) | private void loadAppQualityMetrics(UserProfile userProfile) {
method loadDevQualityMetrics (line 57) | private void loadDevQualityMetrics(UserProfile userProfile) {
method loadContributionMetrics (line 63) | private void loadContributionMetrics(UserProfile userProfile) {
method loadInfluenceMetric (line 69) | private void loadInfluenceMetric(UserProfile userProfile) {
method update (line 75) | private void update(UserProfile userProfile) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/SharingMetricAddCmdExe.java
class SharingMetricAddCmdExe (line 22) | @Component
method execute (line 28) | public Response execute(SharingMetricAddCmd cmd) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/UserProfileAddCmdExe.java
class UserProfileAddCmdExe (line 18) | @Component
method execute (line 24) | public Response execute(UserProfileAddCmd cmd) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/UserProfileUpdateCmdExe.java
class UserProfileUpdateCmdExe (line 12) | @Component
method execute (line 18) | public Response execute(UserProfileUpdateCmd cmd) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/query/ATAMetricQryExe.java
class ATAMetricQryExe (line 16) | @Component
method execute (line 22) | public MultiResponse<ATAMetricCO> execute(ATAMetricQry cmd) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/query/UserProfileGetQryExe.java
class UserProfileGetQryExe (line 13) | @Component
method execute (line 19) | public SingleResponse<UserProfileCO> execute(UserProfileGetQry qry) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/command/query/UserProfileListQryExe.java
class UserProfileListQryExe (line 15) | @Component
method execute (line 21) | public MultiResponse<UserProfileCO> execute(UserProfileListQry qry) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/event/handler/MetricItemCreatedHandler.java
class MetricItemCreatedHandler (line 11) | @CatchAndLog
method execute (line 17) | public Response execute(MetricItemCreatedEvent event) {
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/service/MetricsServiceImpl.java
class MetricsServiceImpl (line 21) | @Service
method addATAMetric (line 45) | @Override
method addSharingMetric (line 50) | @Override
method addPatentMetric (line 55) | @Override
method addPaperMetric (line 60) | @Override
method addRefactoringMetric (line 65) | @Override
method addMiscMetric (line 70) | @Override
method addCodeReviewMetric (line 75) | @Override
method deleteMetric (line 80) | @Override
method listATAMetrics (line 85) | @Override
FILE: cola-samples/craftsman/craftsman-app/src/main/java/com/alibaba/craftsman/service/UserProfileServiceImpl.java
class UserProfileServiceImpl (line 25) | @Service
method addUserProfile (line 40) | @Override
method updateUserProfile (line 45) | @Override
method refreshScore (line 50) | @Override
method getUserProfileBy (line 55) | @Override
method listUserProfileBy (line 60) | @Override
FILE: cola-samples/craftsman/craftsman-app/src/test/java/com/alibaba/craftsman/app/ContextInterceptorTest.java
class ContextInterceptorTest (line 13) | public class ContextInterceptorTest {
method testNoOperatorContext (line 15) | @Test
method testOperatorContext (line 24) | @Test
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/api/MetricsServiceI.java
type MetricsServiceI (line 14) | public interface MetricsServiceI {
method addATAMetric (line 15) | Response addATAMetric(ATAMetricAddCmd cmd);
method addSharingMetric (line 16) | Response addSharingMetric(SharingMetricAddCmd cmd);
method addPatentMetric (line 17) | Response addPatentMetric(PatentMetricAddCmd cmd);
method addPaperMetric (line 18) | Response addPaperMetric(PaperMetricAddCmd cmd);
method addRefactoringMetric (line 19) | Response addRefactoringMetric(RefactoringMetricAddCmd cmd);
method addMiscMetric (line 20) | Response addMiscMetric(MiscMetricAddCmd cmd);
method addCodeReviewMetric (line 21) | Response addCodeReviewMetric(CodeReviewMetricAddCmd cmd);
method deleteMetric (line 22) | Response deleteMetric(MetricDeleteCmd cmd);
method listATAMetrics (line 23) | MultiResponse<ATAMetricCO> listATAMetrics(ATAMetricQry ataMetricQry);
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/api/UserProfileServiceI.java
type UserProfileServiceI (line 16) | public interface UserProfileServiceI {
method addUserProfile (line 17) | Response addUserProfile(UserProfileAddCmd cmd);
method updateUserProfile (line 18) | Response updateUserProfile(UserProfileUpdateCmd cmd);
method refreshScore (line 19) | Response refreshScore(RefreshScoreCmd cmd);
method getUserProfileBy (line 20) | SingleResponse<UserProfileCO> getUserProfileBy(UserProfileGetQry qry);
method listUserProfileBy (line 21) | MultiResponse<UserProfileCO> listUserProfileBy(UserProfileListQry qry);
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/context/UserContext.java
class UserContext (line 11) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/ATAMetricAddCmd.java
class ATAMetricAddCmd (line 15) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/ATAMetricQry.java
class ATAMetricQry (line 5) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/CodeReviewMetricAddCmd.java
class CodeReviewMetricAddCmd (line 14) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/CommonCommand.java
class CommonCommand (line 12) | public class CommonCommand extends Command{
method getOperater (line 16) | public String getOperater() {
method setOperater (line 20) | public void setOperater(String operater) {
method isNeedsOperator (line 25) | public boolean isNeedsOperator(){
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/MetricDeleteCmd.java
class MetricDeleteCmd (line 11) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/MiscMetricAddCmd.java
class MiscMetricAddCmd (line 15) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/PaperMetricAddCmd.java
class PaperMetricAddCmd (line 15) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/PatentMetricAddCmd.java
class PatentMetricAddCmd (line 15) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/RefactoringMetricAddCmd.java
class RefactoringMetricAddCmd (line 15) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/RefreshScoreCmd.java
class RefreshScoreCmd (line 6) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/SharingMetricAddCmd.java
class SharingMetricAddCmd (line 14) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/UserProfileAddCmd.java
class UserProfileAddCmd (line 14) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/UserProfileGetQry.java
class UserProfileGetQry (line 5) | @Data
method UserProfileGetQry (line 10) | public UserProfileGetQry(){
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/UserProfileListQry.java
class UserProfileListQry (line 5) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/UserProfileUpdateCmd.java
class UserProfileUpdateCmd (line 8) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/clientobject/ATAMetricCO.java
class ATAMetricCO (line 14) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/clientobject/AbstractMetricCO.java
class AbstractMetricCO (line 14) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/clientobject/MiscMetricCO.java
class MiscMetricCO (line 14) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/clientobject/PaperMetricCO.java
class PaperMetricCO (line 13) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/clientobject/PatentMetricCO.java
class PatentMetricCO (line 14) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/clientobject/RefactoringMetricCO.java
class RefactoringMetricCO (line 12) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/clientobject/SharingMetricCO.java
class SharingMetricCO (line 12) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/clientobject/UserProfileCO.java
class UserProfileCO (line 8) | @Data
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/domainevent/CustomerCreatedEvent.java
class CustomerCreatedEvent (line 9) | public class CustomerCreatedEvent {
method getCustomerId (line 13) | public String getCustomerId() {
method setCustomerId (line 17) | public void setCustomerId(String customerId) {
FILE: cola-samples/craftsman/craftsman-client/src/main/java/com/alibaba/craftsman/dto/domainevent/MetricItemCreatedEvent.java
class MetricItemCreatedEvent (line 5) | @Data
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/DomainFactory.java
class DomainFactory (line 5) | public class DomainFactory {
method getUserProfile (line 7) | public static UserProfile getUserProfile(){
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/gateway/MetricGateway.java
type MetricGateway (line 16) | public interface MetricGateway {
method save (line 17) | void save(MetricItem metricItem);
method listByTechContribution (line 18) | List<SubMetric> listByTechContribution(String userId);
method listByTechInfluence (line 19) | List<SubMetric> listByTechInfluence(String userId);
method getBugMetric (line 20) | BugMetric getBugMetric(String userId);
method getAppMetric (line 21) | AppMetric getAppMetric(String userId);
method delete (line 22) | void delete(String id, String operator);
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/gateway/UserProfileGateway.java
type UserProfileGateway (line 11) | public interface UserProfileGateway {
method create (line 12) | void create(UserProfile userProfile);
method update (line 13) | void update(UserProfile userProfile);
method getByUserId (line 14) | UserProfile getByUserId(String userId);
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/JSONPropertyFilter.java
class JSONPropertyFilter (line 11) | public class JSONPropertyFilter implements PropertyFilter {
method apply (line 15) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/MainMetric.java
class MainMetric (line 14) | @Data
method MainMetric (line 22) | public MainMetric(){
method addSubMetric (line 25) | public void addSubMetric(SubMetric metric){
method getName (line 29) | @Override
method getCode (line 34) | @Override
method calculateScore (line 40) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/MainMetricType.java
type MainMetricType (line 3) | public enum MainMetricType {
method MainMetricType (line 12) | private MainMetricType(String metricCode, String metricName){
method getMetricCode (line 17) | public String getMetricCode() {
method getMetricName (line 21) | public String getMetricName() {
method of (line 25) | public static MainMetricType of(String metricCode){
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/Measurable.java
type Measurable (line 11) | public interface Measurable extends Serializable{
method calculateScore (line 17) | public double calculateScore();
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/Metric.java
class Metric (line 15) | @Entity
method Metric (line 24) | public Metric(){
method Metric (line 28) | public Metric(UserProfile metricOwner){
method getName (line 37) | abstract public String getName();
method getCode (line 43) | abstract public String getCode();
method getWeight (line 45) | abstract public double getWeight();
method toString (line 47) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/MetricItem.java
class MetricItem (line 16) | @Data
method setSubMetric (line 33) | public void setSubMetric(SubMetric subMetric){
method toJsonString (line 41) | public String toJsonString() {
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/SubMetric.java
class SubMetric (line 17) | @Data
method SubMetric (line 27) | public SubMetric(){
method setParent (line 31) | public void setParent(MainMetric parent){
method addMetricItem (line 41) | public void addMetricItem(MetricItem metricItem){
method getName (line 46) | @Override
method getCode (line 51) | @Override
method calculateScore (line 56) | @Override
method getMetricOwner (line 65) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/SubMetricType.java
type SubMetricType (line 9) | public enum SubMetricType {
method SubMetricType (line 39) | private SubMetricType(MainMetricType parentType, String metricSubTypeC...
method getParentType (line 45) | public MainMetricType getParentType() {
method getMetricSubTypeCode (line 49) | public String getMetricSubTypeCode() {
method getMetricSubTypeName (line 53) | public String getMetricSubTypeName() {
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/appquality/AppMetric.java
class AppMetric (line 6) | public class AppMetric extends SubMetric {
method AppMetric (line 8) | public AppMetric(){
method getWeight (line 12) | @Override
method calculateScore (line 17) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/appquality/AppMetricItem.java
class AppMetricItem (line 7) | @Data
method calculateScore (line 21) | @Override
method duductScore (line 32) | private double duductScore(double score, int count) {
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/appquality/AppQualityMetric.java
class AppQualityMetric (line 8) | public class AppQualityMetric extends MainMetric {
method AppQualityMetric (line 12) | public AppQualityMetric(UserProfile metricOwner){
method getWeight (line 18) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/devquality/BugMetric.java
class BugMetric (line 10) | public class BugMetric extends SubMetric {
method BugMetric (line 12) | public BugMetric(){
method getWeight (line 16) | @Override
method calculateScore (line 21) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/devquality/BugMetricItem.java
class BugMetricItem (line 6) | @Data
method BugMetricItem (line 16) | public BugMetricItem(int bugCount, long checkInCodeCount){
method calculateScore (line 21) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/devquality/DevQualityMetric.java
class DevQualityMetric (line 8) | @Data
method DevQualityMetric (line 13) | public DevQualityMetric(UserProfile metricOwner){
method getWeight (line 19) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techcontribution/CodeReviewMetric.java
class CodeReviewMetric (line 9) | public class CodeReviewMetric extends SubMetric {
method CodeReviewMetric (line 11) | public CodeReviewMetric(){
method CodeReviewMetric (line 15) | public CodeReviewMetric(MainMetric parent) {
method getWeight (line 21) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techcontribution/CodeReviewMetricItem.java
class CodeReviewMetricItem (line 14) | @Data
method CodeReviewMetricItem (line 38) | public CodeReviewMetricItem(){
method valueOf (line 43) | public static CodeReviewMetricItem valueOf(String json){
method calculateScore (line 51) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techcontribution/ContributionMetric.java
class ContributionMetric (line 14) | @Data
method ContributionMetric (line 21) | public ContributionMetric(UserProfile metricOwner){
method getWeight (line 27) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techcontribution/MiscMetric.java
class MiscMetric (line 9) | public class MiscMetric extends SubMetric {
method MiscMetric (line 11) | public MiscMetric(){
method MiscMetric (line 15) | public MiscMetric(MainMetric parent) {
method getWeight (line 21) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techcontribution/MiscMetricItem.java
class MiscMetricItem (line 15) | @Data
method MiscMetricItem (line 40) | public MiscMetricItem(){
method MiscMetricItem (line 44) | public MiscMetricItem(String name, String content, String docUrl, Stri...
method valueOf (line 52) | public static MiscMetricItem valueOf(String json){
method calculateScore (line 60) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techcontribution/RefactoringLevel.java
type RefactoringLevel (line 11) | public enum RefactoringLevel {
method RefactoringLevel (line 23) | RefactoringLevel(double score, String desc) {
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techcontribution/RefactoringMetric.java
class RefactoringMetric (line 9) | public class RefactoringMetric extends SubMetric {
method RefactoringMetric (line 11) | public RefactoringMetric(){
method RefactoringMetric (line 15) | public RefactoringMetric(MainMetric parent) {
method getWeight (line 21) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techcontribution/RefactoringMetricItem.java
class RefactoringMetricItem (line 18) | @Data
method RefactoringMetricItem (line 45) | public RefactoringMetricItem(){
method valueOf (line 48) | public static RefactoringMetricItem valueOf(String json){
method calculateScore (line 56) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techinfluence/ATAMetric.java
class ATAMetric (line 11) | public class ATAMetric extends SubMetric {
method ATAMetric (line 13) | public ATAMetric(){
method ATAMetric (line 17) | public ATAMetric(MainMetric parent) {
method getWeight (line 23) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techinfluence/ATAMetricItem.java
class ATAMetricItem (line 14) | @Data
method ATAMetricItem (line 34) | public ATAMetricItem(){
method ATAMetricItem (line 38) | public ATAMetricItem(String title, long thumbsUpCount, long hitCount, ...
method valueOf (line 46) | public static ATAMetricItem valueOf(String json){
method calculateScore (line 50) | @Override
method addScoreByHitCount (line 62) | private double addScoreByHitCount(double score) {
method addScoreByThumbsupCount (line 69) | private double addScoreByThumbsupCount(double score){
method addScoreByFavoriteCount (line 76) | private double addScoreByFavoriteCount(double score){
method addScoreByCommentCount (line 83) | private double addScoreByCommentCount(double score){
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techinfluence/AuthorType.java
type AuthorType (line 11) | public enum AuthorType {
method AuthorType (line 23) | private AuthorType(double score, String desc) {
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techinfluence/InfluenceMetric.java
class InfluenceMetric (line 14) | @Data
method InfluenceMetric (line 21) | public InfluenceMetric(UserProfile metricOwner){
method getWeight (line 27) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techinfluence/PaperMetric.java
class PaperMetric (line 12) | public class PaperMetric extends SubMetric {
method PaperMetric (line 14) | public PaperMetric(){
method PaperMetric (line 18) | public PaperMetric(MainMetric parent) {
method getWeight (line 24) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techinfluence/PaperMetricItem.java
class PaperMetricItem (line 17) | @Data
method PaperMetricItem (line 27) | public PaperMetricItem(){
method PaperMetricItem (line 31) | public PaperMetricItem(String paperName, String paperDesc, String maga...
method valueOf (line 38) | public static PaperMetricItem valueOf(String json){
method calculateScore (line 42) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techinfluence/PatentMetric.java
class PatentMetric (line 9) | public class PatentMetric extends SubMetric {
method PatentMetric (line 11) | public PatentMetric(){
method PatentMetric (line 15) | public PatentMetric(MainMetric parent) {
method getWeight (line 21) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techinfluence/PatentMetricItem.java
class PatentMetricItem (line 12) | @Data
method PatentMetricItem (line 21) | public PatentMetricItem(){
method PatentMetricItem (line 25) | public PatentMetricItem(String patentName, String patentDesc, String p...
method valueOf (line 33) | public static PatentMetricItem valueOf(String json){
method calculateScore (line 37) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techinfluence/SharingMetric.java
class SharingMetric (line 11) | public class SharingMetric extends SubMetric {
method SharingMetric (line 13) | public SharingMetric(){
method SharingMetric (line 17) | public SharingMetric(MainMetric parent) {
method getWeight (line 23) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techinfluence/SharingMetricItem.java
class SharingMetricItem (line 15) | @Data
method SharingMetricItem (line 23) | public SharingMetricItem(){
method SharingMetricItem (line 27) | public SharingMetricItem(String sharingName, SharingScope sharingScope...
method valueOf (line 34) | public static SharingMetricItem valueOf(String json){
method calculateScore (line 38) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/techinfluence/SharingScope.java
type SharingScope (line 11) | public enum SharingScope {
method SharingScope (line 22) | private SharingScope(double score, String desc) {
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/weight/DevWeight.java
class DevWeight (line 6) | public class DevWeight extends Weight{
method getAppQualityWeight (line 10) | @Override
method getTechInfluenceWeight (line 15) | @Override
method getTechContributionWeight (line 20) | @Override
method getDevQualityWeight (line 25) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/weight/OtherWeight.java
class OtherWeight (line 6) | public class OtherWeight extends Weight{
method getAppQualityWeight (line 10) | @Override
method getTechInfluenceWeight (line 15) | @Override
method getTechContributionWeight (line 20) | @Override
method getDevQualityWeight (line 25) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/weight/QAWeight.java
class QAWeight (line 6) | public class QAWeight extends Weight{
method getAppQualityWeight (line 10) | @Override
method getTechInfluenceWeight (line 15) | @Override
method getTechContributionWeight (line 20) | @Override
method getDevQualityWeight (line 25) | @Override
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/weight/Weight.java
class Weight (line 9) | public abstract class Weight {
method getAppQualityWeight (line 13) | public abstract double getAppQualityWeight();
method getTechInfluenceWeight (line 14) | public abstract double getTechInfluenceWeight();
method getTechContributionWeight (line 15) | public abstract double getTechContributionWeight();
method getDevQualityWeight (line 16) | public abstract double getDevQualityWeight();
method getUnanimousWeight (line 18) | public double getUnanimousWeight(){
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/metrics/weight/WeightFactory.java
class WeightFactory (line 5) | public class WeightFactory {
method get (line 6) | public static Weight get(Role role){
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/user/Role.java
type Role (line 9) | public enum Role {
method Role (line 16) | Role(String desc){
FILE: cola-samples/craftsman/craftsman-domain/src/main/java/com/alibaba/craftsman/domain/user/UserProfile.java
class UserProfile (line 18) | @Data
method calculateScore (line 46) | public void calculateScore(){
method calculateAppQualityMetric (line 54) | private void calculateAppQualityMetric() {
method calculateDevQualityMetric (line 59) | private void calculateDevQualityMetric(){
method calculateTechInfluenceScore (line 64) | private void calculateTechInfluenceScore(){
method calculateTechContributionScore (line 69) | private void calculateTechContributionScore(){
method calculateTotalScore (line 74) | private void calculateTotalScore(){
method round (line 81) | private double round(double score){
method UserProfile (line 90) | public UserProfile(String userId){
FILE: cola-samples/craftsman/craftsman-domain/src/test/java/com/alibaba/craftsman/domain/ATAMetricTest.java
class ATAMetricTest (line 16) | public class ATAMetricTest {
method testBasicScore (line 18) | @Test
method testNormalScore (line 24) | @Test
method testPopularScore (line 30) | @Test
method testJSON (line 36) | @Test
method testATAMetric (line 56) | @Test
FILE: cola-samples/craftsman/craftsman-domain/src/test/java/com/alibaba/craftsman/domain/AppMetricTest.java
class AppMetricTest (line 8) | public class AppMetricTest {
method testAppMetricItem (line 10) | @Test
method testAppMetric (line 22) | @Test
FILE: cola-samples/craftsman/craftsman-domain/src/test/java/com/alibaba/craftsman/domain/BugMetricTest.java
class BugMetricTest (line 7) | public class BugMetricTest {
method test5BugsPer1000LinesCode (line 9) | @Test
method test2BugsPer1000LinesCode (line 15) | @Test
method test5BugsPer10000LinesCode (line 21) | @Test
FILE: cola-samples/craftsman/craftsman-domain/src/test/java/com/alibaba/craftsman/domain/InfluenceMetricTest.java
class InfluenceMetricTest (line 12) | public class InfluenceMetricTest {
method testDevScore (line 14) | @Test
method testQAScore (line 24) | @Test
method prepareSubMetrics (line 34) | public static void prepareSubMetrics(InfluenceMetric influenceMetric) {
FILE: cola-samples/craftsman/craftsman-domain/src/test/java/com/alibaba/craftsman/domain/PatentMetricTest.java
class PatentMetricTest (line 14) | public class PatentMetricTest {
method testPatentMetric (line 16) | @Test
FILE: cola-samples/craftsman/craftsman-domain/src/test/java/com/alibaba/craftsman/domain/SharingMetricTest.java
class SharingMetricTest (line 19) | public class SharingMetricTest {
method testSharingMetric (line 21) | @Test
FILE: cola-samples/craftsman/craftsman-domain/src/test/java/com/alibaba/craftsman/domain/UserProfileTest.java
class UserProfileTest (line 28) | public class UserProfileTest {
method testCalculateScore (line 30) | @Test
method testNPE (line 85) | @Test(expected = BizException.class)
FILE: cola-samples/craftsman/craftsman-infrastructure/src/main/java/com/alibaba/craftsman/common/BizCode.java
class BizCode (line 3) | public class BizCode {
FILE: cola-samples/craftsman/craftsman-infrastructure/src/main/java/com/alibaba/craftsman/common/event/DomainEventPublisher.java
class DomainEventPublisher (line 13) | @Component
method publish (line 16) | public void publish(Object domainEvent) {
FILE: cola-samples/craftsman/craftsman-infrastructure/src/main/java/com/alibaba/craftsman/common/exception/ErrorCode.java
type ErrorCode (line 9) | public enum ErrorCode {
method ErrorCode (line 16) | private ErrorCode(String errCode, String errDesc) {
method getErrCode (line 21) | public String getErrCode() {
method getErrDesc (line 25) | public String getErrDesc() {
method statOf (line 29) | public static ErrorCode statOf(String ecode) {
FILE: cola-samples/craftsman/craftsman-infrastructure/src/main/java/com/alibaba/craftsman/config/CraftsmanConfig.java
class CraftsmanConfig (line 7) | public class CraftsmanConfig {
FILE: cola-samples/craftsman/craftsman-infrastructure/src/main/java/com/alibaba/craftsman/convertor/MetricConvertor.java
class MetricConvertor (line 10) | public class MetricConvertor{
method toDataObject (line 12) | public static MetricDO toDataObject(MetricItem metricItem){
FILE: cola-samples/craftsman/craftsman-infrastructure/src/main/java/com/alibaba/craftsman/convertor/UserProfileConvertor.java
class UserProfileConvertor (line 9) | public class UserProfileConvertor{
method toEntity (line 11) | public static UserProfile toEntity(UserProfileCO userProfileCO){
method toDataObject (line 18) | public static UserProfileDO toDataObject(UserProfile userProfile){
method toDataObjectForCreate (line 25) | public static UserProfileDO toDataObjectForCreate(UserProfile userProf...
method toDataObjectForUpdate (line 30) | public static UserProfileDO toDataObjectForUpdate(UserProfile userPro...
FILE: cola-samples/craftsman/craftsman-infrastructure/src/main/java/com/alibaba/craftsman/gatewayimpl/MetricGatewayImpl.java
class MetricGatewayImpl (line 37) | @Component
method save (line 54) | @Override
method listByTechContribution (line 68) | @Override
method listByTechInfluence (line 97) | @Override
method getBugM
Condensed preview — 749 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,076K chars).
[
{
"path": ".editorconfig",
"chars": 274,
"preview": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\ntab_width = 4\nindent_style = space\ntrim_tr"
},
{
"path": ".github/dependabot.yml",
"chars": 536,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/workflows/ci.yaml",
"chars": 1328,
"preview": "# Quickstart for GitHub Actions\n# https://docs.github.com/en/actions/quickstart\n\nname: Fast CI\non: [ push, pull_request,"
},
{
"path": ".github/workflows/ci_by_multiply_java_versions.yaml",
"chars": 1109,
"preview": "# Quickstart for GitHub Actions\n# https://docs.github.com/en/actions/quickstart\n\nname: Strong CI with multiply java vers"
},
{
"path": ".gitignore",
"chars": 317,
"preview": "target/\n!.mvn/wrapper/maven-wrapper.jar\n\n### STS ###\n.apt_generated\n.classpath\n.factorypath\n.project\n.settings\n.springBe"
},
{
"path": ".gitmodules",
"chars": 111,
"preview": "[submodule \"scripts/bash-buddy\"]\n\tpath = scripts/bash-buddy\n\turl = https://github.com/foldright/bash-buddy.git\n"
},
{
"path": ".mvn/wrapper/maven-wrapper.properties",
"chars": 951,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "LICENSE",
"chars": 26526,
"preview": " GNU LESSER GENERAL PUBLIC LICENSE\n Version 2.1, February 1999\n\n Copyright (C) 19"
},
{
"path": "README.md",
"chars": 5597,
"preview": "# 🥤 COLA v5\n\n[\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package};\r\n\r\nimport org."
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/adapter/ChargeController.java",
"chars": 1901,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.adapter;\n\nimpor"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/ChargeServiceI.java",
"chars": 419,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.application;\r\n\r"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/ChargeServiceImpl.java",
"chars": 3677,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.application;\n\ni"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/BeginSessionRequest.java",
"chars": 831,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.application.dto"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/ChargeRecordDto.java",
"chars": 1056,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.application.dto"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/ChargeRequest.java",
"chars": 471,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.application.dto"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/EndSessionRequest.java",
"chars": 721,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.application.dto"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/MultiResponse.java",
"chars": 1579,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.application.dto"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/Response.java",
"chars": 1341,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.application.dto"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/application/dto/SingleResponse.java",
"chars": 1084,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.application.dto"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/ApplicationContextHelper.java",
"chars": 2020,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain;\r\n\r\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/BizException.java",
"chars": 365,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain;\r\n\r\npubl"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/DomainFactory.java",
"chars": 271,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain;\r\n\r\npubl"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/Entity.java",
"chars": 508,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain;\r\n\r\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/account/Account.java",
"chars": 2499,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.account;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/account/AccountDomainService.java",
"chars": 720,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.account;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/CallType.java",
"chars": 234,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge;\r"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/ChargeContext.java",
"chars": 1541,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge;\r"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/ChargeRecord.java",
"chars": 1577,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge;\n"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/Money.java",
"chars": 1025,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge;\r"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/MoneyConverter.java",
"chars": 566,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge;\n"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/Session.java",
"chars": 819,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge;\r"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/BasicChargePlan.java",
"chars": 772,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/ChargePlan.java",
"chars": 749,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/ChargePlanType.java",
"chars": 303,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/FamilyChargePlan.java",
"chars": 998,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/FixedTimeChangePlan.java",
"chars": 1930,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargeplan/Resource.java",
"chars": 191,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/AbstractChargeRule.java",
"chars": 416,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/BasicChargeRule.java",
"chars": 1347,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/ChargeRule.java",
"chars": 416,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/ChargeRuleFactory.java",
"chars": 1448,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/CompositeChargeRule.java",
"chars": 1081,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/FamilyChargeRule.java",
"chars": 1189,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/charge/chargerule/FixedTimeChargeRule.java",
"chars": 1985,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.charge.c"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/gateway/AccountGateway.java",
"chars": 645,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.gateway;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/gateway/ChargeGateway.java",
"chars": 578,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.gateway;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/domain/gateway/SessionGateway.java",
"chars": 316,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.gateway;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/infrastructure/AccountGatewayImpl.java",
"chars": 1489,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.infrastructure;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/infrastructure/RestClientBean.java",
"chars": 573,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.infrastructure;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/java/infrastructure/SessionGatewayImpl.java",
"chars": 884,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.infrastructure;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/resources/application.yml",
"chars": 496,
"preview": "spring:\n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://${MYSQL_SERVER:localhost}:${"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/main/resources/logback.xml",
"chars": 778,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n<configuration>\r\n <include reso"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/charge.http",
"chars": 475,
"preview": "### list charge records by sessionId\nGET http://localhost:8080/123145/chargeRecords\nAccept: application/json\n\n### end se"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/CleanArchTest.java",
"chars": 1150,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package};\n\nimport org.ju"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/TestsContainerBoot.java",
"chars": 272,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package};\n\nimport com.al"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/application/ChargeServiceTest.java",
"chars": 2428,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.application;\n\ni"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/domain/ChargeRecordPlanTest.java",
"chars": 1172,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain;\n\n\nimpor"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/domain/ChargeRecordRuleTest.java",
"chars": 3893,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain;\n\nimport"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/domain/CompositeChargeRuleTestRecord.java",
"chars": 3733,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain;\n\nimport"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/AccountGatewayTest.java",
"chars": 1312,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.infrastructure;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/ChargeRecordRepoTest.java",
"chars": 2177,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.infrastructure;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/FixtureLoader.java",
"chars": 944,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.infrastructure;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/JSONTest.java",
"chars": 2169,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.infrastructure;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/SpingBootConfTest.java",
"chars": 1512,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.infrastructure;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/WireMockBasicTest.java",
"chars": 2954,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.infrastructure;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/java/infrastructure/WireMockRegister.java",
"chars": 497,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.infrastructure;"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/resources/application-test.yml",
"chars": 392,
"preview": "spring:\n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n # hard code for test purpose\n url: jdbc:mys"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/resources/application.yml",
"chars": 290,
"preview": "spring:\n datasource:\n driver-class-name: org.h2.Driver\n url: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=1\n username: sa"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/resources/fixture/wiremock/stub_account.json",
"chars": 557,
"preview": "{\n \"request\": {\n \"urlPathPattern\": \"/v1/api/account/[0-9]+\",\n \"method\": \"GET\"\n },\n \"response\": {\n \"status\": "
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/resources/fixture/wiremock/stub_insufficient_account.json",
"chars": 555,
"preview": "{\n \"request\": {\n \"urlPathPattern\": \"/v1/api/account/[0-9]+\",\n \"method\": \"GET\"\n },\n \"response\": {\n \"status\": "
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/resources/fixture/wiremock/stub_wire_mock_basic.json",
"chars": 725,
"preview": "{\n \"request\": {\n \"urlPathPattern\": \"/v1/wiremock/basic\",\n \"method\": \"GET\"\n },\n \"response\": {\n \"status\": 200,"
},
{
"path": "cola-archetypes/cola-archetype-light/src/main/resources/archetype-resources/src/test/resources/logback-test.xml",
"chars": 939,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n<configuration>\n <include resou"
},
{
"path": "cola-archetypes/cola-archetype-light/src/test/resources/projects/basic/archetype.properties",
"chars": 104,
"preview": "#Sun May 12 20:30:31 CST 2024\npackage=it.pkg\ngroupId=archetype.it\nartifactId=basic\nversion=0.1-SNAPSHOT\n"
},
{
"path": "cola-archetypes/cola-archetype-light/src/test/resources/projects/basic/goal.txt",
"chars": 0,
"preview": ""
},
{
"path": "cola-archetypes/cola-archetype-service/.gitignore",
"chars": 235,
"preview": "target/\n\n### eclipse ###\n.apt_generated\n.classpath\n.factorypath\n.project\n.settings\n.springBeans\n\n### IntelliJ IDEA ###\n."
},
{
"path": "cola-archetypes/cola-archetype-service/pom.xml",
"chars": 2146,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/META-INF/maven/archetype-metadata.xml",
"chars": 5335,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<archetype-descriptor\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n "
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__gitignore__",
"chars": 235,
"preview": "target/\n\n### eclipse ###\n.apt_generated\n.classpath\n.factorypath\n.project\n.settings\n.springBeans\n\n### IntelliJ IDEA ###\n."
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml",
"chars": 1609,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/CustomerServiceImpl.java",
"chars": 1224,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.customer;\n\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/executor/CustomerAddCmdExe.java",
"chars": 796,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n\npackage ${package}.customer.execu"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/executor/query/CustomerListByNameQryExe.java",
"chars": 748,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.customer.execut"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/order/OrderServiceImpl.java",
"chars": 181,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.order;\n\n//packa"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/app/CustomerConvertorTest.java",
"chars": 152,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.app;\n\n\npublic c"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/app/CustomerValidatorTest.java",
"chars": 226,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.app;\n\nimport or"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/pom.xml",
"chars": 949,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/api/CustomerServiceI.java",
"chars": 501,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.api;\n\nimport co"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/CustomerAddCmd.java",
"chars": 248,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.dto;\n\nimport ${"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/CustomerListByNameQry.java",
"chars": 249,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.dto;\n\nimport co"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/data/CustomerDTO.java",
"chars": 431,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.dto.data;\n\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/data/ErrorCode.java",
"chars": 242,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.dto.data;\n\n\npub"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/event/CustomerCreatedEvent.java",
"chars": 520,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.dto.event;\n\nimp"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/event/DomainEventConstant.java",
"chars": 302,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.dto.event;\n\n/**"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/pom.xml",
"chars": 1174,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/CompanyType.java",
"chars": 285,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/Credit.java",
"chars": 225,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/Customer.java",
"chars": 1148,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/CustomerType.java",
"chars": 286,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/SourceType.java",
"chars": 283,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/domainservice/CreditChecker.java",
"chars": 216,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/gateway/CreditGateway.java",
"chars": 358,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/gateway/CustomerGateway.java",
"chars": 256,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/order/Order.java",
"chars": 143,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.order;\n\n"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/package-info.java",
"chars": 216,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n/**\n * This is domain module, the "
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/test/java/domain/CustomerEntityTest.java",
"chars": 282,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain;\n\n\npubli"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/pom.xml",
"chars": 1420,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/config/DiamondConfig.java",
"chars": 204,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.config;\n\npublic"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CreditGatewayImpl.java",
"chars": 349,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.customer;\n\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerDO.java",
"chars": 317,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.customer;\n\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerGatewayImpl.java",
"chars": 636,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.customer;\n\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerMapper.java",
"chars": 247,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.customer;\n\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/order/OrderGatewayImpl.java",
"chars": 147,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.order;\n\npublic "
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/resources/logback-spring.xml",
"chars": 1609,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n<?xml version=\"1.0\" encoding=\"UTF-"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/resources/mybatis/customer-mapper.xml",
"chars": 786,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n<?xml version=\"1.0\" encoding=\"UTF-"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/resources/mybatis/mybatis-config.xml",
"chars": 394,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n<?xml version=\"1.0\" encoding=\"UTF-"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/test/java/repository/CustomerMapperTest.java",
"chars": 247,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.repository;\n\n\np"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/test/resources/sample.properties",
"chars": 86,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/pom.xml",
"chars": 5534,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/pom.xml",
"chars": 1303,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/main/java/Application.java",
"chars": 497,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package};\n\nimport org.my"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/main/resources/application.properties",
"chars": 294,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\nproject.name=${artifactId}\n\nspring"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/main/resources/logback-spring.xml",
"chars": 2019,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n<configuration>\n <include resou"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/test/java/TestApplication.java",
"chars": 415,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package};\n\nimport org.sp"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/test/java/test/CustomerServiceTest.java",
"chars": 1920,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.test;\n\nimport c"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/test/resources/logback-test.xml",
"chars": 755,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n<configuration>\n <include resou"
},
{
"path": "cola-archetypes/cola-archetype-service/src/main/resources/archetype-resources/start/src/test/resources/test.properties",
"chars": 772,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n\n\n${symbol_pound}tddl\nspring.tddl."
},
{
"path": "cola-archetypes/cola-archetype-service/src/test/resources/projects/basic/archetype.properties",
"chars": 126,
"preview": "#Tue Apr 16 18:52:28 CST 2019\npackage=it.pkg\nversion=0.1-SNAPSHOT\ngroupId=archetype.it\nartifactId=basic\ngitignore=.gitig"
},
{
"path": "cola-archetypes/cola-archetype-service/src/test/resources/projects/basic/goal.txt",
"chars": 0,
"preview": ""
},
{
"path": "cola-archetypes/cola-archetype-web/.gitignore",
"chars": 231,
"preview": "target/\n\n### STS ###\n.apt_generated\n.classpath\n.factorypath\n.project\n.settings\n.springBeans\n\n### IntelliJ IDEA ###\n.idea"
},
{
"path": "cola-archetypes/cola-archetype-web/pom.xml",
"chars": 2133,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/META-INF/maven/archetype-metadata.xml",
"chars": 5790,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<archetype-descriptor\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n "
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__gitignore__",
"chars": 235,
"preview": "target/\n\n### eclipse ###\n.apt_generated\n.classpath\n.factorypath\n.project\n.settings\n.springBeans\n\n### IntelliJ IDEA ###\n."
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-adapter/pom.xml",
"chars": 1144,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-adapter/src/main/java/mobile/CustomerMobileAdaptor.java",
"chars": 245,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.mobile;\n\n/**\n *"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-adapter/src/main/java/wap/CustomerWapAdaptor.java",
"chars": 276,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.wap;\n\n/**\n * Cu"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-adapter/src/main/java/web/CustomerController.java",
"chars": 1232,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.web;\n\nimport co"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/pom.xml",
"chars": 1609,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/CustomerServiceImpl.java",
"chars": 1225,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.customer;\n\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/executor/CustomerAddCmdExe.java",
"chars": 809,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n\npackage ${package}.customer.execu"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/customer/executor/query/CustomerListByNameQryExe.java",
"chars": 748,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.customer.execut"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/src/main/java/order/OrderServiceImpl.java",
"chars": 181,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.order;\n\n//packa"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/app/CustomerConvertorTest.java",
"chars": 152,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.app;\n\n\npublic c"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-app/src/test/java/app/CustomerValidatorTest.java",
"chars": 226,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.app;\n\nimport or"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/pom.xml",
"chars": 949,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/api/CustomerServiceI.java",
"chars": 501,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.api;\n\nimport co"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/CustomerAddCmd.java",
"chars": 248,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.dto;\n\nimport ${"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/CustomerListByNameQry.java",
"chars": 249,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.dto;\n\nimport co"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/data/CustomerDTO.java",
"chars": 431,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.dto.data;\n\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/data/ErrorCode.java",
"chars": 546,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.dto.data;\n\npubl"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/event/CustomerCreatedEvent.java",
"chars": 520,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.dto.event;\n\nimp"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/dto/event/DomainEventConstant.java",
"chars": 302,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.dto.event;\n\n/**"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/pom.xml",
"chars": 1174,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/CompanyType.java",
"chars": 285,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/Credit.java",
"chars": 225,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/Customer.java",
"chars": 1147,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/CustomerType.java",
"chars": 286,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/SourceType.java",
"chars": 283,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/domainservice/CreditChecker.java",
"chars": 215,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/gateway/CreditGateway.java",
"chars": 314,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/customer/gateway/CustomerGateway.java",
"chars": 256,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.customer"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/order/Order.java",
"chars": 143,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain.order;\n\n"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/main/java/domain/package-info.java",
"chars": 216,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n/**\n * This is domain module, the "
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-domain/src/test/java/domain/CustomerEntityTest.java",
"chars": 282,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.domain;\n\n\npubli"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/pom.xml",
"chars": 1420,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/config/DiamondConfig.java",
"chars": 204,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.config;\n\npublic"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CreditGatewayImpl.java",
"chars": 349,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.customer;\n\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerDO.java",
"chars": 317,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.customer;\n\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerGatewayImpl.java",
"chars": 636,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.customer;\n\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/customer/CustomerMapper.java",
"chars": 247,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.customer;\n\nimpo"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/java/order/OrderGatewayImpl.java",
"chars": 147,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.order;\n\npublic "
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/resources/logback-spring.xml",
"chars": 1609,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n<?xml version=\"1.0\" encoding=\"UTF-"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/resources/mybatis/customer-mapper.xml",
"chars": 786,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n<?xml version=\"1.0\" encoding=\"UTF-"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/main/resources/mybatis/mybatis-config.xml",
"chars": 394,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n<?xml version=\"1.0\" encoding=\"UTF-"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/test/java/repository/CustomerMapperTest.java",
"chars": 247,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.repository;\n\n\np"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/__rootArtifactId__-infrastructure/src/test/resources/sample.properties",
"chars": 86,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/pom.xml",
"chars": 5804,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/start/pom.xml",
"chars": 1467,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/start/src/main/java/Application.java",
"chars": 549,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package};\n\nimport org.my"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/start/src/main/resources/application.properties",
"chars": 294,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\nproject.name=${artifactId}\n\nspring"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/start/src/main/resources/logback-spring.xml",
"chars": 2019,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n<configuration>\n <include resou"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/start/src/test/java/TestApplication.java",
"chars": 355,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package};\n\nimport org.sp"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/start/src/test/java/test/CustomerServiceTest.java",
"chars": 1875,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\npackage ${package}.test;\n\nimport c"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/start/src/test/resources/logback-test.xml",
"chars": 2019,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n<configuration>\n <include resou"
},
{
"path": "cola-archetypes/cola-archetype-web/src/main/resources/archetype-resources/start/src/test/resources/test.properties",
"chars": 772,
"preview": "#set( $symbol_pound = '#' )\n#set( $symbol_dollar = '$' )\n#set( $symbol_escape = '\\' )\n\n\n${symbol_pound}tddl\nspring.tddl."
},
{
"path": "cola-archetypes/cola-archetype-web/src/test/resources/projects/basic/archetype.properties",
"chars": 125,
"preview": "#Tue Apr 16 18:52:28 CST 2019\npackage=it.pkg\nversion=0.1-SNAPSHOT\ngroupId=archetype.it\nartifactId=basic\ngitignore=.gitig"
},
{
"path": "cola-archetypes/cola-archetype-web/src/test/resources/projects/basic/goal.txt",
"chars": 0,
"preview": ""
},
{
"path": "cola-archetypes/pom.xml",
"chars": 13056,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-components/cola-component-catchlog-starter/.gitignore",
"chars": 231,
"preview": "target/\n\n### STS ###\n.apt_generated\n.classpath\n.factorypath\n.project\n.settings\n.springBeans\n\n### IntelliJ IDEA ###\n.idea"
},
{
"path": "cola-components/cola-component-catchlog-starter/README.md",
"chars": 1345,
"preview": "## 原理\n通过注解AOP,提供service级别的logging和exception处理。\n\n通过Spring Boot的autoConfig机制进行加载,无需手动配置,只需要添加如下依赖即可:\n```xml\n <depen"
},
{
"path": "cola-components/cola-component-catchlog-starter/pom.xml",
"chars": 3552,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "cola-components/cola-component-catchlog-starter/src/main/java/com/alibaba/cola/catchlog/ApplicationContextHelper.java",
"chars": 2072,
"preview": "package com.alibaba.cola.catchlog;\n\nimport lombok.extern.slf4j.Slf4j;\nimport org.springframework.beans.BeansException;\ni"
},
{
"path": "cola-components/cola-component-catchlog-starter/src/main/java/com/alibaba/cola/catchlog/CatchAndLog.java",
"chars": 396,
"preview": "package com.alibaba.cola.catchlog;\n\n/**\n * CatchAndLog\n *\n * @author Frank Zhang\n * @date 2020-11-10 10:48 AM\n */\n\nimpor"
},
{
"path": "cola-components/cola-component-catchlog-starter/src/main/java/com/alibaba/cola/catchlog/CatchLogAspect.java",
"chars": 3455,
"preview": "package com.alibaba.cola.catchlog;\n\nimport com.alibaba.cola.exception.BizException;\nimport com.alibaba.cola.exception.Sy"
},
{
"path": "cola-components/cola-component-catchlog-starter/src/main/java/com/alibaba/cola/catchlog/CatchLogAutoConfiguration.java",
"chars": 659,
"preview": "package com.alibaba.cola.catchlog;\n\nimport org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;\nim"
},
{
"path": "cola-components/cola-component-catchlog-starter/src/main/java/com/alibaba/cola/catchlog/DefaultResponseHandler.java",
"chars": 1367,
"preview": "package com.alibaba.cola.catchlog;\n\n\nimport com.alibaba.cola.dto.Response;\nimport com.alibaba.cola.exception.BaseExcepti"
}
]
// ... and 549 more files (download for full content)
About this extraction
This page contains the full source code of the alibaba/COLA GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 749 files (912.1 KB), approximately 256.3k tokens, and a symbol index with 2114 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.