public final class TAPConfiguration
extends java.lang.Object
This class implements the Design Pattern "Utility": no instance of this class can be created, it can not be extended, and it must be used only thanks to its static classes and attributes.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ASYNC_FETCH_SIZE
Default value of the property
KEY_ASYNC_FETCH_SIZE : 10000. |
static boolean |
DEFAULT_BACKUP_BY_USER
Default value of the property
KEY_BACKUP_BY_USER : false. |
static long |
DEFAULT_BACKUP_FREQUENCY
Default value of the property
KEY_BACKUP_FREQUENCY : DEFAULT_BACKUP_FREQUENCY . |
static boolean |
DEFAULT_DIRECTORY_PER_USER
Default value of the property
KEY_DIRECTORY_PER_USER : false. |
static int |
DEFAULT_EXECUTION_DURATION
Default value of the property
KEY_DEFAULT_EXECUTION_DURATION and KEY_MAX_EXECUTION_DURATION : 0. |
static java.lang.String |
DEFAULT_FILE_MANAGER
Default value of the property
KEY_FILE_MANAGER : "local". |
static boolean |
DEFAULT_FIX_ON_FAIL
Default value of the property
KEY_FIX_ON_FAIL :
false. |
static boolean |
DEFAULT_GROUP_USER_DIRECTORIES
Default value of the property
KEY_GROUP_USER_DIRECTORIES : false. |
static java.lang.String |
DEFAULT_LOGGER
Default value of the property
KEY_LOGGER :
"default". |
static int |
DEFAULT_MAX_ASYNC_JOBS
Default value of the property
KEY_MAX_ASYNC_JOBS : 0. |
static java.lang.String |
DEFAULT_MAX_UPLOAD_LIMIT
Default value of the property "upload_max_db_limit" =
"1000000r".
|
static int |
DEFAULT_RETENTION_PERIOD
Default value of the properties
KEY_DEFAULT_RETENTION_PERIOD and KEY_MAX_RETENTION_PERIOD :
0. |
static int |
DEFAULT_SYNC_FETCH_SIZE
Default value of the property
KEY_SYNC_FETCH_SIZE : 1000. |
static java.lang.String |
DEFAULT_TAP_CONF_FILE
Default TAP configuration file.
|
static int |
DEFAULT_UPLOAD_MAX_FILE_SIZE
Deprecated.
Since 2.3, use the property "upload_max_db_limit"
and "upload_max_request_size" instead.
|
static int |
DEFAULT_UPLOAD_MAX_REQUEST_SIZE
Default value of the property "upload_max_request_size" =
262144000.
|
static java.lang.String |
KEY_ADD_TAP_RESOURCES
Name/Key of the property specifying a list of resources to add to the TAP service (e.g.
|
static java.lang.String |
KEY_ASYNC_FETCH_SIZE
Name/Key of the property specifying by how many rows the library should fetch a query result from the database.
|
static java.lang.String |
KEY_BACKUP_BY_USER
Name/Key of the property indicating whether there should be one backup file per user or one file for all.
|
static java.lang.String |
KEY_BACKUP_FREQUENCY
Name/Key of the property specifying the frequency (in milliseconds) of jobs backup.
|
static java.lang.String |
KEY_CAPABILITIES_STYLESHEET
Name/Key of the property specifying the XSLT stylesheet to use for /capabilities.
|
static java.lang.String |
KEY_COORD_SYS
Name/Key of the property specifying the list of all allowed coordinate systems that can be used in ADQL queries.
|
static java.lang.String |
KEY_DATABASE_ACCESS
Name/Key of the property specifying the database access method to use.
|
static java.lang.String |
KEY_DATALINK
Name/Key of the property providing the API for the Datalink capability.
|
static java.lang.String |
KEY_DATASOURCE_JNDI_NAME
Name/Key of the property specifying the name of the DataSource into the JDNI.
|
static java.lang.String |
KEY_DB_PASSWORD
Name/Key of the property specifying the password of the database user.
|
static java.lang.String |
KEY_DB_USERNAME
Name/Key of the property specifying the database user name to use to access the database.
|
static java.lang.String |
KEY_DEFAULT_EXECUTION_DURATION
Name/Key of the property specifying the default execution duration (in milliseconds) set automatically to a job
if none has been specified by the user.
|
static java.lang.String |
KEY_DEFAULT_OUTPUT_LIMIT
Name/Key of the property specifying the number of result rows that should be returned if none is specified by the user.
|
static java.lang.String |
KEY_DEFAULT_RETENTION_PERIOD
Name/Key of the property specifying the default period (in seconds) while a job must remain on the server.
|
static java.lang.String |
KEY_DEFAULT_UPLOAD_LIMIT
Deprecated.
Since 2.3, use the property "upload_max_db_limit"
instead.
|
static java.lang.String |
KEY_DIRECTORY_PER_USER
Name/Key of the property indicating whether the jobs must be saved by user or not.
|
static java.lang.String |
KEY_EXAMPLES
Name/Key of the property specifying the content of the
/examples endpoint. |
static java.lang.String |
KEY_FILE_MANAGER
Name/Key of the property setting the file manager to use in the TAP service.
|
static java.lang.String |
KEY_FILE_ROOT_PATH
Name/Key of the property setting the local root directory where all TAP files must be stored.
|
static java.lang.String |
KEY_FIX_ON_FAIL
Name/Key of the property specifying whether the fixOnFail option is
enabled or not.
|
static java.lang.String |
KEY_GEOMETRIES
Name/Key of the property specifying the list of all ADQL geometrical function that can be used in ADQL queries.
|
static java.lang.String |
KEY_GROUP_USER_DIRECTORIES
Name/Key of the property indicating whether the user directories (in which jobs of the user are backuped)
must be gathered in less directories.
|
static java.lang.String |
KEY_HOME_PAGE
Name/Key of the property specifying the TAP home page to use.
|
static java.lang.String |
KEY_HOME_PAGE_MIME_TYPE
Name/Key of the property specifying the MIME type of the set home page.
|
static java.lang.String |
KEY_JDBC_DRIVER
Name/Key of the property specifying the full class name of the JDBC driver.
|
static java.lang.String |
KEY_JDBC_URL
Name/Key of the property specifying the JDBC URL of the database to access.
|
static java.lang.String |
KEY_LOG_ROTATION
Name/Key of the property specifying the frequency of the log file
rotation to set in the default logger.
|
static java.lang.String |
KEY_LOGGER
Name/Key of the property specifying the logger to use.
|
static java.lang.String |
KEY_MAX_ASYNC_JOBS
Name/Key of the property specifying the maximum number of asynchronous jobs that can run simultaneously.
|
static java.lang.String |
KEY_MAX_EXECUTION_DURATION
Name/Key of the property specifying the maximum execution duration (in milliseconds) that can be set on a job.
|
static java.lang.String |
KEY_MAX_OUTPUT_LIMIT
Name/Key of the property specifying the maximum number of result rows that can be returned by the TAP service.
|
static java.lang.String |
KEY_MAX_RETENTION_PERIOD
Name/Key of the property specifying the maximum period (in seconds) while a job can remain on the server.
|
static java.lang.String |
KEY_MAX_UPLOAD_LIMIT
Name/Key of the property specifying the maximum limit (in rows or bytes)
on the uploaded VOTable(s).
|
static java.lang.String |
KEY_METADATA
Name/Key of the property specifying where the list of schemas, tables and columns and their respective metadata
is provided.
|
static java.lang.String |
KEY_METADATA_FILE
Name/Key of the property specifying the local file path of the XML file containing the TAP metadata to load.
|
static java.lang.String |
KEY_MIN_LOG_LEVEL
Name/Key of the property specifying the minimum type of messages
(i.e.
|
static java.lang.String |
KEY_OUTPUT_FORMATS
Name/Key of the property specifying the list of all result output formats to support.
|
static java.lang.String |
KEY_PROVIDER_NAME
Name/Key of the property specifying the name of the organization/person providing the TAP service.
|
static java.lang.String |
KEY_SERVICE_DESCRIPTION
Name/Key of the property specifying the description of the TAP service.
|
static java.lang.String |
KEY_SQL_TRANSLATOR
Name/Key of the property specifying the ADQL to SQL translator to use.
|
static java.lang.String |
KEY_SYNC_FETCH_SIZE
Name/Key of the property specifying by how many rows the library should fetch a query result from the database.
|
static java.lang.String |
KEY_TABLES_STYLESHEET
Name/Key of the property specifying the XSLT stylesheet to use for /tables.
|
static java.lang.String |
KEY_TAP_FACTORY
Name/Key of the property specifying the
TAPFactory class to use instead of the default ConfigurableTAPFactory . |
static java.lang.String |
KEY_UDFS
Name/Key of the property that lets declare all User Defined Functions that must be allowed in ADQL queries.
|
static java.lang.String |
KEY_UPLOAD_ENABLED
Name/Key of the property indicating whether the UPLOAD feature must be
enabled or not.
|
static java.lang.String |
KEY_UPLOAD_MAX_FILE_SIZE
Deprecated.
Since 2.3, use the property "upload_max_db_limit"
and "upload_max_request_size" instead.
|
static java.lang.String |
KEY_UPLOAD_MAX_REQUEST_SIZE
Name/Key of the property specifying the maximum size of a whole HTTP
Multipart Request.
|
static java.lang.String |
KEY_USER_IDENTIFIER
Name/Key of the property specifying the user identification method to use.
|
static java.lang.String |
SLF4J_LOGGER
SLF4J logger value: "slf4j".
|
static java.lang.String |
TAP_CONF_PARAMETER
Name of the initial parameter to set in the WEB-INF/web.xml file
in order to specify the location and the name of the TAP configuration file to load.
|
static java.lang.String |
VALUE_ALL
Value of the property
KEY_OUTPUT_FORMATS which select all formats that the library can provide. |
static java.lang.String |
VALUE_ANY
Value of
KEY_UDFS allowing any unknown function in ADQL queries. |
static java.lang.String |
VALUE_CSV
Value of the property
KEY_OUTPUT_FORMATS which select a CSV format. |
static java.lang.String |
VALUE_DB
Value of the property
KEY_METADATA which indicates that metadata are already in the TAP_SCHEMA of the database. |
static java.lang.String |
VALUE_FITS
Value of the property
KEY_OUTPUT_FORMATS which select a FITS format. |
static java.lang.String |
VALUE_HTML
Value of the property
KEY_OUTPUT_FORMATS which select an HTML format. |
static java.lang.String |
VALUE_JDBC
Value of the property
KEY_DATABASE_ACCESS to select the simple JDBC method. |
static java.util.HashMap<java.lang.String,java.lang.String> |
VALUE_JDBC_DRIVERS
List of the most known JDBC drivers.
|
static java.lang.String |
VALUE_JNDI
Value of the property
KEY_DATABASE_ACCESS to access the database using a DataSource stored in JNDI. |
static java.lang.String |
VALUE_JSON
Value of the property
KEY_OUTPUT_FORMATS which select a JSON format. |
static java.lang.String |
VALUE_LOCAL
Value of the property
KEY_FILE_MANAGER specifying a local file manager. |
static java.lang.String |
VALUE_MYSQL
Value of the property
KEY_SQL_TRANSLATOR to select a MySQL translator. |
static java.lang.String |
VALUE_NEVER
Value of the property
KEY_BACKUP_FREQUENCY indicating that jobs should never be backuped. |
static java.lang.String |
VALUE_NONE
Value of
KEY_COORD_SYS and KEY_GEOMETRIES that forbid all possible values. |
static java.lang.String |
VALUE_PGSPHERE
Value of the property
KEY_SQL_TRANSLATOR to select a PgSphere translator. |
static java.lang.String |
VALUE_POSTGRESQL
Value of the property
KEY_SQL_TRANSLATOR to select a PostgreSQL translator (no support for geometrical functions). |
static java.lang.String |
VALUE_SQLSERVER
Value of the property
KEY_SQL_TRANSLATOR to select an SQLServer translator. |
static java.lang.String |
VALUE_SV
Value of the property
KEY_OUTPUT_FORMATS which select a Separated-Value format. |
static java.lang.String |
VALUE_TEXT
Value of the property
KEY_OUTPUT_FORMATS which select a human-readable table. |
static java.lang.String |
VALUE_TSV
Value of the property
KEY_OUTPUT_FORMATS which select a TSV format. |
static java.lang.String |
VALUE_USER_ACTION
Value of the property
KEY_BACKUP_FREQUENCY indicating that job backup should occur only when the user
creates or modifies one of his jobs. |
static java.lang.String |
VALUE_VOT
Value of the property
KEY_OUTPUT_FORMATS which select a VOTable format. |
static java.lang.String |
VALUE_VOTABLE
Value of the property
KEY_OUTPUT_FORMATS which select a VOTable format. |
static java.lang.String |
VALUE_XML
Value of the property
KEY_METADATA which indicates that metadata are provided in an XML file, whose the
local path is given by the property KEY_METADATA_FILE . |
Modifier and Type | Method and Description |
---|---|
static <C> java.lang.Class<? extends C> |
fetchClass(java.lang.String value,
java.lang.String propertyName,
java.lang.Class<C> expectedType)
Fetch the class object corresponding to the class name provided between brackets in the given value.
|
static java.lang.String |
getProperty(java.util.Properties prop,
java.lang.String key)
Read the asked property from the given Properties object.
|
static <C> boolean |
hasConstructor(java.lang.String propValue,
java.lang.String propName,
java.lang.Class<C> expectedType,
java.lang.Class<?>[] pTypes)
Test whether the specified class has a constructor with the specified parameters.
|
static boolean |
isClassName(java.lang.String value)
Test whether a property value is a class name.
|
static <C> C |
newInstance(java.lang.String propValue,
java.lang.String propName,
java.lang.Class<C> expectedType)
Create an instance of the specified class.
|
static <C> C |
newInstance(java.lang.String propValue,
java.lang.String propName,
java.lang.Class<C> expectedType,
java.lang.Class<?>[] pTypes,
java.lang.Object[] parameters)
Create an instance of the specified class.
|
static java.lang.Object[] |
parseLimit(java.lang.String value,
java.lang.String propertyName,
boolean areBytesAllowed)
Lets parsing a limit (for output, upload, ...) with its numeric value
and its unit.
|
static java.lang.Object[] |
parseLimit(java.lang.String value,
java.lang.String propertyName,
boolean areBytesAllowed,
boolean longValue)
Lets parsing a limit (for output, upload, ...) with its numeric value
and its unit.
|
public static final java.lang.String TAP_CONF_PARAMETER
public static final java.lang.String DEFAULT_TAP_CONF_FILE
public static final java.lang.String KEY_FILE_MANAGER
public static final java.lang.String VALUE_LOCAL
KEY_FILE_MANAGER
specifying a local file manager.public static final java.lang.String DEFAULT_FILE_MANAGER
KEY_FILE_MANAGER
: "local".public static final java.lang.String KEY_FILE_ROOT_PATH
KEY_FILE_MANAGER
is set to VALUE_LOCAL
.public static final java.lang.String KEY_DIRECTORY_PER_USER
KEY_FILE_ROOT_PATH
).public static final boolean DEFAULT_DIRECTORY_PER_USER
KEY_DIRECTORY_PER_USER
: false.public static final java.lang.String KEY_GROUP_USER_DIRECTORIES
public static final boolean DEFAULT_GROUP_USER_DIRECTORIES
KEY_GROUP_USER_DIRECTORIES
: false.public static final java.lang.String KEY_DEFAULT_RETENTION_PERIOD
public static final java.lang.String KEY_MAX_RETENTION_PERIOD
public static final int DEFAULT_RETENTION_PERIOD
KEY_DEFAULT_RETENTION_PERIOD
and KEY_MAX_RETENTION_PERIOD
:
0.public static final java.lang.String KEY_LOGGER
DefaultTAPLog
is used.public static final java.lang.String DEFAULT_LOGGER
KEY_LOGGER
:
"default".public static final java.lang.String KEY_MIN_LOG_LEVEL
By default all messages are logged...which is equivalent to set this property to "DEBUG".
Note: If KEY_LOGGER
is set to a value different
from "default", this property is ignored.
public static final java.lang.String KEY_LOG_ROTATION
By default the log rotation occurs every day at midnight.
Note: If KEY_LOGGER
is set to a value different
from "default", this property is ignored.
public static final java.lang.String SLF4J_LOGGER
public static final java.lang.String KEY_BACKUP_FREQUENCY
public static final java.lang.String VALUE_NEVER
KEY_BACKUP_FREQUENCY
indicating that jobs should never be backuped.public static final java.lang.String VALUE_USER_ACTION
KEY_BACKUP_FREQUENCY
indicating that job backup should occur only when the user
creates or modifies one of his jobs. This value can be used ONLY IF KEY_BACKUP_BY_USER
is "true".public static final long DEFAULT_BACKUP_FREQUENCY
KEY_BACKUP_FREQUENCY
: DEFAULT_BACKUP_FREQUENCY
.public static final java.lang.String KEY_BACKUP_BY_USER
public static final boolean DEFAULT_BACKUP_BY_USER
KEY_BACKUP_BY_USER
: false.
This property can be enabled only if a user identification method is provided.public static final java.lang.String KEY_MAX_ASYNC_JOBS
public static final int DEFAULT_MAX_ASYNC_JOBS
KEY_MAX_ASYNC_JOBS
: 0.public static final java.lang.String KEY_DEFAULT_EXECUTION_DURATION
public static final java.lang.String KEY_MAX_EXECUTION_DURATION
public static final int DEFAULT_EXECUTION_DURATION
KEY_DEFAULT_EXECUTION_DURATION
and KEY_MAX_EXECUTION_DURATION
: 0.public static final java.lang.String KEY_DATABASE_ACCESS
public static final java.lang.String VALUE_JDBC
KEY_DATABASE_ACCESS
to select the simple JDBC method.public static final java.lang.String VALUE_JNDI
KEY_DATABASE_ACCESS
to access the database using a DataSource stored in JNDI.public static final java.lang.String KEY_SQL_TRANSLATOR
public static final java.lang.String VALUE_POSTGRESQL
KEY_SQL_TRANSLATOR
to select a PostgreSQL translator (no support for geometrical functions).public static final java.lang.String VALUE_PGSPHERE
KEY_SQL_TRANSLATOR
to select a PgSphere translator.public static final java.lang.String VALUE_SQLSERVER
KEY_SQL_TRANSLATOR
to select an SQLServer translator.public static final java.lang.String VALUE_MYSQL
KEY_SQL_TRANSLATOR
to select a MySQL translator.public static final java.lang.String KEY_SYNC_FETCH_SIZE
public static final int DEFAULT_SYNC_FETCH_SIZE
KEY_SYNC_FETCH_SIZE
: 1000.public static final java.lang.String KEY_ASYNC_FETCH_SIZE
public static final int DEFAULT_ASYNC_FETCH_SIZE
KEY_ASYNC_FETCH_SIZE
: 10000.public static final java.lang.String KEY_FIX_ON_FAIL
public static final boolean DEFAULT_FIX_ON_FAIL
KEY_FIX_ON_FAIL
:
false.public static final java.lang.String KEY_DATASOURCE_JNDI_NAME
public static final java.lang.String KEY_JDBC_DRIVER
VALUE_JDBC_DRIVERS
.public static final java.util.HashMap<java.lang.String,java.lang.String> VALUE_JDBC_DRIVERS
public static final java.lang.String KEY_JDBC_URL
public static final java.lang.String KEY_DB_USERNAME
public static final java.lang.String KEY_DB_PASSWORD
public static final java.lang.String KEY_METADATA
public static final java.lang.String VALUE_XML
KEY_METADATA
which indicates that metadata are provided in an XML file, whose the
local path is given by the property KEY_METADATA_FILE
.public static final java.lang.String VALUE_DB
KEY_METADATA
which indicates that metadata are already in the TAP_SCHEMA of the database.public static final java.lang.String KEY_METADATA_FILE
public static final java.lang.String KEY_DATALINK
public static final java.lang.String KEY_HOME_PAGE
public static final java.lang.String KEY_HOME_PAGE_MIME_TYPE
public static final java.lang.String KEY_EXAMPLES
Name/Key of the property specifying the content of the /examples
endpoint.
It can be a file or a URL. If null, the TAP service will not have any
/examples
endpoint (which is optional in the TAP 1.1 standard.
Note: The specified content must be an XHTML+RDFa document whose the expected syntax is defined either by TAPNotes 1.0 or DALI 1.0.
public static final java.lang.String KEY_PROVIDER_NAME
public static final java.lang.String KEY_SERVICE_DESCRIPTION
public static final java.lang.String KEY_UPLOAD_ENABLED
@Deprecated public static final java.lang.String KEY_DEFAULT_UPLOAD_LIMIT
public static final java.lang.String KEY_MAX_UPLOAD_LIMIT
public static final java.lang.String DEFAULT_MAX_UPLOAD_LIMIT
@Deprecated public static final java.lang.String KEY_UPLOAD_MAX_FILE_SIZE
@Deprecated public static final int DEFAULT_UPLOAD_MAX_FILE_SIZE
public static final java.lang.String KEY_UPLOAD_MAX_REQUEST_SIZE
public static final int DEFAULT_UPLOAD_MAX_REQUEST_SIZE
public static final java.lang.String KEY_OUTPUT_FORMATS
public static final java.lang.String VALUE_ALL
KEY_OUTPUT_FORMATS
which select all formats that the library can provide.public static final java.lang.String VALUE_VOTABLE
KEY_OUTPUT_FORMATS
which select a VOTable format.
The format can be parameterized with the VOTable version and serialization.public static final java.lang.String VALUE_VOT
KEY_OUTPUT_FORMATS
which select a VOTable format.
The format can be parameterized with the VOTable version and serialization.
This value is just an alias of VALUE_VOTABLE
.public static final java.lang.String VALUE_FITS
KEY_OUTPUT_FORMATS
which select a FITS format.public static final java.lang.String VALUE_JSON
KEY_OUTPUT_FORMATS
which select a JSON format.public static final java.lang.String VALUE_HTML
KEY_OUTPUT_FORMATS
which select an HTML format.public static final java.lang.String VALUE_TEXT
KEY_OUTPUT_FORMATS
which select a human-readable table.public static final java.lang.String VALUE_CSV
KEY_OUTPUT_FORMATS
which select a CSV format.public static final java.lang.String VALUE_TSV
KEY_OUTPUT_FORMATS
which select a TSV format.public static final java.lang.String VALUE_SV
KEY_OUTPUT_FORMATS
which select a Separated-Value format.
This value must be parameterized with the separator to use.public static final java.lang.String KEY_DEFAULT_OUTPUT_LIMIT
public static final java.lang.String KEY_MAX_OUTPUT_LIMIT
public static final java.lang.String KEY_USER_IDENTIFIER
public static final java.lang.String KEY_COORD_SYS
public static final java.lang.String KEY_GEOMETRIES
public static final java.lang.String VALUE_NONE
KEY_COORD_SYS
and KEY_GEOMETRIES
that forbid all possible values.public static final java.lang.String KEY_UDFS
VALUE_ANY
public static final java.lang.String VALUE_ANY
KEY_UDFS
allowing any unknown function in ADQL queries. Those functions will be considered as UDFs
and will be translated into SQL exactly as they are written in ADQL.public static final java.lang.String KEY_CAPABILITIES_STYLESHEET
public static final java.lang.String KEY_TABLES_STYLESHEET
public static final java.lang.String KEY_ADD_TAP_RESOURCES
public static final java.lang.String KEY_TAP_FACTORY
TAPFactory
class to use instead of the default ConfigurableTAPFactory
.
Setting a value to this property could disable several properties of the TAP configuration file.public static final java.lang.String getProperty(java.util.Properties prop, java.lang.String key)
Read the asked property from the given Properties object.
prop
- List of propertykey
- Property whose the value is requested.public static final boolean isClassName(java.lang.String value)
value
- Property value.public static final <C> java.lang.Class<? extends C> fetchClass(java.lang.String value, java.lang.String propertyName, java.lang.Class<C> expectedType) throws TAPException
value
- Value which is supposed to contain the class name between brackets (see isClassName(String)
for more details)propertyName
- Name of the property associated with the parameter "value".expectedType
- Type of the class expected to be returned ; it is also the type which parameterizes this function: C.TAPException
- If the class name is incorrect
or if its type is not compatible with the parameterized type C (represented by the parameter "expectedType").isClassName(String)
public static final <C> boolean hasConstructor(java.lang.String propValue, java.lang.String propName, java.lang.Class<C> expectedType, java.lang.Class<?>[] pTypes) throws TAPException
propValue
- Value which is supposed to contain the class name between brackets (see isClassName(String)
for more details)propName
- Name of the property associated with the parameter "propValue".expectedType
- Type of the class expected to be returned ; it is also the type which parameterizes this function: C.pTypes
- List of each constructor parameter type. Each type MUST be exactly the type declared in the class constructor to select. NULL or empty array if no parameter.true
if the specified class has a constructor with the specified parameters,
false
otherwise.TAPException
- If the class name is incorrect
or if its type is not compatible with the parameterized type C (represented by the parameter "expectedType").public static final <C> C newInstance(java.lang.String propValue, java.lang.String propName, java.lang.Class<C> expectedType) throws TAPException
Create an instance of the specified class. The class name is expected to be surrounded by {} in the given value.
The instance is created using the empty constructor of the specified class.
propValue
- Value which is supposed to contain the class name between brackets (see isClassName(String)
for more details)propName
- Name of the property associated with the parameter "propValue".expectedType
- Type of the class expected to be returned ; it is also the type which parameterizes this function: C.TAPException
- If the class name is incorrect
or if its type is not compatible with the parameterized type C (represented by the parameter "expectedType")
or if the specified class has no empty constructor
or if an error occurred while calling this constructor.isClassName(String)
,
fetchClass(String, String, Class)
public static final <C> C newInstance(java.lang.String propValue, java.lang.String propName, java.lang.Class<C> expectedType, java.lang.Class<?>[] pTypes, java.lang.Object[] parameters) throws TAPException
Create an instance of the specified class. The class name is expected to be surrounded by {} in the given value.
IMPORTANT: The instance is created using the constructor whose the declaration matches exactly with the given list of parameter types. The number and types of given parameters MUST match exactly to the list of parameter types.
propValue
- Value which is supposed to contain the class name between brackets (see isClassName(String)
for more details)propName
- Name of the property associated with the parameter "propValue".expectedType
- Type of the class expected to be returned ; it is also the type which parameterizes this function: C.pTypes
- List of each constructor parameter type. Each type MUST be exactly the type declared in the class constructor to select. NULL or empty array if no parameter.parameters
- List of all constructor parameters. The number of object MUST match exactly the number of classes provided in the parameter pTypes. NULL or empty array if no parameter.TAPException
- If the class name is incorrect
or if its type is not compatible with the parameterized type C (represented by the parameter "expectedType")
or if the constructor with the specified parameters can not be found
or if an error occurred while calling this constructor.isClassName(String)
,
fetchClass(String, String, Class)
public static final java.lang.Object[] parseLimit(java.lang.String value, java.lang.String propertyName, boolean areBytesAllowed) throws TAPException
Here is the expected syntax: num_val[unit]. Where unit is optional and should be one of the following values: r or R, B, kB, MB, GB. If the unit is not specified, it is set by default to ROWS.
Note: If the value is strictly less than 0 (whatever is the unit), the returned value will be -1.
value
- Property value (must follow the limit syntax:
num_val[unit] ; ex: 20kB or 2000
(for 2000 rows)).propertyName
- Name of the property which specify the limit.areBytesAllowed
- Tells whether the unit BYTES is allowed. If not
and a BYTES unit is encountered, then an
exception is thrown.ServiceConnection.LimitUnit
).TAPException
- If the syntax is incorrect
or if a not allowed unit has been used.parseLimit(String, String, boolean, boolean)
public static final java.lang.Object[] parseLimit(java.lang.String value, java.lang.String propertyName, boolean areBytesAllowed, boolean longValue) throws TAPException
Here is the expected syntax: num_val[unit]. Where unit is optional and should be one of the following values: r or R, B, kB, MB, GB. If the unit is not specified, it is set by default to ROWS.
Note: If the value is strictly less than 0 (whatever is the unit), the returned value will be -1.
value
- Property value (must follow the limit syntax:
num_val[unit] ; ex: 20kB or 2000
(for 2000 rows)).propertyName
- Name of the property which specify the limit.areBytesAllowed
- Tells whether the unit BYTES is allowed. If not
and a BYTES unit is encountered, then an
exception is thrown.longValue
- true
to get the limit as a long,
false
to get it as an int.ServiceConnection.LimitUnit
).TAPException
- If the syntax is incorrect
or if a not allowed unit has been used.