├── .gitignore
├── components
├── data-services
│ ├── org.wso2.carbon.dataservices.core
│ │ ├── src
│ │ │ ├── test
│ │ │ │ ├── resources
│ │ │ │ │ ├── sql
│ │ │ │ │ │ ├── OracleType.sql
│ │ │ │ │ │ ├── H2StoredFuncs.sql
│ │ │ │ │ │ ├── CreateOracleTestDB.sql
│ │ │ │ │ │ ├── DropOracleUser.sql
│ │ │ │ │ │ ├── CreateMySQLTestDB.sql
│ │ │ │ │ │ ├── OracleStoredFuncs.sql
│ │ │ │ │ │ ├── CreateH2TestDB.sql
│ │ │ │ │ │ ├── MySQLStoredFuncs.sql
│ │ │ │ │ │ ├── Offices.sql
│ │ │ │ │ │ └── H2StoredProcs.sql
│ │ │ │ │ ├── csv
│ │ │ │ │ │ ├── BAM_YEAR_DIM.csv
│ │ │ │ │ │ ├── BAM_QTR_DIM.csv
│ │ │ │ │ │ ├── BAM_MONTH_DIM.csv
│ │ │ │ │ │ ├── BAM_SERVER_STAT_QTR_FACT.csv
│ │ │ │ │ │ ├── BAM_SERVER_STAT_YEAR_FACT.csv
│ │ │ │ │ │ ├── BAM_SERVER_STAT_MONTH_FACT.csv
│ │ │ │ │ │ ├── BAM_SERVICE_STAT_QTR_FACT.csv
│ │ │ │ │ │ ├── BAM_SERVICE_STAT_YEAR_FACT.csv
│ │ │ │ │ │ ├── BAM_SERVICE_STAT_MONTH_FACT.csv
│ │ │ │ │ │ ├── BAM_OPERATION_STAT_QTR_FACT.csv
│ │ │ │ │ │ ├── BAM_OPERATION_STAT_YEAR_FACT.csv
│ │ │ │ │ │ ├── offices.csv
│ │ │ │ │ │ ├── BAM_OPERATION_STAT_MONTH_FACT.csv
│ │ │ │ │ │ ├── BAM_SERVER_STAT_DAY_FACT.csv
│ │ │ │ │ │ └── BAM_DAY_DIM.csv
│ │ │ │ │ ├── lib
│ │ │ │ │ │ └── ojdbc6.jar
│ │ │ │ │ ├── excel
│ │ │ │ │ │ ├── offices.xls
│ │ │ │ │ │ ├── customers.xlsx
│ │ │ │ │ │ └── customers_noheader_with_ints.xls
│ │ │ │ │ ├── log4j.properties
│ │ │ │ │ ├── dataServices.xml
│ │ │ │ │ └── xsd
│ │ │ │ │ │ ├── order_count.xsd
│ │ │ │ │ │ ├── product_lines.xsd
│ │ │ │ │ │ ├── products.xsd
│ │ │ │ │ │ ├── payments.xsd
│ │ │ │ │ │ ├── payments_with_date_time.xsd
│ │ │ │ │ │ └── customers.xsd
│ │ │ │ └── java
│ │ │ │ │ └── org
│ │ │ │ │ └── wso2
│ │ │ │ │ └── carbon
│ │ │ │ │ └── dataservices
│ │ │ │ │ └── core
│ │ │ │ │ └── test
│ │ │ │ │ ├── csv
│ │ │ │ │ ├── BAM_QTR_DIM.csv
│ │ │ │ │ ├── BAM_MONTH_DIM.csv
│ │ │ │ │ ├── BAM_SERVER_STAT_QTR_FACT.csv
│ │ │ │ │ ├── BAM_SERVER_STAT_YEAR_FACT.csv
│ │ │ │ │ ├── BAM_SERVER_STAT_MONTH_FACT.csv
│ │ │ │ │ ├── BAM_SERVICE_STAT_QTR_FACT.csv
│ │ │ │ │ ├── BAM_SERVICE_STAT_YEAR_FACT.csv
│ │ │ │ │ ├── BAM_SERVICE_STAT_MONTH_FACT.csv
│ │ │ │ │ ├── BAM_OPERATION_STAT_YEAR_FACT.csv
│ │ │ │ │ ├── CSVFinalizeTest.java
│ │ │ │ │ ├── CSVInitTest.java
│ │ │ │ │ ├── CSVTestSuite.java
│ │ │ │ │ └── BAM_DAY_DIM.csv
│ │ │ │ │ ├── sql
│ │ │ │ │ ├── oracle
│ │ │ │ │ │ ├── OracleBinaryDataServiceTest.java
│ │ │ │ │ │ ├── OracleNestedQueryTest.java
│ │ │ │ │ │ ├── OracleFinalizeTest.java
│ │ │ │ │ │ ├── OracleInitTest.java
│ │ │ │ │ │ ├── OracleBasicTest.java
│ │ │ │ │ │ ├── OracleUDTTest.java
│ │ │ │ │ │ ├── OracleInputMappingServiceTest.java
│ │ │ │ │ │ ├── OracleTestSuite.java
│ │ │ │ │ │ ├── OracleAdvancedStoredProcServiceTest.java
│ │ │ │ │ │ ├── OracleStoredProcedureServiceTest.java
│ │ │ │ │ │ └── OracleDMLServiceTest.java
│ │ │ │ │ ├── mysql
│ │ │ │ │ │ ├── MySQLBinaryDataServiceTest.java
│ │ │ │ │ │ ├── MySQLFinalizeTest.java
│ │ │ │ │ │ ├── MySQLInitTest.java
│ │ │ │ │ │ ├── MySQLResourceServiceTest.java
│ │ │ │ │ │ ├── MySQLNestedQueryTest.java
│ │ │ │ │ │ ├── MySQLAdvancedStoredProcServiceTest.java
│ │ │ │ │ │ ├── MySQLInputMappingServiceTest.java
│ │ │ │ │ │ └── MySQLBasicTest.java
│ │ │ │ │ └── h2
│ │ │ │ │ │ ├── H2ResourceServiceTest.java
│ │ │ │ │ │ ├── H2NestedQueryTest.java
│ │ │ │ │ │ ├── H2InputMappingServiceTest.java
│ │ │ │ │ │ ├── H2BasicTest.java
│ │ │ │ │ │ ├── H2FinalizeTest.java
│ │ │ │ │ │ ├── H2TestSuite.java
│ │ │ │ │ │ └── H2InitTest.java
│ │ │ │ │ ├── util
│ │ │ │ │ ├── SimpleHttpServerExtension.java
│ │ │ │ │ └── OddLengthValidator.java
│ │ │ │ │ ├── excel
│ │ │ │ │ ├── ExcelFinalizeTest.java
│ │ │ │ │ ├── ExcelInitTest.java
│ │ │ │ │ └── ExcelTestSuite.java
│ │ │ │ │ ├── generic
│ │ │ │ │ ├── GenericTestSuite.java
│ │ │ │ │ ├── GenericFinalizeTest.java
│ │ │ │ │ └── GenericInitTest.java
│ │ │ │ │ └── tools
│ │ │ │ │ ├── ToolsTestSuite.java
│ │ │ │ │ ├── ToolsFinalizeTest.java
│ │ │ │ │ └── ToolsInitTest.java
│ │ │ └── main
│ │ │ │ ├── java
│ │ │ │ └── org
│ │ │ │ │ └── wso2
│ │ │ │ │ └── carbon
│ │ │ │ │ └── dataservices
│ │ │ │ │ └── core
│ │ │ │ │ ├── internal
│ │ │ │ │ └── DSDummyService.java
│ │ │ │ │ ├── dispatch
│ │ │ │ │ └── BatchRequestParticipant.java
│ │ │ │ │ ├── sqlparser
│ │ │ │ │ └── analysers
│ │ │ │ │ │ ├── WhereAnalyzer.java
│ │ │ │ │ │ ├── KeyWordAnalyzer.java
│ │ │ │ │ │ └── AnalyzerFactory.java
│ │ │ │ │ ├── validation
│ │ │ │ │ ├── Validator.java
│ │ │ │ │ ├── ValidatorExt.java
│ │ │ │ │ ├── ValidationContext.java
│ │ │ │ │ └── standard
│ │ │ │ │ │ └── PatternValidator.java
│ │ │ │ │ ├── custom
│ │ │ │ │ └── datasource
│ │ │ │ │ │ ├── DataRow.java
│ │ │ │ │ │ ├── CustomQueryDataSourceReader.java
│ │ │ │ │ │ ├── CustomTabularDataSourceReader.java
│ │ │ │ │ │ ├── DataColumn.java
│ │ │ │ │ │ ├── CustomQueryBasedDS.java
│ │ │ │ │ │ ├── CustomDataSourceBase.java
│ │ │ │ │ │ └── FixedDataRow.java
│ │ │ │ │ ├── odata
│ │ │ │ │ ├── ODataServiceFault.java
│ │ │ │ │ ├── NavigationKeys.java
│ │ │ │ │ ├── ODataEntry.java
│ │ │ │ │ └── NavigationTable.java
│ │ │ │ │ ├── auth
│ │ │ │ │ └── DynamicUserAuthenticator.java
│ │ │ │ │ ├── DataServiceUser.java
│ │ │ │ │ ├── engine
│ │ │ │ │ ├── ExternalParam.java
│ │ │ │ │ ├── DataEntry.java
│ │ │ │ │ └── SQLDialect.java
│ │ │ │ │ ├── script
│ │ │ │ │ └── PaginatedTableInfo.java
│ │ │ │ │ ├── description
│ │ │ │ │ └── config
│ │ │ │ │ │ └── CustomQueryBasedDSConfig.java
│ │ │ │ │ └── jmx
│ │ │ │ │ └── DataServiceInstanceMBean.java
│ │ │ │ └── resources
│ │ │ │ └── META-INF
│ │ │ │ └── component.xml
│ │ └── README.txt
│ ├── org.wso2.carbon.dataservices.ui
│ │ └── src
│ │ │ └── main
│ │ │ ├── resources
│ │ │ └── web
│ │ │ │ ├── ds
│ │ │ │ ├── images
│ │ │ │ │ ├── add.gif
│ │ │ │ │ ├── help.gif
│ │ │ │ │ ├── minus.gif
│ │ │ │ │ ├── plus.gif
│ │ │ │ │ ├── cluster.gif
│ │ │ │ │ ├── create_svc.gif
│ │ │ │ │ ├── genclient.gif
│ │ │ │ │ ├── event-sources.gif
│ │ │ │ │ ├── registry_picker.gif
│ │ │ │ │ └── generate_input_mappings.png
│ │ │ │ ├── docs
│ │ │ │ │ └── images
│ │ │ │ │ │ ├── step1.png
│ │ │ │ │ │ ├── step2.png
│ │ │ │ │ │ ├── step3.png
│ │ │ │ │ │ ├── step4.png
│ │ │ │ │ │ ├── step5.png
│ │ │ │ │ │ ├── step6.png
│ │ │ │ │ │ ├── step7.png
│ │ │ │ │ │ ├── step8.png
│ │ │ │ │ │ ├── step9.png
│ │ │ │ │ │ ├── task.png
│ │ │ │ │ │ ├── homepage.png
│ │ │ │ │ │ ├── services.jpg
│ │ │ │ │ │ ├── services.png
│ │ │ │ │ │ ├── step10.png
│ │ │ │ │ │ ├── try-it.jpg
│ │ │ │ │ │ ├── create_ds.png
│ │ │ │ │ │ ├── datasource.jpg
│ │ │ │ │ │ ├── edit_query.png
│ │ │ │ │ │ ├── edit_service.png
│ │ │ │ │ │ ├── preview-step1.jpg
│ │ │ │ │ │ ├── service-mgt.jpg
│ │ │ │ │ │ ├── service-mgt.png
│ │ │ │ │ │ ├── wsdl_upload.png
│ │ │ │ │ │ ├── add-operations.jpg
│ │ │ │ │ │ ├── add-operations.png
│ │ │ │ │ │ ├── add_data_source.png
│ │ │ │ │ │ ├── configur_query.jpg
│ │ │ │ │ │ ├── configur_query.png
│ │ │ │ │ │ ├── delete_service.png
│ │ │ │ │ │ ├── ds_upload_step1.png
│ │ │ │ │ │ ├── ds_upload_step2.png
│ │ │ │ │ │ ├── ds_upload_step3.png
│ │ │ │ │ │ ├── ds_upload_step4.png
│ │ │ │ │ │ ├── edit_datasource.png
│ │ │ │ │ │ ├── edit_operation.png
│ │ │ │ │ │ ├── edit_xml_editor.png
│ │ │ │ │ │ ├── added_data_sources.png
│ │ │ │ │ │ ├── edit_dataservice.png
│ │ │ │ │ │ ├── inactive_service.png
│ │ │ │ │ │ ├── edit_datasource_values.png
│ │ │ │ │ │ └── contract_first_service_list.png
│ │ │ │ ├── css
│ │ │ │ │ └── task.css
│ │ │ │ ├── index.jsp
│ │ │ │ ├── gadgets
│ │ │ │ │ └── util
│ │ │ │ │ │ └── dsutildata-ajaxprocessor.jsp
│ │ │ │ └── removeQuery.jsp
│ │ │ │ └── data_service
│ │ │ │ └── images
│ │ │ │ ├── type.gif
│ │ │ │ ├── dbsimport.gif
│ │ │ │ ├── data-services.gif
│ │ │ │ ├── data-services-create.gif
│ │ │ │ ├── data-services-upload.gif
│ │ │ │ ├── data-services-disabled.gif
│ │ │ │ ├── data-services-uploadDBS.gif
│ │ │ │ ├── data-services-treewizard.gif
│ │ │ │ └── data-services-uploadWSDL.gif
│ │ │ └── java
│ │ │ └── org
│ │ │ └── wso2
│ │ │ └── carbon
│ │ │ └── dataservices
│ │ │ └── ui
│ │ │ ├── beans
│ │ │ ├── DSDLConstants.java
│ │ │ ├── WebQuery.java
│ │ │ └── Operation.java
│ │ │ └── UIutils.java
│ ├── org.wso2.carbon.dataservices.sql.driver
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── org
│ │ │ └── wso2
│ │ │ └── carbon
│ │ │ └── dataservices
│ │ │ └── sql
│ │ │ └── driver
│ │ │ ├── processor
│ │ │ ├── writer
│ │ │ │ ├── DataWriter.java
│ │ │ │ └── DataWriterFactory.java
│ │ │ └── reader
│ │ │ │ └── DataReader.java
│ │ │ ├── parser
│ │ │ ├── ParserException.java
│ │ │ └── EntityList.java
│ │ │ ├── util
│ │ │ └── WorkBookOutputWriter.java
│ │ │ ├── query
│ │ │ └── select
│ │ │ │ ├── ExcelSelectQuery.java
│ │ │ │ ├── GSpreadSelectQuery.java
│ │ │ │ └── CustomSelectQuery.java
│ │ │ └── TConnectionFactory.java
│ ├── org.wso2.carbon.dataservices.task.ui
│ │ └── src
│ │ │ └── main
│ │ │ └── resources
│ │ │ ├── web
│ │ │ └── ds_task
│ │ │ │ ├── docs
│ │ │ │ └── images
│ │ │ │ │ └── task.png
│ │ │ │ └── images
│ │ │ │ └── tasks-icon.gif
│ │ │ └── META-INF
│ │ │ └── component.xml
│ ├── org.wso2.carbon.dataservices.task
│ │ └── src
│ │ │ └── main
│ │ │ ├── java
│ │ │ └── org
│ │ │ │ └── wso2
│ │ │ │ └── carbon
│ │ │ │ └── dataservices
│ │ │ │ └── task
│ │ │ │ └── DataTask.java
│ │ │ └── resources
│ │ │ └── META-INF
│ │ │ └── services.xml
│ └── org.wso2.carbon.dataservices.odata
│ │ └── src
│ │ └── main
│ │ ├── java
│ │ └── org
│ │ │ └── wso2
│ │ │ └── carbon
│ │ │ └── dataservices
│ │ │ └── odata
│ │ │ └── ODataServlet.java
│ │ └── webapp
│ │ └── META-INF
│ │ └── webapp-classloading.xml
├── dbconsole
│ ├── org.wso2.carbon.dbconsole.ui
│ │ └── src
│ │ │ └── main
│ │ │ └── resources
│ │ │ ├── org
│ │ │ └── wso2
│ │ │ │ └── carbon
│ │ │ │ └── dbconsole
│ │ │ │ └── ui
│ │ │ │ └── i18n
│ │ │ │ └── Resources.properties
│ │ │ └── web
│ │ │ └── dbconsole
│ │ │ ├── images
│ │ │ └── db-exp.png
│ │ │ └── docs
│ │ │ └── images
│ │ │ ├── quickstart-1.png
│ │ │ └── quickstart-2.png
│ └── pom.xml
├── data-sources
│ └── org.wso2.carbon.datasource.reader.hadoop
│ │ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── wso2
│ │ └── carbon
│ │ └── datasource
│ │ └── reader
│ │ └── hadoop
│ │ ├── HadoopDataSourceConstants.java
│ │ └── HadoopDataSourceConfiguration.java
└── ndata-services
│ ├── org.wso2.carbon.ndataservices.core
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── org
│ │ │ └── wso2
│ │ │ └── carbon
│ │ │ └── ndataservices
│ │ │ └── core
│ │ │ └── DataservicesCallbackServlet.java
│ │ └── resources
│ │ └── META-INF
│ │ └── component.xml
│ ├── org.wso2.carbon.ndataservices.expression
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── wso2
│ │ └── carbon
│ │ └── dataservices
│ │ └── expression
│ │ └── ExpressionData.java
│ └── pom.xml
├── .github
└── CODEOWNERS
├── features
├── data-services
│ ├── data-services-hosting
│ │ └── org.wso2.carbon.dataservices.server.feature
│ │ │ └── resources
│ │ │ ├── p2.inf
│ │ │ └── build.properties
│ └── pom.xml
├── categories
│ └── pom.xml
├── dbconsole
│ └── pom.xml
├── ndata-services
│ └── pom.xml
└── cassandra-jdbc-1.2.5
│ └── pom.xml
├── issue_template.md
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore everything in this directory
2 | target
3 | .classpath
4 | .settings
5 | .project
6 | *.iml
7 | .idea
8 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/sql/OracleType.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE TYPE mem_array_type IS VARRAY(10) of VARCHAR2(15)
--------------------------------------------------------------------------------
/components/dbconsole/org.wso2.carbon.dbconsole.ui/src/main/resources/org/wso2/carbon/dbconsole/ui/i18n/Resources.properties:
--------------------------------------------------------------------------------
1 | database.explorer = Database Explorer
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # See: https://help.github.com/articles/about-codeowners/
2 |
3 | # These owners will be the default owners for everything in the repo.
4 | * @chanikag
5 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_YEAR_DIM.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_START_TIMESTAMP","BAM_NO"
2 | "1","2010-01-01 00:00:00.0","2010"
3 | "2","2009-01-01 00:00:00.0","2009"
4 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/lib/ojdbc6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/lib/ojdbc6.jar
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/excel/offices.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/excel/offices.xls
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/add.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/add.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_QTR_DIM.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_START_TIMESTAMP","BAM_NAME","BAM_NO","BAM_YEAR"
2 | "1","2010-01-01 00:00:00.0","","0","1"
3 | "2","2009-10-01 00:00:00.0","","3","2"
4 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/excel/customers.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/excel/customers.xlsx
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/help.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/help.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/minus.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/minus.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/plus.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/plus.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/cluster.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/cluster.gif
--------------------------------------------------------------------------------
/components/dbconsole/org.wso2.carbon.dbconsole.ui/src/main/resources/web/dbconsole/images/db-exp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/dbconsole/org.wso2.carbon.dbconsole.ui/src/main/resources/web/dbconsole/images/db-exp.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step1.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step2.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step3.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step4.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step5.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step6.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step7.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step8.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step9.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/task.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/task.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/create_svc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/create_svc.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/genclient.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/genclient.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/homepage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/homepage.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/services.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/services.jpg
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/services.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/services.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/step10.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/try-it.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/try-it.jpg
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/event-sources.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/event-sources.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/type.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/type.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/create_ds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/create_ds.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/datasource.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/datasource.jpg
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_query.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_query.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/registry_picker.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/registry_picker.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_service.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/preview-step1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/preview-step1.jpg
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/service-mgt.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/service-mgt.jpg
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/service-mgt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/service-mgt.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/wsdl_upload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/wsdl_upload.png
--------------------------------------------------------------------------------
/components/dbconsole/org.wso2.carbon.dbconsole.ui/src/main/resources/web/dbconsole/docs/images/quickstart-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/dbconsole/org.wso2.carbon.dbconsole.ui/src/main/resources/web/dbconsole/docs/images/quickstart-1.png
--------------------------------------------------------------------------------
/components/dbconsole/org.wso2.carbon.dbconsole.ui/src/main/resources/web/dbconsole/docs/images/quickstart-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/dbconsole/org.wso2.carbon.dbconsole.ui/src/main/resources/web/dbconsole/docs/images/quickstart-2.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/BAM_QTR_DIM.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_START_TIMESTAMP","BAM_NAME","BAM_NO","BAM_YEAR"
2 | "1","2010-01-01 00:00:00.0","","0","1"
3 | "2","2009-10-01 00:00:00.0","","3","2"
4 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.sql.driver/src/main/java/org/wso2/carbon/dataservices/sql/driver/processor/writer/DataWriter.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.sql.driver.processor.writer;
2 |
3 | public interface DataWriter {
4 | //test
5 | }
6 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.task.ui/src/main/resources/web/ds_task/docs/images/task.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.task.ui/src/main/resources/web/ds_task/docs/images/task.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.task.ui/src/main/resources/web/ds_task/images/tasks-icon.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.task.ui/src/main/resources/web/ds_task/images/tasks-icon.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/dbsimport.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/dbsimport.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/add-operations.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/add-operations.jpg
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/add-operations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/add-operations.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/add_data_source.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/add_data_source.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/configur_query.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/configur_query.jpg
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/configur_query.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/configur_query.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/delete_service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/delete_service.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/ds_upload_step1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/ds_upload_step1.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/ds_upload_step2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/ds_upload_step2.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/ds_upload_step3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/ds_upload_step3.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/ds_upload_step4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/ds_upload_step4.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_datasource.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_datasource.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_operation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_operation.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_xml_editor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_xml_editor.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/excel/customers_noheader_with_ints.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/excel/customers_noheader_with_ints.xls
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/added_data_sources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/added_data_sources.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_dataservice.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_dataservice.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/inactive_service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/inactive_service.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/generate_input_mappings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/images/generate_input_mappings.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_MONTH_DIM.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_START_TIMESTAMP","BAM_NAME","BAM_NO","BAM_QTR"
2 | "1","2010-02-01 00:00:00.0","","1","1"
3 | "2","2010-01-01 00:00:00.0","","0","1"
4 | "3","2010-03-01 00:00:00.0","","2","1"
5 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_datasource_values.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/edit_datasource_values.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_SERVER_STAT_QTR_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVER_ID","BAM_QTR_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_SERVER_STAT_YEAR_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVER_ID","BAM_YEAR_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services-create.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services-create.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services-upload.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services-upload.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services-disabled.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services-disabled.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services-uploadDBS.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services-uploadDBS.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/contract_first_service_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/docs/images/contract_first_service_list.png
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services-treewizard.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services-treewizard.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services-uploadWSDL.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/carbon-data/master/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/data_service/images/data-services-uploadWSDL.gif
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/BAM_MONTH_DIM.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_START_TIMESTAMP","BAM_NAME","BAM_NO","BAM_QTR"
2 | "1","2010-02-01 00:00:00.0","","1","1"
3 | "2","2010-01-01 00:00:00.0","","0","1"
4 | "3","2010-03-01 00:00:00.0","","2","1"
5 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/BAM_SERVER_STAT_QTR_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVER_ID","BAM_QTR_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/BAM_SERVER_STAT_YEAR_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVER_ID","BAM_YEAR_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_SERVER_STAT_MONTH_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVER_ID","BAM_MONTH_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "2","1","1","0","80","-1","292","292","0"
4 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/sql/H2StoredFuncs.sql:
--------------------------------------------------------------------------------
1 | CREATE ALIAS getAverageCreditLimit FOR "org.wso2.carbon.dataservices.core.test.sql.h2.H2TestUtils.getAverageCreditLimit";
2 |
3 | CREATE ALIAS getCustomerPhoneNumber FOR "org.wso2.carbon.dataservices.core.test.sql.h2.H2TestUtils.getCustomerPhoneNumber";
4 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/BAM_SERVER_STAT_MONTH_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVER_ID","BAM_MONTH_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "2","1","1","0","80","-1","292","292","0"
4 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_SERVICE_STAT_QTR_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVICE_ID","BAM_QTR_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "2","2","2","0","0","0","0","0","0"
4 | "3","3","2","0","0","0","0","0","0"
5 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_SERVICE_STAT_YEAR_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVICE_ID","BAM_YEAR_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "2","2","2","0","0","0","0","0","0"
4 | "3","3","2","0","0","0","0","0","0"
5 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/BAM_SERVICE_STAT_QTR_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVICE_ID","BAM_QTR_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "2","2","2","0","0","0","0","0","0"
4 | "3","3","2","0","0","0","0","0","0"
5 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/BAM_SERVICE_STAT_YEAR_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVICE_ID","BAM_YEAR_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "2","2","2","0","0","0","0","0","0"
4 | "3","3","2","0","0","0","0","0","0"
5 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_SERVICE_STAT_MONTH_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVICE_ID","BAM_MONTH_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "2","2","2","0","0","0","0","0","0"
4 | "3","3","2","0","0","0","0","0","0"
5 | "4","1","1","0","80","0","292","292","0"
6 | "5","2","1","0","0","0","0","0","0"
7 | "6","3","1","0","0","0","0","0","0"
8 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/css/task.css:
--------------------------------------------------------------------------------
1 | .form-subtitle {
2 | font-weight: bold;
3 | }
4 |
5 | .form-help {
6 | font-style: italic;
7 | color: #595959;
8 | }
9 |
10 | .table.styled {
11 | border: solid 1px #595959;
12 | }
13 |
14 | table.styled thead th {
15 | text-align: left;
16 | }
17 |
18 | table.styled tbody td {
19 | padding-left: 3px;
20 | padding-top: 3px;
21 | padding-bottom: 3px;
22 | }
23 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/BAM_SERVICE_STAT_MONTH_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVICE_ID","BAM_MONTH_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "2","2","2","0","0","0","0","0","0"
4 | "3","3","2","0","0","0","0","0","0"
5 | "4","1","1","0","80","0","292","292","0"
6 | "5","2","1","0","0","0","0","0","0"
7 | "6","3","1","0","0","0","0","0","0"
8 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/README.txt:
--------------------------------------------------------------------------------
1 | How to enable data service tests?
2 | =================================
3 | 1.pom.xml
4 | - Goto maven-surefire-plugin declaration.
5 | - Change true to false
6 |
7 | - Drop the JDBC driver jar (mysql-connector-java-5.1.5-bin.jar in this case) to src/test/resources/lib folder
8 | - Uncomment & change the section
9 |
10 |
11 | 2.Create MySQL database using supplied script
12 | - MySQL - Run /sql/CreateMySQLTestDB.sql file with root privileges.
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_OPERATION_STAT_QTR_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_OPERATION_ID","BAM_QTR_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "2","2","2","0","0","0","0","0","0"
4 | "3","3","2","0","0","0","0","0","0"
5 | "4","4","2","0","0","0","0","0","0"
6 | "5","5","2","0","0","0","0","0","0"
7 | "6","6","2","0","0","0","0","0","0"
8 | "7","7","2","0","0","0","0","0","0"
9 | "8","8","2","0","0","0","0","0","0"
10 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_OPERATION_STAT_YEAR_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_OPERATION_ID","BAM_YEAR_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "2","2","2","0","0","0","0","0","0"
4 | "3","3","2","0","0","0","0","0","0"
5 | "4","4","2","0","0","0","0","0","0"
6 | "5","5","2","0","0","0","0","0","0"
7 | "6","6","2","0","0","0","0","0","0"
8 | "7","7","2","0","0","0","0","0","0"
9 | "8","8","2","0","0","0","0","0","0"
10 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/BAM_OPERATION_STAT_YEAR_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_OPERATION_ID","BAM_YEAR_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "2","2","2","0","0","0","0","0","0"
4 | "3","3","2","0","0","0","0","0","0"
5 | "4","4","2","0","0","0","0","0","0"
6 | "5","5","2","0","0","0","0","0","0"
7 | "6","6","2","0","0","0","0","0","0"
8 | "7","7","2","0","0","0","0","0","0"
9 | "8","8","2","0","0","0","0","0","0"
10 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/oracle/OracleBinaryDataServiceTest.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.core.test.sql.oracle;
2 |
3 | import org.wso2.carbon.dataservices.core.test.sql.AbstractBinaryDataServiceTest;
4 |
5 | public class OracleBinaryDataServiceTest extends AbstractBinaryDataServiceTest {
6 |
7 | public OracleBinaryDataServiceTest(String testName) {
8 | super(testName, "OracleBinaryDataService");
9 | }
10 |
11 | public void testMySQLBinaryDataStoreRetrieve() {
12 | this.binaryDataStoreRetrieve();
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/oracle/OracleNestedQueryTest.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.core.test.sql.oracle;
2 |
3 | import org.wso2.carbon.dataservices.core.test.sql.AbstractNestedQueryServiceTest;
4 |
5 | public class OracleNestedQueryTest extends AbstractNestedQueryServiceTest {
6 |
7 | public OracleNestedQueryTest(String testName) {
8 | super(testName, "OracleNestedQueryStoredProcService");
9 | }
10 |
11 | public void testOracleNestedQuery2ForDateTime() {
12 | this.nestedQuery2ForDateTime();
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/oracle/OracleFinalizeTest.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.core.test.sql.oracle;
2 |
3 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
4 | import org.wso2.carbon.dataservices.core.test.util.UtilServer;
5 |
6 | public class OracleFinalizeTest extends DataServiceBaseTestCase {
7 |
8 | public OracleFinalizeTest() {
9 | super("OracleFinalizeTest");
10 | }
11 |
12 | public void testMySQLStop() throws Exception {
13 | UtilServer.stop();
14 | endTenantFlow();
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/features/data-services/data-services-hosting/org.wso2.carbon.dataservices.server.feature/resources/p2.inf:
--------------------------------------------------------------------------------
1 | instructions.configure = \
2 | org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/);\
3 | org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/);\
4 | org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\
5 | org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.dataservices.server_${feature.version}/odata.war,target:${installFolder}/../../deployment/server/webapps/odata.war,overwrite:true);\
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/sql/CreateOracleTestDB.sql:
--------------------------------------------------------------------------------
1 | START DropOracleUser;
2 |
3 | CREATE USER datauser IDENTIFIED BY wso2;
4 |
5 | GRANT CONNECT,RESOURCE to datauser with admin option;
6 |
7 | CONNECT datauser/wso2;
8 | alter session set NLS_DATE_FORMAT='YYYY-MM-DD';
9 |
10 | SET ESCAPE ON
11 | SET ESCAPE '#'
12 |
13 |
14 | START CreateOracleTables;
15 | START Offices;
16 | START Employees;
17 | START Customers;
18 | START Products;
19 | START Orders;
20 | START Payments;
21 | START ProductLines;
22 | START OrderDetails;
23 | START OracleStoredProcs;
24 | START OracleStoredFuncs;
25 |
26 |
27 |
28 | exit;
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/sql/DropOracleUser.sql:
--------------------------------------------------------------------------------
1 | DECLARE
2 | u_count number;
3 | user_name VARCHAR2 (50);
4 |
5 | BEGIN
6 |
7 | u_count :=0;
8 | user_name :='datauser';
9 | SELECT COUNT (1) INTO u_count FROM dba_users WHERE username = UPPER (user_name);
10 |
11 | IF u_count != 0
12 | THEN
13 | EXECUTE IMMEDIATE ('DROP USER '||user_name||' CASCADE');
14 | END IF;
15 |
16 | u_count := 0;
17 |
18 | EXCEPTION
19 | WHEN OTHERS
20 | THEN
21 | DBMS_OUTPUT.put_line (SQLERRM);
22 | DBMS_OUTPUT.put_line (' ');
23 |
24 | END;
25 |
26 | /
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/oracle/OracleInitTest.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.core.test.sql.oracle;
2 |
3 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
4 | import org.wso2.carbon.dataservices.core.test.util.UtilServer;
5 |
6 | public class OracleInitTest extends DataServiceBaseTestCase{
7 |
8 | public OracleInitTest() {
9 | super("OracleInitTest");
10 | System.setProperty("user.timezone", "CDT");
11 | }
12 |
13 | public void testOracleStartup() throws Exception {
14 | startTenantFlow();
15 | UtilServer.start(repository, axis2Conf);
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/offices.csv:
--------------------------------------------------------------------------------
1 | "1","San Francisco","+1 650 219 4782","100 Market Street","Suite 300","CA","USA","94080","NA"
2 | "2","Boston","+1 215 837 0825","1550 Court Place","Suite 102","MA","USA","02107","NA"
3 | "3","NYC","+1 212 555 3000","523 East 53rd Street","apt. 5A","NY","USA","10022","NA"
4 | "4","Paris","+33 14 723 4404","43 Rue Jouffroy D'abbans","","","France","75017","EMEA"
5 | "5","Tokyo","+81 33 224 5000","4-1 Kioicho","","Chiyoda-Ku","Japan","102-8578","Japan"
6 | "6","Sydney","+61 2 9264 2451","5-11 Wentworth Avenue","Floor #2","","Australia","NSW 2010","APAC"
7 | "7","London","+44 20 7877 2041","25 Old Broad Street","Level 7","","UK","EC2N 1HN","EMEA"
8 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/sql/CreateMySQLTestDB.sql:
--------------------------------------------------------------------------------
1 | DROP DATABASE IF EXISTS DSTestDB;
2 | create database DSTestDB;
3 | grant all on DSTestDB.* to 'datauser'@'localhost' identified by 'wso2';
4 | grant select on mysql.proc to 'datauser'@'localhost';
5 | grant all on DSTestDB.* to 'datauser'@'%' identified by 'wso2';
6 | grant select on mysql.proc to 'datauser'@'%';
7 |
8 | use DSTestDB;
9 |
10 | source CreateTables.sql;
11 | source Offices.sql;
12 | source Employees.sql;
13 | source Customers.sql;
14 | source Products.sql;
15 | source Orders.sql;
16 | source Payments.sql;
17 | source ProductLines.sql;
18 | source OrderDetails.sql;
19 | source MySQLStoredProcs.sql;
20 | source MySQLStoredFuncs.sql;
21 |
22 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/sql/OracleStoredFuncs.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION getAverageCreditLimit
2 | RETURN BINARY_DOUBLE IS
3 |
4 | totalCL Customers.creditLimit%TYPE;
5 | average Customers.creditLimit%TYPE;
6 | noOfCustomers NUMBER;
7 |
8 | BEGIN
9 | SELECT SUM(creditLimit) into totalCL from Customers;
10 | SELECT COUNT(*) into noOfCustomers from Customers;
11 | average := totalCL/noOfCustomers;
12 | RETURN average;
13 | END;
14 |
15 | /
16 |
17 | CREATE OR REPLACE FUNCTION getCustomerPhoneNumber(custNo NUMBER)
18 | RETURN varchar2 IS
19 |
20 | phoneNo Customers.phone%TYPE;
21 |
22 |
23 | BEGIN
24 | SELECT phone into phoneNo from Customers WHERE customerNumber = custNo;
25 | RETURN phoneNo;
26 | END;
27 |
28 | /
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/sql/CreateH2TestDB.sql:
--------------------------------------------------------------------------------
1 | DROP ALL OBJECTS;
2 | RUNSCRIPT FROM './src/test/resources/sql/CreateTables.sql';
3 | RUNSCRIPT FROM './src/test/resources/sql/Offices.sql';
4 | RUNSCRIPT FROM './src/test/resources/sql/Employees.sql';
5 | RUNSCRIPT FROM './src/test/resources/sql/Customers.sql';
6 | RUNSCRIPT FROM './src/test/resources/sql/Products.sql';
7 | RUNSCRIPT FROM './src/test/resources/sql/Orders.sql';
8 | RUNSCRIPT FROM './src/test/resources/sql/Payments.sql';
9 | RUNSCRIPT FROM './src/test/resources/sql/ProductLines.sql';
10 | RUNSCRIPT FROM './src/test/resources/sql/OrderDetails.sql';
11 | RUNSCRIPT FROM './src/test/resources/sql/H2StoredProcs.sql';
12 | RUNSCRIPT FROM './src/test/resources/sql/H2StoredFuncs.sql';
13 |
--------------------------------------------------------------------------------
/features/data-services/data-services-hosting/org.wso2.carbon.dataservices.server.feature/resources/build.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | custom = true
18 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/sql/MySQLStoredFuncs.sql:
--------------------------------------------------------------------------------
1 | DELIMITER $$
2 |
3 | DROP FUNCTION IF EXISTS getAverageCreditLimit $$
4 | CREATE FUNCTION getAverageCreditLimit() RETURNS DOUBLE
5 | BEGIN
6 | DECLARE totalCL,average DOUBLE;
7 | DECLARE noOfCustomers INT;
8 | SELECT SUM(creditLimit) into totalCL from Customers;
9 | SELECT COUNT(*) into noOfCustomers from Customers;
10 | SET average = totalCL/noOfCustomers;
11 | RETURN average;
12 | END $$
13 |
14 | DROP FUNCTION IF EXISTS getCustomerPhoneNumber $$
15 | CREATE FUNCTION getCustomerPhoneNumber(custNo INTEGER) RETURNS varchar(50)
16 | BEGIN
17 | DECLARE phoneNo varchar(50);
18 | SELECT phone into phoneNo from Customers WHERE customerNumber = custNo;
19 | RETURN phoneNo;
20 | END $$
21 |
22 | DELIMITER ;
23 |
--------------------------------------------------------------------------------
/issue_template.md:
--------------------------------------------------------------------------------
1 | **Description:**
2 |
3 |
4 | **Suggested Labels:**
5 |
6 |
7 | **Suggested Assignees:**
8 |
9 |
10 | **Affected Product Version:**
11 |
12 | **OS, DB, other environment details and versions:**
13 |
14 | **Steps to reproduce:**
15 |
16 |
17 | **Related Issues:**
18 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_OPERATION_STAT_MONTH_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_OPERATION_ID","BAM_MONTH_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "2","2","2","0","0","0","0","0","0"
4 | "3","3","2","0","0","0","0","0","0"
5 | "4","4","2","0","0","0","0","0","0"
6 | "5","5","2","0","0","0","0","0","0"
7 | "6","6","2","0","0","0","0","0","0"
8 | "7","7","2","0","0","0","0","0","0"
9 | "8","8","2","0","0","0","0","0","0"
10 | "9","1","1","0","80","0","292","292","0"
11 | "10","2","1","0","0","0","0","0","0"
12 | "11","3","1","0","0","0","0","0","0"
13 | "12","4","1","0","0","0","0","0","0"
14 | "13","5","1","0","0","0","0","0","0"
15 | "14","6","1","0","0","0","0","0","0"
16 | "15","7","1","0","0","0","0","0","0"
17 | "16","8","1","0","0","0","0","0","0"
18 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/index.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | ~
4 | ~ WSO2 Inc. licenses this file to you under the Apache License,
5 | ~ Version 2.0 (the "License"); you may not use this file except
6 | ~ in compliance with the License.
7 | ~ You may obtain a copy of the License at
8 | ~
9 | ~ http://www.apache.org/licenses/LICENSE-2.0
10 | ~
11 | ~ Unless required by applicable law or agreed to in writing,
12 | ~ software distributed under the License is distributed on an
13 | ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | ~ KIND, either express or implied. See the License for the
15 | ~ specific language governing permissions and limitations
16 | ~ under the License.
17 | --%>
18 | edit
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/sql/Offices.sql:
--------------------------------------------------------------------------------
1 | insert into Offices values ('1','San Francisco','+1 650 219 4782','100 Market Street','Suite 300','CA','USA','94080','NA');
2 | insert into Offices values ('2','Boston','+1 215 837 0825','1550 Court Place','Suite 102','MA','USA','02107','NA');
3 | insert into Offices values ('3','NYC','+1 212 555 3000','523 East 53rd Street','apt. 5A','NY','USA','10022','NA');
4 | insert into Offices values ('4','Paris','+33 14 723 4404','43 Rue Jouffroy D''abbans', null, null,'France','75017','EMEA');
5 | insert into Offices values ('5','Tokyo','+81 33 224 5000','4-1 Kioicho', null,'Chiyoda-Ku','Japan','102-8578','Japan');
6 | insert into Offices values ('6','Sydney','+61 2 9264 2451','5-11 Wentworth Avenue','Floor #2', null,'Australia','NSW 2010','APAC');
7 | insert into Offices values ('7','London','+44 20 7877 2041','25 Old Broad Street','Level 7', null,'UK','EC2N 1HN','EMEA');
8 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/util/SimpleHttpServerExtension.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.core.test.util;
2 |
3 | import org.apache.axis2.AxisFault;
4 | import org.apache.axis2.context.ConfigurationContext;
5 | import org.apache.axis2.transport.http.SimpleHTTPServer;
6 | import org.apache.axis2.transport.http.server.HttpFactory;
7 |
8 | /**
9 | * Created by rajith on 10/9/15.
10 | */
11 | public class SimpleHttpServerExtension extends SimpleHTTPServer {
12 | /**
13 | * Create a SimpleHTTPServer using default HttpFactory settings
14 | */
15 | public SimpleHttpServerExtension(ConfigurationContext configurationContext, int port) throws AxisFault {
16 | super(new HttpFactory(configurationContext, port));
17 | DSComponentExtension dsComponentExtension = new DSComponentExtension();
18 | dsComponentExtension.activate();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/sql/H2StoredProcs.sql:
--------------------------------------------------------------------------------
1 | CREATE ALIAS getCustomerInfo FOR "org.wso2.carbon.dataservices.core.test.sql.h2.H2TestUtils.getCustomerInfo";
2 |
3 | CREATE ALIAS getCustomerInfoWithId FOR "org.wso2.carbon.dataservices.core.test.sql.h2.H2TestUtils.getCustomerInfoWithId";
4 |
5 | CREATE ALIAS getCustomerInfoWithIdLastName FOR "org.wso2.carbon.dataservices.core.test.sql.h2.H2TestUtils.getCustomerInfoWithIdLastName";
6 |
7 | CREATE ALIAS getCustomerCreditLimitWithId FOR "org.wso2.carbon.dataservices.core.test.sql.h2.H2TestUtils.getCustomerCreditLimitWithId";
8 |
9 | CREATE ALIAS getPaymentInfo FOR "org.wso2.carbon.dataservices.core.test.sql.h2.H2TestUtils.getPaymentInfo";
10 |
11 | CREATE ALIAS updateCustomerInfo FOR "org.wso2.carbon.dataservices.core.test.sql.h2.H2TestUtils.updateCustomerInfo";
12 |
13 | CREATE ALIAS addCustomerInfo FOR "org.wso2.carbon.dataservices.core.test.sql.h2.H2TestUtils.addCustomerInfo";
14 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/internal/DSDummyService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.internal;
20 |
21 | public class DSDummyService {
22 | }
23 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/oracle/OracleBasicTest.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.core.test.sql.oracle;
2 |
3 | import org.wso2.carbon.dataservices.core.test.sql.AbstractBasicServiceTest;
4 |
5 | public class OracleBasicTest extends AbstractBasicServiceTest {
6 |
7 | public OracleBasicTest(String testName) {
8 | super(testName, "OracleBasicService");
9 | }
10 |
11 | public void testOracleBasicSelectWithFields() {
12 | this.basicSelectWithFields();
13 | }
14 |
15 | public void testOracleBasicSelectAll() {
16 | this.basicSelectAll();
17 | }
18 |
19 | public void testOracleBasicSelectCount() {
20 | this.basicSelectCount();
21 | }
22 |
23 | public void testOracleBasicSelectWithAttributesForDateTime() {
24 | this.basicSelectWithAttributesForDateTime();
25 | }
26 |
27 | public void testOracleBasicArrayInputTypes() {
28 | this.basicArrayInputTypes();
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/oracle/OracleUDTTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.test.sql.oracle;
20 |
21 | public class OracleUDTTest {
22 | }
23 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/oracle/OracleInputMappingServiceTest.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.core.test.sql.oracle;
2 |
3 | import org.wso2.carbon.dataservices.core.test.sql.AbstractInputMappingServiceTest;
4 |
5 | public class OracleInputMappingServiceTest extends AbstractInputMappingServiceTest {
6 |
7 | public OracleInputMappingServiceTest(String testName) {
8 | super(testName, "OracleInputMappingService");
9 | }
10 |
11 | public void testOracleInputMappings1ForDateTime() {
12 | this.inputMappings1ForDateTime();
13 | }
14 |
15 | public void testOracleInputMappings2ForDateTime() {
16 | this.inputMappings2ForDateTime();
17 | }
18 |
19 | public void testOracleInputMappingsCallQueryMergeForDateTime() {
20 | this.inputMappingsCallQueryMergeForDateTime();
21 | }
22 |
23 | public void testInputMappingsWithDefValueForDateTime() {
24 | this.inputMappingsWithDefValueForDateTime();
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/oracle/OracleTestSuite.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.core.test.sql.oracle;
2 |
3 | import junit.framework.Test;
4 | import junit.framework.TestCase;
5 | import junit.framework.TestSuite;
6 |
7 | public class OracleTestSuite extends TestCase {
8 |
9 | public static Test suite() {
10 | TestSuite suite = new TestSuite(
11 | "Test for org.wso2.carbon.dataservices.core.test.sql.oracle");
12 | suite.addTestSuite(OracleInitTest.class);
13 | suite.addTestSuite(OracleBasicTest.class);
14 | suite.addTestSuite(OracleDMLServiceTest.class);
15 | suite.addTestSuite(OracleInputMappingServiceTest.class);
16 | suite.addTestSuite(OracleNestedQueryTest.class);
17 | suite.addTestSuite(OracleAdvancedStoredProcServiceTest.class);
18 | suite.addTestSuite(OracleBinaryDataServiceTest.class);
19 | suite.addTestSuite(OracleStoredProcedureServiceTest.class);
20 | suite.addTestSuite(OracleFinalizeTest.class);
21 |
22 | return suite;
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/beans/DSDLConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.ui.beans;
17 |
18 | /**
19 | * DSDL - Data Service Descriptor Language Constants
20 | */
21 | public class DSDLConstants {
22 | //Generic
23 | public static String id = "id";
24 | //Query
25 | public static String query = "query";
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.task/src/main/java/org/wso2/carbon/dataservices/task/DataTask.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.task;
20 |
21 | /**
22 | * This interface represents a scheduled data task.
23 | */
24 | public interface DataTask {
25 |
26 | void execute(DataTaskContext ctx);
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # carbon-data
2 |
3 | ---
4 |
5 | | Branch | Build Status |
6 | | :------------ |:-------------
7 | | master | [](https://wso2.org/jenkins/job/platform-builds/job/carbon-data/) |
8 |
9 |
10 | ---
11 |
12 |
13 |
14 | Latest Released Version v4.3.5.
15 |
16 | #### carbon-data repo contains the following components.
17 |
18 | * data-services
19 | * data-sources
20 | * dbconsole
21 |
22 | carbon-data contains the source code of modules uses for Data Services Server. Some of these modules uses by other products of the platform too.
23 |
24 | Service Stubs, Components and Features of each module contains in this repo.
25 |
26 | ## How to Contribute
27 | * Please report issues at [DSS JIRA] (https://wso2.org/jira/browse/DS).
28 | * Send your bug fixes pull requests to [master branch] (https://github.com/wso2/carbon-data/tree/master)
29 |
30 | ## Contact us
31 | WSO2 Carbon developers can be contacted via the mailing lists:
32 |
33 | * Carbon Developers List : dev@wso2.org
34 | * Carbon Architecture List : architecture@wso2.org
35 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/oracle/OracleAdvancedStoredProcServiceTest.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.core.test.sql.oracle;
2 |
3 | import org.wso2.carbon.dataservices.core.test.sql.AbstractAdvancedStoredProcServiceTest;
4 |
5 | public class OracleAdvancedStoredProcServiceTest extends AbstractAdvancedStoredProcServiceTest {
6 |
7 | public OracleAdvancedStoredProcServiceTest(String testName) {
8 | super(testName, "OracleAdvancedStoredProcService");
9 | }
10 |
11 | public void testStoredProcWithOutParams() {
12 | this.storedProcWithOutParams();
13 | }
14 |
15 | public void testStoredProcWithOutParamsAndRS() {
16 | this.storedProcWithOutParamsAndRS();
17 | }
18 |
19 | public void testStoredProcWithInOutParamsAndRS() {
20 | this.storedProcWithInOutParamsAndRS();
21 | }
22 |
23 | public void testStoredProcWithRefCursors() {
24 | this.storedProcWithRefCursors();
25 | }
26 |
27 | public void testStoredProcWithRefCursorsVarrays() {
28 | this.storedProcWithRefCursorsVarrays();
29 | }
30 |
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/resources/META-INF/component.xml:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 |
21 |
22 | dataservices
23 | dbs
24 | org.wso2.carbon.dataservices.core.DBDeployer
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/dispatch/BatchRequestParticipant.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.dispatch;
20 |
21 | /**
22 | * This interface represents a participant in a batch request.
23 | */
24 | public interface BatchRequestParticipant {
25 |
26 | /** release resources after the batch request is done */
27 | public void releaseBatchRequestResources();
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/sqlparser/analysers/WhereAnalyzer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.sqlparser.analysers;
20 |
21 | import java.util.Queue;
22 |
23 | public class WhereAnalyzer extends KeyWordAnalyzer {
24 |
25 | public WhereAnalyzer(Queue tokens) {
26 | }
27 |
28 | @Override
29 | public void analyseStatement() {
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/components/data-sources/org.wso2.carbon.datasource.reader.hadoop/src/main/java/org/wso2/carbon/datasource/reader/hadoop/HadoopDataSourceConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 | package org.wso2.carbon.datasource.reader.hadoop;
19 |
20 | /***
21 | * Stores constants required by the datasource reader implementation
22 | */
23 |
24 | public class HadoopDataSourceConstants {
25 |
26 | public static final String DATASOURCE_TYPE_HDFS = "HDFS";
27 | public static final String DATASOURCE_TYPE_HBASE = "HBASE";
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/gadgets/util/dsutildata-ajaxprocessor.jsp:
--------------------------------------------------------------------------------
1 | <%
2 | /**
3 | Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
4 |
5 | WSO2 Inc. licenses this file to you under the Apache License,
6 | Version 2.0 (the "License"); you may not use this file except
7 | in compliance with the License.
8 | You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 | %>
20 | <%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
21 |
22 | <%
23 | String funcName = request.getParameter("funcName");
24 |
25 | if ("getBackendServerUrl".equals(funcName)) {
26 | String data = CarbonUIUtil.getServerURL(config.getServletContext(), session);
27 | String url = CarbonUIUtil.https2httpURL(data);
28 | out.print(url);
29 | }
30 |
31 |
32 | %>
33 |
34 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2004,2005 The Apache Software Foundation.
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # log4j configuration file used by unit tests
18 |
19 | log4j.rootCategory=DEBUG, CONSOLE
20 | #log4j.rootCategory=WARN, CONSOLE
21 |
22 | log4j.category.org.apache.axis2.transport.jms=TRACE
23 |
24 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
25 | log4j.appender.CONSOLE.threshold=INFO
26 | #log4j.appender.CONSOLE.threshold=TRACE
27 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
28 | log4j.appender.CONSOLE.layout.ConversionPattern=%5p [%t] %c{1} %m%n
29 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/validation/Validator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.validation;
20 |
21 | import org.wso2.carbon.dataservices.core.engine.ParamValue;
22 |
23 | /**
24 | * This interface represents a custom validator for data services fields.
25 | */
26 | public interface Validator {
27 |
28 | public void validate(ValidationContext context, String name,
29 | ParamValue value) throws ValidationException;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.sql.driver/src/main/java/org/wso2/carbon/dataservices/sql/driver/processor/reader/DataReader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.sql.driver.processor.reader;
20 |
21 | import java.sql.SQLException;
22 |
23 | /**
24 | * This interface represents a data retrieval mechanism for data sources.
25 | */
26 | public interface DataReader {
27 |
28 | void populateData() throws SQLException;
29 |
30 | DataTable getDataTable(String name) throws SQLException;
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/oracle/OracleStoredProcedureServiceTest.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.core.test.sql.oracle;
2 |
3 | import org.wso2.carbon.dataservices.core.test.sql.AbstractStoredProcedureServiceTest;
4 |
5 | public class OracleStoredProcedureServiceTest extends AbstractStoredProcedureServiceTest{
6 |
7 | public OracleStoredProcedureServiceTest(String testName) {
8 | super(testName, "OracleNestedQueryStoredProcService");
9 | }
10 |
11 | public void testOracleStoredProcNoParams() {
12 | this.storedProcNoParams();
13 | }
14 |
15 | public void testOracleStoredProcWithParams() {
16 | this.storedProcWithParams();
17 | }
18 |
19 | public void testStoredProcNested1ForDateTime() {
20 | this.storedProcNested1ForDateTime();
21 | }
22 |
23 | public void testStoredProcNested2ForDateTime() {
24 | this.storedProcNested2ForDateTime();
25 | }
26 |
27 | public void testStoredProcNested3ForDateTime() {
28 | this.storedProcNested3ForDateTime();
29 | }
30 |
31 | public void testOracleStoredFuncNoParams() {
32 | this.storedFuncNoParams();
33 | }
34 |
35 | public void testOracleStoredFuncWithParams() {
36 | this.storedFuncWithParams();
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/CSVFinalizeTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.csv;
17 |
18 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
19 | import org.wso2.carbon.dataservices.core.test.util.UtilServer;
20 |
21 | public class CSVFinalizeTest extends DataServiceBaseTestCase {
22 |
23 | public CSVFinalizeTest() {
24 | super("CSVFinalizeTest");
25 | }
26 |
27 | public void testExcelStartup() throws Exception {
28 | UtilServer.stop();
29 | endTenantFlow();
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/mysql/MySQLBinaryDataServiceTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.mysql;
17 |
18 | import org.wso2.carbon.dataservices.core.test.sql.AbstractBinaryDataServiceTest;
19 |
20 | public class MySQLBinaryDataServiceTest extends AbstractBinaryDataServiceTest {
21 |
22 | public MySQLBinaryDataServiceTest(String testName) {
23 | super(testName, "MySQLBinaryDataService");
24 | }
25 |
26 | public void testMySQLBinaryDataStoreRetrieve() {
27 | this.binaryDataStoreRetrieve();
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.sql.driver/src/main/java/org/wso2/carbon/dataservices/sql/driver/parser/ParserException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.sql.driver.parser;
20 |
21 | public class ParserException extends Exception {
22 |
23 | private static final long serialVersionUID = 2021891706072918521L;
24 |
25 | public ParserException(String message) {
26 | super(message);
27 | }
28 |
29 | public ParserException(String message, Exception nestedEx) {
30 | super(message, nestedEx);
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/CSVInitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.csv;
17 |
18 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
19 | import org.wso2.carbon.dataservices.core.test.util.UtilServer;
20 |
21 | public class CSVInitTest extends DataServiceBaseTestCase {
22 |
23 | public CSVInitTest() {
24 | super("CSVInitTest");
25 | }
26 |
27 | public void testExcelStartup() throws Exception {
28 | startTenantFlow();
29 | UtilServer.start(repository, axis2Conf);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/excel/ExcelFinalizeTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.excel;
17 |
18 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
19 | import org.wso2.carbon.dataservices.core.test.util.UtilServer;
20 |
21 | public class ExcelFinalizeTest extends DataServiceBaseTestCase {
22 |
23 | public ExcelFinalizeTest() {
24 | super("ExcelFinalizeTest");
25 | }
26 |
27 | public void testExcelStartup() throws Exception {
28 | UtilServer.stop();
29 | endTenantFlow();
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/excel/ExcelInitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.excel;
17 |
18 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
19 | import org.wso2.carbon.dataservices.core.test.util.UtilServer;
20 |
21 | public class ExcelInitTest extends DataServiceBaseTestCase {
22 |
23 | public ExcelInitTest() {
24 | super("ExcelInitTest");
25 | }
26 |
27 | public void testExcelStartup() throws Exception {
28 | startTenantFlow();
29 | UtilServer.start(repository, axis2Conf);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/mysql/MySQLFinalizeTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.mysql;
17 |
18 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
19 | import org.wso2.carbon.dataservices.core.test.util.UtilServer;
20 |
21 | public class MySQLFinalizeTest extends DataServiceBaseTestCase {
22 |
23 | public MySQLFinalizeTest() {
24 | super("MySQLFinalizeTest");
25 | }
26 |
27 | public void testMySQLStop() throws Exception {
28 | UtilServer.stop();
29 | endTenantFlow();
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/custom/datasource/DataRow.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.custom.datasource;
20 |
21 | /**
22 | * This interface represents a data row in a custom data source.
23 | */
24 | public interface DataRow {
25 |
26 | /**
27 | * This method returns the string value at a given column.
28 | * @param column The name of the column to read the value from
29 | * @return The string value of the cell
30 | */
31 | String getValueAt(String column);
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/h2/H2ResourceServiceTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.h2;
17 |
18 | import org.wso2.carbon.dataservices.core.test.sql.AbstractResourceServiceTest;
19 |
20 | public class H2ResourceServiceTest extends AbstractResourceServiceTest {
21 |
22 | public H2ResourceServiceTest(String testName) {
23 | super(testName, "H2BasicService");
24 | }
25 |
26 | public void testH2ResourceGET() {
27 | this.resourceGET();
28 | }
29 |
30 | public void testH2ResourcePOST() {
31 | this.resourcePOST();
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/mysql/MySQLInitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.mysql;
17 |
18 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
19 | import org.wso2.carbon.dataservices.core.test.util.UtilServer;
20 |
21 | public class MySQLInitTest extends DataServiceBaseTestCase {
22 |
23 | public MySQLInitTest() {
24 | super("MySQLInitTest");
25 | }
26 |
27 | public void testMySQLStartup() throws Exception {
28 | startTenantFlow();
29 | UtilServer.start(repository, axis2Conf);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/validation/ValidatorExt.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 | package org.wso2.carbon.dataservices.core.validation;
19 |
20 | import java.util.Map;
21 |
22 | /**
23 | * This interface represents a custom validator with property support for data services fields.
24 | */
25 | public interface ValidatorExt extends Validator {
26 |
27 | /**
28 | * Method used to set properties for the custom validator class.
29 | * @param props map of property name value pairs
30 | */
31 | public void init(Map props);
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/h2/H2NestedQueryTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.h2;
17 |
18 | import org.wso2.carbon.dataservices.core.test.sql.AbstractNestedQueryServiceTest;
19 |
20 | public class H2NestedQueryTest extends AbstractNestedQueryServiceTest {
21 |
22 | public H2NestedQueryTest(String testName) {
23 | super(testName, "H2NestedQueryStoredProcService");
24 | }
25 |
26 | public void testH2NestedQuery1() {
27 | this.nestedQuery1();
28 | }
29 |
30 | public void testH2NestedQuery2() {
31 | this.nestedQuery2();
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/mysql/MySQLResourceServiceTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.mysql;
17 |
18 | import org.wso2.carbon.dataservices.core.test.sql.AbstractResourceServiceTest;
19 |
20 | public class MySQLResourceServiceTest extends AbstractResourceServiceTest {
21 |
22 | public MySQLResourceServiceTest(String testName) {
23 | super(testName, "MySQLBasicService");
24 | }
25 |
26 | public void testMySQLResourceGET() {
27 | this.resourceGET();
28 | }
29 |
30 | public void testMySQLResourcePOST() {
31 | this.resourcePOST();
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/custom/datasource/CustomQueryDataSourceReader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.custom.datasource;
20 |
21 | /**
22 | * This class represents the data source reader implementation for
23 | * data services custom query data sources.
24 | */
25 | public class CustomQueryDataSourceReader extends AbstractCustomDataSourceReader {
26 |
27 | public static String DATA_SOURCE_TYPE = "DS_CUSTOM_QUERY";
28 |
29 | @Override
30 | public String getType() {
31 | return DATA_SOURCE_TYPE;
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/mysql/MySQLNestedQueryTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.mysql;
17 |
18 | import org.wso2.carbon.dataservices.core.test.sql.AbstractNestedQueryServiceTest;
19 |
20 | public class MySQLNestedQueryTest extends AbstractNestedQueryServiceTest {
21 |
22 | public MySQLNestedQueryTest(String testName) {
23 | super(testName, "MySQLNestedQueryStoredProcService");
24 | }
25 |
26 | // public void testMySQLNestedQuery1() {
27 | // this.nestedQuery1();
28 | // }
29 |
30 | public void testMySQLNestedQuery2() {
31 | this.nestedQuery2();
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/odata/ODataServiceFault.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package org.wso2.carbon.dataservices.core.odata;
20 |
21 | import org.wso2.carbon.dataservices.core.DataServiceFault;
22 |
23 | public class ODataServiceFault extends DataServiceFault {
24 | public ODataServiceFault(Exception nestedException, String dsFaultMessage) {
25 | super(nestedException, "OData Service Fault : " + dsFaultMessage);
26 | }
27 |
28 | public ODataServiceFault(String dsFaultMessage) {
29 | super("OData Service Fault : " + dsFaultMessage);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/custom/datasource/CustomTabularDataSourceReader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.custom.datasource;
20 |
21 | /**
22 | * This class represents the data source reader implementation for
23 | * data services custom tabular data sources.
24 | */
25 | public class CustomTabularDataSourceReader extends AbstractCustomDataSourceReader {
26 |
27 | public static String DATA_SOURCE_TYPE = "DS_CUSTOM_TABULAR";
28 |
29 | @Override
30 | public String getType() {
31 | return DATA_SOURCE_TYPE;
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/custom/datasource/DataColumn.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.custom.datasource;
20 |
21 | /**
22 | * This class represents a data column in a custom data source.
23 | */
24 | public class DataColumn {
25 |
26 | private String name;
27 |
28 | public DataColumn(String name) {
29 | this.name = name;
30 | }
31 |
32 | /**
33 | * This method will return the name of the data table column.
34 | * @return The name of the column
35 | */
36 | public String getName() {
37 | return name;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/components/ndata-services/org.wso2.carbon.ndataservices.core/src/main/java/org/wso2/carbon/ndataservices/core/DataservicesCallbackServlet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.ndataservices.core;
20 |
21 | import java.io.IOException;
22 | import java.io.PrintWriter;
23 | import javax.servlet.http.HttpServlet;
24 | import javax.servlet.http.HttpServletRequest;
25 | import javax.servlet.http.HttpServletResponse;
26 |
27 |
28 | public class DataservicesCallbackServlet extends HttpServlet {
29 |
30 | public void doGe(HttpServletRequest request, HttpServletResponse response)
31 | throws IOException {
32 |
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/dataServices.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/sqlparser/analysers/KeyWordAnalyzer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.sqlparser.analysers;
20 |
21 | import java.util.LinkedList;
22 | import java.util.Queue;
23 |
24 | public abstract class KeyWordAnalyzer {
25 |
26 | public Queue syntaxQueue;
27 |
28 | public KeyWordAnalyzer () {
29 | this.syntaxQueue = new LinkedList();
30 | }
31 |
32 | public Queue getSyntaxQueue() {
33 | return syntaxQueue;
34 | }
35 |
36 | public abstract void analyseStatement();
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_SERVER_STAT_DAY_FACT.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_SERVER_ID","BAM_DAY_ID","BAM_AVG_RES_TIME","BAM_MAX_RES_TIME","BAM_MIN_RES_TIME","BAM_REQ_COUNT","BAM_RES_COUNT","BAM_FAULT_COUNT"
2 | "1","1","2","0","0","0","0","0","0"
3 | "27","1","27","0","0","0","0","0","0"
4 | "28","1","28","0","0","0","0","0","0"
5 | "2","1","1","0","80","-1","292","292","0"
6 | "3","1","3","0","0","0","0","0","0"
7 | "4","1","4","0","0","0","0","0","0"
8 | "5","1","5","0","0","0","0","0","0"
9 | "6","1","6","0","0","0","0","0","0"
10 | "7","1","7","0","0","0","0","0","0"
11 | "8","1","8","0","0","0","0","0","0"
12 | "9","1","9","0","0","0","0","0","0"
13 | "10","1","10","0","0","0","0","0","0"
14 | "11","1","11","0","0","0","0","0","0"
15 | "12","1","12","0","0","0","0","0","0"
16 | "13","1","13","0","0","0","0","0","0"
17 | "14","1","14","0","0","0","0","0","0"
18 | "15","1","15","0","0","0","0","0","0"
19 | "16","1","16","0","0","0","0","0","0"
20 | "17","1","17","0","0","0","0","0","0"
21 | "18","1","18","0","0","0","0","0","0"
22 | "19","1","19","0","0","0","0","0","0"
23 | "20","1","20","0","0","0","0","0","0"
24 | "21","1","21","0","0","0","0","0","0"
25 | "22","1","22","0","0","0","0","0","0"
26 | "23","1","23","0","0","0","0","0","0"
27 | "24","1","24","0","0","0","0","0","0"
28 | "25","1","25","0","0","0","0","0","0"
29 | "26","1","26","0","0","0","0","0","0"
30 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.odata/src/main/java/org/wso2/carbon/dataservices/odata/ODataServlet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.wso2.carbon.dataservices.odata;
18 |
19 | import org.wso2.carbon.dataservices.core.odata.ODataServiceFault;
20 | import org.wso2.carbon.dataservices.odata.endpoint.ODataEndpoint;
21 |
22 | import javax.servlet.http.HttpServlet;
23 | import javax.servlet.http.HttpServletRequest;
24 | import javax.servlet.http.HttpServletResponse;
25 |
26 | public class ODataServlet extends HttpServlet {
27 | private static final long serialVersionUID = 1L;
28 |
29 | @Override
30 | public void service(HttpServletRequest req, HttpServletResponse resp) {
31 | ODataEndpoint.process(req, resp);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/components/ndata-services/org.wso2.carbon.ndataservices.expression/src/main/java/org/wso2/carbon/dataservices/expression/ExpressionData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.expression;
20 |
21 | /**
22 | * Interface class which should be implemented in data model in order for expression to be able to get values from that data model
23 | */
24 | public interface ExpressionData {
25 |
26 | /**
27 | * method to get variable value. This method should be implemented in the object model
28 | *
29 | * @param varName will be the variable name it will be like var1.var2
30 | * @return variable value
31 | */
32 | Object getVariable(String varName);
33 | }
34 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/oracle/OracleDMLServiceTest.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.core.test.sql.oracle;
2 |
3 | import org.wso2.carbon.dataservices.core.test.sql.AbstractDMLServiceTest;
4 |
5 | public class OracleDMLServiceTest extends AbstractDMLServiceTest {
6 |
7 | public OracleDMLServiceTest(String testName) {
8 | super(testName, "OracleDMLService");
9 | }
10 |
11 | public void testOracleDMLOperations() {
12 | this.doDMLOperations();
13 | }
14 |
15 | public void testOracleDMLOperationsWithNoResultNestedQuery() {
16 | this.doDMLOperationsWithNoResultNestedQuery();
17 | }
18 |
19 | public void testOracleDMLOperationsWithNoResultStoredProcNestedQuery() {
20 | this.doDMLOperationsWithNoResultStoredProcNestedQuery();
21 | }
22 |
23 | public void testOracleDMLOperationsVal1() {
24 | this.doDMLOperationsVal1();
25 | }
26 |
27 | public void testOracleDMLOperationsVal2() {
28 | this.doDMLOperationsVal2();
29 | }
30 |
31 | public void testOracleDMLOperationsVal3() {
32 | this.doDMLOperationsVal3();
33 | }
34 |
35 | public void testOracleDMLOperationsVal4() {
36 | this.doDMLOperationsVal4();
37 | }
38 |
39 | public void testOracleDMLOperationsVal5() {
40 | this.doDMLOperationsVal5();
41 | }
42 |
43 | public void testOracleDMLOperationsVal6() {
44 | this.doDMLOperationsVal6();
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/generic/GenericTestSuite.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.generic;
17 |
18 | import junit.framework.Test;
19 | import junit.framework.TestCase;
20 | import junit.framework.TestSuite;
21 |
22 | public class GenericTestSuite extends TestCase {
23 |
24 | public static Test suite() {
25 | TestSuite suite = new TestSuite(
26 | "Test for org.wso2.carbon.dataservices.core.core.test.generic");
27 | //$JUnit-BEGIN$
28 | //suite.addTestSuite(GenericInitTest.class);
29 | //suite.addTestSuite(GenericExceptionTest.class);
30 | //suite.addTestSuite(GenericFinalizeTest.class);
31 | //$JUnit-END$
32 | return suite;
33 | }
34 |
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.sql.driver/src/main/java/org/wso2/carbon/dataservices/sql/driver/parser/EntityList.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.sql.driver.parser;
20 |
21 | import java.util.ArrayList;
22 |
23 | public class EntityList extends ArrayList {
24 |
25 | private static final long serialVersionUID = 5438856280684424524L;
26 |
27 | @Override
28 | public boolean contains(Object o) {
29 | String tmp = (String)o;
30 | for (String s : this) {
31 | if (tmp != null && tmp.equalsIgnoreCase(s)) {
32 | return true;
33 | }
34 | }
35 | return false;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/custom/datasource/CustomQueryBasedDS.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.custom.datasource;
20 |
21 | import java.util.List;
22 |
23 | import org.wso2.carbon.dataservices.core.DataServiceFault;
24 | import org.wso2.carbon.dataservices.core.engine.InternalParam;
25 |
26 | /**
27 | * This interface represents a custom query data based custom data source
28 | * implementation in data services.
29 | */
30 | public interface CustomQueryBasedDS extends CustomDataSourceBase {
31 |
32 | QueryResult executeQuery(String query, List params) throws DataServiceFault;
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/CSVTestSuite.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 | package org.wso2.carbon.dataservices.core.test.csv;
19 |
20 | import junit.framework.Test;
21 | import junit.framework.TestCase;
22 | import junit.framework.TestSuite;
23 |
24 | public class CSVTestSuite extends TestCase {
25 |
26 | public static Test suite() {
27 | TestSuite suite = new TestSuite(
28 | "Test for org.wso2.carbon.dataservices.core.core.test.csv");
29 | //$JUnit-BEGIN$
30 | suite.addTestSuite(CSVInitTest.class);
31 | suite.addTestSuite(CSVServiceTest.class);
32 | suite.addTestSuite(CSVFinalizeTest.class);
33 | //$JUnit-END$
34 | return suite;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/excel/ExcelTestSuite.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 | package org.wso2.carbon.dataservices.core.test.excel;
19 |
20 | import junit.framework.Test;
21 | import junit.framework.TestCase;
22 | import junit.framework.TestSuite;
23 |
24 | public class ExcelTestSuite extends TestCase {
25 |
26 | public static Test suite() {
27 | TestSuite suite = new TestSuite(
28 | "Test for org.wso2.carbon.dataservices.core.core.test.excel");
29 | //$JUnit-BEGIN$
30 | suite.addTestSuite(ExcelInitTest.class);
31 | suite.addTestSuite(ExcelServiceTest.class);
32 | suite.addTestSuite(ExcelFinalizeTest.class);
33 | //$JUnit-END$
34 | return suite;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/xsd/order_count.xsd:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/h2/H2InputMappingServiceTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.h2;
17 |
18 | import org.wso2.carbon.dataservices.core.test.sql.AbstractInputMappingServiceTest;
19 |
20 | public class H2InputMappingServiceTest extends AbstractInputMappingServiceTest {
21 |
22 | public H2InputMappingServiceTest(String testName) {
23 | super(testName, "H2InputMappingService");
24 | }
25 |
26 | public void testH2InputMappings1() {
27 | this.inputMappings1();
28 | }
29 |
30 | public void testH2InputMappings2() {
31 | this.inputMappings2();
32 | }
33 |
34 | public void testH2InputMappingsWithDefValue() {
35 | this.inputMappingsWithDefValue();
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/tools/ToolsTestSuite.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.tools;
17 |
18 | import org.wso2.carbon.dataservices.core.test.tools.ToolsTest;
19 |
20 | import junit.framework.Test;
21 | import junit.framework.TestCase;
22 | import junit.framework.TestSuite;
23 |
24 | public class ToolsTestSuite extends TestCase {
25 |
26 | public static Test suite() {
27 | TestSuite suite = new TestSuite(
28 | "Test for org.wso2.carbon.dataservices.core.core.test.generic");
29 | //$JUnit-BEGIN$
30 | suite.addTestSuite(ToolsInitTest.class);
31 | suite.addTestSuite(ToolsTest.class);
32 | suite.addTestSuite(ToolsFinalizeTest.class);
33 | //$JUnit-END$
34 | return suite;
35 | }
36 |
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.sql.driver/src/main/java/org/wso2/carbon/dataservices/sql/driver/util/WorkBookOutputWriter.java:
--------------------------------------------------------------------------------
1 | package org.wso2.carbon.dataservices.sql.driver.util;
2 |
3 | import org.apache.commons.logging.Log;
4 | import org.apache.commons.logging.LogFactory;
5 | import org.apache.poi.ss.usermodel.Workbook;
6 |
7 | import java.io.IOException;
8 | import java.io.OutputStream;
9 |
10 | /**
11 | * This is the helper class when we need to write workbook data to registry, Registry needs input stream with the
12 | * data, so this class will write to a output stream which will be read by registry at the end.
13 | */
14 | public class WorkBookOutputWriter extends Thread {
15 | private static final Log log = LogFactory.getLog(WorkBookOutputWriter.class);
16 | private Workbook workbook;
17 | private OutputStream outputStream;
18 | public WorkBookOutputWriter(Workbook workbook, OutputStream outputStream) {
19 | this.workbook = workbook;
20 | this.outputStream = outputStream;
21 | }
22 | @Override
23 | public void run() {
24 | try {
25 | workbook.write(outputStream);
26 | } catch (IOException e) {
27 | log.error("Error saving excel data to registry, Error - " + e.getMessage(), e);
28 | } finally {
29 | try {
30 | outputStream.close();
31 | } catch (IOException e) {
32 | //ignore
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.sql.driver/src/main/java/org/wso2/carbon/dataservices/sql/driver/query/select/ExcelSelectQuery.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.sql.driver.query.select;
20 |
21 | import java.sql.ResultSet;
22 | import java.sql.SQLException;
23 | import java.sql.Statement;
24 |
25 | public class ExcelSelectQuery extends SelectQuery {
26 |
27 | public ExcelSelectQuery(Statement stmt) throws SQLException {
28 | super(stmt);
29 | }
30 |
31 | @Override
32 | public ResultSet executeQuery() throws SQLException {
33 | return executeSQL();
34 | }
35 |
36 | @Override
37 | public boolean execute() throws SQLException {
38 | return (executeSQL() != null);
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.sql.driver/src/main/java/org/wso2/carbon/dataservices/sql/driver/query/select/GSpreadSelectQuery.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.sql.driver.query.select;
20 |
21 | import java.sql.ResultSet;
22 | import java.sql.SQLException;
23 | import java.sql.Statement;
24 |
25 | public class GSpreadSelectQuery extends SelectQuery {
26 |
27 | public GSpreadSelectQuery(Statement stmt) throws SQLException {
28 | super(stmt);
29 | }
30 |
31 | @Override
32 | public ResultSet executeQuery() throws SQLException {
33 | return executeSQL();
34 | }
35 |
36 | @Override
37 | public boolean execute() throws SQLException {
38 | return (executeSQL() != null);
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/odata/NavigationKeys.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package org.wso2.carbon.dataservices.core.odata;
20 |
21 | /**
22 | * This class stores the primary key in the exported table and stores the related foreign key in the imported table.
23 | */
24 | public class NavigationKeys {
25 |
26 | private String primaryKey;
27 |
28 | private String foreignKey;
29 |
30 | public NavigationKeys(String primaryKey, String foreignKey) {
31 | this.primaryKey = primaryKey;
32 | this.foreignKey = foreignKey;
33 | }
34 |
35 | public String getPrimaryKey() {
36 | return primaryKey;
37 | }
38 |
39 | public String getForeignKey() {
40 | return foreignKey;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/tools/ToolsFinalizeTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.tools;
17 |
18 | import java.sql.Connection;
19 | import java.sql.DriverManager;
20 | import java.sql.Statement;
21 |
22 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
23 |
24 | public class ToolsFinalizeTest extends DataServiceBaseTestCase {
25 |
26 | public ToolsFinalizeTest() {
27 | super("ToolsFinalizeTest");
28 | }
29 |
30 | public void testGenericStop() throws Exception {
31 | Connection conn = DriverManager.getConnection("jdbc:h2:mem:ds-test-db");
32 | Statement stmt = conn.createStatement();
33 | stmt.executeUpdate("DROP ALL OBJECTS");
34 | stmt.close();
35 | conn.close();
36 | endTenantFlow();
37 | }
38 |
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/features/categories/pom.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 | org.wso2.carbon.data
21 | carbon-data
22 | 4.5.1538-SNAPSHOT
23 | ../../pom.xml
24 |
25 |
26 | 4.0.0
27 | feature-categories
28 | pom
29 | WSO2 DSS - Nested Feature Categories
30 | http://wso2.org
31 |
32 |
33 |
34 | dataservice-hosting
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/mysql/MySQLAdvancedStoredProcServiceTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.mysql;
17 |
18 | import org.wso2.carbon.dataservices.core.test.sql.AbstractAdvancedStoredProcServiceTest;
19 |
20 | public class MySQLAdvancedStoredProcServiceTest extends AbstractAdvancedStoredProcServiceTest {
21 |
22 | public MySQLAdvancedStoredProcServiceTest(String testName) {
23 | super(testName, "MySQLAdvancedStoredProcService");
24 | }
25 |
26 | public void testStoredProcWithOutParams() {
27 | this.storedProcWithOutParams();
28 | }
29 |
30 | public void testStoredProcWithOutParamsAndRS() {
31 | this.storedProcWithOutParamsAndRS();
32 | }
33 |
34 | public void testStoredProcWithInOutParamsAndRS() {
35 | this.storedProcWithInOutParamsAndRS();
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.task.ui/src/main/resources/META-INF/component.xml:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/beans/WebQuery.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.ui.beans;
17 |
18 | import org.apache.axiom.om.OMElement;
19 | import org.apache.axis2.description.AxisService;
20 | import org.wso2.carbon.dataservices.common.DBConstants;
21 |
22 | public class WebQuery extends NonSQLQuery {
23 | private String webConfig;
24 |
25 | public String getWebConfig() {
26 | return webConfig;
27 | }
28 |
29 | public void setWebConfig(String webConfig) {
30 | this.webConfig = webConfig;
31 | }
32 |
33 | public WebQuery(AxisService axisService){
34 | Object value = axisService.getParameterValue(DBConstants.WebDatasource.WEB_CONFIG);
35 | if( value != null){
36 | this.webConfig = (String)value;
37 | }
38 | }
39 |
40 | @Override
41 | public OMElement buildXML() {
42 | return null;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/auth/DynamicUserAuthenticator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.auth;
20 |
21 | import org.wso2.carbon.dataservices.core.DataServiceFault;
22 |
23 | /**
24 | * This interface represents the functionality that should be implemented to provide
25 | * custom dynamic user authentication logic.
26 | */
27 | public interface DynamicUserAuthenticator {
28 |
29 | /**
30 | * This method is used to lookup a username/password pair given a source username.
31 | * @param user The source username
32 | * @return A two element String array containing the username and password respectively
33 | * @throws DataServiceFault
34 | */
35 | String[] lookupCredentials(String user) throws DataServiceFault;
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/UIutils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.ui;
20 | public class UIutils {
21 | /**
22 | * pagination
23 | * */
24 | public static String[] getChildren(int start, int pageLength, String[] childPaths) {
25 | int availableLength = 0;
26 | if (childPaths != null && childPaths.length > 0) {
27 | availableLength = childPaths.length - start;
28 | }
29 | if (availableLength < pageLength) {
30 | pageLength = availableLength;
31 | }
32 |
33 | String[] resultChildPaths = new String[pageLength];
34 | System.arraycopy(childPaths, start, resultChildPaths, 0, pageLength);
35 | return resultChildPaths;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/DataServiceUser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core;
20 |
21 | import java.util.Set;
22 |
23 | /**
24 | * Represents a data services user who is sending requests.
25 | */
26 | public class DataServiceUser {
27 |
28 | /**
29 | * Username of the data services user.
30 | */
31 | private String username;
32 |
33 | /**
34 | * User roles assigned to this user.
35 | */
36 | private Set userRoles;
37 |
38 | public DataServiceUser(String username, Set userRoles) {
39 | this.username = username;
40 | this.userRoles = userRoles;
41 | }
42 |
43 | public String getUsername() {
44 | return username;
45 | }
46 |
47 | public Set getUserRoles() {
48 | return userRoles;
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/custom/datasource/CustomDataSourceBase.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.custom.datasource;
20 |
21 | import java.util.Map;
22 |
23 | import org.wso2.carbon.dataservices.core.DataServiceFault;
24 |
25 | /**
26 | * This interface represents the common functionality for a custom data source
27 | * implementation in data services.
28 | */
29 | public interface CustomDataSourceBase {
30 |
31 | /**
32 | * Initialized the custom data source.
33 | * @param props The properties used for initialization
34 | * @throws DataServiceFault Thrown if any error occurs
35 | */
36 | void init(Map props) throws DataServiceFault;
37 |
38 | /**
39 | * Closes the data source.
40 | */
41 | void close();
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/engine/ExternalParam.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.engine;
20 |
21 | /**
22 | * Represents a parameter passed into call queries.
23 | */
24 | public class ExternalParam {
25 |
26 | private String name;
27 |
28 | /** value can be scalar, array */
29 | private ParamValue value;
30 |
31 | /** i.e. column, query-param */
32 | private String type;
33 |
34 | public ExternalParam(String name, ParamValue value, String type) {
35 | this.name = name;
36 | this.value = value;
37 | this.type = type;
38 | }
39 |
40 | public String getName() {
41 | return name;
42 | }
43 |
44 | public String getType() {
45 | return type;
46 | }
47 |
48 | public ParamValue getValue() {
49 | return value;
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/h2/H2BasicTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.h2;
17 |
18 | import org.wso2.carbon.dataservices.core.test.sql.AbstractBasicServiceTest;
19 |
20 | public class H2BasicTest extends AbstractBasicServiceTest {
21 |
22 | public H2BasicTest(String testName) {
23 | super(testName, "H2BasicService");
24 | }
25 |
26 | public void testH2BasicSelectWithFields() {
27 | this.basicSelectWithFields();
28 | }
29 |
30 | public void testH2BasicSelectAll() {
31 | this.basicSelectAll();
32 | }
33 |
34 | public void testH2BasicSelectCount() {
35 | this.basicSelectCount();
36 | }
37 |
38 | public void testH2BasicSelectWithAttributes() {
39 | this.basicSelectWithAttributes();
40 | }
41 |
42 | public void testH2BasicArrayInputTypes() {
43 | this.basicArrayInputTypes();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/components/ndata-services/org.wso2.carbon.ndataservices.core/src/main/resources/META-INF/component.xml:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 |
21 |
22 | DataservicesCallbackServlet
23 | /data_services_callback
24 | Data Services Callback Servlet
25 | org.wso2.carbon.ndataservices.core.DataservicesCallbackServlet
26 |
27 |
28 |
29 |
30 |
31 | /data_services_callback
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.sql.driver/src/main/java/org/wso2/carbon/dataservices/sql/driver/query/select/CustomSelectQuery.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.sql.driver.query.select;
20 |
21 | import java.sql.ResultSet;
22 | import java.sql.SQLException;
23 | import java.sql.Statement;
24 |
25 | /**
26 | * This class represents a select query for custom data sources.
27 | */
28 | public class CustomSelectQuery extends SelectQuery {
29 |
30 | public CustomSelectQuery(Statement stmt) throws SQLException {
31 | super(stmt);
32 | }
33 |
34 | @Override
35 | public ResultSet executeQuery() throws SQLException {
36 | return executeSQL();
37 | }
38 |
39 | @Override
40 | public boolean execute() throws SQLException {
41 | return (executeSQL() != null);
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/h2/H2FinalizeTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.h2;
17 |
18 | import java.sql.Connection;
19 | import java.sql.DriverManager;
20 | import java.sql.Statement;
21 |
22 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
23 | import org.wso2.carbon.dataservices.core.test.util.UtilServer;
24 |
25 | public class H2FinalizeTest extends DataServiceBaseTestCase {
26 |
27 | public H2FinalizeTest() {
28 | super("H2FinalizeTest");
29 | }
30 |
31 | public void testH2Stop() throws Exception {
32 | UtilServer.stop();
33 | Connection conn = DriverManager.getConnection("jdbc:h2:mem:ds-test-db");
34 | Statement stmt = conn.createStatement();
35 | stmt.executeUpdate("DROP ALL OBJECTS");
36 | stmt.close();
37 | conn.close();
38 | endTenantFlow();
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/features/dbconsole/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 | org.wso2.carbon.data
22 | carbon-data
23 | 4.5.1538-SNAPSHOT
24 | ../../pom.xml
25 |
26 |
27 | 4.0.0
28 | dbconsole-feature
29 | pom
30 | WSO2 Carbon - Database Console Feature Aggregator Module
31 | http://wso2.org
32 |
33 |
34 | org.wso2.carbon.dbconsole.ui.feature
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.task/src/main/resources/META-INF/services.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
22 | https
23 |
24 |
25 | This service will help to create/edit a data service tasks.
26 |
27 | org.wso2.carbon.dataservices.task.DSTaskAdmin
28 |
29 |
30 | /permission/admin/manage/add/service
31 | true
32 | true
33 |
34 |
35 |
--------------------------------------------------------------------------------
/features/ndata-services/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 | org.wso2.carbon.data
22 | carbon-data
23 | 4.4.0-SNAPSHOT
24 | ../../pom.xml
25 |
26 |
27 | 4.0.0
28 | ndataservices-feature
29 | pom
30 | WSO2 Carbon - Ndataservices Core Feature Aggregator Module
31 | http://wso2.org
32 |
33 |
34 | org.wso2.carbon.ndataservices.server.feature
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/validation/ValidationContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.validation;
20 |
21 | import java.util.Map;
22 | import java.util.Set;
23 |
24 | import org.wso2.carbon.dataservices.core.engine.ParamValue;
25 |
26 | /**
27 | * This class contains information on the current context of validation,
28 | * i.e. the surrounding field names and values.
29 | */
30 | public class ValidationContext {
31 |
32 | private Map fields;
33 |
34 | public ValidationContext(Map fields) {
35 | this.fields = fields;
36 | }
37 |
38 | public Set getFieldNames() {
39 | return this.fields.keySet();
40 | }
41 |
42 | public ParamValue getFieldValue(String name) {
43 | return this.fields.get(name);
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/mysql/MySQLInputMappingServiceTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.mysql;
17 |
18 | import org.wso2.carbon.dataservices.core.test.sql.AbstractInputMappingServiceTest;
19 |
20 | public class MySQLInputMappingServiceTest extends AbstractInputMappingServiceTest {
21 |
22 | public MySQLInputMappingServiceTest(String testName) {
23 | super(testName, "MySQLInputMappingService");
24 | }
25 |
26 | public void testMySQLInputMappings1() {
27 | this.inputMappings1();
28 | }
29 |
30 | public void testMySQLInputMappings2() {
31 | this.inputMappings2();
32 | }
33 |
34 | public void testMySQLInputMappingsCallQueryMerge() {
35 | this.inputMappingsCallQueryMerge();
36 | }
37 |
38 | public void testInputMappingsWithDefValue() {
39 | this.inputMappingsWithDefValue();
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/tools/ToolsInitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.tools;
17 |
18 | import java.sql.Connection;
19 | import java.sql.DriverManager;
20 | import java.sql.Statement;
21 |
22 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
23 |
24 | public class ToolsInitTest extends DataServiceBaseTestCase {
25 |
26 | public ToolsInitTest() {
27 | super("ToolsInitTest");
28 | }
29 |
30 | public void testGenericStartup() throws Exception {
31 | startTenantFlow();
32 | Class.forName("org.h2.Driver");
33 | Connection conn = DriverManager.getConnection("jdbc:h2:mem:ds-test-db;DB_CLOSE_DELAY=-1");
34 | Statement stmt = conn.createStatement();
35 | stmt.executeUpdate("RUNSCRIPT FROM './src/test/resources/sql/CreateH2TestDB.sql'");
36 | stmt.close();
37 | conn.close();
38 | }
39 |
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/components/dbconsole/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 | org.wso2.carbon.data
22 | carbon-data
23 | ../../pom.xml
24 | 4.5.1538-SNAPSHOT
25 |
26 |
27 | 4.0.0
28 | dbconsole
29 | pom
30 | WSO2 Carbon - DB Console Module
31 | http://wso2.org
32 | WSO2 Database Console Bundle
33 |
34 |
35 | org.wso2.carbon.dbconsole.ui
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/mysql/MySQLBasicTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.mysql;
17 |
18 | import org.wso2.carbon.dataservices.core.test.sql.AbstractBasicServiceTest;
19 |
20 | public class MySQLBasicTest extends AbstractBasicServiceTest {
21 |
22 | public MySQLBasicTest(String testName) {
23 | super(testName, "MySQLBasicService");
24 | }
25 |
26 | public void testMySQLBasicSelectWithFields() {
27 | this.basicSelectWithFields();
28 | }
29 |
30 | public void testMySQLBasicSelectAll() {
31 | this.basicSelectAll();
32 | }
33 |
34 | public void testMySQLBasicSelectCount() {
35 | this.basicSelectCount();
36 | }
37 |
38 | public void testMySQLBasicSelectWithAttributes() {
39 | this.basicSelectWithAttributes();
40 | }
41 |
42 | public void testMySQLBasicArrayInputTypes() {
43 | this.basicArrayInputTypes();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/xsd/product_lines.xsd:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/generic/GenericFinalizeTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.generic;
17 |
18 | import java.sql.Connection;
19 | import java.sql.DriverManager;
20 | import java.sql.Statement;
21 |
22 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
23 | import org.wso2.carbon.dataservices.core.test.util.UtilServer;
24 |
25 | public class GenericFinalizeTest extends DataServiceBaseTestCase {
26 |
27 | public GenericFinalizeTest() {
28 | super("GenericFinalizeTest");
29 | }
30 |
31 | public void testGenericStop() throws Exception {
32 | UtilServer.stop();
33 | Connection conn = DriverManager.getConnection("jdbc:h2:mem:ds-test-db");
34 | Statement stmt = conn.createStatement();
35 | stmt.executeUpdate("DROP ALL OBJECTS");
36 | stmt.close();
37 | conn.close();
38 | endTenantFlow();
39 | }
40 |
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/features/data-services/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 | org.wso2.carbon.data
22 | carbon-data
23 | 4.5.1538-SNAPSHOT
24 | ../../pom.xml
25 |
26 |
27 | 4.0.0
28 | data-services-features
29 | pom
30 | WSO2 Carbon - Data Services Feature Aggregator Module
31 | http://wso2.org
32 |
33 |
34 | data-services-hosting
35 | data-services-tasks
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/engine/DataEntry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.engine;
20 |
21 | import java.util.HashMap;
22 | import java.util.Map;
23 | import java.util.Set;
24 |
25 | /**
26 | * Represents one row of data.
27 | */
28 | public class DataEntry {
29 |
30 | private Map values;
31 |
32 | public DataEntry() {
33 | this.values = new HashMap();
34 | }
35 |
36 | public Map getData() {
37 | return values;
38 | }
39 |
40 | public void addValue(String name, ParamValue value) {
41 | this.getData().put(name, value);
42 | }
43 |
44 | public ParamValue getValue(String name) {
45 | return this.getData().get(name);
46 | }
47 |
48 | public Set getNames() {
49 | return this.getData().keySet();
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/odata/ODataEntry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 | package org.wso2.carbon.dataservices.core.odata;
19 |
20 | import java.util.HashMap;
21 | import java.util.Map;
22 | import java.util.Set;
23 |
24 | /**
25 | * Represents one row of data.
26 | */
27 | public class ODataEntry {
28 |
29 | private Map values;
30 |
31 | public ODataEntry() {
32 | this.values = new HashMap<>();
33 | }
34 |
35 | public Map getData() {
36 | return values;
37 | }
38 |
39 | public void addValue(String name, String value) {
40 | this.getData().put(name, value);
41 | }
42 |
43 | public String getValue(String name) {
44 | return this.getData().get(name);
45 | }
46 |
47 | public Set getNames() {
48 | return this.getData().keySet();
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/features/cassandra-jdbc-1.2.5/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 | org.wso2.carbon.data
22 | carbon-data
23 | 4.5.1538-SNAPSHOT
24 | ../../pom.xml
25 |
26 |
27 | 4.0.0
28 | cassandra-jdbc-1.2.5-feature
29 | pom
30 | WSO2 Carbon - Cassandra-JDBC-1.2.5 Feature Aggregator Module
31 | http://wso2.org
32 |
33 |
34 | org.wso2.carbon.cassandra-jdbc-1.2.5.server.feature
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/validation/standard/PatternValidator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.validation.standard;
20 |
21 | import java.util.regex.Pattern;
22 |
23 | /**
24 | * Represents a validator which checks if the parameters satisfy the given regular expression.
25 | */
26 | public class PatternValidator extends GenericValidator {
27 |
28 | private Pattern pattern;
29 |
30 | public PatternValidator(String regEx) {
31 | super("Pattern {" + regEx + "} is expected");
32 | this.pattern = Pattern.compile(regEx);
33 | }
34 |
35 | public Pattern getPattern() {
36 | return pattern;
37 | }
38 |
39 | protected boolean validateScalar(String value) {
40 | try {
41 | return this.getPattern().matcher(value).matches();
42 | } catch (Exception e) {
43 | return false;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/components/data-sources/org.wso2.carbon.datasource.reader.hadoop/src/main/java/org/wso2/carbon/datasource/reader/hadoop/HadoopDataSourceConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 | package org.wso2.carbon.datasource.reader.hadoop;
19 |
20 | import javax.xml.bind.annotation.XmlElement;
21 | import javax.xml.bind.annotation.XmlRootElement;
22 |
23 | /***
24 | * Represents a single datasource configuration specification, which contains an array of configuration properties.
25 | */
26 |
27 | @XmlRootElement(name = "configuration")
28 | public class HadoopDataSourceConfiguration {
29 |
30 | private HadoopConfigProperty[] configProperties;
31 |
32 | @XmlElement(name = "property")
33 | public HadoopConfigProperty[] getConfigProperties() {
34 | return configProperties;
35 | }
36 |
37 |
38 | public void setConfigProperties(HadoopConfigProperty[] configProperties) {
39 | this.configProperties = configProperties;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/components/ndata-services/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 | org.wso2.carbon.data
22 | carbon-data
23 | ../../pom.xml
24 | 4.4.0-SNAPSHOT
25 |
26 |
27 | 4.0.0
28 | ndata-services
29 | pom
30 | WSO2 Carbon - NData Services Parent Module
31 | http://wso2.org
32 |
33 |
34 | org.wso2.carbon.ndataservices.expression
35 | org.wso2.carbon.ndataservices.core
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/h2/H2TestSuite.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.h2;
17 |
18 | import junit.framework.Test;
19 | import junit.framework.TestCase;
20 | import junit.framework.TestSuite;
21 |
22 | public class H2TestSuite extends TestCase {
23 |
24 | public static Test suite() {
25 | TestSuite suite = new TestSuite(
26 | "Test for org.wso2.carbon.dataservices.core.test.sql.h2");
27 | //$JUnit-BEGIN$
28 | suite.addTestSuite(H2InitTest.class);
29 | suite.addTestSuite(H2BasicTest.class);
30 | suite.addTestSuite(H2DMLServiceTest.class);
31 | suite.addTestSuite(H2InputMappingServiceTest.class);
32 | suite.addTestSuite(H2NestedQueryTest.class);
33 | suite.addTestSuite(H2StoredProcedureServiceTest.class);
34 | //suite.addTestSuite(H2ResourceServiceTest.class);
35 | suite.addTestSuite(H2FinalizeTest.class);
36 | //$JUnit-END$
37 | return suite;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/xsd/products.xsd:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.sql.driver/src/main/java/org/wso2/carbon/dataservices/sql/driver/processor/writer/DataWriterFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.sql.driver.processor.writer;
20 |
21 | import org.wso2.carbon.dataservices.sql.driver.parser.ParserException;
22 | import org.wso2.carbon.dataservices.sql.driver.parser.Constants;
23 | import org.wso2.carbon.dataservices.sql.driver.processor.reader.DataTable;
24 |
25 | import java.util.Map;
26 |
27 | public class DataWriterFactory {
28 |
29 | public static DataWriter createDataWriter(String type,
30 | Map data) throws ParserException {
31 | if (Constants.EXCEL.equals(type)) {
32 | return new ExcelDataWriter(null, data);
33 | } else {
34 | throw new ParserException("Unsupported data type");
35 | }
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/util/OddLengthValidator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 | package org.wso2.carbon.dataservices.core.test.util;
19 |
20 | import org.wso2.carbon.dataservices.core.engine.ParamValue;
21 | import org.wso2.carbon.dataservices.core.validation.ValidationContext;
22 | import org.wso2.carbon.dataservices.core.validation.ValidationException;
23 | import org.wso2.carbon.dataservices.core.validation.Validator;
24 |
25 | /**
26 | * Custom validator for checking if a given string length is odd.
27 | */
28 | public class OddLengthValidator implements Validator {
29 |
30 | public OddLengthValidator() { }
31 |
32 | public void validate(ValidationContext context, String name,
33 | ParamValue value) throws ValidationException {
34 | if (value.getScalarValue().length() % 2 == 0) {
35 | throw new ValidationException("The string length is not odd", name, value);
36 | }
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/xsd/payments.xsd:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.odata/src/main/webapp/META-INF/webapp-classloading.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
22 |
23 |
24 |
25 | false
26 |
27 |
32 | Carbon
33 |
34 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/engine/SQLDialect.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.engine;
20 |
21 | import java.util.Set;
22 |
23 | /**
24 | * Represents SQL Dialects SQL Query mapping
25 | */
26 | public class SQLDialect {
27 |
28 | Set sqlDialects;
29 | String sqlQuery;
30 |
31 | public SQLDialect() {
32 |
33 | }
34 |
35 | public SQLDialect(Set sqlDialects, String sqlQuery) {
36 | super();
37 | this.sqlDialects = sqlDialects;
38 | this.sqlQuery = sqlQuery;
39 | }
40 |
41 | public Set getSqlDialects() {
42 | return sqlDialects;
43 | }
44 |
45 | public void setSqlDialects(Set sqlDialects) {
46 | this.sqlDialects = sqlDialects;
47 | }
48 |
49 | public String getSqlQuery() {
50 | return sqlQuery;
51 | }
52 |
53 | public void setSqlQuery(String sqlQuery) {
54 | this.sqlQuery = sqlQuery;
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/script/PaginatedTableInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package org.wso2.carbon.dataservices.core.script;
20 |
21 | import org.wso2.carbon.utils.Pageable;
22 |
23 | import java.util.List;
24 |
25 | public class PaginatedTableInfo implements Pageable {
26 |
27 | private String[] tableList;
28 |
29 | private int numberOfPages;
30 |
31 | public int getNumberOfPages() {
32 | return numberOfPages;
33 | }
34 |
35 | public String[] getTableInfo() {
36 | return tableList;
37 | }
38 |
39 | public void setTableInfo(String[] tableList) {
40 | this.tableList = tableList;
41 | }
42 |
43 |
44 | public void set(List items) {
45 | this.tableList = items.toArray(new String[items.size()]);
46 | }
47 |
48 | public void setNumberOfPages(int numberOfPages) {
49 | this.numberOfPages = numberOfPages;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/xsd/payments_with_date_time.xsd:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/sql/h2/H2InitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.sql.h2;
17 |
18 | import java.sql.Connection;
19 | import java.sql.DriverManager;
20 | import java.sql.Statement;
21 |
22 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
23 | import org.wso2.carbon.dataservices.core.test.util.UtilServer;
24 |
25 | public class H2InitTest extends DataServiceBaseTestCase {
26 |
27 | public H2InitTest() {
28 | super("H2InitTest");
29 | }
30 |
31 | public void testH2Startup() throws Exception {
32 | startTenantFlow();
33 | Class.forName("org.h2.Driver");
34 | Connection conn = DriverManager.getConnection("jdbc:h2:mem:ds-test-db;DB_CLOSE_DELAY=-1");
35 | Statement stmt = conn.createStatement();
36 | stmt.executeUpdate("RUNSCRIPT FROM './src/test/resources/sql/CreateH2TestDB.sql'");
37 | stmt.close();
38 | conn.close();
39 | UtilServer.start(repository, axis2Conf);
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/csv/BAM_DAY_DIM.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_START_TIMESTAMP","BAM_NAME","BAM_DAY_OF_WEEK","BAM_DAY_OF_MONTH","BAM_DAY_OF_YEAR","BAM_MONTH"
2 | "1","2010-02-04 00:00:00.0","","1","4","35","1"
3 | "2","2010-02-03 00:00:00.0","","1","3","34","1"
4 | "28","2010-03-02 00:00:00.0","","1","2","61","3"
5 | "29","2010-03-03 00:00:00.0","","1","3","62","3"
6 | "3","2010-02-05 00:00:00.0","","1","5","36","1"
7 | "4","2010-02-06 00:00:00.0","","1","6","37","1"
8 | "5","2010-02-07 00:00:00.0","","1","7","38","1"
9 | "6","2010-02-08 00:00:00.0","","2","8","39","1"
10 | "7","2010-02-09 00:00:00.0","","2","9","40","1"
11 | "8","2010-02-10 00:00:00.0","","2","10","41","1"
12 | "9","2010-02-11 00:00:00.0","","2","11","42","1"
13 | "10","2010-02-12 00:00:00.0","","2","12","43","1"
14 | "11","2010-02-13 00:00:00.0","","2","13","44","1"
15 | "12","2010-02-14 00:00:00.0","","2","14","45","1"
16 | "13","2010-02-15 00:00:00.0","","3","15","46","1"
17 | "14","2010-02-16 00:00:00.0","","3","16","47","1"
18 | "15","2010-02-17 00:00:00.0","","3","17","48","1"
19 | "16","2010-02-18 00:00:00.0","","3","18","49","1"
20 | "17","2010-02-19 00:00:00.0","","3","19","50","1"
21 | "18","2010-02-20 00:00:00.0","","3","20","51","1"
22 | "19","2010-02-21 00:00:00.0","","3","21","52","1"
23 | "20","2010-02-22 00:00:00.0","","4","22","53","1"
24 | "21","2010-02-23 00:00:00.0","","4","23","54","1"
25 | "22","2010-02-24 00:00:00.0","","4","24","55","1"
26 | "23","2010-02-25 00:00:00.0","","4","25","56","1"
27 | "24","2010-02-26 00:00:00.0","","4","26","57","1"
28 | "25","2010-02-27 00:00:00.0","","4","27","58","1"
29 | "26","2010-02-28 00:00:00.0","","4","28","59","1"
30 | "27","2010-03-01 00:00:00.0","","1","1","60","3"
31 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/odata/NavigationTable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package org.wso2.carbon.dataservices.core.odata;
20 |
21 | import java.util.HashMap;
22 | import java.util.List;
23 | import java.util.Map;
24 | import java.util.Set;
25 |
26 | /**
27 | * This class stores the all the paths(relations) in a table and related keys.
28 | *
29 | * @see NavigationKeys
30 | */
31 | public class NavigationTable {
32 |
33 | private Map> columns;
34 |
35 | public NavigationTable() {
36 | this.columns = new HashMap<>();
37 | }
38 |
39 | public Set getTables() {
40 | return this.columns.keySet();
41 | }
42 |
43 | public List getNavigationKeys(String table) {
44 | return this.columns.get(table);
45 | }
46 |
47 | public void addNavigationKeys(String table, List keys) {
48 | this.columns.put(table, keys);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/sqlparser/analysers/AnalyzerFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.sqlparser.analysers;
20 |
21 | import org.wso2.carbon.dataservices.core.DataServiceFault;
22 | import org.wso2.carbon.dataservices.core.sqlparser.LexicalConstants;
23 |
24 | import java.util.Queue;
25 |
26 | public class AnalyzerFactory {
27 |
28 | public static KeyWordAnalyzer createAnalyzer(String type,
29 | Queue tokens) throws DataServiceFault {
30 | type = type.toUpperCase();
31 | if (LexicalConstants.SELECT.equals(type)) {
32 | return new SelectAnalyser(tokens);
33 | } else if (LexicalConstants.WHERE.equals(type)) {
34 | return new WhereAnalyzer(tokens);
35 | } else {
36 | throw new DataServiceFault("Unsupported keyword '" + type + "'");
37 | }
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/generic/GenericInitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004,2005 The Apache Software Foundation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.core.test.generic;
17 |
18 | import java.sql.Connection;
19 | import java.sql.DriverManager;
20 | import java.sql.Statement;
21 |
22 | import org.wso2.carbon.dataservices.core.test.DataServiceBaseTestCase;
23 | import org.wso2.carbon.dataservices.core.test.util.UtilServer;
24 |
25 | public class GenericInitTest extends DataServiceBaseTestCase {
26 |
27 | public GenericInitTest() {
28 | super("GenericInitTest");
29 | }
30 |
31 | public void testGenericStartup() throws Exception {
32 | startTenantFlow();
33 | Class.forName("org.h2.Driver");
34 | Connection conn = DriverManager.getConnection("jdbc:h2:mem:ds-test-db;DB_CLOSE_DELAY=-1");
35 | Statement stmt = conn.createStatement();
36 | stmt.executeUpdate("RUNSCRIPT FROM './src/test/resources/sql/CreateH2TestDB.sql'");
37 | stmt.close();
38 | conn.close();
39 | UtilServer.start(repository, axis2Conf);
40 | }
41 |
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/custom/datasource/FixedDataRow.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.custom.datasource;
20 |
21 | import java.util.Map;
22 | import java.util.concurrent.ConcurrentHashMap;
23 |
24 | /**
25 | * This class represents an implementation of DataRow interface,
26 | * which is a data row which has a fixed data amount.
27 | */
28 | public class FixedDataRow implements DataRow {
29 |
30 | private Map values;
31 |
32 | public FixedDataRow(Map values) {
33 | this.values = new ConcurrentHashMap(values);
34 | }
35 |
36 | public Map getValues() {
37 | return values;
38 | }
39 |
40 | @Override
41 | public String getValueAt(String column) {
42 | return this.getValues().get(column);
43 | }
44 |
45 | public void update(Map values) {
46 | this.getValues().putAll(values);
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/description/config/CustomQueryBasedDSConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.description.config;
20 |
21 | import java.util.Map;
22 |
23 | import org.wso2.carbon.dataservices.core.custom.datasource.CustomQueryBasedDS;
24 | import org.wso2.carbon.dataservices.core.engine.DataService;
25 |
26 | /**
27 | * This class represents a data services custom query based data source configuration.
28 | */
29 | public abstract class CustomQueryBasedDSConfig extends Config {
30 |
31 | public CustomQueryBasedDSConfig(DataService dataService, String configId, String type,
32 | Map properties, boolean odataEnable) {
33 | super(dataService, configId, type, properties, odataEnable);
34 | }
35 |
36 | public abstract CustomQueryBasedDS getDataSource();
37 |
38 | @Override
39 | public void close() {
40 | this.getDataSource().close();
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/jmx/DataServiceInstanceMBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.core.jmx;
20 |
21 | /**
22 | * JMX MBean interface to represent a data service.
23 | */
24 | public interface DataServiceInstanceMBean {
25 |
26 | String getServiceName();
27 |
28 | String getDataServiceDescriptorPath();
29 |
30 | String[] getConfigIds();
31 |
32 | String[] getQueryIds();
33 |
34 | String[] getOperationNames();
35 |
36 | String[] getResourcePaths();
37 |
38 | String getQueryIdFromOperationName(String operationName);
39 |
40 | String getConfigIdFromQueryId(String queryId);
41 |
42 | String[] getHTTPMethodsForResourcePath(String resPath);
43 |
44 | boolean isConfigActive(String configId);
45 |
46 | String getConfigTypeFromId(String configId);
47 |
48 | boolean isDatabaseConnectionStatsAvailable(String configId);
49 |
50 | int getOpenDatabaseConnectionsCount(String configId);
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/java/org/wso2/carbon/dataservices/core/test/csv/BAM_DAY_DIM.csv:
--------------------------------------------------------------------------------
1 | "BAM_ID","BAM_START_TIMESTAMP","BAM_NAME","BAM_DAY_OF_WEEK","BAM_DAY_OF_MONTH","BAM_DAY_OF_YEAR","BAM_MONTH"
2 | "1","2010-02-04 00:00:00.0","","1","4","35","1"
3 | "2","2010-02-03 00:00:00.0","","1","3","34","1"
4 | "28","2010-03-02 00:00:00.0","","1","2","61","3"
5 | "29","2010-03-03 00:00:00.0","","1","3","62","3"
6 | "3","2010-02-05 00:00:00.0","","1","5","36","1"
7 | "4","2010-02-06 00:00:00.0","","1","6","37","1"
8 | "5","2010-02-07 00:00:00.0","","1","7","38","1"
9 | "6","2010-02-08 00:00:00.0","","2","8","39","1"
10 | "7","2010-02-09 00:00:00.0","","2","9","40","1"
11 | "8","2010-02-10 00:00:00.0","","2","10","41","1"
12 | "9","2010-02-11 00:00:00.0","","2","11","42","1"
13 | "10","2010-02-12 00:00:00.0","","2","12","43","1"
14 | "11","2010-02-13 00:00:00.0","","2","13","44","1"
15 | "12","2010-02-14 00:00:00.0","","2","14","45","1"
16 | "13","2010-02-15 00:00:00.0","","3","15","46","1"
17 | "14","2010-02-16 00:00:00.0","","3","16","47","1"
18 | "15","2010-02-17 00:00:00.0","","3","17","48","1"
19 | "16","2010-02-18 00:00:00.0","","3","18","49","1"
20 | "17","2010-02-19 00:00:00.0","","3","19","50","1"
21 | "18","2010-02-20 00:00:00.0","","3","20","51","1"
22 | "19","2010-02-21 00:00:00.0","","3","21","52","1"
23 | "20","2010-02-22 00:00:00.0","","4","22","53","1"
24 | "21","2010-02-23 00:00:00.0","","4","23","54","1"
25 | "22","2010-02-24 00:00:00.0","","4","24","55","1"
26 | "23","2010-02-25 00:00:00.0","","4","25","56","1"
27 | "24","2010-02-26 00:00:00.0","","4","26","57","1"
28 | "25","2010-02-27 00:00:00.0","","4","27","58","1"
29 | "26","2010-02-28 00:00:00.0","","4","28","59","1"
30 | "27","2010-03-01 00:00:00.0","","1","1","60","3"
31 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.sql.driver/src/main/java/org/wso2/carbon/dataservices/sql/driver/TConnectionFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | */
19 | package org.wso2.carbon.dataservices.sql.driver;
20 |
21 | import org.wso2.carbon.dataservices.sql.driver.parser.Constants;
22 |
23 | import java.sql.Connection;
24 | import java.sql.SQLException;
25 | import java.util.Properties;
26 |
27 | public class TConnectionFactory {
28 |
29 | public static Connection createConnection(String type, Properties props) throws SQLException {
30 | type = type.toUpperCase();
31 | if (Constants.EXCEL.equals(type)) {
32 | return new TExcelConnection(props);
33 | } else if (Constants.GSPREAD.equals(type)) {
34 | return new TGSpreadConnection(props);
35 | } else if (Constants.CUSTOM.equals(type)) {
36 | return new TCustomConnection(props);
37 | } else {
38 | throw new SQLException("Unsupported datasource type");
39 | }
40 |
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.core/src/test/resources/xsd/customers.xsd:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/beans/Operation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.wso2.carbon.dataservices.ui.beans;
17 |
18 | import org.apache.axiom.om.OMAbstractFactory;
19 | import org.apache.axiom.om.OMElement;
20 | import org.apache.axiom.om.OMFactory;
21 |
22 | /**
23 | * Object mapping for operation
24 | *
25 | * || ..
26 | *
27 | */
28 | public class Operation extends CallableRequest {
29 |
30 | private String name;
31 |
32 | public String getName() {
33 | return name;
34 | }
35 |
36 | public void setName(String name) {
37 | this.name = name;
38 | }
39 |
40 | public OMElement buildXML() {
41 | OMFactory fac = OMAbstractFactory.getOMFactory();
42 | OMElement opEl = fac.createOMElement("operation", null);
43 | if (this.getName() != null) {
44 | opEl.addAttribute("name", this.getName(), null);
45 | }
46 | this.populateGenericRequestProps(opEl);
47 | return opEl;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/removeQuery.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | ~
4 | ~ WSO2 Inc. licenses this file to you under the Apache License,
5 | ~ Version 2.0 (the "License"); you may not use this file except
6 | ~ in compliance with the License.
7 | ~ You may obtain a copy of the License at
8 | ~
9 | ~ http://www.apache.org/licenses/LICENSE-2.0
10 | ~
11 | ~ Unless required by applicable law or agreed to in writing,
12 | ~ software distributed under the License is distributed on an
13 | ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | ~ KIND, either express or implied. See the License for the
15 | ~ specific language governing permissions and limitations
16 | ~ under the License.
17 | --%>
18 | <%--This page is invoked when cancel is clicked.
19 | It Removes the query from the dataservice bean.--%>
20 | <%@ page import="org.wso2.carbon.dataservices.ui.beans.*" %>
21 |
22 |
23 |
24 | <%
25 |
26 | String queryId = request.getParameter("queryId");
27 | Query query;
28 | String forwardTo = null;
29 | String flag = null;
30 |
31 | if (queryId != null) {
32 | query = dataService.getQuery(queryId);
33 | if (query != null) {
34 | if (query.getStatus().equals("remove")) {
35 | dataService.removeQuery(query);
36 | forwardTo = "queries.jsp";
37 | } else {
38 | forwardTo = "queries.jsp";
39 | }
40 |
41 | } else {
42 | forwardTo = "queries.jsp";
43 | }
44 | }
45 |
46 |
47 | %>
48 |
49 |
50 |
--------------------------------------------------------------------------------