├── .gitignore ├── wizard-maven-plugin └── src │ ├── test │ ├── resources │ │ ├── org │ │ │ └── unidal │ │ │ │ ├── maven │ │ │ │ └── plugin │ │ │ │ │ ├── property │ │ │ │ │ └── example.properties │ │ │ │ │ └── wizard │ │ │ │ │ ├── catconfig │ │ │ │ │ ├── web-2.3-before.xml │ │ │ │ │ ├── web-2.3-after.xml │ │ │ │ │ └── pom-before.xml │ │ │ │ │ ├── jdbc-pom.xml │ │ │ │ │ ├── model-pom.xml │ │ │ │ │ ├── webapp-pom.xml │ │ │ │ │ ├── pom │ │ │ │ │ ├── jdbc-pom-before.xml │ │ │ │ │ ├── model-pom-before.xml │ │ │ │ │ └── webapp-pom-before.xml │ │ │ │ │ ├── model-sample.xml │ │ │ │ │ └── jdbc │ │ │ │ │ └── pom-before.xml │ │ │ │ └── codegen │ │ │ │ └── generator │ │ │ │ └── wizard │ │ │ │ ├── garden │ │ │ │ └── manifest.xml │ │ │ │ ├── pixie │ │ │ │ ├── manifest.xml │ │ │ │ └── wizard.xml │ │ │ │ ├── cat │ │ │ │ ├── home-jdbc-manifest.xml │ │ │ │ └── home-webapp-manifest.xml │ │ │ │ └── phoenix │ │ │ │ ├── console-manifest.xml │ │ │ │ ├── service-manifest.xml │ │ │ │ ├── environment-manifest.xml │ │ │ │ ├── service-wizard.xml │ │ │ │ ├── environment-wizard.xml │ │ │ │ └── console-wizard.xml │ │ └── META-INF │ │ │ ├── wizard │ │ │ ├── jdbc │ │ │ │ └── manifest.xml │ │ │ ├── model │ │ │ │ ├── manifest.xml │ │ │ │ └── wizard.xml │ │ │ └── webapp │ │ │ │ ├── manifest.xml │ │ │ │ └── wizard.xml │ │ │ └── dal │ │ │ └── jdbc │ │ │ ├── user-manifest.xml │ │ │ ├── alarm-manifest.xml │ │ │ └── report-manifest.xml │ ├── webapp │ │ ├── sources │ │ │ └── org │ │ │ │ └── unidal │ │ │ │ └── web │ │ │ │ ├── mvc │ │ │ │ ├── ErrorObject.java │ │ │ │ ├── Action.java │ │ │ │ ├── Module.java │ │ │ │ ├── Page.java │ │ │ │ ├── model │ │ │ │ │ ├── ModuleRegistry.java │ │ │ │ │ └── entity │ │ │ │ │ │ └── ModuleModel.java │ │ │ │ ├── Validator.java │ │ │ │ ├── ActionPayload.java │ │ │ │ ├── ActionContext.java │ │ │ │ ├── PageHandler.java │ │ │ │ ├── ViewModel.java │ │ │ │ ├── ActionException.java │ │ │ │ ├── annotation │ │ │ │ │ ├── ErrorActionMeta.java │ │ │ │ │ ├── TransitionMeta.java │ │ │ │ │ ├── OutboundActionMeta.java │ │ │ │ │ ├── PreInboundActionMeta.java │ │ │ │ │ ├── ModulePagesMeta.java │ │ │ │ │ ├── InboundActionMeta.java │ │ │ │ │ ├── ValidationMeta.java │ │ │ │ │ ├── PayloadMeta.java │ │ │ │ │ ├── ModuleMeta.java │ │ │ │ │ └── PageMeta.java │ │ │ │ ├── payload │ │ │ │ │ ├── annotation │ │ │ │ │ │ ├── PathMeta.java │ │ │ │ │ │ ├── ObjectMeta.java │ │ │ │ │ │ ├── PathPatternMeta.java │ │ │ │ │ │ ├── PayloadProviderMeta.java │ │ │ │ │ │ └── FieldMeta.java │ │ │ │ │ └── ParameterProvider.java │ │ │ │ ├── PayloadProvider.java │ │ │ │ ├── view │ │ │ │ │ └── HtmlTemplate.java │ │ │ │ └── AbstractModule.java │ │ │ │ └── lifecycle │ │ │ │ ├── ActionResolver.java │ │ │ │ └── UrlMapping.java │ │ ├── garden │ │ │ └── model │ │ │ │ ├── manifest.xml │ │ │ │ └── wizard.xml │ │ └── pixie │ │ │ └── model │ │ │ ├── manifest.xml │ │ │ └── wizard.xml │ ├── jdbc │ │ ├── garden │ │ │ └── model │ │ │ │ ├── manifest.xml │ │ │ │ └── wizard.xml │ │ ├── cat │ │ │ └── model │ │ │ │ └── manifest.xml │ │ └── sources │ │ │ └── org │ │ │ └── unidal │ │ │ └── dal │ │ │ └── jdbc │ │ │ ├── datasource │ │ │ └── JdbcDataSourceDescriptorManager.java │ │ │ └── configuration │ │ │ └── AbstractJdbcResourceConfigurator.java │ └── java │ │ └── org │ │ └── unidal │ │ └── maven │ │ └── plugin │ │ ├── wizard │ │ ├── scenario │ │ │ ├── JdbcTests.java │ │ │ └── WebAppTests.java │ │ ├── ProjectMojoTest.java │ │ ├── meta │ │ │ └── TableMetaTest.java │ │ └── WebAppMojoTest.java │ │ └── AllTests.java │ └── main │ ├── resources │ └── META-INF │ │ ├── wizard │ │ ├── manifest.xml │ │ ├── wizard.xml │ │ ├── jdbc │ │ │ ├── structure.xml │ │ │ └── xsl │ │ │ │ └── naming.xsl │ │ └── webapp │ │ │ ├── structure.xml │ │ │ └── xsl │ │ │ ├── naming.xsl │ │ │ ├── test │ │ │ └── all-tests.xsl │ │ │ ├── page │ │ │ ├── jsp-file.xsl │ │ │ └── context.xsl │ │ │ └── web-inf │ │ │ └── app-tld.xsl │ │ └── dal │ │ └── model │ │ ├── wizard-manifest.xml │ │ └── wizard-model.xml │ └── java │ └── org │ └── unidal │ └── maven │ └── plugin │ ├── property │ ├── PropertyProvider.java │ ├── SystemPropertyProvider.java │ ├── EnvironmentVariableProvider.java │ └── AbstractPropertyProvider.java │ └── wizard │ ├── model │ └── IEntity.java │ └── meta │ ├── WizardMeta.java │ ├── ModelMeta.java │ ├── TableMeta.java │ └── DefaultWizardMeta.java ├── codegen-maven-plugin ├── src │ ├── test │ │ ├── resources │ │ │ ├── META-INF │ │ │ │ └── services │ │ │ │ │ └── javax.script.ScriptEngineFactory │ │ │ └── org │ │ │ │ └── unidal │ │ │ │ └── codegen │ │ │ │ └── generator │ │ │ │ └── model │ │ │ │ └── test │ │ │ │ ├── eunit_testfwk_manifest.xml │ │ │ │ ├── ctest_report_model_manifest.xml │ │ │ │ ├── eunit_cmd_testfwk_manifest.xml │ │ │ │ ├── eunit_benchmark_testfwk_manifest.xml │ │ │ │ ├── eunit_excel_manifest.xml │ │ │ │ ├── eunit_resource_manifest.xml │ │ │ │ ├── eunit_resource.xml │ │ │ │ ├── eunit_resource_codegen.xml │ │ │ │ ├── eunit_excel.xml │ │ │ │ └── eunit_resource_sample.xml │ │ ├── dal-model │ │ │ ├── model-all │ │ │ │ └── model │ │ │ │ │ └── manifest.xml │ │ │ ├── model-array │ │ │ │ ├── model │ │ │ │ │ ├── manifest.xml │ │ │ │ │ └── model.xml │ │ │ │ └── test-resources │ │ │ │ │ └── sample.xml │ │ │ ├── model-key │ │ │ │ └── model │ │ │ │ │ └── manifest.xml │ │ │ ├── model-visitor │ │ │ │ └── model │ │ │ │ │ └── manifest.xml │ │ │ ├── egret-project │ │ │ │ └── model │ │ │ │ │ ├── projects-model.xml │ │ │ │ │ ├── projects-manifest.xml │ │ │ │ │ └── projects-codegen.xml │ │ │ ├── web-mvc │ │ │ │ └── model │ │ │ │ │ └── mvc-manifest.xml │ │ │ ├── expense-book │ │ │ │ └── model │ │ │ │ │ ├── book-model.xml │ │ │ │ │ ├── book-manifest.xml │ │ │ │ │ └── book-codegen.xml │ │ │ ├── phoenix-configure │ │ │ │ ├── sources │ │ │ │ │ └── com │ │ │ │ │ │ └── dianping │ │ │ │ │ │ └── phoenix │ │ │ │ │ │ └── lb │ │ │ │ │ │ └── model │ │ │ │ │ │ ├── State.java │ │ │ │ │ │ └── Availablity.java │ │ │ │ └── model │ │ │ │ │ └── configure-manifest.xml │ │ │ ├── phoenix-deploy │ │ │ │ ├── sources │ │ │ │ │ └── com │ │ │ │ │ │ └── dianping │ │ │ │ │ │ └── phoenix │ │ │ │ │ │ └── deploy │ │ │ │ │ │ └── DeployPlan.java │ │ │ │ └── model │ │ │ │ │ ├── deploy-manifest.xml │ │ │ │ │ ├── deploy-codegen.xml │ │ │ │ │ └── deploy-model.xml │ │ │ ├── dobby-model │ │ │ │ ├── sources │ │ │ │ │ └── org │ │ │ │ │ │ └── unidal │ │ │ │ │ │ └── codegen │ │ │ │ │ │ └── generator │ │ │ │ │ │ └── model │ │ │ │ │ │ └── dobby │ │ │ │ │ │ └── TicketState.java │ │ │ │ └── model │ │ │ │ │ ├── model-manifest.xml │ │ │ │ │ ├── model-model.xml │ │ │ │ │ └── model-codegen.xml │ │ │ ├── xpipe-keeper │ │ │ │ └── model │ │ │ │ │ ├── keeper-manifest.xml │ │ │ │ │ ├── keeper-model.xml │ │ │ │ │ └── keeper-codegen.xml │ │ │ ├── cat-bug │ │ │ │ └── model │ │ │ │ │ ├── bug-manifest.xml │ │ │ │ │ ├── bug-codegen.xml │ │ │ │ │ └── bug-model.xml │ │ │ ├── ebay-service │ │ │ │ ├── model │ │ │ │ │ ├── AddItem-model.xml │ │ │ │ │ ├── AddItem-manifest.xml │ │ │ │ │ └── AddItem-codegen.xml │ │ │ │ └── test-resources │ │ │ │ │ └── AddItem.xml │ │ │ ├── hermes-meta │ │ │ │ └── model │ │ │ │ │ ├── meta-manifest.xml │ │ │ │ │ ├── meta-model.xml │ │ │ │ │ └── meta-codegen.xml │ │ │ ├── phoenix-rule │ │ │ │ └── model │ │ │ │ │ ├── rule-manifest.xml │ │ │ │ │ ├── rule-codegen.xml │ │ │ │ │ └── rule-model.xml │ │ │ ├── rose-model │ │ │ │ └── model │ │ │ │ │ ├── model-manifest.xml │ │ │ │ │ └── model-model.xml │ │ │ ├── cat-client │ │ │ │ └── model │ │ │ │ │ ├── client-manifest.xml │ │ │ │ │ └── client-model.xml │ │ │ ├── cat-server │ │ │ │ └── model │ │ │ │ │ └── server-manifest.xml │ │ │ ├── cat-status │ │ │ │ └── model │ │ │ │ │ └── status-manifest.xml │ │ │ ├── ctrip-kpi-fx │ │ │ │ └── model │ │ │ │ │ └── fx-kpi-manifest.xml │ │ │ ├── dianping-liger │ │ │ │ └── model │ │ │ │ │ └── model-manifest.xml │ │ │ ├── lotus-model │ │ │ │ └── model │ │ │ │ │ └── lotus-manifest.xml │ │ │ ├── pixie-single │ │ │ │ └── model │ │ │ │ │ ├── single-manifest.xml │ │ │ │ │ ├── single-codegen.xml │ │ │ │ │ └── single-model.xml │ │ │ ├── plexus-model │ │ │ │ └── model │ │ │ │ │ ├── plexus-manifest.xml │ │ │ │ │ └── plexus-codegen.xml │ │ │ ├── tulip-model │ │ │ │ └── model │ │ │ │ │ └── model-manifest.xml │ │ │ ├── wizard-model │ │ │ │ └── model │ │ │ │ │ ├── wizard-manifest.xml │ │ │ │ │ └── wizard-model.xml │ │ │ ├── ebay-request │ │ │ │ ├── model │ │ │ │ │ ├── AddItemRequest-model.xml │ │ │ │ │ ├── AddItemRequest-manifest.xml │ │ │ │ │ └── AddItemRequest-codegen.xml │ │ │ │ └── test-resources │ │ │ │ │ └── AddItemRequest.xml │ │ │ ├── ebay-response │ │ │ │ ├── model │ │ │ │ │ ├── AddItemResponse-model.xml │ │ │ │ │ ├── AddItemResponse-manifest.xml │ │ │ │ │ └── AddItemResponse-codegen.xml │ │ │ │ └── test-resources │ │ │ │ │ └── AddItemResponse.xml │ │ │ ├── model-all-sqlmap │ │ │ │ └── model │ │ │ │ │ ├── sqlMap-manifest.xml │ │ │ │ │ ├── sqlMap-codegen.xml │ │ │ │ │ └── sqlMap-model.xml │ │ │ ├── phoenix-config │ │ │ │ └── model │ │ │ │ │ └── config-manifest.xml │ │ │ ├── tulip-graphql │ │ │ │ └── model │ │ │ │ │ ├── graphql-manifest.xml │ │ │ │ │ ├── graphql-codegen.xml │ │ │ │ │ └── graphql-model.xml │ │ │ ├── cat-ip-report │ │ │ │ └── model │ │ │ │ │ ├── ip-report-manifest.xml │ │ │ │ │ ├── ip-report-codegen.xml │ │ │ │ │ └── ip-report-model.xml │ │ │ ├── cat2-tenant-report │ │ │ │ ├── model │ │ │ │ │ └── tenant-manifest.xml │ │ │ │ ├── sources │ │ │ │ │ └── org │ │ │ │ │ │ └── unidal │ │ │ │ │ │ └── cat │ │ │ │ │ │ └── report │ │ │ │ │ │ └── Report.java │ │ │ │ └── test-resources │ │ │ │ │ └── tenant-report.xml │ │ │ ├── phoenix-project │ │ │ │ └── model │ │ │ │ │ ├── project-manifest.xml │ │ │ │ │ ├── project-model.xml │ │ │ │ │ └── project-codegen.xml │ │ │ ├── phoenix-response │ │ │ │ └── model │ │ │ │ │ ├── response-manifest.xml │ │ │ │ │ ├── response-model.xml │ │ │ │ │ └── response-codegen.xml │ │ │ ├── starter-metadata │ │ │ │ └── model │ │ │ │ │ ├── metadata-manifest.xml │ │ │ │ │ └── metadata-model.xml │ │ │ ├── tulip-scenario │ │ │ │ └── model │ │ │ │ │ ├── scenario-manifest.xml │ │ │ │ │ ├── scenarios-manifest.xml │ │ │ │ │ ├── scenarios-model.xml │ │ │ │ │ └── scenarios-codegen.xml │ │ │ ├── dianping-deployment │ │ │ │ └── model │ │ │ │ │ ├── deployment-manifest.xml │ │ │ │ │ ├── deployment-model.xml │ │ │ │ │ └── deployment-codegen.xml │ │ │ ├── cat-event-report │ │ │ │ └── model │ │ │ │ │ └── event-report-manifest.xml │ │ │ ├── dianping-liger-datasource │ │ │ │ └── model │ │ │ │ │ ├── datasource-manifest.xml │ │ │ │ │ ├── datasource-model.xml │ │ │ │ │ └── datasource-codegen.xml │ │ │ ├── cat-problem-report │ │ │ │ └── model │ │ │ │ │ └── problem-report-manifest.xml │ │ │ ├── cat-routing-table │ │ │ │ └── model │ │ │ │ │ └── routing-table-manifest.xml │ │ │ ├── cat2-client-config │ │ │ │ └── model │ │ │ │ │ ├── client-config-manifest.xml │ │ │ │ │ ├── client-config-codegen.xml │ │ │ │ │ └── client-config-model.xml │ │ │ ├── dianping-zebra-config │ │ │ │ └── model │ │ │ │ │ ├── system-config-manifest.xml │ │ │ │ │ ├── system-config-codegen.xml │ │ │ │ │ └── system-config-model.xml │ │ │ ├── cat-heartbeat-report │ │ │ │ └── model │ │ │ │ │ ├── heartbeat-report-manifest.xml │ │ │ │ │ └── heartbeat-report-codegen.xml │ │ │ ├── cat-threshold-template │ │ │ │ └── model │ │ │ │ │ ├── threshold-template-manifest.xml │ │ │ │ │ ├── threshold-template-codegen.xml │ │ │ │ │ └── threshold-template-model.xml │ │ │ └── cat-transaction-report │ │ │ │ └── model │ │ │ │ └── transaction-report-manifest.xml │ │ ├── dal-jdbc │ │ │ ├── garden │ │ │ │ └── model │ │ │ │ │ ├── garden-dal.xml │ │ │ │ │ └── garden-manifest.xml │ │ │ ├── jdbc-user │ │ │ │ └── model │ │ │ │ │ └── user-manifest.xml │ │ │ ├── cms-tulip │ │ │ │ └── model │ │ │ │ │ └── cms-manifest.xml │ │ │ ├── cat2-alert │ │ │ │ └── model │ │ │ │ │ ├── alert-manifest.xml │ │ │ │ │ └── alert-dal.xml │ │ │ ├── catng-meta │ │ │ │ └── model │ │ │ │ │ └── event-manifest.xml │ │ │ ├── cat2-config │ │ │ │ └── model │ │ │ │ │ ├── system-manifest.xml │ │ │ │ │ └── system-dal.xml │ │ │ ├── cat2-report │ │ │ │ └── model │ │ │ │ │ └── report-manifest.xml │ │ │ ├── dianping-phoenix │ │ │ │ └── model │ │ │ │ │ └── deploy-manifest.xml │ │ │ └── sources │ │ │ │ └── org │ │ │ │ └── unidal │ │ │ │ └── dal │ │ │ │ └── jdbc │ │ │ │ ├── QueryType.java │ │ │ │ ├── DalException.java │ │ │ │ ├── annotation │ │ │ │ ├── SubObjects.java │ │ │ │ ├── Variable.java │ │ │ │ ├── Entity.java │ │ │ │ ├── Relation.java │ │ │ │ └── Attribute.java │ │ │ │ ├── Updateset.java │ │ │ │ ├── AbstractDao.java │ │ │ │ ├── DataField.java │ │ │ │ ├── Readset.java │ │ │ │ ├── QueryEngine.java │ │ │ │ └── QueryDef.java │ │ └── java │ │ │ └── org │ │ │ └── unidal │ │ │ └── maven │ │ │ └── plugin │ │ │ └── codegen │ │ │ ├── DalJdbcTests.java │ │ │ ├── DalModelTests.java │ │ │ └── AllTests.java │ └── main │ │ ├── resources │ │ └── META-INF │ │ │ └── dal │ │ │ ├── model │ │ │ ├── structure.xml │ │ │ └── xsl │ │ │ │ ├── naming.xsl │ │ │ │ ├── ientity.xsl │ │ │ │ └── ivisitor_enabled.xsl │ │ │ └── jdbc │ │ │ ├── xsl │ │ │ └── naming.xsl │ │ │ └── structure.xml │ │ └── java │ │ └── org │ │ └── unidal │ │ └── maven │ │ └── plugin │ │ └── codegen │ │ └── function │ │ ├── Collection.java │ │ └── Normalizer.java └── pom.xml ├── codegen-foundation └── src │ ├── main │ ├── resources │ │ └── META-INF │ │ │ ├── wizard │ │ │ ├── manifest.xml │ │ │ └── wizard.xml │ │ │ └── dal │ │ │ └── model │ │ │ └── model-manifest.xml │ └── java │ │ └── org │ │ └── unidal │ │ └── codegen │ │ ├── code │ │ └── Obfuscater.java │ │ ├── framework │ │ ├── XslGenerator.java │ │ ├── XslTransformer.java │ │ ├── FileStorage.java │ │ ├── XmlAggregator.java │ │ ├── FileMode.java │ │ ├── OperationMode.java │ │ ├── GenerationContext.java │ │ ├── DefaultFileStorage.java │ │ └── build │ │ │ └── ComponentsConfigurator.java │ │ └── model │ │ ├── IEntity.java │ │ ├── IVisitor.java │ │ └── entity │ │ └── StructureModel.java │ └── test │ ├── resources │ └── org │ │ └── unidal │ │ └── codegen │ │ ├── aggregator │ │ └── jdbc_manifest.xml │ │ ├── framework │ │ ├── meta-manifest.xml │ │ ├── structure.xml │ │ ├── xsl │ │ │ ├── entity.xsl │ │ │ ├── decorate.xsl │ │ │ ├── normalize.xsl │ │ │ └── template.xsl │ │ └── abstract.txt │ │ └── codegen.xml │ ├── java │ └── org │ │ └── unidal │ │ └── codegen │ │ ├── framework │ │ ├── FileStorageTest.java │ │ ├── AllTests.java │ │ └── XmlAggregatorTest.java │ │ └── code │ │ └── ObfuscaterTest.java │ └── draft │ └── org │ └── unidal │ └── codegen │ └── generator │ └── model │ └── cat │ └── NativeTest.java ├── source-code-maven-plugin └── src │ ├── main │ ├── resources │ │ └── META-INF │ │ │ ├── wizard │ │ │ ├── manifest.xml │ │ │ └── wizard.xml │ │ │ └── dal │ │ │ └── model │ │ │ ├── lines-manifest.xml │ │ │ └── lines-codegen.xml │ └── java │ │ └── org │ │ └── unidal │ │ └── maven │ │ └── plugin │ │ └── source │ │ ├── pipeline │ │ ├── SourcePipeline.java │ │ ├── SourceHandler.java │ │ ├── SourceHandlerContext.java │ │ ├── Source.java │ │ ├── SourceScope.java │ │ ├── SourceHandlerAdaptor.java │ │ └── AbstractSourceHandlerContext.java │ │ └── lines │ │ ├── IEntity.java │ │ ├── IVisitor.java │ │ └── Constants.java │ └── test │ ├── java │ └── org │ │ └── unidal │ │ └── maven │ │ └── plugin │ │ └── source │ │ ├── AllTests.java │ │ ├── LinesMojoTest.java │ │ └── UpgradeMojoTest.java │ └── resources │ └── org │ └── unidal │ └── maven │ └── plugin │ └── source │ └── lines.xml ├── README.md ├── project-maven-plugin └── src │ ├── main │ └── java │ │ └── org │ │ └── unidal │ │ └── maven │ │ └── plugin │ │ └── project │ │ └── rule │ │ ├── RuleType.java │ │ ├── IRuleErrorHandler.java │ │ ├── IRuleExemptionHandler.java │ │ ├── RuleConfigurator.java │ │ └── IRule.java │ └── test │ └── java │ └── org │ └── unidal │ └── maven │ └── plugin │ └── project │ └── AllTests.java ├── .travis.yml └── plexus-maven-plugin ├── src └── test │ ├── java │ ├── org │ │ └── unidal │ │ │ └── maven │ │ │ └── plugin │ │ │ └── codegen │ │ │ └── AllTests.java │ └── bootstrap │ │ └── BootstrapTest.java │ └── resources │ └── org │ └── unidal │ └── maven │ └── plugin │ └── codegen │ └── plexus │ └── profile.xml └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | /ws/* 2 | bin 3 | target 4 | .* 5 | wizard-maven-plugin/datasources.xml 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/maven/plugin/property/example.properties: -------------------------------------------------------------------------------- 1 | name1=value1 2 | name2=value2 -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/resources/META-INF/services/javax.script.ScriptEngineFactory: -------------------------------------------------------------------------------- 1 | org.unidal.maven.plugin.codegen.scenario.MyScriptingEngineFactory -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/ErrorObject.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc; 2 | 3 | public class ErrorObject { 4 | } 5 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/jdbc/garden/model/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/garden/model/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/resources/META-INF/wizard/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/jdbc/cat/model/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/pixie/model/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/resources/META-INF/wizard/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/Action.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc; 2 | 3 | public interface Action { 4 | public String getName(); 5 | } 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/model-all/model/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/model-array/model/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/model-key/model/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/model-visitor/model/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/resources/META-INF/wizard/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/garden/model/garden-dal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/egret-project/model/projects-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/web-mvc/model/mvc-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/META-INF/wizard/jdbc/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/META-INF/wizard/model/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/META-INF/wizard/webapp/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/expense-book/model/book-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-configure/sources/com/dianping/phoenix/lb/model/State.java: -------------------------------------------------------------------------------- 1 | package com.dianping.phoenix.lb.model; 2 | 3 | public enum State { 4 | ENABLED; 5 | } 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-deploy/sources/com/dianping/phoenix/deploy/DeployPlan.java: -------------------------------------------------------------------------------- 1 | package com.dianping.phoenix.deploy; 2 | 3 | public enum DeployPlan { 4 | UNKNOWN; 5 | } 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/codegen/generator/wizard/garden/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/codegen/generator/wizard/pixie/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/Module.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc; 2 | 3 | public interface Module { 4 | public Class>[] getPageHandlers(); 5 | } 6 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/code/Obfuscater.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.code; 2 | 3 | public interface Obfuscater { 4 | 5 | public String encode(String src) throws Exception; 6 | 7 | } -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-configure/sources/com/dianping/phoenix/lb/model/Availablity.java: -------------------------------------------------------------------------------- 1 | package com.dianping.phoenix.lb.model; 2 | 3 | public enum Availablity { 4 | AVAILABLE; 5 | } 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/jdbc-user/model/user-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/resources/org/unidal/codegen/generator/model/test/eunit_testfwk_manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/Page.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc; 2 | 3 | public interface Page { 4 | public String getName(); 5 | 6 | public String getPath(); 7 | } 8 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/cms-tulip/model/cms-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dobby-model/sources/org/unidal/codegen/generator/model/dobby/TicketState.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.generator.model.dobby; 2 | 3 | public enum TicketState { 4 | UNKNOWN; 5 | } 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/xpipe-keeper/model/keeper-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/resources/org/unidal/codegen/aggregator/jdbc_manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/garden/model/garden-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-bug/model/bug-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ebay-service/model/AddItem-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/resources/org/unidal/codegen/generator/model/test/ctest_report_model_manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/resources/org/unidal/codegen/generator/model/test/eunit_cmd_testfwk_manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/META-INF/dal/jdbc/user-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/codegen/generator/wizard/cat/home-jdbc-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/codegen/generator/wizard/cat/home-webapp-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/codegen/generator/wizard/phoenix/console-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/codegen/generator/wizard/phoenix/service-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/resources/META-INF/dal/model/model-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/cat2-alert/model/alert-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/catng-meta/model/event-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/expense-book/model/book-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/hermes-meta/model/meta-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-rule/model/rule-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/rose-model/model/model-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/META-INF/dal/jdbc/alarm-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/codegen/generator/wizard/phoenix/environment-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/model/ModuleRegistry.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.model; 2 | 3 | import org.unidal.lookup.annotation.Named; 4 | 5 | @Named 6 | public class ModuleRegistry { 7 | } 8 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/framework/XslGenerator.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.framework; 2 | 3 | public interface XslGenerator { 4 | public void generate(GenerationContext ctx) throws Exception; 5 | } 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/cat2-config/model/system-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/cat2-report/model/report-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-client/model/client-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-server/model/server-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-status/model/status-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ctrip-kpi-fx/model/fx-kpi-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dianping-liger/model/model-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dobby-model/model/model-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/lotus-model/model/lotus-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/pixie-single/model/single-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/plexus-model/model/plexus-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/tulip-model/model/model-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/wizard-model/model/wizard-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/resources/org/unidal/codegen/generator/model/test/eunit_benchmark_testfwk_manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/resources/META-INF/dal/model/wizard-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/META-INF/dal/jdbc/report-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/Validator.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc; 2 | 3 | public interface Validator> { 4 | public void validate(T context) throws Exception; 5 | } 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | maven-plugins [![Build Status](https://travis-ci.org/unidal/maven-plugins.png?branch=master)](https://travis-ci.org/unidal/maven-plugins) 2 | ============= 3 | * codegen-maven-plugin 4 | * plexus-maven-plugin 5 | * wizard-maven-plugin 6 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/resources/org/unidal/codegen/framework/meta-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/dianping-phoenix/model/deploy-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ebay-request/model/AddItemRequest-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ebay-response/model/AddItemResponse-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ebay-service/model/AddItem-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/model-all-sqlmap/model/sqlMap-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-config/model/config-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-deploy/model/deploy-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/tulip-graphql/model/graphql-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/resources/META-INF/dal/model/lines-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/QueryType.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc; 2 | 3 | public enum QueryType { 4 | SELECT, 5 | 6 | INSERT, 7 | 8 | UPDATE, 9 | 10 | DELETE; 11 | } 12 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-ip-report/model/ip-report-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat2-tenant-report/model/tenant-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/egret-project/model/projects-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-project/model/project-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-response/model/response-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/starter-metadata/model/metadata-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/tulip-scenario/model/scenario-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-configure/model/configure-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/tulip-scenario/model/scenarios-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/java/org/unidal/maven/plugin/property/PropertyProvider.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.property; 2 | 3 | public interface PropertyProvider { 4 | public String getProperty(String property, String defaultValue); 5 | } 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dianping-deployment/model/deployment-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/resources/org/unidal/codegen/generator/model/test/eunit_excel_manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project-maven-plugin/src/main/java/org/unidal/maven/plugin/project/rule/RuleType.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.project.rule; 2 | 3 | public enum RuleType { 4 | CLASS, 5 | 6 | FIELD, 7 | 8 | CONSTRUCTOR, 9 | 10 | METHOD; 11 | } 12 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/java/org/unidal/maven/plugin/wizard/scenario/JdbcTests.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.wizard.scenario; 2 | 3 | import org.junit.runner.RunWith; 4 | 5 | @RunWith(JdbcRunner.class) 6 | public class JdbcTests { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-event-report/model/event-report-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dianping-liger-datasource/model/datasource-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ebay-request/model/AddItemRequest-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/java/org/unidal/maven/plugin/wizard/scenario/WebAppTests.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.wizard.scenario; 2 | 3 | import org.junit.runner.RunWith; 4 | 5 | @RunWith(WebAppRunner.class) 6 | public class WebAppTests { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-problem-report/model/problem-report-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-routing-table/model/routing-table-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat2-client-config/model/client-config-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dianping-zebra-config/model/system-config-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ebay-response/model/AddItemResponse-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/resources/org/unidal/codegen/generator/model/test/eunit_resource_manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/java/org/unidal/maven/plugin/source/pipeline/SourcePipeline.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.source.pipeline; 2 | 3 | public interface SourcePipeline extends SourceHandler { 4 | public void addLast(SourceHandler handler); 5 | } 6 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/jdbc/sources/org/unidal/dal/jdbc/datasource/JdbcDataSourceDescriptorManager.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc.datasource; 2 | 3 | import org.unidal.lookup.annotation.Named; 4 | 5 | @Named 6 | public class JdbcDataSourceDescriptorManager { 7 | } 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | 3 | cache: 4 | directories: 5 | - ~/.m2 6 | 7 | git: 8 | depth: 1 9 | 10 | branches: 11 | only: 12 | - master 13 | 14 | install: 15 | mvn clean install -Dmaven.test.skip -B -fae -s settings.xml 16 | 17 | script: true 18 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-heartbeat-report/model/heartbeat-report-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-threshold-template/model/threshold-template-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-transaction-report/model/transaction-report-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/maven/plugin/wizard/catconfig/web-2.3-before.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/java/org/unidal/maven/plugin/codegen/DalJdbcTests.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.codegen; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.unidal.maven.plugin.codegen.scenario.DalJdbcRunner; 5 | 6 | @RunWith(DalJdbcRunner.class) 7 | public class DalJdbcTests { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/model/entity/ModuleModel.java: -------------------------------------------------------------------------------- 1 | /* THIS FILE WAS AUTO GENERATED BY codegen-maven-plugin, DO NOT EDIT IT */ 2 | package org.unidal.web.mvc.model.entity; 3 | 4 | public class ModuleModel { 5 | public String getModuleName() { 6 | return null; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/resources/META-INF/wizard/wizard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | src/test/resources/org/unidal/codegen/codegen.xml 5 | 6 | 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/model-array/test-resources/sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/java/org/unidal/maven/plugin/codegen/DalModelTests.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.codegen; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.unidal.maven.plugin.codegen.scenario.DalModelRunner; 5 | 6 | @RunWith(DalModelRunner.class) 7 | public class DalModelTests { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/model/IEntity.java: -------------------------------------------------------------------------------- 1 | /* THIS FILE WAS AUTO GENERATED BY codegen-maven-plugin, DO NOT EDIT IT */ 2 | package org.unidal.codegen.model; 3 | 4 | public interface IEntity { 5 | public void accept(IVisitor visitor); 6 | 7 | public void mergeAttributes(T other); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/model-all-sqlmap/model/sqlMap-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project-maven-plugin/src/main/java/org/unidal/maven/plugin/project/rule/IRuleErrorHandler.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.project.rule; 2 | 3 | import java.lang.reflect.AnnotatedElement; 4 | 5 | public interface IRuleErrorHandler { 6 | public void onError(AnnotatedElement source, AnnotatedElement target, RuleFailure failure); 7 | } 8 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/jdbc/sources/org/unidal/dal/jdbc/configuration/AbstractJdbcResourceConfigurator.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc.configuration; 2 | 3 | import org.unidal.lookup.configuration.AbstractResourceConfigurator; 4 | 5 | public abstract class AbstractJdbcResourceConfigurator extends AbstractResourceConfigurator { 6 | } 7 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ebay-response/test-resources/AddItemResponse.xml: -------------------------------------------------------------------------------- 1 | 2 | Success 3 | 110071690410 4 | 5 | 6 | InsertionFee 7 | 0.5 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /project-maven-plugin/src/main/java/org/unidal/maven/plugin/project/rule/IRuleExemptionHandler.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.project.rule; 2 | 3 | import java.lang.reflect.AnnotatedElement; 4 | 5 | public interface IRuleExemptionHandler { 6 | public void onExemption(AnnotatedElement source, AnnotatedElement target, RuleExemption exemption); 7 | } 8 | -------------------------------------------------------------------------------- /plexus-maven-plugin/src/test/java/org/unidal/maven/plugin/codegen/AllTests.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.codegen; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.junit.runners.Suite; 5 | import org.junit.runners.Suite.SuiteClasses; 6 | 7 | @RunWith(Suite.class) 8 | @SuiteClasses({ 9 | 10 | }) 11 | public class AllTests { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/java/org/unidal/maven/plugin/wizard/model/IEntity.java: -------------------------------------------------------------------------------- 1 | /* THIS FILE WAS AUTO GENERATED BY codegen-maven-plugin, DO NOT EDIT IT */ 2 | package org.unidal.maven.plugin.wizard.model; 3 | 4 | public interface IEntity { 5 | public void accept(IVisitor visitor); 6 | 7 | public void mergeAttributes(T other); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/resources/META-INF/wizard/wizard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | src/test/resources/org/unidal/maven/plugin/wizard/wizard.xml 5 | 6 | 7 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/java/org/unidal/maven/plugin/source/lines/IEntity.java: -------------------------------------------------------------------------------- 1 | /* THIS FILE WAS AUTO GENERATED BY codegen-maven-plugin, DO NOT EDIT IT */ 2 | package org.unidal.maven.plugin.source.lines; 3 | 4 | public interface IEntity { 5 | public void accept(IVisitor visitor); 6 | 7 | public void mergeAttributes(T other); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/java/org/unidal/maven/plugin/wizard/meta/WizardMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.wizard.meta; 2 | 3 | import java.io.Reader; 4 | 5 | import org.jdom.Document; 6 | 7 | public interface WizardMeta { 8 | public Document getWizard(Reader reader); 9 | 10 | public Document getManifest(String wizardXml); 11 | } 12 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/ActionPayload.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc; 2 | 3 | public interface ActionPayload { 4 | public T getAction(); 5 | 6 | public S getPage(); 7 | 8 | public void setPage(String page); 9 | 10 | public void validate(ActionContext ctx); 11 | } 12 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/resources/META-INF/wizard/wizard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | src/test/resources/org/unidal/maven/plugin/source/lines.xml 5 | 6 | 7 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/ActionContext.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc; 2 | 3 | public abstract class ActionContext> { 4 | public void sendError(int code, String message) { 5 | } 6 | 7 | public boolean isProcessStopped() { 8 | return false; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/lifecycle/ActionResolver.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.lifecycle; 2 | 3 | import org.unidal.web.mvc.payload.ParameterProvider; 4 | 5 | public interface ActionResolver { 6 | public UrlMapping parseUrl(ParameterProvider provider); 7 | 8 | public String buildUrl(ParameterProvider provider, UrlMapping mapping); 9 | } 10 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/framework/XslTransformer.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.framework; 2 | 3 | import java.net.URL; 4 | import java.util.Map; 5 | 6 | import javax.xml.transform.TransformerException; 7 | 8 | public interface XslTransformer { 9 | public String transform(URL template, String source, Map parameters) throws TransformerException; 10 | } 11 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ebay-request/test-resources/AddItemRequest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ABC...123 4 | 5 | 6 | 500.0 7 | 1000 8 | US 9 | 10 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/resources/org/unidal/codegen/generator/model/test/eunit_resource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/java/org/unidal/maven/plugin/source/pipeline/SourceHandler.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.source.pipeline; 2 | 3 | public interface SourceHandler { 4 | public void handleStart(SourceHandlerContext ctx, SourceScope scope); 5 | 6 | public void handleEnd(SourceHandlerContext ctx, SourceScope scope); 7 | 8 | public void handleLine(SourceHandlerContext ctx, String line); 9 | } 10 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/java/org/unidal/maven/plugin/codegen/AllTests.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.codegen; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.junit.runners.Suite; 5 | import org.junit.runners.Suite.SuiteClasses; 6 | 7 | @RunWith(Suite.class) 8 | @SuiteClasses({ 9 | 10 | DalModelTests.class, 11 | 12 | DalJdbcTests.class, 13 | 14 | }) 15 | public class AllTests { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/rose-model/model/model-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/java/org/unidal/maven/plugin/wizard/meta/ModelMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.wizard.meta; 2 | 3 | import java.io.Reader; 4 | 5 | import org.jdom.Document; 6 | 7 | public interface ModelMeta { 8 | public Document getCodegen(Reader reader); 9 | 10 | public Document getModel(String packageName); 11 | 12 | public Document getManifest(String codegenXml, String modelXml); 13 | } 14 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat2-tenant-report/sources/org/unidal/cat/report/Report.java: -------------------------------------------------------------------------------- 1 | package org.unidal.cat.report; 2 | 3 | import java.util.Date; 4 | 5 | public interface Report { 6 | // 2020-01-01 00:00:00 7 | public static final long EPOCH = 1577808000000L; 8 | 9 | public int getDomainId(); 10 | 11 | public ReportPeriod getPeriod(); 12 | 13 | public Date getStartTime(); 14 | 15 | public int getHour(); 16 | } 17 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/PageHandler.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.servlet.ServletException; 6 | 7 | public interface PageHandler> { 8 | public void handleInbound(T ctx) throws ServletException, IOException; 9 | 10 | public void handleOutbound(T ctx) throws ServletException, IOException; 11 | } 12 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/java/org/unidal/codegen/framework/FileStorageTest.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.framework; 2 | 3 | import org.junit.Test; 4 | import org.unidal.lookup.ComponentTestCase; 5 | 6 | public class FileStorageTest extends ComponentTestCase { 7 | @Test 8 | public void test() throws Exception { 9 | FileStorage storage = lookup(FileStorage.class); 10 | 11 | System.out.println(storage); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/ViewModel.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc; 2 | 3 | public abstract class ViewModel

> { 4 | public ViewModel(M actionContext) { 5 | } 6 | 7 | public abstract A getDefaultAction(); 8 | 9 | public void setAction(A action) { 10 | } 11 | 12 | public void setPage(P action) { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/xpipe-keeper/model/keeper-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/ActionException.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc; 2 | 3 | public class ActionException extends Exception { 4 | private static final long serialVersionUID = 1L; 5 | 6 | public ActionException(String message) { 7 | super(message); 8 | } 9 | 10 | public ActionException(String message, Throwable cause) { 11 | super(message, cause); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/DalException.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc; 2 | 3 | public class DalException extends Exception { 4 | private static final long serialVersionUID = 7621577151593643911L; 5 | 6 | public DalException(String message) { 7 | super(message); 8 | } 9 | 10 | public DalException(String message, Throwable cause) { 11 | super(message, cause); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/framework/FileStorage.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.framework; 2 | 3 | import java.io.IOException; 4 | 5 | import org.unidal.codegen.model.entity.OutputModel; 6 | 7 | public interface FileStorage { 8 | public void copyResources(GenerationContext ctx, OutputModel output) throws IOException; 9 | 10 | public void writeFile(GenerationContext ctx, OutputModel output, String content) throws IOException; 11 | } 12 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/resources/org/unidal/codegen/framework/structure.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/annotation/SubObjects.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target(ElementType.FIELD) 10 | public @interface SubObjects { 11 | String[] value(); 12 | } 13 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/test/java/org/unidal/maven/plugin/source/AllTests.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.source; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.junit.runners.Suite; 5 | import org.junit.runners.Suite.SuiteClasses; 6 | import org.unidal.maven.plugin.source.pipeline.SourcePipelineTest; 7 | 8 | @RunWith(Suite.class) 9 | @SuiteClasses({ 10 | 11 | SourcePipelineTest.class, 12 | 13 | }) 14 | public class AllTests { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/pixie/model/wizard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/annotation/ErrorActionMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.annotation; 2 | 3 | import static java.lang.annotation.ElementType.METHOD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(METHOD) 11 | public @interface ErrorActionMeta { 12 | String name(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-response/model/response-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/annotation/TransitionMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.annotation; 2 | 3 | import static java.lang.annotation.ElementType.METHOD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(METHOD) 11 | public @interface TransitionMeta { 12 | String name(); 13 | } 14 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/payload/annotation/PathMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.payload.annotation; 2 | 3 | import static java.lang.annotation.ElementType.FIELD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(FIELD) 11 | public @interface PathMeta { 12 | String value(); 13 | } 14 | -------------------------------------------------------------------------------- /project-maven-plugin/src/test/java/org/unidal/maven/plugin/project/AllTests.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.project; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.junit.runners.Suite; 5 | import org.junit.runners.Suite.SuiteClasses; 6 | import org.unidal.maven.plugin.project.rule.RuleEngineTest; 7 | 8 | @RunWith(Suite.class) 9 | @SuiteClasses({ 10 | 11 | //MigrateMojoTest.class, 12 | 13 | RuleEngineTest.class 14 | 15 | }) 16 | public class AllTests { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/java/org/unidal/maven/plugin/source/pipeline/SourceHandlerContext.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.source.pipeline; 2 | 3 | public interface SourceHandlerContext { 4 | public void fireEnd(SourceScope scope); 5 | 6 | public void fireLine(String line); 7 | 8 | public void fireStart(SourceScope scope); 9 | 10 | public SourceHandler handler(); 11 | 12 | public SourcePipeline pipeline(); 13 | 14 | public Source source(); 15 | } 16 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/payload/annotation/ObjectMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.payload.annotation; 2 | 3 | import static java.lang.annotation.ElementType.FIELD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(FIELD) 11 | public @interface ObjectMeta { 12 | String value(); 13 | } 14 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/model-all-sqlmap/model/sqlMap-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/payload/annotation/PathPatternMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.payload.annotation; 2 | 3 | import static java.lang.annotation.ElementType.TYPE; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(TYPE) 11 | public @interface PathPatternMeta { 12 | String value(); 13 | } 14 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/annotation/OutboundActionMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.annotation; 2 | 3 | import static java.lang.annotation.ElementType.METHOD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(METHOD) 11 | public @interface OutboundActionMeta { 12 | String name(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/annotation/PreInboundActionMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.annotation; 2 | 3 | import static java.lang.annotation.ElementType.METHOD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(METHOD) 11 | public @interface PreInboundActionMeta { 12 | String[] value(); 13 | } 14 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/main/resources/META-INF/dal/model/structure.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/test/resources/org/unidal/maven/plugin/source/lines.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/hermes-meta/model/meta-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | public final static String LOCAL = "local"; 7 | public final static String BROKER = "broker"; 8 | public final static 9 | String TRANSACTION = "transaction"; 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/framework/XmlAggregator.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.framework; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | 6 | import org.unidal.codegen.model.entity.Any; 7 | import org.unidal.codegen.model.entity.StructureModel; 8 | import org.unidal.codegen.model.entity.ManifestModel; 9 | 10 | public interface XmlAggregator { 11 | public Any aggregate(File manifestXml, StructureModel structure, ManifestModel manifest) throws IOException; 12 | } 13 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/annotation/Variable.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target(ElementType.FIELD) 10 | public @interface Variable { 11 | int sqlType() default Integer.MIN_VALUE; 12 | 13 | int scale() default 0; 14 | } 15 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/PayloadProvider.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc; 2 | 3 | import java.util.List; 4 | 5 | import org.unidal.web.lifecycle.UrlMapping; 6 | import org.unidal.web.mvc.payload.ParameterProvider; 7 | 8 | public interface PayloadProvider { 9 | public void register(Class payloadClass); 10 | 11 | public List process(UrlMapping mapping, ParameterProvider parameterProvider, ActionPayload payload); 12 | } 13 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/Updateset.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc; 2 | 3 | import java.util.Arrays; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | 8 | public class Updateset { 9 | private List m_fields; 10 | 11 | public Updateset(DataField... fields) { 12 | m_fields = Collections.unmodifiableList(Arrays.asList(fields)); 13 | } 14 | 15 | public List getFields() { 16 | return m_fields; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/annotation/Entity.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target(ElementType.TYPE) 10 | public @interface Entity { 11 | String logicalName(); 12 | 13 | String physicalName() default ""; 14 | 15 | String alias(); 16 | } 17 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/java/org/unidal/maven/plugin/wizard/meta/TableMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.wizard.meta; 2 | 3 | import java.sql.DatabaseMetaData; 4 | import java.sql.SQLException; 5 | 6 | import org.jdom.Document; 7 | import org.jdom.Element; 8 | 9 | public interface TableMeta { 10 | public Element getTableMeta(DatabaseMetaData meta, String table) throws SQLException; 11 | 12 | public Document getModel(String packageName); 13 | 14 | public Document getManifest(String codegenXml, String modelXml); 15 | } 16 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/annotation/ModulePagesMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.annotation; 2 | 3 | import static java.lang.annotation.ElementType.TYPE; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | import org.unidal.web.mvc.PageHandler; 10 | 11 | @Retention(RUNTIME) 12 | @Target(TYPE) 13 | public @interface ModulePagesMeta { 14 | Class>[] value(); 15 | } 16 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-project/model/project-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-rule/model/rule-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/view/HtmlTemplate.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.view; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.servlet.ServletException; 6 | 7 | import org.unidal.lookup.annotation.Named; 8 | import org.unidal.web.mvc.ActionContext; 9 | import org.unidal.web.mvc.ViewModel; 10 | 11 | @Named 12 | public class HtmlTemplate { 13 | 14 | public void render(String template, ActionContext ctx, ViewModel model) 15 | throws ServletException, IOException { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/META-INF/wizard/model/wizard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | src/test/resources/org/unidal/maven/plugin/wizard/wizard.xml 5 | 6 | 7 | src/test/resources/org/unidal/maven/plugin/wizard/template.xml 8 | 9 | 10 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-rule/model/rule-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/annotation/InboundActionMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.annotation; 2 | 3 | import static java.lang.annotation.ElementType.METHOD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(METHOD) 11 | public @interface InboundActionMeta { 12 | String name(); 13 | 14 | String transition() default ""; 15 | 16 | String errorAction() default ""; 17 | } 18 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/annotation/Relation.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target(ElementType.FIELD) 10 | public @interface Relation { 11 | String logicalName(); 12 | 13 | String alias(); 14 | 15 | String join(); 16 | 17 | boolean multiple() default false; 18 | } 19 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/java/org/unidal/codegen/code/ObfuscaterTest.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.code; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | import org.unidal.helper.Codes; 6 | import org.unidal.lookup.ComponentTestCase; 7 | 8 | public class ObfuscaterTest extends ComponentTestCase { 9 | @Test 10 | public void testEncode() throws Exception { 11 | Obfuscater o = lookup(Obfuscater.class); 12 | String str = o.encode("Hello, world!"); 13 | 14 | Assert.assertEquals("Hello, world!", Codes.forDecode().decode(str)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/codegen/generator/wizard/phoenix/service-wizard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/codegen/generator/wizard/pixie/wizard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | Home 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/java/org/unidal/codegen/framework/AllTests.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.framework; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.junit.runners.Suite; 5 | import org.junit.runners.Suite.SuiteClasses; 6 | import org.unidal.codegen.code.ObfuscaterTest; 7 | 8 | @RunWith(Suite.class) 9 | @SuiteClasses({ 10 | 11 | FileStorageTest.class, 12 | 13 | XmlAggregatorTest.class, 14 | 15 | XslGeneratorTest.class, 16 | 17 | XslTransformerTest.class, 18 | 19 | ObfuscaterTest.class, 20 | 21 | }) 22 | public class AllTests { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/lifecycle/UrlMapping.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.lifecycle; 2 | 3 | public interface UrlMapping { 4 | public String getAction(); 5 | 6 | public String getContextPath(); 7 | 8 | public String getModule(); 9 | 10 | public String getPathInfo(); 11 | 12 | public String getQueryString(); 13 | 14 | public String getRawAction(); 15 | 16 | public String getRawModule(); 17 | 18 | public String getServletPath(); 19 | 20 | public void setAction(String action); 21 | 22 | public void setModule(String module); 23 | } -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/tulip-scenario/model/scenarios-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/annotation/ValidationMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.annotation; 2 | 3 | import static java.lang.annotation.ElementType.METHOD; 4 | import static java.lang.annotation.ElementType.TYPE; 5 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 6 | 7 | import java.lang.annotation.Retention; 8 | import java.lang.annotation.Target; 9 | 10 | import org.unidal.web.mvc.Validator; 11 | 12 | @Retention(RUNTIME) 13 | @Target({ METHOD, TYPE }) 14 | public @interface ValidationMeta { 15 | Class>[] value(); 16 | } 17 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/codegen/generator/wizard/phoenix/environment-wizard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Status 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/java/org/unidal/maven/plugin/source/pipeline/Source.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.source.pipeline; 2 | 3 | import java.io.File; 4 | 5 | import org.apache.maven.project.MavenProject; 6 | 7 | public interface Source { 8 | String getClassName(); 9 | 10 | File getFile(); 11 | 12 | File getFolder(); 13 | 14 | String getLine(); 15 | 16 | MavenProject getModule(); 17 | 18 | String getPackage(); 19 | 20 | SourceScope getParentScope(); 21 | 22 | MavenProject getProject(); 23 | 24 | SourceScope getScope(); 25 | 26 | String getSourceRoot(); 27 | 28 | SourcePipeline pipeline(); 29 | } 30 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ebay-request/model/AddItemRequest-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/annotation/PayloadMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.annotation; 2 | 3 | import static java.lang.annotation.ElementType.METHOD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | import org.unidal.web.mvc.Action; 10 | import org.unidal.web.mvc.ActionPayload; 11 | import org.unidal.web.mvc.Page; 12 | 13 | @Retention(RUNTIME) 14 | @Target(METHOD) 15 | public @interface PayloadMeta { 16 | Class> value(); 17 | } 18 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dianping-zebra-config/model/system-config-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/pixie-single/model/single-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/main/java/org/unidal/maven/plugin/codegen/function/Collection.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.codegen.function; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class Collection { 7 | private static List s_values = new ArrayList(); 8 | 9 | public static boolean addIfAbsent(String value) { 10 | if (value == null || value.length() == 0) { 11 | return false; 12 | } else if (s_values.contains(value)) { 13 | return false; 14 | } else { 15 | s_values.add(value); 16 | return true; 17 | } 18 | } 19 | 20 | public static void reset() { 21 | s_values.clear(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ebay-response/model/AddItemResponse-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/java/org/unidal/maven/plugin/source/pipeline/SourceScope.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.source.pipeline; 2 | 3 | public enum SourceScope { 4 | PROJECT, 5 | 6 | MODULE, 7 | 8 | SOURCE, 9 | 10 | TEST_SOURCE, 11 | 12 | RESOURCE, 13 | 14 | TEST_RESOURCE, 15 | 16 | FILE; 17 | 18 | public boolean isFile() { 19 | return this == FILE; 20 | } 21 | 22 | public boolean isProject() { 23 | return this == PROJECT; 24 | } 25 | 26 | public boolean isSource() { 27 | return this == SOURCE || this == TEST_SOURCE; 28 | } 29 | 30 | public boolean isTest() { 31 | return this == TEST_SOURCE || this == TEST_RESOURCE; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/META-INF/wizard/webapp/wizard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | 8 | 9 | Single 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/payload/annotation/PayloadProviderMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.payload.annotation; 2 | 3 | import static java.lang.annotation.ElementType.TYPE; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | import org.unidal.web.mvc.Action; 10 | import org.unidal.web.mvc.Page; 11 | import org.unidal.web.mvc.PayloadProvider; 12 | 13 | @Retention(RUNTIME) 14 | @Target(TYPE) 15 | public @interface PayloadProviderMeta { 16 | Class> value(); 17 | } 18 | -------------------------------------------------------------------------------- /project-maven-plugin/src/main/java/org/unidal/maven/plugin/project/rule/RuleConfigurator.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.project.rule; 2 | 3 | public class RuleConfigurator { 4 | public void configure(RuleRegistry registry) { 5 | for (ClassRule rule : ClassRule.values()) { 6 | registry.register(rule); 7 | } 8 | 9 | for (FieldRule rule : FieldRule.values()) { 10 | registry.register(rule); 11 | } 12 | 13 | for (ConstructorRule rule : ConstructorRule.values()) { 14 | registry.register(rule); 15 | } 16 | 17 | for (MethodRule rule : MethodRule.values()) { 18 | registry.register(rule); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/payload/ParameterProvider.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.payload; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | 8 | public interface ParameterProvider { 9 | public InputStream getFile(String name) throws IOException; 10 | 11 | public String getModuleName(); 12 | 13 | public String[] getParameterNames(); 14 | 15 | public String getParameter(String name); 16 | 17 | public String[] getParameterValues(String name); 18 | 19 | public HttpServletRequest getRequest(); 20 | 21 | public ParameterProvider setRequest(HttpServletRequest request); 22 | } 23 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat2-tenant-report/test-resources/tenant-report.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/AbstractModule.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc; 2 | 3 | import org.unidal.web.mvc.annotation.ErrorActionMeta; 4 | import org.unidal.web.mvc.annotation.TransitionMeta; 5 | 6 | public abstract class AbstractModule implements Module { 7 | public Class>[] getPageHandlers() { 8 | return null; 9 | } 10 | 11 | @TransitionMeta(name = "default") 12 | public void handleTransition(ActionContext ctx) { 13 | // simple cases, nothing here 14 | } 15 | 16 | @ErrorActionMeta(name = "default") 17 | public void onError(ActionContext ctx) { 18 | // ignore error, leave MVC to handle it 19 | } 20 | } -------------------------------------------------------------------------------- /codegen-maven-plugin/src/main/java/org/unidal/maven/plugin/codegen/function/Normalizer.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.codegen.function; 2 | 3 | public class Normalizer { 4 | public static String normalize(String str) { 5 | int len = str.length(); 6 | StringBuilder sb = new StringBuilder(len); 7 | boolean upper = false; 8 | 9 | for (int i = 0; i < len; i++) { 10 | char ch = str.charAt(i); 11 | 12 | if (ch == '-' || ch == '_' || ch == ':') { 13 | upper = true; 14 | } else { 15 | if (upper) { 16 | sb.append(Character.toUpperCase(ch)); 17 | upper = false; 18 | } else { 19 | sb.append(ch); 20 | } 21 | } 22 | } 23 | 24 | return sb.toString(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/maven/plugin/wizard/catconfig/web-2.3-after.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | cat-filter 7 | com.dianping.cat.servlet.CatFilter 8 | 9 | 10 | cat-filter 11 | /* 12 | 13 | 14 | com.dianping.cat.servlet.CatListener 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ebay-service/test-resources/AddItem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ABC...123 5 | 6 | 7 | 500.0 8 | 1000 9 | US 10 | 11 | 12 | 13 | Success 14 | 110071690410 15 | 16 | 17 | InsertionFee 18 | 0.5 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/pixie-single/model/single-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/java/org/unidal/maven/plugin/source/pipeline/SourceHandlerAdaptor.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.source.pipeline; 2 | 3 | public class SourceHandlerAdaptor implements SourceHandler { 4 | protected SourceHandlerContext getContext(SourceHandlerContext ctx) { 5 | return ctx; 6 | } 7 | 8 | @Override 9 | public void handleLine(SourceHandlerContext ctx, String line) { 10 | getContext(ctx).fireLine(line); 11 | } 12 | 13 | @Override 14 | public void handleEnd(SourceHandlerContext ctx, SourceScope scope) { 15 | getContext(ctx).fireEnd(scope); 16 | } 17 | 18 | @Override 19 | public void handleStart(SourceHandlerContext ctx, SourceScope scope) { 20 | getContext(ctx).fireStart(scope); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/java/org/unidal/maven/plugin/source/lines/IVisitor.java: -------------------------------------------------------------------------------- 1 | /* THIS FILE WAS AUTO GENERATED BY codegen-maven-plugin, DO NOT EDIT IT */ 2 | package org.unidal.maven.plugin.source.lines; 3 | 4 | import org.unidal.maven.plugin.source.lines.entity.ClassModel; 5 | import org.unidal.maven.plugin.source.lines.entity.CountModel; 6 | import org.unidal.maven.plugin.source.lines.entity.ProjectModel; 7 | import org.unidal.maven.plugin.source.lines.entity.RootModel; 8 | 9 | public interface IVisitor { 10 | 11 | public void visitClass(ClassModel _class); 12 | 13 | public void visitCount(CountModel count); 14 | 15 | public void visitProject(ProjectModel project); 16 | 17 | public void visitRoot(RootModel root); 18 | } 19 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/codegen/generator/wizard/phoenix/console-wizard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Home 6 | 7 | 8 | Deploy 9 | 10 | 11 | Version 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/annotation/Attribute.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target(ElementType.FIELD) 10 | public @interface Attribute { 11 | String field(); 12 | 13 | boolean primaryKey() default false; 14 | 15 | boolean nullable() default true; 16 | 17 | boolean autoIncrement() default false; 18 | 19 | String selectExpr() default ""; 20 | 21 | String insertExpr() default ""; 22 | 23 | String updateExpr() default ""; 24 | } 25 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/draft/org/unidal/codegen/generator/model/cat/NativeTest.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.generator.model.cat; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | 6 | import org.junit.Test; 7 | import org.xml.sax.SAXException; 8 | 9 | import com.dianping.cat.consumer.transaction.model.entity.TransactionReport; 10 | import com.dianping.cat.consumer.transaction.model.transform.DefaultSaxParser; 11 | 12 | public class NativeTest { 13 | @Test 14 | public void test() throws SAXException, IOException { 15 | InputStream in = getClass().getResourceAsStream("/transaction.xml"); 16 | TransactionReport report = DefaultSaxParser.parse(in); 17 | 18 | System.out.println(report); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/resources/org/unidal/codegen/framework/xsl/entity.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-heartbeat-report/model/heartbeat-report-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/java/org/unidal/maven/plugin/wizard/ProjectMojoTest.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.wizard; 2 | 3 | import java.io.File; 4 | 5 | import org.apache.maven.plugin.MojoExecutionException; 6 | import org.apache.maven.plugin.MojoFailureException; 7 | import org.junit.Test; 8 | 9 | public class ProjectMojoTest { 10 | @Test 11 | public void test() throws MojoExecutionException, MojoFailureException { 12 | ProjectMojo mojo = new ProjectMojo(); 13 | 14 | mojo.groupId = "org.unidal.test"; 15 | mojo.artifactId = "test"; 16 | mojo.version = "1.0"; 17 | mojo.packaging = "pom"; 18 | mojo.name = "Test"; 19 | mojo.m_pomFile = new File("target/pom.xml"); 20 | 21 | mojo.execute(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/resources/org/unidal/codegen/framework/abstract.txt: -------------------------------------------------------------------------------- 1 | resource: meta.xml => meta.xml 2 | code: meta.java => meta 3 | code: tenants.java => tenants 4 | code: organization.java => organization 5 | code: tenant.java => tenant 6 | code: domain.java => domain 7 | code: process.java => process 8 | code: workers.java => workers 9 | code: worker.java => worker 10 | code: workload.java => workload 11 | code: scenarios.java => scenarios 12 | code: scenario.java => scenario 13 | code: query.java => query 14 | code: condition.java => condition 15 | code: field.java => field 16 | code: configure.java => configure 17 | code: configs.java => configs 18 | code: config.java => config 19 | code: events.java => events 20 | code: event.java => event 21 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/payload/annotation/FieldMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.payload.annotation; 2 | 3 | import static java.lang.annotation.ElementType.FIELD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(FIELD) 11 | public @interface FieldMeta { 12 | public static final String NOT_SPECIFIED = "NOT_SPECIFIED"; 13 | 14 | String defaultValue() default NOT_SPECIFIED; 15 | 16 | String format() default ""; 17 | 18 | boolean file() default false; // file of multipart/form-data 19 | 20 | boolean raw() default false; // raw request content 21 | 22 | String value(); 23 | } 24 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/annotation/ModuleMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.annotation; 2 | 3 | import static java.lang.annotation.ElementType.TYPE; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | import org.unidal.web.lifecycle.ActionResolver; 10 | 11 | @Retention(RUNTIME) 12 | @Target(TYPE) 13 | public @interface ModuleMeta { 14 | String name(); 15 | 16 | String defaultInboundAction() default ""; 17 | 18 | String defaultTransition() default ""; 19 | 20 | String defaultErrorAction() default ""; 21 | 22 | Class actionResolver() default ActionResolver.class; 23 | } 24 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/maven/plugin/wizard/jdbc-pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.dianping.test 5 | parent 6 | 0.1.0 7 | 8 | 4.0.0 9 | test-server 10 | Test Server 11 | 12 | 13 | junit 14 | junit 15 | test 16 | 17 | 18 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/maven/plugin/wizard/model-pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.dianping.test 5 | parent 6 | 0.1.0 7 | 8 | 4.0.0 9 | test-server 10 | Test Server 11 | 12 | 13 | junit 14 | junit 15 | test 16 | 17 | 18 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/maven/plugin/wizard/webapp-pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.dianping.test 5 | parent 6 | 0.1.0 7 | 8 | 4.0.0 9 | test-server 10 | Test Server 11 | 12 | 13 | junit 14 | junit 15 | test 16 | 17 | 18 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/AbstractDao.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc; 2 | 3 | import org.unidal.lookup.ContainerHolder; 4 | import org.unidal.lookup.annotation.Inject; 5 | import org.unidal.lookup.extension.Initializable; 6 | import org.unidal.lookup.extension.InitializationException; 7 | 8 | public abstract class AbstractDao extends ContainerHolder implements Initializable { 9 | @Inject 10 | private QueryEngine m_queryEngine; 11 | 12 | protected QueryEngine getQueryEngine() { 13 | return m_queryEngine; 14 | } 15 | 16 | protected abstract Class[] getEntityClasses(); 17 | 18 | public void initialize() throws InitializationException { 19 | m_queryEngine = lookup(QueryEngine.class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/egret-project/model/projects-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/framework/FileMode.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.framework; 2 | 3 | public enum FileMode { 4 | CREATE_OR_OVERWRITE("create_or_overwrite"), 5 | 6 | CREATE_IF_NOT_EXISTS("create_if_not_exists"); 7 | 8 | private String m_name; 9 | 10 | private FileMode(String name) { 11 | m_name = name; 12 | } 13 | 14 | public String getName() { 15 | return m_name; 16 | } 17 | 18 | public static FileMode getByName(String name) { 19 | for (FileMode mode : FileMode.values()) { 20 | if (mode.getName().equalsIgnoreCase(name)) { 21 | return mode; 22 | } 23 | } 24 | 25 | throw new IllegalArgumentException("No FileMode defined for " + name); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/tulip-graphql/model/graphql-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/maven/plugin/wizard/pom/jdbc-pom-before.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.dianping.test 5 | parent 6 | 0.1.0 7 | 8 | 4.0.0 9 | test-server 10 | Test Server 11 | 12 | 13 | junit 14 | junit 15 | test 16 | 17 | 18 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/maven/plugin/wizard/pom/model-pom-before.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.dianping.test 5 | parent 6 | 0.1.0 7 | 8 | 4.0.0 9 | test-server 10 | Test Server 11 | 12 | 13 | junit 14 | junit 15 | test 16 | 17 | 18 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/maven/plugin/wizard/pom/webapp-pom-before.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.dianping.test 5 | parent 6 | 0.1.0 7 | 8 | 4.0.0 9 | test-server 10 | Test Server 11 | 12 | 13 | junit 14 | junit 15 | test 16 | 17 | 18 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dobby-model/model/model-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/garden/model/wizard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Home Page of Garden 6 | 7 | 8 | Technical Trends 9 | 10 | 11 | 12 | 13 | Database Query Toolkit 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/framework/OperationMode.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.framework; 2 | 3 | public enum OperationMode { 4 | APPLY_TEMPLATE("apply_template"), 5 | 6 | COPY_RESOURCES("copy_resources"); 7 | 8 | private String m_name; 9 | 10 | private OperationMode(String name) { 11 | m_name = name; 12 | } 13 | 14 | public static OperationMode getByName(String name) { 15 | for (OperationMode mode : OperationMode.values()) { 16 | if (mode.getName().equalsIgnoreCase(name)) { 17 | return mode; 18 | } 19 | } 20 | 21 | throw new IllegalArgumentException("No OperationMode defined for " + name); 22 | } 23 | 24 | public String getName() { 25 | return m_name; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/webapp/sources/org/unidal/web/mvc/annotation/PageMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.web.mvc.annotation; 2 | 3 | import static java.lang.annotation.ElementType.TYPE; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | import org.unidal.web.lifecycle.ActionResolver; 10 | 11 | @Retention(RUNTIME) 12 | @Target(TYPE) 13 | public @interface PageMeta { 14 | String name(); 15 | 16 | String module(); 17 | 18 | String defaultInboundAction() default ""; 19 | 20 | String defaultTransition() default ""; 21 | 22 | String defaultErrorAction() default ""; 23 | 24 | Class actionResolver() default ActionResolver.class; 25 | } 26 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/test/java/org/unidal/maven/plugin/source/LinesMojoTest.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.source; 2 | 3 | import java.io.File; 4 | 5 | import org.apache.maven.project.MavenProject; 6 | import org.junit.Test; 7 | import org.unidal.helper.Reflects; 8 | 9 | public class LinesMojoTest { 10 | @Test 11 | public void testMojo() throws Exception { 12 | LinesMojo mojo = new LinesMojo(); 13 | MavenProject project = new MavenProject(); 14 | 15 | project.setName("mock-project"); 16 | project.getCompileSourceRoots().add(new File("src/main/java").getCanonicalPath()); 17 | project.getTestCompileSourceRoots().add(new File("src/test/java").getCanonicalPath()); 18 | 19 | Reflects.forField().setDeclaredFieldValue(LinesMojo.class, "m_project", mojo, project); 20 | 21 | mojo.execute(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/tulip-graphql/model/graphql-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /plexus-maven-plugin/src/test/resources/org/unidal/maven/plugin/codegen/plexus/profile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | v10 5 | v20 6 | v30 7 | 8 | 9 | v11 10 | v21 11 | v31 12 | 13 | 14 | v12 15 | v22 16 | v32 17 | 18 | 19 | v13 20 | v23 21 | v33 22 | 23 | 24 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/DataField.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc; 2 | 3 | public class DataField { 4 | private Class m_entityClass; 5 | 6 | private int m_index; 7 | 8 | private String m_name; 9 | 10 | public DataField(String name) { 11 | m_name = name; 12 | } 13 | 14 | public Class getEntityClass() { 15 | return m_entityClass; 16 | } 17 | 18 | public int getIndex() { 19 | return m_index; 20 | } 21 | 22 | public String getName() { 23 | return m_name; 24 | } 25 | 26 | public void setEntityClass(Class entityClass) { 27 | m_entityClass = entityClass; 28 | } 29 | 30 | public void setIndex(int index) { 31 | m_index = index; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return m_name; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/resources/META-INF/wizard/jdbc/structure.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/resources/META-INF/wizard/webapp/structure.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-ip-report/model/ip-report-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/framework/GenerationContext.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.framework; 2 | 3 | import java.io.File; 4 | import java.net.URL; 5 | import java.util.Map; 6 | import java.util.concurrent.atomic.AtomicInteger; 7 | 8 | public interface GenerationContext { 9 | public void debug(String message); 10 | 11 | public URL getDecorateXsl(); 12 | 13 | public File getFile(String file); 14 | 15 | public AtomicInteger getGeneratedFiles(); 16 | 17 | public File getManifestXml(); 18 | 19 | public URL getManifestXsl(); 20 | 21 | public URL getNormalizeXsl(); 22 | 23 | public Map getProperties(); 24 | 25 | public URL getStructureXml(); 26 | 27 | public URL getTemplateXsl(String template); 28 | 29 | public void info(String message); 30 | 31 | public void verbose(String message); 32 | } 33 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/cat2-alert/model/alert-dal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | FROM 10 | WHERE = ${name} 11 | ]]> 12 | 13 | 14 | 15 | 17 | SET 18 | WHERE = ${name} 19 | ]]> 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dianping-deployment/model/deployment-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-threshold-template/model/threshold-template-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/cat2-config/model/system-dal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | FROM
10 | WHERE = ${name} 11 | ]]> 12 | 13 | 14 | 15 | 17 | SET 18 | WHERE = ${name} 19 | ]]> 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/resources/org/unidal/codegen/generator/model/test/eunit_resource_codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /project-maven-plugin/src/main/java/org/unidal/maven/plugin/project/rule/IRule.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.project.rule; 2 | 3 | import java.lang.reflect.AnnotatedElement; 4 | import java.util.Comparator; 5 | 6 | public interface IRule extends Comparator { 7 | public String getName(); 8 | 9 | public RuleType getType(); 10 | 11 | /** 12 | * Compare the two annotated elements(Class, Field, Constructor and Method) to determine the back compatibility. 13 | * 14 | * @param source 15 | * current annotated element to compare 16 | * @param target 17 | * the baseline annotated element to compare 18 | * @return an int < 0 is error code if source is NOT compatible with target, 0 means they are compatible or skipped, 19 | * and > 0 is reason code when the comparison is stopped 20 | */ 21 | public int compare(T source, T target); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/resources/org/unidal/codegen/codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | org.unidal.app.user.dal 18 | user 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/resources/org/unidal/codegen/framework/xsl/decorate.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/jdbc/garden/model/wizard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.mysql.jdbc.Driver 5 | jdbc:mysql://localhost:3306/cat 6 | cat 7 | cat 8 | useUnicode=true&autoReconnect=true 9 | 10 | 11 |
12 |
13 | 14 | 15 |
16 |
17 | 18 | 19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/resources/org/unidal/codegen/framework/xsl/normalize.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/main/resources/META-INF/dal/jdbc/xsl/naming.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/main/resources/META-INF/dal/model/xsl/naming.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dianping-zebra-config/model/system-config-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/resources/META-INF/wizard/jdbc/xsl/naming.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/java/org/unidal/maven/plugin/AllTests.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.junit.runners.Suite; 5 | import org.junit.runners.Suite.SuiteClasses; 6 | import org.unidal.maven.plugin.property.PropertyProviderTest; 7 | import org.unidal.maven.plugin.wizard.meta.ModelMetaTest; 8 | import org.unidal.maven.plugin.wizard.meta.TableMetaTest; 9 | import org.unidal.maven.plugin.wizard.pom.JdbcPomBuilderTest; 10 | import org.unidal.maven.plugin.wizard.pom.ModelPomBuilderTest; 11 | import org.unidal.maven.plugin.wizard.pom.WebAppPomBuilderTest; 12 | 13 | @RunWith(Suite.class) 14 | @SuiteClasses({ 15 | 16 | PropertyProviderTest.class, 17 | 18 | ModelMetaTest.class, 19 | 20 | TableMetaTest.class, 21 | 22 | JdbcPomBuilderTest.class, 23 | 24 | ModelPomBuilderTest.class, 25 | 26 | WebAppPomBuilderTest.class, 27 | 28 | }) 29 | public class AllTests { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/resources/META-INF/wizard/webapp/xsl/naming.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-bug/model/bug-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /plexus-maven-plugin/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.unidal.maven.plugins 5 | parent 6 | 6.0.0 7 | 8 | 4.0.0 9 | plexus-maven-plugin 10 | maven-plugin 11 | Plexus Maven Plugin 12 | 13 | 14 | ${project.groupId} 15 | codegen-foundation 16 | 17 | 18 | junit 19 | junit 20 | test 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /codegen-maven-plugin/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.unidal.maven.plugins 5 | parent 6 | 6.0.0 7 | 8 | 4.0.0 9 | codegen-maven-plugin 10 | maven-plugin 11 | Code Generation Maven Plugin 12 | 13 | 14 | ${project.groupId} 15 | codegen-foundation 16 | 17 | 18 | junit 19 | junit 20 | test 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/resources/org/unidal/codegen/generator/model/test/eunit_excel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/java/org/unidal/maven/plugin/wizard/meta/DefaultWizardMeta.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.wizard.meta; 2 | 3 | import java.io.Reader; 4 | 5 | import org.jdom.Document; 6 | import org.jdom.Element; 7 | import org.jdom.input.SAXBuilder; 8 | import org.unidal.lookup.annotation.Named; 9 | 10 | @Named(type = WizardMeta.class) 11 | public class DefaultWizardMeta implements WizardMeta { 12 | @Override 13 | public Document getWizard(Reader reader) { 14 | SAXBuilder builder = new SAXBuilder(); 15 | 16 | try { 17 | return builder.build(reader); 18 | } catch (Exception e) { 19 | throw new RuntimeException("Error to build Document. " + e, e); 20 | } 21 | } 22 | 23 | @Override 24 | public Document getManifest(String wizardXml) { 25 | Element manifest = new Element("manifest"); 26 | 27 | manifest.addContent(new Element("file").setAttribute("path", wizardXml)); 28 | return new Document(manifest); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/plexus-model/model/plexus-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/resources/org/unidal/codegen/framework/xsl/template.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | package ; 17 | 18 | public class { 19 | } 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-ip-report/model/ip-report-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/tulip-scenario/model/scenarios-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/resources/META-INF/wizard/webapp/xsl/test/all-tests.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | package ; 17 | 18 | import org.junit.runner.RunWith; 19 | import org.junit.runners.Suite; 20 | import org.junit.runners.Suite.SuiteClasses; 21 | 22 | @RunWith(Suite.class) 23 | @SuiteClasses({ 24 | 25 | // add test classes here 26 | 27 | }) 28 | public class AllTests { 29 | 30 | } 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat2-client-config/model/client-config-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dianping-deployment/model/deployment-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-deploy/model/deploy-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/xpipe-keeper/model/keeper-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/java/org/unidal/maven/plugin/property/SystemPropertyProvider.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.property; 2 | 3 | /** 4 | * Get property from Java System Properties. 5 | */ 6 | public class SystemPropertyProvider extends AbstractPropertyProvider { 7 | public SystemPropertyProvider(String... mappings) { 8 | super(mappings); 9 | } 10 | 11 | /** 12 | * Get property value. 13 | * 14 | * @param property 15 | * property name 16 | * @return property value, null if property is not found, or property name is empty 17 | */ 18 | @Override 19 | public String getProperty(String property, String defaultValue) { 20 | String name = map(property); 21 | String value = null; 22 | 23 | if (name != null) { 24 | if (name.length() > 0) { 25 | value = System.getProperty(name); 26 | } 27 | } else { 28 | value = System.getProperty(property); 29 | } 30 | 31 | if (value == null) { 32 | return defaultValue; 33 | } else { 34 | return value; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/java/org/unidal/maven/plugin/wizard/meta/TableMetaTest.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.wizard.meta; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | public class TableMetaTest { 7 | @Test 8 | public void testNormalizeFieldName() { 9 | DefaultTableMeta meta = new DefaultTableMeta(); 10 | 11 | Assert.assertEquals("field-name", meta.normalize("fieldName")); 12 | Assert.assertEquals("field-name", meta.normalize("FieldName")); 13 | Assert.assertEquals("field-name", meta.normalize("field-name")); 14 | Assert.assertEquals("field-name", meta.normalize("field-Name")); 15 | Assert.assertEquals("field-name", meta.normalize("Field-Name")); 16 | Assert.assertEquals("field-name", meta.normalize("field_name")); 17 | Assert.assertEquals("field-name", meta.normalize("field_Name")); 18 | Assert.assertEquals("field-name", meta.normalize("Field_Name")); 19 | 20 | Assert.assertEquals("field-name", meta.normalize("FIELD-NAME")); 21 | Assert.assertEquals("field-name", meta.normalize("FIELD_NAME")); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/java/org/unidal/maven/plugin/property/EnvironmentVariableProvider.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.property; 2 | 3 | /** 4 | * Get property from OS Environment Variable. 5 | */ 6 | public class EnvironmentVariableProvider extends AbstractPropertyProvider { 7 | public EnvironmentVariableProvider(String... mappings) { 8 | super(mappings); 9 | } 10 | 11 | /** 12 | * Get property value. 13 | * 14 | * @param property 15 | * property name 16 | * @return property value, null if property is not found, or property name is empty 17 | */ 18 | @Override 19 | public String getProperty(String property, String defaultValue) { 20 | String name = map(property); 21 | String value = null; 22 | 23 | if (name != null) { 24 | if (name.length() > 0) { 25 | value = System.getenv(name); 26 | } 27 | } else { 28 | value = System.getenv(property); 29 | } 30 | 31 | if (value == null) { 32 | return defaultValue; 33 | } else { 34 | return value; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-threshold-template/model/threshold-template-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /plexus-maven-plugin/src/test/java/bootstrap/BootstrapTest.java: -------------------------------------------------------------------------------- 1 | package bootstrap; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.Arrays; 6 | import java.util.List; 7 | 8 | import org.junit.Test; 9 | 10 | public class BootstrapTest { 11 | public static void main(String[] args) throws Exception { 12 | Bootstrap.main(null); 13 | } 14 | 15 | @Test 16 | public void testUnzipWar() throws IOException { 17 | Bootstrap b = new Bootstrap(); 18 | File warRoot = new File("target/work"); 19 | File warFile = new File("cat.war"); 20 | 21 | b.unzipWar(warRoot, warFile); 22 | } 23 | 24 | @Test 25 | public void testSetup() throws Exception { 26 | Bootstrap b = new Bootstrap(); 27 | List entries = b.setup(new File("target/work"), "cat.war"); 28 | 29 | System.out.println("Jars: " + (entries.size() - 1)); 30 | } 31 | 32 | @Test 33 | public void testHackClassLoader() throws Exception { 34 | Bootstrap b = new Bootstrap(); 35 | 36 | b.hackClassLoader(Arrays.asList("cat.war")); 37 | 38 | System.out.println(getClass().getResource("/WEB-INF/web.xml")); 39 | 40 | // b.startup(new File("target/work"), null); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-response/model/response-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/hermes-meta/model/meta-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/Readset.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Arrays; 5 | import java.util.Collections; 6 | import java.util.List; 7 | 8 | public class Readset { 9 | private List m_fields; 10 | 11 | private List> m_readsets; 12 | 13 | public Readset(DataField... fields) { 14 | m_fields = Collections.unmodifiableList(Arrays.asList(fields)); 15 | m_readsets = Collections.emptyList(); 16 | } 17 | 18 | @SuppressWarnings("unchecked") 19 | public Readset(Readset... readsets) { 20 | List> children = new ArrayList>(); 21 | 22 | for (Readset readset : readsets) { 23 | Readset rs = (Readset) readset; 24 | 25 | children.add(rs); 26 | children.addAll(rs.getChildren()); 27 | } 28 | 29 | m_readsets = children; 30 | m_fields = Collections.emptyList(); 31 | } 32 | 33 | public List getFields() { 34 | return m_fields; 35 | } 36 | 37 | public List> getChildren() { 38 | return m_readsets; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/resources/META-INF/wizard/webapp/xsl/page/jsp-file.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | package ; 19 | 20 | public enum { 21 | VIEW(""), 22 | 23 | ; 24 | 25 | private String m_path; 26 | 27 | private JspFile(String path) { 28 | m_path = path; 29 | } 30 | 31 | public String getPath() { 32 | return m_path; 33 | } 34 | } 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/main/resources/META-INF/dal/jdbc/structure.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/main/resources/META-INF/dal/model/xsl/ientity.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | /* THIS FILE WAS AUTO GENERATED BY codegen-maven-plugin, DO NOT EDIT IT */ 17 | package ; 18 | 19 | public interface IEntity { 20 | public void accept(IVisitor visitor); 21 | 22 | public void mergeAttributes(T other); 23 | 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/model/IVisitor.java: -------------------------------------------------------------------------------- 1 | /* THIS FILE WAS AUTO GENERATED BY codegen-maven-plugin, DO NOT EDIT IT */ 2 | package org.unidal.codegen.model; 3 | 4 | import org.unidal.codegen.model.entity.Any; 5 | import org.unidal.codegen.model.entity.CodegenModel; 6 | import org.unidal.codegen.model.entity.FileModel; 7 | import org.unidal.codegen.model.entity.ManifestModel; 8 | import org.unidal.codegen.model.entity.NodeModel; 9 | import org.unidal.codegen.model.entity.OutputModel; 10 | import org.unidal.codegen.model.entity.OutputsModel; 11 | import org.unidal.codegen.model.entity.PropertyModel; 12 | import org.unidal.codegen.model.entity.StructureModel; 13 | 14 | public interface IVisitor { 15 | 16 | public void visitAny(Any any); 17 | 18 | public void visitCodegen(CodegenModel codegen); 19 | 20 | public void visitFile(FileModel file); 21 | 22 | public void visitManifest(ManifestModel manifest); 23 | 24 | public void visitNode(NodeModel node); 25 | 26 | public void visitOutput(OutputModel output); 27 | 28 | public void visitOutputs(OutputsModel outputs); 29 | 30 | public void visitProperty(PropertyModel property); 31 | 32 | public void visitStructure(StructureModel structure); 33 | } 34 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/expense-book/model/book-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-project/model/project-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/QueryEngine.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc; 2 | 3 | import java.util.List; 4 | 5 | public interface QueryEngine { 6 | public String HINT_QUERY = "QUERY"; 7 | 8 | public String HINT_DATA_OBJECT = "DATA_OBJECT"; 9 | 10 | public int[] deleteBatch(QueryDef query, T[] protos) throws DalException; 11 | 12 | public int deleteSingle(QueryDef query, T proto) throws DalException; 13 | 14 | public int[] insertBatch(QueryDef query, T[] protos) throws DalException; 15 | 16 | public int insertSingle(QueryDef query, T proto) throws DalException; 17 | 18 | public List queryMultiple(QueryDef query, T proto, Readset readset) throws DalException; 19 | 20 | public T querySingle(QueryDef query, T proto, Readset readset) throws DalException; 21 | 22 | public int[] updateBatch(QueryDef query, T[] protos, Updateset updateset) throws DalException; 23 | 24 | public int updateSingle(QueryDef query, T proto, Updateset updateset) throws DalException; 25 | } 26 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/resources/META-INF/wizard/webapp/xsl/page/context.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | package ; 19 | 20 | import .; 21 | 22 | public class extends { 23 | 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/wizard-model/model/wizard-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/resources/META-INF/dal/model/lines-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-client/model/client-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/ebay-service/model/AddItem-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/java/org/unidal/maven/plugin/property/AbstractPropertyProvider.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.property; 2 | 3 | import java.util.Arrays; 4 | import java.util.HashMap; 5 | import java.util.Map; 6 | 7 | public abstract class AbstractPropertyProvider implements PropertyProvider { 8 | private Map m_property2Prompts = new HashMap(); 9 | 10 | public AbstractPropertyProvider(String[] mappings) { 11 | m_property2Prompts = toMap(mappings); 12 | } 13 | 14 | protected String map(String property) { 15 | return m_property2Prompts.get(property); 16 | } 17 | 18 | private Map toMap(String[] mappings) { 19 | Map map = new HashMap(mappings.length * 2); 20 | 21 | for (String mapping : mappings) { 22 | int pos = mapping.indexOf(':'); 23 | 24 | if (pos > 0) { 25 | String key = mapping.substring(0, pos); 26 | String value = mapping.substring(pos + 1); 27 | 28 | map.put(key, value); 29 | } else { 30 | throw new IllegalArgumentException(String.format("Invalid mappings: %s.", Arrays.asList(mappings))); 31 | } 32 | } 33 | 34 | return map; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/resources/META-INF/dal/model/wizard-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/main/resources/META-INF/dal/model/xsl/ivisitor_enabled.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | /* THIS FILE WAS AUTO GENERATED BY codegen-maven-plugin, DO NOT EDIT IT */ 16 | package ; 17 | 18 | public interface IVisitorEnabled { 19 | public void enableVisitor(IVisitor visitor); 20 | } 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat2-client-config/model/client-config-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/resources/org/unidal/codegen/generator/model/test/eunit_resource_sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Test Scenario 1 4 | ]]> 5 | ]]> 6 | 7 | 8 | Test Scenario 2 9 | ]]> 10 | 11 | Unsupported property(ABC) for resource(com.ebay.esf.resource.css.LocalCssResource) with uri(css.local:/mystyle_css#ABC). 12 | Unsupported property(ABC) for resource({0}) 13 | 14 | 15 | Unsupported property(ABC) for resource(com.ebay.esf.resource.css.LocalCssResource) with uri(css.local:/mystyle_css#ABC). 16 | Unsupported property(ABC) for resource({0}) 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dianping-liger-datasource/model/datasource-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/test/java/org/unidal/maven/plugin/source/UpgradeMojoTest.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.source; 2 | 3 | import java.io.File; 4 | 5 | import org.apache.maven.project.MavenProject; 6 | import org.junit.Test; 7 | import org.unidal.helper.Reflects; 8 | 9 | public class UpgradeMojoTest { 10 | private File m_rootDir = new File("/Users/qmwu2000/project/unidal/cat-next"); 11 | 12 | @Test 13 | public void testOne() throws Exception { 14 | checkProject("cat-meta-service"); 15 | } 16 | 17 | @Test 18 | public void testAll() throws Exception { 19 | for (String name : m_rootDir.list()) { 20 | if (name.startsWith("cat-")) { 21 | checkProject(name); 22 | } 23 | } 24 | } 25 | 26 | private void checkProject(String name) throws Exception { 27 | UpgradeMojo mojo = new UpgradeMojo(); 28 | MavenProject project = new MavenProject(); 29 | File baseDir = new File(m_rootDir, name); 30 | 31 | project.setName(baseDir.getName()); 32 | project.getCompileSourceRoots().add(new File(baseDir, "src/main/java").getCanonicalPath()); 33 | project.getTestCompileSourceRoots().add(new File(baseDir, "src/test/java").getCanonicalPath()); 34 | 35 | Reflects.forField().setDeclaredFieldValue(UpgradeMojo.class, "m_project", mojo, project); 36 | 37 | mojo.execute(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/main/resources/META-INF/wizard/webapp/xsl/web-inf/app-tld.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Application specific JSP tag library 16 | app 17 | 1.2 18 | a 19 | 20 | layout 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/maven/plugin/wizard/model-sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 1m 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/maven/plugin/wizard/jdbc/pom-before.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.dianping.test 5 | parent 6 | 0.1.0 7 | 8 | 4.0.0 9 | test-server 10 | Test Server 11 | 12 | 13 | mysql 14 | mysql-connector-java 15 | 16 | 17 | org.springframework 18 | spring-context 19 | 20 | 21 | log4j 22 | log4j 23 | 24 | 25 | commons-lang 26 | commons-lang 27 | 28 | 29 | junit 30 | junit 31 | test 32 | 33 | 34 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/resources/org/unidal/maven/plugin/wizard/catconfig/pom-before.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.dianping.test 5 | parent 6 | 0.1.0 7 | 8 | 4.0.0 9 | test-server 10 | Test Server 11 | 12 | 13 | mysql 14 | mysql-connector-java 15 | 16 | 17 | org.springframework 18 | spring-context 19 | 20 | 21 | log4j 22 | log4j 23 | 24 | 25 | commons-lang 26 | commons-lang 27 | 28 | 29 | junit 30 | junit 31 | test 32 | 33 | 34 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dianping-liger-datasource/model/datasource-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/phoenix-deploy/model/deploy-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/dobby-model/model/model-codegen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/framework/DefaultFileStorage.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.framework; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | 6 | import org.unidal.codegen.model.entity.OutputModel; 7 | import org.unidal.helper.Files; 8 | import org.unidal.lookup.annotation.Named; 9 | 10 | @Named(type = FileStorage.class) 11 | public class DefaultFileStorage implements FileStorage { 12 | @Override 13 | public void copyResources(GenerationContext ctx, OutputModel output) throws IOException { 14 | // System.out.println(output.getTemplate() + "=>" + output.getPath()); 15 | } 16 | 17 | @Override 18 | public void writeFile(GenerationContext ctx, OutputModel output, String content) throws IOException { 19 | FileMode mode = FileMode.getByName(output.getMode()); 20 | File target = ctx.getFile(output.getPath()); 21 | 22 | switch (mode) { 23 | case CREATE_IF_NOT_EXISTS: 24 | if (target.exists()) { 25 | break; 26 | } 27 | case CREATE_OR_OVERWRITE: 28 | target.getParentFile().mkdirs(); 29 | 30 | Files.forIO().writeTo(target, content); 31 | 32 | ctx.verbose(String.format("File %s generated.", target)); 33 | ctx.getGeneratedFiles().incrementAndGet(); 34 | break; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/model-array/model/model.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/java/org/unidal/maven/plugin/source/lines/Constants.java: -------------------------------------------------------------------------------- 1 | /* THIS FILE WAS AUTO GENERATED BY codegen-maven-plugin, DO NOT EDIT IT */ 2 | package org.unidal.maven.plugin.source.lines; 3 | 4 | public class Constants { 5 | 6 | public static final String ATTR_CLASS = "class"; 7 | 8 | public static final String ATTR_COMMENT = "comment"; 9 | 10 | public static final String ATTR_EMPTY = "empty"; 11 | 12 | public static final String ATTR_FILES = "files"; 13 | 14 | public static final String ATTR_GENERATED = "generated"; 15 | 16 | public static final String ATTR_GENERATED_FILES = "generated-files"; 17 | 18 | public static final String ATTR_LINES = "lines"; 19 | 20 | public static final String ATTR_NAME = "name"; 21 | 22 | public static final String ATTR_PACKAGE = "package"; 23 | 24 | public static final String ATTR_TEST = "test"; 25 | 26 | public static final String ATTR_TEST_FILES = "test-files"; 27 | 28 | public static final String ENTITY_CLASS = "class"; 29 | 30 | public static final String ENTITY_COUNT = "count"; 31 | 32 | public static final String ENTITY_PROJECT = "project"; 33 | 34 | public static final String ENTITY_ROOT = "root"; 35 | 36 | public static final String ENTITY_CLASSES = "classes"; 37 | 38 | public static final String ENTITY_PROJECTS = "projects"; 39 | } 40 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/starter-metadata/model/metadata-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /codegen-foundation/src/test/java/org/unidal/codegen/framework/XmlAggregatorTest.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.framework; 2 | 3 | import java.io.File; 4 | import java.io.InputStream; 5 | import java.net.URL; 6 | 7 | import org.junit.Assert; 8 | import org.junit.Test; 9 | import org.unidal.codegen.model.CodegenModelHelper; 10 | import org.unidal.codegen.model.entity.Any; 11 | import org.unidal.codegen.model.entity.StructureModel; 12 | import org.unidal.codegen.model.entity.ManifestModel; 13 | import org.unidal.lookup.ComponentTestCase; 14 | 15 | public class XmlAggregatorTest extends ComponentTestCase { 16 | @Test 17 | public void test() throws Exception { 18 | URL url = getClass().getResource("meta-manifest.xml"); 19 | InputStream sin = getClass().getResourceAsStream("structure.xml"); 20 | InputStream in = getClass().getResourceAsStream("meta.xml"); 21 | 22 | StructureModel structure = CodegenModelHelper.fromXml(StructureModel.class, sin); 23 | ManifestModel manifest = CodegenModelHelper.fromXml(ManifestModel.class, url.openStream()); 24 | XmlAggregator aggregator = lookup(XmlAggregator.class); 25 | 26 | Any result = aggregator.aggregate(new File(url.getPath()), structure, manifest); 27 | Any expected = CodegenModelHelper.fromXml(Any.class, in); 28 | 29 | Assert.assertEquals(expected.toString(), result.toString()); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-model/cat-bug/model/bug-model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /source-code-maven-plugin/src/main/java/org/unidal/maven/plugin/source/pipeline/AbstractSourceHandlerContext.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.source.pipeline; 2 | 3 | public class AbstractSourceHandlerContext extends SourceHandlerAdaptor implements SourceHandlerContext { 4 | private SourcePipeline m_pipeline; 5 | 6 | private Source m_source; 7 | 8 | AbstractSourceHandlerContext m_prev; 9 | 10 | AbstractSourceHandlerContext m_next; 11 | 12 | public AbstractSourceHandlerContext(SourcePipeline pipeline, Source source) { 13 | m_pipeline = pipeline; 14 | m_source = source; 15 | } 16 | 17 | @Override 18 | public void fireEnd(SourceScope scope) { 19 | if (m_next != null) { 20 | m_next.handler().handleEnd(m_next, scope); 21 | } 22 | } 23 | 24 | @Override 25 | public void fireLine(String line) { 26 | if (m_next != null) { 27 | m_next.handler().handleLine(m_next, line); 28 | } 29 | } 30 | 31 | @Override 32 | public void fireStart(SourceScope scope) { 33 | if (m_next != null) { 34 | m_next.handler().handleStart(m_next, scope); 35 | } 36 | } 37 | 38 | @Override 39 | public SourceHandler handler() { 40 | throw new UnsupportedOperationException("This should NOT happen!"); 41 | } 42 | 43 | @Override 44 | public SourcePipeline pipeline() { 45 | return m_pipeline; 46 | } 47 | 48 | @Override 49 | public Source source() { 50 | return m_source; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/framework/build/ComponentsConfigurator.java: -------------------------------------------------------------------------------- 1 | package org.unidal.codegen.framework.build; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.unidal.codegen.code.DefaultObfuscater; 7 | import org.unidal.codegen.framework.DefaultFileStorage; 8 | import org.unidal.codegen.framework.DefaultXslGenerator; 9 | import org.unidal.codegen.framework.DefaultXmlAggregator; 10 | import org.unidal.codegen.framework.DefaultXslTransformer; 11 | import org.unidal.lookup.configuration.AbstractResourceConfigurator; 12 | import org.unidal.lookup.configuration.Component; 13 | 14 | class ComponentsConfigurator extends AbstractResourceConfigurator { 15 | public static void main(String[] args) { 16 | generatePlexusComponentsXmlFile(new ComponentsConfigurator()); 17 | } 18 | 19 | @Override 20 | public List defineComponents() { 21 | List all = new ArrayList(); 22 | 23 | all.add(A(DefaultXslGenerator.class)); 24 | all.add(A(DefaultXmlAggregator.class)); 25 | all.add(A(DefaultXslTransformer.class)); 26 | all.add(A(DefaultFileStorage.class)); 27 | 28 | all.add(A(DefaultObfuscater.class)); 29 | 30 | return all; 31 | } 32 | 33 | @Override 34 | protected boolean isMavenPlugin() { 35 | return true; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /wizard-maven-plugin/src/test/java/org/unidal/maven/plugin/wizard/WebAppMojoTest.java: -------------------------------------------------------------------------------- 1 | package org.unidal.maven.plugin.wizard; 2 | 3 | import java.io.File; 4 | 5 | import org.junit.Assert; 6 | import org.junit.Test; 7 | import org.unidal.codegen.framework.XslGenerator; 8 | import org.unidal.maven.plugin.wizard.meta.WebAppWizardBuilder; 9 | import org.unidal.maven.plugin.wizard.pom.WebAppPomBuilder; 10 | 11 | public class WebAppMojoTest extends AbstractWizardMojoTest { 12 | @Test 13 | public void testMojo() throws Exception { 14 | WizardMojoSupport mojo = WizardMojoBuilder.builder(this, WebAppMojo.class) // 15 | .pom("webapp-pom.xml") // 16 | .component("m_wizardBuilder", WebAppWizardBuilder.class) // 17 | .component("m_pomBuilder", WebAppPomBuilder.class) // 18 | .component("m_generator", XslGenerator.class) // 19 | .build(); 20 | File baseDir = mojo.getProject().getBasedir(); 21 | 22 | System.setProperty("project.package", "org.unidal.webapp"); 23 | System.setProperty("web.module", "true"); 24 | System.setProperty("web.name", "cat"); 25 | System.setProperty("web.template", "thymeleaf"); 26 | System.setProperty("web.module", "ui"); 27 | System.setProperty("web.page", "home"); 28 | 29 | mojo.execute(); 30 | 31 | Assert.assertEquals(true, new File(baseDir, "pom.xml").exists()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /codegen-maven-plugin/src/test/dal-jdbc/sources/org/unidal/dal/jdbc/QueryDef.java: -------------------------------------------------------------------------------- 1 | package org.unidal.dal.jdbc; 2 | 3 | public class QueryDef { 4 | private String m_name; 5 | 6 | private Class m_entityClass; 7 | 8 | private String m_pattern; 9 | 10 | private QueryType m_type; 11 | 12 | private boolean m_storeProcedure; 13 | 14 | private boolean m_raw; 15 | 16 | public QueryDef(String name, Class entityClass, QueryType type, String pattern) { 17 | m_name = name; 18 | m_entityClass = entityClass; 19 | m_type = type; 20 | m_pattern = pattern; 21 | m_raw = false; 22 | } 23 | 24 | public QueryDef(String name, Class entityClass, QueryType type, String pattern, boolean isStoreProcedure) { 25 | this(name, entityClass, type, pattern); 26 | 27 | m_storeProcedure = isStoreProcedure; 28 | } 29 | 30 | public Class getEntityClass() { 31 | return m_entityClass; 32 | } 33 | 34 | public String getName() { 35 | return m_name; 36 | } 37 | 38 | public QueryType getType() { 39 | return m_type; 40 | } 41 | 42 | public boolean isRaw() { 43 | return m_raw; 44 | } 45 | 46 | public boolean isStoreProcedure() { 47 | return m_storeProcedure; 48 | } 49 | 50 | @Override 51 | public String toString() { 52 | return m_pattern; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /codegen-foundation/src/main/java/org/unidal/codegen/model/entity/StructureModel.java: -------------------------------------------------------------------------------- 1 | /* THIS FILE WAS AUTO GENERATED BY codegen-maven-plugin, DO NOT EDIT IT */ 2 | package org.unidal.codegen.model.entity; 3 | 4 | import org.unidal.codegen.model.BaseEntity; 5 | import org.unidal.codegen.model.IVisitor; 6 | 7 | public class StructureModel extends BaseEntity { 8 | private NodeModel m_node; 9 | 10 | public StructureModel() { 11 | } 12 | 13 | @Override 14 | public void accept(IVisitor visitor) { 15 | visitor.visitStructure(this); 16 | } 17 | 18 | @Override 19 | public boolean equals(Object obj) { 20 | if (obj instanceof StructureModel) { 21 | StructureModel _o = (StructureModel) obj; 22 | 23 | if (!equals(getNode(), _o.getNode())) { 24 | return false; 25 | } 26 | 27 | 28 | return true; 29 | } 30 | 31 | return false; 32 | } 33 | 34 | public NodeModel getNode() { 35 | return m_node; 36 | } 37 | 38 | @Override 39 | public int hashCode() { 40 | int hash = 0; 41 | 42 | hash = hash * 31 + (m_node == null ? 0 : m_node.hashCode()); 43 | 44 | return hash; 45 | } 46 | 47 | @Override 48 | public void mergeAttributes(StructureModel other) { 49 | } 50 | 51 | public StructureModel setNode(NodeModel node) { 52 | m_node = node; 53 | return this; 54 | } 55 | 56 | } 57 | --------------------------------------------------------------------------------