[Carbon-commits] [Carbon] svn commit r111659 - in branches/carbon/3.2.0: components/data-services/org.wso2.carbon.dataservices.common/3.2.2/src/main/java/org/wso2/carbon/dataservices/common components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/constants components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/internal components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/multitenancy components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services components/data-services/org.wso2.carbon.dataservices.ui/3.2.0/src/main/resources/org/wso2/carbon/dataservices/u i/i18n components/data-services/org.wso2.carbon.dataservices.ui/3.2.0/src/main/resources/web/ds components/data-services/org.wso2.carbon.dataservices.ui/3.2.2 components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/js service-stubs/org.wso2.carbon.dataservices.taskscheduler.stub/3.2.2 service-stubs/org.wso2.carbon.dataservices.taskscheduler.stub/3.2.2/src/main/resources
prabatha at wso2.com
prabatha at wso2.com
Tue Aug 16 03:01:43 EDT 2011
Author: prabatha
Date: Tue Aug 16 00:01:42 2011
New Revision: 111659
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=111659
Log:
committing task scheduler related changes of dataservices
Added:
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskProperty.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/DSTaskMetaDataProviderService.java
- copied, changed from r111134, /branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/TaskMetaDataProviderService.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/editTask.jsp
Removed:
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/constants/
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/internal/TaskSchedulerBundleActivator.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/TaskMetaDataProviderService.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler/DataServiceTaskConstants.java
Modified:
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.common/3.2.2/src/main/java/org/wso2/carbon/dataservices/common/DBConstants.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/SchedulingTask.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulerUtils.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulingJob.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulingManager.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/internal/TaskSchedulerServiceComponent.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/multitenancy/TaskSchedulerInitializer.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/TaskManagementAdminService.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.0/src/main/resources/org/wso2/carbon/dataservices/ui/i18n/Resources.properties
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.0/src/main/resources/web/ds/addNewTask.jsp
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/pom.xml
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler/DataServiceTaskMgtClient.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler/DataServiceTaskMgtHelper.java
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/addNewTask.jsp
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/js/taskcommon.js
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/saveTask.jsp
branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/tasks.jsp
branches/carbon/3.2.0/service-stubs/org.wso2.carbon.dataservices.taskscheduler.stub/3.2.2/pom.xml
branches/carbon/3.2.0/service-stubs/org.wso2.carbon.dataservices.taskscheduler.stub/3.2.2/src/main/resources/TaskManagementAdminService.wsdl
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.common/3.2.2/src/main/java/org/wso2/carbon/dataservices/common/DBConstants.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.common/3.2.2/src/main/java/org/wso2/carbon/dataservices/common/DBConstants.java?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.common/3.2.2/src/main/java/org/wso2/carbon/dataservices/common/DBConstants.java (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.common/3.2.2/src/main/java/org/wso2/carbon/dataservices/common/DBConstants.java Tue Aug 16 00:01:42 2011
@@ -22,424 +22,423 @@
* Represents the global constants defined by data services.
*/
public final class DBConstants {
-
- private DBConstants() {
- throw new AssertionError();
- }
-
- public static final String WSO2_DS_NAMESPACE = "http://ws.wso2.org/dataservice";
- public static final String DATA_SERVICE_OBJECT = "org.wso2.ws.dataservice.dataservice.obj";
- public static final String DB_SERVICE_DEPLOYER = "org.wso2.ws.dataservice.dataservice.deployer";
- public static final String DB_SERVICE_TYPE = "data_service";
- public static final String DB_SERVICE_REPO = "local_org.wso2.ws.dataservice.db_service_repo";
- public static final String DB_SERVICE_REPO_VALUE = "dataservices";
- public static final String DB_SERVICE_EXTENSION = "local_org.wso2.ws.dataservice.db_service_extension";
- public static final String DB_SERVICE_EXTENSION_VALUE = "dbs";
- public static final String BATCH_OPERATON_NAME_SUFFIX = "_batch_req";
- public static final String DEFAULT_CHAR_SET_TYPE = "UTF-8";
- public static final String DATA_SERVICES_JMX_DOMAIN = "org.wso2.carbon.dataservices.jmx";
- public static final String DEFAULT_CONFIG_ID = "default";
- public static final String AXIS2_SERVICE_TYPE = "serviceType";
- public static final String AXIS2_SERVICE_GROUP = "serviceGroup";
- public static final String AXIS2_SERVICE = "service";
- public static final String DBS_SERVICES_XML_SUFFIX = "_services.xml";
- public static final String DS_FAULT_NAME = "org.wso2.carbon.dataservices.core.DataServiceFault";
- public static final String DS_FAULT_ELEMENT = "DataServiceFault";
- public static final String MSG_CONTEXT_USERNAME_PROPERTY = "username";
- public static final String DBS_FILE_EXTENSION = "dbs";
- public static final String TARGET_NAMESPACE = "targetNamespace";
- public static final String COMPLEX_TYPE = "complexType";
- public static final String LABEL_SUCESSFULL = "successful";
- public static final String DEFAULT_XSD_PREFIX = "xs";
- public static final String DEFAULT_XSD_TYPE = DEFAULT_XSD_PREFIX + ":string";
- public static final String EMPTY_QUERY_ID = "__dataservices_empty_query__";
- public static final String EMPTY_END_BOXCAR_QUERY_ID = "__dataservices_empty_end_boxcar_query__";
- public static final String RDF_NAMESPACE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
- public static final String XSD_NAMESPACE = "http://www.w3.org/2001/XMLSchema";
- public static final String DEFAULT_RDF_PREFIX = "rdf";
- public static final String RDF_ABOUT = "about";
- public static final String XSI_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance";
- public static final String XSI_PREFIX = "xsi";
- public static final String NIL = "nil";
- public static final String CONTRACT_FIRST_QUERY_SUFFIX = "Query";
- public static final String CONTRACT_FIRST_DUMMY_SQL = "dummy";
- public static final String GOV_REGISTRY_PATH_PREFIX = "gov:";
- public static final String CONF_REGISTRY_PATH_PREFIX = "conf:";
+
+ private DBConstants() {
+ throw new AssertionError();
+ }
+
+ public static final String WSO2_DS_NAMESPACE = "http://ws.wso2.org/dataservice";
+ public static final String DATA_SERVICE_OBJECT = "org.wso2.ws.dataservice.dataservice.obj";
+ public static final String DB_SERVICE_DEPLOYER = "org.wso2.ws.dataservice.dataservice.deployer";
+ public static final String DB_SERVICE_TYPE = "data_service";
+ public static final String DB_SERVICE_REPO = "local_org.wso2.ws.dataservice.db_service_repo";
+ public static final String DB_SERVICE_REPO_VALUE = "dataservices";
+ public static final String DB_SERVICE_EXTENSION = "local_org.wso2.ws.dataservice.db_service_extension";
+ public static final String DB_SERVICE_EXTENSION_VALUE = "dbs";
+ public static final String BATCH_OPERATON_NAME_SUFFIX = "_batch_req";
+ public static final String DEFAULT_CHAR_SET_TYPE = "UTF-8";
+ public static final String DATA_SERVICES_JMX_DOMAIN = "org.wso2.carbon.dataservices.jmx";
+ public static final String DEFAULT_CONFIG_ID = "default";
+ public static final String AXIS2_SERVICE_TYPE = "serviceType";
+ public static final String AXIS2_SERVICE_GROUP = "serviceGroup";
+ public static final String AXIS2_SERVICE = "service";
+ public static final String DBS_SERVICES_XML_SUFFIX = "_services.xml";
+ public static final String DS_FAULT_NAME = "org.wso2.carbon.dataservices.core.DataServiceFault";
+ public static final String DS_FAULT_ELEMENT = "DataServiceFault";
+ public static final String MSG_CONTEXT_USERNAME_PROPERTY = "username";
+ public static final String DBS_FILE_EXTENSION = "dbs";
+ public static final String TARGET_NAMESPACE = "targetNamespace";
+ public static final String COMPLEX_TYPE = "complexType";
+ public static final String LABEL_SUCESSFULL = "successful";
+ public static final String DEFAULT_XSD_PREFIX = "xs";
+ public static final String DEFAULT_XSD_TYPE = DEFAULT_XSD_PREFIX + ":string";
+ public static final String EMPTY_QUERY_ID = "__dataservices_empty_query__";
+ public static final String EMPTY_END_BOXCAR_QUERY_ID = "__dataservices_empty_end_boxcar_query__";
+ public static final String RDF_NAMESPACE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+ public static final String XSD_NAMESPACE = "http://www.w3.org/2001/XMLSchema";
+ public static final String DEFAULT_RDF_PREFIX = "rdf";
+ public static final String RDF_ABOUT = "about";
+ public static final String XSI_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance";
+ public static final String XSI_PREFIX = "xsi";
+ public static final String NIL = "nil";
+ public static final String CONTRACT_FIRST_QUERY_SUFFIX = "Query";
+ public static final String CONTRACT_FIRST_DUMMY_SQL = "dummy";
+ public static final String GOV_REGISTRY_PATH_PREFIX = "gov:";
+ public static final String CONF_REGISTRY_PATH_PREFIX = "conf:";
public static final int DEFAULT_DBCP_MIN_POOL_SIZE = 1;
- public static final int DEFAULT_DBCP_MAX_POOL_SIZE = 5;
- public static final String STANDARD_TRANSACTION_MANAGER_JNDI_NAME = "java:comp/TransactionManager";
- public static final String STANDARD_USER_TRANSACTION_JNDI_NAME = "java:comp/UserTransaction";
- public static final String REQUEST_STATUS_SUCCESSFUL_MESSAGE = "SUCCESSFUL";
- public static final String REQUEST_STATUS_WRAPPER_ELEMENT = "REQUEST_STATUS";
-
- /**
- * Codes to be used as fault codes.
- */
- public static final class FaultCodes {
-
- private FaultCodes() {
- throw new AssertionError();
- }
-
- public static String DATABASE_ERROR = "DATABASE_ERROR";
- public static String CONNECTION_UNAVAILABLE_ERROR = "CONNECTION_UNAVAILABLE_ERROR";
- public static String VALIDATION_ERROR = "VALIDATION_ERROR";
- public static String INCOMPATIBLE_PARAMETERS_ERROR = "INCOMPATIBLE_PARAMETERS_ERROR";
- public static String UNKNOWN_ERROR = "UNKNOWN_ERROR";
- }
-
- /**
- * Autocommit values.
- */
- public enum AutoCommit {
- DEFAULT, AUTO_COMMIT_ON, AUTO_COMMIT_OFF;
- }
-
- /**
- * Constants related to data types.
- */
- public static final class DataTypes {
-
- private DataTypes() {
- throw new AssertionError();
- }
-
- public static final String CHAR = "CHAR";
- public static final String LONG = "LONG";
- public static final String STRING = "STRING";
- public static final String VARCHAR = "VARCHAR";
- public static final String TEXT = "TEXT";
- public static final String NUMERIC = "NUMERIC";
- public static final String DECIMAL = "DECIMAL";
- public static final String MONEY = "MONEY";
- public static final String SMALLMONEY = "SMALLMONEY";
- public static final String BIT = "BIT";
- public static final String ANYURI = "ANYURI";
- public static final String BOOLEAN = "BOOLEAN";
- public static final String TINYINT = "TINYINT";
- public static final String SMALLINT = "SMALLINT";
- public static final String INTEGER = "INTEGER";
- public static final String BIGINT = "BIGINT";
- public static final String REAL = "REAL";
- public static final String FLOAT = "FLOAT";
- public static final String DOUBLE = "DOUBLE";
- public static final String BINARY = "BINARY";
- public static final String VARBINARY = "VARBINARY";
- public static final String LONG_VARBINARY = "LONG VARBINARY";
- public static final String IMAGE = "IMAGE";
- public static final String DATE = "DATE";
- public static final String TIME = "TIME";
- public static final String TIMESTAMP = "TIMESTAMP";
- public static final String ORACLE_REF_CURSOR = "ORACLE_REF_CURSOR";
+ public static final int DEFAULT_DBCP_MAX_POOL_SIZE = 5;
+ public static final String STANDARD_TRANSACTION_MANAGER_JNDI_NAME = "java:comp/TransactionManager";
+ public static final String STANDARD_USER_TRANSACTION_JNDI_NAME = "java:comp/UserTransaction";
+ public static final String REQUEST_STATUS_SUCCESSFUL_MESSAGE = "SUCCESSFUL";
+ public static final String REQUEST_STATUS_WRAPPER_ELEMENT = "REQUEST_STATUS";
+
+ /**
+ * Codes to be used as fault codes.
+ */
+ public static final class FaultCodes {
+
+ private FaultCodes() {
+ throw new AssertionError();
+ }
+
+ public static String DATABASE_ERROR = "DATABASE_ERROR";
+ public static String CONNECTION_UNAVAILABLE_ERROR = "CONNECTION_UNAVAILABLE_ERROR";
+ public static String VALIDATION_ERROR = "VALIDATION_ERROR";
+ public static String INCOMPATIBLE_PARAMETERS_ERROR = "INCOMPATIBLE_PARAMETERS_ERROR";
+ public static String UNKNOWN_ERROR = "UNKNOWN_ERROR";
+ }
+
+ /**
+ * Autocommit values.
+ */
+ public enum AutoCommit {
+ DEFAULT, AUTO_COMMIT_ON, AUTO_COMMIT_OFF;
+ }
+
+ /**
+ * Constants related to data types.
+ */
+ public static final class DataTypes {
+
+ private DataTypes() {
+ throw new AssertionError();
+ }
+
+ public static final String CHAR = "CHAR";
+ public static final String LONG = "LONG";
+ public static final String STRING = "STRING";
+ public static final String VARCHAR = "VARCHAR";
+ public static final String TEXT = "TEXT";
+ public static final String NUMERIC = "NUMERIC";
+ public static final String DECIMAL = "DECIMAL";
+ public static final String MONEY = "MONEY";
+ public static final String SMALLMONEY = "SMALLMONEY";
+ public static final String BIT = "BIT";
+ public static final String ANYURI = "ANYURI";
+ public static final String BOOLEAN = "BOOLEAN";
+ public static final String TINYINT = "TINYINT";
+ public static final String SMALLINT = "SMALLINT";
+ public static final String INTEGER = "INTEGER";
+ public static final String BIGINT = "BIGINT";
+ public static final String REAL = "REAL";
+ public static final String FLOAT = "FLOAT";
+ public static final String DOUBLE = "DOUBLE";
+ public static final String BINARY = "BINARY";
+ public static final String VARBINARY = "VARBINARY";
+ public static final String LONG_VARBINARY = "LONG VARBINARY";
+ public static final String IMAGE = "IMAGE";
+ public static final String DATE = "DATE";
+ public static final String TIME = "TIME";
+ public static final String TIMESTAMP = "TIMESTAMP";
+ public static final String ORACLE_REF_CURSOR = "ORACLE_REF_CURSOR";
public static final String UDT = "UDT";
- }
-
- /**
- * Constants related Data service generator using data source.
- */
- public static final class DataServiceGenerator {
-
- private DataServiceGenerator() {
- throw new AssertionError();
- }
-
- public static final String CONFIG_ID = "default";
- public static final String ROW_ELEMENT_NAME_SUFFIX = "Collection";
- public static final String SERVICE_NAME_SUFFIX = "_DataService";
- public static final String SINGLE_SERVICE_DESCRIPTION = "single service for whole database";
- public static final String MUTLIPLE_SERVICE_DESCRIPTION = "multiple services per each table";
- public static final String ACTIVE = "active";
- public static final String TABLE_NAME = "TABLE_NAME";
- public static final String TABLE_SCHEM = "TABLE_SCHEM";
- public static final String COLUMN_NAME = "COLUMN_NAME";
- public static final String QUERY_PARAM = "query-param";
- public static final String INSERT_ = "insert_";
- public static final String _QUERY = "_query";
- public static final String _OPERATION = "_operation";
- public static final String UPDATE_ = "update_";
- public static final String DELETE_ = "delete_";
- public static final String SELECT_WITH_KEY = "select_with_key_";
- public static final String SELECT_ALL = "select_all_";
- public static final String DATA_TYPE = "DATA_TYPE";
- public static final String IN = "IN";
- public static final String SCALAR = "SCALAR";
- public static final String COLUMN = "column";
- public static final String ELEMENT = "element";
- }
+ }
+
+ /**
+ * Constants related Data service generator using data source.
+ */
+ public static final class DataServiceGenerator {
+
+ private DataServiceGenerator() {
+ throw new AssertionError();
+ }
+
+ public static final String CONFIG_ID = "default";
+ public static final String ROW_ELEMENT_NAME_SUFFIX = "Collection";
+ public static final String SERVICE_NAME_SUFFIX = "_DataService";
+ public static final String SINGLE_SERVICE_DESCRIPTION = "single service for whole database";
+ public static final String MUTLIPLE_SERVICE_DESCRIPTION = "multiple services per each table";
+ public static final String ACTIVE = "active";
+ public static final String TABLE_NAME = "TABLE_NAME";
+ public static final String TABLE_SCHEM = "TABLE_SCHEM";
+ public static final String COLUMN_NAME = "COLUMN_NAME";
+ public static final String QUERY_PARAM = "query-param";
+ public static final String INSERT_ = "insert_";
+ public static final String _QUERY = "_query";
+ public static final String _OPERATION = "_operation";
+ public static final String UPDATE_ = "update_";
+ public static final String DELETE_ = "delete_";
+ public static final String SELECT_WITH_KEY = "select_with_key_";
+ public static final String SELECT_ALL = "select_all_";
+ public static final String DATA_TYPE = "DATA_TYPE";
+ public static final String IN = "IN";
+ public static final String SCALAR = "SCALAR";
+ public static final String COLUMN = "column";
+ public static final String ELEMENT = "element";
+ }
public static final class XSDTypes {
-
- private XSDTypes() {
- throw new AssertionError();
- }
-
-
- public static final String STRING = "STRING";
- public static final String BOOLEAN = "BOOLEAN";
- public static final String DECIMAL = "DECIMAL";
- public static final String FLOAT = "FLOAT";
- public static final String LONG = "LONG";
- public static final String DOUBLE = "DOUBLE";
- public static final String INTEGER = "INTEGER";
- public static final String DATE = "DATE";
- public static final String DATETIME = "DATETIME";
- public static final String TIME = "TIME";
- public static final String GYEARMONTH = "GYEARMONTH";
- public static final String GYEAR = "GYEAR";
- public static final String GMONTHDAY = "GMONTHDAY";
- public static final String GDAY = "GDAY";
- public static final String GMONTH = "GMONTH";
- public static final String HEXBINARY = "HEXBINARY";
- public static final String BASE64BINARY = "BASE64BINARY";
- public static final String ANYURI = "ANYURI";
- public static final String QNAME = "QNAME";
- public static final String NOTATION = "NOTATION";
- }
-
+
+ private XSDTypes() {
+ throw new AssertionError();
+ }
+
+
+ public static final String STRING = "STRING";
+ public static final String BOOLEAN = "BOOLEAN";
+ public static final String DECIMAL = "DECIMAL";
+ public static final String FLOAT = "FLOAT";
+ public static final String LONG = "LONG";
+ public static final String DOUBLE = "DOUBLE";
+ public static final String INTEGER = "INTEGER";
+ public static final String DATE = "DATE";
+ public static final String DATETIME = "DATETIME";
+ public static final String TIME = "TIME";
+ public static final String GYEARMONTH = "GYEARMONTH";
+ public static final String GYEAR = "GYEAR";
+ public static final String GMONTHDAY = "GMONTHDAY";
+ public static final String GDAY = "GDAY";
+ public static final String GMONTH = "GMONTH";
+ public static final String HEXBINARY = "HEXBINARY";
+ public static final String BASE64BINARY = "BASE64BINARY";
+ public static final String ANYURI = "ANYURI";
+ public static final String QNAME = "QNAME";
+ public static final String NOTATION = "NOTATION";
+ }
+
/**
- * Result types
+ * Result types
*/
public static final class ResultTypes {
-
- private ResultTypes() {
- throw new AssertionError();
- }
-
- public static final int RDF = 0x01;
- public static final int XML = 0x02;
-
+
+ private ResultTypes() {
+ throw new AssertionError();
+ }
+
+ public static final int RDF = 0x01;
+ public static final int XML = 0x02;
+
}
-
+
/**
- * Pre-fetch property names
+ * Pre-fetch property names
*/
public static final class PrefetchProperties {
-
- private PrefetchProperties() {
- throw new AssertionError();
- }
-
- public static final String SQL_CONNECTION = "sql_connection";
- public static final String SQL_STATEMENT = "sql_statement";
- public static final String SQL_RESULSET = "sql_resultset";
- public static final String CSV_READER = "csv_reader";
- public static final String EXCEL_WORKBOOK = "excel_workbook";
- public static final String GSPREAD_DATA = "gspread_data";
- public static final String SPARQL_RESULSET = "sparql_resultset";
-
+
+ private PrefetchProperties() {
+ throw new AssertionError();
+ }
+
+ public static final String SQL_CONNECTION = "sql_connection";
+ public static final String SQL_STATEMENT = "sql_statement";
+ public static final String SQL_RESULSET = "sql_resultset";
+ public static final String CSV_READER = "csv_reader";
+ public static final String EXCEL_WORKBOOK = "excel_workbook";
+ public static final String GSPREAD_DATA = "gspread_data";
+ public static final String SPARQL_RESULSET = "sparql_resultset";
+
}
-
+
/**
- * Data categories
+ * Data categories
*/
public static final class DataCategory {
-
- private DataCategory() {
- throw new AssertionError();
- }
-
- public static final int VALUE = 0x01;
- public static final int REFERENCE = 0x02;
-
- }
-
-
- /**
- * Constants related to data source types.
- */
- public static final class DataSourceTypes {
-
- private DataSourceTypes() {
- throw new AssertionError();
- }
-
- public static final String RDBMS = "RDBMS";
- public static final String RDF = "RDF";
- public static final String CSV = "CSV";
- public static final String EXCEL = "EXCEL";
- public static final String JNDI = "JNDI";
- public static final String GDATA_SPREADSHEET = "GDATA_SPREADSHEET";
- public static final String CARBON = "CARBON_DATASOURCE";
- public static final String WEB = "WEB_CONFIG";
- }
-
- /**
- * Constants related to RDBMS data source.
- */
- public static final class RDBMS {
-
- private RDBMS() {
- throw new AssertionError();
- }
-
- public static final String DRIVER = "org.wso2.ws.dataservice.driver";
- public static final String PROTOCOL = "org.wso2.ws.dataservice.protocol";
- public static final String USER = "org.wso2.ws.dataservice.user";
- public static final String PASSWORD = "org.wso2.ws.dataservice.password";
- public static final String QUERY_TIMEOUT = "org.wso2.ws.dataservice.query_timeout";
- public static final String AUTO_COMMIT = "org.wso2.ws.dataservice.autocommit";
- public static final String FETCH_DIRECTION = "org.wso2.ws.dataservice.fetch_direction";
- public static final String FETCH_SIZE = "org.wso2.ws.dataservice.fetch_size";
- public static final String MAX_FIELD_SIZE = "org.wso2.ws.dataservice.max_field_size";
- public static final String MAX_ROWS = "org.wso2.ws.dataservice.max_rows";
- public static final String FORCE_STORED_PROC = "org.wso2.ws.dataservice.force_stored_proc";
- public static final String FORCE_JDBC_BATCH_REQUESTS = "org.wso2.ws.dataservice.force_jdbc_batch_requests";
-
- public static final String TRANSACTION_ISOLATION = "org.wso2.ws.dataservice.transaction_isolation";
- public static final String INITIAL_SIZE = "org.wso2.ws.dataservice.initial_size";
- public static final String MAX_POOL_SIZE = "org.wso2.ws.dataservice.maxpoolsize";
- public static final String MAX_IDLE = "org.wso2.ws.dataservice.max_idle";
- public static final String MIN_POOL_SIZE = "org.wso2.ws.dataservice.minpoolsize";
- public static final String MAX_WAIT = "org.wso2.ws.dataservice.max_wait";
- public static final String VALIDATION_QUERY = "org.wso2.ws.dataservice.validation_query";
- public static final String TEST_ON_BORROW = "org.wso2.ws.dataservice.test_on_borrow";
- public static final String TEST_ON_RETURN = "org.wso2.ws.dataservice.test_on_return";
- public static final String TEST_WHILE_IDLE = "org.wso2.ws.dataservice.test_while_idle";
- public static final String TIME_BETWEEN_EVICTION_RUNS_MILLS = "org.wso2.ws.dataservice.time_between_eviction_runs_mills";
- public static final String NUM_TESTS_PER_EVICTION_RUN = "org.wso2.ws.dataservice.num_test_per_eviction_run";
- public static final String MIN_EVICTABLE_IDLE_TIME_MILLIS = "org.wso2.ws.dataservice.min_evictable_idle_time_millis";
- public static final String REMOVE_ABANDONED = "org.wso2.ws.dataservice.remove_abandoned";
- public static final String REMOVE_ABONDONED_TIMEOUT = "org.wso2.ws.dataservice.remove_abandoned_timeout";
- public static final String LOG_ABANDONED = "org.wso2.ws.dataservice.log_abandoned";
-
- public static final String XA_DATASOURCE_CLASS = "org.wso2.ws.dataservice.xa_datasource_class";
- public static final String XA_DATASOURCE_PROPS = "org.wso2.ws.dataservice.xa_datasource_properties";
- }
-
-
- /**
- * Constants related to Database configuration properties
- */
- public static final class DBCPConfig {
-
- private DBCPConfig() {
- throw new AssertionError();
- }
-
- public static final String DRIVER_CLASS_NAME = "driverClassName";
- public static final String URL = "url";
- public static final String USER = "user";
- public static final String DEFAULT_TRANSACTION_ISOLATION = "defaultTransactionIsolation";
- public static final String PASSWORD = "password";
- public static final String INITIAL_SIZE = "initialSize";
- public static final String MAX_ACTIVE = "maxActive";
- public static final String MIN_IDLE = "minIdle";
- public static final String MAX_IDLE = "maxIdle";
- public static final String MAX_WAIT = "maxWait";
- public static final String VALIDATION_QUERY = "validationQuery";
- public static final String TEST_ON_BORROW = "testOnBorrow";
- public static final String TEST_ON_RETURN = "testOnReturn";
- public static final String TEST_WHILE_IDLE = "testWhileIdle";
- public static final String TIME_BETWEEN_EVICTION_RUNS_MILLIS = "timeBetweenEvictionRunsMillis";
- public static final String NUM_TESTS_PER_EVICTION_RUN = "numTestsPerEvictionRun";
- public static final String MIN_EVICTABLE_IDLE_TIME_MILLS = "minEvictableIdleTimeMillis";
- public static final String REMOVE_ABANDONED = "removeAbandoned";
- public static final String REMOVE_ABANDONED_TIMEOUT = "removeAbandonedTimeout";
- public static final String LOG_ABANDONED = "logAbandoned";
-
- public static final String TRANSACTION_UNKNOWN = "TRANSACTION_UNKNOWN";
- }
-
-
-
- /**
- * Constants related to JNDI data source.
- */
- public static final class JNDI {
-
- private JNDI() {
- throw new AssertionError();
- }
-
- public static final String INITIAL_CONTEXT_FACTORY = "jndi_context_class";
- public static final String PROVIDER_URL = "jndi_provider_url";
- public static final String RESOURCE_NAME = "jndi_resource_name";
- public static final String USERNAME = "jndi_username";
- public static final String PASSWORD = "jndi_password";
- public static final String DATASOURCE = "jndi_datasource";
- }
-
- /**
- * Constants related to google spreadsheet data source.
- */
- public static final class GSpread {
-
- private GSpread() {
- throw new AssertionError();
- }
-
- public static final String USERNAME = "gspread_username";
- public static final String PASSWORD = "gspread_password";
- public static final String VISIBILITY = "gspread_visibility";
- public static final String DATASOURCE = "gspread_datasource";
- public static final String WORKSHEET_NUMBER = "worksheetnumber";
- public static final String STARTING_ROW = "startingrow";
- public static final String MAX_ROW_COUNT = "maxrowcount";
- public static final String HAS_HEADER = "hasheader";
- }
-
- /**
- * Constants related to CSV data source.
- */
- public static final class CSV {
-
- private CSV() {
- throw new AssertionError();
- }
-
- public static final String COLUMN_SEPARATOR = "csv_columnseperator";
- public static final String STARTING_ROW = "csv_startingrow";
- public static final String MAX_ROW_COUNT = "csv_maxrowcount";
- public static final String HAS_HEADER = "csv_hasheader";
- public static final String DATASOURCE = "csv_datasource";
- public static final String COLUMN_SEPERATOR = "columnseperator";
- }
-
- /**
- * Constants related to Excel data source.
- */
- public static final class Excel {
-
- private Excel() {
- throw new AssertionError();
- }
-
- public static final String DATASOURCE = "excel_datasource";
- public static final String WORKBOOK_NAME = "workbookname";
- public static final String STARTING_ROW = "startingrow";
- public static final String MAX_ROW_COUNT = "maxrowcount";
- public static final String HAS_HEADER = "hasheader";
- }
-
- /**
- * Constants related to RDF data source.
- */
- public static final class RDF {
-
- private RDF() {
- throw new AssertionError();
- }
-
- public static final String DATASOURCE = "rdf_datasource";
-
- }
-
- /**
- * Constants related to carbon data sources.
- */
- public static final class CarbonDatasource {
-
- private CarbonDatasource() {
- throw new AssertionError();
- }
-
- public static final String NAME = "carbon_datasource_name";
- }
+
+ private DataCategory() {
+ throw new AssertionError();
+ }
+
+ public static final int VALUE = 0x01;
+ public static final int REFERENCE = 0x02;
+
+ }
+
+
+ /**
+ * Constants related to data source types.
+ */
+ public static final class DataSourceTypes {
+
+ private DataSourceTypes() {
+ throw new AssertionError();
+ }
+
+ public static final String RDBMS = "RDBMS";
+ public static final String RDF = "RDF";
+ public static final String CSV = "CSV";
+ public static final String EXCEL = "EXCEL";
+ public static final String JNDI = "JNDI";
+ public static final String GDATA_SPREADSHEET = "GDATA_SPREADSHEET";
+ public static final String CARBON = "CARBON_DATASOURCE";
+ public static final String WEB = "WEB_CONFIG";
+ }
+
+ /**
+ * Constants related to RDBMS data source.
+ */
+ public static final class RDBMS {
+
+ private RDBMS() {
+ throw new AssertionError();
+ }
+
+ public static final String DRIVER = "org.wso2.ws.dataservice.driver";
+ public static final String PROTOCOL = "org.wso2.ws.dataservice.protocol";
+ public static final String USER = "org.wso2.ws.dataservice.user";
+ public static final String PASSWORD = "org.wso2.ws.dataservice.password";
+ public static final String QUERY_TIMEOUT = "org.wso2.ws.dataservice.query_timeout";
+ public static final String AUTO_COMMIT = "org.wso2.ws.dataservice.autocommit";
+ public static final String FETCH_DIRECTION = "org.wso2.ws.dataservice.fetch_direction";
+ public static final String FETCH_SIZE = "org.wso2.ws.dataservice.fetch_size";
+ public static final String MAX_FIELD_SIZE = "org.wso2.ws.dataservice.max_field_size";
+ public static final String MAX_ROWS = "org.wso2.ws.dataservice.max_rows";
+ public static final String FORCE_STORED_PROC = "org.wso2.ws.dataservice.force_stored_proc";
+ public static final String FORCE_JDBC_BATCH_REQUESTS = "org.wso2.ws.dataservice.force_jdbc_batch_requests";
+
+ public static final String TRANSACTION_ISOLATION = "org.wso2.ws.dataservice.transaction_isolation";
+ public static final String INITIAL_SIZE = "org.wso2.ws.dataservice.initial_size";
+ public static final String MAX_POOL_SIZE = "org.wso2.ws.dataservice.maxpoolsize";
+ public static final String MAX_IDLE = "org.wso2.ws.dataservice.max_idle";
+ public static final String MIN_POOL_SIZE = "org.wso2.ws.dataservice.minpoolsize";
+ public static final String MAX_WAIT = "org.wso2.ws.dataservice.max_wait";
+ public static final String VALIDATION_QUERY = "org.wso2.ws.dataservice.validation_query";
+ public static final String TEST_ON_BORROW = "org.wso2.ws.dataservice.test_on_borrow";
+ public static final String TEST_ON_RETURN = "org.wso2.ws.dataservice.test_on_return";
+ public static final String TEST_WHILE_IDLE = "org.wso2.ws.dataservice.test_while_idle";
+ public static final String TIME_BETWEEN_EVICTION_RUNS_MILLS = "org.wso2.ws.dataservice.time_between_eviction_runs_mills";
+ public static final String NUM_TESTS_PER_EVICTION_RUN = "org.wso2.ws.dataservice.num_test_per_eviction_run";
+ public static final String MIN_EVICTABLE_IDLE_TIME_MILLIS = "org.wso2.ws.dataservice.min_evictable_idle_time_millis";
+ public static final String REMOVE_ABANDONED = "org.wso2.ws.dataservice.remove_abandoned";
+ public static final String REMOVE_ABONDONED_TIMEOUT = "org.wso2.ws.dataservice.remove_abandoned_timeout";
+ public static final String LOG_ABANDONED = "org.wso2.ws.dataservice.log_abandoned";
+
+ public static final String XA_DATASOURCE_CLASS = "org.wso2.ws.dataservice.xa_datasource_class";
+ public static final String XA_DATASOURCE_PROPS = "org.wso2.ws.dataservice.xa_datasource_properties";
+ }
+
+
+ /**
+ * Constants related to Database configuration properties
+ */
+ public static final class DBCPConfig {
+
+ private DBCPConfig() {
+ throw new AssertionError();
+ }
+
+ public static final String DRIVER_CLASS_NAME = "driverClassName";
+ public static final String URL = "url";
+ public static final String USER = "user";
+ public static final String DEFAULT_TRANSACTION_ISOLATION = "defaultTransactionIsolation";
+ public static final String PASSWORD = "password";
+ public static final String INITIAL_SIZE = "initialSize";
+ public static final String MAX_ACTIVE = "maxActive";
+ public static final String MIN_IDLE = "minIdle";
+ public static final String MAX_IDLE = "maxIdle";
+ public static final String MAX_WAIT = "maxWait";
+ public static final String VALIDATION_QUERY = "validationQuery";
+ public static final String TEST_ON_BORROW = "testOnBorrow";
+ public static final String TEST_ON_RETURN = "testOnReturn";
+ public static final String TEST_WHILE_IDLE = "testWhileIdle";
+ public static final String TIME_BETWEEN_EVICTION_RUNS_MILLIS = "timeBetweenEvictionRunsMillis";
+ public static final String NUM_TESTS_PER_EVICTION_RUN = "numTestsPerEvictionRun";
+ public static final String MIN_EVICTABLE_IDLE_TIME_MILLS = "minEvictableIdleTimeMillis";
+ public static final String REMOVE_ABANDONED = "removeAbandoned";
+ public static final String REMOVE_ABANDONED_TIMEOUT = "removeAbandonedTimeout";
+ public static final String LOG_ABANDONED = "logAbandoned";
+
+ public static final String TRANSACTION_UNKNOWN = "TRANSACTION_UNKNOWN";
+ }
+
+
+ /**
+ * Constants related to JNDI data source.
+ */
+ public static final class JNDI {
+
+ private JNDI() {
+ throw new AssertionError();
+ }
+
+ public static final String INITIAL_CONTEXT_FACTORY = "jndi_context_class";
+ public static final String PROVIDER_URL = "jndi_provider_url";
+ public static final String RESOURCE_NAME = "jndi_resource_name";
+ public static final String USERNAME = "jndi_username";
+ public static final String PASSWORD = "jndi_password";
+ public static final String DATASOURCE = "jndi_datasource";
+ }
+
+ /**
+ * Constants related to google spreadsheet data source.
+ */
+ public static final class GSpread {
+
+ private GSpread() {
+ throw new AssertionError();
+ }
+
+ public static final String USERNAME = "gspread_username";
+ public static final String PASSWORD = "gspread_password";
+ public static final String VISIBILITY = "gspread_visibility";
+ public static final String DATASOURCE = "gspread_datasource";
+ public static final String WORKSHEET_NUMBER = "worksheetnumber";
+ public static final String STARTING_ROW = "startingrow";
+ public static final String MAX_ROW_COUNT = "maxrowcount";
+ public static final String HAS_HEADER = "hasheader";
+ }
+
+ /**
+ * Constants related to CSV data source.
+ */
+ public static final class CSV {
+
+ private CSV() {
+ throw new AssertionError();
+ }
+
+ public static final String COLUMN_SEPARATOR = "csv_columnseperator";
+ public static final String STARTING_ROW = "csv_startingrow";
+ public static final String MAX_ROW_COUNT = "csv_maxrowcount";
+ public static final String HAS_HEADER = "csv_hasheader";
+ public static final String DATASOURCE = "csv_datasource";
+ public static final String COLUMN_SEPERATOR = "columnseperator";
+ }
+
+ /**
+ * Constants related to Excel data source.
+ */
+ public static final class Excel {
+
+ private Excel() {
+ throw new AssertionError();
+ }
+
+ public static final String DATASOURCE = "excel_datasource";
+ public static final String WORKBOOK_NAME = "workbookname";
+ public static final String STARTING_ROW = "startingrow";
+ public static final String MAX_ROW_COUNT = "maxrowcount";
+ public static final String HAS_HEADER = "hasheader";
+ }
+
+ /**
+ * Constants related to RDF data source.
+ */
+ public static final class RDF {
+
+ private RDF() {
+ throw new AssertionError();
+ }
+
+ public static final String DATASOURCE = "rdf_datasource";
+
+ }
+
+ /**
+ * Constants related to carbon data sources.
+ */
+ public static final class CarbonDatasource {
+
+ private CarbonDatasource() {
+ throw new AssertionError();
+ }
+
+ public static final String NAME = "carbon_datasource_name";
+ }
/**
* Constants related to web data sources.
*/
- public static final class WebDatasource {
+ public static final class WebDatasource {
private WebDatasource() {
throw new AssertionError();
@@ -449,86 +448,86 @@
public static final String QUERY_VARIABLE = "scraperVariable";
}
- /**
- * Constants which represents the element/attribute names of a dbs file.
- */
- public static final class DBSFields {
-
- private DBSFields() {
- throw new AssertionError();
- }
-
- public static final String DATA = "data";
- public static final String CONFIG = "config";
- public static final String QUERY = "query";
- public static final String OPERATION = "operation";
- public static final String RESOURCE = "resource";
- public static final String ID = "id";
- public static final String SQL = "sql";
- public static final String DIALECT = "dialect";
- public static final String SPARQL = "sparql";
- public static final String SCRAPER_VARIABLE = "scraperVariable";
- public static final String EXCEL = "excel";
- public static final String GSPREAD = "gspread";
- public static final String RESULT = "result";
- public static final String ROW_NAME = "rowName";
- public static final String ELEMENT = "element";
- public static final String ATTRIBUTE = "attribute";
- public static final String NAME = "name";
- public static final String SERVICE_GROUP = "serviceGroup";
- public static final String CALL_QUERY = "call-query";
- public static final String CALL_QUERY_GROUP = "call-query-group";
- public static final String HREF = "href";
- public static final String COLUMN = "column";
- public static final String XSD_TYPE = "xsdType";
- public static final String OUTPUT_TYPE = "outputType";
- public static final String RDF_REF_URI = "rdf-ref-uri";
- public static final String RDF_BASE_URI = "rdfBaseURI";
- public static final String RESULT_TYPE_RDF = "rdf";
- public static final String RESULT_TYPE_XML = "xml";
- public static final String TYPE = "type";
- public static final String SQL_TYPE = "sqlType";
- public static final String PARAM = "param";
- public static final String PARAM_TYPE = "paramType";
- public static final String ORDINAL = "ordinal";
- public static final String WITH_PARAM = "with-param";
- public static final String QUERY_PARAM = "query-param";
- public static final String VALUE = "value";
- public static final String ENABLE_BATCH_REQUESTS = "enableBatchRequests";
- public static final String ENABLE_BOXCARRING = "enableBoxcarring";
- public static final String DISABLE_STREAMING = "disableStreaming";
- public static final String RETURN_REQUEST_STATUS = "returnRequestStatus";
- public static final String SERVICE_STATUS = "serviceStatus";
- public static final String BASE_URI = "baseURI";
- public static final String USE_CONFIG = "useConfig";
- public static final String DESCRIPTION = "description";
- public static final String EMPTY_PARAM_FIX = "emptyParamFix";
- public static final String EVENT_TRIGGER = "event-trigger";
- public static final String XA_DATASOURCE = "xa-datasource";
- public static final String PROPERTY = "property";
- public static final String PROPERTIES = "properties";
- public static final String LANGUAGE = "language";
- public static final String EXPRESSION = "expression";
- public static final String TARGET_TOPIC = "target-topic";
- public static final String SUBSCRIPTIONS = "subscriptions";
- public static final String SUBSCRIPTION = "subscription";
- public static final String INPUT_EVENT_TRIGGER = "input-event-trigger";
- public static final String OUTPUT_EVENT_TRIGGER = "output-event-trigger";
- public static final String DEFAULT_NAMESPACE = "defaultNamespace";
- public static final String XSLT_PATH = "xsltPath";
- public static final String DEFAULT_VALUE = "defaultValue";
- public static final String REQUIRED_ROLES = "requiredRoles";
- public static final String VALIDATE_LENGTH = "validateLength";
- public static final String MINIMUM = "minimum";
- public static final String MAXIMUM = "maximum";
- public static final String VALIDATE_PATTERN = "validatePattern";
- public static final String PATTERN = "pattern";
- public static final String VALIDATE_LONG_RANGE = "validateLongRange";
- public static final String VALIDATE_DOUBLE_RANGE = "validateDoubleRange";
- public static final String VALIDATE_CUSTOM = "validateCustom";
- public static final String CLASS = "class";
- public static final String PATH = "path";
- public static final String METHOD = "method";
+ /**
+ * Constants which represents the element/attribute names of a dbs file.
+ */
+ public static final class DBSFields {
+
+ private DBSFields() {
+ throw new AssertionError();
+ }
+
+ public static final String DATA = "data";
+ public static final String CONFIG = "config";
+ public static final String QUERY = "query";
+ public static final String OPERATION = "operation";
+ public static final String RESOURCE = "resource";
+ public static final String ID = "id";
+ public static final String SQL = "sql";
+ public static final String DIALECT = "dialect";
+ public static final String SPARQL = "sparql";
+ public static final String SCRAPER_VARIABLE = "scraperVariable";
+ public static final String EXCEL = "excel";
+ public static final String GSPREAD = "gspread";
+ public static final String RESULT = "result";
+ public static final String ROW_NAME = "rowName";
+ public static final String ELEMENT = "element";
+ public static final String ATTRIBUTE = "attribute";
+ public static final String NAME = "name";
+ public static final String SERVICE_GROUP = "serviceGroup";
+ public static final String CALL_QUERY = "call-query";
+ public static final String CALL_QUERY_GROUP = "call-query-group";
+ public static final String HREF = "href";
+ public static final String COLUMN = "column";
+ public static final String XSD_TYPE = "xsdType";
+ public static final String OUTPUT_TYPE = "outputType";
+ public static final String RDF_REF_URI = "rdf-ref-uri";
+ public static final String RDF_BASE_URI = "rdfBaseURI";
+ public static final String RESULT_TYPE_RDF = "rdf";
+ public static final String RESULT_TYPE_XML = "xml";
+ public static final String TYPE = "type";
+ public static final String SQL_TYPE = "sqlType";
+ public static final String PARAM = "param";
+ public static final String PARAM_TYPE = "paramType";
+ public static final String ORDINAL = "ordinal";
+ public static final String WITH_PARAM = "with-param";
+ public static final String QUERY_PARAM = "query-param";
+ public static final String VALUE = "value";
+ public static final String ENABLE_BATCH_REQUESTS = "enableBatchRequests";
+ public static final String ENABLE_BOXCARRING = "enableBoxcarring";
+ public static final String DISABLE_STREAMING = "disableStreaming";
+ public static final String RETURN_REQUEST_STATUS = "returnRequestStatus";
+ public static final String SERVICE_STATUS = "serviceStatus";
+ public static final String BASE_URI = "baseURI";
+ public static final String USE_CONFIG = "useConfig";
+ public static final String DESCRIPTION = "description";
+ public static final String EMPTY_PARAM_FIX = "emptyParamFix";
+ public static final String EVENT_TRIGGER = "event-trigger";
+ public static final String XA_DATASOURCE = "xa-datasource";
+ public static final String PROPERTY = "property";
+ public static final String PROPERTIES = "properties";
+ public static final String LANGUAGE = "language";
+ public static final String EXPRESSION = "expression";
+ public static final String TARGET_TOPIC = "target-topic";
+ public static final String SUBSCRIPTIONS = "subscriptions";
+ public static final String SUBSCRIPTION = "subscription";
+ public static final String INPUT_EVENT_TRIGGER = "input-event-trigger";
+ public static final String OUTPUT_EVENT_TRIGGER = "output-event-trigger";
+ public static final String DEFAULT_NAMESPACE = "defaultNamespace";
+ public static final String XSLT_PATH = "xsltPath";
+ public static final String DEFAULT_VALUE = "defaultValue";
+ public static final String REQUIRED_ROLES = "requiredRoles";
+ public static final String VALIDATE_LENGTH = "validateLength";
+ public static final String MINIMUM = "minimum";
+ public static final String MAXIMUM = "maximum";
+ public static final String VALIDATE_PATTERN = "validatePattern";
+ public static final String PATTERN = "pattern";
+ public static final String VALIDATE_LONG_RANGE = "validateLongRange";
+ public static final String VALIDATE_DOUBLE_RANGE = "validateDoubleRange";
+ public static final String VALIDATE_CUSTOM = "validateCustom";
+ public static final String CLASS = "class";
+ public static final String PATH = "path";
+ public static final String METHOD = "method";
public static final String WEB = "web";
public static final String RDF = "RDF";
public static final String RDF_DESCRIPTION = "Description";
@@ -549,186 +548,206 @@
public static final String ENABLE_DTP = "enableDTP";
public static final String TRANSACTION_MANAGER_JNDI_NAME = "txManagerJNDIName";
public static final String USE_COLUMN_NUMBERS = "useColumnNumbers";
- }
-
- /**
- * Event-trigger languages.
- */
- public static final class EventTriggerLanguages {
-
- private EventTriggerLanguages() {
- throw new AssertionError();
- }
-
- public static final String XPATH = "XPath";
- }
-
- /**
- * Service status values.
- */
- public static final class ServiceStatusValues {
-
- private ServiceStatusValues() {
- throw new AssertionError();
- }
-
- public static final String ACTIVE = "active";
- public static final String INACTIVE = "inactive";
- }
-
- /**
- * GSpread visibility values.
- */
- public static final class GSpreadVisibility {
-
- private GSpreadVisibility() {
- throw new AssertionError();
- }
-
- public static final String PUBLIC = "public";
- public static final String PRIVATE = "private";
- }
-
- /**
- * List of RDBMS engines.
- */
+ }
+
+ /**
+ * Event-trigger languages.
+ */
+ public static final class EventTriggerLanguages {
+
+ private EventTriggerLanguages() {
+ throw new AssertionError();
+ }
+
+ public static final String XPATH = "XPath";
+ }
+
+ /**
+ * Service status values.
+ */
+ public static final class ServiceStatusValues {
+
+ private ServiceStatusValues() {
+ throw new AssertionError();
+ }
+
+ public static final String ACTIVE = "active";
+ public static final String INACTIVE = "inactive";
+ }
+
+ /**
+ * GSpread visibility values.
+ */
+ public static final class GSpreadVisibility {
+
+ private GSpreadVisibility() {
+ throw new AssertionError();
+ }
+
+ public static final String PUBLIC = "public";
+ public static final String PRIVATE = "private";
+ }
+
+ /**
+ * List of RDBMS engines.
+ */
public static final class RDBMSEngines {
-
- private RDBMSEngines() {
- throw new AssertionError();
- }
-
- public static final String MYSQL = "mysql";
- public static final String DERBY = "derby";
- public static final String MSSQL = "mssqlserver";
- public static final String ORACLE = "oracle";
- public static final String DB2 = "db2";
- public static final String HSQLDB = "hsqldb";
- public static final String POSTGRESQL = "postgresql";
- public static final String SYBASE = "sybase";
- public static final String H2 = "h2";
- public static final String INFORMIX_SQLI = "informix-sqli";
- public static final String GENERIC = "Generic";
- }
-
+
+ private RDBMSEngines() {
+ throw new AssertionError();
+ }
+
+ public static final String MYSQL = "mysql";
+ public static final String DERBY = "derby";
+ public static final String MSSQL = "mssqlserver";
+ public static final String ORACLE = "oracle";
+ public static final String DB2 = "db2";
+ public static final String HSQLDB = "hsqldb";
+ public static final String POSTGRESQL = "postgresql";
+ public static final String SYBASE = "sybase";
+ public static final String H2 = "h2";
+ public static final String INFORMIX_SQLI = "informix-sqli";
+ public static final String GENERIC = "Generic";
+ }
+
/**
- * Query parameter types.
+ * Query parameter types.
*/
public static final class QueryParamTypes {
-
- private QueryParamTypes() {
- throw new AssertionError();
- }
-
- public static final String SCALAR = "SCALAR";
- public static final String ARRAY = "ARRAY";
+
+ private QueryParamTypes() {
+ throw new AssertionError();
+ }
+
+ public static final String SCALAR = "SCALAR";
+ public static final String ARRAY = "ARRAY";
}
-
+
/**
* Query types.
*/
public static final class QueryTypes {
-
- private QueryTypes() {
- throw new AssertionError();
- }
-
- public static final String IN = "IN";
- public static final String OUT = "OUT";
- public static final String INOUT = "INOUT";
+
+ private QueryTypes() {
+ throw new AssertionError();
+ }
+
+ public static final String IN = "IN";
+ public static final String OUT = "OUT";
+ public static final String INOUT = "INOUT";
}
-
+
/**
* Boxcarring operation names.
*/
public static final class BoxcarringOps {
-
- private BoxcarringOps() {
- throw new AssertionError();
- }
-
- public static final String BEGIN_BOXCAR = "begin_boxcar";
- public static final String END_BOXCAR = "end_boxcar";
- public static final String ABORT_BOXCAR = "abort_boxcar";
+
+ private BoxcarringOps() {
+ throw new AssertionError();
+ }
+
+ public static final String BEGIN_BOXCAR = "begin_boxcar";
+ public static final String END_BOXCAR = "end_boxcar";
+ public static final String ABORT_BOXCAR = "abort_boxcar";
}
-
+
/**
- * Elements used in event notifications.
+ * Elements used in event notifications.
*/
public static final class EventNotification {
-
- private EventNotification() {
- throw new AssertionError();
- }
-
- public static final String MESSAGE_WRAPPER = "data-services-event";
- public static final String SERVICE_NAME = "service-name";
- public static final String QUERY_ID = "query-id";
- public static final String TIME = "time";
- public static final String CONTENT = "content";
+
+ private EventNotification() {
+ throw new AssertionError();
+ }
+
+ public static final String MESSAGE_WRAPPER = "data-services-event";
+ public static final String SERVICE_NAME = "service-name";
+ public static final String QUERY_ID = "query-id";
+ public static final String TIME = "time";
+ public static final String CONTENT = "content";
}
-
+
/**
- * Values for advanced sql query properties.
+ * Values for advanced sql query properties.
*/
public static final class AdvancedSQLProps {
-
- private AdvancedSQLProps() {
- throw new AssertionError();
- }
-
- public static final String FETCH_DIRECTION_FORWARD = "forward";
- public static final String FETCH_DIRECTION_REVERSE = "reverse";
+
+ private AdvancedSQLProps() {
+ throw new AssertionError();
+ }
+
+ public static final String FETCH_DIRECTION_FORWARD = "forward";
+ public static final String FETCH_DIRECTION_REVERSE = "reverse";
}
-
+
/**
* SQL query types that are non-stored procedures.
*/
- public static final String[] SQL_NORMAL_QUERY_TYPES = { "SELECT", "INSERT",
- "UPDATE", "DELETE", "CREATE", "ALTER" };
-
+ public static final String[] SQL_NORMAL_QUERY_TYPES = {"SELECT", "INSERT",
+ "UPDATE", "DELETE", "CREATE", "ALTER"};
+
/**
* JDBC URL prefixes used to identify the RDBMS engine from the driver.
*/
public static final class JDBCDriverPrefixes {
-
- private JDBCDriverPrefixes() {
- throw new AssertionError();
- }
-
- public static final String MYSQL = "jdbc:mysql";
- public static final String DERBY = "jdbc:derby";
- public static final String MSSQL = "jdbc:sqlserver";
- public static final String ORACLE = "jdbc:oracle";
- public static final String DB2 = "jdbc:db2";
- public static final String HSQLDB = "jdbc:hsqldb";
- public static final String POSTGRESQL = "jdbc:postgresql";
- public static final String SYBASE = "jdbc:sybase";
- public static final String H2 = "jdbc:h2";
- public static final String INFORMIX= "jdbc:informix-sqli";
+
+ private JDBCDriverPrefixes() {
+ throw new AssertionError();
+ }
+
+ public static final String MYSQL = "jdbc:mysql";
+ public static final String DERBY = "jdbc:derby";
+ public static final String MSSQL = "jdbc:sqlserver";
+ public static final String ORACLE = "jdbc:oracle";
+ public static final String DB2 = "jdbc:db2";
+ public static final String HSQLDB = "jdbc:hsqldb";
+ public static final String POSTGRESQL = "jdbc:postgresql";
+ public static final String SYBASE = "jdbc:sybase";
+ public static final String H2 = "jdbc:h2";
+ public static final String INFORMIX = "jdbc:informix-sqli";
}
-
+
/**
* Represent XADatasource class for a driver
*/
public static final class XAJDBCDriverClasses {
-
- private XAJDBCDriverClasses() {
- throw new AssertionError();
- }
-
- public static final String MYSQL = "com.mysql.jdbc.jdbc2.optional.MysqlXADataSource";
- public static final String DERBY = "org.apache.derby.jdbc.EmbeddedXADataSource";
- public static final String MSSQL = "com.microsoft.sqlserver.jdbc.SQLServerXADataSource";
- public static final String ORACLE = "oracle.jdbc.xa.client.OracleXADataSource";
- public static final String DB2 = "com.ibm.db2.jcc.DB2XADataSource";
- public static final String HSQLDB = "org.hsqldb.jdbc.pool.JDBCXADataSource";
- public static final String POSTGRESQL = "org.postgresql.xa.PGXADataSource";
- public static final String SYBASE = "com.sybase.jdbc3.jdbc.SybXADataSource";
- public static final String H2 = "org.h2.jdbcx.JdbcDataSource";
- public static final String INFORMIX= "com.informix.jdbc.jdbc2.optional.InformixXADataSource";
+
+ private XAJDBCDriverClasses() {
+ throw new AssertionError();
+ }
+
+ public static final String MYSQL = "com.mysql.jdbc.jdbc2.optional.MysqlXADataSource";
+ public static final String DERBY = "org.apache.derby.jdbc.EmbeddedXADataSource";
+ public static final String MSSQL = "com.microsoft.sqlserver.jdbc.SQLServerXADataSource";
+ public static final String ORACLE = "oracle.jdbc.xa.client.OracleXADataSource";
+ public static final String DB2 = "com.ibm.db2.jcc.DB2XADataSource";
+ public static final String HSQLDB = "org.hsqldb.jdbc.pool.JDBCXADataSource";
+ public static final String POSTGRESQL = "org.postgresql.xa.PGXADataSource";
+ public static final String SYBASE = "com.sybase.jdbc3.jdbc.SybXADataSource";
+ public static final String H2 = "org.h2.jdbcx.JdbcDataSource";
+ public static final String INFORMIX = "com.informix.jdbc.jdbc2.optional.InformixXADataSource";
+ }
+
+ public static final class DSTaskConstants {
+ private DSTaskConstants() {
+ throw new AssertionError();
+ }
+
+ public static final String BACK_END_URL = "Url";
+ public static final String TASK_NAME = "TaskName";
+ public static final String CLASS_NAME = "ClassName";
+ public static final String JOB_GROUP = "DS_JOB_GROUP";
+ public static final String JOB_DATA_MAP = "JobDataMap";
+ public static final String OPERATION_NAME = "Operation";
+ public static final String DATA_SERVICE_NAME = "DataServiceName";
+ public static final String CONFIGURATION_CONTEXT = "ConfigurationContext";
+ public static final String CARBON_TASK_SCHEDULER = "CARBON_TASK_SCHEDULER";
+ public static final String CARBON_TASK_REPOSITORY = "CARBON_TASK_REPOSITORY";
+ public static final String EXCEPTION = "task.exception";
+ public static final String DISABLE_ADD_TASK = "disableAddTask";
+ public static final String TASK_CLASS =
+ "org.wso2.carbon.dataservices.taskscheduler.SchedulingTask";
}
-
}
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/SchedulingTask.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/SchedulingTask.java?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/SchedulingTask.java (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/SchedulingTask.java Tue Aug 16 00:01:42 2011
@@ -28,7 +28,7 @@
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.context.MessageContext;
import org.apache.synapse.task.Task;
-import org.wso2.carbon.dataservices.taskscheduler.constants.TaskSchedulerConstants;
+import org.wso2.carbon.dataservices.common.DBConstants;
import java.util.Map;
@@ -46,9 +46,9 @@
* This method implements the logic associated with the execution of the required synapse task.
*/
public void execute() {
- String operationName = (String) jobDataMap.get(TaskSchedulerConstants.OPERATION_NAME);
- String serviceName = (String) jobDataMap.get(TaskSchedulerConstants.DATA_SERVICE_NAME);
- String backendServerUrl = (String) jobDataMap.get(TaskSchedulerConstants.BACK_END_URL);
+ String operationName = (String) jobDataMap.get(DBConstants.DSTaskConstants.OPERATION_NAME);
+ String serviceName = (String) jobDataMap.get(DBConstants.DSTaskConstants.DATA_SERVICE_NAME);
+ String backendServerUrl = (String) jobDataMap.get(DBConstants.DSTaskConstants.BACK_END_URL);
ServiceClient serviceClient;
try {
serviceClient = new ServiceClient();
Added: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskProperty.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskProperty.java?pathrev=111659
==============================================================================
--- (empty file)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskProperty.java Tue Aug 16 00:01:42 2011
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.wso2.carbon.dataservices.taskscheduler;
+
+public class TaskProperty {
+
+ private String name;
+ private Object value;
+
+ public TaskProperty() {}
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+}
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulerUtils.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulerUtils.java?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulerUtils.java (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulerUtils.java Tue Aug 16 00:01:42 2011
@@ -18,20 +18,19 @@
*/
package org.wso2.carbon.dataservices.taskscheduler;
+import org.apache.axiom.om.OMElement;
import org.w3c.dom.*;
import org.wso2.carbon.dataservices.taskscheduler.exception.DSTaskSchedulerException;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
+import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.io.IOException;
import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
public class TaskSchedulerUtils {
@@ -42,6 +41,7 @@
private static final String NAME = "name";
private static final String ID = "id";
private static final String RESULT = "result";
+ private static final String WITH_PARAM = "with-param";
/**
* Retrieves the list of names of the in only dataservices operations specified in the dbs.
@@ -50,9 +50,9 @@
* @return list of names of the in only dataservice operations.
* @throws DSTaskSchedulerException DSTaskSchedulerException
*/
- public static List<String> getInOnlyOperationsList(String dbsContent) throws
+ public static List<String> getOutOnlyOperationsList(String dbsContent) throws
DSTaskSchedulerException {
- List<String> inOnlyOperations = new ArrayList<String>();
+ List<String> outOnlyOperations = new ArrayList<String>();
Document doc = getDocument(dbsContent);
Element root = doc.getDocumentElement();
NodeList elements = root.getChildNodes();
@@ -61,17 +61,19 @@
for (int i = 0; i < elements.getLength(); i++) {
Node n = elements.item(i);
- if (OPERATION.equals(n.getNodeName())) {
+ if (TaskSchedulerUtils.OPERATION.equals(n.getNodeName())) {
NamedNodeMap attributes = n.getAttributes();
if (attributes != null) {
- String opName = attributes.getNamedItem(NAME).getFirstChild().getNodeValue();
+ String opName = attributes.getNamedItem(TaskSchedulerUtils.NAME).
+ getFirstChild().getNodeValue();
operations.put(opName, n);
}
}
- if (QUERY.equals(n.getNodeName())) {
+ if (TaskSchedulerUtils.QUERY.equals(n.getNodeName())) {
NamedNodeMap attributes = n.getAttributes();
if (attributes != null) {
- String queryName = attributes.getNamedItem(ID).getFirstChild().getNodeValue();
+ String queryName = attributes.getNamedItem(TaskSchedulerUtils.ID).
+ getFirstChild().getNodeValue();
queries.put(queryName, n);
}
}
@@ -81,37 +83,59 @@
NodeList children = entry.getValue().getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
- if (CALL_QUERY.equals(child.getNodeName())) {
- String queryName =
- child.getAttributes().getNamedItem(HREF).getFirstChild().getNodeValue();
- if (isInOnlyOperation(queryName, queries)) {
- inOnlyOperations.add(entry.getKey());
+ if (TaskSchedulerUtils.CALL_QUERY.equals(child.getNodeName())) {
+ String queryName = child.getAttributes().getNamedItem(TaskSchedulerUtils.HREF).
+ getFirstChild().getNodeValue();
+ if (!hasInputParams(entry.getKey(), operations) && hasResult(queryName, queries)) {
+ outOnlyOperations.add(entry.getKey());
}
}
}
}
- return inOnlyOperations;
+ return outOnlyOperations;
}
/**
- * Checks whether a particular operation is an in only dataservice operation.
+ * Checks whether a particular data service query has a result.
*
- * @param queryName name of the query associated with the processed dataservice operation
- * @param queries queries specified in the dbs file
- * @return boolean representing whether the operation is an in only one
+ * @param queryName name of the query associated with the processed dataservice operation.
+ * @param queries queries specified in the dbs file.
+ * @return boolean representing whether the data service query has a result.
*/
- private static boolean isInOnlyOperation(String queryName, Map<String, Node> queries) {
+ private static boolean hasResult(String queryName, Map<String, Node> queries) {
Node query = queries.get(queryName);
if (query != null) {
- NodeList querySubElements = query.getChildNodes();
- for (int i = 0; i < querySubElements.getLength(); i++) {
- Node n = querySubElements.item(i);
- if (RESULT.equals(n.getNodeName())) {
- return false;
+ NodeList subEls = query.getChildNodes();
+ for (int i = 0; i < subEls.getLength(); i++) {
+ Node n = subEls.item(i);
+ if (TaskSchedulerUtils.RESULT.equals(n.getNodeName())) {
+ return true;
}
}
}
- return true;
+ return false;
+ }
+
+ /**
+ * Checks whether a particular web service operation mapped into a data service query has input
+ * parameters.
+ *
+ * @param operationName Name of the web service operation to be processed.
+ * @param operations List of web service operations defined in the dbs.
+ * @return A boolean representing the existence of input parameters inside the operation.
+ */
+ private static boolean hasInputParams(String operationName, Map<String, Node> operations) {
+ Node operation = operations.get(operationName);
+ if (operation != null) {
+ NodeList subEls = operation.getChildNodes();
+ for (int i = 0; i < subEls.getLength(); i++) {
+ Node n = subEls.item(i);
+ if (TaskSchedulerUtils.WITH_PARAM.equals(n.getNodeName())) {
+ return true;
+ }
+ }
+ }
+ return false;
}
/**
@@ -141,4 +165,17 @@
return doc;
}
+ public static Map<String, Object> getAdditionalTaskProperties(OMElement rootEl, String targetNamespace) {
+ Map<String, Object> props = new HashMap<String, Object>();
+ OMElement propsEl = rootEl.getFirstChildWithName(new QName(targetNamespace, "properties"));
+ Iterator propEls = propsEl.getChildrenWithLocalName("property");
+ while (propEls.hasNext()) {
+ OMElement propEl = (OMElement) propEls.next();
+ props.put(propEl.getFirstChildWithName(new QName(targetNamespace, "name")).getText(),
+ propEl.getFirstChildWithName(new QName(targetNamespace, "value")).getText());
+ }
+
+ return props;
+ }
+
}
\ No newline at end of file
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulingJob.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulingJob.java?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulingJob.java (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulingJob.java Tue Aug 16 00:01:42 2011
@@ -23,7 +23,7 @@
import org.apache.commons.logging.LogFactory;
import org.apache.synapse.task.Task;
import org.quartz.*;
-import org.wso2.carbon.dataservices.taskscheduler.constants.TaskSchedulerConstants;
+import org.wso2.carbon.dataservices.common.DBConstants;
/**
* This class implements the execution of a particular job
@@ -48,7 +48,7 @@
}
JobDataMap jobDataMap = jobExecutionContext.getMergedJobDataMap();
- String jobClassName = (String) jobDataMap.get(TaskSchedulerConstants.CLASS_NAME);
+ String jobClassName = (String) jobDataMap.get(DBConstants.DSTaskConstants.CLASS_NAME);
try {
task = (Task) getClass().getClassLoader().loadClass(jobClassName).newInstance();
@@ -62,7 +62,7 @@
}
ConfigurationContext configurationContext = (ConfigurationContext) jobDataMap.get(
- TaskSchedulerConstants.CONFIGURATION_CONTEXT);
+ DBConstants.DSTaskConstants.CONFIGURATION_CONTEXT);
log.info("Task has been successfully executed");
@@ -74,8 +74,8 @@
TaskSchedulingManager taskSchedulingManager =
TaskSchedulingManager.getInstance();
taskSchedulingManager.deleteTaskDescription((String) jobDetail.getJobDataMap().get(
- TaskSchedulerConstants.TASK_NAME), (String) jobDetail.getJobDataMap().get(
- TaskSchedulerConstants.JOB_GROUP), configurationContext);
+ DBConstants.DSTaskConstants.TASK_NAME), (String) jobDetail.getJobDataMap().get(
+ DBConstants.DSTaskConstants.JOB_GROUP), configurationContext);
}
} catch (ClassNotFoundException e) {
log.error("Job Class Not Found ", e);
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulingManager.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulingManager.java?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulingManager.java (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/TaskSchedulingManager.java Tue Aug 16 00:01:42 2011
@@ -35,10 +35,9 @@
public class TaskSchedulingManager {
private static final Log log = LogFactory.getLog(TaskSchedulingManager.class);
-
private static TaskSchedulingManager thisInstance = new TaskSchedulingManager();
- public static TaskSchedulingManager getInstance() {
+ public static synchronized TaskSchedulingManager getInstance() {
return thisInstance;
}
Deleted: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/internal/TaskSchedulerBundleActivator.java
URL: http://wso2.org/svn/browse/wso2/None?pathrev=111658
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/internal/TaskSchedulerServiceComponent.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/internal/TaskSchedulerServiceComponent.java?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/internal/TaskSchedulerServiceComponent.java (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/internal/TaskSchedulerServiceComponent.java Tue Aug 16 00:01:42 2011
@@ -27,7 +27,7 @@
import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.dataservices.taskscheduler.multitenancy.TaskSchedulerInitializer;
-import org.wso2.carbon.dataservices.taskscheduler.services.TaskMetaDataProviderService;
+import org.wso2.carbon.dataservices.taskscheduler.services.DSTaskMetaDataProviderService;
import org.wso2.carbon.dataservices.taskscheduler.services.TaskManagementAdminService;
import org.wso2.carbon.task.JobMetaDataProviderServiceHandler;
import org.wso2.carbon.task.TaskManagementServiceHandler;
@@ -67,11 +67,8 @@
log.debug("Installing Task Scheduler Components");
BundleContext bundleContext = componentContext.getBundleContext();
- TaskSchedulerBundleActivator bundleActivator=new TaskSchedulerBundleActivator();
- bundleActivator.start(bundleContext);
-
bundleContext.registerService(JobMetaDataProviderService.class.getName(),
- new TaskMetaDataProviderService(), null);
+ new DSTaskMetaDataProviderService(), null);
bundleContext.registerService(TaskManagementService.class.getName(),
new TaskManagementAdminService(), null);
bundleContext.registerService(Axis2ConfigurationContextObserver.class.getName(),
@@ -179,4 +176,5 @@
ConfigurationContextService configurationContextService) {
this.configurationContext = null;
}
+
}
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/multitenancy/TaskSchedulerInitializer.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/multitenancy/TaskSchedulerInitializer.java?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/multitenancy/TaskSchedulerInitializer.java (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/multitenancy/TaskSchedulerInitializer.java Tue Aug 16 00:01:42 2011
@@ -21,7 +21,7 @@
import org.apache.axis2.context.ConfigurationContext;
import org.apache.synapse.task.TaskDescriptionRepository;
import org.apache.synapse.task.TaskScheduler;
-import org.wso2.carbon.dataservices.taskscheduler.constants.TaskSchedulerConstants;
+import org.wso2.carbon.dataservices.common.DBConstants;
import org.wso2.carbon.task.JobMetaDataProviderServiceHandler;
import org.wso2.carbon.task.TaskManagementServiceHandler;
import org.wso2.carbon.task.TaskManager;
@@ -61,12 +61,12 @@
* Initializing the Task Scheduler
*/
TaskScheduler taskScheduler = (TaskScheduler) configurationContext.getProperty(
- TaskSchedulerConstants.CARBON_TASK_SCHEDULER);
+ DBConstants.DSTaskConstants.CARBON_TASK_SCHEDULER);
if (taskScheduler == null) {
taskScheduler = new TaskScheduler(TaskManager.CARBON_TASK_SCHEDULER);
taskScheduler.init(null);
configurationContext.setProperty(
- TaskSchedulerConstants.CARBON_TASK_SCHEDULER, taskScheduler);
+ DBConstants.DSTaskConstants.CARBON_TASK_SCHEDULER, taskScheduler);
} else if (!taskScheduler.isInitialized()) {
taskScheduler.init(null);
}
@@ -76,11 +76,11 @@
*/
TaskDescriptionRepository taskDescriptionRepository =
(TaskDescriptionRepository) configurationContext.getProperty(
- TaskSchedulerConstants.CARBON_TASK_REPOSITORY);
+ DBConstants.DSTaskConstants.CARBON_TASK_REPOSITORY);
if (taskDescriptionRepository == null) {
taskDescriptionRepository = new TaskDescriptionRepository();
configurationContext.setProperty(
- TaskSchedulerConstants.CARBON_TASK_REPOSITORY, taskDescriptionRepository);
+ DBConstants.DSTaskConstants.CARBON_TASK_REPOSITORY, taskDescriptionRepository);
}
}
Copied: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/DSTaskMetaDataProviderService.java (from r111134, /branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/TaskMetaDataProviderService.java)
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/DSTaskMetaDataProviderService.java?rev=111659&r1=111134&r2=111659&view=diff
==============================================================================
--- /branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/TaskMetaDataProviderService.java (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/DSTaskMetaDataProviderService.java Tue Aug 16 00:01:42 2011
@@ -18,17 +18,17 @@
*/
package org.wso2.carbon.dataservices.taskscheduler.services;
+import org.wso2.carbon.dataservices.common.DBConstants;
import org.wso2.carbon.dataservices.taskscheduler.TaskSchedulingJob;
-import org.wso2.carbon.dataservices.taskscheduler.constants.TaskSchedulerConstants;
import org.wso2.carbon.task.services.JobMetaDataProviderService;
/**
- * TaskMetaDataProviderService class implements the
+ * DSTaskMetaDataProviderService class implements the
* org.wso2.carbon.task.services.JobMetaDataProviderService
* interface and acts as the meta data provider corresponds to the
* tasks that being scheduled.
*/
-public class TaskMetaDataProviderService implements JobMetaDataProviderService {
+public class DSTaskMetaDataProviderService implements JobMetaDataProviderService {
/**
* Returns the class name of the task implementation
@@ -45,7 +45,7 @@
* @return Job Group Name
*/
public String getJobGroup() {
- return TaskSchedulerConstants.JOB_GROUP;
+ return DBConstants.DSTaskConstants.JOB_GROUP;
}
/**
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/TaskManagementAdminService.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/TaskManagementAdminService.java?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/TaskManagementAdminService.java (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/TaskManagementAdminService.java Tue Aug 16 00:01:42 2011
@@ -22,7 +22,6 @@
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.util.AXIOMUtil;
import org.apache.axis2.AxisFault;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.Parameter;
@@ -36,15 +35,14 @@
import org.wso2.carbon.dataservices.common.DBConstants;
import org.wso2.carbon.dataservices.core.DBDeployer;
import org.wso2.carbon.dataservices.core.engine.DataService;
+import org.wso2.carbon.dataservices.taskscheduler.TaskProperty;
import org.wso2.carbon.dataservices.taskscheduler.TaskSchedulerUtils;
import org.wso2.carbon.dataservices.taskscheduler.TaskSchedulingManager;
-import org.wso2.carbon.dataservices.taskscheduler.constants.TaskSchedulerConstants;
import org.wso2.carbon.dataservices.taskscheduler.exception.DSTaskSchedulerException;
import org.wso2.carbon.task.TaskManagementException;
import org.wso2.carbon.task.TaskManager;
import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
@@ -59,63 +57,43 @@
* Further it implements all the task management functionality required for
* the execution of a particular task.
*/
-public class TaskManagementAdminService extends AbstractAdmin implements
- TaskManagementService {
+public class TaskManagementAdminService extends AbstractAdmin implements TaskManagementService {
- private Map<String, Object> jobDataMap;
- private TaskSchedulingManager schedulingManager = TaskSchedulingManager.getInstance();
private static final String TASK_EXTENSION_NS = "http://www.wso2.org/tasks";
private static final OMFactory FACTORY = OMAbstractFactory.getOMFactory();
private static final OMNamespace TASK_OM_NAMESPACE = FACTORY.createOMNamespace(
TASK_EXTENSION_NS, "task");
+ private static final OMNamespace TASK_PROPERTY_NAMESPACE =
+ OMAbstractFactory.getOMFactory().createOMNamespace(TASK_EXTENSION_NS, "properties");
+ private static final OMNamespace ROOT_ELEMENT_NAMESPACE =
+ OMAbstractFactory.getOMFactory().createOMNamespace(TASK_EXTENSION_NS, "data");
+ private static TaskSchedulingManager schedulingManager = TaskSchedulingManager.getInstance();
+ private Map<String, Object> jobDataMap;
private static final Log log = LogFactory.getLog(TaskManagementAdminService.class);
/**
- * Passing the Task Description to scheduling manager to actually add it to the Task
- * Description Repository.
+ * Takes in the task description to be added serizlied into an OMElement and calls the
+ * addTaskDescription method.
*
- * @param taskDescription TaskDescription
+ * @param dataEl Task description serialized into an OMElement.
+ * @throws AxisFault axisFault.
*/
- @SuppressWarnings("unchecked")
- public void addTaskDescription(TaskDescription taskDescription) {
- if (log.isDebugEnabled()) {
- log.debug("Adding the Task " + taskDescription.getName());
- }
- try {
- schedulingManager.scheduleTask(taskDescription, jobDataMap, this.getConfigContext());
- } catch (Exception e) {
- log.error("Cannot add the task " + taskDescription.getName(), e);
- }
- }
-
- public void addTaskDescriptionAsString(String taskElementString, String serviceName,
- String operationName, String backendServerUrl) throws
- AxisFault {
- OMElement taskElement = null;
+ public void addSerializedTaskDescription(OMElement dataEl) throws AxisFault {
TaskDescription taskDescription;
- if (log.isDebugEnabled()) {
- log.debug("Add TaskDescription - Get a Task configuration : " + taskElement);
- }
try {
- taskElement = AXIOMUtil.stringToOM(taskElementString);
- taskDescription = validateAndCreate(taskElement);
+ taskDescription = validateAndCreate(dataEl.getFirstChildWithName(
+ new QName(TASK_EXTENSION_NS, "task")));
if (taskDescription != null) {
- jobDataMap = new HashMap<String, Object>();
- jobDataMap.put(TaskSchedulerConstants.DATA_SERVICE_NAME, serviceName);
- jobDataMap.put(TaskSchedulerConstants.OPERATION_NAME, operationName);
- jobDataMap.put(TaskSchedulerConstants.BACK_END_URL, backendServerUrl);
- jobDataMap.put(TaskSchedulerConstants.CONFIGURATION_CONTEXT,
- this.getConfigContext());
-
+ Map<String, Object> props = TaskSchedulerUtils.getAdditionalTaskProperties(
+ dataEl, TASK_EXTENSION_NS);
+ props.put(DBConstants.DSTaskConstants.CONFIGURATION_CONTEXT, this.getConfigContext());
+ this.jobDataMap = new HashMap<String, Object>(props);
addTaskDescription(taskDescription);
} else {
String msg = "Task description cannot be null";
log.error(msg);
throw new AxisFault(msg);
}
- } catch (XMLStreamException e) {
- log.error(e);
- throw new AxisFault("Error while serializing the task description", e);
} catch (TaskManagementException e) {
log.error(e);
throw new AxisFault("Unable to crate task description", e);
@@ -123,68 +101,74 @@
}
/**
- * Indicating Task Scheduling manager to delete the task with the given task Name.
+ * Adds a particular task description to the task description repository.
*
- * @param taskName taskName
+ * @param taskDescription task description.
*/
- public void deleteTaskDescription(String taskName) {
+ @Override
+ public void addTaskDescription(TaskDescription taskDescription) {
if (log.isDebugEnabled()) {
- log.debug("Deleting the task " + taskName);
+ log.debug("Adding the Task " + taskDescription.getName());
}
try {
- schedulingManager.deleteTaskDescription(taskName, TaskSchedulerConstants.JOB_GROUP,
- this.getConfigContext());
+ schedulingManager.scheduleTask(taskDescription, jobDataMap, this.getConfigContext());
} catch (Exception e) {
- log.error("Cannot delete the task " + taskName, e);
+ log.error("Cannot add the task " + taskDescription.getName(), e);
}
}
/**
- * Notifying the Task Scheduling Manager to delete the previous Task Description from the
- * Task Description Repository and add the edited task.
+ * Deletes a particular task description which carries the given name.
*
- * @param taskDescription TaskDescription
+ * @param taskName task name.
*/
- public void editTaskDescription(TaskDescription taskDescription) {
- if (log.isDebugEnabled()) {
- log.debug("Editing the task " + taskDescription.getName());
+ public void deleteTaskDescription(String taskName) {
+ schedulingManager.deleteTaskDescription(taskName, DBConstants.DSTaskConstants.JOB_GROUP,
+ this.getConfigContext());
+ }
+
+ /**
+ * Takes in the edit task description as an OMElement and calls the editTaskDescription method.
+ *
+ * @param taskEl serialized task description into an OMElement.
+ * @throws AxisFault axisFault.
+ */
+ public void editSerializedTaskDescription(OMElement taskEl) throws AxisFault {
+ try {
+ TaskDescription taskDesc = validateAndCreate(taskEl);
+ editTaskDescription(taskDesc);
+ } catch (TaskManagementException e) {
+ throw new AxisFault("Unable to edit the task", e);
}
- if (schedulingManager.isContains(taskDescription.getName(), getConfigContext())) {
+ }
+
+ /**
+ * Edits and updates a particular task description.
+ *
+ * @param taskDescription task description carrying the modified values.
+ */
+ @Override
+ public void editTaskDescription(TaskDescription taskDescription) {
+ if (schedulingManager.isContains(taskDescription.getName(), this.getConfigContext())) {
schedulingManager.deleteTaskDescription(taskDescription.getName(),
- taskDescription.getGroup(), getConfigContext());
- schedulingManager.scheduleTask(taskDescription, null, getConfigContext());
+ taskDescription.getGroup(), configurationContext);
+ schedulingManager.scheduleTask(taskDescription, null, this.getConfigContext());
} else {
String msg = "Task " + taskDescription.getName() + "does not exist";
log.error(msg);
}
}
- public void editTaskDescriptionAsString(String taskElementString) throws AxisFault {
- try {
- OMElement taskElement = AXIOMUtil.stringToOM(taskElementString);
- if (log.isDebugEnabled()) {
- log.debug("Edit TaskDescription - Get a Task configuration :" + taskElement);
- }
- editTaskDescription(validateAndCreate(taskElement));
- } catch (XMLStreamException e) {
- log.error(e);
- throw new AxisFault("Error while converting the task content to string", e);
- } catch (TaskManagementException e) {
- log.error(e);
- throw new AxisFault("Error while editing the task", e);
- }
- }
-
/**
- * Returns the list of Task Descriptions that have been already added to the Task Description
- * Repository.
+ * Retrieves all existing task descriptions inside the task description repository.
*
- * @return A list of Task Descriptions
+ * @return a list of task descriptions.
*/
+ @Override
public List<TaskDescription> getAllTaskDescriptions() {
List<TaskDescription> taskDescriptions = new ArrayList<TaskDescription>();
Iterator<TaskDescription> iterator = schedulingManager.getAllTaskDescriptions(
- getConfigContext());
+ this.getConfigContext());
while (iterator.hasNext()) {
TaskDescription taskDescription = iterator.next();
@@ -198,61 +182,85 @@
return taskDescriptions;
}
- public String getAllTaskDescriptionsAsString() throws AxisFault {
- OMElement rootElement =
- OMAbstractFactory.getOMFactory().createOMElement(new QName(TASK_EXTENSION_NS,
- "taskExtension", "task"));
- try {
- List<TaskDescription> descriptions = getAllTaskDescriptions();
- for (TaskDescription taskDescription : descriptions) {
- if (taskDescription != null) {
- OMElement taskElement =
- TaskDescriptionSerializer.serializeTaskDescription(TASK_OM_NAMESPACE,
- taskDescription);
- validateTaskElement(taskElement);
- rootElement.addChild(taskElement);
- }
+ /**
+ * Retrieves all existing task descriptions serialized into an OMElement.
+ *
+ * @return OMElement carrying the serialized task descriptions.
+ * @throws AxisFault axisFault.
+ */
+ public OMElement getAllSerializedTaskDescriptions() throws AxisFault {
+ List<TaskDescription> tasks = getAllTaskDescriptions();
+ OMElement rootEl =
+ FACTORY.createOMElement(new QName(TASK_EXTENSION_NS, "tasks"));
+ for (TaskDescription taskDesc : tasks) {
+ if (taskDesc == null) {
+ throw new AxisFault("Task description cannot be null");
}
- } catch (TaskManagementException e) {
- log.error(e);
- throw new AxisFault("Error loading all tasks", e);
+ rootEl.addChild(TaskDescriptionSerializer.serializeTaskDescription(
+ TASK_OM_NAMESPACE, taskDesc));
}
- if (log.isDebugEnabled()) {
- log.debug("Returning all TaskDescriptions as :" + rootElement);
- }
- return rootElement.toString();
+ return rootEl;
}
/**
- * Returns the names of job groups that are being executed.
+ * Retrieves the task description corresponding to a given task name.
*
- * @return An array of strings
+ * @param taskName task name
+ * @return task description
*/
- public String[] getAllJobGroups() {
- List<String> strings = getTaskManager().getAllJobGroups();
- return strings.toArray(new String[strings.size()]);
+ @Override
+ public TaskDescription getTaskDescription(String taskName) {
+ return schedulingManager.getTaskDescription(taskName, this.getConfigContext());
}
/**
- * Returns the TaskDescription associates with a particular task name
+ * Retrieves the task description corresponding to the given task name serialized into an
+ * OMElement.
*
- * @param taskName Task Name
- * @return TaskDescription
+ * @param taskName task name
+ * @return serialized task description
+ * @throws AxisFault axisFault
*/
- public TaskDescription getTaskDescription(String taskName) {
- return schedulingManager.getTaskDescription(taskName, getConfigContext());
+ public OMElement getSerializedTaskDescription(String taskName) throws AxisFault {
+ TaskDescription taskDesc = getTaskDescription(taskName);
+ if (taskDesc == null) {
+ throw new AxisFault("Task description cannot be located");
+ }
+ return TaskDescriptionSerializer.serializeTaskDescription(TASK_OM_NAMESPACE,
+ getTaskDescription(taskName));
}
+ /**
+ * Checks whether the task which carries the given name exists in the task description
+ * repository.
+ *
+ * @param taskName task name
+ * @return boolean representing the existence of the task inside the task description repository
+ */
+ @Override
public boolean isContains(String taskName) {
- return schedulingManager.isContains(taskName, getConfigContext());
+ return schedulingManager.isContains(taskName, this.getConfigContext());
+ }
+
+ /**
+ * Retrieves the list of properties of a particular task.
+ *
+ * @param taskName task name
+ * @return a list of properties
+ */
+ @Override
+ public List<String> getPropertyNames(String taskName) {
+ return new ArrayList<String>();
}
/**
- * @param taskClass taskClass
- * @return list of strings containing properties of the task class
+ * Returns the names of job groups that are being executed.
+ *
+ * @return An array of strings
*/
- public List<String> getPropertyNames(String taskClass) {
- return null;
+ public String[] getAllJobGroups() {
+ List<String> strings = getTaskManager().getAllJobGroups();
+ return strings.toArray(new String[strings.size()]);
}
/**
@@ -263,24 +271,32 @@
*/
public String[] getServicesList() throws AxisFault {
List<String> serviceList = new ArrayList<String>();
- Map<String, AxisService> map = getAxisConfig().getServices();
- Set<String> set = map.keySet();
- for (String serviceName : set) {
- AxisService axisService = getAxisConfig().getService(serviceName);
- Parameter parameter = axisService.getParameter(DBConstants.AXIS2_SERVICE_TYPE);
- if (parameter != null) {
- if (DBConstants.DB_SERVICE_TYPE.equals(parameter.getValue().toString())) {
- serviceList.add(serviceName);
- }
- }
- }
- return serviceList.toArray(new String[serviceList.size()]);
+ Map<String, AxisService> map = getAxisConfig().getServices();
+ Set<String> set = map.keySet();
+ for (String serviceName : set) {
+ AxisService axisService = getAxisConfig().getService(serviceName);
+ Parameter parameter = axisService.getParameter(DBConstants.AXIS2_SERVICE_TYPE);
+ if (parameter != null) {
+ if (DBConstants.DB_SERVICE_TYPE.equals(parameter.getValue().toString())) {
+ serviceList.add(serviceName);
+ }
+ }
+ }
+ return serviceList.toArray(new String[serviceList.size()]);
}
+ /**
+ * Retrieves the set of out only web service operations mapped upon the data service queries of a
+ * particular dbs.
+ *
+ * @param serviceId Id of the dataservice.
+ * @return the set of out only web services operations specified in the dbs.
+ * @throws AxisFault
+ */
public String[] getOperations(String serviceId) throws AxisFault {
String serviceContent = this.getDataServiceContentAsString(serviceId);
try {
- List<String> operations = TaskSchedulerUtils.getInOnlyOperationsList(serviceContent);
+ List<String> operations = TaskSchedulerUtils.getOutOnlyOperationsList(serviceContent);
return operations.toArray(new String[operations.size()]);
} catch (DSTaskSchedulerException e) {
log.error(e);
@@ -288,42 +304,49 @@
}
}
+ /**
+ * Retrieves the dbs content corresponding to a particular data service, as a string.
+ *
+ * @param serviceId Id of the dataservice.
+ * @return dbs content of the given dataservice serialized into a string.
+ * @throws AxisFault axisFault.
+ */
private String getDataServiceContentAsString(String serviceId) throws AxisFault {
- AxisService axisService = getAxisConfig().getServiceForActivation(serviceId);
- StringBuffer fileContents = new StringBuffer();
- String filePath;
- // construct data service configuration file path
- if (axisService != null) {
- filePath = ((DataService) axisService.getParameter(DBConstants.DATA_SERVICE_OBJECT)
- .getValue()).getDsLocation();
- } else {
- // Service could be a fault one. Loading contents directly from
- // repository
- URL repositoryURL = getAxisConfig().getRepository();
- filePath = repositoryURL.getPath() + DBDeployer.DEPLOYMENT_FOLDER_NAME + File.separator
- + serviceId + "." + DBConstants.DBS_FILE_EXTENSION;
- }
-
- // load file content into a string buffer
- if (filePath != null) {
- File config = new File(filePath);
- try {
- FileReader fileReader = new FileReader(config);
- BufferedReader in = new BufferedReader(fileReader);
- String str;
- while ((str = in.readLine()) != null) {
+ AxisService axisService = getAxisConfig().getServiceForActivation(serviceId);
+ StringBuffer fileContents = new StringBuffer();
+ String filePath;
+ // construct data service configuration file path
+ if (axisService != null) {
+ filePath = ((DataService) axisService.getParameter(DBConstants.DATA_SERVICE_OBJECT)
+ .getValue()).getDsLocation();
+ } else {
+ // Service could be a fault one. Loading contents directly from
+ // repository
+ URL repositoryURL = getAxisConfig().getRepository();
+ filePath = repositoryURL.getPath() + DBDeployer.DEPLOYMENT_FOLDER_NAME + File.separator
+ + serviceId + "." + DBConstants.DBS_FILE_EXTENSION;
+ }
+
+ // load file content into a string buffer
+ if (filePath != null) {
+ File config = new File(filePath);
+ try {
+ FileReader fileReader = new FileReader(config);
+ BufferedReader in = new BufferedReader(fileReader);
+ String str;
+ while ((str = in.readLine()) != null) {
fileContents.append(str).append("\n");
- }
- in.close();
- } catch (IOException e) {
+ }
+ in.close();
+ } catch (IOException e) {
log.error(e);
- throw new AxisFault(
- "Error while reading the contents from the service config file for service '"
- + serviceId + "'", e);
- }
- }
- return fileContents.toString();
- }
+ throw new AxisFault(
+ "Error while reading the contents from the service config file for service '"
+ + serviceId + "'", e);
+ }
+ }
+ return fileContents.toString();
+ }
/**
* Returns the TaskManager instance currently being used
@@ -331,8 +354,7 @@
* @return TaskManager
*/
private synchronized TaskManager getTaskManager() {
- return (TaskManager) getConfigContext().getProperty(
- TaskManager.CARBON_TASK_MANAGER);
+ return (TaskManager) getConfigContext().getProperty(TaskManager.CARBON_TASK_MANAGER);
}
/**
@@ -394,4 +416,18 @@
}
}
+ /**
+ * Populate a map with a list of Task property elements
+ *
+ * @param props a list of properties related to the execution of a particular scheduled task.
+ * @return a map with the key-value pairs of the aforementioned properties.
+ */
+ private static Map<String, Object> getJobDataMap(List<TaskProperty> props) {
+ Map<String, Object> jobDataMap = new HashMap<String, Object>();
+ for (TaskProperty prop : props) {
+ jobDataMap.put(prop.getName(), prop.getValue());
+ }
+ return jobDataMap;
+ }
+
}
\ No newline at end of file
Deleted: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.taskscheduler/3.2.2/src/main/java/org/wso2/carbon/dataservices/taskscheduler/services/TaskMetaDataProviderService.java
URL: http://wso2.org/svn/browse/wso2/None?pathrev=111658
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.0/src/main/resources/org/wso2/carbon/dataservices/ui/i18n/Resources.properties
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.0/src/main/resources/org/wso2/carbon/dataservices/ui/i18n/Resources.properties?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.0/src/main/resources/org/wso2/carbon/dataservices/ui/i18n/Resources.properties (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.0/src/main/resources/org/wso2/carbon/dataservices/ui/i18n/Resources.properties Tue Aug 16 00:01:42 2011
@@ -426,8 +426,8 @@
dataservices.task.error.state="Error Occurred!"
dataservices.tasks.menu.text=Scheduled Tasks
dataservices.task.trigger.type.simple=Simple
-dataservices.service.name= Service Name
-dataservices.operation.list=Operation List
+dataservices.service.name=Data Service Name
+dataservices.operation.name=Data Service Operation Name
data.services.udt.attribute.output.name=Ouput Attribute Name
data.services.udt.attribute.name=Attribute Name
service.group=Data Service Group
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.0/src/main/resources/web/ds/addNewTask.jsp
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.0/src/main/resources/web/ds/addNewTask.jsp?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.0/src/main/resources/web/ds/addNewTask.jsp (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.0/src/main/resources/web/ds/addNewTask.jsp Tue Aug 16 00:01:42 2011
@@ -31,7 +31,6 @@
<link href="css/task.css" rel="stylesheet" type="text/css" media="all"/>
<script type="text/javascript" src="js/taskcommon.js"></script>
-<script type="text/javascript" src="js/ui-utils.js"></script>
<fmt:bundle basename="org.wso2.carbon.dataservices.ui.i18n.Resources">
<carbon:breadcrumb label="dataservices.task.header.new"
resourceBundle="org.wso2.carbon.dataservices.ui.i18n.Resources"
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/pom.xml
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/pom.xml?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/pom.xml (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/pom.xml Tue Aug 16 00:01:42 2011
@@ -104,7 +104,7 @@
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.dataservices.taskscheduler.stub</artifactId>
- <version>3.2.1</version>
+ <version>3.2.2</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
Deleted: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler/DataServiceTaskConstants.java
URL: http://wso2.org/svn/browse/wso2/None?pathrev=111658
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler/DataServiceTaskMgtClient.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler/DataServiceTaskMgtClient.java?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler/DataServiceTaskMgtClient.java (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler/DataServiceTaskMgtClient.java Tue Aug 16 00:01:42 2011
@@ -20,12 +20,13 @@
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.util.AXIOMUtil;
import org.apache.axis2.AxisFault;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.synapse.task.TaskDescription;
@@ -33,16 +34,26 @@
import org.apache.synapse.task.TaskDescriptionSerializer;
import org.wso2.carbon.dataservices.ui.taskscheduler.stub.TaskManagementAdminServiceStub;
+import javax.xml.namespace.QName;
import java.rmi.RemoteException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
public class DataServiceTaskMgtClient {
private TaskManagementAdminServiceStub stub;
private static Log log = LogFactory.getLog(DataServiceTaskMgtClient.class);
+ private static final OMFactory FACTORY = OMAbstractFactory.getOMFactory();
private static final String TASK_EXTENSION_NS = "http://www.wso2.org/tasks";
private static final OMNamespace TASK_OM_NAMESPACE =
OMAbstractFactory.getOMFactory().createOMNamespace(TASK_EXTENSION_NS, "task");
+ private static final OMNamespace TASK_PROPERTY_NAMESPACE =
+ OMAbstractFactory.getOMFactory().createOMNamespace(TASK_EXTENSION_NS, "properties");
+ private static final OMNamespace ROOT_ELEMENT_NAMESPACE =
+ OMAbstractFactory.getOMFactory().createOMNamespace(TASK_EXTENSION_NS, "data");
+
public DataServiceTaskMgtClient(String cookie, String backendServerUrl,
ConfigurationContext configurationContext) throws AxisFault {
@@ -52,31 +63,27 @@
ServiceClient serviceClient = stub._getServiceClient();
Options options = serviceClient.getOptions();
options.setManageSession(true);
- options.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
- } catch (AxisFault axisFault) {
- log.error("Error occurred while connecting via stub to service endpoint " +
- serviceEndpoint, axisFault);
+ options.setProperty(HTTPConstants.COOKIE_STRING, cookie);
+ } catch (AxisFault e) {
+ log.error(e);
+ throw new AxisFault("Error occurred while connecting via stub to service endpoint " +
+ serviceEndpoint, e);
}
}
public ResponseInformation addTaskDescription(TaskDescription taskDescription,
- Map<String, Object> jobDataMap) {
+ Map<String, String> jobDataMap) {
validateTaskDescription(taskDescription);
- if (log.isDebugEnabled()) {
- log.debug("Going to add TaskDescription :" + taskDescription);
- }
- OMElement taskElement = TaskDescriptionSerializer.serializeTaskDescription(
+ OMElement rootEl = FACTORY.createOMElement("data", ROOT_ELEMENT_NAMESPACE);
+ OMElement taskEl = TaskDescriptionSerializer.serializeTaskDescription(
TASK_OM_NAMESPACE, taskDescription);
- validateTaskElement(taskElement);
- if (log.isDebugEnabled()) {
- log.debug("TasK configuration :" + taskElement);
- }
+ validateTaskElement(taskEl);
+ rootEl.addChild(taskEl);
+ rootEl.addChild(DataServiceTaskMgtHelper.serializeTaskProperties(TASK_PROPERTY_NAMESPACE,
+ jobDataMap));
ResponseInformation responseInformation = new ResponseInformation();
try {
- stub.addTaskDescriptionAsString(taskElement.toString(),
- (String)jobDataMap.get(DataServiceTaskConstants.DATA_SERVICE_NAME),
- (String)jobDataMap.get(DataServiceTaskConstants.OPERATION_NAME),
- (String)jobDataMap.get(DataServiceTaskConstants.BACK_END_URL));
+ stub.addSerializedTaskDescription(rootEl);
} catch (RemoteException e) {
responseInformation.setFault(true);
responseInformation.setMessage(e.getMessage());
@@ -85,31 +92,30 @@
}
public List<TaskDescription> getAllTaskDescriptions() throws Exception {
- String omElementString = stub.getAllTaskDescriptionsAsString();
- OMElement element = AXIOMUtil.stringToOM(omElementString);
- if (log.isDebugEnabled()) {
- log.debug("All TasKs configurations :" + element);
- }
- List<TaskDescription> descriptions = new ArrayList<TaskDescription>();
- if (element == null) {
- return descriptions;
- }
-
- Iterator iterator = element.getChildrenWithLocalName("task");
- while (iterator.hasNext()) {
- OMElement taskElement = (OMElement) iterator.next();
- if (taskElement != null) {
- TaskDescription taskDescription = TaskDescriptionFactory.createTaskDescription(
- taskElement, TASK_OM_NAMESPACE);
- if (taskDescription != null) {
- descriptions.add(taskDescription);
+ try {
+ OMElement rootEl = stub.getAllSerializedTaskDescriptions();
+ List<TaskDescription> descriptions = new ArrayList<TaskDescription>();
+ if (rootEl == null) {
+ return descriptions;
+ }
+ OMElement tasksEl = rootEl.getFirstElement();
+ Iterator itr = tasksEl.getChildrenWithName(new QName(TASK_EXTENSION_NS, "task"));
+ while (itr.hasNext()) {
+ OMElement taskEl = (OMElement) itr.next();
+ if (taskEl != null) {
+ TaskDescription taskDescription = TaskDescriptionFactory.createTaskDescription(
+ taskEl, TASK_OM_NAMESPACE);
+ if (taskDescription != null) {
+ descriptions.add(taskDescription);
+ }
}
}
+ return descriptions;
+ } catch (Throwable e) {
+ log.error(e.getMessage(), e);
+ throw new Exception(e.getMessage(), e);
}
- if (log.isDebugEnabled()) {
- log.debug("All TasKs Descriptions :" + descriptions);
- }
- return descriptions;
+
}
public void deleteTaskDescription(String name) throws RemoteException {
@@ -117,16 +123,10 @@
}
public ResponseInformation getAllJobGroups() throws Exception {
- if (log.isDebugEnabled()) {
- log.debug(" Retrieving all JobGroup names");
- }
ResponseInformation responseInformation = new ResponseInformation();
try {
String[] jobGroups = stub.getAllJobGroups();
if (jobGroups != null) {
- if (log.isDebugEnabled()) {
- log.debug("Loaded JOBGroup names : " + Arrays.toString(jobGroups));
- }
responseInformation.setResult(jobGroups);
}
} catch (Exception e) {
@@ -136,25 +136,18 @@
return responseInformation;
}
- public ResponseInformation getServicesList() throws Exception {
- if (log.isDebugEnabled()) {
- log.debug(" Retrieving all Service names");
- }
+ public ResponseInformation getServicesList() throws AxisFault {
ResponseInformation responseInformation = new ResponseInformation();
try {
String[] services = stub.getServicesList();
-
- if (log.isDebugEnabled()) {
- log.debug("Loaded service names : " + Arrays.toString(services));
- }
responseInformation.setResult(services);
-
} catch (Exception e) {
- log.error("Error While Loading Service Names", e);
+ log.error(e);
+ throw new AxisFault("Error While Loading Service Names", e);
}
return responseInformation;
}
-
+
public ResponseInformation getOperationsList(String serviceId) throws Exception {
ResponseInformation responseInformation;
try {
@@ -163,8 +156,9 @@
responseInformation.setResult(operations);
return responseInformation;
} catch (Exception e) {
- String msg = "Error While Retrieving Trigger List Corresponding To Data Service " + serviceId;
- log.error(msg, e);
+ String msg = "Error While Retrieving Trigger List Corresponding To Data Service " +
+ serviceId;
+ log.error(e);
throw new Exception(msg, e);
}
}
@@ -194,18 +188,12 @@
public ResponseInformation editTaskDescription(TaskDescription taskDescription) {
validateTaskDescription(taskDescription);
- if (log.isDebugEnabled()) {
- log.debug("Going to Edit TaskDescription :" + taskDescription);
- }
- OMElement taskElement = TaskDescriptionSerializer.serializeTaskDescription(
+ OMElement taskEl = TaskDescriptionSerializer.serializeTaskDescription(
TASK_OM_NAMESPACE, taskDescription);
- validateTaskElement(taskElement);
- if (log.isDebugEnabled()) {
- log.debug("TasK configuration :" + taskElement);
- }
+ validateTaskElement(taskEl);
ResponseInformation responseInformation = new ResponseInformation();
try {
- stub.editTaskDescriptionAsString(taskElement.toString());
+ stub.editSerializedTaskDescription(taskEl);
} catch (Exception e) {
responseInformation.setFault(true);
responseInformation.setMessage(e.getMessage());
@@ -218,5 +206,5 @@
handleException("Task Description OMElement can not be found.");
}
}
-
+
}
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler/DataServiceTaskMgtHelper.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler/DataServiceTaskMgtHelper.java?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler/DataServiceTaskMgtHelper.java (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/java/org/wso2/carbon/dataservices/ui/taskscheduler/DataServiceTaskMgtHelper.java Tue Aug 16 00:01:42 2011
@@ -18,9 +18,14 @@
*/
package org.wso2.carbon.dataservices.ui.taskscheduler;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.synapse.task.TaskDescription;
+import org.wso2.carbon.dataservices.common.DBConstants;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
@@ -30,12 +35,13 @@
public class DataServiceTaskMgtHelper {
- private static final Log log= LogFactory.getLog(DataServiceTaskMgtHelper.class);
+ private static final OMFactory FACTORY = OMAbstractFactory.getOMFactory();
+ private static final Log log = LogFactory.getLog(DataServiceTaskMgtHelper.class);
public static TaskDescription createTaskDescription(
HttpServletRequest request) throws ServletException {
- if(log.isDebugEnabled()){
- log.debug("Creating the task description corresponds to the task");
+ if (log.isDebugEnabled()) {
+ log.debug("Creating the task description corresponds to the task");
}
String taskName = request.getParameter("taskName");
@@ -53,8 +59,8 @@
TaskDescription taskDescription = new TaskDescription();
taskDescription.setName(taskName.trim());
- taskDescription.setTaskClass(DataServiceTaskConstants.TASK_CLASS);
- taskDescription.setGroup(DataServiceTaskConstants.JOB_GROUP);
+ taskDescription.setTaskClass(DBConstants.DSTaskConstants.TASK_CLASS);
+ taskDescription.setGroup(DBConstants.DSTaskConstants.JOB_GROUP);
taskDescription.setDescription("Test Task Description");
String[] timeContents = startTimeStr.split("-");
@@ -105,32 +111,32 @@
return taskDescription;
}
- public static Map<String, Object> createJobDataMap(HttpServletRequest request,
+ public static Map<String, String> createJobDataMap(HttpServletRequest request,
String tenantDomain, String backEndServerUrl)
throws ServletException {
- Map<String, Object> jobDataMap;
+ Map<String, String> jobDataMap;
- if(log.isDebugEnabled()){
+ if (log.isDebugEnabled()) {
log.debug("Creating the job data map corresponds to the task");
}
String dataServiceName = request.getParameter("dataServiceName");
- if(dataServiceName == null || "".equals(dataServiceName)){
+ if (dataServiceName == null || "".equals(dataServiceName)) {
handleException("Service Name cannot be null");
}
String operationName = request.getParameter("operationName");
- if(operationName == null || "".equals(operationName)){
+ if (operationName == null || "".equals(operationName)) {
handleException("Operation name cannot be null");
}
- jobDataMap = new HashMap<String, Object>();
+ jobDataMap = new HashMap<String, String>();
if (tenantDomain != null) {
- backEndServerUrl = backEndServerUrl + "t/" + tenantDomain + "/";
+ backEndServerUrl = backEndServerUrl + "t/" + tenantDomain + "/";
}
- jobDataMap.put(DataServiceTaskConstants.BACK_END_URL, backEndServerUrl);
- jobDataMap.put(DataServiceTaskConstants.DATA_SERVICE_NAME, dataServiceName);
- jobDataMap.put(DataServiceTaskConstants.OPERATION_NAME, operationName);
+ jobDataMap.put(DBConstants.DSTaskConstants.BACK_END_URL, backEndServerUrl);
+ jobDataMap.put(DBConstants.DSTaskConstants.DATA_SERVICE_NAME, dataServiceName);
+ jobDataMap.put(DBConstants.DSTaskConstants.OPERATION_NAME, operationName);
return jobDataMap;
}
@@ -140,4 +146,28 @@
throw new ServletException(msg);
}
+ public static OMElement serializeTaskProperties(OMNamespace targetNamespace,
+ Map<String, String> props) {
+ OMElement rootEl = FACTORY.createOMElement("properties", targetNamespace);
+ for (Map.Entry<String, String> entry : props.entrySet()) {
+ OMElement propEl = FACTORY.createOMElement("property", targetNamespace);
+ OMElement nameEl = FACTORY.createOMElement("name", targetNamespace);
+ nameEl.setText(entry.getKey());
+ OMElement valueEl = FACTORY.createOMElement("value", targetNamespace);
+ valueEl.setText(entry.getValue());
+
+ propEl.addChild(nameEl);
+ propEl.addChild(valueEl);
+ rootEl.addChild(propEl);
+ }
+ return rootEl;
+ }
+
+ public static Map<String, Object> deserializeTaskPorperties(OMElement el) {
+ Map<String, Object> propertyMap = new HashMap<String, Object>();
+
+
+ return propertyMap;
+ }
+
}
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/addNewTask.jsp
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/addNewTask.jsp?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/addNewTask.jsp (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/addNewTask.jsp Tue Aug 16 00:01:42 2011
@@ -107,7 +107,7 @@
<td align="left">
<select id="serviceList" name="serviceList" class="longInput"
onchange="getOperations(this);">
- <option value="">------------------------SELECT----------------------------</option>
+ <option value="">--------------------SELECT-----------------------</option>
<%
ResponseInformation serviceListResponse = client.getServicesList();
String[] services = (String[]) serviceListResponse.getResult();
@@ -132,7 +132,7 @@
</td>
</tr>
<input id="operationName" name="operationName" value="" type="hidden"/>
-
+ <input id="saveMode" name="saveMode" value="save" type="hidden"/>
<tr>
<td class="buttonRow" colspan="3">
<input class="button" type="submit"
Added: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/editTask.jsp
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/editTask.jsp?pathrev=111659
==============================================================================
--- (empty file)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/editTask.jsp Tue Aug 16 00:01:42 2011
@@ -0,0 +1,172 @@
+<!--
+~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+~
+~ WSO2 Inc. licenses this file to you under the Apache License,
+~ Version 2.0 (the "License"); you may not use this file except
+~ in compliance with the License.
+~ You may obtain a copy of the License at
+~
+~ http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing,
+~ software distributed under the License is distributed on an
+~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~ KIND, either express or implied. See the License for the
+~ specific language governing permissions and limitations
+~ under the License.
+-->
+<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page import="org.wso2.carbon.dataservices.ui.taskscheduler.DataServiceTaskMgtClient" %>
+<%@ page import="org.wso2.carbon.dataservices.ui.taskscheduler.ResponseInformation" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
+<%@ page import="org.wso2.carbon.dataservices.ui.taskscheduler.stub.synapse.xsd.TaskDescription" %>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+
+
+<link href="css/task.css" rel="stylesheet" type="text/css" media="all"/>
+<script type="text/javascript" src="js/taskcommon.js"></script>
+<fmt:bundle basename="org.wso2.carbon.dataservices.ui.i18n.Resources">
+<carbon:breadcrumb label="dataservices.task.header.new"
+ resourceBundle="org.wso2.carbon.dataservices.ui.i18n.Resources"
+ topPage="false" request="<%=request%>"/>
+<%
+ DataServiceTaskMgtClient client;
+ String backendServerUrl = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+ ConfigurationContext configurationContext = (ConfigurationContext) config.
+ getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+ String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+ TaskDescription desc;
+ String taskName = request.getParameter("taskName");
+
+ try {
+ client = new DataServiceTaskMgtClient(cookie, backendServerUrl,
+ configurationContext);
+ desc = client.getTaskDescriptionByName(taskName);
+%>
+<form method="post" name="taskcreationform" id="taskcreationform" onsubmit="return validateTaskInputs();">
+
+ <div id="middle">
+ <h2><fmt:message key="dataservices.task.header.new"/></h2>
+
+ <div id="workArea">
+
+ <table class="styledLeft noBorders" cellspacing="0" cellpadding="0" border="0">
+ <thead>
+ <tr>
+ <th colspan="3"><fmt:message key="dataservices.task.basic.information"/></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td style="width:150px"><fmt:message key="dataservices.task.name"/><span
+ class="required">*</span></td>
+ <td align="left">
+ <input id="taskName" name="taskName" class="longInput" type="text"/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="middle-header"><fmt:message
+ key="dataservices.task.trigger.text"/></td>
+ </tr>
+ <input type="hidden" name="taskTrigger" id="taskTrigger" value="simple"/>
+
+ <tr id="triggerCountTR">
+ <td><fmt:message key="dataservices.task.trigger.count"/></td>
+ <td>
+ <input id="triggerCount" name="triggerCount" class="longInput"
+ type="text" value=""/>
+ </td>
+ </tr>
+ <tr id="triggerIntervalTR">
+ <td><fmt:message key="dataservices.task.trigger.interval"/><span
+ class="required">*</span></td>
+ <td>
+ <input id="triggerInterval" name="triggerInterval" class="longInput"
+ type="text"
+ value=""/>
+ <fmt:message key="dataservices.task.interval.units"/>
+ </td>
+ </tr>
+ <tr id="startTimeTR">
+ <td><fmt:message key="dataservices.task.trigger.start.time"/><span
+ class="required">*</span></td>
+ <td>
+ <input id="startTime" name="startTime" class="longInput"
+ type="text"
+ value=""/>
+ <fmt:message key="dataservices.task.start.time.format"/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="middle-header"><fmt:message
+ key="dataservices.task.miscellaneous.information"/></td>
+ </tr>
+ <tr>
+ <td style="width:150px"><fmt:message key="dataservices.task.service.name"/><span
+ class="required">*</span></td>
+ <td align="left">
+ <select id="serviceList" name="serviceList" class="longInput"
+ onchange="getOperations(this);">
+ <option value="">------------------------SELECT----------------------------</option>
+ <%
+ ResponseInformation serviceListResponse = client.getServicesList();
+ String[] services = (String[]) serviceListResponse.getResult();
+ if (services != null) {
+ for (String service : services) { %>
+ <option value="<%=service%>">
+ <%=service%>
+ </option>
+ <% }
+ }%>
+ </select>
+ </td>
+ <input id="dataServiceName" name="dataServiceName" value="" type="hidden"/>
+ </tr>
+ <tr>
+ <td style="width:150px"><fmt:message key="dataservices.operation.name"/><span
+ class="required">*</span></td>
+
+ <td align="left">
+ <select id="operationList" name="operationList" class="longInput" onchange="setOperationName()">
+ </select>
+ </td>
+ </tr>
+ <input id="operationName" name="operationName" value="" type="hidden"/>
+ <%--<input id="saveMode" name="saveMode" value="edit" type="hidden"/>--%>
+
+ <tr>
+ <td class="buttonRow" colspan="3">
+ <input class="button" type="submit"
+ value="<fmt:message key="dataservices.task.button.schedule.text"/>"
+ onclick="return validateTaskInputs();"/>
+ <input class="button" type="button"
+ value="<fmt:message key="dataservices.task.cancel.button.text"/>"
+ onclick="document.location.href='tasks.jsp?ordinal=0';"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="tdiv"></div>
+ </div>
+
+</form>
+<%
+
+} catch (Throwable e) {
+%>
+<script type="text/javascript">
+ jQuery(document).ready(function() {
+ CARBON.showErrorDialog('<%=e.getMessage()%>');
+ });
+</script>
+<%
+ return;
+ }
+%>
+</fmt:bundle>
+
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/js/taskcommon.js
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/js/taskcommon.js?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/js/taskcommon.js (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/js/taskcommon.js Tue Aug 16 00:01:42 2011
@@ -175,7 +175,7 @@
}
function editRow(name, group) {
- document.location.href = "edittask.jsp?" + "taskName=" + name + "&taskGroup=" + group + "&ordinal=1";
+ document.location.href = "edittask.jsp?" + "taskName=" + name + "&ordinal=1";
}
function onclassnamefieldchange(id) {
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/saveTask.jsp
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/saveTask.jsp?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/saveTask.jsp (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/saveTask.jsp Tue Aug 16 00:01:42 2011
@@ -18,7 +18,6 @@
<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
<%@ page import="org.wso2.carbon.CarbonConstants" %>
<%@ page import="org.apache.synapse.task.TaskDescription" %>
-<%@ page import="org.wso2.carbon.dataservices.ui.taskscheduler.DataServiceTaskConstants" %>
<%@ page import="org.wso2.carbon.dataservices.ui.taskscheduler.DataServiceTaskMgtClient" %>
<%@ page import="org.wso2.carbon.dataservices.ui.taskscheduler.DataServiceTaskMgtHelper" %>
<%@ page import="org.wso2.carbon.dataservices.ui.taskscheduler.ResponseInformation" %>
@@ -26,6 +25,7 @@
<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
<%@ page import="java.util.Map" %>
<%@ page import="org.wso2.carbon.utils.multitenancy.MultitenantConstants" %>
+<%@ page import="org.wso2.carbon.dataservices.common.DBConstants" %>
<link type="text/css" rel="stylesheet" href="../admin/css/global.css"/>
<script type="text/javascript" src="js/taskcommon.js"></script>
@@ -33,7 +33,7 @@
<%
try {
DataServiceTaskMgtClient client;
- Map<String, Object> jobDataMap;
+ Map<String, String> jobDataMap;
ResponseInformation responseInformation = null;
String saveMode = request.getParameter("saveMode");
String taskName = request.getParameter("taskName");
@@ -50,7 +50,7 @@
DataServiceTaskMgtHelper.createTaskDescription(request);
jobDataMap = DataServiceTaskMgtHelper.createJobDataMap(request, tenantDomain,
backendServerUrl);
- configurationContext.setProperty(DataServiceTaskConstants.JOB_DATA_MAP, jobDataMap);
+ configurationContext.setProperty(DBConstants.DSTaskConstants.JOB_DATA_MAP, jobDataMap);
responseInformation = client.editTaskDescription(taskDescription);
} else if ("delete".equals(saveMode)) {
client.deleteTaskDescription(taskName);
@@ -59,7 +59,7 @@
DataServiceTaskMgtHelper.createTaskDescription(request);
jobDataMap = DataServiceTaskMgtHelper.createJobDataMap(request, tenantDomain,
backendServerUrl);
- configurationContext.setProperty(DataServiceTaskConstants.JOB_DATA_MAP, jobDataMap);
+ configurationContext.setProperty(DBConstants.DSTaskConstants.JOB_DATA_MAP, jobDataMap);
responseInformation = client.addTaskDescription(taskDescription, jobDataMap);
}
if (responseInformation != null && responseInformation.isFault()) {
Modified: branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/tasks.jsp
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/tasks.jsp?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/tasks.jsp (original)
+++ branches/carbon/3.2.0/components/data-services/org.wso2.carbon.dataservices.ui/3.2.2/src/main/resources/web/ds/tasks.jsp Tue Aug 16 00:01:42 2011
@@ -16,26 +16,23 @@
~ under the License.
-->
<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
-<%@ page import="org.apache.commons.logging.Log" %>
-<%@ page import="org.apache.commons.logging.LogFactory" %>
<%@ page import="org.wso2.carbon.CarbonConstants" %>
<%@ page import="org.apache.synapse.task.TaskDescription" %>
<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
-<%@ page import="org.wso2.carbon.dataservices.ui.taskscheduler.DataServiceTaskConstants" %>
<%@ page import="org.wso2.carbon.dataservices.ui.taskscheduler.DataServiceTaskMgtClient" %>
<%@ page import="java.util.List" %>
+<%@ page import="org.wso2.carbon.dataservices.common.DBConstants" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
<%
boolean disableAddTask = Boolean.valueOf((String) config.getServletContext().getAttribute(
CarbonConstants.PRODUCT_XML_WSO2CARBON +
- DataServiceTaskConstants.DISABLE_ADD_TASK));
+ DBConstants.DSTaskConstants.DISABLE_ADD_TASK));
%>
<link href="css/task.css" rel="stylesheet" type="text/css" media="all"/>
-<!--script type="text/javascript" src="global-params.js"></script-->
<script type="text/javascript" src="js/taskcommon.js"></script>
<fmt:bundle basename="org.wso2.carbon.dataservices.ui.i18n.Resources">
@@ -90,8 +87,8 @@
<%=name%>
</td>
<td>
- <%--<a href="#" onclick="javascript:editRow('<%=name%>','<%=group%>')" id="config_link"--%>
- <%--class="edit-icon-link"><fmt:message key="dataservices.task.edit"/></a>--%>
+ <a href="#" onclick="javascript:editRow('<%=name%>','<%=group%>')" id="config_link"
+ class="edit-icon-link"><fmt:message key="dataservices.task.edit"/></a>
<a href="#" onclick="javascript:deleteRow('<%=name%>','<%=group%>')"
id="delete_link" class="delete-icon-link"><fmt:message
key="dataservices.task.property.delete"/></a>
@@ -121,7 +118,7 @@
<%
} catch (Throwable e) {
- request.getSession().setAttribute(DataServiceTaskConstants.EXCEPTION, e);
+ request.getSession().setAttribute(DBConstants.DSTaskConstants.EXCEPTION, e);
%>
<script type="text/javascript">
jQuery(document).ready(function() {
Modified: branches/carbon/3.2.0/service-stubs/org.wso2.carbon.dataservices.taskscheduler.stub/3.2.2/pom.xml
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/service-stubs/org.wso2.carbon.dataservices.taskscheduler.stub/3.2.2/pom.xml?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/service-stubs/org.wso2.carbon.dataservices.taskscheduler.stub/3.2.2/pom.xml (original)
+++ branches/carbon/3.2.0/service-stubs/org.wso2.carbon.dataservices.taskscheduler.stub/3.2.2/pom.xml Tue Aug 16 00:01:42 2011
@@ -49,7 +49,7 @@
<configuration>
<tasks>
<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <arg line="-uri src/main/resources/TaskManagementAdminService.wsdl -u -uw -o target/generated-code -p org.wso2.carbon.dataservices.ui.taskscheduler.stub -ns2p http://services.taskscheduler.dataservices.carbon.wso2.org=org.wso2.carbon.dataservices.ui.taskscheduler.stub,http://org.apache.axis2/xsd=org.wso2.carbon.dataservices.ui.taskscheduler.stub.axis2,http://task.synapse.apache.org/xsd=org.wso2.carbon.dataservices.ui.taskscheduler.stub.synapse.xsd,http://util.java/xsd=org.wso2.carbon.dataservices.ui.taskscheduler.stub.java.util.xsd,http://task.carbon.wso2.org/xsd=org.wso2.carbon.dataservices.ui.taskscheduler.stub.task.xsd"/>
+ <arg line="-uri src/main/resources/TaskManagementAdminService.wsdl -u -uw -o target/generated-code -p org.wso2.carbon.dataservices.ui.taskscheduler.stub -ns2p http://services.taskscheduler.dataservices.carbon.wso2.org=org.wso2.carbon.dataservices.ui.taskscheduler.stub,http://org.apache.axis2/xsd=org.wso2.carbon.dataservices.ui.taskscheduler.stub.axis2,http://task.synapse.apache.org/xsd=org.wso2.carbon.dataservices.ui.taskscheduler.stub.synapse.xsd,http://util.java/xsd=org.wso2.carbon.dataservices.ui.taskscheduler.stub.java.util.xsd,http://task.carbon.wso2.org/xsd=org.wso2.carbon.dataservices.ui.taskscheduler.stub.task.xsd,http://taskscheduler.dataservices.carbon.wso2.org/xsd=org.wso2.carbon.dataservices.ui.taskscheduler.stub.task.xsd"/>
<classpath refid="maven.dependency.classpath"/>
<classpath refid="maven.compile.classpath"/>
<classpath refid="maven.runtime.classpath"/>
Modified: branches/carbon/3.2.0/service-stubs/org.wso2.carbon.dataservices.taskscheduler.stub/3.2.2/src/main/resources/TaskManagementAdminService.wsdl
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/service-stubs/org.wso2.carbon.dataservices.taskscheduler.stub/3.2.2/src/main/resources/TaskManagementAdminService.wsdl?rev=111659&r1=111658&r2=111659&view=diff
==============================================================================
--- branches/carbon/3.2.0/service-stubs/org.wso2.carbon.dataservices.taskscheduler.stub/3.2.2/src/main/resources/TaskManagementAdminService.wsdl (original)
+++ branches/carbon/3.2.0/service-stubs/org.wso2.carbon.dataservices.taskscheduler.stub/3.2.2/src/main/resources/TaskManagementAdminService.wsdl Tue Aug 16 00:01:42 2011
@@ -69,10 +69,24 @@
</xs:sequence>
</xs:complexType>
</xs:element>
+ <xs:element name="getSerializedTaskDescription">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="taskName" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getSerializedTaskDescriptionResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:any/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
<xs:element name="getPropertyNames">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="taskClass" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="taskName" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -97,27 +111,27 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAllTaskDescriptionsAsString">
+ <xs:element name="getAllTaskDescriptions">
<xs:complexType>
<xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="getAllTaskDescriptionsAsStringResponse">
+ <xs:element name="getAllTaskDescriptionsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax24:TaskDescription"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAllTaskDescriptions">
+ <xs:element name="getAllSerializedTaskDescriptions">
<xs:complexType>
<xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="getAllTaskDescriptionsResponse">
+ <xs:element name="getAllSerializedTaskDescriptionsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax24:TaskDescription"/>
+ <xs:any/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -133,17 +147,17 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="editTaskDescriptionAsString">
+ <xs:element name="editTaskDescription">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="taskElementString" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="taskDescription" nillable="true" type="ax24:TaskDescription"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="editTaskDescription">
+ <xs:element name="editSerializedTaskDescription">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="taskDescription" nillable="true" type="ax24:TaskDescription"/>
+ <xs:any/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -154,34 +168,22 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addTaskDescriptionAsString">
+ <xs:element name="addTaskDescription">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="taskElementString" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="operationName" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="backendServerUrl" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="taskDescription" nillable="true" type="ax24:TaskDescription"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addTaskDescription">
+ <xs:element name="addSerializedTaskDescription">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="taskDescription" nillable="true" type="ax24:TaskDescription"/>
+ <xs:any/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
- <wsdl:message name="editTaskDescriptionAsStringRequest">
- <wsdl:part name="parameters" element="ns:editTaskDescriptionAsString"/>
- </wsdl:message>
- <wsdl:message name="getAllTaskDescriptionsAsStringRequest">
- <wsdl:part name="parameters" element="ns:getAllTaskDescriptionsAsString"/>
- </wsdl:message>
- <wsdl:message name="getAllTaskDescriptionsAsStringResponse">
- <wsdl:part name="parameters" element="ns:getAllTaskDescriptionsAsStringResponse"/>
- </wsdl:message>
<wsdl:message name="getServicesListRequest">
<wsdl:part name="parameters" element="ns:getServicesList"/>
</wsdl:message>
@@ -206,6 +208,9 @@
<wsdl:message name="getTaskDescriptionResponse">
<wsdl:part name="parameters" element="ns:getTaskDescriptionResponse"/>
</wsdl:message>
+ <wsdl:message name="addSerializedTaskDescriptionRequest">
+ <wsdl:part name="parameters" element="ns:addSerializedTaskDescription"/>
+ </wsdl:message>
<wsdl:message name="editTaskDescriptionRequest">
<wsdl:part name="parameters" element="ns:editTaskDescription"/>
</wsdl:message>
@@ -227,8 +232,8 @@
<wsdl:message name="addTaskDescriptionRequest">
<wsdl:part name="parameters" element="ns:addTaskDescription"/>
</wsdl:message>
- <wsdl:message name="addTaskDescriptionAsStringRequest">
- <wsdl:part name="parameters" element="ns:addTaskDescriptionAsString"/>
+ <wsdl:message name="editSerializedTaskDescriptionRequest">
+ <wsdl:part name="parameters" element="ns:editSerializedTaskDescription"/>
</wsdl:message>
<wsdl:message name="getPropertyNamesRequest">
<wsdl:part name="parameters" element="ns:getPropertyNames"/>
@@ -236,14 +241,19 @@
<wsdl:message name="getPropertyNamesResponse">
<wsdl:part name="parameters" element="ns:getPropertyNamesResponse"/>
</wsdl:message>
+ <wsdl:message name="getSerializedTaskDescriptionRequest">
+ <wsdl:part name="parameters" element="ns:getSerializedTaskDescription"/>
+ </wsdl:message>
+ <wsdl:message name="getSerializedTaskDescriptionResponse">
+ <wsdl:part name="parameters" element="ns:getSerializedTaskDescriptionResponse"/>
+ </wsdl:message>
+ <wsdl:message name="getAllSerializedTaskDescriptionsRequest">
+ <wsdl:part name="parameters" element="ns:getAllSerializedTaskDescriptions"/>
+ </wsdl:message>
+ <wsdl:message name="getAllSerializedTaskDescriptionsResponse">
+ <wsdl:part name="parameters" element="ns:getAllSerializedTaskDescriptionsResponse"/>
+ </wsdl:message>
<wsdl:portType name="TaskManagementAdminServicePortType">
- <wsdl:operation name="editTaskDescriptionAsString">
- <wsdl:input message="ns:editTaskDescriptionAsStringRequest" wsaw:Action="urn:editTaskDescriptionAsString"/>
- </wsdl:operation>
- <wsdl:operation name="getAllTaskDescriptionsAsString">
- <wsdl:input message="ns:getAllTaskDescriptionsAsStringRequest" wsaw:Action="urn:getAllTaskDescriptionsAsString"/>
- <wsdl:output message="ns:getAllTaskDescriptionsAsStringResponse" wsaw:Action="urn:getAllTaskDescriptionsAsStringResponse"/>
- </wsdl:operation>
<wsdl:operation name="getServicesList">
<wsdl:input message="ns:getServicesListRequest" wsaw:Action="urn:getServicesList"/>
<wsdl:output message="ns:getServicesListResponse" wsaw:Action="urn:getServicesListResponse"/>
@@ -260,6 +270,9 @@
<wsdl:input message="ns:getTaskDescriptionRequest" wsaw:Action="urn:getTaskDescription"/>
<wsdl:output message="ns:getTaskDescriptionResponse" wsaw:Action="urn:getTaskDescriptionResponse"/>
</wsdl:operation>
+ <wsdl:operation name="addSerializedTaskDescription">
+ <wsdl:input message="ns:addSerializedTaskDescriptionRequest" wsaw:Action="urn:addSerializedTaskDescription"/>
+ </wsdl:operation>
<wsdl:operation name="editTaskDescription">
<wsdl:input message="ns:editTaskDescriptionRequest" wsaw:Action="urn:editTaskDescription"/>
</wsdl:operation>
@@ -277,22 +290,24 @@
<wsdl:operation name="addTaskDescription">
<wsdl:input message="ns:addTaskDescriptionRequest" wsaw:Action="urn:addTaskDescription"/>
</wsdl:operation>
- <wsdl:operation name="addTaskDescriptionAsString">
- <wsdl:input message="ns:addTaskDescriptionAsStringRequest" wsaw:Action="urn:addTaskDescriptionAsString"/>
+ <wsdl:operation name="editSerializedTaskDescription">
+ <wsdl:input message="ns:editSerializedTaskDescriptionRequest" wsaw:Action="urn:editSerializedTaskDescription"/>
</wsdl:operation>
<wsdl:operation name="getPropertyNames">
<wsdl:input message="ns:getPropertyNamesRequest" wsaw:Action="urn:getPropertyNames"/>
<wsdl:output message="ns:getPropertyNamesResponse" wsaw:Action="urn:getPropertyNamesResponse"/>
</wsdl:operation>
+ <wsdl:operation name="getSerializedTaskDescription">
+ <wsdl:input message="ns:getSerializedTaskDescriptionRequest" wsaw:Action="urn:getSerializedTaskDescription"/>
+ <wsdl:output message="ns:getSerializedTaskDescriptionResponse" wsaw:Action="urn:getSerializedTaskDescriptionResponse"/>
+ </wsdl:operation>
+ <wsdl:operation name="getAllSerializedTaskDescriptions">
+ <wsdl:input message="ns:getAllSerializedTaskDescriptionsRequest" wsaw:Action="urn:getAllSerializedTaskDescriptions"/>
+ <wsdl:output message="ns:getAllSerializedTaskDescriptionsResponse" wsaw:Action="urn:getAllSerializedTaskDescriptionsResponse"/>
+ </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TaskManagementAdminServiceSoap11Binding" type="ns:TaskManagementAdminServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
- <wsdl:operation name="editTaskDescriptionAsString">
- <soap:operation soapAction="urn:editTaskDescriptionAsString" style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- </wsdl:operation>
<wsdl:operation name="getServicesList">
<soap:operation soapAction="urn:getServicesList" style="document"/>
<wsdl:input>
@@ -302,15 +317,6 @@
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getAllTaskDescriptionsAsString">
- <soap:operation soapAction="urn:getAllTaskDescriptionsAsString" style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
<wsdl:operation name="isContains">
<soap:operation soapAction="urn:isContains" style="document"/>
<wsdl:input>
@@ -344,6 +350,12 @@
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
+ <wsdl:operation name="addSerializedTaskDescription">
+ <soap:operation soapAction="urn:addSerializedTaskDescription" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
<wsdl:operation name="getAllJobGroups">
<soap:operation soapAction="urn:getAllJobGroups" style="document"/>
<wsdl:input>
@@ -368,12 +380,27 @@
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="editSerializedTaskDescription">
+ <soap:operation soapAction="urn:editSerializedTaskDescription" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
<wsdl:operation name="addTaskDescription">
<soap:operation soapAction="urn:addTaskDescription" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
+ <wsdl:operation name="getSerializedTaskDescription">
+ <soap:operation soapAction="urn:getSerializedTaskDescription" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
<wsdl:operation name="getPropertyNames">
<soap:operation soapAction="urn:getPropertyNames" style="document"/>
<wsdl:input>
@@ -383,21 +410,18 @@
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="addTaskDescriptionAsString">
- <soap:operation soapAction="urn:addTaskDescriptionAsString" style="document"/>
+ <wsdl:operation name="getAllSerializedTaskDescriptions">
+ <soap:operation soapAction="urn:getAllSerializedTaskDescriptions" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="TaskManagementAdminServiceSoap12Binding" type="ns:TaskManagementAdminServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
- <wsdl:operation name="editTaskDescriptionAsString">
- <soap12:operation soapAction="urn:editTaskDescriptionAsString" style="document"/>
- <wsdl:input>
- <soap12:body use="literal"/>
- </wsdl:input>
- </wsdl:operation>
<wsdl:operation name="getServicesList">
<soap12:operation soapAction="urn:getServicesList" style="document"/>
<wsdl:input>
@@ -407,15 +431,6 @@
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getAllTaskDescriptionsAsString">
- <soap12:operation soapAction="urn:getAllTaskDescriptionsAsString" style="document"/>
- <wsdl:input>
- <soap12:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
<wsdl:operation name="isContains">
<soap12:operation soapAction="urn:isContains" style="document"/>
<wsdl:input>
@@ -449,6 +464,12 @@
<soap12:body use="literal"/>
</wsdl:input>
</wsdl:operation>
+ <wsdl:operation name="addSerializedTaskDescription">
+ <soap12:operation soapAction="urn:addSerializedTaskDescription" style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
<wsdl:operation name="getAllJobGroups">
<soap12:operation soapAction="urn:getAllJobGroups" style="document"/>
<wsdl:input>
@@ -473,12 +494,27 @@
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="editSerializedTaskDescription">
+ <soap12:operation soapAction="urn:editSerializedTaskDescription" style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
<wsdl:operation name="addTaskDescription">
<soap12:operation soapAction="urn:addTaskDescription" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
</wsdl:operation>
+ <wsdl:operation name="getSerializedTaskDescription">
+ <soap12:operation soapAction="urn:getSerializedTaskDescription" style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
<wsdl:operation name="getPropertyNames">
<soap12:operation soapAction="urn:getPropertyNames" style="document"/>
<wsdl:input>
@@ -488,21 +524,18 @@
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="addTaskDescriptionAsString">
- <soap12:operation soapAction="urn:addTaskDescriptionAsString" style="document"/>
+ <wsdl:operation name="getAllSerializedTaskDescriptions">
+ <soap12:operation soapAction="urn:getAllSerializedTaskDescriptions" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="TaskManagementAdminServiceHttpBinding" type="ns:TaskManagementAdminServicePortType">
<http:binding verb="POST"/>
- <wsdl:operation name="editTaskDescriptionAsString">
- <http:operation location="editTaskDescriptionAsString"/>
- <wsdl:input>
- <mime:content type="text/xml" part="parameters"/>
- </wsdl:input>
- </wsdl:operation>
<wsdl:operation name="getServicesList">
<http:operation location="getServicesList"/>
<wsdl:input>
@@ -512,15 +545,6 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getAllTaskDescriptionsAsString">
- <http:operation location="getAllTaskDescriptionsAsString"/>
- <wsdl:input>
- <mime:content type="text/xml" part="parameters"/>
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="parameters"/>
- </wsdl:output>
- </wsdl:operation>
<wsdl:operation name="isContains">
<http:operation location="isContains"/>
<wsdl:input>
@@ -554,6 +578,12 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
</wsdl:operation>
+ <wsdl:operation name="addSerializedTaskDescription">
+ <http:operation location="addSerializedTaskDescription"/>
+ <wsdl:input>
+ <mime:content type="text/xml" part="parameters"/>
+ </wsdl:input>
+ </wsdl:operation>
<wsdl:operation name="getAllJobGroups">
<http:operation location="getAllJobGroups"/>
<wsdl:input>
@@ -578,12 +608,27 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="editSerializedTaskDescription">
+ <http:operation location="editSerializedTaskDescription"/>
+ <wsdl:input>
+ <mime:content type="text/xml" part="parameters"/>
+ </wsdl:input>
+ </wsdl:operation>
<wsdl:operation name="addTaskDescription">
<http:operation location="addTaskDescription"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
</wsdl:operation>
+ <wsdl:operation name="getSerializedTaskDescription">
+ <http:operation location="getSerializedTaskDescription"/>
+ <wsdl:input>
+ <mime:content type="text/xml" part="parameters"/>
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="parameters"/>
+ </wsdl:output>
+ </wsdl:operation>
<wsdl:operation name="getPropertyNames">
<http:operation location="getPropertyNames"/>
<wsdl:input>
@@ -593,11 +638,14 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="addTaskDescriptionAsString">
- <http:operation location="addTaskDescriptionAsString"/>
+ <wsdl:operation name="getAllSerializedTaskDescriptions">
+ <http:operation location="getAllSerializedTaskDescriptions"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="parameters"/>
+ </wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TaskManagementAdminService">
More information about the Carbon-commits
mailing list