Examples of DataSourceType


Examples of org.apache.cxf.aegis.type.mtom.DataSourceType

        register(tm, Source.class, XSD_ANY, new SourceType());
        register(tm, XMLStreamReader.class, XSD_ANY, new XMLStreamReaderType());
        register(tm, Element.class, XSD_ANY, new JDOMElementType());
        register(tm, org.jdom.Document.class, XSD_ANY, new JDOMDocumentType());
        register(tm, Object.class, XSD_ANY, new ObjectType());
        register(tm, DataSource.class, XSD_BASE64, new DataSourceType());
        register(tm, DataHandler.class, XSD_BASE64, new DataHandlerType());

        if (isJDK5andAbove()) {
            registerIfAvailable(tm, "javax.xml.datatype.Duration", XSD_DURATION,
                                "org.codehaus.xfire.aegis.type.java5.DurationType");
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee6.DataSourceType

        Object ref = new ResourceReferenceFactory<ResourceException>(module.getConfigId(), new AbstractNameQuery(dataSourceAbstractName), DataSource.class);
        put(jndiName, ref, getJndiContextMap(componentContext));
    }
   
    private DataSourceType processDefinition(DataSourceDefinition dsDefinition, AnnotatedApp annotatedApp) {
        DataSourceType dataSource = findDataSource(dsDefinition, annotatedApp);
        if (dataSource == null) {
            dataSource = annotatedApp.addNewDataSource();
            dataSource.addNewName().setStringValue(dsDefinition.name());
        }
       
        if (!dataSource.isSetClassName()) {
            dataSource.addNewClassName().setStringValue(dsDefinition.className());
        }
       
        if (!dataSource.isSetDescription() && dsDefinition.description().trim().length() > 0) {
            dataSource.addNewDescription().setStringValue(dsDefinition.description().trim());           
        }
       
        if (!dataSource.isSetUrl() && dsDefinition.url().trim().length() > 0) {
            dataSource.addNewUrl().setStringValue(dsDefinition.description().trim());
        }
       
        if (!dataSource.isSetUser() && dsDefinition.user().trim().length() > 0) {
            dataSource.addNewUser().setStringValue(dsDefinition.user().trim());
        }
       
        if (!dataSource.isSetPassword() && dsDefinition.password().trim().length() > 0) {
            dataSource.addNewPassword().setStringValue(dsDefinition.password().trim());
        }
       
        if (!dataSource.isSetDatabaseName() && dsDefinition.databaseName().trim().length() > 0) {
            dataSource.addNewDatabaseName().setStringValue(dsDefinition.databaseName().trim());
        }
       
        if (!dataSource.isSetPortNumber() && dsDefinition.portNumber() != -1) {
            dataSource.addNewPortNumber().setStringValue(String.valueOf(dsDefinition.portNumber()));
        }
       
        if (!dataSource.isSetServerName() && dsDefinition.serverName().trim().length() > 0) {
            dataSource.addNewServerName().setStringValue(dsDefinition.serverName().trim());
        }
       
        if (!dataSource.isSetUrl() && dsDefinition.url().trim().length() > 0) {
            dataSource.addNewUrl().setStringValue(dsDefinition.url().trim());
        }
       
        if (!dataSource.isSetInitialPoolSize() && dsDefinition.initialPoolSize() != -1) {
            dataSource.addNewInitialPoolSize().setStringValue(String.valueOf(dsDefinition.initialPoolSize()));           
        }
       
        if (!dataSource.isSetMaxPoolSize() && dsDefinition.maxPoolSize() != -1) {
            dataSource.addNewMaxPoolSize().setStringValue(String.valueOf(dsDefinition.maxPoolSize()));           
        }
       
        if (!dataSource.isSetMinPoolSize() && dsDefinition.minPoolSize() != -1) {
            dataSource.addNewMinPoolSize().setStringValue(String.valueOf(dsDefinition.minPoolSize()));           
        }
       
        if (!dataSource.isSetMaxIdleTime() && dsDefinition.maxIdleTime() != -1) {
            dataSource.addNewMaxIdleTime().setStringValue(String.valueOf(dsDefinition.maxIdleTime()));           
        }
       
        if (!dataSource.isSetMaxStatements() && dsDefinition.maxStatements() != -1) {
            dataSource.addNewMaxStatements().setStringValue(String.valueOf(dsDefinition.maxStatements()));           
        }
       
        if (!dataSource.isSetLoginTimeout() && dsDefinition.loginTimeout() != 0) {
            dataSource.addNewLoginTimeout().setStringValue(String.valueOf(dsDefinition.loginTimeout()));           
        }
       
        if (!dataSource.isSetIsolationLevel() && dsDefinition.isolationLevel() != -1) {
            dataSource.setIsolationLevel(IsolationLevelType.Enum.forInt(dsDefinition.isolationLevel()));
        }
       
        if (!dataSource.isSetTransactional()) {
            dataSource.addNewTransactional().setBooleanValue(dsDefinition.transactional());
        }
       
        if (dataSource.getPropertyArray() == null || dataSource.getPropertyArray().length == 0) {
            String[] properties = dsDefinition.properties();
            if (properties != null) {
                for (String property : properties) {
                    String[] tokens = property.split("=");
                    PropertyType propertyType = dataSource.addNewProperty();
                    propertyType.addNewName().setStringValue(tokens[0]);
                    propertyType.addNewValue().setStringValue(tokens[1]);                   
                }              
            }
        }
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee6.DataSourceType

            MergeItem mergeItem = (MergeItem) mergeContext.getAttribute(dataSourceKey);
            if (mergeItem != null && mergeItem.isFromWebFragment()) {
                throw new DeploymentException(WebDeploymentMessageUtils.createDuplicateJNDIRefMessage("data-source", srcDataSource.getName().getStringValue(), mergeContext.getCurrentJarUrl(), mergeItem
                        .getBelongedURL()));
            }
            DataSourceType targetDataSource = (DataSourceType) webApp.addNewDataSource().set(srcDataSource);
            mergeContext.setAttribute(dataSourceKey, new MergeItem(targetDataSource, mergeContext.getCurrentJarUrl(), ElementSource.WEB_FRAGMENT));
        }
    }
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.mtom.DataSourceType

        register(soapTM, Source.class, XSD_ANY, new SourceType());
        register(soapTM, XMLStreamReader.class, XSD_ANY, new XMLStreamReaderType());
        register(soapTM, Element.class, XSD_ANY, new JDOMElementType());
        register(soapTM, org.jdom.Document.class, XSD_ANY, new JDOMDocumentType());
        register(soapTM, Object.class, XSD_ANY, new ObjectType());
        register(soapTM, DataSource.class, XSD_BASE64, new DataSourceType());
        register(soapTM, DataHandler.class, XSD_BASE64, new DataHandlerType());
        register(soapTM, BigInteger.class, XSD_INTEGER, new BigIntegerType());
       
        register(ENCODED_NS, soapTM);
       
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.mtom.DataSourceType

        register(tm, Source.class, XSD_ANY, new SourceType());
        register(tm, XMLStreamReader.class, XSD_ANY, new XMLStreamReaderType());
        register(tm, Element.class, XSD_ANY, new JDOMElementType());
        register(tm, org.jdom.Document.class, XSD_ANY, new JDOMDocumentType());
        register(tm, Object.class, XSD_ANY, new ObjectType());
        register(tm, DataSource.class, XSD_BASE64, new DataSourceType());
        register(tm, DataHandler.class, XSD_BASE64, new DataHandlerType());

        if ( isJDK5andAbove())
        {
            registerIfAvailable(tm, "javax.xml.datatype.Duration", XSD_DURATION, "org.codehaus.xfire.aegis.type.java5.DurationType");
View Full Code Here

Examples of org.jtester.module.database.util.DataSourceType

   * @param password
   * @return
   */
  public static DBEnvironment getDBEnvironment(String type, String driver, String url, String username,
      String password) {
    DataSourceType dataSourceType = DataSourceType.databaseType(type);
    String dataSourceFrom = "customized-" + UUID.randomUUID().toString();
    DBEnvironment enviroment = newInstance(dataSourceType, CUSTOMIZED_DATASOURCE_NAME, dataSourceFrom);
    environments.put(DEFAULT_DATASOURCE_NAME + "=" + dataSourceFrom, enviroment);

    if (StringHelper.isBlankOrNull(driver)) {
View Full Code Here

Examples of org.jtester.module.database.util.DataSourceType

          && DEFAULT_DATASOURCE_FROM.equalsIgnoreCase(dataSourceFrom) == false) {
        props = ResourceHelper.loadPropertiesFrom(dataSourceFrom);
      }
      String typeProperty = ConfigurationHelper.getString(props,
          getMergeKey(dataSourceName, PROPKEY_DATABASE_TYPE));
      DataSourceType dataSourceType = DataSourceType.databaseType(typeProperty);

      enviroment = newInstance(dataSourceType, dataSourceName, dataSourceFrom);

      environments.put(dataSourceName + "=" + dataSourceFrom, enviroment);
View Full Code Here

Examples of slash.navigation.datasources.binding.DatasourceType

import static slash.navigation.datasources.DataSourcesUtil.createChecksumType;

public class HgtFilesIT {

    private DataSource createDataSource(String id, String name, String baseUrl, String directory) {
        DatasourceType datasourceType = new DatasourceType();
        datasourceType.setId(id);
        datasourceType.setName(name);
        datasourceType.setBaseUrl(baseUrl);
        datasourceType.setDirectory(directory);

        FileType fileType1 = new FileType();
        fileType1.setUri("Eurasia/N59E011.hgt.zip");
        FragmentType fragmentType1 = new FragmentType();
        fragmentType1.setKey("N59E011");
        fileType1.getFragment().add(fragmentType1);
        datasourceType.getFile().add(fileType1);

        FileType fileType2 = new FileType();
        fileType2.setUri("Eurasia/N60E012.hgt.zip");
        FragmentType fragmentType2 = new FragmentType();
        fragmentType2.setKey("N60E012");
        fragmentType2.getChecksum().add(createChecksumType(2884802L, calendar(2009, 1, 15, 11, 6, 16), "395C9F5202BC8ECF0CCAAE567772FA7955774FEA"));
        fileType2.getFragment().add(fragmentType2);
        datasourceType.getFile().add(fileType2);

        FileType fileType3 = new FileType();
        fileType3.setUri("I36.zip");
        fileType3.getChecksum().add(createChecksumType(4987465L, calendar(2013, 1, 20, 17, 42, 36), "99982D1554A9F2B9CA49642E78BCD8192FC9DEF3"));
        FragmentType fragmentType3 = new FragmentType();
        fragmentType3.setKey("N32E034");
        fragmentType3.getChecksum().add(createChecksumType(2884802L, calendar(2012, 5, 14, 20, 51, 32), "AD36AA9709ECAE64718308EBB1659C5BB4327A74"));
        fileType3.getFragment().add(fragmentType3);
        FragmentType fragmentType4 = new FragmentType();
        fragmentType4.setKey("N32E035");
        fragmentType4.getChecksum().add(createChecksumType(287465L, calendar(2011, 1, 20, 17, 42, 36), "B9982D1554A9F2B9CA49642E78BCD8192FC9DEF3"));
        fileType3.getFragment().add(fragmentType4);
        datasourceType.getFile().add(fileType3);

        return new DataSourceImpl(datasourceType);
    }
View Full Code Here

Examples of slash.navigation.datasources.binding.DatasourceType

    private static String createDataSourceXml(DataSource dataSource, Map<FileAndChecksum, List<FileAndChecksum>> fileAndChecksums, String... filterUrls) throws IOException {
        slash.navigation.datasources.binding.ObjectFactory objectFactory = new slash.navigation.datasources.binding.ObjectFactory();

        DatasourcesType datasourcesType = objectFactory.createDatasourcesType();
        DatasourceType datasourceType = asDatasourceType(dataSource, fileAndChecksums, filterUrls);
        datasourcesType.getDatasource().add(datasourceType);

        return DataSourcesUtil.toXml(datasourcesType);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.