diff --git a/cli/.gitignore b/cli/.gitignore new file mode 100644 index 00000000..6522c00e --- /dev/null +++ b/cli/.gitignore @@ -0,0 +1,7 @@ +.classpath +.project +.settings +target +bin +src/test/java/org/jboss/shrinkwrap/descriptor/api +src/test/java/org/jboss/shrinkwrap/descriptor/impl diff --git a/cli/log.txt b/cli/log.txt new file mode 100644 index 00000000..2127aff6 --- /dev/null +++ b/cli/log.txt @@ -0,0 +1,604 @@ +[INFO] Scanning for projects... +[INFO] +[INFO] ------------------------------------------------------------------------ +[INFO] Building ShrinkWrap Descriptors CLI 1.2.0-alpha-2-SNAPSHOT +[INFO] ------------------------------------------------------------------------ +[WARNING] The artifact saxon:saxon:jar:8.7 has been relocated to net.sf.saxon:saxon:jar:8.7 +[INFO] +[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ shrinkwrap-descriptors-cli --- +[INFO] Deleting file set: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target (included: [**], excluded: []) +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-plugin-versions) @ shrinkwrap-descriptors-cli --- +[WARNING] This rule is not compatible with the current version of Maven. The rule is not able to perform any checks. +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-java-version) @ shrinkwrap-descriptors-cli --- +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-version) @ shrinkwrap-descriptors-cli --- +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-environment) @ shrinkwrap-descriptors-cli --- +[INFO] +[INFO] --- build-helper-maven-plugin:1.7:add-source (add-source) @ shrinkwrap-descriptors-cli --- +[INFO] Source directory: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/ironjacamar/src/main/java added. +[INFO] +[INFO] --- maven-resources-plugin:2.4.1:resources (default-resources) @ shrinkwrap-descriptors-cli --- +[INFO] Using 'UTF-8' encoding to copy filtered resources. +[INFO] Copying 4 resources +[INFO] +[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ shrinkwrap-descriptors-cli --- +[INFO] Compiling 5 source files to /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/classes +[INFO] +[INFO] --- build-helper-maven-plugin:1.7:add-test-source (add-test-source) @ shrinkwrap-descriptors-cli --- +[INFO] Test Source directory: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/ironjacamar/src/test/java added. +[INFO] +[INFO] --- maven-resources-plugin:2.4.1:testResources (default-testResources) @ shrinkwrap-descriptors-cli --- +[INFO] Using 'UTF-8' encoding to copy filtered resources. +[INFO] Copying 12 resources +[INFO] +[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ shrinkwrap-descriptors-cli --- +[INFO] Compiling 1 source file to /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/test-classes +[INFO] +[INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @ shrinkwrap-descriptors-cli --- +[INFO] Surefire report directory: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/surefire-reports + +------------------------------------------------------- + T E S T S +------------------------------------------------------- +There are no tests to run. + +Results : + +Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 + +[INFO] +[INFO] >>> exec-maven-plugin:1.1.1:java (default) @ shrinkwrap-descriptors-cli >>> +[WARNING] The artifact saxon:saxon:jar:8.7 has been relocated to net.sf.saxon:saxon:jar:8.7 +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-plugin-versions) @ shrinkwrap-descriptors-cli --- +[WARNING] This rule is not compatible with the current version of Maven. The rule is not able to perform any checks. +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-java-version) @ shrinkwrap-descriptors-cli --- +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-version) @ shrinkwrap-descriptors-cli --- +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-environment) @ shrinkwrap-descriptors-cli --- +[INFO] +[INFO] <<< exec-maven-plugin:1.1.1:java (default) @ shrinkwrap-descriptors-cli <<< +[INFO] +[INFO] --- exec-maven-plugin:1.1.1:java (default) @ shrinkwrap-descriptors-cli --- +11:08:22,682 INFO - Temporary directory doesn't exist. Creating: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/ironjacamar +11:08:22,685 INFO - Temporary directory doesn't exist. Creating: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/ironjacamar/xslt +11:08:22,685 INFO - Temporary directory doesn't exist. Creating: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/ironjacamar/lib +Warning: at xsl:variable on line 1017 of file:/home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/../gen/src/main/resources/xslt/metadata.xsl: + SXWN9001: A variable with no following sibling instructions has no effect +Warning: on line 407 of file:/home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/../gen/src/main/resources/xslt/metadata.xsl: + The child axis starting at an attribute() node will never select anything +Recoverable error on line 28 of file:/home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/../gen/src/main/resources/xslt/metadata.xsl: + FODC0005: java.io.FileNotFoundException: + /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/gen/src/main/resources/xslt/copyright.xml (No such file or directory) +Recoverable error on line 45 of file:/home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/../gen/src/main/resources/xslt/metadata.xsl: + FODC0005: java.io.FileNotFoundException: + /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/src/test/resources/xml/contributors.xml + (No such file or directory) +Metadata describing enum: transaction-supportType +Metadata describing enum: transaction-isolationType +Metadata describing enum: track-statementsType +Metadata describing enum: transaction-supportType +Metadata describing group: common-attribute +Metadata describing group: common-datasourceAttributes +Metadata describing group: common-attribute +Generating Enum: TransactionSupportType +Generating Enum: TransactionIsolationType +Generating Enum: TrackStatementsType +Generating Enum: TransactionSupportType +Generating Interface: ConfigPropertyType +Generating Interface: IronjacamarType +Generating Interface: AdminObjectType +Generating Interface: TimeoutType +Generating Interface: ValidationType +Generating Interface: ConnectionDefinitionsType +Generating Interface: ConnectionDefintionType +Generating Interface: PoolType +Generating Interface: XaPoolType +Generating Interface: SecurityType +Generating Interface: AdminObjectsType +Generating Interface: BeanValidationGroupsType +Generating Interface: RecoverType +Generating Interface: ExtensionType +Generating Interface: CredentialType +Generating Interface: DatasourcesType +Generating Interface: DatasourceType +Generating Interface: XaDatasourceType +Generating Interface: XaDatasourcePropertyType +Generating Interface: ConnectionPropertyType +Generating Interface: ValidationType +Generating Interface: TimeoutType +Generating Interface: StatementType +Generating Interface: PoolType +Generating Interface: XaPoolType +Generating Interface: DsSecurityType +Generating Interface: ExtensionType +Generating Interface: ConfigPropertyType +Generating Interface: RecoverType +Generating Interface: DriverType +Generating Interface: DriversType +Generating Interface: ConfigPropertyType +Generating Interface: ResourceAdapterType +Generating Interface: AdminObjectType +Generating Interface: TimeoutType +Generating Interface: ValidationType +Generating Interface: ResourceAdaptersType +Generating Interface: ConnectionDefinitionsType +Generating Interface: ConnectionDefintionType +Generating Interface: PoolType +Generating Interface: XaPoolType +Generating Interface: SecurityType +Generating Interface: AdminObjectsType +Generating Interface: BeanValidationGroupsType +Generating Interface: RecoverType +Generating Interface: ExtensionType +Generating Interface: CredentialType +Generating Descriptor Api: IronjacamarDescriptor +Generating Descriptor Api: DatasourcesDescriptor +Generating Descriptor Api: ResourceAdaptersDescriptor +Generating DescriptorImpl: IronjacamarDescriptorImpl +Generating DescriptorImpl: DatasourcesDescriptorImpl +Generating DescriptorImpl: ResourceAdaptersDescriptorImpl +Generating Implementation Class: ConfigPropertyTypeImpl +Generating Implementation Class: IronjacamarTypeImpl +Generating Implementation Class: AdminObjectTypeImpl +Generating Implementation Class: TimeoutTypeImpl +Generating Implementation Class: ValidationTypeImpl +Generating Implementation Class: ConnectionDefinitionsTypeImpl +Generating Implementation Class: ConnectionDefintionTypeImpl +Generating Implementation Class: PoolTypeImpl +Generating Implementation Class: XaPoolTypeImpl +Generating Implementation Class: SecurityTypeImpl +Generating Implementation Class: AdminObjectsTypeImpl +Generating Implementation Class: BeanValidationGroupsTypeImpl +Generating Implementation Class: RecoverTypeImpl +Generating Implementation Class: ExtensionTypeImpl +Generating Implementation Class: CredentialTypeImpl +Generating Implementation Class: DatasourcesTypeImpl +Generating Implementation Class: DatasourceTypeImpl +Generating Implementation Class: XaDatasourceTypeImpl +Generating Implementation Class: XaDatasourcePropertyTypeImpl +Generating Implementation Class: ConnectionPropertyTypeImpl +Generating Implementation Class: ValidationTypeImpl +Generating Implementation Class: TimeoutTypeImpl +Generating Implementation Class: StatementTypeImpl +Generating Implementation Class: PoolTypeImpl +Generating Implementation Class: XaPoolTypeImpl +Generating Implementation Class: DsSecurityTypeImpl +Generating Implementation Class: ExtensionTypeImpl +Generating Implementation Class: ConfigPropertyTypeImpl +Generating Implementation Class: RecoverTypeImpl +Generating Implementation Class: DriverTypeImpl +Generating Implementation Class: DriversTypeImpl +Generating Implementation Class: ConfigPropertyTypeImpl +Generating Implementation Class: ResourceAdapterTypeImpl +Generating Implementation Class: AdminObjectTypeImpl +Generating Implementation Class: TimeoutTypeImpl +Generating Implementation Class: ValidationTypeImpl +Generating Implementation Class: ResourceAdaptersTypeImpl +Generating Implementation Class: ConnectionDefinitionsTypeImpl +Generating Implementation Class: ConnectionDefintionTypeImpl +Generating Implementation Class: PoolTypeImpl +Generating Implementation Class: XaPoolTypeImpl +Generating Implementation Class: SecurityTypeImpl +Generating Implementation Class: AdminObjectsTypeImpl +Generating Implementation Class: BeanValidationGroupsTypeImpl +Generating Implementation Class: RecoverTypeImpl +Generating Implementation Class: ExtensionTypeImpl +Generating Implementation Class: CredentialTypeImpl +Generating Test Class: ConfigPropertyTypeImplTestCase +Generating Test Class: IronjacamarTypeImplTestCase +Generating Test Class: AdminObjectTypeImplTestCase +Generating Test Class: TimeoutTypeImplTestCase +Generating Test Class: ValidationTypeImplTestCase +Generating Test Class: ConnectionDefinitionsTypeImplTestCase +Generating Test Class: ConnectionDefintionTypeImplTestCase +Generating Test Class: PoolTypeImplTestCase +Generating Test Class: XaPoolTypeImplTestCase +Generating Test Class: SecurityTypeImplTestCase +Generating Test Class: AdminObjectsTypeImplTestCase +Generating Test Class: BeanValidationGroupsTypeImplTestCase +Generating Test Class: RecoverTypeImplTestCase +Generating Test Class: ExtensionTypeImplTestCase +Generating Test Class: CredentialTypeImplTestCase +Generating Test Class: DatasourcesTypeImplTestCase +Generating Test Class: DatasourceTypeImplTestCase +Generating Test Class: XaDatasourceTypeImplTestCase +Generating Test Class: XaDatasourcePropertyTypeImplTestCase +Generating Test Class: ConnectionPropertyTypeImplTestCase +Generating Test Class: ValidationTypeImplTestCase +Generating Test Class: TimeoutTypeImplTestCase +Generating Test Class: StatementTypeImplTestCase +Generating Test Class: PoolTypeImplTestCase +Generating Test Class: XaPoolTypeImplTestCase +Generating Test Class: DsSecurityTypeImplTestCase +Generating Test Class: ExtensionTypeImplTestCase +Generating Test Class: ConfigPropertyTypeImplTestCase +Generating Test Class: RecoverTypeImplTestCase +Generating Test Class: DriverTypeImplTestCase +Generating Test Class: DriversTypeImplTestCase +Generating Test Class: ConfigPropertyTypeImplTestCase +Generating Test Class: ResourceAdapterTypeImplTestCase +Generating Test Class: AdminObjectTypeImplTestCase +Generating Test Class: TimeoutTypeImplTestCase +Generating Test Class: ValidationTypeImplTestCase +Generating Test Class: ResourceAdaptersTypeImplTestCase +Generating Test Class: ConnectionDefinitionsTypeImplTestCase +Generating Test Class: ConnectionDefintionTypeImplTestCase +Generating Test Class: PoolTypeImplTestCase +Generating Test Class: XaPoolTypeImplTestCase +Generating Test Class: SecurityTypeImplTestCase +Generating Test Class: AdminObjectsTypeImplTestCase +Generating Test Class: BeanValidationGroupsTypeImplTestCase +Generating Test Class: RecoverTypeImplTestCase +Generating Test Class: ExtensionTypeImplTestCase +Generating Test Class: CredentialTypeImplTestCase +Generating Test Class: IronjacamarDescriptorImplTestCase +Generating Test Class: DatasourcesDescriptorImplTestCase +Generating Test Class: ResourceAdaptersDescriptorImplTestCase +Generating api package-info: src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/package-info.java +Generating api package-info: src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/package-info.java +Generating api package-info: src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/package-info.java +Generating impl package-info: src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/package-info.java +Generating impl package-info: src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/package-info.java +Generating impl package-info: src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/package-info.java +[INFO] +[INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ shrinkwrap-descriptors-cli --- +[INFO] Building jar: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/shrinkwrap-descriptors-cli-1.2.0-alpha-2-SNAPSHOT.jar +[INFO] +[INFO] --- maven-source-plugin:2.1.1:jar-no-fork (attach-sources) @ shrinkwrap-descriptors-cli --- +[INFO] Building jar: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/shrinkwrap-descriptors-cli-1.2.0-alpha-2-SNAPSHOT-sources.jar +[INFO] +[INFO] --- maven-install-plugin:2.3:install (default-install) @ shrinkwrap-descriptors-cli --- +[INFO] Installing /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/shrinkwrap-descriptors-cli-1.2.0-alpha-2-SNAPSHOT.jar to /home/bfr/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-cli/1.2.0-alpha-2-SNAPSHOT/shrinkwrap-descriptors-cli-1.2.0-alpha-2-SNAPSHOT.jar +[INFO] Installing /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/pom.xml to /home/bfr/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-cli/1.2.0-alpha-2-SNAPSHOT/shrinkwrap-descriptors-cli-1.2.0-alpha-2-SNAPSHOT.pom +[INFO] Installing /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/shrinkwrap-descriptors-cli-1.2.0-alpha-2-SNAPSHOT-sources.jar to /home/bfr/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-cli/1.2.0-alpha-2-SNAPSHOT/shrinkwrap-descriptors-cli-1.2.0-alpha-2-SNAPSHOT-sources.jar +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-plugin-versions) @ shrinkwrap-descriptors-cli --- +[WARNING] This rule is not compatible with the current version of Maven. The rule is not able to perform any checks. +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-java-version) @ shrinkwrap-descriptors-cli --- +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-version) @ shrinkwrap-descriptors-cli --- +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-environment) @ shrinkwrap-descriptors-cli --- +[INFO] +[INFO] --- build-helper-maven-plugin:1.7:add-source (add-source) @ shrinkwrap-descriptors-cli --- +[INFO] Source directory: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/ironjacamar/src/main/java added. +[INFO] +[INFO] --- maven-resources-plugin:2.4.1:resources (default-resources) @ shrinkwrap-descriptors-cli --- +[INFO] Using 'UTF-8' encoding to copy filtered resources. +[INFO] Copying 4 resources +[INFO] +[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ shrinkwrap-descriptors-cli --- +[INFO] Compiling 110 source files to /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/classes +[INFO] +[INFO] --- build-helper-maven-plugin:1.7:add-test-source (add-test-source) @ shrinkwrap-descriptors-cli --- +[INFO] Test Source directory: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/ironjacamar/src/test/java added. +[INFO] +[INFO] --- maven-resources-plugin:2.4.1:testResources (default-testResources) @ shrinkwrap-descriptors-cli --- +[INFO] Using 'UTF-8' encoding to copy filtered resources. +[INFO] Copying 12 resources +[INFO] +[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ shrinkwrap-descriptors-cli --- +[INFO] Compiling 50 source files to /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/test-classes +[INFO] +[INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @ shrinkwrap-descriptors-cli --- +[INFO] Surefire report directory: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/surefire-reports + +------------------------------------------------------- + T E S T S +------------------------------------------------------- +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.ExtensionTypeImplTestCase +Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.041 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.CredentialTypeImplTestCase +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.XaPoolTypeImplTestCase +Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.DriversTypeImplTestCase +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.ConfigPropertyTypeImplTestCase +Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ValidationTypeImplTestCase +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.ConnectionPropertyTypeImplTestCase +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ResourceAdaptersTypeImplTestCase +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.XaDatasourcePropertyTypeImplTestCase +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.SecurityTypeImplTestCase +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.IronjacamarTypeImplTestCase +Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.RecoverTypeImplTestCase +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.XaDatasourceTypeImplTestCase +Tests run: 20, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.036 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ExtensionTypeImplTestCase +Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.AdminObjectsTypeImplTestCase +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.DatasourcesDescriptorImplTestCase +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.026 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.RecoverTypeImplTestCase +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConfigPropertyTypeImplTestCase +Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ValidationTypeImplTestCase +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.StatementTypeImplTestCase +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.IronjacamarDescriptorImplTestCase +Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.XaPoolTypeImplTestCase +Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConfigPropertyTypeImplTestCase +Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConnectionDefintionTypeImplTestCase +Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.DsSecurityTypeImplTestCase +Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.DriverTypeImplTestCase +Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.SecurityTypeImplTestCase +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.BeanValidationGroupsTypeImplTestCase +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.XaPoolTypeImplTestCase +Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.AdminObjectsTypeImplTestCase +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.ValidationTypeImplTestCase +Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.DatasourceTypeImplTestCase +Tests run: 22, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.AdminObjectTypeImplTestCase +Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.PoolTypeImplTestCase +Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.TimeoutTypeImplTestCase +Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.TimeoutTypeImplTestCase +Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.PoolTypeImplTestCase +Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.PoolTypeImplTestCase +Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConnectionDefintionTypeImplTestCase +Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ResourceAdapterTypeImplTestCase +Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.TimeoutTypeImplTestCase +Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ExtensionTypeImplTestCase +Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.CredentialTypeImplTestCase +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.BeanValidationGroupsTypeImplTestCase +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConnectionDefinitionsTypeImplTestCase +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.RecoverTypeImplTestCase +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec +Running org.jboss.shrinkwrap.descriptor.impl.datasources10.DatasourcesTypeImplTestCase +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec +Running org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConnectionDefinitionsTypeImplTestCase +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.AdminObjectTypeImplTestCase +Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec +Running org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ResourceAdaptersDescriptorImplTestCase +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec + +Results : + +Tests run: 273, Failures: 0, Errors: 0, Skipped: 0 + +[INFO] +[INFO] >>> exec-maven-plugin:1.1.1:java (default) @ shrinkwrap-descriptors-cli >>> +[WARNING] The artifact saxon:saxon:jar:8.7 has been relocated to net.sf.saxon:saxon:jar:8.7 +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-plugin-versions) @ shrinkwrap-descriptors-cli --- +[WARNING] This rule is not compatible with the current version of Maven. The rule is not able to perform any checks. +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-java-version) @ shrinkwrap-descriptors-cli --- +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-version) @ shrinkwrap-descriptors-cli --- +[INFO] +[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-environment) @ shrinkwrap-descriptors-cli --- +[INFO] +[INFO] <<< exec-maven-plugin:1.1.1:java (default) @ shrinkwrap-descriptors-cli <<< +[INFO] +[INFO] --- exec-maven-plugin:1.1.1:java (default) @ shrinkwrap-descriptors-cli --- +11:08:29,293 INFO - Temporary directory already exist. Reusing: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/ironjacamar +11:08:29,294 INFO - Temporary directory already exist. Reusing: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/ironjacamar/xslt +11:08:29,294 INFO - Temporary directory already exist. Reusing: /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/target/ironjacamar/lib +Warning: at xsl:variable on line 1017 of file:/home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/../gen/src/main/resources/xslt/metadata.xsl: + SXWN9001: A variable with no following sibling instructions has no effect +Warning: on line 407 of file:/home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/../gen/src/main/resources/xslt/metadata.xsl: + The child axis starting at an attribute() node will never select anything +Recoverable error on line 28 of file:/home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/../gen/src/main/resources/xslt/metadata.xsl: + FODC0005: java.io.FileNotFoundException: + /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/gen/src/main/resources/xslt/copyright.xml (No such file or directory) +Recoverable error on line 45 of file:/home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/../gen/src/main/resources/xslt/metadata.xsl: + FODC0005: java.io.FileNotFoundException: + /home/bfr/shrinkdesc/SHRINKDESC-93/descriptors/cli/src/test/resources/xml/contributors.xml + (No such file or directory) +Metadata describing enum: transaction-supportType +Metadata describing enum: transaction-isolationType +Metadata describing enum: track-statementsType +Metadata describing enum: transaction-supportType +Metadata describing group: common-attribute +Metadata describing group: common-datasourceAttributes +Metadata describing group: common-attribute +Generating Enum: TransactionSupportType +Generating Enum: TransactionIsolationType +Generating Enum: TrackStatementsType +Generating Enum: TransactionSupportType +Generating Interface: ConfigPropertyType +Generating Interface: IronjacamarType +Generating Interface: AdminObjectType +Generating Interface: TimeoutType +Generating Interface: ValidationType +Generating Interface: ConnectionDefinitionsType +Generating Interface: ConnectionDefintionType +Generating Interface: PoolType +Generating Interface: XaPoolType +Generating Interface: SecurityType +Generating Interface: AdminObjectsType +Generating Interface: BeanValidationGroupsType +Generating Interface: RecoverType +Generating Interface: ExtensionType +Generating Interface: CredentialType +Generating Interface: DatasourcesType +Generating Interface: DatasourceType +Generating Interface: XaDatasourceType +Generating Interface: XaDatasourcePropertyType +Generating Interface: ConnectionPropertyType +Generating Interface: ValidationType +Generating Interface: TimeoutType +Generating Interface: StatementType +Generating Interface: PoolType +Generating Interface: XaPoolType +Generating Interface: DsSecurityType +Generating Interface: ExtensionType +Generating Interface: ConfigPropertyType +Generating Interface: RecoverType +Generating Interface: DriverType +Generating Interface: DriversType +Generating Interface: ConfigPropertyType +Generating Interface: ResourceAdapterType +Generating Interface: AdminObjectType +Generating Interface: TimeoutType +Generating Interface: ValidationType +Generating Interface: ResourceAdaptersType +Generating Interface: ConnectionDefinitionsType +Generating Interface: ConnectionDefintionType +Generating Interface: PoolType +Generating Interface: XaPoolType +Generating Interface: SecurityType +Generating Interface: AdminObjectsType +Generating Interface: BeanValidationGroupsType +Generating Interface: RecoverType +Generating Interface: ExtensionType +Generating Interface: CredentialType +Generating Descriptor Api: IronjacamarDescriptor +Generating Descriptor Api: DatasourcesDescriptor +Generating Descriptor Api: ResourceAdaptersDescriptor +Generating DescriptorImpl: IronjacamarDescriptorImpl +Generating DescriptorImpl: DatasourcesDescriptorImpl +Generating DescriptorImpl: ResourceAdaptersDescriptorImpl +Generating Implementation Class: ConfigPropertyTypeImpl +Generating Implementation Class: IronjacamarTypeImpl +Generating Implementation Class: AdminObjectTypeImpl +Generating Implementation Class: TimeoutTypeImpl +Generating Implementation Class: ValidationTypeImpl +Generating Implementation Class: ConnectionDefinitionsTypeImpl +Generating Implementation Class: ConnectionDefintionTypeImpl +Generating Implementation Class: PoolTypeImpl +Generating Implementation Class: XaPoolTypeImpl +Generating Implementation Class: SecurityTypeImpl +Generating Implementation Class: AdminObjectsTypeImpl +Generating Implementation Class: BeanValidationGroupsTypeImpl +Generating Implementation Class: RecoverTypeImpl +Generating Implementation Class: ExtensionTypeImpl +Generating Implementation Class: CredentialTypeImpl +Generating Implementation Class: DatasourcesTypeImpl +Generating Implementation Class: DatasourceTypeImpl +Generating Implementation Class: XaDatasourceTypeImpl +Generating Implementation Class: XaDatasourcePropertyTypeImpl +Generating Implementation Class: ConnectionPropertyTypeImpl +Generating Implementation Class: ValidationTypeImpl +Generating Implementation Class: TimeoutTypeImpl +Generating Implementation Class: StatementTypeImpl +Generating Implementation Class: PoolTypeImpl +Generating Implementation Class: XaPoolTypeImpl +Generating Implementation Class: DsSecurityTypeImpl +Generating Implementation Class: ExtensionTypeImpl +Generating Implementation Class: ConfigPropertyTypeImpl +Generating Implementation Class: RecoverTypeImpl +Generating Implementation Class: DriverTypeImpl +Generating Implementation Class: DriversTypeImpl +Generating Implementation Class: ConfigPropertyTypeImpl +Generating Implementation Class: ResourceAdapterTypeImpl +Generating Implementation Class: AdminObjectTypeImpl +Generating Implementation Class: TimeoutTypeImpl +Generating Implementation Class: ValidationTypeImpl +Generating Implementation Class: ResourceAdaptersTypeImpl +Generating Implementation Class: ConnectionDefinitionsTypeImpl +Generating Implementation Class: ConnectionDefintionTypeImpl +Generating Implementation Class: PoolTypeImpl +Generating Implementation Class: XaPoolTypeImpl +Generating Implementation Class: SecurityTypeImpl +Generating Implementation Class: AdminObjectsTypeImpl +Generating Implementation Class: BeanValidationGroupsTypeImpl +Generating Implementation Class: RecoverTypeImpl +Generating Implementation Class: ExtensionTypeImpl +Generating Implementation Class: CredentialTypeImpl +Generating Test Class: ConfigPropertyTypeImplTestCase +Generating Test Class: IronjacamarTypeImplTestCase +Generating Test Class: AdminObjectTypeImplTestCase +Generating Test Class: TimeoutTypeImplTestCase +Generating Test Class: ValidationTypeImplTestCase +Generating Test Class: ConnectionDefinitionsTypeImplTestCase +Generating Test Class: ConnectionDefintionTypeImplTestCase +Generating Test Class: PoolTypeImplTestCase +Generating Test Class: XaPoolTypeImplTestCase +Generating Test Class: SecurityTypeImplTestCase +Generating Test Class: AdminObjectsTypeImplTestCase +Generating Test Class: BeanValidationGroupsTypeImplTestCase +Generating Test Class: RecoverTypeImplTestCase +Generating Test Class: ExtensionTypeImplTestCase +Generating Test Class: CredentialTypeImplTestCase +Generating Test Class: DatasourcesTypeImplTestCase +Generating Test Class: DatasourceTypeImplTestCase +Generating Test Class: XaDatasourceTypeImplTestCase +Generating Test Class: XaDatasourcePropertyTypeImplTestCase +Generating Test Class: ConnectionPropertyTypeImplTestCase +Generating Test Class: ValidationTypeImplTestCase +Generating Test Class: TimeoutTypeImplTestCase +Generating Test Class: StatementTypeImplTestCase +Generating Test Class: PoolTypeImplTestCase +Generating Test Class: XaPoolTypeImplTestCase +Generating Test Class: DsSecurityTypeImplTestCase +Generating Test Class: ExtensionTypeImplTestCase +Generating Test Class: ConfigPropertyTypeImplTestCase +Generating Test Class: RecoverTypeImplTestCase +Generating Test Class: DriverTypeImplTestCase +Generating Test Class: DriversTypeImplTestCase +Generating Test Class: ConfigPropertyTypeImplTestCase +Generating Test Class: ResourceAdapterTypeImplTestCase +Generating Test Class: AdminObjectTypeImplTestCase +Generating Test Class: TimeoutTypeImplTestCase +Generating Test Class: ValidationTypeImplTestCase +Generating Test Class: ResourceAdaptersTypeImplTestCase +Generating Test Class: ConnectionDefinitionsTypeImplTestCase +Generating Test Class: ConnectionDefintionTypeImplTestCase +Generating Test Class: PoolTypeImplTestCase +Generating Test Class: XaPoolTypeImplTestCase +Generating Test Class: SecurityTypeImplTestCase +Generating Test Class: AdminObjectsTypeImplTestCase +Generating Test Class: BeanValidationGroupsTypeImplTestCase +Generating Test Class: RecoverTypeImplTestCase +Generating Test Class: ExtensionTypeImplTestCase +Generating Test Class: CredentialTypeImplTestCase +Generating Test Class: IronjacamarDescriptorImplTestCase +Generating Test Class: DatasourcesDescriptorImplTestCase +Generating Test Class: ResourceAdaptersDescriptorImplTestCase +Generating api package-info: src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/package-info.java +Generating api package-info: src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/package-info.java +Generating api package-info: src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/package-info.java +Generating impl package-info: src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/package-info.java +Generating impl package-info: src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/package-info.java +Generating impl package-info: src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/package-info.java +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 12.331s +[INFO] Finished at: Sun Oct 02 11:08:30 CEST 2011 +[INFO] Final Memory: 8M/147M +[INFO] ------------------------------------------------------------------------ diff --git a/cli/pom.xml b/cli/pom.xml new file mode 100644 index 00000000..e0ec7826 --- /dev/null +++ b/cli/pom.xml @@ -0,0 +1,185 @@ + + + + + + org.jboss.shrinkwrap.descriptors + shrinkwrap-descriptors-parent + 1.2.0-alpha-2-SNAPSHOT + ../pom.xml + + + + 4.0.0 + + + shrinkwrap-descriptors-cli + ShrinkWrap Descriptors CLI + Command Line Interface for generating the ShrinkWrap Descriptors + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + + + + + + + + maven-assembly-plugin + 2.2.1 + + + jar-with-dependencies + + + + org.jboss.shrinkwrap.descriptor.cli.Main + + + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.1.1 + + + compile + + java + + + org.jboss.shrinkwrap.descriptor.cli.Main + + -c + src/test/resources/ironjacamar.properties + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.7 + + + add-source + generate-sources + + add-source + + + + target/ironjacamar/src/main/java + + + + + add-test-source + generate-test-sources + + add-test-source + + + + target/ironjacamar/src/test/java + + + + + + + + + maven-surefire-plugin + + + ${env.JAVA5_HOME}/bin/java + + once + + + + + + + + + + org.jboss.shrinkwrap.descriptors + shrinkwrap-descriptors-api-base + ${project.version} + + + + org.jboss.shrinkwrap.descriptors + shrinkwrap-descriptors-impl-base + ${project.version} + + + + org.jboss.shrinkwrap.descriptors + shrinkwrap-descriptors-impl-base + ${project.version} + test-jar + test + + + + org.jboss.shrinkwrap.descriptors + shrinkwrap-descriptors-gen + ${project.version} + + + + org.jboss.shrinkwrap.descriptors + shrinkwrap-descriptors-test-util + ${project.version} + test + + + + saxon + saxon + 8.7 + + + + commons-logging + commons-logging + 1.1 + + + + uk.co.flamingpenguin.jewelcli + jewelcli + 0.6 + + + + junit + junit + test + + + + + diff --git a/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/CommandLineOptions.java b/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/CommandLineOptions.java new file mode 100644 index 00000000..0ceeb9c8 --- /dev/null +++ b/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/CommandLineOptions.java @@ -0,0 +1,16 @@ +package org.jboss.shrinkwrap.descriptor.cli; + +import uk.co.flamingpenguin.jewel.cli.CommandLineInterface; +import uk.co.flamingpenguin.jewel.cli.Option; + +@CommandLineInterface(application="sdcli") +public interface CommandLineOptions +{ + @Option(shortName="c", description="Path to the configuration file") + public String getConfiguration(); + + @Option(shortName="t", description="Logs the stack trace in case of an exception") + public String getTrace(); + + public boolean isTrace(); +} diff --git a/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/Main.java b/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/Main.java new file mode 100644 index 00000000..5c80819e --- /dev/null +++ b/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/Main.java @@ -0,0 +1,89 @@ +package org.jboss.shrinkwrap.descriptor.cli; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import uk.co.flamingpenguin.jewel.cli.ArgumentValidationException; +import uk.co.flamingpenguin.jewel.cli.Cli; +import uk.co.flamingpenguin.jewel.cli.CliFactory; + +public class Main +{ + private final static Log log = LogFactory.getLog(Main.class); + + public static void main(String[] args) + { + System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl"); + + try + { + PropertyHandler properties = getConfiguration(args); + + if (properties != null) + { + WorkingDirHandler workingDirHandler = new WorkingDirHandler(properties); + + // initialize the map which will overwrite global parameters defined in metadata.xsl + Map xsltParameters = new HashMap(); + xsltParameters.put("gOutputFolder", properties.getResultDirImpl(workingDirHandler.getWorkingDir() + "/src/main/java")); + xsltParameters.put("gOutputFolderApi", properties.getResultDirApi(workingDirHandler.getWorkingDir() + "/src/main/java")); + xsltParameters.put("gOutputFolderTest", properties.getResultDirTest(workingDirHandler.getWorkingDir() + "/src/test/java")); + + // transform context xml to metadata.xml + XsltTransformer.simpleTransform(properties.getPathToContextXml(), + workingDirHandler.getPathToMetaDataXml(), + workingDirHandler.getWorkingDir() + "/metadata.xml", + xsltParameters); + + // generate java classes based on metadata.xml + XsltTransformer.simpleTransform(workingDirHandler.getWorkingDir() + "/metadata.xml", + workingDirHandler.getPathToDDJavaXml(), + workingDirHandler.getWorkingDir() + "/ddJava.xml", + xsltParameters); + } + } + catch(Exception ex) + { + log.error(ex.getMessage(), ex); + } + } + + /** + * Returns a PropertyHandler based on the path specified on the command line. + * @param args + * @return + */ + private static PropertyHandler getConfiguration(final String[] args) + { + PropertyHandler propertyHandler = null; + boolean isTrace = false; + + try + { + CommandLineOptions options = CliFactory.parseArguments(CommandLineOptions.class, args); + isTrace = options.isTrace(); + propertyHandler = new PropertyHandler(options.getConfiguration()); + } + catch (ArgumentValidationException ex) + { + final Cli cli = CliFactory.createCli(CommandLineOptions.class); + log.error(ex.getMessage()); + log.info(cli.getHelpMessage()); + } + catch (Exception ex) + { + final Cli cli = CliFactory.createCli(CommandLineOptions.class); + log.error(ex.getMessage()); + log.info(cli.getHelpMessage()); + if (isTrace) { + log.error("Trace:\n" + ex.getMessage(), ex); + } + } + + return propertyHandler; + } + +} diff --git a/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/PropertyHandler.java b/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/PropertyHandler.java new file mode 100644 index 00000000..b948dcb9 --- /dev/null +++ b/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/PropertyHandler.java @@ -0,0 +1,84 @@ +package org.jboss.shrinkwrap.descriptor.cli; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Properties; + +/** + * Class which allows the load and retrieve application specific properties. + * @author bfr + * + */ +public class PropertyHandler +{ + public static final String CLI_PROP_WORKING_DIR = "descriptor.cli.working.dir"; + public static final String CLI_PROP_RESULT_DIR_API = "descriptor.cli.result.dir.api"; + public static final String CLI_PROP_RESULT_DIR_IMPL = "descriptor.cli.result.dir.impl"; + public static final String CLI_PROP_RESULT_DIR_TEST = "descriptor.cli.result.dir.test"; + public static final String CLI_PROP_PATH_CONTEXT_XML = "descriptor.cli.path.context.xml"; + public static final String CLI_PROP_PATH_EX_METADATA_XML = "descriptor.cli.path.ext.metadata.xml"; + public static final String CLI_PROP_PATH_EX_DDJAVA_XML = "descriptor.cli.path.ext.ddjava.xml"; + + private final Properties prop = new Properties(); + + /** + * Creates a new instance of the class. + * @param pathToPropertiesFile - path to a readable properties file. + * @throws FileNotFoundException - thrown, if the file doesn't exist. + * @throws IOException - thrown, if an IO error occurs. + */ + public PropertyHandler(final String pathToPropertiesFile) throws FileNotFoundException, IOException + { + prop.load(new FileInputStream(pathToPropertiesFile)); + checkMandatoryProperties(); + } + + public String getWorkingDir(final String defaultDir) + { + return prop.getProperty(CLI_PROP_WORKING_DIR, defaultDir); + } + + public String getResultDirApi(final String defaultDir) + { + return prop.getProperty(CLI_PROP_RESULT_DIR_API, defaultDir); + } + + public String getResultDirImpl(final String defaultDir) + { + return prop.getProperty(CLI_PROP_RESULT_DIR_IMPL, defaultDir); + } + + public String getResultDirTest(final String defaultDir) + { + return prop.getProperty(CLI_PROP_RESULT_DIR_TEST, defaultDir); + } + + public String getPathToExternalMetadataXml(final String defaultFile) + { + return prop.getProperty(CLI_PROP_PATH_EX_METADATA_XML, defaultFile); + } + + public String getPathToExternalDDJavaXml(final String defaultFile) + { + return prop.getProperty(CLI_PROP_PATH_EX_DDJAVA_XML, defaultFile); + } + + public String getPathToContextXml() + { + return prop.getProperty(CLI_PROP_PATH_CONTEXT_XML); + } + + //------------------------------------------------------------------------------------------------------------------|| + //--- Private Methods ----------------------------------------------------------------------------------------------|| + //------------------------------------------------------------------------------------------------------------------|| + + private void checkMandatoryProperties() + { + if (getPathToContextXml() == null) + { + throw new RuntimeException("Context XML file not specified in configuration file!"); + } + } + +} diff --git a/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/WorkingDirHandler.java b/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/WorkingDirHandler.java new file mode 100644 index 00000000..dd52c5a4 --- /dev/null +++ b/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/WorkingDirHandler.java @@ -0,0 +1,186 @@ +package org.jboss.shrinkwrap.descriptor.cli; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class WorkingDirHandler +{ + private final static Log log = LogFactory.getLog(WorkingDirHandler.class); + private final static String TEMP_DIR = "temp"; + private final static String TEMP_XSLT_DIR = "xslt"; + private final static String TEMP_LIB_DIR = "lib"; + private final static String METADATA_XML = "metadata.xsl"; + private final static String DD_JAVA_XML = "ddJava.xsl"; + + private String tmpDir; + private String pathToMetaDataXml; + private String pathToDDJavaXml; + private boolean isExternalMetadataXml = false; + private boolean isExternalDDJavaXml = false; + + WorkingDirHandler(final PropertyHandler properties) throws IOException + { + tmpDir = properties.getWorkingDir(TEMP_DIR); + pathToMetaDataXml = tmpDir + "/" + TEMP_XSLT_DIR + "/" + METADATA_XML; + pathToDDJavaXml = tmpDir + "/" + TEMP_XSLT_DIR + "/" + DD_JAVA_XML; + isExternalMetadataXml = !properties.getPathToExternalMetadataXml("").isEmpty(); + isExternalDDJavaXml = !properties.getPathToExternalDDJavaXml("").isEmpty(); + + if(isExternalMetadataXml) + { + pathToMetaDataXml = properties.getPathToExternalMetadataXml(""); + } + + if(isExternalDDJavaXml) + { + pathToDDJavaXml = properties.getPathToExternalDDJavaXml(""); + } + + setupWorkingDir(); + } + + /** + * Setups up the working directory including writing of the XSLT files into this directory. + * @throws IOException thrown, if en error by writing of the XSLT files occurs. + */ + private void setupWorkingDir() throws IOException + { + createWorkingDir(); + extractStreamResources(); + } + + /** + * Returns the current working directory. + * @return + */ + public String getWorkingDir() + { + return tmpDir; + } + + /** + * Returns the current working directory containing the XSLT files. + * @return + */ + public String getWorkingXsltDir() + { + return tmpDir + "/" + TEMP_XSLT_DIR; + } + + /** + * Returns the current working directory containing the XSLT files. + * @return + */ + public String getWorkingLibDir() + { + return tmpDir + "/" + TEMP_LIB_DIR; + } + + /** + * Returns the path of to the metadata.xslt file. + * @return + */ + public String getPathToMetaDataXml() + { + return pathToMetaDataXml; + } + + /** + * Returns the path of to the ddJava.xslt file. + * @return + */ + public String getPathToDDJavaXml() + { + return pathToDDJavaXml; + } + + /** + * Creates the temporary directory, if not already created. + * If null, then a default temporary directory with the specified value of the attribute TEMP_DIR will be + * in the current directory created. + */ + private void createWorkingDir() + { + checkAndCreateDir(tmpDir); + checkAndCreateDir(tmpDir + "/" + TEMP_XSLT_DIR); + checkAndCreateDir(tmpDir + "/" + TEMP_LIB_DIR); + } + + /** + * Checks the existence of the given directory. If not existing, the directory will be created. + * @param directory the name of the directory. + */ + private void checkAndCreateDir(final String directory) + { + final File dir = (new File(directory)); + if (!dir.exists()) + { + log.info("Temporary directory doesn't exist. Creating: " + dir.getAbsolutePath()); + final boolean success = (dir.mkdir()); + if (!success) + { + throw new RuntimeException("Can't initialize temporary directory: " + dir.getAbsolutePath()); + } + } + else + { + log.info("Temporary directory already exist. Reusing: " + dir.getAbsolutePath()); + } + } + + /** + * Extracts the required XSLT files from the jar and writes these files into the working directory. + * @throws IOException thrown, if an error by writing the files occurs. + */ + private void extractStreamResources() throws IOException + { + if (!isExternalMetadataXml) + { + writeFile("/xslt/metadata.xsl", pathToMetaDataXml); + } + + if (!isExternalDDJavaXml) + { + writeFile("/xslt/ddJava.xsl", pathToDDJavaXml); + writeFile("/lib/xdd-printBase.xsl", getWorkingDir() + "/" + TEMP_LIB_DIR + "/xdd-printBase.xsl"); + writeFile("/lib/xdd-printElement.xsl", getWorkingDir() + "/" + TEMP_LIB_DIR + "/xdd-printElement.xsl"); + writeFile("/lib/xdd-util.xsl", getWorkingDir() + "/" + TEMP_LIB_DIR + "/xdd-util.xsl"); + } + } + + /** + * Writes the specified resource to a file with the specified name. + * @param resource the resource name of the file packed in the jar. + * @param fileName the name of the written file. + * @throws IOException thrown, if an error by writing the file occurs. + */ + private void writeFile(String resource, String fileName) throws IOException + { + final InputStream is = Main.class.getResourceAsStream(resource); + try + { + OutputStream os = new FileOutputStream(fileName); + try + { + byte[] buffer = new byte[4096]; + for (int n; (n = is.read(buffer)) != -1;) + os.write(buffer, 0, n); + } + finally + { + os.close(); + } + } + finally + { + is.close(); + } + } + +} diff --git a/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/XsltTransformer.java b/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/XsltTransformer.java new file mode 100644 index 00000000..99b5a3df --- /dev/null +++ b/cli/src/main/java/org/jboss/shrinkwrap/descriptor/cli/XsltTransformer.java @@ -0,0 +1,66 @@ +package org.jboss.shrinkwrap.descriptor.cli; + +import java.io.File; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; + +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; + +public class XsltTransformer +{ + + /** + * Simple transformation method. + * @param sourcePath - Absolute path to source xml file. + * @param xsltPath - Absolute path to xslt file. + * @param resultDir - Directory where you want to put resulting files. + * @param parameters - Map defining global XSLT parameters based via tranformer to the XSLT file. + * @throws TransformerException + */ + public static void simpleTransform(final String sourcePath, final String xsltPath, final String resultDir, + final Map parameters) throws TransformerException + { + final TransformerFactory tFactory = TransformerFactory.newInstance(); + final Transformer transformer = tFactory.newTransformer(new StreamSource(new File(xsltPath))); + applyParameters(transformer, parameters); + transformer.transform(new StreamSource(new File(sourcePath)), new StreamResult(new File(resultDir))); + } + + /** + * Simple transformation method. + * @param sourcePath - Absolute path to source xml file. + * @param StreamSource - the xslt file. + * @param resultDir - Directory where you want to put resulting files. + * @param parameters - Map defining global XSLT parameters based via tranformer to the XSLT file. + * @throws TransformerException + */ + public static void simpleTransform(final String sourcePath, final StreamSource xsltSource, + final String resultDir, final Map parameters) throws TransformerException + { + final TransformerFactory tFactory = TransformerFactory.newInstance(); + final Transformer transformer = tFactory.newTransformer(xsltSource); + applyParameters(transformer, parameters); + transformer.transform(new StreamSource(new File(sourcePath)), new StreamResult(new File(resultDir + "/metadata.xml"))); + } + + /** + * Applies all key/value pairs as defined by the given Map to the given Transformer instance. + * @param transformer + * @param parameters + */ + @SuppressWarnings("unchecked") + private static void applyParameters(final Transformer transformer, final Map parameters) + { + final Set keys = parameters.keySet(); + for (Iterator iterator = keys.iterator(); iterator.hasNext();) + { + final String key = iterator.next(); + transformer.setParameter(key, parameters.get(key)); + } + } +} diff --git a/cli/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourcesDescriptor b/cli/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourcesDescriptor new file mode 100644 index 00000000..3a42f91a --- /dev/null +++ b/cli/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourcesDescriptor @@ -0,0 +1,3 @@ +implClass=org.jboss.shrinkwrap.descriptor.impl.datasources10.DatasourcesDescriptorImpl +importerClass=org.jboss.shrinkwrap.descriptor.spi.node.dom.XmlDomNodeDescriptorImporterImpl +defaultName=datasources.xml \ No newline at end of file diff --git a/cli/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.ironjacamar10.IronjacamarDescriptor b/cli/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.ironjacamar10.IronjacamarDescriptor new file mode 100644 index 00000000..9c3ca305 --- /dev/null +++ b/cli/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.ironjacamar10.IronjacamarDescriptor @@ -0,0 +1,3 @@ +implClass=org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.IronjacamarDescriptorImpl +importerClass=org.jboss.shrinkwrap.descriptor.spi.node.dom.XmlDomNodeDescriptorImporterImpl +defaultName=ironjacamar.xml \ No newline at end of file diff --git a/cli/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdaptersDescriptor b/cli/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdaptersDescriptor new file mode 100644 index 00000000..33ab8e4e --- /dev/null +++ b/cli/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdaptersDescriptor @@ -0,0 +1,3 @@ +implClass=org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ResourceAdaptersDescriptorImpl +importerClass=org.jboss.shrinkwrap.descriptor.spi.node.dom.XmlDomNodeDescriptorImporterImpl +defaultName=resourceadapters.xml \ No newline at end of file diff --git a/cli/src/main/resources/log4j.properties b/cli/src/main/resources/log4j.properties new file mode 100644 index 00000000..2ef18971 --- /dev/null +++ b/cli/src/main/resources/log4j.properties @@ -0,0 +1,6 @@ +# Default Logging Configuration + +log4j.rootLogger=INFO, stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %-5p %x - %m\n \ No newline at end of file diff --git a/cli/src/test/java/org/jboss/shrinkwrap/descriptor/cli/MainTest.java b/cli/src/test/java/org/jboss/shrinkwrap/descriptor/cli/MainTest.java new file mode 100644 index 00000000..1ecc7fa2 --- /dev/null +++ b/cli/src/test/java/org/jboss/shrinkwrap/descriptor/cli/MainTest.java @@ -0,0 +1,13 @@ +package org.jboss.shrinkwrap.descriptor.cli; + +import org.junit.Test; + + +public class MainTest +{ + @Test + public void testExternalMetaDataXml() throws Exception + { + Main.main(new String[]{"-c", "src/test/resources/ironjacamar.properties"}); + } +} diff --git a/cli/src/test/resources/ironjacamar.properties b/cli/src/test/resources/ironjacamar.properties new file mode 100644 index 00000000..73c7a7dc --- /dev/null +++ b/cli/src/test/resources/ironjacamar.properties @@ -0,0 +1,8 @@ +descriptor.cli.working.dir=target/ironjacamar +descriptor.cli.path.relative.path.ctx=../../../../gen/src/main/resources/xslt/ +descriptor.cli.path.context.xml=src/test/resources/xml/schemasIronJacamar.xml +descriptor.cli.path.ext.metadata.xml=../gen/src/main/resources/xslt/metadata.xsl +descriptor.cli.path.ext.ddjava.xml=../gen/src/main/resources/xslt/ddJava.xsl +descriptor.cli.result.dir.api=../../src/test/java +descriptor.cli.result.dir.impl=../../src/test/java +descriptor.cli.result.dir.test=../../src/test/java \ No newline at end of file diff --git a/cli/src/test/resources/test.properties b/cli/src/test/resources/test.properties new file mode 100644 index 00000000..11336230 --- /dev/null +++ b/cli/src/test/resources/test.properties @@ -0,0 +1,2 @@ +descriptor.cli.path.context.xml=src/test/resources/xml/schemasIronJacamar.xml +descriptor.cli.path.input.xsd=src/test/resources/xsd \ No newline at end of file diff --git a/cli/src/test/resources/test2.properties b/cli/src/test/resources/test2.properties new file mode 100644 index 00000000..48d913bf --- /dev/null +++ b/cli/src/test/resources/test2.properties @@ -0,0 +1,7 @@ +descriptor.cli.working.dir=target/test +descriptor.cli.path.context.xml=src/test/resources/xml/schemasIronJacamar.xml +descriptor.cli.path.ext.metadata.xml=../gen/src/main/resources/xslt/metadata.xsl +descriptor.cli.path.ext.ddjava.xml=../gen/src/main/resources/xslt/ddJava.xsl +descriptor.cli.result.dir.api=src/main/java +descriptor.cli.result.dir.impl=src/main/java +descriptor.cli.result.dir.test=src/test/java \ No newline at end of file diff --git a/cli/src/test/resources/xml/copyright.xml b/cli/src/test/resources/xml/copyright.xml new file mode 100644 index 00000000..a29b4ea5 --- /dev/null +++ b/cli/src/test/resources/xml/copyright.xml @@ -0,0 +1,19 @@ + + + /* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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. + */ + diff --git a/cli/src/test/resources/xml/ddJava.xsl b/cli/src/test/resources/xml/ddJava.xsl new file mode 100644 index 00000000..5c69adba --- /dev/null +++ b/cli/src/test/resources/xml/ddJava.xsl @@ -0,0 +1,1022 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + + + _ + + (" + + ") + + , + + + + ; + + + private String value; + + + + + (String value) + { this.value = value; } + + + public String toString() {return value;} + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : : + + + + + + + + + + + + <T> + extends Child<T> + + { + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + import org.jboss.shrinkwrap.descriptor.api.Descriptor; + import org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace; + + + + { + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + import org.jboss.shrinkwrap.descriptor.spi.node.Node; + + + + + + + + + <T> + implements Child<T>, + + + { + + + + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + import org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace; + import org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorImplBase; + import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; + import org.jboss.shrinkwrap.descriptor.spi.node.Node; + + + + + + { + + + + + + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + import org.jboss.shrinkwrap.descriptor.spi.node.Node; + import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; + import org.jboss.shrinkwrap.descriptor.api.Descriptors; + import org.junit.Test; + import static org.junit.Assert.*; + + + + + + + + + + + + + + + + + + + { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cli/src/test/resources/xml/schemasIronJacamar.xml b/cli/src/test/resources/xml/schemasIronJacamar.xml new file mode 100644 index 00000000..7a4780f4 --- /dev/null +++ b/cli/src/test/resources/xml/schemasIronJacamar.xml @@ -0,0 +1,43 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/cli/src/test/resources/xml/test-gen-ironjacamar.xml b/cli/src/test/resources/xml/test-gen-ironjacamar.xml new file mode 100644 index 00000000..98f650fd --- /dev/null +++ b/cli/src/test/resources/xml/test-gen-ironjacamar.xml @@ -0,0 +1,102 @@ + + + + bean-validation-group0 + bean-validation-group1 + + bootstrap-context0 + config-property0 + config-property1 + NoTransaction + + + config-property2 + config-property3 + + 50 + 50 + false + false + flush-strategy0 + + + security-domain-and-application0 + + + 50 + 50 + 50 + 50 + 50 + + + false + 50 + false + + + + user-name0 + password0 + security-domain0 + + + config-property4 + + + + + config-property5 + config-property6 + + 50 + 50 + false + false + flush-strategy1 + false + + + false + false + + + security-domain-and-application1 + + + 50 + 50 + 50 + 50 + 50 + + + false + 50 + false + + + + user-name1 + password1 + security-domain1 + + + config-property7 + + + + + + + config-property8 + config-property9 + + + config-property10 + config-property11 + + + diff --git a/cli/src/test/resources/xsd/connector_1_0.dtd b/cli/src/test/resources/xsd/connector_1_0.dtd new file mode 100644 index 00000000..bf869551 --- /dev/null +++ b/cli/src/test/resources/xsd/connector_1_0.dtd @@ -0,0 +1,468 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cli/src/test/resources/xsd/connector_1_0.xsd b/cli/src/test/resources/xsd/connector_1_0.xsd new file mode 100644 index 00000000..67ad3601 --- /dev/null +++ b/cli/src/test/resources/xsd/connector_1_0.xsd @@ -0,0 +1,645 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cli/src/test/resources/xsd/connector_1_5.xsd b/cli/src/test/resources/xsd/connector_1_5.xsd new file mode 100644 index 00000000..43536ab0 --- /dev/null +++ b/cli/src/test/resources/xsd/connector_1_5.xsd @@ -0,0 +1,1035 @@ + + + + + @(#)connector_1_5.xsds 1.27 06/17/03 + + + + + + + Copyright 2003 Sun Microsystems, Inc., 901 San Antonio + Road, Palo Alto, California 94303, U.S.A. All rights + reserved. + + Sun Microsystems, Inc. has intellectual property rights + relating to technology described in this document. In + particular, and without limitation, these intellectual + property rights may include one or more of the U.S. patents + listed at http://www.sun.com/patents and one or more + additional patents or pending patent applications in the + U.S. and other countries. + + This document and the technology which it describes are + distributed under licenses restricting their use, copying, + distribution, and decompilation. No part of this document + may be reproduced in any form by any means without prior + written authorization of Sun and its licensors, if any. + + Third-party software, including font technology, is + copyrighted and licensed from Sun suppliers. + + Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE, + JavaServer Pages, Enterprise JavaBeans and the Java Coffee + Cup logo are trademarks or registered trademarks of Sun + Microsystems, Inc. in the U.S. and other countries. + + Federal Acquisitions: Commercial Software - Government Users + Subject to Standard License Terms and Conditions. + + + + + + + + ... + + + The instance documents may indicate the published version of + the schema using the xsi:schemaLocation attribute for J2EE + namespace with the following location: + + http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd + + ]]> + + + + + + + The following conventions apply to all J2EE + deployment descriptor elements unless indicated otherwise. + + - In elements that specify a pathname to a file within the + same JAR file, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the JAR file's namespace. Absolute filenames (i.e., those + starting with "/") also specify names in the root of the + JAR file's namespace. In general, relative names are + preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + + The connector element is the root element of the deployment + descriptor for the resource adapter. This element includes + general information - vendor name, resource adapter version, + icon - about the resource adapter module. It also includes + information specific to the implementation of the resource + adapter library as specified through the element + resourceadapter. + + + + + + + + + + + + + The activationspecType specifies an activation + specification. The information includes fully qualified + Java class name of an activation specification and a set of + required configuration property names. + + + + + + + + + com.wombat.ActivationSpecImpl + + + ]]> + + + + + + + + + + + + + + + The adminobjectType specifies information about an + administered object. Administered objects are specific to a + messaging style or message provider. This contains + information on the Java type of the interface implemented by + an administered object, its Java class name and its + configuration properties. + + + + + + + + + javax.jms.Destination + + + ]]> + + + + + + + + com.wombat.DestinationImpl + + + ]]> + + + + + + + + + + + + + + + + The authentication-mechanismType specifies an authentication + mechanism supported by the resource adapter. Note that this + support is for the resource adapter and not for the + underlying EIS instance. The optional description specifies + any resource adapter specific requirement for the support of + security contract and authentication mechanism. + + Note that BasicPassword mechanism type should support the + javax.resource.spi.security.PasswordCredential interface. + The Kerbv5 mechanism type should support the + org.ietf.jgss.GSSCredential interface or the deprecated + javax.resource.spi.security.GenericCredential interface. + + + + + + + + + + BasicPassword + + + Kerbv5 + + + Any additional security mechanisms are outside the + scope of the Connector architecture specification. + + ]]> + + + + + + + + + + + + + + + ServerName + + ]]> + + + + + + + + + + + + + java.lang.String + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + The config-propertyType contains a declaration of a single + configuration property that may be used for providing + configuration information. + + The declaration consists of an optional description, name, + type and an optional value of the configuration property. If + the resource adapter provider does not specify a value than + the deployer is responsible for providing a valid value for + a configuration property. + + Any bounds or well-defined values of properties should be + described in the description element. + + + + + + + + + + + WombatServer + + ]]> + + + + + + + + + + + + + + The connection-definitionType defines a set of connection + interfaces and classes pertaining to a particular connection + type. This also includes configurable properties for + ManagedConnectionFactory instances that may be produced out + of this set. + + + + + + + + + + com.wombat.ManagedConnectionFactoryImpl + + + ]]> + + + + + + + + com.wombat.ConnectionFactory + + + OR + + javax.resource.cci.ConnectionFactory + + + ]]> + + + + + + + + com.wombat.ConnectionFactoryImpl + + + ]]> + + + + + + + javax.resource.cci.Connection + + + ]]> + + + + + + + com.wombat.ConnectionImpl + + + ]]> + + + + + + + + + + + + + + The connectorType defines a resource adapter. + + + + + + + + + + + The element vendor-name specifies the name of + resource adapter provider vendor. + + + + + + + + + The element eis-type contains information about the + type of the EIS. For example, the type of an EIS can + be product name of EIS independent of any version + info. + + This helps in identifying EIS instances that can be + used with this resource adapter. + + + + + + + + + The element resourceadapter-version specifies a string-based version + of the resource adapter from the resource adapter + provider. + + + + + + + + + + + + + + The version specifies the version of the + connector architecture specification that is + supported by this resource adapter. This information + enables deployer to configure the resource adapter to + support deployment and runtime requirements of the + corresponding connector architecture specification. + + + + + + + + + + + + + + The credential-interfaceType specifies the + interface that the resource adapter implementation + supports for the representation of the + credentials. This element(s) that use this type, + i.e. credential-interface, should be used by + application server to find out the Credential + interface it should use as part of the security + contract. + + The possible values are: + + javax.resource.spi.security.PasswordCredential + org.ietf.jgss.GSSCredential + javax.resource.spi.security.GenericCredential + + + + + + + + + + + + + + + + + + + The inbound-resourceadapterType specifies information + about an inbound resource adapter. This contains information + specific to the implementation of the resource adapter + library as specified through the messageadapter element. + + + + + + + + + + + The messagelistener-type element content must be + unique in the messageadapter. Several messagelisteners + can not use the same messagelistener-type. + + + + + + + + + + + + + + + + + + The licenseType specifies licensing requirements for the + resource adapter module. This type specifies whether a + license is required to deploy and use this resource adapter, + and an optional description of the licensing terms + (examples: duration of license, number of connection + restrictions). It is used by the license element. + + + + + + + + + + + The element license-required specifies whether a + license is required to deploy and use the + resource adapter. This element must be one of + the following, "true" or "false". + + + + + + + + + + + + + + + The messageadapterType specifies information about the + messaging capabilities of the resource adapter. This + contains information specific to the implementation of the + resource adapter library as specified through the + messagelistener element. + + + + + + + + + + + + + + + + + The messagelistenerType specifies information about a + specific message listener supported by the messaging + resource adapter. It contains information on the Java type + of the message listener interface and an activation + specification. + + + + + + + + + javax.jms.MessageListener + + + ]]> + + + + + + + + + + + + + + + + The outbound-resourceadapterType specifies information about + an outbound resource adapter. The information includes fully + qualified names of classes/interfaces required as part of + the connector architecture specified contracts for + connection management, level of transaction support + provided, one or more authentication mechanisms supported + and additional required security permissions. + + If there is no authentication-mechanism specified as part of + resource adapter element then the resource adapter does not + support any standard security authentication mechanisms as + part of security contract. The application server ignores + the security part of the system contracts in this case. + + + + + + + + + + + + + The element reauthentication-support specifies + whether the resource adapter implementation supports + re-authentication of existing Managed- Connection + instance. Note that this information is for the + resource adapter implementation and not for the + underlying EIS instance. This element must have + either a "true" or "false" value. + + + + + + + + + + + + + + + Destination + + ]]> + + + + + + + + + + + + + + + + + The resourceadapterType specifies information about the + resource adapter. The information includes fully qualified + resource adapter Java class name, configuration properties, + information specific to the implementation of the resource + adapter library as specified through the + outbound-resourceadapter and inbound-resourceadapter + elements, and an optional set of administered objects. + + + + + + + + + + The element resourceadapter-class specifies the + fully qualified name of a Java class that implements + the javax.resource.spi.ResourceAdapter + interface. This Java class is provided as part of + resource adapter's implementation of connector + architecture specified contracts. The implementation + of this class is required to be a JavaBean. + + + + + + + + + + + + The connectionfactory-interface element content + must be unique in the outbound-resourceadapter. + Multiple connection-definitions can not use the + same connectionfactory-type. + + + + + + + + + + + + + + + + + + + + + The security-permissionType specifies a security + permission that is required by the resource adapter code. + + The security permission listed in the deployment descriptor + are ones that are different from those required by the + default permission set as specified in the connector + specification. The optional description can mention specific + reason that resource adapter requires a given security + permission. + + + + + + + + + + + The element security-permission-spec specifies a security + permission based on the Security policy file + syntax. Refer to the following URL for Sun's + implementation of the security permission + specification: + + http://java.sun.com/products/jdk/1.4/docs/guide/security/PolicyFiles.html#FileSyntax + + + + + + + + + + + + + + The transaction-supportType specifies the level of + transaction support provided by the resource adapter. It is + used by transaction-support elements. + + The value must be one of the following: + + NoTransaction + LocalTransaction + XATransaction + + + + + + + + + + + + + + diff --git a/cli/src/test/resources/xsd/connector_1_6.xsd b/cli/src/test/resources/xsd/connector_1_6.xsd new file mode 100644 index 00000000..384169e7 --- /dev/null +++ b/cli/src/test/resources/xsd/connector_1_6.xsd @@ -0,0 +1,1269 @@ + + + + + + $Id$ + + + + + + + + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + + Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved. + + The contents of this file are subject to the terms of either the + GNU General Public License Version 2 only ("GPL") or the Common + Development and Distribution License("CDDL") (collectively, the + "License"). You may not use this file except in compliance with + the License. You can obtain a copy of the License at + https://glassfish.dev.java.net/public/CDDL+GPL.html or + glassfish/bootstrap/legal/LICENSE.txt. See the License for the + specific language governing permissions and limitations under the + License. + + When distributing the software, include this License Header + Notice in each file and include the License file at + glassfish/bootstrap/legal/LICENSE.txt. Sun designates this + particular file as subject to the "Classpath" exception as + provided by Sun in the GPL Version 2 section of the License file + that accompanied this code. If applicable, add the following + below the License Header, with the fields enclosed by brackets [] + replaced by your own identifying information: + "Portions Copyrighted [year] [name of copyright owner]" + + Contributor(s): + + If you wish your version of this file to be governed by only the + CDDL or only the GPL Version 2, indicate your decision by adding + "[Contributor] elects to include this software in this + distribution under the [CDDL or GPL Version 2] license." If you + don't indicate a single choice of license, a recipient has the + option to distribute your version of this file under either the + CDDL, the GPL Version 2 or to extend the choice of license to its + licensees as provided above. However, if you add GPL Version 2 + code and therefore, elected the GPL Version 2 license, then the + option applies only if the new code is made subject to such + option by the copyright holder. + + + + + + + + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + + Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved. + + The contents of this file are subject to the terms of either the + GNU General Public License Version 2 only ("GPL") or the Common + Development and Distribution License("CDDL") (collectively, the + "License"). You may not use this file except in compliance with + the License. You can obtain a copy of the License at + https://glassfish.dev.java.net/public/CDDL+GPL.html or + glassfish/bootstrap/legal/LICENSE.txt. See the License for the + specific language governing permissions and limitations under the + License. + + When distributing the software, include this License Header + Notice in each file and include the License file at + glassfish/bootstrap/legal/LICENSE.txt. Sun designates this + particular file as subject to the "Classpath" exception as + provided by Sun in the GPL Version 2 section of the License file + that accompanied this code. If applicable, add the following + below the License Header, with the fields enclosed by brackets [] + replaced by your own identifying information: + "Portions Copyrighted [year] [name of copyright owner]" + + Contributor(s): + + If you wish your version of this file to be governed by only the + CDDL or only the GPL Version 2, indicate your decision by adding + "[Contributor] elects to include this software in this + distribution under the [CDDL or GPL Version 2] license." If you + don't indicate a single choice of license, a recipient has the + option to distribute your version of this file under either the + CDDL, the GPL Version 2 or to extend the choice of license to its + licensees as provided above. However, if you add GPL Version 2 + code and therefore, elected the GPL Version 2 license, then the + option applies only if the new code is made subject to such + option by the copyright holder. + + + + + + + + ... + + + The instance documents may indicate the published version of + the schema using the xsi:schemaLocation attribute for Java EE + namespace with the following location: + + http://java.sun.com/xml/ns/javaee/connector_1_6.xsd + + ]]> + + + + + + + The following conventions apply to all Java EE + deployment descriptor elements unless indicated otherwise. + + - In elements that specify a pathname to a file within the + same JAR file, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the JAR file's namespace. Absolute filenames (i.e., those + starting with "/") also specify names in the root of the + JAR file's namespace. In general, relative names are + preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + The connector element is the root element of the deployment + descriptor for the resource adapter. This element includes + general information - vendor name, resource adapter version, + icon - about the resource adapter module. It also includes + information specific to the implementation of the resource + adapter library as specified through the element + resourceadapter. + + + + + + + + + + + + + The activationspecType specifies an activation + specification. The information includes fully qualified + Java class name of an activation specification and a set of + required configuration property names. + + + + + + + + com.wombat.ActivationSpecImpl + + + ]]> + + + + + + + + The required-config-property element is deprecated since + Connectors 1.6 specification. The resource adapter + implementation is recommended to use the @NotNull + Bean Validation annotation or its XML validation + descriptor equivalent to indicate that a configuration + property is required to be specified by the deployer. + See the Connectors specification for more information. + + + + + + + + + + + + + + + + + The adminobjectType specifies information about an + administered object. Administered objects are specific to a + messaging style or message provider. This contains + information on the Java type of the interface implemented by + an administered object, its Java class name and its + configuration properties. + + + + + + + + javax.jms.Destination + + + ]]> + + + + + + + com.wombat.DestinationImpl + + + ]]> + + + + + + + + + + + + + + + + The authentication-mechanismType specifies an authentication + mechanism supported by the resource adapter. Note that this + support is for the resource adapter and not for the + underlying EIS instance. The optional description specifies + any resource adapter specific requirement for the support of + security contract and authentication mechanism. + + Note that BasicPassword mechanism type should support the + javax.resource.spi.security.PasswordCredential interface. + The Kerbv5 mechanism type should support the + org.ietf.jgss.GSSCredential interface or the deprecated + javax.resource.spi.security.GenericCredential interface. + + + + + + + + + BasicPassword + + + Kerbv5 + + + Any additional security mechanisms are outside the + scope of the Connector architecture specification. + + ]]> + + + + + + + + + + + + + + + ServerName + + ]]> + + + + + + + + + + + + + + java.lang.String + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + The config-propertyType contains a declaration of a single + configuration property that may be used for providing + configuration information. + + The declaration consists of an optional description, name, + type and an optional value of the configuration property. If + the resource adapter provider does not specify a value than + the deployer is responsible for providing a valid value for + a configuration property. + + Any bounds or well-defined values of properties should be + described in the description element. + + + + + + + + + + + WombatServer + + ]]> + + + + + + + + The element config-property-ignore is used to specify + whether the configuration tools must ignore considering the + configuration property during auto-discovery of + Configuration properties. See the Connector specification for + more details. If unspecified, the container must not ignore + the configuration property during auto-discovery. + This element must be one of the following, "true" or "false". + + + + + + + + + The element config-property-supports-dynamic-updates is used to specify + whether the configuration property allows its value to be updated, by + application server's configuration tools, during the lifetime of + the JavaBean instance. See the Connector specification for + more details. If unspecified, the container must not dynamically + reconfigure the property. + This element must be one of the following, "true" or "false". + + + + + + + + + The element config-property-confidential is used to specify + whether the configuration property is confidential and + recommends application server's configuration tools to use special + visual aids for editing them. See the Connector specification for + more details. If unspecified, the container must not treat the + property as confidential. + This element must be one of the following, "true" or "false". + + + + + + + + + + + + + + + + The connection-definitionType defines a set of connection + interfaces and classes pertaining to a particular connection + type. This also includes configurable properties for + ManagedConnectionFactory instances that may be produced out + of this set. + + + + + + + + + com.wombat.ManagedConnectionFactoryImpl + + + ]]> + + + + + + + + com.wombat.ConnectionFactory + + + OR + + javax.resource.cci.ConnectionFactory + + + ]]> + + + + + + + com.wombat.ConnectionFactoryImpl + + + ]]> + + + + + + + javax.resource.cci.Connection + + + ]]> + + + + + + + com.wombat.ConnectionImpl + + + ]]> + + + + + + + + + + + + + + + The connectorType defines a resource adapter. + + + + + + + + + The element module-name specifies the name of the + resource adapter. + + If there is no module-name specified, the module-name + is determined as defined in Section EE.8.1.1 and EE.8.1.2 + of the Java Platform, Enterprise Edition (Java EE) + Specification, version 6. + + + + + + + + + + The element vendor-name specifies the name of + resource adapter provider vendor. + + If there is no vendor-name specified, the application + server must consider the default "" (empty string) as + the name of the resource adapter provider vendor. + + + + + + + + + The element eis-type contains information about the + type of the EIS. For example, the type of an EIS can + be product name of EIS independent of any version + info. + + This helps in identifying EIS instances that can be + used with this resource adapter. + + If there is no eis-type specified, the application + server must consider the default "" (empty string) as + the type of the EIS. + + + + + + + + + The element resourceadapter-version specifies a string-based version + of the resource adapter from the resource adapter + provider. + + If there is no resourceadapter-version specified, the application + server must consider the default "" (empty string) as + the version of the resource adapter. + + + + + + + + + + + + The element required-work-context specifies a fully qualified class + name that implements WorkContext interface, that the resource adapter + requires the application server to support. + + + + + + + + + + The version indicates the version of the schema to be used by the + deployment tool. This element doesn't have a default, and the resource adapter + developer/deployer is required to specify it. The element allows the deployment + tool to choose which schema to validate the descriptor against. + + + + + + + + + + The metadata-complete attribute defines whether the deployment + descriptor for the resource adapter module is complete, or whether + the class files available to the module and packaged with the resource + adapter should be examined for annotations that specify deployment + information. + + If metadata-complete is set to "true", the deployment tool of the + application server must ignore any annotations that specify deployment + information, which might be present in the class files of the + application.If metadata-complete is not specified or is set to "false", + the deployment tool must examine the class files of the application for + annotations, as specified by this specification. If the + deployment descriptor is not included or is included but not marked + metadata-complete, the deployment tool will process annotations. + + Application servers must assume that metadata-complete is true for + resource adapter modules with deployment descriptor version + lower than 1.6. + + + + + + + + + + + + + + + The credential-interfaceType specifies the + interface that the resource adapter implementation + supports for the representation of the + credentials. This element(s) that use this type, + i.e. credential-interface, should be used by + application server to find out the Credential + interface it should use as part of the security + contract. + + The possible values are: + + javax.resource.spi.security.PasswordCredential + org.ietf.jgss.GSSCredential + javax.resource.spi.security.GenericCredential + + + + + + + + + + + + + + + + + + + + The inbound-resourceadapterType specifies information + about an inbound resource adapter. This contains information + specific to the implementation of the resource adapter + library as specified through the messageadapter element. + + + + + + + + + + The messagelistener-type element content must be + unique in the messageadapter. Several messagelisteners + can not use the same messagelistener-type. + + + + + + + + + + + + + + + + + + + The licenseType specifies licensing requirements for the + resource adapter module. This type specifies whether a + license is required to deploy and use this resource adapter, + and an optional description of the licensing terms + (examples: duration of license, number of connection + restrictions). It is used by the license element. + + + + + + + + + + The element license-required specifies whether a + license is required to deploy and use the + resource adapter. This element must be one of + the following, "true" or "false". + + + + + + + + + + + + + + + + The messageadapterType specifies information about the + messaging capabilities of the resource adapter. This + contains information specific to the implementation of the + resource adapter library as specified through the + messagelistener element. + + + + + + + + + + + + + + + + + The messagelistenerType specifies information about a + specific message listener supported by the messaging + resource adapter. It contains information on the Java type + of the message listener interface and an activation + specification. + + + + + + + + javax.jms.MessageListener + + + ]]> + + + + + + + + + + + + + + + + The outbound-resourceadapterType specifies information about + an outbound resource adapter. The information includes fully + qualified names of classes/interfaces required as part of + the connector architecture specified contracts for + connection management, level of transaction support + provided, one or more authentication mechanisms supported + and additional required security permissions. + + If any of the outbound resource adapter elements (transaction-support, + authentication-mechanism, reauthentication-support) is specified through + this element or metadata annotations, and no connection-definition is + specified as part of this element or through annotations, the + application server must consider this an error and fail deployment. + + If there is no authentication-mechanism specified as part of + this element or metadata annotations, then the resource adapter does + not support any standard security authentication mechanisms as + part of security contract. The application server ignores the security + part of the system contracts in this case. + + If there is no transaction-support specified as part of this element + or metadata annotation, then the application server must consider that + the resource adapter does not support either the resource manager local + or JTA transactions and must consider the transaction support as + NoTransaction. Note that resource adapters may specify the level of + transaction support to be used at runtime for a ManagedConnectionFactory + through the TransactionSupport interface. + + If there is no reauthentication-support specified as part of + this element or metadata annotation, then the application server must consider + that the resource adapter does not support re-authentication of + ManagedConnections. + + + + + + + + + + + + The element reauthentication-support specifies + whether the resource adapter implementation supports + re-authentication of existing Managed- Connection + instance. Note that this information is for the + resource adapter implementation and not for the + underlying EIS instance. This element must have + either a "true" or "false" value. + + + + + + + + + + + + + + + + + Destination + + + ]]> + + + + + + + + + + + + + + + + + The resourceadapterType specifies information about the + resource adapter. The information includes fully qualified + resource adapter Java class name, configuration properties, + information specific to the implementation of the resource + adapter library as specified through the + outbound-resourceadapter and inbound-resourceadapter + elements, and an optional set of administered objects. + + + + + + + + + The element resourceadapter-class specifies the + fully qualified name of a Java class that implements + the javax.resource.spi.ResourceAdapter + interface. This Java class is provided as part of + resource adapter's implementation of connector + architecture specified contracts. The implementation + of this class is required to be a JavaBean. + + + + + + + + + + + The connectionfactory-interface element content + must be unique in the outbound-resourceadapter. + Multiple connection-definitions can not use the + same connectionfactory-type. + + + + + + + + + + + + + + The adminobject-interface and adminobject-class element content must be + unique in the resourceadapterType. Several admin objects + can not use the same adminobject-interface and adminobject-class. + + + + + + + + + + + + + + + + + + + + + The security-permissionType specifies a security + permission that is required by the resource adapter code. + + The security permission listed in the deployment descriptor + are ones that are different from those required by the + default permission set as specified in the connector + specification. The optional description can mention specific + reason that resource adapter requires a given security + permission. + + + + + + + + + + The element security-permission-spec specifies a security + permission based on the Security policy file + syntax. Refer to the following URL for Sun's + implementation of the security permission + specification: + + http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyFiles.html + + + + + + + + + + + + + + + + The transaction-supportType specifies the level of + transaction support provided by the resource adapter. It is + used by transaction-support elements. + + The value must be one of the following: + + NoTransaction + LocalTransaction + XATransaction + + + + + + + + + + + + + diff --git a/cli/src/test/resources/xsd/datasources_1_0.xsd b/cli/src/test/resources/xsd/datasources_1_0.xsd new file mode 100644 index 00000000..67aac8c9 --- /dev/null +++ b/cli/src/test/resources/xsd/datasources_1_0.xsd @@ -0,0 +1,937 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jdbc:hsqldb:hsql://localhost:1701 + ]]> + + + + + + + org.hsqldb.jdbcDriver + ]]> + + + + + + + org.h2.jdbcx.JdbcDataSource + ]]> + + + + + + + + + + + + + + UTF-8 + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + myhost.mydomain.com + 1557 + mydb + myserver + ]]> + + + + + + + oracle.jdbc.xa.client.OracleXADataSource + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + ]]> + + + + + + + + ]]> + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + 300 + ]]> + + + + + + + 300 + ]]> + + + + + + + + + + + + + + + + + + + + + 300 + ]]> + + + + + + + + + + + + + + + + + + nowarn + ]]> + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + 1 + ]]> + + + + + + + + + + + + + + true. + Default is false + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + true + ]]> + + + + + + + + ]]> + + + + + + + + Ex: + ]]> + + + + + + + true + ]]> + + + + + + + true + ]]> + + + + + + + + + + + + + sa + ]]> + + + + + + + sa-pass + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.hsqldb.jdbcDriver + ]]> + + + + + + + + + + + + + oracle.jdbc.xa.client.OracleXADataSource + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cli/src/test/resources/xsd/instance1.xml b/cli/src/test/resources/xsd/instance1.xml new file mode 100644 index 00000000..b370129d --- /dev/null +++ b/cli/src/test/resources/xsd/instance1.xml @@ -0,0 +1,102 @@ + + + + bean-validation-group0 + bean-validation-group1 + + bootstrap-context0 + config-property0 + config-property1 + NoTransaction + + + config-property2 + config-property3 + + 50 + 50 + false + false + flush-strategy0 + + + security-domain-and-application0 + + + 50 + 50 + 50 + 50 + 50 + + + false + 50 + false + + + + user-name0 + password0 + security-domain0 + + + config-property4 + + + + + config-property5 + config-property6 + + 50 + 50 + false + false + flush-strategy1 + false + + + false + false + + + security-domain-and-application1 + + + 50 + 50 + 50 + 50 + 50 + + + false + 50 + false + + + + user-name1 + password1 + security-domain1 + + + config-property7 + + + + + + + config-property8 + config-property9 + + + config-property10 + config-property11 + + + diff --git a/cli/src/test/resources/xsd/ironjacamar_1_0.xsd b/cli/src/test/resources/xsd/ironjacamar_1_0.xsd new file mode 100644 index 00000000..c2bab060 --- /dev/null +++ b/cli/src/test/resources/xsd/ironjacamar_1_0.xsd @@ -0,0 +1,645 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 300 + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + true + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + ]]> + + + + + + + + + + + + + + false. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + ]]> + + + + + + + + ]]> + + + + + + + + Ex: + ]]> + + + + + + + true + ]]> + + + + + + + true + ]]> + + + + + + + + + + + + + + + + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sa + ]]> + + + + + + + sa-pass + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + + + + + + + + + diff --git a/cli/src/test/resources/xsd/resource-adapters_1_0.xsd b/cli/src/test/resources/xsd/resource-adapters_1_0.xsd new file mode 100644 index 00000000..cb8833dd --- /dev/null +++ b/cli/src/test/resources/xsd/resource-adapters_1_0.xsd @@ -0,0 +1,665 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + myra.rar + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 300 + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + true + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + ]]> + + + + + + + + + + + + + + false. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + ]]> + + + + + + + + ]]> + + + + + + + + Ex: + ]]> + + + + + + + true + ]]> + + + + + + + true + ]]> + + + + + + + + + + + + + + + + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sa + ]]> + + + + + + + sa-pass + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + diff --git a/cli/temp/lib/xdd-printBase.xsl b/cli/temp/lib/xdd-printBase.xsl new file mode 100644 index 00000000..b8f8f456 --- /dev/null +++ b/cli/temp/lib/xdd-printBase.xsl @@ -0,0 +1,403 @@ + + + + + + + + + + + package ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + + + { + + + + + } + + + { + super(descriptorName); + + addDefaultNamespaces(); + } + + + + + + + + + + + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + + { + this.t = t; + + + } + + + + { + this.t = t; + + + } + + + + + + + + + + + // -------------------------------------------------------------------------------------|| + // Methods + // -------------------------------------------------------------------------------------|| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + public Node getRootNode() + { + + } + + + + + + + + + + // -------------------------------------------------------------------------------------|| + // Namespace + // -------------------------------------------------------------------------------------|| + + + + + + + + { + + + + + } + + + + + + + { + + + } + + + + + + public List<String> getNamespaces() + { + + + + + + + + + + + + } + + + + + + + { + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + public + + + + + + + + + + + + + + + + + + + + + + + + + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cli/temp/lib/xdd-printElement.xsl b/cli/temp/lib/xdd-printElement.xsl new file mode 100644 index 00000000..4ccc7ed8 --- /dev/null +++ b/cli/temp/lib/xdd-printElement.xsl @@ -0,0 +1,1181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cli/temp/lib/xdd-util.xsl b/cli/temp/lib/xdd-util.xsl new file mode 100644 index 00000000..72d87b9b --- /dev/null +++ b/cli/temp/lib/xdd-util.xsl @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cli/temp/metadata.xml b/cli/temp/metadata.xml new file mode 100644 index 00000000..185c1879 --- /dev/null +++ b/cli/temp/metadata.xml @@ -0,0 +1 @@ +/* * JBoss, Home of Professional Open Source * Copyright 2011, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * Licensed 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. */NoTransactionLocalTransactionXATransactionTRANSACTION_READ_UNCOMMITTEDTRANSACTION_READ_COMMITTEDTRANSACTION_REPEATABLE_READTRANSACTION_SERIALIZABLETRANSACTION_NONEtruefalsenowarnNoTransactionLocalTransactionXATransaction \ No newline at end of file diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/ConfigPropertyType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/ConfigPropertyType.java new file mode 100644 index 00000000..3a3ab763 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/ConfigPropertyType.java @@ -0,0 +1,87 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the config-propertyType xsd type + *

+ * Original Documentation: + *

+ *
+ * [
+ * Specifies a Java bean property value
+ *
+ *
+ * + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ConfigPropertyType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConfigPropertyType ElementName: xsd:token ElementType : name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the name attribute + * @param name the value for the attribute name + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType name(String name); + + /** + * Returns the name attribute + * @return the value defined for the attribute name + */ +public String getName(); + + /** + * Removes the name attribute + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType removeName(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConfigPropertyType ElementName: xsd:token ElementType : config-propertyType + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the config-propertyType element + * @param configPropertyType the value for the element config-propertyType + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType configPropertyType(String configPropertyType); + + /** + * Returns the config-propertyType element + * @return the node defined for the element config-propertyType + */ + public String getConfigPropertyType(); + + /** + * Removes the config-propertyType element + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType removeConfigPropertyType(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/ConnectionPropertyType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/ConnectionPropertyType.java new file mode 100644 index 00000000..ea6aa8fd --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/ConnectionPropertyType.java @@ -0,0 +1,53 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the connection-propertyType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ConnectionPropertyType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionPropertyType ElementName: xsd:token ElementType : name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the name attribute + * @param name the value for the attribute name + * @return the current instance of ConnectionPropertyType + */ + public ConnectionPropertyType name(String name); + + /** + * Returns the name attribute + * @return the value defined for the attribute name + */ +public String getName(); + + /** + * Removes the name attribute + * @return the current instance of ConnectionPropertyType + */ + public ConnectionPropertyType removeName(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DatasourceType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DatasourceType.java new file mode 100644 index 00000000..ca3c31a6 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DatasourceType.java @@ -0,0 +1,541 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ConnectionPropertyType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TransactionIsolationType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.PoolType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DsSecurityType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ValidationType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TimeoutType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.StatementType; +/** + * This interface defines the contract for the datasourceType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface DatasourceType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : jndi-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jndi-name attribute + * @param jndiName the value for the attribute jndi-name + * @return the current instance of DatasourceType + */ + public DatasourceType jndiName(String jndiName); + + /** + * Returns the jndi-name attribute + * @return the value defined for the attribute jndi-name + */ +public String getJndiName(); + + /** + * Removes the jndi-name attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeJndiName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : pool-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pool-name attribute + * @param poolName the value for the attribute pool-name + * @return the current instance of DatasourceType + */ + public DatasourceType poolName(String poolName); + + /** + * Returns the pool-name attribute + * @return the value defined for the attribute pool-name + */ +public String getPoolName(); + + /** + * Removes the pool-name attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removePoolName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:boolean ElementType : enabled + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the enabled attribute + * @param enabled the value for the attribute enabled + * @return the current instance of DatasourceType + */ + public DatasourceType enabled(Boolean enabled); + + /** + * Returns the enabled attribute + * @return the value defined for the attribute enabled + */ +public Boolean isEnabled(); + + /** + * Removes the enabled attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeEnabled(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:boolean ElementType : use-java-context + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-java-context attribute + * @param useJavaContext the value for the attribute use-java-context + * @return the current instance of DatasourceType + */ + public DatasourceType useJavaContext(Boolean useJavaContext); + + /** + * Returns the use-java-context attribute + * @return the value defined for the attribute use-java-context + */ +public Boolean isUseJavaContext(); + + /** + * Removes the use-java-context attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeUseJavaContext(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:boolean ElementType : spy + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the spy attribute + * @param spy the value for the attribute spy + * @return the current instance of DatasourceType + */ + public DatasourceType spy(Boolean spy); + + /** + * Returns the spy attribute + * @return the value defined for the attribute spy + */ +public Boolean isSpy(); + + /** + * Removes the spy attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeSpy(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:boolean ElementType : use-ccm + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-ccm attribute + * @param useCcm the value for the attribute use-ccm + * @return the current instance of DatasourceType + */ + public DatasourceType useCcm(Boolean useCcm); + + /** + * Returns the use-ccm attribute + * @return the value defined for the attribute use-ccm + */ +public Boolean isUseCcm(); + + /** + * Removes the use-ccm attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeUseCcm(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : connection-url + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the connection-url element + * @param connectionUrl the value for the element connection-url + * @return the current instance of DatasourceType + */ + public DatasourceType connectionUrl(String connectionUrl); + + /** + * Returns the connection-url element + * @return the node defined for the element connection-url + */ + public String getConnectionUrl(); + + /** + * Removes the connection-url element + * @return the current instance of DatasourceType + */ + public DatasourceType removeConnectionUrl(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : driver-class + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the driver-class element + * @param driverClass the value for the element driver-class + * @return the current instance of DatasourceType + */ + public DatasourceType driverClass(String driverClass); + + /** + * Returns the driver-class element + * @return the node defined for the element driver-class + */ + public String getDriverClass(); + + /** + * Removes the driver-class element + * @return the current instance of DatasourceType + */ + public DatasourceType removeDriverClass(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : datasource-class + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the datasource-class element + * @param datasourceClass the value for the element datasource-class + * @return the current instance of DatasourceType + */ + public DatasourceType datasourceClass(String datasourceClass); + + /** + * Returns the datasource-class element + * @return the node defined for the element datasource-class + */ + public String getDatasourceClass(); + + /** + * Removes the datasource-class element + * @return the current instance of DatasourceType + */ + public DatasourceType removeDatasourceClass(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : driver + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the driver element + * @param driver the value for the element driver + * @return the current instance of DatasourceType + */ + public DatasourceType driver(String driver); + + /** + * Returns the driver element + * @return the node defined for the element driver + */ + public String getDriver(); + + /** + * Removes the driver element + * @return the current instance of DatasourceType + */ + public DatasourceType removeDriver(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:connection-propertyType ElementType : connection-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new connection-property element will be created and returned. + * Otherwise, the first existing connection-property element will be returned. + * @return the instance defined for the element connection-property + */ + public ConnectionPropertyType> getOrCreateConnectionProperty(); + + /** + * Creates a new connection-property element + * @return the new created instance of ConnectionPropertyType> + */ + public ConnectionPropertyType> createConnectionProperty(); + + /** + * Returns all connection-property elements + * @return list of connection-property + */ + public List>> getAllConnectionProperty(); + + /** + * Removes all connection-property elements + * @return the current instance of ConnectionPropertyType> + */ + public DatasourceType removeAllConnectionProperty(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:string ElementType : new-connection-sql + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the new-connection-sql element + * @param newConnectionSql the value for the element new-connection-sql + * @return the current instance of DatasourceType + */ + public DatasourceType newConnectionSql(String newConnectionSql); + + /** + * Returns the new-connection-sql element + * @return the node defined for the element new-connection-sql + */ + public String getNewConnectionSql(); + + /** + * Removes the new-connection-sql element + * @return the current instance of DatasourceType + */ + public DatasourceType removeNewConnectionSql(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:transaction-isolationType ElementType : transaction-isolation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: true isDataType: false + // --------------------------------------------------------------------------------------------------------|| + /** + * Sets the transaction-isolation element + * @param transactionIsolation the value for the element transaction-isolation + * @return the current instance of DatasourceType + */ + public DatasourceType transactionIsolation(TransactionIsolationType transactionIsolation); + /** + * Sets the transaction-isolation element + * @param transactionIsolation the value for the element transaction-isolation + * @return the current instance of DatasourceType + */ + public DatasourceType transactionIsolation(String transactionIsolation); + + /** + * Returns the transaction-isolation element + * @return the value found for the element transaction-isolation + */ + public TransactionIsolationType getTransactionIsolation(); + + /** + * Returns the transaction-isolation element + * @return the value found for the element transaction-isolation + */ + public String getTransactionIsolationAsString(); + + /** + * Removes the transaction-isolation attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeTransactionIsolation(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : url-delimiter + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the url-delimiter element + * @param urlDelimiter the value for the element url-delimiter + * @return the current instance of DatasourceType + */ + public DatasourceType urlDelimiter(String urlDelimiter); + + /** + * Returns the url-delimiter element + * @return the node defined for the element url-delimiter + */ + public String getUrlDelimiter(); + + /** + * Removes the url-delimiter element + * @return the current instance of DatasourceType + */ + public DatasourceType removeUrlDelimiter(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : url-selector-strategy-class-name + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the url-selector-strategy-class-name element + * @param urlSelectorStrategyClassName the value for the element url-selector-strategy-class-name + * @return the current instance of DatasourceType + */ + public DatasourceType urlSelectorStrategyClassName(String urlSelectorStrategyClassName); + + /** + * Returns the url-selector-strategy-class-name element + * @return the node defined for the element url-selector-strategy-class-name + */ + public String getUrlSelectorStrategyClassName(); + + /** + * Removes the url-selector-strategy-class-name element + * @return the current instance of DatasourceType + */ + public DatasourceType removeUrlSelectorStrategyClassName(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:poolType ElementType : pool + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new pool element with the given value will be created. + * Otherwise, the existing pool element will be returned. + * @return a new or existing instance of PoolType> + */ + public PoolType> getOrCreatePool(); + + /** + * Removes the pool element + * @return the current instance of DatasourceType + */ + public DatasourceType removePool(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:dsSecurityType ElementType : security + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new security element with the given value will be created. + * Otherwise, the existing security element will be returned. + * @return a new or existing instance of DsSecurityType> + */ + public DsSecurityType> getOrCreateSecurity(); + + /** + * Removes the security element + * @return the current instance of DatasourceType + */ + public DatasourceType removeSecurity(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:validationType ElementType : validation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new validation element with the given value will be created. + * Otherwise, the existing validation element will be returned. + * @return a new or existing instance of ValidationType> + */ + public ValidationType> getOrCreateValidation(); + + /** + * Removes the validation element + * @return the current instance of DatasourceType + */ + public DatasourceType removeValidation(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:timeoutType ElementType : timeout + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new timeout element with the given value will be created. + * Otherwise, the existing timeout element will be returned. + * @return a new or existing instance of TimeoutType> + */ + public TimeoutType> getOrCreateTimeout(); + + /** + * Removes the timeout element + * @return the current instance of DatasourceType + */ + public DatasourceType removeTimeout(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:statementType ElementType : statement + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new statement element with the given value will be created. + * Otherwise, the existing statement element will be returned. + * @return a new or existing instance of StatementType> + */ + public StatementType> getOrCreateStatement(); + + /** + * Removes the statement element + * @return the current instance of DatasourceType + */ + public DatasourceType removeStatement(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:boolean ElementType : jta + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jta attribute + * @param jta the value for the attribute jta + * @return the current instance of DatasourceType + */ + public DatasourceType jta(Boolean jta); + + /** + * Returns the jta attribute + * @return the value defined for the attribute jta + */ +public Boolean isJta(); + + /** + * Removes the jta attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeJta(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DatasourcesDescriptor.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DatasourcesDescriptor.java new file mode 100644 index 00000000..63673445 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DatasourcesDescriptor.java @@ -0,0 +1,98 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriversType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourceType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourceType; +import org.jboss.shrinkwrap.descriptor.api.Descriptor; +import org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace; + +/** + *

+ * This deployment descriptor provides the functionalities as described in the datasources_1_0.xsd specification + *

+ * Example: + *

+ * + * DatasourcesDescriptor descriptor = Descriptors.create(DatasourcesDescriptor.class); + * + * + * + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface DatasourcesDescriptor extends Descriptor, DescriptorNamespace +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourcesDescriptor ElementName: datasources:driversType ElementType : drivers + // MaxOccurs: -1 isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new drivers element with the given value will be created. + * Otherwise, the existing drivers element will be returned. + * @return a new or existing instance of DriversType + */ + public DriversType getOrCreateDrivers(); + + /** + * Removes the drivers element + * @return the current instance of DatasourcesDescriptor + */ + public DatasourcesDescriptor removeDrivers(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourcesDescriptor ElementName: datasources:datasourceType ElementType : datasource + // MaxOccurs: - isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new datasource element with the given value will be created. + * Otherwise, the existing datasource element will be returned. + * @return a new or existing instance of DatasourceType + */ + public DatasourceType getOrCreateDatasource(); + + /** + * Removes the datasource element + * @return the current instance of DatasourcesDescriptor + */ + public DatasourcesDescriptor removeDatasource(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourcesDescriptor ElementName: datasources:xa-datasourceType ElementType : xa-datasource + // MaxOccurs: - isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new xa-datasource element with the given value will be created. + * Otherwise, the existing xa-datasource element will be returned. + * @return a new or existing instance of XaDatasourceType + */ + public XaDatasourceType getOrCreateXaDatasource(); + + /** + * Removes the xa-datasource element + * @return the current instance of DatasourcesDescriptor + */ + public DatasourcesDescriptor removeXaDatasource(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DatasourcesType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DatasourcesType.java new file mode 100644 index 00000000..28e6769f --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DatasourcesType.java @@ -0,0 +1,88 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriversType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourceType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourceType; +/** + * This interface defines the contract for the datasourcesType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface DatasourcesType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourcesType ElementName: datasources:driversType ElementType : drivers + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new drivers element with the given value will be created. + * Otherwise, the existing drivers element will be returned. + * @return a new or existing instance of DriversType> + */ + public DriversType> getOrCreateDrivers(); + + /** + * Removes the drivers element + * @return the current instance of DatasourcesType + */ + public DatasourcesType removeDrivers(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourcesType ElementName: datasources:datasourceType ElementType : datasource + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new datasource element with the given value will be created. + * Otherwise, the existing datasource element will be returned. + * @return a new or existing instance of DatasourceType> + */ + public DatasourceType> getOrCreateDatasource(); + + /** + * Removes the datasource element + * @return the current instance of DatasourcesType + */ + public DatasourcesType removeDatasource(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourcesType ElementName: datasources:xa-datasourceType ElementType : xa-datasource + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new xa-datasource element with the given value will be created. + * Otherwise, the existing xa-datasource element will be returned. + * @return a new or existing instance of XaDatasourceType> + */ + public XaDatasourceType> getOrCreateXaDatasource(); + + /** + * Removes the xa-datasource element + * @return the current instance of DatasourcesType + */ + public DatasourcesType removeXaDatasource(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DriverType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DriverType.java new file mode 100644 index 00000000..1715b4b9 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DriverType.java @@ -0,0 +1,203 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the driverType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface DriverType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:token ElementType : driver-class + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the driver-class element + * @param driverClass the value for the element driver-class + * @return the current instance of DriverType + */ + public DriverType driverClass(String driverClass); + + /** + * Returns the driver-class element + * @return the node defined for the element driver-class + */ + public String getDriverClass(); + + /** + * Removes the driver-class element + * @return the current instance of DriverType + */ + public DriverType removeDriverClass(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:token ElementType : datasource-class + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the datasource-class element + * @param datasourceClass the value for the element datasource-class + * @return the current instance of DriverType + */ + public DriverType datasourceClass(String datasourceClass); + + /** + * Returns the datasource-class element + * @return the node defined for the element datasource-class + */ + public String getDatasourceClass(); + + /** + * Removes the datasource-class element + * @return the current instance of DriverType + */ + public DriverType removeDatasourceClass(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:token ElementType : xa-datasource-class + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the xa-datasource-class element + * @param xaDatasourceClass the value for the element xa-datasource-class + * @return the current instance of DriverType + */ + public DriverType xaDatasourceClass(String xaDatasourceClass); + + /** + * Returns the xa-datasource-class element + * @return the node defined for the element xa-datasource-class + */ + public String getXaDatasourceClass(); + + /** + * Removes the xa-datasource-class element + * @return the current instance of DriverType + */ + public DriverType removeXaDatasourceClass(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:token ElementType : name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the name attribute + * @param name the value for the attribute name + * @return the current instance of DriverType + */ + public DriverType name(String name); + + /** + * Returns the name attribute + * @return the value defined for the attribute name + */ +public String getName(); + + /** + * Removes the name attribute + * @return the current instance of DriverType + */ + public DriverType removeName(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:token ElementType : module + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the module attribute + * @param module the value for the attribute module + * @return the current instance of DriverType + */ + public DriverType module(String module); + + /** + * Returns the module attribute + * @return the value defined for the attribute module + */ +public String getModule(); + + /** + * Removes the module attribute + * @return the current instance of DriverType + */ + public DriverType removeModule(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:int ElementType : major-version + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the major-version attribute + * @param majorVersion the value for the attribute major-version + * @return the current instance of DriverType + */ + public DriverType majorVersion( majorVersion); + + /** + * Returns the major-version attribute + * @return the value defined for the attribute major-version + */ +public getMajorVersion(); + + /** + * Removes the major-version attribute + * @return the current instance of DriverType + */ + public DriverType removeMajorVersion(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:int ElementType : minor-verion + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the minor-verion attribute + * @param minorVerion the value for the attribute minor-verion + * @return the current instance of DriverType + */ + public DriverType minorVerion( minorVerion); + + /** + * Returns the minor-verion attribute + * @return the value defined for the attribute minor-verion + */ +public getMinorVerion(); + + /** + * Removes the minor-verion attribute + * @return the current instance of DriverType + */ + public DriverType removeMinorVerion(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DriversType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DriversType.java new file mode 100644 index 00000000..d269564e --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DriversType.java @@ -0,0 +1,60 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriverType; +/** + * This interface defines the contract for the driversType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface DriversType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriversType ElementName: datasources:driverType ElementType : driver + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new driver element will be created and returned. + * Otherwise, the first existing driver element will be returned. + * @return the instance defined for the element driver + */ + public DriverType> getOrCreateDriver(); + + /** + * Creates a new driver element + * @return the new created instance of DriverType> + */ + public DriverType> createDriver(); + + /** + * Returns all driver elements + * @return list of driver + */ + public List>> getAllDriver(); + + /** + * Removes all driver elements + * @return the current instance of DriverType> + */ + public DriversType removeAllDriver(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DsSecurityType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DsSecurityType.java new file mode 100644 index 00000000..e156a3a9 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/DsSecurityType.java @@ -0,0 +1,123 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +/** + * This interface defines the contract for the dsSecurityType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface DsSecurityType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DsSecurityType ElementName: xsd:token ElementType : user-name + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the user-name element + * @param userName the value for the element user-name + * @return the current instance of DsSecurityType + */ + public DsSecurityType userName(String userName); + + /** + * Returns the user-name element + * @return the node defined for the element user-name + */ + public String getUserName(); + + /** + * Removes the user-name element + * @return the current instance of DsSecurityType + */ + public DsSecurityType removeUserName(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DsSecurityType ElementName: xsd:token ElementType : password + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the password element + * @param password the value for the element password + * @return the current instance of DsSecurityType + */ + public DsSecurityType password(String password); + + /** + * Returns the password element + * @return the node defined for the element password + */ + public String getPassword(); + + /** + * Removes the password element + * @return the current instance of DsSecurityType + */ + public DsSecurityType removePassword(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DsSecurityType ElementName: xsd:token ElementType : security-domain + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain element + * @param securityDomain the value for the element security-domain + * @return the current instance of DsSecurityType + */ + public DsSecurityType securityDomain(String securityDomain); + + /** + * Returns the security-domain element + * @return the node defined for the element security-domain + */ + public String getSecurityDomain(); + + /** + * Removes the security-domain element + * @return the current instance of DsSecurityType + */ + public DsSecurityType removeSecurityDomain(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DsSecurityType ElementName: datasources:extensionType ElementType : reauth-plugin + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new reauth-plugin element with the given value will be created. + * Otherwise, the existing reauth-plugin element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateReauthPlugin(); + + /** + * Removes the reauth-plugin element + * @return the current instance of DsSecurityType + */ + public DsSecurityType removeReauthPlugin(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/ExtensionType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/ExtensionType.java new file mode 100644 index 00000000..47de551d --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/ExtensionType.java @@ -0,0 +1,85 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ConfigPropertyType; +/** + * This interface defines the contract for the extensionType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ExtensionType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ExtensionType ElementName: datasources:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty(); + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty(); + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty(); + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public ExtensionType removeAllConfigProperty(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ExtensionType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of ExtensionType + */ + public ExtensionType className(String className); + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ +public String getClassName(); + + /** + * Removes the class-name attribute + * @return the current instance of ExtensionType + */ + public ExtensionType removeClassName(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/PoolType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/PoolType.java new file mode 100644 index 00000000..a91555f6 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/PoolType.java @@ -0,0 +1,153 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the poolType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface PoolType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:nonNegativeInteger ElementType : min-pool-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the min-pool-size element + * @param minPoolSize the value for the element min-pool-size + * @return the current instance of PoolType + */ + public PoolType minPoolSize(Integer minPoolSize); + + /** + * Returns the min-pool-size element + * @return the node defined for the element min-pool-size + */ + public Integer getMinPoolSize(); + + /** + * Removes the min-pool-size element + * @return the current instance of PoolType + */ + public PoolType removeMinPoolSize(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:nonNegativeInteger ElementType : max-pool-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the max-pool-size element + * @param maxPoolSize the value for the element max-pool-size + * @return the current instance of PoolType + */ + public PoolType maxPoolSize(Integer maxPoolSize); + + /** + * Returns the max-pool-size element + * @return the node defined for the element max-pool-size + */ + public Integer getMaxPoolSize(); + + /** + * Removes the max-pool-size element + * @return the current instance of PoolType + */ + public PoolType removeMaxPoolSize(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:boolean ElementType : prefill + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the prefill element + * @param prefill the value for the element prefill + * @return the current instance of PoolType + */ + public PoolType prefill(Boolean prefill); + + /** + * Returns the prefill element + * @return the node defined for the element prefill + */ + public Boolean isPrefill(); + + /** + * Removes the prefill element + * @return the current instance of PoolType + */ + public PoolType removePrefill(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:boolean ElementType : use-strict-min + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-strict-min element + * @param useStrictMin the value for the element use-strict-min + * @return the current instance of PoolType + */ + public PoolType useStrictMin(Boolean useStrictMin); + + /** + * Returns the use-strict-min element + * @return the node defined for the element use-strict-min + */ + public Boolean isUseStrictMin(); + + /** + * Removes the use-strict-min element + * @return the current instance of PoolType + */ + public PoolType removeUseStrictMin(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:token ElementType : flush-strategy + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the flush-strategy element + * @param flushStrategy the value for the element flush-strategy + * @return the current instance of PoolType + */ + public PoolType flushStrategy(String flushStrategy); + + /** + * Returns the flush-strategy element + * @return the node defined for the element flush-strategy + */ + public String getFlushStrategy(); + + /** + * Removes the flush-strategy element + * @return the current instance of PoolType + */ + public PoolType removeFlushStrategy(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/RecoverType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/RecoverType.java new file mode 100644 index 00000000..614a0bcf --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/RecoverType.java @@ -0,0 +1,93 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DsSecurityType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +/** + * This interface defines the contract for the recoverType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface RecoverType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: datasources:dsSecurityType ElementType : recover-credential + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recover-credential element with the given value will be created. + * Otherwise, the existing recover-credential element will be returned. + * @return a new or existing instance of DsSecurityType> + */ + public DsSecurityType> getOrCreateRecoverCredential(); + + /** + * Removes the recover-credential element + * @return the current instance of RecoverType + */ + public RecoverType removeRecoverCredential(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: datasources:extensionType ElementType : recover-plugin + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recover-plugin element with the given value will be created. + * Otherwise, the existing recover-plugin element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateRecoverPlugin(); + + /** + * Removes the recover-plugin element + * @return the current instance of RecoverType + */ + public RecoverType removeRecoverPlugin(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: xsd:boolean ElementType : no-recovery + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the no-recovery attribute + * @param noRecovery the value for the attribute no-recovery + * @return the current instance of RecoverType + */ + public RecoverType noRecovery(Boolean noRecovery); + + /** + * Returns the no-recovery attribute + * @return the value defined for the attribute no-recovery + */ +public Boolean isNoRecovery(); + + /** + * Removes the no-recovery attribute + * @return the current instance of RecoverType + */ + public RecoverType removeNoRecovery(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/StatementType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/StatementType.java new file mode 100644 index 00000000..72052013 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/StatementType.java @@ -0,0 +1,114 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TrackStatementsType; +/** + * This interface defines the contract for the statementType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface StatementType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: StatementType ElementName: datasources:track-statementsType ElementType : track-statements + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: true isDataType: false + // --------------------------------------------------------------------------------------------------------|| + /** + * Sets the track-statements element + * @param trackStatements the value for the element track-statements + * @return the current instance of StatementType + */ + public StatementType trackStatements(TrackStatementsType trackStatements); + /** + * Sets the track-statements element + * @param trackStatements the value for the element track-statements + * @return the current instance of StatementType + */ + public StatementType trackStatements(String trackStatements); + + /** + * Returns the track-statements element + * @return the value found for the element track-statements + */ + public TrackStatementsType getTrackStatements(); + + /** + * Returns the track-statements element + * @return the value found for the element track-statements + */ + public String getTrackStatementsAsString(); + + /** + * Removes the track-statements attribute + * @return the current instance of StatementType + */ + public StatementType removeTrackStatements(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: StatementType ElementName: xsd:nonNegativeInteger ElementType : prepared-statement-cache-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the prepared-statement-cache-size element + * @param preparedStatementCacheSize the value for the element prepared-statement-cache-size + * @return the current instance of StatementType + */ + public StatementType preparedStatementCacheSize(Integer preparedStatementCacheSize); + + /** + * Returns the prepared-statement-cache-size element + * @return the node defined for the element prepared-statement-cache-size + */ + public Integer getPreparedStatementCacheSize(); + + /** + * Removes the prepared-statement-cache-size element + * @return the current instance of StatementType + */ + public StatementType removePreparedStatementCacheSize(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: StatementType ElementName: javaee:emptyType ElementType : share-prepared-statements + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the share-prepared-statements element + * @return the current instance of StatementType + */ + public StatementType sharePreparedStatements(); + + /** + * Removes the share-prepared-statements element + * @return the current instance of StatementType + */ + public Boolean isSharePreparedStatements(); + + /** + * Removes the share-prepared-statements element + * @return the current instance of StatementType + */ + public StatementType removeSharePreparedStatements(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/TimeoutType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/TimeoutType.java new file mode 100644 index 00000000..328521fb --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/TimeoutType.java @@ -0,0 +1,227 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the timeoutType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface TimeoutType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : blocking-timeout-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the blocking-timeout-millis element + * @param blockingTimeoutMillis the value for the element blocking-timeout-millis + * @return the current instance of TimeoutType + */ + public TimeoutType blockingTimeoutMillis(Integer blockingTimeoutMillis); + + /** + * Returns the blocking-timeout-millis element + * @return the node defined for the element blocking-timeout-millis + */ + public Integer getBlockingTimeoutMillis(); + + /** + * Removes the blocking-timeout-millis element + * @return the current instance of TimeoutType + */ + public TimeoutType removeBlockingTimeoutMillis(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : idle-timeout-minutes + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the idle-timeout-minutes element + * @param idleTimeoutMinutes the value for the element idle-timeout-minutes + * @return the current instance of TimeoutType + */ + public TimeoutType idleTimeoutMinutes(Integer idleTimeoutMinutes); + + /** + * Returns the idle-timeout-minutes element + * @return the node defined for the element idle-timeout-minutes + */ + public Integer getIdleTimeoutMinutes(); + + /** + * Removes the idle-timeout-minutes element + * @return the current instance of TimeoutType + */ + public TimeoutType removeIdleTimeoutMinutes(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: javaee:emptyType ElementType : set-tx-query-timeout + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the set-tx-query-timeout element + * @return the current instance of TimeoutType + */ + public TimeoutType setTxQueryTimeout(); + + /** + * Removes the set-tx-query-timeout element + * @return the current instance of TimeoutType + */ + public Boolean isSetTxQueryTimeout(); + + /** + * Removes the set-tx-query-timeout element + * @return the current instance of TimeoutType + */ + public TimeoutType removeSetTxQueryTimeout(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : query-timeout + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the query-timeout element + * @param queryTimeout the value for the element query-timeout + * @return the current instance of TimeoutType + */ + public TimeoutType queryTimeout(Integer queryTimeout); + + /** + * Returns the query-timeout element + * @return the node defined for the element query-timeout + */ + public Integer getQueryTimeout(); + + /** + * Removes the query-timeout element + * @return the current instance of TimeoutType + */ + public TimeoutType removeQueryTimeout(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : use-try-lock + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-try-lock element + * @param useTryLock the value for the element use-try-lock + * @return the current instance of TimeoutType + */ + public TimeoutType useTryLock(Integer useTryLock); + + /** + * Returns the use-try-lock element + * @return the node defined for the element use-try-lock + */ + public Integer getUseTryLock(); + + /** + * Removes the use-try-lock element + * @return the current instance of TimeoutType + */ + public TimeoutType removeUseTryLock(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : allocation-retry + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the allocation-retry element + * @param allocationRetry the value for the element allocation-retry + * @return the current instance of TimeoutType + */ + public TimeoutType allocationRetry(Integer allocationRetry); + + /** + * Returns the allocation-retry element + * @return the node defined for the element allocation-retry + */ + public Integer getAllocationRetry(); + + /** + * Removes the allocation-retry element + * @return the current instance of TimeoutType + */ + public TimeoutType removeAllocationRetry(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : allocation-retry-wait-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the allocation-retry-wait-millis element + * @param allocationRetryWaitMillis the value for the element allocation-retry-wait-millis + * @return the current instance of TimeoutType + */ + public TimeoutType allocationRetryWaitMillis(Integer allocationRetryWaitMillis); + + /** + * Returns the allocation-retry-wait-millis element + * @return the node defined for the element allocation-retry-wait-millis + */ + public Integer getAllocationRetryWaitMillis(); + + /** + * Removes the allocation-retry-wait-millis element + * @return the current instance of TimeoutType + */ + public TimeoutType removeAllocationRetryWaitMillis(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:token ElementType : xa-resource-timeout + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the xa-resource-timeout element + * @param xaResourceTimeout the value for the element xa-resource-timeout + * @return the current instance of TimeoutType + */ + public TimeoutType xaResourceTimeout(String xaResourceTimeout); + + /** + * Returns the xa-resource-timeout element + * @return the node defined for the element xa-resource-timeout + */ + public String getXaResourceTimeout(); + + /** + * Removes the xa-resource-timeout element + * @return the current instance of TimeoutType + */ + public TimeoutType removeXaResourceTimeout(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/TrackStatementsType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/TrackStatementsType.java new file mode 100644 index 00000000..aa511bfe --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/TrackStatementsType.java @@ -0,0 +1,46 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +/** + * This class implements the track-statementsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public enum TrackStatementsType +{ + _TRUE("true"), + _FALSE("false"), + _NOWARN("nowarn"); + + private String value; + + TrackStatementsType (String value) { this.value = value; } + + public String toString() {return value;} + + public static TrackStatementsType getFromStringValue(String value) + { + for(TrackStatementsType type: TrackStatementsType.values()) + { + if(value != null && type.toString().equals(value)) + { return type;} + } + return null; + } + +} + diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/TransactionIsolationType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/TransactionIsolationType.java new file mode 100644 index 00000000..978ea0f7 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/TransactionIsolationType.java @@ -0,0 +1,48 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +/** + * This class implements the transaction-isolationType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public enum TransactionIsolationType +{ + _TRANSACTION_READ_UNCOMMITTED("TRANSACTION_READ_UNCOMMITTED"), + _TRANSACTION_READ_COMMITTED("TRANSACTION_READ_COMMITTED"), + _TRANSACTION_REPEATABLE_READ("TRANSACTION_REPEATABLE_READ"), + _TRANSACTION_SERIALIZABLE("TRANSACTION_SERIALIZABLE"), + _TRANSACTION_NONE("TRANSACTION_NONE"); + + private String value; + + TransactionIsolationType (String value) { this.value = value; } + + public String toString() {return value;} + + public static TransactionIsolationType getFromStringValue(String value) + { + for(TransactionIsolationType type: TransactionIsolationType.values()) + { + if(value != null && type.toString().equals(value)) + { return type;} + } + return null; + } + +} + diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/ValidationType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/ValidationType.java new file mode 100644 index 00000000..9b7a62ba --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/ValidationType.java @@ -0,0 +1,213 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +/** + * This interface defines the contract for the validationType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ValidationType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: datasources:extensionType ElementType : valid-connection-checker + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new valid-connection-checker element with the given value will be created. + * Otherwise, the existing valid-connection-checker element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateValidConnectionChecker(); + + /** + * Removes the valid-connection-checker element + * @return the current instance of ValidationType + */ + public ValidationType removeValidConnectionChecker(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:string ElementType : check-valid-connection-sql + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the check-valid-connection-sql element + * @param checkValidConnectionSql the value for the element check-valid-connection-sql + * @return the current instance of ValidationType + */ + public ValidationType checkValidConnectionSql(String checkValidConnectionSql); + + /** + * Returns the check-valid-connection-sql element + * @return the node defined for the element check-valid-connection-sql + */ + public String getCheckValidConnectionSql(); + + /** + * Removes the check-valid-connection-sql element + * @return the current instance of ValidationType + */ + public ValidationType removeCheckValidConnectionSql(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : validate-on-match + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the validate-on-match element + * @param validateOnMatch the value for the element validate-on-match + * @return the current instance of ValidationType + */ + public ValidationType validateOnMatch(Boolean validateOnMatch); + + /** + * Returns the validate-on-match element + * @return the node defined for the element validate-on-match + */ + public Boolean isValidateOnMatch(); + + /** + * Removes the validate-on-match element + * @return the current instance of ValidationType + */ + public ValidationType removeValidateOnMatch(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : background-validation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the background-validation element + * @param backgroundValidation the value for the element background-validation + * @return the current instance of ValidationType + */ + public ValidationType backgroundValidation(Boolean backgroundValidation); + + /** + * Returns the background-validation element + * @return the node defined for the element background-validation + */ + public Boolean isBackgroundValidation(); + + /** + * Removes the background-validation element + * @return the current instance of ValidationType + */ + public ValidationType removeBackgroundValidation(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:nonNegativeInteger ElementType : background-validation-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the background-validation-millis element + * @param backgroundValidationMillis the value for the element background-validation-millis + * @return the current instance of ValidationType + */ + public ValidationType backgroundValidationMillis(Integer backgroundValidationMillis); + + /** + * Returns the background-validation-millis element + * @return the node defined for the element background-validation-millis + */ + public Integer getBackgroundValidationMillis(); + + /** + * Removes the background-validation-millis element + * @return the current instance of ValidationType + */ + public ValidationType removeBackgroundValidationMillis(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : use-fast-fail + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-fast-fail element + * @param useFastFail the value for the element use-fast-fail + * @return the current instance of ValidationType + */ + public ValidationType useFastFail(Boolean useFastFail); + + /** + * Returns the use-fast-fail element + * @return the node defined for the element use-fast-fail + */ + public Boolean isUseFastFail(); + + /** + * Removes the use-fast-fail element + * @return the current instance of ValidationType + */ + public ValidationType removeUseFastFail(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: datasources:extensionType ElementType : stale-connection-checker + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new stale-connection-checker element with the given value will be created. + * Otherwise, the existing stale-connection-checker element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateStaleConnectionChecker(); + + /** + * Removes the stale-connection-checker element + * @return the current instance of ValidationType + */ + public ValidationType removeStaleConnectionChecker(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: datasources:extensionType ElementType : exception-sorter + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new exception-sorter element with the given value will be created. + * Otherwise, the existing exception-sorter element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateExceptionSorter(); + + /** + * Removes the exception-sorter element + * @return the current instance of ValidationType + */ + public ValidationType removeExceptionSorter(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/XaDatasourcePropertyType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/XaDatasourcePropertyType.java new file mode 100644 index 00000000..59061a46 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/XaDatasourcePropertyType.java @@ -0,0 +1,53 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the xa-datasource-propertyType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface XaDatasourcePropertyType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourcePropertyType ElementName: xsd:token ElementType : name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the name attribute + * @param name the value for the attribute name + * @return the current instance of XaDatasourcePropertyType + */ + public XaDatasourcePropertyType name(String name); + + /** + * Returns the name attribute + * @return the value defined for the attribute name + */ +public String getName(); + + /** + * Removes the name attribute + * @return the current instance of XaDatasourcePropertyType + */ + public XaDatasourcePropertyType removeName(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/XaDatasourceType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/XaDatasourceType.java new file mode 100644 index 00000000..e608851d --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/XaDatasourceType.java @@ -0,0 +1,486 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourcePropertyType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TransactionIsolationType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaPoolType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DsSecurityType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ValidationType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TimeoutType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.StatementType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.RecoverType; +/** + * This interface defines the contract for the xa-datasourceType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface XaDatasourceType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:token ElementType : jndi-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jndi-name attribute + * @param jndiName the value for the attribute jndi-name + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType jndiName(String jndiName); + + /** + * Returns the jndi-name attribute + * @return the value defined for the attribute jndi-name + */ +public String getJndiName(); + + /** + * Removes the jndi-name attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeJndiName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:token ElementType : pool-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pool-name attribute + * @param poolName the value for the attribute pool-name + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType poolName(String poolName); + + /** + * Returns the pool-name attribute + * @return the value defined for the attribute pool-name + */ +public String getPoolName(); + + /** + * Removes the pool-name attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removePoolName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:boolean ElementType : enabled + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the enabled attribute + * @param enabled the value for the attribute enabled + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType enabled(Boolean enabled); + + /** + * Returns the enabled attribute + * @return the value defined for the attribute enabled + */ +public Boolean isEnabled(); + + /** + * Removes the enabled attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeEnabled(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:boolean ElementType : use-java-context + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-java-context attribute + * @param useJavaContext the value for the attribute use-java-context + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType useJavaContext(Boolean useJavaContext); + + /** + * Returns the use-java-context attribute + * @return the value defined for the attribute use-java-context + */ +public Boolean isUseJavaContext(); + + /** + * Removes the use-java-context attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeUseJavaContext(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:boolean ElementType : spy + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the spy attribute + * @param spy the value for the attribute spy + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType spy(Boolean spy); + + /** + * Returns the spy attribute + * @return the value defined for the attribute spy + */ +public Boolean isSpy(); + + /** + * Removes the spy attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeSpy(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:boolean ElementType : use-ccm + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-ccm attribute + * @param useCcm the value for the attribute use-ccm + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType useCcm(Boolean useCcm); + + /** + * Returns the use-ccm attribute + * @return the value defined for the attribute use-ccm + */ +public Boolean isUseCcm(); + + /** + * Removes the use-ccm attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeUseCcm(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:xa-datasource-propertyType ElementType : xa-datasource-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new xa-datasource-property element will be created and returned. + * Otherwise, the first existing xa-datasource-property element will be returned. + * @return the instance defined for the element xa-datasource-property + */ + public XaDatasourcePropertyType> getOrCreateXaDatasourceProperty(); + + /** + * Creates a new xa-datasource-property element + * @return the new created instance of XaDatasourcePropertyType> + */ + public XaDatasourcePropertyType> createXaDatasourceProperty(); + + /** + * Returns all xa-datasource-property elements + * @return list of xa-datasource-property + */ + public List>> getAllXaDatasourceProperty(); + + /** + * Removes all xa-datasource-property elements + * @return the current instance of XaDatasourcePropertyType> + */ + public XaDatasourceType removeAllXaDatasourceProperty(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:token ElementType : xa-datasource-class + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the xa-datasource-class element + * @param xaDatasourceClass the value for the element xa-datasource-class + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType xaDatasourceClass(String xaDatasourceClass); + + /** + * Returns the xa-datasource-class element + * @return the node defined for the element xa-datasource-class + */ + public String getXaDatasourceClass(); + + /** + * Removes the xa-datasource-class element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeXaDatasourceClass(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:token ElementType : driver + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the driver element + * @param driver the value for the element driver + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType driver(String driver); + + /** + * Returns the driver element + * @return the node defined for the element driver + */ + public String getDriver(); + + /** + * Removes the driver element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeDriver(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:token ElementType : url-delimiter + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the url-delimiter element + * @param urlDelimiter the value for the element url-delimiter + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType urlDelimiter(String urlDelimiter); + + /** + * Returns the url-delimiter element + * @return the node defined for the element url-delimiter + */ + public String getUrlDelimiter(); + + /** + * Removes the url-delimiter element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeUrlDelimiter(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:token ElementType : url-selector-strategy-class-name + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the url-selector-strategy-class-name element + * @param urlSelectorStrategyClassName the value for the element url-selector-strategy-class-name + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType urlSelectorStrategyClassName(String urlSelectorStrategyClassName); + + /** + * Returns the url-selector-strategy-class-name element + * @return the node defined for the element url-selector-strategy-class-name + */ + public String getUrlSelectorStrategyClassName(); + + /** + * Removes the url-selector-strategy-class-name element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeUrlSelectorStrategyClassName(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:string ElementType : new-connection-sql + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the new-connection-sql element + * @param newConnectionSql the value for the element new-connection-sql + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType newConnectionSql(String newConnectionSql); + + /** + * Returns the new-connection-sql element + * @return the node defined for the element new-connection-sql + */ + public String getNewConnectionSql(); + + /** + * Removes the new-connection-sql element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeNewConnectionSql(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:transaction-isolationType ElementType : transaction-isolation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: true isDataType: false + // --------------------------------------------------------------------------------------------------------|| + /** + * Sets the transaction-isolation element + * @param transactionIsolation the value for the element transaction-isolation + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType transactionIsolation(TransactionIsolationType transactionIsolation); + /** + * Sets the transaction-isolation element + * @param transactionIsolation the value for the element transaction-isolation + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType transactionIsolation(String transactionIsolation); + + /** + * Returns the transaction-isolation element + * @return the value found for the element transaction-isolation + */ + public TransactionIsolationType getTransactionIsolation(); + + /** + * Returns the transaction-isolation element + * @return the value found for the element transaction-isolation + */ + public String getTransactionIsolationAsString(); + + /** + * Removes the transaction-isolation attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeTransactionIsolation(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:xa-poolType ElementType : xa-pool + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new xa-pool element with the given value will be created. + * Otherwise, the existing xa-pool element will be returned. + * @return a new or existing instance of XaPoolType> + */ + public XaPoolType> getOrCreateXaPool(); + + /** + * Removes the xa-pool element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeXaPool(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:dsSecurityType ElementType : security + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new security element with the given value will be created. + * Otherwise, the existing security element will be returned. + * @return a new or existing instance of DsSecurityType> + */ + public DsSecurityType> getOrCreateSecurity(); + + /** + * Removes the security element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeSecurity(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:validationType ElementType : validation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new validation element with the given value will be created. + * Otherwise, the existing validation element will be returned. + * @return a new or existing instance of ValidationType> + */ + public ValidationType> getOrCreateValidation(); + + /** + * Removes the validation element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeValidation(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:timeoutType ElementType : timeout + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new timeout element with the given value will be created. + * Otherwise, the existing timeout element will be returned. + * @return a new or existing instance of TimeoutType> + */ + public TimeoutType> getOrCreateTimeout(); + + /** + * Removes the timeout element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeTimeout(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:statementType ElementType : statement + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new statement element with the given value will be created. + * Otherwise, the existing statement element will be returned. + * @return a new or existing instance of StatementType> + */ + public StatementType> getOrCreateStatement(); + + /** + * Removes the statement element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeStatement(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:recoverType ElementType : recovery + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recovery element with the given value will be created. + * Otherwise, the existing recovery element will be returned. + * @return a new or existing instance of RecoverType> + */ + public RecoverType> getOrCreateRecovery(); + + /** + * Removes the recovery element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeRecovery(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/XaPoolType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/XaPoolType.java new file mode 100644 index 00000000..d7c45c0f --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/XaPoolType.java @@ -0,0 +1,151 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.datasources10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the xa-poolType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface XaPoolType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : is-same-rm-override + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the is-same-rm-override element + * @param isSameRmOverride the value for the element is-same-rm-override + * @return the current instance of XaPoolType + */ + public XaPoolType isSameRmOverride(Boolean isSameRmOverride); + + /** + * Returns the is-same-rm-override element + * @return the node defined for the element is-same-rm-override + */ + public Boolean isIsSameRmOverride(); + + /** + * Removes the is-same-rm-override element + * @return the current instance of XaPoolType + */ + public XaPoolType removeIsSameRmOverride(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: javaee:emptyType ElementType : interleaving + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the interleaving element + * @return the current instance of XaPoolType + */ + public XaPoolType interleaving(); + + /** + * Removes the interleaving element + * @return the current instance of XaPoolType + */ + public Boolean isInterleaving(); + + /** + * Removes the interleaving element + * @return the current instance of XaPoolType + */ + public XaPoolType removeInterleaving(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: javaee:emptyType ElementType : no-tx-separate-pools + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public XaPoolType noTxSeparatePools(); + + /** + * Removes the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public Boolean isNoTxSeparatePools(); + + /** + * Removes the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public XaPoolType removeNoTxSeparatePools(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : pad-xid + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pad-xid element + * @param padXid the value for the element pad-xid + * @return the current instance of XaPoolType + */ + public XaPoolType padXid(Boolean padXid); + + /** + * Returns the pad-xid element + * @return the node defined for the element pad-xid + */ + public Boolean isPadXid(); + + /** + * Removes the pad-xid element + * @return the current instance of XaPoolType + */ + public XaPoolType removePadXid(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : wrap-xa-resource + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the wrap-xa-resource element + * @param wrapXaResource the value for the element wrap-xa-resource + * @return the current instance of XaPoolType + */ + public XaPoolType wrapXaResource(Boolean wrapXaResource); + + /** + * Returns the wrap-xa-resource element + * @return the node defined for the element wrap-xa-resource + */ + public Boolean isWrapXaResource(); + + /** + * Removes the wrap-xa-resource element + * @return the current instance of XaPoolType + */ + public XaPoolType removeWrapXaResource(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/package-info.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/package-info.java new file mode 100644 index 00000000..5d433cf4 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/datasources10/package-info.java @@ -0,0 +1,5 @@ + /** + * Provides the interfaces and enumeration types as defined in the schema datasources_1_0.xsd + */ + +package org.jboss.shrinkwrap.descriptor.api.datasources10; diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/AdminObjectType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/AdminObjectType.java new file mode 100644 index 00000000..2b4dcbb7 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/AdminObjectType.java @@ -0,0 +1,180 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +/** + * This interface defines the contract for the admin-objectType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface AdminObjectType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of AdminObjectType + */ + public AdminObjectType className(String className); + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ +public String getClassName(); + + /** + * Removes the class-name attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeClassName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:token ElementType : jndi-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jndi-name attribute + * @param jndiName the value for the attribute jndi-name + * @return the current instance of AdminObjectType + */ + public AdminObjectType jndiName(String jndiName); + + /** + * Returns the jndi-name attribute + * @return the value defined for the attribute jndi-name + */ +public String getJndiName(); + + /** + * Removes the jndi-name attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeJndiName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:boolean ElementType : enabled + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the enabled attribute + * @param enabled the value for the attribute enabled + * @return the current instance of AdminObjectType + */ + public AdminObjectType enabled(Boolean enabled); + + /** + * Returns the enabled attribute + * @return the value defined for the attribute enabled + */ +public Boolean isEnabled(); + + /** + * Removes the enabled attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeEnabled(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:boolean ElementType : use-java-context + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-java-context attribute + * @param useJavaContext the value for the attribute use-java-context + * @return the current instance of AdminObjectType + */ + public AdminObjectType useJavaContext(Boolean useJavaContext); + + /** + * Returns the use-java-context attribute + * @return the value defined for the attribute use-java-context + */ +public Boolean isUseJavaContext(); + + /** + * Removes the use-java-context attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeUseJavaContext(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:token ElementType : pool-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pool-name attribute + * @param poolName the value for the attribute pool-name + * @return the current instance of AdminObjectType + */ + public AdminObjectType poolName(String poolName); + + /** + * Returns the pool-name attribute + * @return the value defined for the attribute pool-name + */ +public String getPoolName(); + + /** + * Removes the pool-name attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removePoolName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: ironjacamar:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty(); + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty(); + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty(); + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public AdminObjectType removeAllConfigProperty(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/AdminObjectsType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/AdminObjectsType.java new file mode 100644 index 00000000..fdcb61ff --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/AdminObjectsType.java @@ -0,0 +1,60 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectType; +/** + * This interface defines the contract for the admin-objectsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface AdminObjectsType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectsType ElementName: ironjacamar:admin-objectType ElementType : admin-object + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new admin-object element will be created and returned. + * Otherwise, the first existing admin-object element will be returned. + * @return the instance defined for the element admin-object + */ + public AdminObjectType> getOrCreateAdminObject(); + + /** + * Creates a new admin-object element + * @return the new created instance of AdminObjectType> + */ + public AdminObjectType> createAdminObject(); + + /** + * Returns all admin-object elements + * @return list of admin-object + */ + public List>> getAllAdminObject(); + + /** + * Removes all admin-object elements + * @return the current instance of AdminObjectType> + */ + public AdminObjectsType removeAllAdminObject(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/BeanValidationGroupsType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/BeanValidationGroupsType.java new file mode 100644 index 00000000..c578ff23 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/BeanValidationGroupsType.java @@ -0,0 +1,54 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the bean-validation-groupsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface BeanValidationGroupsType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: BeanValidationGroupsType ElementName: xsd:token ElementType : bean-validation-group + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Creates for all String objects representing bean-validation-group elements, + * a new bean-validation-group element + * @param values list of bean-validation-group objects + * @return the current instance of BeanValidationGroupsType + */ + public BeanValidationGroupsType beanValidationGroup(String ... values); + + /** + * Returns all bean-validation-group elements + * @return list of bean-validation-group + */ + public List getAllBeanValidationGroup(); + + /** + * Removes the bean-validation-group element + * @return the current instance of BeanValidationGroupsType + */ + public BeanValidationGroupsType removeAllBeanValidationGroup(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ConfigPropertyType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ConfigPropertyType.java new file mode 100644 index 00000000..d3d7b367 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ConfigPropertyType.java @@ -0,0 +1,87 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the config-propertyType xsd type + *

+ * Original Documentation: + *

+ *
+ * [
+ * Specifies an override for a config-property element in ra.xml or a @ConfigProperty
+ *
+ *
+ * + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ConfigPropertyType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConfigPropertyType ElementName: xsd:token ElementType : name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the name attribute + * @param name the value for the attribute name + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType name(String name); + + /** + * Returns the name attribute + * @return the value defined for the attribute name + */ +public String getName(); + + /** + * Removes the name attribute + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType removeName(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConfigPropertyType ElementName: xsd:token ElementType : config-propertyType + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the config-propertyType element + * @param configPropertyType the value for the element config-propertyType + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType configPropertyType(String configPropertyType); + + /** + * Returns the config-propertyType element + * @return the node defined for the element config-propertyType + */ + public String getConfigPropertyType(); + + /** + * Removes the config-propertyType element + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType removeConfigPropertyType(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ConnectionDefinitionsType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ConnectionDefinitionsType.java new file mode 100644 index 00000000..12ab8b22 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ConnectionDefinitionsType.java @@ -0,0 +1,60 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefintionType; +/** + * This interface defines the contract for the connection-definitionsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ConnectionDefinitionsType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefinitionsType ElementName: ironjacamar:connection-defintionType ElementType : connection-definition + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new connection-definition element will be created and returned. + * Otherwise, the first existing connection-definition element will be returned. + * @return the instance defined for the element connection-definition + */ + public ConnectionDefintionType> getOrCreateConnectionDefinition(); + + /** + * Creates a new connection-definition element + * @return the new created instance of ConnectionDefintionType> + */ + public ConnectionDefintionType> createConnectionDefinition(); + + /** + * Returns all connection-definition elements + * @return list of connection-definition + */ + public List>> getAllConnectionDefinition(); + + /** + * Removes all connection-definition elements + * @return the current instance of ConnectionDefintionType> + */ + public ConnectionDefinitionsType removeAllConnectionDefinition(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ConnectionDefintionType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ConnectionDefintionType.java new file mode 100644 index 00000000..f9426449 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ConnectionDefintionType.java @@ -0,0 +1,325 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.SecurityType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.TimeoutType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ValidationType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.RecoverType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.PoolType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.XaPoolType; +/** + * This interface defines the contract for the connection-defintionType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ConnectionDefintionType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType className(String className); + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ +public String getClassName(); + + /** + * Removes the class-name attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeClassName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:token ElementType : jndi-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jndi-name attribute + * @param jndiName the value for the attribute jndi-name + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType jndiName(String jndiName); + + /** + * Returns the jndi-name attribute + * @return the value defined for the attribute jndi-name + */ +public String getJndiName(); + + /** + * Removes the jndi-name attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeJndiName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:boolean ElementType : enabled + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the enabled attribute + * @param enabled the value for the attribute enabled + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType enabled(Boolean enabled); + + /** + * Returns the enabled attribute + * @return the value defined for the attribute enabled + */ +public Boolean isEnabled(); + + /** + * Removes the enabled attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeEnabled(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:boolean ElementType : use-java-context + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-java-context attribute + * @param useJavaContext the value for the attribute use-java-context + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType useJavaContext(Boolean useJavaContext); + + /** + * Returns the use-java-context attribute + * @return the value defined for the attribute use-java-context + */ +public Boolean isUseJavaContext(); + + /** + * Removes the use-java-context attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeUseJavaContext(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:token ElementType : pool-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pool-name attribute + * @param poolName the value for the attribute pool-name + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType poolName(String poolName); + + /** + * Returns the pool-name attribute + * @return the value defined for the attribute pool-name + */ +public String getPoolName(); + + /** + * Removes the pool-name attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removePoolName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty(); + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty(); + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty(); + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public ConnectionDefintionType removeAllConfigProperty(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:securityType ElementType : security + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new security element with the given value will be created. + * Otherwise, the existing security element will be returned. + * @return a new or existing instance of SecurityType> + */ + public SecurityType> getOrCreateSecurity(); + + /** + * Removes the security element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeSecurity(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:timeoutType ElementType : timeout + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new timeout element with the given value will be created. + * Otherwise, the existing timeout element will be returned. + * @return a new or existing instance of TimeoutType> + */ + public TimeoutType> getOrCreateTimeout(); + + /** + * Removes the timeout element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeTimeout(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:validationType ElementType : validation + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new validation element with the given value will be created. + * Otherwise, the existing validation element will be returned. + * @return a new or existing instance of ValidationType> + */ + public ValidationType> getOrCreateValidation(); + + /** + * Removes the validation element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeValidation(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:recoverType ElementType : recovery + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recovery element with the given value will be created. + * Otherwise, the existing recovery element will be returned. + * @return a new or existing instance of RecoverType> + */ + public RecoverType> getOrCreateRecovery(); + + /** + * Removes the recovery element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeRecovery(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:poolType ElementType : pool + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new pool element with the given value will be created. + * Otherwise, the existing pool element will be returned. + * @return a new or existing instance of PoolType> + */ + public PoolType> getOrCreatePool(); + + /** + * Removes the pool element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removePool(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:xa-poolType ElementType : xa-pool + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new xa-pool element with the given value will be created. + * Otherwise, the existing xa-pool element will be returned. + * @return a new or existing instance of XaPoolType> + */ + public XaPoolType> getOrCreateXaPool(); + + /** + * Removes the xa-pool element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeXaPool(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:boolean ElementType : use-ccm + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-ccm attribute + * @param useCcm the value for the attribute use-ccm + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType useCcm(Boolean useCcm); + + /** + * Returns the use-ccm attribute + * @return the value defined for the attribute use-ccm + */ +public Boolean isUseCcm(); + + /** + * Removes the use-ccm attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeUseCcm(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/CredentialType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/CredentialType.java new file mode 100644 index 00000000..fbcff7ea --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/CredentialType.java @@ -0,0 +1,103 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the credentialType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface CredentialType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: CredentialType ElementName: xsd:token ElementType : user-name + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the user-name element + * @param userName the value for the element user-name + * @return the current instance of CredentialType + */ + public CredentialType userName(String userName); + + /** + * Returns the user-name element + * @return the node defined for the element user-name + */ + public String getUserName(); + + /** + * Removes the user-name element + * @return the current instance of CredentialType + */ + public CredentialType removeUserName(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: CredentialType ElementName: xsd:token ElementType : password + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the password element + * @param password the value for the element password + * @return the current instance of CredentialType + */ + public CredentialType password(String password); + + /** + * Returns the password element + * @return the node defined for the element password + */ + public String getPassword(); + + /** + * Removes the password element + * @return the current instance of CredentialType + */ + public CredentialType removePassword(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: CredentialType ElementName: xsd:token ElementType : security-domain + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain element + * @param securityDomain the value for the element security-domain + * @return the current instance of CredentialType + */ + public CredentialType securityDomain(String securityDomain); + + /** + * Returns the security-domain element + * @return the node defined for the element security-domain + */ + public String getSecurityDomain(); + + /** + * Removes the security-domain element + * @return the current instance of CredentialType + */ + public CredentialType removeSecurityDomain(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ExtensionType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ExtensionType.java new file mode 100644 index 00000000..34029069 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ExtensionType.java @@ -0,0 +1,73 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +/** + * This interface defines the contract for the extensionType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ExtensionType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ExtensionType ElementName: ironjacamar:config-propertyType ElementType : config-property + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element with the given value will be created. + * Otherwise, the existing config-property element will be returned. + * @return a new or existing instance of ConfigPropertyType> + */ + public ConfigPropertyType> getOrCreateConfigProperty(); + + /** + * Removes the config-property element + * @return the current instance of ExtensionType + */ + public ExtensionType removeConfigProperty(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ExtensionType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of ExtensionType + */ + public ExtensionType className(String className); + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ +public String getClassName(); + + /** + * Removes the class-name attribute + * @return the current instance of ExtensionType + */ + public ExtensionType removeClassName(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/IronjacamarDescriptor.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/IronjacamarDescriptor.java new file mode 100644 index 00000000..e0191086 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/IronjacamarDescriptor.java @@ -0,0 +1,189 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.BeanValidationGroupsType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.TransactionSupportType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefinitionsType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectsType; +import org.jboss.shrinkwrap.descriptor.api.Descriptor; +import org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace; + +/** + *

+ * This deployment descriptor provides the functionalities as described in the ironjacamar_1_0.xsd specification + *

+ * Example: + *

+ * + * IronjacamarDescriptor descriptor = Descriptors.create(IronjacamarDescriptor.class); + * + * + * + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface IronjacamarDescriptor extends Descriptor, DescriptorNamespace +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarDescriptor ElementName: ironjacamar:bean-validation-groupsType ElementType : bean-validation-groups + // MaxOccurs: -1 isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new bean-validation-groups element with the given value will be created. + * Otherwise, the existing bean-validation-groups element will be returned. + * @return a new or existing instance of BeanValidationGroupsType + */ + public BeanValidationGroupsType getOrCreateBeanValidationGroups(); + + /** + * Removes the bean-validation-groups element + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor removeBeanValidationGroups(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarDescriptor ElementName: xsd:token ElementType : bootstrap-context + // MaxOccurs: -1 isGeneric: false isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the bootstrap-context element + * @param bootstrapContext the value for the element bootstrap-context + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor bootstrapContext(String bootstrapContext); + + /** + * Returns the bootstrap-context element + * @return the node defined for the element bootstrap-context + */ + public String getBootstrapContext(); + + /** + * Removes the bootstrap-context element + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor removeBootstrapContext(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarDescriptor ElementName: ironjacamar:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType getOrCreateConfigProperty(); + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType + */ + public ConfigPropertyType createConfigProperty(); + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List> getAllConfigProperty(); + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType + */ + public IronjacamarDescriptor removeAllConfigProperty(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarDescriptor ElementName: ironjacamar:transaction-supportType ElementType : transaction-support + // MaxOccurs: - isGeneric: false isAttribute: false isEnum: true isDataType: false + // --------------------------------------------------------------------------------------------------------|| + /** + * Sets the transaction-support element + * @param transactionSupport the value for the element transaction-support + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor transactionSupport(TransactionSupportType transactionSupport); + /** + * Sets the transaction-support element + * @param transactionSupport the value for the element transaction-support + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor transactionSupport(String transactionSupport); + + /** + * Returns the transaction-support element + * @return the value found for the element transaction-support + */ + public TransactionSupportType getTransactionSupport(); + + /** + * Returns the transaction-support element + * @return the value found for the element transaction-support + */ + public String getTransactionSupportAsString(); + + /** + * Removes the transaction-support attribute + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor removeTransactionSupport(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarDescriptor ElementName: ironjacamar:connection-definitionsType ElementType : connection-definitions + // MaxOccurs: -1 isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new connection-definitions element with the given value will be created. + * Otherwise, the existing connection-definitions element will be returned. + * @return a new or existing instance of ConnectionDefinitionsType + */ + public ConnectionDefinitionsType getOrCreateConnectionDefinitions(); + + /** + * Removes the connection-definitions element + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor removeConnectionDefinitions(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarDescriptor ElementName: ironjacamar:admin-objectsType ElementType : admin-objects + // MaxOccurs: -1 isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new admin-objects element with the given value will be created. + * Otherwise, the existing admin-objects element will be returned. + * @return a new or existing instance of AdminObjectsType + */ + public AdminObjectsType getOrCreateAdminObjects(); + + /** + * Removes the admin-objects element + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor removeAdminObjects(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/IronjacamarType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/IronjacamarType.java new file mode 100644 index 00000000..bb58f25b --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/IronjacamarType.java @@ -0,0 +1,182 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.BeanValidationGroupsType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.TransactionSupportType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefinitionsType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectsType; +/** + * This interface defines the contract for the ironjacamarType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface IronjacamarType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarType ElementName: ironjacamar:bean-validation-groupsType ElementType : bean-validation-groups + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new bean-validation-groups element with the given value will be created. + * Otherwise, the existing bean-validation-groups element will be returned. + * @return a new or existing instance of BeanValidationGroupsType> + */ + public BeanValidationGroupsType> getOrCreateBeanValidationGroups(); + + /** + * Removes the bean-validation-groups element + * @return the current instance of IronjacamarType + */ + public IronjacamarType removeBeanValidationGroups(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarType ElementName: xsd:token ElementType : bootstrap-context + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the bootstrap-context element + * @param bootstrapContext the value for the element bootstrap-context + * @return the current instance of IronjacamarType + */ + public IronjacamarType bootstrapContext(String bootstrapContext); + + /** + * Returns the bootstrap-context element + * @return the node defined for the element bootstrap-context + */ + public String getBootstrapContext(); + + /** + * Removes the bootstrap-context element + * @return the current instance of IronjacamarType + */ + public IronjacamarType removeBootstrapContext(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarType ElementName: ironjacamar:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty(); + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty(); + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty(); + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public IronjacamarType removeAllConfigProperty(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarType ElementName: ironjacamar:transaction-supportType ElementType : transaction-support + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: true isDataType: false + // --------------------------------------------------------------------------------------------------------|| + /** + * Sets the transaction-support element + * @param transactionSupport the value for the element transaction-support + * @return the current instance of IronjacamarType + */ + public IronjacamarType transactionSupport(TransactionSupportType transactionSupport); + /** + * Sets the transaction-support element + * @param transactionSupport the value for the element transaction-support + * @return the current instance of IronjacamarType + */ + public IronjacamarType transactionSupport(String transactionSupport); + + /** + * Returns the transaction-support element + * @return the value found for the element transaction-support + */ + public TransactionSupportType getTransactionSupport(); + + /** + * Returns the transaction-support element + * @return the value found for the element transaction-support + */ + public String getTransactionSupportAsString(); + + /** + * Removes the transaction-support attribute + * @return the current instance of IronjacamarType + */ + public IronjacamarType removeTransactionSupport(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarType ElementName: ironjacamar:connection-definitionsType ElementType : connection-definitions + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new connection-definitions element with the given value will be created. + * Otherwise, the existing connection-definitions element will be returned. + * @return a new or existing instance of ConnectionDefinitionsType> + */ + public ConnectionDefinitionsType> getOrCreateConnectionDefinitions(); + + /** + * Removes the connection-definitions element + * @return the current instance of IronjacamarType + */ + public IronjacamarType removeConnectionDefinitions(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarType ElementName: ironjacamar:admin-objectsType ElementType : admin-objects + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new admin-objects element with the given value will be created. + * Otherwise, the existing admin-objects element will be returned. + * @return a new or existing instance of AdminObjectsType> + */ + public AdminObjectsType> getOrCreateAdminObjects(); + + /** + * Removes the admin-objects element + * @return the current instance of IronjacamarType + */ + public IronjacamarType removeAdminObjects(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/PoolType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/PoolType.java new file mode 100644 index 00000000..24c5be52 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/PoolType.java @@ -0,0 +1,153 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the poolType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface PoolType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:nonNegativeInteger ElementType : min-pool-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the min-pool-size element + * @param minPoolSize the value for the element min-pool-size + * @return the current instance of PoolType + */ + public PoolType minPoolSize(Integer minPoolSize); + + /** + * Returns the min-pool-size element + * @return the node defined for the element min-pool-size + */ + public Integer getMinPoolSize(); + + /** + * Removes the min-pool-size element + * @return the current instance of PoolType + */ + public PoolType removeMinPoolSize(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:nonNegativeInteger ElementType : max-pool-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the max-pool-size element + * @param maxPoolSize the value for the element max-pool-size + * @return the current instance of PoolType + */ + public PoolType maxPoolSize(Integer maxPoolSize); + + /** + * Returns the max-pool-size element + * @return the node defined for the element max-pool-size + */ + public Integer getMaxPoolSize(); + + /** + * Removes the max-pool-size element + * @return the current instance of PoolType + */ + public PoolType removeMaxPoolSize(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:boolean ElementType : prefill + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the prefill element + * @param prefill the value for the element prefill + * @return the current instance of PoolType + */ + public PoolType prefill(Boolean prefill); + + /** + * Returns the prefill element + * @return the node defined for the element prefill + */ + public Boolean isPrefill(); + + /** + * Removes the prefill element + * @return the current instance of PoolType + */ + public PoolType removePrefill(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:boolean ElementType : use-strict-min + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-strict-min element + * @param useStrictMin the value for the element use-strict-min + * @return the current instance of PoolType + */ + public PoolType useStrictMin(Boolean useStrictMin); + + /** + * Returns the use-strict-min element + * @return the node defined for the element use-strict-min + */ + public Boolean isUseStrictMin(); + + /** + * Removes the use-strict-min element + * @return the current instance of PoolType + */ + public PoolType removeUseStrictMin(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:token ElementType : flush-strategy + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the flush-strategy element + * @param flushStrategy the value for the element flush-strategy + * @return the current instance of PoolType + */ + public PoolType flushStrategy(String flushStrategy); + + /** + * Returns the flush-strategy element + * @return the node defined for the element flush-strategy + */ + public String getFlushStrategy(); + + /** + * Removes the flush-strategy element + * @return the current instance of PoolType + */ + public PoolType removeFlushStrategy(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/RecoverType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/RecoverType.java new file mode 100644 index 00000000..763183b9 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/RecoverType.java @@ -0,0 +1,93 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.CredentialType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ExtensionType; +/** + * This interface defines the contract for the recoverType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface RecoverType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: ironjacamar:credentialType ElementType : recover-credential + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recover-credential element with the given value will be created. + * Otherwise, the existing recover-credential element will be returned. + * @return a new or existing instance of CredentialType> + */ + public CredentialType> getOrCreateRecoverCredential(); + + /** + * Removes the recover-credential element + * @return the current instance of RecoverType + */ + public RecoverType removeRecoverCredential(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: ironjacamar:extensionType ElementType : recover-plugin + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recover-plugin element with the given value will be created. + * Otherwise, the existing recover-plugin element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateRecoverPlugin(); + + /** + * Removes the recover-plugin element + * @return the current instance of RecoverType + */ + public RecoverType removeRecoverPlugin(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: xsd:boolean ElementType : no-recovery + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the no-recovery attribute + * @param noRecovery the value for the attribute no-recovery + * @return the current instance of RecoverType + */ + public RecoverType noRecovery(Boolean noRecovery); + + /** + * Returns the no-recovery attribute + * @return the value defined for the attribute no-recovery + */ +public Boolean isNoRecovery(); + + /** + * Removes the no-recovery attribute + * @return the current instance of RecoverType + */ + public RecoverType removeNoRecovery(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/SecurityType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/SecurityType.java new file mode 100644 index 00000000..d7baf670 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/SecurityType.java @@ -0,0 +1,102 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the securityType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface SecurityType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: SecurityType ElementName: javaee:emptyType ElementType : application + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the application element + * @return the current instance of SecurityType + */ + public SecurityType application(); + + /** + * Removes the application element + * @return the current instance of SecurityType + */ + public Boolean isApplication(); + + /** + * Removes the application element + * @return the current instance of SecurityType + */ + public SecurityType removeApplication(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: SecurityType ElementName: xsd:token ElementType : security-domain + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain element + * @param securityDomain the value for the element security-domain + * @return the current instance of SecurityType + */ + public SecurityType securityDomain(String securityDomain); + + /** + * Returns the security-domain element + * @return the node defined for the element security-domain + */ + public String getSecurityDomain(); + + /** + * Removes the security-domain element + * @return the current instance of SecurityType + */ + public SecurityType removeSecurityDomain(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: SecurityType ElementName: xsd:token ElementType : security-domain-and-application + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain-and-application element + * @param securityDomainAndApplication the value for the element security-domain-and-application + * @return the current instance of SecurityType + */ + public SecurityType securityDomainAndApplication(String securityDomainAndApplication); + + /** + * Returns the security-domain-and-application element + * @return the node defined for the element security-domain-and-application + */ + public String getSecurityDomainAndApplication(); + + /** + * Removes the security-domain-and-application element + * @return the current instance of SecurityType + */ + public SecurityType removeSecurityDomainAndApplication(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/TimeoutType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/TimeoutType.java new file mode 100644 index 00000000..32d43f05 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/TimeoutType.java @@ -0,0 +1,153 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the timeoutType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface TimeoutType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : blocking-timeout-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the blocking-timeout-millis element + * @param blockingTimeoutMillis the value for the element blocking-timeout-millis + * @return the current instance of TimeoutType + */ + public TimeoutType blockingTimeoutMillis(Integer blockingTimeoutMillis); + + /** + * Returns the blocking-timeout-millis element + * @return the node defined for the element blocking-timeout-millis + */ + public Integer getBlockingTimeoutMillis(); + + /** + * Removes the blocking-timeout-millis element + * @return the current instance of TimeoutType + */ + public TimeoutType removeBlockingTimeoutMillis(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : idle-timeout-minutes + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the idle-timeout-minutes element + * @param idleTimeoutMinutes the value for the element idle-timeout-minutes + * @return the current instance of TimeoutType + */ + public TimeoutType idleTimeoutMinutes(Integer idleTimeoutMinutes); + + /** + * Returns the idle-timeout-minutes element + * @return the node defined for the element idle-timeout-minutes + */ + public Integer getIdleTimeoutMinutes(); + + /** + * Removes the idle-timeout-minutes element + * @return the current instance of TimeoutType + */ + public TimeoutType removeIdleTimeoutMinutes(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : allocation-retry + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the allocation-retry element + * @param allocationRetry the value for the element allocation-retry + * @return the current instance of TimeoutType + */ + public TimeoutType allocationRetry(Integer allocationRetry); + + /** + * Returns the allocation-retry element + * @return the node defined for the element allocation-retry + */ + public Integer getAllocationRetry(); + + /** + * Removes the allocation-retry element + * @return the current instance of TimeoutType + */ + public TimeoutType removeAllocationRetry(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : allocation-retry-wait-millis + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the allocation-retry-wait-millis element + * @param allocationRetryWaitMillis the value for the element allocation-retry-wait-millis + * @return the current instance of TimeoutType + */ + public TimeoutType allocationRetryWaitMillis(Integer allocationRetryWaitMillis); + + /** + * Returns the allocation-retry-wait-millis element + * @return the node defined for the element allocation-retry-wait-millis + */ + public Integer getAllocationRetryWaitMillis(); + + /** + * Removes the allocation-retry-wait-millis element + * @return the current instance of TimeoutType + */ + public TimeoutType removeAllocationRetryWaitMillis(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : xa-resource-timeout + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the xa-resource-timeout element + * @param xaResourceTimeout the value for the element xa-resource-timeout + * @return the current instance of TimeoutType + */ + public TimeoutType xaResourceTimeout(Integer xaResourceTimeout); + + /** + * Returns the xa-resource-timeout element + * @return the node defined for the element xa-resource-timeout + */ + public Integer getXaResourceTimeout(); + + /** + * Removes the xa-resource-timeout element + * @return the current instance of TimeoutType + */ + public TimeoutType removeXaResourceTimeout(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/TransactionSupportType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/TransactionSupportType.java new file mode 100644 index 00000000..77f9a81e --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/TransactionSupportType.java @@ -0,0 +1,46 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +/** + * This class implements the transaction-supportType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public enum TransactionSupportType +{ + _NOTRANSACTION("NoTransaction"), + _LOCALTRANSACTION("LocalTransaction"), + _XATRANSACTION("XATransaction"); + + private String value; + + TransactionSupportType (String value) { this.value = value; } + + public String toString() {return value;} + + public static TransactionSupportType getFromStringValue(String value) + { + for(TransactionSupportType type: TransactionSupportType.values()) + { + if(value != null && type.toString().equals(value)) + { return type;} + } + return null; + } + +} + diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ValidationType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ValidationType.java new file mode 100644 index 00000000..461b3156 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/ValidationType.java @@ -0,0 +1,103 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the validationType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ValidationType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : background-validation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the background-validation element + * @param backgroundValidation the value for the element background-validation + * @return the current instance of ValidationType + */ + public ValidationType backgroundValidation(Boolean backgroundValidation); + + /** + * Returns the background-validation element + * @return the node defined for the element background-validation + */ + public Boolean isBackgroundValidation(); + + /** + * Removes the background-validation element + * @return the current instance of ValidationType + */ + public ValidationType removeBackgroundValidation(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:nonNegativeInteger ElementType : background-validation-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the background-validation-millis element + * @param backgroundValidationMillis the value for the element background-validation-millis + * @return the current instance of ValidationType + */ + public ValidationType backgroundValidationMillis(Integer backgroundValidationMillis); + + /** + * Returns the background-validation-millis element + * @return the node defined for the element background-validation-millis + */ + public Integer getBackgroundValidationMillis(); + + /** + * Removes the background-validation-millis element + * @return the current instance of ValidationType + */ + public ValidationType removeBackgroundValidationMillis(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : use-fast-fail + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-fast-fail element + * @param useFastFail the value for the element use-fast-fail + * @return the current instance of ValidationType + */ + public ValidationType useFastFail(Boolean useFastFail); + + /** + * Returns the use-fast-fail element + * @return the node defined for the element use-fast-fail + */ + public Boolean isUseFastFail(); + + /** + * Removes the use-fast-fail element + * @return the current instance of ValidationType + */ + public ValidationType removeUseFastFail(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/XaPoolType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/XaPoolType.java new file mode 100644 index 00000000..086ee939 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/XaPoolType.java @@ -0,0 +1,151 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.ironjacamar10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the xa-poolType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface XaPoolType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : is-same-rm-override + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the is-same-rm-override element + * @param isSameRmOverride the value for the element is-same-rm-override + * @return the current instance of XaPoolType + */ + public XaPoolType isSameRmOverride(Boolean isSameRmOverride); + + /** + * Returns the is-same-rm-override element + * @return the node defined for the element is-same-rm-override + */ + public Boolean isIsSameRmOverride(); + + /** + * Removes the is-same-rm-override element + * @return the current instance of XaPoolType + */ + public XaPoolType removeIsSameRmOverride(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: javaee:emptyType ElementType : interleaving + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the interleaving element + * @return the current instance of XaPoolType + */ + public XaPoolType interleaving(); + + /** + * Removes the interleaving element + * @return the current instance of XaPoolType + */ + public Boolean isInterleaving(); + + /** + * Removes the interleaving element + * @return the current instance of XaPoolType + */ + public XaPoolType removeInterleaving(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: javaee:emptyType ElementType : no-tx-separate-pools + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public XaPoolType noTxSeparatePools(); + + /** + * Removes the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public Boolean isNoTxSeparatePools(); + + /** + * Removes the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public XaPoolType removeNoTxSeparatePools(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : pad-xid + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pad-xid element + * @param padXid the value for the element pad-xid + * @return the current instance of XaPoolType + */ + public XaPoolType padXid(Boolean padXid); + + /** + * Returns the pad-xid element + * @return the node defined for the element pad-xid + */ + public Boolean isPadXid(); + + /** + * Removes the pad-xid element + * @return the current instance of XaPoolType + */ + public XaPoolType removePadXid(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : wrap-xa-resource + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the wrap-xa-resource element + * @param wrapXaResource the value for the element wrap-xa-resource + * @return the current instance of XaPoolType + */ + public XaPoolType wrapXaResource(Boolean wrapXaResource); + + /** + * Returns the wrap-xa-resource element + * @return the node defined for the element wrap-xa-resource + */ + public Boolean isWrapXaResource(); + + /** + * Removes the wrap-xa-resource element + * @return the current instance of XaPoolType + */ + public XaPoolType removeWrapXaResource(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/package-info.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/package-info.java new file mode 100644 index 00000000..8c497b02 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/ironjacamar10/package-info.java @@ -0,0 +1,5 @@ + /** + * Provides the interfaces and enumeration types as defined in the schema ironjacamar_1_0.xsd + */ + +package org.jboss.shrinkwrap.descriptor.api.ironjacamar10; diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/AdminObjectType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/AdminObjectType.java new file mode 100644 index 00000000..ab4ff6b9 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/AdminObjectType.java @@ -0,0 +1,180 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +/** + * This interface defines the contract for the admin-objectType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface AdminObjectType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of AdminObjectType + */ + public AdminObjectType className(String className); + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ +public String getClassName(); + + /** + * Removes the class-name attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeClassName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:token ElementType : jndi-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jndi-name attribute + * @param jndiName the value for the attribute jndi-name + * @return the current instance of AdminObjectType + */ + public AdminObjectType jndiName(String jndiName); + + /** + * Returns the jndi-name attribute + * @return the value defined for the attribute jndi-name + */ +public String getJndiName(); + + /** + * Removes the jndi-name attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeJndiName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:boolean ElementType : enabled + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the enabled attribute + * @param enabled the value for the attribute enabled + * @return the current instance of AdminObjectType + */ + public AdminObjectType enabled(Boolean enabled); + + /** + * Returns the enabled attribute + * @return the value defined for the attribute enabled + */ +public Boolean isEnabled(); + + /** + * Removes the enabled attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeEnabled(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:boolean ElementType : use-java-context + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-java-context attribute + * @param useJavaContext the value for the attribute use-java-context + * @return the current instance of AdminObjectType + */ + public AdminObjectType useJavaContext(Boolean useJavaContext); + + /** + * Returns the use-java-context attribute + * @return the value defined for the attribute use-java-context + */ +public Boolean isUseJavaContext(); + + /** + * Removes the use-java-context attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeUseJavaContext(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:token ElementType : pool-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pool-name attribute + * @param poolName the value for the attribute pool-name + * @return the current instance of AdminObjectType + */ + public AdminObjectType poolName(String poolName); + + /** + * Returns the pool-name attribute + * @return the value defined for the attribute pool-name + */ +public String getPoolName(); + + /** + * Removes the pool-name attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removePoolName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: resourceadapters:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty(); + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty(); + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty(); + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public AdminObjectType removeAllConfigProperty(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/AdminObjectsType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/AdminObjectsType.java new file mode 100644 index 00000000..b3062b2d --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/AdminObjectsType.java @@ -0,0 +1,60 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.AdminObjectType; +/** + * This interface defines the contract for the admin-objectsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface AdminObjectsType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectsType ElementName: resourceadapters:admin-objectType ElementType : admin-object + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new admin-object element will be created and returned. + * Otherwise, the first existing admin-object element will be returned. + * @return the instance defined for the element admin-object + */ + public AdminObjectType> getOrCreateAdminObject(); + + /** + * Creates a new admin-object element + * @return the new created instance of AdminObjectType> + */ + public AdminObjectType> createAdminObject(); + + /** + * Returns all admin-object elements + * @return list of admin-object + */ + public List>> getAllAdminObject(); + + /** + * Removes all admin-object elements + * @return the current instance of AdminObjectType> + */ + public AdminObjectsType removeAllAdminObject(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/BeanValidationGroupsType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/BeanValidationGroupsType.java new file mode 100644 index 00000000..64689bb8 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/BeanValidationGroupsType.java @@ -0,0 +1,54 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the bean-validation-groupsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface BeanValidationGroupsType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: BeanValidationGroupsType ElementName: xsd:token ElementType : bean-validation-group + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Creates for all String objects representing bean-validation-group elements, + * a new bean-validation-group element + * @param values list of bean-validation-group objects + * @return the current instance of BeanValidationGroupsType + */ + public BeanValidationGroupsType beanValidationGroup(String ... values); + + /** + * Returns all bean-validation-group elements + * @return list of bean-validation-group + */ + public List getAllBeanValidationGroup(); + + /** + * Removes the bean-validation-group element + * @return the current instance of BeanValidationGroupsType + */ + public BeanValidationGroupsType removeAllBeanValidationGroup(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ConfigPropertyType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ConfigPropertyType.java new file mode 100644 index 00000000..6014e802 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ConfigPropertyType.java @@ -0,0 +1,87 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the config-propertyType xsd type + *

+ * Original Documentation: + *

+ *
+ * [
+ * Specifies an override for a config-property element in ra.xml or a @ConfigProperty
+ *
+ *
+ * + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ConfigPropertyType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConfigPropertyType ElementName: xsd:token ElementType : name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the name attribute + * @param name the value for the attribute name + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType name(String name); + + /** + * Returns the name attribute + * @return the value defined for the attribute name + */ +public String getName(); + + /** + * Removes the name attribute + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType removeName(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConfigPropertyType ElementName: xsd:token ElementType : config-propertyType + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the config-propertyType element + * @param configPropertyType the value for the element config-propertyType + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType configPropertyType(String configPropertyType); + + /** + * Returns the config-propertyType element + * @return the node defined for the element config-propertyType + */ + public String getConfigPropertyType(); + + /** + * Removes the config-propertyType element + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType removeConfigPropertyType(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ConnectionDefinitionsType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ConnectionDefinitionsType.java new file mode 100644 index 00000000..34c92fd5 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ConnectionDefinitionsType.java @@ -0,0 +1,60 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConnectionDefintionType; +/** + * This interface defines the contract for the connection-definitionsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ConnectionDefinitionsType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefinitionsType ElementName: resourceadapters:connection-defintionType ElementType : connection-definition + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new connection-definition element will be created and returned. + * Otherwise, the first existing connection-definition element will be returned. + * @return the instance defined for the element connection-definition + */ + public ConnectionDefintionType> getOrCreateConnectionDefinition(); + + /** + * Creates a new connection-definition element + * @return the new created instance of ConnectionDefintionType> + */ + public ConnectionDefintionType> createConnectionDefinition(); + + /** + * Returns all connection-definition elements + * @return list of connection-definition + */ + public List>> getAllConnectionDefinition(); + + /** + * Removes all connection-definition elements + * @return the current instance of ConnectionDefintionType> + */ + public ConnectionDefinitionsType removeAllConnectionDefinition(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ConnectionDefintionType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ConnectionDefintionType.java new file mode 100644 index 00000000..10faaa1a --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ConnectionDefintionType.java @@ -0,0 +1,325 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.SecurityType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.TimeoutType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ValidationType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.RecoverType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.PoolType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.XaPoolType; +/** + * This interface defines the contract for the connection-defintionType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ConnectionDefintionType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType className(String className); + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ +public String getClassName(); + + /** + * Removes the class-name attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeClassName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:token ElementType : jndi-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jndi-name attribute + * @param jndiName the value for the attribute jndi-name + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType jndiName(String jndiName); + + /** + * Returns the jndi-name attribute + * @return the value defined for the attribute jndi-name + */ +public String getJndiName(); + + /** + * Removes the jndi-name attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeJndiName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:boolean ElementType : enabled + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the enabled attribute + * @param enabled the value for the attribute enabled + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType enabled(Boolean enabled); + + /** + * Returns the enabled attribute + * @return the value defined for the attribute enabled + */ +public Boolean isEnabled(); + + /** + * Removes the enabled attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeEnabled(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:boolean ElementType : use-java-context + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-java-context attribute + * @param useJavaContext the value for the attribute use-java-context + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType useJavaContext(Boolean useJavaContext); + + /** + * Returns the use-java-context attribute + * @return the value defined for the attribute use-java-context + */ +public Boolean isUseJavaContext(); + + /** + * Removes the use-java-context attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeUseJavaContext(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:token ElementType : pool-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pool-name attribute + * @param poolName the value for the attribute pool-name + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType poolName(String poolName); + + /** + * Returns the pool-name attribute + * @return the value defined for the attribute pool-name + */ +public String getPoolName(); + + /** + * Removes the pool-name attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removePoolName(); + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty(); + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty(); + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty(); + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public ConnectionDefintionType removeAllConfigProperty(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:securityType ElementType : security + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new security element with the given value will be created. + * Otherwise, the existing security element will be returned. + * @return a new or existing instance of SecurityType> + */ + public SecurityType> getOrCreateSecurity(); + + /** + * Removes the security element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeSecurity(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:timeoutType ElementType : timeout + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new timeout element with the given value will be created. + * Otherwise, the existing timeout element will be returned. + * @return a new or existing instance of TimeoutType> + */ + public TimeoutType> getOrCreateTimeout(); + + /** + * Removes the timeout element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeTimeout(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:validationType ElementType : validation + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new validation element with the given value will be created. + * Otherwise, the existing validation element will be returned. + * @return a new or existing instance of ValidationType> + */ + public ValidationType> getOrCreateValidation(); + + /** + * Removes the validation element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeValidation(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:recoverType ElementType : recovery + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recovery element with the given value will be created. + * Otherwise, the existing recovery element will be returned. + * @return a new or existing instance of RecoverType> + */ + public RecoverType> getOrCreateRecovery(); + + /** + * Removes the recovery element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeRecovery(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:poolType ElementType : pool + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new pool element with the given value will be created. + * Otherwise, the existing pool element will be returned. + * @return a new or existing instance of PoolType> + */ + public PoolType> getOrCreatePool(); + + /** + * Removes the pool element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removePool(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:xa-poolType ElementType : xa-pool + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new xa-pool element with the given value will be created. + * Otherwise, the existing xa-pool element will be returned. + * @return a new or existing instance of XaPoolType> + */ + public XaPoolType> getOrCreateXaPool(); + + /** + * Removes the xa-pool element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeXaPool(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:boolean ElementType : use-ccm + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-ccm attribute + * @param useCcm the value for the attribute use-ccm + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType useCcm(Boolean useCcm); + + /** + * Returns the use-ccm attribute + * @return the value defined for the attribute use-ccm + */ +public Boolean isUseCcm(); + + /** + * Removes the use-ccm attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeUseCcm(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/CredentialType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/CredentialType.java new file mode 100644 index 00000000..f1a40960 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/CredentialType.java @@ -0,0 +1,103 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the credentialType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface CredentialType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: CredentialType ElementName: xsd:token ElementType : user-name + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the user-name element + * @param userName the value for the element user-name + * @return the current instance of CredentialType + */ + public CredentialType userName(String userName); + + /** + * Returns the user-name element + * @return the node defined for the element user-name + */ + public String getUserName(); + + /** + * Removes the user-name element + * @return the current instance of CredentialType + */ + public CredentialType removeUserName(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: CredentialType ElementName: xsd:token ElementType : password + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the password element + * @param password the value for the element password + * @return the current instance of CredentialType + */ + public CredentialType password(String password); + + /** + * Returns the password element + * @return the node defined for the element password + */ + public String getPassword(); + + /** + * Removes the password element + * @return the current instance of CredentialType + */ + public CredentialType removePassword(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: CredentialType ElementName: xsd:token ElementType : security-domain + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain element + * @param securityDomain the value for the element security-domain + * @return the current instance of CredentialType + */ + public CredentialType securityDomain(String securityDomain); + + /** + * Returns the security-domain element + * @return the node defined for the element security-domain + */ + public String getSecurityDomain(); + + /** + * Removes the security-domain element + * @return the current instance of CredentialType + */ + public CredentialType removeSecurityDomain(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ExtensionType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ExtensionType.java new file mode 100644 index 00000000..465f6f5f --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ExtensionType.java @@ -0,0 +1,73 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +/** + * This interface defines the contract for the extensionType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ExtensionType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ExtensionType ElementName: resourceadapters:config-propertyType ElementType : config-property + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element with the given value will be created. + * Otherwise, the existing config-property element will be returned. + * @return a new or existing instance of ConfigPropertyType> + */ + public ConfigPropertyType> getOrCreateConfigProperty(); + + /** + * Removes the config-property element + * @return the current instance of ExtensionType + */ + public ExtensionType removeConfigProperty(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ExtensionType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of ExtensionType + */ + public ExtensionType className(String className); + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ +public String getClassName(); + + /** + * Removes the class-name attribute + * @return the current instance of ExtensionType + */ + public ExtensionType removeClassName(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/PoolType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/PoolType.java new file mode 100644 index 00000000..dcc668f6 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/PoolType.java @@ -0,0 +1,153 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the poolType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface PoolType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:nonNegativeInteger ElementType : min-pool-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the min-pool-size element + * @param minPoolSize the value for the element min-pool-size + * @return the current instance of PoolType + */ + public PoolType minPoolSize(Integer minPoolSize); + + /** + * Returns the min-pool-size element + * @return the node defined for the element min-pool-size + */ + public Integer getMinPoolSize(); + + /** + * Removes the min-pool-size element + * @return the current instance of PoolType + */ + public PoolType removeMinPoolSize(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:nonNegativeInteger ElementType : max-pool-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the max-pool-size element + * @param maxPoolSize the value for the element max-pool-size + * @return the current instance of PoolType + */ + public PoolType maxPoolSize(Integer maxPoolSize); + + /** + * Returns the max-pool-size element + * @return the node defined for the element max-pool-size + */ + public Integer getMaxPoolSize(); + + /** + * Removes the max-pool-size element + * @return the current instance of PoolType + */ + public PoolType removeMaxPoolSize(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:boolean ElementType : prefill + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the prefill element + * @param prefill the value for the element prefill + * @return the current instance of PoolType + */ + public PoolType prefill(Boolean prefill); + + /** + * Returns the prefill element + * @return the node defined for the element prefill + */ + public Boolean isPrefill(); + + /** + * Removes the prefill element + * @return the current instance of PoolType + */ + public PoolType removePrefill(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:boolean ElementType : use-strict-min + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-strict-min element + * @param useStrictMin the value for the element use-strict-min + * @return the current instance of PoolType + */ + public PoolType useStrictMin(Boolean useStrictMin); + + /** + * Returns the use-strict-min element + * @return the node defined for the element use-strict-min + */ + public Boolean isUseStrictMin(); + + /** + * Removes the use-strict-min element + * @return the current instance of PoolType + */ + public PoolType removeUseStrictMin(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:token ElementType : flush-strategy + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the flush-strategy element + * @param flushStrategy the value for the element flush-strategy + * @return the current instance of PoolType + */ + public PoolType flushStrategy(String flushStrategy); + + /** + * Returns the flush-strategy element + * @return the node defined for the element flush-strategy + */ + public String getFlushStrategy(); + + /** + * Removes the flush-strategy element + * @return the current instance of PoolType + */ + public PoolType removeFlushStrategy(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/RecoverType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/RecoverType.java new file mode 100644 index 00000000..463ceb5c --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/RecoverType.java @@ -0,0 +1,93 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.CredentialType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ExtensionType; +/** + * This interface defines the contract for the recoverType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface RecoverType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: resourceadapters:credentialType ElementType : recover-credential + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recover-credential element with the given value will be created. + * Otherwise, the existing recover-credential element will be returned. + * @return a new or existing instance of CredentialType> + */ + public CredentialType> getOrCreateRecoverCredential(); + + /** + * Removes the recover-credential element + * @return the current instance of RecoverType + */ + public RecoverType removeRecoverCredential(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: resourceadapters:extensionType ElementType : recover-plugin + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recover-plugin element with the given value will be created. + * Otherwise, the existing recover-plugin element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateRecoverPlugin(); + + /** + * Removes the recover-plugin element + * @return the current instance of RecoverType + */ + public RecoverType removeRecoverPlugin(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: xsd:boolean ElementType : no-recovery + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the no-recovery attribute + * @param noRecovery the value for the attribute no-recovery + * @return the current instance of RecoverType + */ + public RecoverType noRecovery(Boolean noRecovery); + + /** + * Returns the no-recovery attribute + * @return the value defined for the attribute no-recovery + */ +public Boolean isNoRecovery(); + + /** + * Removes the no-recovery attribute + * @return the current instance of RecoverType + */ + public RecoverType removeNoRecovery(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ResourceAdapterType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ResourceAdapterType.java new file mode 100644 index 00000000..37c4757c --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ResourceAdapterType.java @@ -0,0 +1,207 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.BeanValidationGroupsType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.TransactionSupportType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConnectionDefinitionsType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.AdminObjectsType; +/** + * This interface defines the contract for the resource-adapterType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ResourceAdapterType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: xsd:token ElementType : archive + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the archive element + * @param archive the value for the element archive + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType archive(String archive); + + /** + * Returns the archive element + * @return the node defined for the element archive + */ + public String getArchive(); + + /** + * Removes the archive element + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType removeArchive(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: resourceadapters:bean-validation-groupsType ElementType : bean-validation-groups + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new bean-validation-groups element with the given value will be created. + * Otherwise, the existing bean-validation-groups element will be returned. + * @return a new or existing instance of BeanValidationGroupsType> + */ + public BeanValidationGroupsType> getOrCreateBeanValidationGroups(); + + /** + * Removes the bean-validation-groups element + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType removeBeanValidationGroups(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: xsd:token ElementType : bootstrap-context + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the bootstrap-context element + * @param bootstrapContext the value for the element bootstrap-context + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType bootstrapContext(String bootstrapContext); + + /** + * Returns the bootstrap-context element + * @return the node defined for the element bootstrap-context + */ + public String getBootstrapContext(); + + /** + * Removes the bootstrap-context element + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType removeBootstrapContext(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: resourceadapters:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty(); + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty(); + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty(); + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public ResourceAdapterType removeAllConfigProperty(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: resourceadapters:transaction-supportType ElementType : transaction-support + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: true isDataType: false + // --------------------------------------------------------------------------------------------------------|| + /** + * Sets the transaction-support element + * @param transactionSupport the value for the element transaction-support + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType transactionSupport(TransactionSupportType transactionSupport); + /** + * Sets the transaction-support element + * @param transactionSupport the value for the element transaction-support + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType transactionSupport(String transactionSupport); + + /** + * Returns the transaction-support element + * @return the value found for the element transaction-support + */ + public TransactionSupportType getTransactionSupport(); + + /** + * Returns the transaction-support element + * @return the value found for the element transaction-support + */ + public String getTransactionSupportAsString(); + + /** + * Removes the transaction-support attribute + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType removeTransactionSupport(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: resourceadapters:connection-definitionsType ElementType : connection-definitions + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new connection-definitions element with the given value will be created. + * Otherwise, the existing connection-definitions element will be returned. + * @return a new or existing instance of ConnectionDefinitionsType> + */ + public ConnectionDefinitionsType> getOrCreateConnectionDefinitions(); + + /** + * Removes the connection-definitions element + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType removeConnectionDefinitions(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: resourceadapters:admin-objectsType ElementType : admin-objects + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new admin-objects element with the given value will be created. + * Otherwise, the existing admin-objects element will be returned. + * @return a new or existing instance of AdminObjectsType> + */ + public AdminObjectsType> getOrCreateAdminObjects(); + + /** + * Removes the admin-objects element + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType removeAdminObjects(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ResourceAdaptersDescriptor.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ResourceAdaptersDescriptor.java new file mode 100644 index 00000000..04ce1810 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ResourceAdaptersDescriptor.java @@ -0,0 +1,72 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdapterType; +import org.jboss.shrinkwrap.descriptor.api.Descriptor; +import org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace; + +/** + *

+ * This deployment descriptor provides the functionalities as described in the resource-adapters_1_0.xsd specification + *

+ * Example: + *

+ * + * ResourceAdaptersDescriptor descriptor = Descriptors.create(ResourceAdaptersDescriptor.class); + * + * + * + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ResourceAdaptersDescriptor extends Descriptor, DescriptorNamespace +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdaptersDescriptor ElementName: resourceadapters:resource-adapterType ElementType : resource-adapter + // MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new resource-adapter element will be created and returned. + * Otherwise, the first existing resource-adapter element will be returned. + * @return the instance defined for the element resource-adapter + */ + public ResourceAdapterType getOrCreateResourceAdapter(); + + /** + * Creates a new resource-adapter element + * @return the new created instance of ResourceAdapterType + */ + public ResourceAdapterType createResourceAdapter(); + + /** + * Returns all resource-adapter elements + * @return list of resource-adapter + */ + public List> getAllResourceAdapter(); + + /** + * Removes all resource-adapter elements + * @return the current instance of ResourceAdapterType + */ + public ResourceAdaptersDescriptor removeAllResourceAdapter(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ResourceAdaptersType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ResourceAdaptersType.java new file mode 100644 index 00000000..18175040 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ResourceAdaptersType.java @@ -0,0 +1,60 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdapterType; +/** + * This interface defines the contract for the resource-adaptersType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ResourceAdaptersType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdaptersType ElementName: resourceadapters:resource-adapterType ElementType : resource-adapter + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new resource-adapter element will be created and returned. + * Otherwise, the first existing resource-adapter element will be returned. + * @return the instance defined for the element resource-adapter + */ + public ResourceAdapterType> getOrCreateResourceAdapter(); + + /** + * Creates a new resource-adapter element + * @return the new created instance of ResourceAdapterType> + */ + public ResourceAdapterType> createResourceAdapter(); + + /** + * Returns all resource-adapter elements + * @return list of resource-adapter + */ + public List>> getAllResourceAdapter(); + + /** + * Removes all resource-adapter elements + * @return the current instance of ResourceAdapterType> + */ + public ResourceAdaptersType removeAllResourceAdapter(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/SecurityType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/SecurityType.java new file mode 100644 index 00000000..83fef86c --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/SecurityType.java @@ -0,0 +1,102 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the securityType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface SecurityType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: SecurityType ElementName: javaee:emptyType ElementType : application + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the application element + * @return the current instance of SecurityType + */ + public SecurityType application(); + + /** + * Removes the application element + * @return the current instance of SecurityType + */ + public Boolean isApplication(); + + /** + * Removes the application element + * @return the current instance of SecurityType + */ + public SecurityType removeApplication(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: SecurityType ElementName: xsd:token ElementType : security-domain + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain element + * @param securityDomain the value for the element security-domain + * @return the current instance of SecurityType + */ + public SecurityType securityDomain(String securityDomain); + + /** + * Returns the security-domain element + * @return the node defined for the element security-domain + */ + public String getSecurityDomain(); + + /** + * Removes the security-domain element + * @return the current instance of SecurityType + */ + public SecurityType removeSecurityDomain(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: SecurityType ElementName: xsd:token ElementType : security-domain-and-application + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain-and-application element + * @param securityDomainAndApplication the value for the element security-domain-and-application + * @return the current instance of SecurityType + */ + public SecurityType securityDomainAndApplication(String securityDomainAndApplication); + + /** + * Returns the security-domain-and-application element + * @return the node defined for the element security-domain-and-application + */ + public String getSecurityDomainAndApplication(); + + /** + * Removes the security-domain-and-application element + * @return the current instance of SecurityType + */ + public SecurityType removeSecurityDomainAndApplication(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/TimeoutType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/TimeoutType.java new file mode 100644 index 00000000..6f5a45da --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/TimeoutType.java @@ -0,0 +1,153 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the timeoutType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface TimeoutType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : blocking-timeout-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the blocking-timeout-millis element + * @param blockingTimeoutMillis the value for the element blocking-timeout-millis + * @return the current instance of TimeoutType + */ + public TimeoutType blockingTimeoutMillis(Integer blockingTimeoutMillis); + + /** + * Returns the blocking-timeout-millis element + * @return the node defined for the element blocking-timeout-millis + */ + public Integer getBlockingTimeoutMillis(); + + /** + * Removes the blocking-timeout-millis element + * @return the current instance of TimeoutType + */ + public TimeoutType removeBlockingTimeoutMillis(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : idle-timeout-minutes + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the idle-timeout-minutes element + * @param idleTimeoutMinutes the value for the element idle-timeout-minutes + * @return the current instance of TimeoutType + */ + public TimeoutType idleTimeoutMinutes(Integer idleTimeoutMinutes); + + /** + * Returns the idle-timeout-minutes element + * @return the node defined for the element idle-timeout-minutes + */ + public Integer getIdleTimeoutMinutes(); + + /** + * Removes the idle-timeout-minutes element + * @return the current instance of TimeoutType + */ + public TimeoutType removeIdleTimeoutMinutes(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : allocation-retry + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the allocation-retry element + * @param allocationRetry the value for the element allocation-retry + * @return the current instance of TimeoutType + */ + public TimeoutType allocationRetry(Integer allocationRetry); + + /** + * Returns the allocation-retry element + * @return the node defined for the element allocation-retry + */ + public Integer getAllocationRetry(); + + /** + * Removes the allocation-retry element + * @return the current instance of TimeoutType + */ + public TimeoutType removeAllocationRetry(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : allocation-retry-wait-millis + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the allocation-retry-wait-millis element + * @param allocationRetryWaitMillis the value for the element allocation-retry-wait-millis + * @return the current instance of TimeoutType + */ + public TimeoutType allocationRetryWaitMillis(Integer allocationRetryWaitMillis); + + /** + * Returns the allocation-retry-wait-millis element + * @return the node defined for the element allocation-retry-wait-millis + */ + public Integer getAllocationRetryWaitMillis(); + + /** + * Removes the allocation-retry-wait-millis element + * @return the current instance of TimeoutType + */ + public TimeoutType removeAllocationRetryWaitMillis(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : xa-resource-timeout + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the xa-resource-timeout element + * @param xaResourceTimeout the value for the element xa-resource-timeout + * @return the current instance of TimeoutType + */ + public TimeoutType xaResourceTimeout(Integer xaResourceTimeout); + + /** + * Returns the xa-resource-timeout element + * @return the node defined for the element xa-resource-timeout + */ + public Integer getXaResourceTimeout(); + + /** + * Removes the xa-resource-timeout element + * @return the current instance of TimeoutType + */ + public TimeoutType removeXaResourceTimeout(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/TransactionSupportType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/TransactionSupportType.java new file mode 100644 index 00000000..b83cd5a7 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/TransactionSupportType.java @@ -0,0 +1,46 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +/** + * This class implements the transaction-supportType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public enum TransactionSupportType +{ + _NOTRANSACTION("NoTransaction"), + _LOCALTRANSACTION("LocalTransaction"), + _XATRANSACTION("XATransaction"); + + private String value; + + TransactionSupportType (String value) { this.value = value; } + + public String toString() {return value;} + + public static TransactionSupportType getFromStringValue(String value) + { + for(TransactionSupportType type: TransactionSupportType.values()) + { + if(value != null && type.toString().equals(value)) + { return type;} + } + return null; + } + +} + diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ValidationType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ValidationType.java new file mode 100644 index 00000000..0779fe20 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/ValidationType.java @@ -0,0 +1,103 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the validationType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface ValidationType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : background-validation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the background-validation element + * @param backgroundValidation the value for the element background-validation + * @return the current instance of ValidationType + */ + public ValidationType backgroundValidation(Boolean backgroundValidation); + + /** + * Returns the background-validation element + * @return the node defined for the element background-validation + */ + public Boolean isBackgroundValidation(); + + /** + * Removes the background-validation element + * @return the current instance of ValidationType + */ + public ValidationType removeBackgroundValidation(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:nonNegativeInteger ElementType : background-validation-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the background-validation-millis element + * @param backgroundValidationMillis the value for the element background-validation-millis + * @return the current instance of ValidationType + */ + public ValidationType backgroundValidationMillis(Integer backgroundValidationMillis); + + /** + * Returns the background-validation-millis element + * @return the node defined for the element background-validation-millis + */ + public Integer getBackgroundValidationMillis(); + + /** + * Removes the background-validation-millis element + * @return the current instance of ValidationType + */ + public ValidationType removeBackgroundValidationMillis(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : use-fast-fail + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-fast-fail element + * @param useFastFail the value for the element use-fast-fail + * @return the current instance of ValidationType + */ + public ValidationType useFastFail(Boolean useFastFail); + + /** + * Returns the use-fast-fail element + * @return the node defined for the element use-fast-fail + */ + public Boolean isUseFastFail(); + + /** + * Removes the use-fast-fail element + * @return the current instance of ValidationType + */ + public ValidationType removeUseFastFail(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/XaPoolType.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/XaPoolType.java new file mode 100644 index 00000000..ddedc931 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/XaPoolType.java @@ -0,0 +1,151 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.api.resourceadapters10; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +/** + * This interface defines the contract for the xa-poolType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public interface XaPoolType extends Child +{ + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : is-same-rm-override + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the is-same-rm-override element + * @param isSameRmOverride the value for the element is-same-rm-override + * @return the current instance of XaPoolType + */ + public XaPoolType isSameRmOverride(Boolean isSameRmOverride); + + /** + * Returns the is-same-rm-override element + * @return the node defined for the element is-same-rm-override + */ + public Boolean isIsSameRmOverride(); + + /** + * Removes the is-same-rm-override element + * @return the current instance of XaPoolType + */ + public XaPoolType removeIsSameRmOverride(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: javaee:emptyType ElementType : interleaving + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the interleaving element + * @return the current instance of XaPoolType + */ + public XaPoolType interleaving(); + + /** + * Removes the interleaving element + * @return the current instance of XaPoolType + */ + public Boolean isInterleaving(); + + /** + * Removes the interleaving element + * @return the current instance of XaPoolType + */ + public XaPoolType removeInterleaving(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: javaee:emptyType ElementType : no-tx-separate-pools + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public XaPoolType noTxSeparatePools(); + + /** + * Removes the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public Boolean isNoTxSeparatePools(); + + /** + * Removes the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public XaPoolType removeNoTxSeparatePools(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : pad-xid + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pad-xid element + * @param padXid the value for the element pad-xid + * @return the current instance of XaPoolType + */ + public XaPoolType padXid(Boolean padXid); + + /** + * Returns the pad-xid element + * @return the node defined for the element pad-xid + */ + public Boolean isPadXid(); + + /** + * Removes the pad-xid element + * @return the current instance of XaPoolType + */ + public XaPoolType removePadXid(); + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : wrap-xa-resource + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the wrap-xa-resource element + * @param wrapXaResource the value for the element wrap-xa-resource + * @return the current instance of XaPoolType + */ + public XaPoolType wrapXaResource(Boolean wrapXaResource); + + /** + * Returns the wrap-xa-resource element + * @return the node defined for the element wrap-xa-resource + */ + public Boolean isWrapXaResource(); + + /** + * Removes the wrap-xa-resource element + * @return the current instance of XaPoolType + */ + public XaPoolType removeWrapXaResource(); +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/package-info.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/package-info.java new file mode 100644 index 00000000..e52dd729 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/api/resourceadapters10/package-info.java @@ -0,0 +1,5 @@ + /** + * Provides the interfaces and enumeration types as defined in the schema resource-adapters_1_0.xsd + */ + +package org.jboss.shrinkwrap.descriptor.api.resourceadapters10; diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ConfigPropertyTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ConfigPropertyTypeImpl.java new file mode 100644 index 00000000..ffaf8981 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ConfigPropertyTypeImpl.java @@ -0,0 +1,142 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ConfigPropertyType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the config-propertyType xsd type + *

+ * Original Documentation: + *

+ *
+ * [
+ * Specifies a Java bean property value
+ *
+ *
+ * + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ConfigPropertyTypeImpl implements Child, ConfigPropertyType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ConfigPropertyTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ConfigPropertyTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConfigPropertyType ElementName: xsd:token ElementType : name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the name attribute + * @param name the value for the attribute name + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType name(String name) + { + childNode.attribute("name", name); + return this; + } + + /** + * Returns the name attribute + * @return the value defined for the attribute name + */ + public String getName() + { + return childNode.getAttribute("name"); + } + + /** + * Removes the name attribute + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType removeName() + { + childNode.removeAttribute("name"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConfigPropertyType ElementName: xsd:token ElementType : config-propertyType + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the config-propertyType element + * @param configPropertyType the value for the element config-propertyType + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType configPropertyType(String configPropertyType) + { + childNode.getOrCreate("config-propertyType").text(configPropertyType); + return this; + } + + /** + * Returns the config-propertyType element + * @return the node defined for the element config-propertyType + */ + public String getConfigPropertyType() + { + return childNode.getTextValueForPatternName("config-propertyType"); + } + + /** + * Removes the config-propertyType element + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType removeConfigPropertyType() + { + childNode.removeChildren("config-propertyType"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ConnectionPropertyTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ConnectionPropertyTypeImpl.java new file mode 100644 index 00000000..1b3997ad --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ConnectionPropertyTypeImpl.java @@ -0,0 +1,97 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ConnectionPropertyType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the connection-propertyType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ConnectionPropertyTypeImpl implements Child, ConnectionPropertyType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ConnectionPropertyTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ConnectionPropertyTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionPropertyType ElementName: xsd:token ElementType : name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the name attribute + * @param name the value for the attribute name + * @return the current instance of ConnectionPropertyType + */ + public ConnectionPropertyType name(String name) + { + childNode.attribute("name", name); + return this; + } + + /** + * Returns the name attribute + * @return the value defined for the attribute name + */ + public String getName() + { + return childNode.getAttribute("name"); + } + + /** + * Removes the name attribute + * @return the current instance of ConnectionPropertyType + */ + public ConnectionPropertyType removeName() + { + childNode.removeAttribute("name"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourceTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourceTypeImpl.java new file mode 100644 index 00000000..d50acba9 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourceTypeImpl.java @@ -0,0 +1,822 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourceType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ConnectionPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ConnectionPropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TransactionIsolationType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.PoolType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.PoolTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DsSecurityType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DsSecurityTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ValidationType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ValidationTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TimeoutType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.TimeoutTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.StatementType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.StatementTypeImpl; + +/** + * This class implements the datasourceType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class DatasourceTypeImpl implements Child, DatasourceType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public DatasourceTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public DatasourceTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : jndi-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jndi-name attribute + * @param jndiName the value for the attribute jndi-name + * @return the current instance of DatasourceType + */ + public DatasourceType jndiName(String jndiName) + { + childNode.attribute("jndi-name", jndiName); + return this; + } + + /** + * Returns the jndi-name attribute + * @return the value defined for the attribute jndi-name + */ + public String getJndiName() + { + return childNode.getAttribute("jndi-name"); + } + + /** + * Removes the jndi-name attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeJndiName() + { + childNode.removeAttribute("jndi-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : pool-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pool-name attribute + * @param poolName the value for the attribute pool-name + * @return the current instance of DatasourceType + */ + public DatasourceType poolName(String poolName) + { + childNode.attribute("pool-name", poolName); + return this; + } + + /** + * Returns the pool-name attribute + * @return the value defined for the attribute pool-name + */ + public String getPoolName() + { + return childNode.getAttribute("pool-name"); + } + + /** + * Removes the pool-name attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removePoolName() + { + childNode.removeAttribute("pool-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:boolean ElementType : enabled + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the enabled attribute + * @param enabled the value for the attribute enabled + * @return the current instance of DatasourceType + */ + public DatasourceType enabled(Boolean enabled) + { + childNode.attribute("enabled", enabled); + return this; + } + + /** + * Returns the enabled attribute + * @return the value defined for the attribute enabled + */ + public Boolean isEnabled() + { + return Strings.isTrue(childNode.getAttribute("enabled")); + } + + /** + * Removes the enabled attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeEnabled() + { + childNode.removeAttribute("enabled"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:boolean ElementType : use-java-context + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-java-context attribute + * @param useJavaContext the value for the attribute use-java-context + * @return the current instance of DatasourceType + */ + public DatasourceType useJavaContext(Boolean useJavaContext) + { + childNode.attribute("use-java-context", useJavaContext); + return this; + } + + /** + * Returns the use-java-context attribute + * @return the value defined for the attribute use-java-context + */ + public Boolean isUseJavaContext() + { + return Strings.isTrue(childNode.getAttribute("use-java-context")); + } + + /** + * Removes the use-java-context attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeUseJavaContext() + { + childNode.removeAttribute("use-java-context"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:boolean ElementType : spy + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the spy attribute + * @param spy the value for the attribute spy + * @return the current instance of DatasourceType + */ + public DatasourceType spy(Boolean spy) + { + childNode.attribute("spy", spy); + return this; + } + + /** + * Returns the spy attribute + * @return the value defined for the attribute spy + */ + public Boolean isSpy() + { + return Strings.isTrue(childNode.getAttribute("spy")); + } + + /** + * Removes the spy attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeSpy() + { + childNode.removeAttribute("spy"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:boolean ElementType : use-ccm + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-ccm attribute + * @param useCcm the value for the attribute use-ccm + * @return the current instance of DatasourceType + */ + public DatasourceType useCcm(Boolean useCcm) + { + childNode.attribute("use-ccm", useCcm); + return this; + } + + /** + * Returns the use-ccm attribute + * @return the value defined for the attribute use-ccm + */ + public Boolean isUseCcm() + { + return Strings.isTrue(childNode.getAttribute("use-ccm")); + } + + /** + * Removes the use-ccm attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeUseCcm() + { + childNode.removeAttribute("use-ccm"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : connection-url + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the connection-url element + * @param connectionUrl the value for the element connection-url + * @return the current instance of DatasourceType + */ + public DatasourceType connectionUrl(String connectionUrl) + { + childNode.getOrCreate("connection-url").text(connectionUrl); + return this; + } + + /** + * Returns the connection-url element + * @return the node defined for the element connection-url + */ + public String getConnectionUrl() + { + return childNode.getTextValueForPatternName("connection-url"); + } + + /** + * Removes the connection-url element + * @return the current instance of DatasourceType + */ + public DatasourceType removeConnectionUrl() + { + childNode.removeChildren("connection-url"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : driver-class + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the driver-class element + * @param driverClass the value for the element driver-class + * @return the current instance of DatasourceType + */ + public DatasourceType driverClass(String driverClass) + { + childNode.getOrCreate("driver-class").text(driverClass); + return this; + } + + /** + * Returns the driver-class element + * @return the node defined for the element driver-class + */ + public String getDriverClass() + { + return childNode.getTextValueForPatternName("driver-class"); + } + + /** + * Removes the driver-class element + * @return the current instance of DatasourceType + */ + public DatasourceType removeDriverClass() + { + childNode.removeChildren("driver-class"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : datasource-class + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the datasource-class element + * @param datasourceClass the value for the element datasource-class + * @return the current instance of DatasourceType + */ + public DatasourceType datasourceClass(String datasourceClass) + { + childNode.getOrCreate("datasource-class").text(datasourceClass); + return this; + } + + /** + * Returns the datasource-class element + * @return the node defined for the element datasource-class + */ + public String getDatasourceClass() + { + return childNode.getTextValueForPatternName("datasource-class"); + } + + /** + * Removes the datasource-class element + * @return the current instance of DatasourceType + */ + public DatasourceType removeDatasourceClass() + { + childNode.removeChildren("datasource-class"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : driver + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the driver element + * @param driver the value for the element driver + * @return the current instance of DatasourceType + */ + public DatasourceType driver(String driver) + { + childNode.getOrCreate("driver").text(driver); + return this; + } + + /** + * Returns the driver element + * @return the node defined for the element driver + */ + public String getDriver() + { + return childNode.getTextValueForPatternName("driver"); + } + + /** + * Removes the driver element + * @return the current instance of DatasourceType + */ + public DatasourceType removeDriver() + { + childNode.removeChildren("driver"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:connection-propertyType ElementType : connection-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new connection-property element will be created and returned. + * Otherwise, the first existing connection-property element will be returned. + * @return the instance defined for the element connection-property + */ + public ConnectionPropertyType> getOrCreateConnectionProperty() + { + List nodeList = childNode.get("connection-property"); + if (nodeList != null && nodeList.size() > 1) + { + return new ConnectionPropertyTypeImpl>(this, "connection-property", childNode, nodeList.get(0)); + } + return createConnectionProperty(); + } + + /** + * Creates a new connection-property element + * @return the new created instance of ConnectionPropertyType> + */ + public ConnectionPropertyType> createConnectionProperty() + { + return new ConnectionPropertyTypeImpl>(this, "connection-property", childNode); + } + + /** + * Returns all connection-property elements + * @return list of connection-property + */ + public List>> getAllConnectionProperty() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("connection-property"); + for(Node node: nodeList) + { + ConnectionPropertyType> type = new ConnectionPropertyTypeImpl>(this, "connection-property", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all connection-property elements + * @return the current instance of ConnectionPropertyType> + */ + public DatasourceType removeAllConnectionProperty() + { + childNode.removeChildren("connection-property"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:string ElementType : new-connection-sql + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the new-connection-sql element + * @param newConnectionSql the value for the element new-connection-sql + * @return the current instance of DatasourceType + */ + public DatasourceType newConnectionSql(String newConnectionSql) + { + childNode.getOrCreate("new-connection-sql").text(newConnectionSql); + return this; + } + + /** + * Returns the new-connection-sql element + * @return the node defined for the element new-connection-sql + */ + public String getNewConnectionSql() + { + return childNode.getTextValueForPatternName("new-connection-sql"); + } + + /** + * Removes the new-connection-sql element + * @return the current instance of DatasourceType + */ + public DatasourceType removeNewConnectionSql() + { + childNode.removeChildren("new-connection-sql"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:transaction-isolationType ElementType : transaction-isolation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: true isDataType: false + // --------------------------------------------------------------------------------------------------------|| + /** + * Sets the transaction-isolation element + * @param transactionIsolation the value for the element transaction-isolation + * @return the current instance of DatasourceType + */ + public DatasourceType transactionIsolation(TransactionIsolationType transactionIsolation) + { + childNode.getOrCreate("transaction-isolation").text(transactionIsolation); + return this; + } + /** + * Sets the transaction-isolation element + * @param transactionIsolation the value for the element transaction-isolation + * @return the current instance of DatasourceType + */ + public DatasourceType transactionIsolation(String transactionIsolation) + { + childNode.getOrCreate("transaction-isolation").text(transactionIsolation); + return this; + } + + /** + * Returns the transaction-isolation element + * @return the value found for the element transaction-isolation + */ + public TransactionIsolationType getTransactionIsolation() + { + return TransactionIsolationType.getFromStringValue(childNode.getTextValueForPatternName("transaction-isolation")); + } + + /** + * Returns the transaction-isolation element + * @return the value found for the element transaction-isolation + */ + public String getTransactionIsolationAsString() + { + return childNode.getTextValueForPatternName("transaction-isolation"); + } + + /** + * Removes the transaction-isolation attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeTransactionIsolation() + { + childNode.removeAttribute("transaction-isolation"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : url-delimiter + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the url-delimiter element + * @param urlDelimiter the value for the element url-delimiter + * @return the current instance of DatasourceType + */ + public DatasourceType urlDelimiter(String urlDelimiter) + { + childNode.getOrCreate("url-delimiter").text(urlDelimiter); + return this; + } + + /** + * Returns the url-delimiter element + * @return the node defined for the element url-delimiter + */ + public String getUrlDelimiter() + { + return childNode.getTextValueForPatternName("url-delimiter"); + } + + /** + * Removes the url-delimiter element + * @return the current instance of DatasourceType + */ + public DatasourceType removeUrlDelimiter() + { + childNode.removeChildren("url-delimiter"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:token ElementType : url-selector-strategy-class-name + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the url-selector-strategy-class-name element + * @param urlSelectorStrategyClassName the value for the element url-selector-strategy-class-name + * @return the current instance of DatasourceType + */ + public DatasourceType urlSelectorStrategyClassName(String urlSelectorStrategyClassName) + { + childNode.getOrCreate("url-selector-strategy-class-name").text(urlSelectorStrategyClassName); + return this; + } + + /** + * Returns the url-selector-strategy-class-name element + * @return the node defined for the element url-selector-strategy-class-name + */ + public String getUrlSelectorStrategyClassName() + { + return childNode.getTextValueForPatternName("url-selector-strategy-class-name"); + } + + /** + * Removes the url-selector-strategy-class-name element + * @return the current instance of DatasourceType + */ + public DatasourceType removeUrlSelectorStrategyClassName() + { + childNode.removeChildren("url-selector-strategy-class-name"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:poolType ElementType : pool + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new pool element with the given value will be created. + * Otherwise, the existing pool element will be returned. + * @return a new or existing instance of PoolType> + */ + public PoolType> getOrCreatePool() + { + Node node = childNode.getOrCreate("pool"); + PoolType> pool = new PoolTypeImpl>(this, "pool", childNode, node); + return pool; + } + + /** + * Removes the pool element + * @return the current instance of DatasourceType + */ + public DatasourceType removePool() + { + childNode.removeChildren("pool"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:dsSecurityType ElementType : security + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new security element with the given value will be created. + * Otherwise, the existing security element will be returned. + * @return a new or existing instance of DsSecurityType> + */ + public DsSecurityType> getOrCreateSecurity() + { + Node node = childNode.getOrCreate("security"); + DsSecurityType> security = new DsSecurityTypeImpl>(this, "security", childNode, node); + return security; + } + + /** + * Removes the security element + * @return the current instance of DatasourceType + */ + public DatasourceType removeSecurity() + { + childNode.removeChildren("security"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:validationType ElementType : validation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new validation element with the given value will be created. + * Otherwise, the existing validation element will be returned. + * @return a new or existing instance of ValidationType> + */ + public ValidationType> getOrCreateValidation() + { + Node node = childNode.getOrCreate("validation"); + ValidationType> validation = new ValidationTypeImpl>(this, "validation", childNode, node); + return validation; + } + + /** + * Removes the validation element + * @return the current instance of DatasourceType + */ + public DatasourceType removeValidation() + { + childNode.removeChildren("validation"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:timeoutType ElementType : timeout + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new timeout element with the given value will be created. + * Otherwise, the existing timeout element will be returned. + * @return a new or existing instance of TimeoutType> + */ + public TimeoutType> getOrCreateTimeout() + { + Node node = childNode.getOrCreate("timeout"); + TimeoutType> timeout = new TimeoutTypeImpl>(this, "timeout", childNode, node); + return timeout; + } + + /** + * Removes the timeout element + * @return the current instance of DatasourceType + */ + public DatasourceType removeTimeout() + { + childNode.removeChildren("timeout"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: datasources:statementType ElementType : statement + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new statement element with the given value will be created. + * Otherwise, the existing statement element will be returned. + * @return a new or existing instance of StatementType> + */ + public StatementType> getOrCreateStatement() + { + Node node = childNode.getOrCreate("statement"); + StatementType> statement = new StatementTypeImpl>(this, "statement", childNode, node); + return statement; + } + + /** + * Removes the statement element + * @return the current instance of DatasourceType + */ + public DatasourceType removeStatement() + { + childNode.removeChildren("statement"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourceType ElementName: xsd:boolean ElementType : jta + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jta attribute + * @param jta the value for the attribute jta + * @return the current instance of DatasourceType + */ + public DatasourceType jta(Boolean jta) + { + childNode.attribute("jta", jta); + return this; + } + + /** + * Returns the jta attribute + * @return the value defined for the attribute jta + */ + public Boolean isJta() + { + return Strings.isTrue(childNode.getAttribute("jta")); + } + + /** + * Removes the jta attribute + * @return the current instance of DatasourceType + */ + public DatasourceType removeJta() + { + childNode.removeAttribute("jta"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourcesDescriptorImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourcesDescriptorImpl.java new file mode 100644 index 00000000..d069c2ad --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourcesDescriptorImpl.java @@ -0,0 +1,237 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourcesDescriptor; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriversType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DriversTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourceType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DatasourceTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourceType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.XaDatasourceTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace; + +import org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorImplBase; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.spi.node.Node; + +/** + *

+ * This deployment descriptor provides the functionalities as described in the datasources_1_0.xsd specification + *

+ * Example: + *

+ * + * DatasourcesDescriptor descriptor = Descriptors.create(DatasourcesDescriptor.class); + * + * + * + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class DatasourcesDescriptorImpl extends NodeDescriptorImplBase implements DescriptorNamespace, DatasourcesDescriptor +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private Node model; + + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public DatasourcesDescriptorImpl(String descriptorName) + { + this(descriptorName, new Node("datasources")); + } + + public DatasourcesDescriptorImpl(String descriptorName, Node node) + { + super(descriptorName); + this.model = node; + addDefaultNamespaces(); + } + + // -------------------------------------------------------------------------------------|| + // Methods + // -------------------------------------------------------------------------------------|| + + public Node getRootNode() + { + return model; + } + + + + // -------------------------------------------------------------------------------------|| + // Namespace + // -------------------------------------------------------------------------------------|| + + + /** + * Adds the default namespaces as defined in the specification + * @return the current instance of DatasourcesDescriptor + */ + public DatasourcesDescriptor addDefaultNamespaces() + { + addNamespace("xmlns", "http://www.jboss.org/ironjacamar/schema"); + addNamespace("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); + addNamespace("xsi:schemaLocation", "http://www.jboss.org/ironjacamar/schema http://www.jboss.org/ironjacamar/schema/datasources_1_0.xsd"); + return this; + } + + /** + * Adds a new namespace + * @return the current instance of DatasourcesDescriptor + */ + public DatasourcesDescriptor addNamespace(String name, String value) + { + model.attribute(name, value); + return this; + } + + /** + * Returns all defined namespaces. + * @return all defined namespaces + */ + public List getNamespaces() + { + List namespaceList = new ArrayList(); + Map attributes = model.getAttributes(); + for (String name: attributes.keySet()) + { + String value = attributes.get(name); + if (value != null && value.startsWith("http://")) + { + namespaceList.add(name + "=" + value); + } + } + return namespaceList; + } + + /** + * Removes all existing namespaces. + * @return the current instance of DatasourcesDescriptor + */ + public DatasourcesDescriptor removeAllNamespaces() + { + List nameSpaceKeys = new ArrayList(); + Map attributes = model.getAttributes(); + for (String name: attributes.keySet()) + { + String value = attributes.get(name); + if (value != null && value.startsWith("http://")) + { + nameSpaceKeys.add(name); + } + } + for (String name: nameSpaceKeys) + { + model.removeAttribute(name); + } + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourcesDescriptor ElementName: datasources:driversType ElementType : drivers + // MaxOccurs: -1 isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new drivers element with the given value will be created. + * Otherwise, the existing drivers element will be returned. + * @return a new or existing instance of DriversType + */ + public DriversType getOrCreateDrivers() + { + Node node = model.getOrCreate("drivers"); + DriversType drivers = new DriversTypeImpl(this, "drivers", model, node); + return drivers; + } + + /** + * Removes the drivers element + * @return the current instance of DatasourcesDescriptor + */ + public DatasourcesDescriptor removeDrivers() + { + model.removeChildren("drivers"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourcesDescriptor ElementName: datasources:datasourceType ElementType : datasource + // MaxOccurs: - isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new datasource element with the given value will be created. + * Otherwise, the existing datasource element will be returned. + * @return a new or existing instance of DatasourceType + */ + public DatasourceType getOrCreateDatasource() + { + Node node = model.getOrCreate("datasource"); + DatasourceType datasource = new DatasourceTypeImpl(this, "datasource", model, node); + return datasource; + } + + /** + * Removes the datasource element + * @return the current instance of DatasourcesDescriptor + */ + public DatasourcesDescriptor removeDatasource() + { + model.removeChildren("datasource"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourcesDescriptor ElementName: datasources:xa-datasourceType ElementType : xa-datasource + // MaxOccurs: - isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new xa-datasource element with the given value will be created. + * Otherwise, the existing xa-datasource element will be returned. + * @return a new or existing instance of XaDatasourceType + */ + public XaDatasourceType getOrCreateXaDatasource() + { + Node node = model.getOrCreate("xa-datasource"); + XaDatasourceType xaDatasource = new XaDatasourceTypeImpl(this, "xa-datasource", model, node); + return xaDatasource; + } + + /** + * Removes the xa-datasource element + * @return the current instance of DatasourcesDescriptor + */ + public DatasourcesDescriptor removeXaDatasource() + { + model.removeChildren("xa-datasource"); + return this; + } + +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourcesTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourcesTypeImpl.java new file mode 100644 index 00000000..9a248f6f --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourcesTypeImpl.java @@ -0,0 +1,151 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourcesType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriversType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DriversTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourceType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DatasourceTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourceType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.XaDatasourceTypeImpl; + +/** + * This class implements the datasourcesType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class DatasourcesTypeImpl implements Child, DatasourcesType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public DatasourcesTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public DatasourcesTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourcesType ElementName: datasources:driversType ElementType : drivers + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new drivers element with the given value will be created. + * Otherwise, the existing drivers element will be returned. + * @return a new or existing instance of DriversType> + */ + public DriversType> getOrCreateDrivers() + { + Node node = childNode.getOrCreate("drivers"); + DriversType> drivers = new DriversTypeImpl>(this, "drivers", childNode, node); + return drivers; + } + + /** + * Removes the drivers element + * @return the current instance of DatasourcesType + */ + public DatasourcesType removeDrivers() + { + childNode.removeChildren("drivers"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourcesType ElementName: datasources:datasourceType ElementType : datasource + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new datasource element with the given value will be created. + * Otherwise, the existing datasource element will be returned. + * @return a new or existing instance of DatasourceType> + */ + public DatasourceType> getOrCreateDatasource() + { + Node node = childNode.getOrCreate("datasource"); + DatasourceType> datasource = new DatasourceTypeImpl>(this, "datasource", childNode, node); + return datasource; + } + + /** + * Removes the datasource element + * @return the current instance of DatasourcesType + */ + public DatasourcesType removeDatasource() + { + childNode.removeChildren("datasource"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DatasourcesType ElementName: datasources:xa-datasourceType ElementType : xa-datasource + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new xa-datasource element with the given value will be created. + * Otherwise, the existing xa-datasource element will be returned. + * @return a new or existing instance of XaDatasourceType> + */ + public XaDatasourceType> getOrCreateXaDatasource() + { + Node node = childNode.getOrCreate("xa-datasource"); + XaDatasourceType> xaDatasource = new XaDatasourceTypeImpl>(this, "xa-datasource", childNode, node); + return xaDatasource; + } + + /** + * Removes the xa-datasource element + * @return the current instance of DatasourcesType + */ + public DatasourcesType removeXaDatasource() + { + childNode.removeChildren("xa-datasource"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DriverTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DriverTypeImpl.java new file mode 100644 index 00000000..05407675 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DriverTypeImpl.java @@ -0,0 +1,313 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriverType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the driverType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class DriverTypeImpl implements Child, DriverType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public DriverTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public DriverTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:token ElementType : driver-class + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the driver-class element + * @param driverClass the value for the element driver-class + * @return the current instance of DriverType + */ + public DriverType driverClass(String driverClass) + { + childNode.getOrCreate("driver-class").text(driverClass); + return this; + } + + /** + * Returns the driver-class element + * @return the node defined for the element driver-class + */ + public String getDriverClass() + { + return childNode.getTextValueForPatternName("driver-class"); + } + + /** + * Removes the driver-class element + * @return the current instance of DriverType + */ + public DriverType removeDriverClass() + { + childNode.removeChildren("driver-class"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:token ElementType : datasource-class + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the datasource-class element + * @param datasourceClass the value for the element datasource-class + * @return the current instance of DriverType + */ + public DriverType datasourceClass(String datasourceClass) + { + childNode.getOrCreate("datasource-class").text(datasourceClass); + return this; + } + + /** + * Returns the datasource-class element + * @return the node defined for the element datasource-class + */ + public String getDatasourceClass() + { + return childNode.getTextValueForPatternName("datasource-class"); + } + + /** + * Removes the datasource-class element + * @return the current instance of DriverType + */ + public DriverType removeDatasourceClass() + { + childNode.removeChildren("datasource-class"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:token ElementType : xa-datasource-class + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the xa-datasource-class element + * @param xaDatasourceClass the value for the element xa-datasource-class + * @return the current instance of DriverType + */ + public DriverType xaDatasourceClass(String xaDatasourceClass) + { + childNode.getOrCreate("xa-datasource-class").text(xaDatasourceClass); + return this; + } + + /** + * Returns the xa-datasource-class element + * @return the node defined for the element xa-datasource-class + */ + public String getXaDatasourceClass() + { + return childNode.getTextValueForPatternName("xa-datasource-class"); + } + + /** + * Removes the xa-datasource-class element + * @return the current instance of DriverType + */ + public DriverType removeXaDatasourceClass() + { + childNode.removeChildren("xa-datasource-class"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:token ElementType : name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the name attribute + * @param name the value for the attribute name + * @return the current instance of DriverType + */ + public DriverType name(String name) + { + childNode.attribute("name", name); + return this; + } + + /** + * Returns the name attribute + * @return the value defined for the attribute name + */ + public String getName() + { + return childNode.getAttribute("name"); + } + + /** + * Removes the name attribute + * @return the current instance of DriverType + */ + public DriverType removeName() + { + childNode.removeAttribute("name"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:token ElementType : module + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the module attribute + * @param module the value for the attribute module + * @return the current instance of DriverType + */ + public DriverType module(String module) + { + childNode.attribute("module", module); + return this; + } + + /** + * Returns the module attribute + * @return the value defined for the attribute module + */ + public String getModule() + { + return childNode.getAttribute("module"); + } + + /** + * Removes the module attribute + * @return the current instance of DriverType + */ + public DriverType removeModule() + { + childNode.removeAttribute("module"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:int ElementType : major-version + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the major-version attribute + * @param majorVersion the value for the attribute major-version + * @return the current instance of DriverType + */ + public DriverType majorVersion( majorVersion) + { + childNode.attribute("major-version", majorVersion); + return this; + } + + /** + * Returns the major-version attribute + * @return the value defined for the attribute major-version + */ + public getMajorVersion() + { + return childNode.getAttribute("major-version"); + } + + /** + * Removes the major-version attribute + * @return the current instance of DriverType + */ + public DriverType removeMajorVersion() + { + childNode.removeAttribute("major-version"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriverType ElementName: xsd:int ElementType : minor-verion + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the minor-verion attribute + * @param minorVerion the value for the attribute minor-verion + * @return the current instance of DriverType + */ + public DriverType minorVerion( minorVerion) + { + childNode.attribute("minor-verion", minorVerion); + return this; + } + + /** + * Returns the minor-verion attribute + * @return the value defined for the attribute minor-verion + */ + public getMinorVerion() + { + return childNode.getAttribute("minor-verion"); + } + + /** + * Removes the minor-verion attribute + * @return the current instance of DriverType + */ + public DriverType removeMinorVerion() + { + childNode.removeAttribute("minor-verion"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DriversTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DriversTypeImpl.java new file mode 100644 index 00000000..8c1f03e3 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DriversTypeImpl.java @@ -0,0 +1,119 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriversType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriverType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DriverTypeImpl; + +/** + * This class implements the driversType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class DriversTypeImpl implements Child, DriversType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public DriversTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public DriversTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DriversType ElementName: datasources:driverType ElementType : driver + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new driver element will be created and returned. + * Otherwise, the first existing driver element will be returned. + * @return the instance defined for the element driver + */ + public DriverType> getOrCreateDriver() + { + List nodeList = childNode.get("driver"); + if (nodeList != null && nodeList.size() > 1) + { + return new DriverTypeImpl>(this, "driver", childNode, nodeList.get(0)); + } + return createDriver(); + } + + /** + * Creates a new driver element + * @return the new created instance of DriverType> + */ + public DriverType> createDriver() + { + return new DriverTypeImpl>(this, "driver", childNode); + } + + /** + * Returns all driver elements + * @return list of driver + */ + public List>> getAllDriver() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("driver"); + for(Node node: nodeList) + { + DriverType> type = new DriverTypeImpl>(this, "driver", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all driver elements + * @return the current instance of DriverType> + */ + public DriversType removeAllDriver() + { + childNode.removeChildren("driver"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DsSecurityTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DsSecurityTypeImpl.java new file mode 100644 index 00000000..cb617a28 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DsSecurityTypeImpl.java @@ -0,0 +1,199 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DsSecurityType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ExtensionTypeImpl; + +/** + * This class implements the dsSecurityType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class DsSecurityTypeImpl implements Child, DsSecurityType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public DsSecurityTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public DsSecurityTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DsSecurityType ElementName: xsd:token ElementType : user-name + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the user-name element + * @param userName the value for the element user-name + * @return the current instance of DsSecurityType + */ + public DsSecurityType userName(String userName) + { + childNode.getOrCreate("user-name").text(userName); + return this; + } + + /** + * Returns the user-name element + * @return the node defined for the element user-name + */ + public String getUserName() + { + return childNode.getTextValueForPatternName("user-name"); + } + + /** + * Removes the user-name element + * @return the current instance of DsSecurityType + */ + public DsSecurityType removeUserName() + { + childNode.removeChildren("user-name"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DsSecurityType ElementName: xsd:token ElementType : password + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the password element + * @param password the value for the element password + * @return the current instance of DsSecurityType + */ + public DsSecurityType password(String password) + { + childNode.getOrCreate("password").text(password); + return this; + } + + /** + * Returns the password element + * @return the node defined for the element password + */ + public String getPassword() + { + return childNode.getTextValueForPatternName("password"); + } + + /** + * Removes the password element + * @return the current instance of DsSecurityType + */ + public DsSecurityType removePassword() + { + childNode.removeChildren("password"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DsSecurityType ElementName: xsd:token ElementType : security-domain + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain element + * @param securityDomain the value for the element security-domain + * @return the current instance of DsSecurityType + */ + public DsSecurityType securityDomain(String securityDomain) + { + childNode.getOrCreate("security-domain").text(securityDomain); + return this; + } + + /** + * Returns the security-domain element + * @return the node defined for the element security-domain + */ + public String getSecurityDomain() + { + return childNode.getTextValueForPatternName("security-domain"); + } + + /** + * Removes the security-domain element + * @return the current instance of DsSecurityType + */ + public DsSecurityType removeSecurityDomain() + { + childNode.removeChildren("security-domain"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: DsSecurityType ElementName: datasources:extensionType ElementType : reauth-plugin + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new reauth-plugin element with the given value will be created. + * Otherwise, the existing reauth-plugin element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateReauthPlugin() + { + Node node = childNode.getOrCreate("reauth-plugin"); + ExtensionType> reauthPlugin = new ExtensionTypeImpl>(this, "reauth-plugin", childNode, node); + return reauthPlugin; + } + + /** + * Removes the reauth-plugin element + * @return the current instance of DsSecurityType + */ + public DsSecurityType removeReauthPlugin() + { + childNode.removeChildren("reauth-plugin"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ExtensionTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ExtensionTypeImpl.java new file mode 100644 index 00000000..63363886 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ExtensionTypeImpl.java @@ -0,0 +1,155 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ConfigPropertyTypeImpl; + +/** + * This class implements the extensionType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ExtensionTypeImpl implements Child, ExtensionType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ExtensionTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ExtensionTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ExtensionType ElementName: datasources:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty() + { + List nodeList = childNode.get("config-property"); + if (nodeList != null && nodeList.size() > 1) + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode, nodeList.get(0)); + } + return createConfigProperty(); + } + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty() + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode); + } + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("config-property"); + for(Node node: nodeList) + { + ConfigPropertyType> type = new ConfigPropertyTypeImpl>(this, "config-property", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public ExtensionType removeAllConfigProperty() + { + childNode.removeChildren("config-property"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ExtensionType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of ExtensionType + */ + public ExtensionType className(String className) + { + childNode.attribute("class-name", className); + return this; + } + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ + public String getClassName() + { + return childNode.getAttribute("class-name"); + } + + /** + * Removes the class-name attribute + * @return the current instance of ExtensionType + */ + public ExtensionType removeClassName() + { + childNode.removeAttribute("class-name"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/PoolTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/PoolTypeImpl.java new file mode 100644 index 00000000..6416140a --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/PoolTypeImpl.java @@ -0,0 +1,247 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.PoolType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the poolType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class PoolTypeImpl implements Child, PoolType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public PoolTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public PoolTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:nonNegativeInteger ElementType : min-pool-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the min-pool-size element + * @param minPoolSize the value for the element min-pool-size + * @return the current instance of PoolType + */ + public PoolType minPoolSize(Integer minPoolSize) + { + childNode.getOrCreate("min-pool-size").text(minPoolSize); + return this; + } + + /** + * Returns the min-pool-size element + * @return the node defined for the element min-pool-size + */ + public Integer getMinPoolSize() + { + if (childNode.getTextValueForPatternName("min-pool-size") != null && !childNode.getTextValueForPatternName("min-pool-size").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("min-pool-size")); + } + return null; + } + + /** + * Removes the min-pool-size element + * @return the current instance of PoolType + */ + public PoolType removeMinPoolSize() + { + childNode.removeChildren("min-pool-size"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:nonNegativeInteger ElementType : max-pool-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the max-pool-size element + * @param maxPoolSize the value for the element max-pool-size + * @return the current instance of PoolType + */ + public PoolType maxPoolSize(Integer maxPoolSize) + { + childNode.getOrCreate("max-pool-size").text(maxPoolSize); + return this; + } + + /** + * Returns the max-pool-size element + * @return the node defined for the element max-pool-size + */ + public Integer getMaxPoolSize() + { + if (childNode.getTextValueForPatternName("max-pool-size") != null && !childNode.getTextValueForPatternName("max-pool-size").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("max-pool-size")); + } + return null; + } + + /** + * Removes the max-pool-size element + * @return the current instance of PoolType + */ + public PoolType removeMaxPoolSize() + { + childNode.removeChildren("max-pool-size"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:boolean ElementType : prefill + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the prefill element + * @param prefill the value for the element prefill + * @return the current instance of PoolType + */ + public PoolType prefill(Boolean prefill) + { + childNode.getOrCreate("prefill").text(prefill); + return this; + } + + /** + * Returns the prefill element + * @return the node defined for the element prefill + */ + public Boolean isPrefill() + { + return Strings.isTrue(childNode.getTextValueForPatternName("prefill")); + } + + /** + * Removes the prefill element + * @return the current instance of PoolType + */ + public PoolType removePrefill() + { + childNode.removeChildren("prefill"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:boolean ElementType : use-strict-min + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-strict-min element + * @param useStrictMin the value for the element use-strict-min + * @return the current instance of PoolType + */ + public PoolType useStrictMin(Boolean useStrictMin) + { + childNode.getOrCreate("use-strict-min").text(useStrictMin); + return this; + } + + /** + * Returns the use-strict-min element + * @return the node defined for the element use-strict-min + */ + public Boolean isUseStrictMin() + { + return Strings.isTrue(childNode.getTextValueForPatternName("use-strict-min")); + } + + /** + * Removes the use-strict-min element + * @return the current instance of PoolType + */ + public PoolType removeUseStrictMin() + { + childNode.removeChildren("use-strict-min"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:token ElementType : flush-strategy + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the flush-strategy element + * @param flushStrategy the value for the element flush-strategy + * @return the current instance of PoolType + */ + public PoolType flushStrategy(String flushStrategy) + { + childNode.getOrCreate("flush-strategy").text(flushStrategy); + return this; + } + + /** + * Returns the flush-strategy element + * @return the node defined for the element flush-strategy + */ + public String getFlushStrategy() + { + return childNode.getTextValueForPatternName("flush-strategy"); + } + + /** + * Removes the flush-strategy element + * @return the current instance of PoolType + */ + public PoolType removeFlushStrategy() + { + childNode.removeChildren("flush-strategy"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/RecoverTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/RecoverTypeImpl.java new file mode 100644 index 00000000..fbc3a52d --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/RecoverTypeImpl.java @@ -0,0 +1,157 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.RecoverType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DsSecurityType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DsSecurityTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ExtensionTypeImpl; + +/** + * This class implements the recoverType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class RecoverTypeImpl implements Child, RecoverType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public RecoverTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public RecoverTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: datasources:dsSecurityType ElementType : recover-credential + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recover-credential element with the given value will be created. + * Otherwise, the existing recover-credential element will be returned. + * @return a new or existing instance of DsSecurityType> + */ + public DsSecurityType> getOrCreateRecoverCredential() + { + Node node = childNode.getOrCreate("recover-credential"); + DsSecurityType> recoverCredential = new DsSecurityTypeImpl>(this, "recover-credential", childNode, node); + return recoverCredential; + } + + /** + * Removes the recover-credential element + * @return the current instance of RecoverType + */ + public RecoverType removeRecoverCredential() + { + childNode.removeChildren("recover-credential"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: datasources:extensionType ElementType : recover-plugin + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recover-plugin element with the given value will be created. + * Otherwise, the existing recover-plugin element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateRecoverPlugin() + { + Node node = childNode.getOrCreate("recover-plugin"); + ExtensionType> recoverPlugin = new ExtensionTypeImpl>(this, "recover-plugin", childNode, node); + return recoverPlugin; + } + + /** + * Removes the recover-plugin element + * @return the current instance of RecoverType + */ + public RecoverType removeRecoverPlugin() + { + childNode.removeChildren("recover-plugin"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: xsd:boolean ElementType : no-recovery + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the no-recovery attribute + * @param noRecovery the value for the attribute no-recovery + * @return the current instance of RecoverType + */ + public RecoverType noRecovery(Boolean noRecovery) + { + childNode.attribute("no-recovery", noRecovery); + return this; + } + + /** + * Returns the no-recovery attribute + * @return the value defined for the attribute no-recovery + */ + public Boolean isNoRecovery() + { + return Strings.isTrue(childNode.getAttribute("no-recovery")); + } + + /** + * Removes the no-recovery attribute + * @return the current instance of RecoverType + */ + public RecoverType removeNoRecovery() + { + childNode.removeAttribute("no-recovery"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/StatementTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/StatementTypeImpl.java new file mode 100644 index 00000000..ac1373a2 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/StatementTypeImpl.java @@ -0,0 +1,190 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.StatementType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TrackStatementsType; + +/** + * This class implements the statementType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class StatementTypeImpl implements Child, StatementType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public StatementTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public StatementTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: StatementType ElementName: datasources:track-statementsType ElementType : track-statements + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: true isDataType: false + // --------------------------------------------------------------------------------------------------------|| + /** + * Sets the track-statements element + * @param trackStatements the value for the element track-statements + * @return the current instance of StatementType + */ + public StatementType trackStatements(TrackStatementsType trackStatements) + { + childNode.getOrCreate("track-statements").text(trackStatements); + return this; + } + /** + * Sets the track-statements element + * @param trackStatements the value for the element track-statements + * @return the current instance of StatementType + */ + public StatementType trackStatements(String trackStatements) + { + childNode.getOrCreate("track-statements").text(trackStatements); + return this; + } + + /** + * Returns the track-statements element + * @return the value found for the element track-statements + */ + public TrackStatementsType getTrackStatements() + { + return TrackStatementsType.getFromStringValue(childNode.getTextValueForPatternName("track-statements")); + } + + /** + * Returns the track-statements element + * @return the value found for the element track-statements + */ + public String getTrackStatementsAsString() + { + return childNode.getTextValueForPatternName("track-statements"); + } + + /** + * Removes the track-statements attribute + * @return the current instance of StatementType + */ + public StatementType removeTrackStatements() + { + childNode.removeAttribute("track-statements"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: StatementType ElementName: xsd:nonNegativeInteger ElementType : prepared-statement-cache-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the prepared-statement-cache-size element + * @param preparedStatementCacheSize the value for the element prepared-statement-cache-size + * @return the current instance of StatementType + */ + public StatementType preparedStatementCacheSize(Integer preparedStatementCacheSize) + { + childNode.getOrCreate("prepared-statement-cache-size").text(preparedStatementCacheSize); + return this; + } + + /** + * Returns the prepared-statement-cache-size element + * @return the node defined for the element prepared-statement-cache-size + */ + public Integer getPreparedStatementCacheSize() + { + if (childNode.getTextValueForPatternName("prepared-statement-cache-size") != null && !childNode.getTextValueForPatternName("prepared-statement-cache-size").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("prepared-statement-cache-size")); + } + return null; + } + + /** + * Removes the prepared-statement-cache-size element + * @return the current instance of StatementType + */ + public StatementType removePreparedStatementCacheSize() + { + childNode.removeChildren("prepared-statement-cache-size"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: StatementType ElementName: javaee:emptyType ElementType : share-prepared-statements + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the share-prepared-statements element + * @return the current instance of StatementType + */ + public StatementType sharePreparedStatements() + { + childNode.getOrCreate("share-prepared-statements"); + return this; + } + + /** + * Removes the share-prepared-statements element + * @return the current instance of StatementType + */ + public Boolean isSharePreparedStatements() + { + return childNode.getSingle("share-prepared-statements") != null; + } + + /** + * Removes the share-prepared-statements element + * @return the current instance of StatementType + */ + public StatementType removeSharePreparedStatements() + { + childNode.removeChild("share-prepared-statements"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/TimeoutTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/TimeoutTypeImpl.java new file mode 100644 index 00000000..c03f612e --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/TimeoutTypeImpl.java @@ -0,0 +1,366 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TimeoutType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the timeoutType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class TimeoutTypeImpl implements Child, TimeoutType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public TimeoutTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public TimeoutTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : blocking-timeout-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the blocking-timeout-millis element + * @param blockingTimeoutMillis the value for the element blocking-timeout-millis + * @return the current instance of TimeoutType + */ + public TimeoutType blockingTimeoutMillis(Integer blockingTimeoutMillis) + { + childNode.getOrCreate("blocking-timeout-millis").text(blockingTimeoutMillis); + return this; + } + + /** + * Returns the blocking-timeout-millis element + * @return the node defined for the element blocking-timeout-millis + */ + public Integer getBlockingTimeoutMillis() + { + if (childNode.getTextValueForPatternName("blocking-timeout-millis") != null && !childNode.getTextValueForPatternName("blocking-timeout-millis").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("blocking-timeout-millis")); + } + return null; + } + + /** + * Removes the blocking-timeout-millis element + * @return the current instance of TimeoutType + */ + public TimeoutType removeBlockingTimeoutMillis() + { + childNode.removeChildren("blocking-timeout-millis"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : idle-timeout-minutes + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the idle-timeout-minutes element + * @param idleTimeoutMinutes the value for the element idle-timeout-minutes + * @return the current instance of TimeoutType + */ + public TimeoutType idleTimeoutMinutes(Integer idleTimeoutMinutes) + { + childNode.getOrCreate("idle-timeout-minutes").text(idleTimeoutMinutes); + return this; + } + + /** + * Returns the idle-timeout-minutes element + * @return the node defined for the element idle-timeout-minutes + */ + public Integer getIdleTimeoutMinutes() + { + if (childNode.getTextValueForPatternName("idle-timeout-minutes") != null && !childNode.getTextValueForPatternName("idle-timeout-minutes").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("idle-timeout-minutes")); + } + return null; + } + + /** + * Removes the idle-timeout-minutes element + * @return the current instance of TimeoutType + */ + public TimeoutType removeIdleTimeoutMinutes() + { + childNode.removeChildren("idle-timeout-minutes"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: javaee:emptyType ElementType : set-tx-query-timeout + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the set-tx-query-timeout element + * @return the current instance of TimeoutType + */ + public TimeoutType setTxQueryTimeout() + { + childNode.getOrCreate("set-tx-query-timeout"); + return this; + } + + /** + * Removes the set-tx-query-timeout element + * @return the current instance of TimeoutType + */ + public Boolean isSetTxQueryTimeout() + { + return childNode.getSingle("set-tx-query-timeout") != null; + } + + /** + * Removes the set-tx-query-timeout element + * @return the current instance of TimeoutType + */ + public TimeoutType removeSetTxQueryTimeout() + { + childNode.removeChild("set-tx-query-timeout"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : query-timeout + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the query-timeout element + * @param queryTimeout the value for the element query-timeout + * @return the current instance of TimeoutType + */ + public TimeoutType queryTimeout(Integer queryTimeout) + { + childNode.getOrCreate("query-timeout").text(queryTimeout); + return this; + } + + /** + * Returns the query-timeout element + * @return the node defined for the element query-timeout + */ + public Integer getQueryTimeout() + { + if (childNode.getTextValueForPatternName("query-timeout") != null && !childNode.getTextValueForPatternName("query-timeout").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("query-timeout")); + } + return null; + } + + /** + * Removes the query-timeout element + * @return the current instance of TimeoutType + */ + public TimeoutType removeQueryTimeout() + { + childNode.removeChildren("query-timeout"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : use-try-lock + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-try-lock element + * @param useTryLock the value for the element use-try-lock + * @return the current instance of TimeoutType + */ + public TimeoutType useTryLock(Integer useTryLock) + { + childNode.getOrCreate("use-try-lock").text(useTryLock); + return this; + } + + /** + * Returns the use-try-lock element + * @return the node defined for the element use-try-lock + */ + public Integer getUseTryLock() + { + if (childNode.getTextValueForPatternName("use-try-lock") != null && !childNode.getTextValueForPatternName("use-try-lock").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("use-try-lock")); + } + return null; + } + + /** + * Removes the use-try-lock element + * @return the current instance of TimeoutType + */ + public TimeoutType removeUseTryLock() + { + childNode.removeChildren("use-try-lock"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : allocation-retry + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the allocation-retry element + * @param allocationRetry the value for the element allocation-retry + * @return the current instance of TimeoutType + */ + public TimeoutType allocationRetry(Integer allocationRetry) + { + childNode.getOrCreate("allocation-retry").text(allocationRetry); + return this; + } + + /** + * Returns the allocation-retry element + * @return the node defined for the element allocation-retry + */ + public Integer getAllocationRetry() + { + if (childNode.getTextValueForPatternName("allocation-retry") != null && !childNode.getTextValueForPatternName("allocation-retry").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("allocation-retry")); + } + return null; + } + + /** + * Removes the allocation-retry element + * @return the current instance of TimeoutType + */ + public TimeoutType removeAllocationRetry() + { + childNode.removeChildren("allocation-retry"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : allocation-retry-wait-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the allocation-retry-wait-millis element + * @param allocationRetryWaitMillis the value for the element allocation-retry-wait-millis + * @return the current instance of TimeoutType + */ + public TimeoutType allocationRetryWaitMillis(Integer allocationRetryWaitMillis) + { + childNode.getOrCreate("allocation-retry-wait-millis").text(allocationRetryWaitMillis); + return this; + } + + /** + * Returns the allocation-retry-wait-millis element + * @return the node defined for the element allocation-retry-wait-millis + */ + public Integer getAllocationRetryWaitMillis() + { + if (childNode.getTextValueForPatternName("allocation-retry-wait-millis") != null && !childNode.getTextValueForPatternName("allocation-retry-wait-millis").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("allocation-retry-wait-millis")); + } + return null; + } + + /** + * Removes the allocation-retry-wait-millis element + * @return the current instance of TimeoutType + */ + public TimeoutType removeAllocationRetryWaitMillis() + { + childNode.removeChildren("allocation-retry-wait-millis"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:token ElementType : xa-resource-timeout + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the xa-resource-timeout element + * @param xaResourceTimeout the value for the element xa-resource-timeout + * @return the current instance of TimeoutType + */ + public TimeoutType xaResourceTimeout(String xaResourceTimeout) + { + childNode.getOrCreate("xa-resource-timeout").text(xaResourceTimeout); + return this; + } + + /** + * Returns the xa-resource-timeout element + * @return the node defined for the element xa-resource-timeout + */ + public String getXaResourceTimeout() + { + return childNode.getTextValueForPatternName("xa-resource-timeout"); + } + + /** + * Removes the xa-resource-timeout element + * @return the current instance of TimeoutType + */ + public TimeoutType removeXaResourceTimeout() + { + childNode.removeChildren("xa-resource-timeout"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ValidationTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ValidationTypeImpl.java new file mode 100644 index 00000000..a3b76456 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ValidationTypeImpl.java @@ -0,0 +1,334 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ValidationType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ExtensionTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ExtensionTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ExtensionTypeImpl; + +/** + * This class implements the validationType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ValidationTypeImpl implements Child, ValidationType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ValidationTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ValidationTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: datasources:extensionType ElementType : valid-connection-checker + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new valid-connection-checker element with the given value will be created. + * Otherwise, the existing valid-connection-checker element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateValidConnectionChecker() + { + Node node = childNode.getOrCreate("valid-connection-checker"); + ExtensionType> validConnectionChecker = new ExtensionTypeImpl>(this, "valid-connection-checker", childNode, node); + return validConnectionChecker; + } + + /** + * Removes the valid-connection-checker element + * @return the current instance of ValidationType + */ + public ValidationType removeValidConnectionChecker() + { + childNode.removeChildren("valid-connection-checker"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:string ElementType : check-valid-connection-sql + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the check-valid-connection-sql element + * @param checkValidConnectionSql the value for the element check-valid-connection-sql + * @return the current instance of ValidationType + */ + public ValidationType checkValidConnectionSql(String checkValidConnectionSql) + { + childNode.getOrCreate("check-valid-connection-sql").text(checkValidConnectionSql); + return this; + } + + /** + * Returns the check-valid-connection-sql element + * @return the node defined for the element check-valid-connection-sql + */ + public String getCheckValidConnectionSql() + { + return childNode.getTextValueForPatternName("check-valid-connection-sql"); + } + + /** + * Removes the check-valid-connection-sql element + * @return the current instance of ValidationType + */ + public ValidationType removeCheckValidConnectionSql() + { + childNode.removeChildren("check-valid-connection-sql"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : validate-on-match + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the validate-on-match element + * @param validateOnMatch the value for the element validate-on-match + * @return the current instance of ValidationType + */ + public ValidationType validateOnMatch(Boolean validateOnMatch) + { + childNode.getOrCreate("validate-on-match").text(validateOnMatch); + return this; + } + + /** + * Returns the validate-on-match element + * @return the node defined for the element validate-on-match + */ + public Boolean isValidateOnMatch() + { + return Strings.isTrue(childNode.getTextValueForPatternName("validate-on-match")); + } + + /** + * Removes the validate-on-match element + * @return the current instance of ValidationType + */ + public ValidationType removeValidateOnMatch() + { + childNode.removeChildren("validate-on-match"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : background-validation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the background-validation element + * @param backgroundValidation the value for the element background-validation + * @return the current instance of ValidationType + */ + public ValidationType backgroundValidation(Boolean backgroundValidation) + { + childNode.getOrCreate("background-validation").text(backgroundValidation); + return this; + } + + /** + * Returns the background-validation element + * @return the node defined for the element background-validation + */ + public Boolean isBackgroundValidation() + { + return Strings.isTrue(childNode.getTextValueForPatternName("background-validation")); + } + + /** + * Removes the background-validation element + * @return the current instance of ValidationType + */ + public ValidationType removeBackgroundValidation() + { + childNode.removeChildren("background-validation"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:nonNegativeInteger ElementType : background-validation-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the background-validation-millis element + * @param backgroundValidationMillis the value for the element background-validation-millis + * @return the current instance of ValidationType + */ + public ValidationType backgroundValidationMillis(Integer backgroundValidationMillis) + { + childNode.getOrCreate("background-validation-millis").text(backgroundValidationMillis); + return this; + } + + /** + * Returns the background-validation-millis element + * @return the node defined for the element background-validation-millis + */ + public Integer getBackgroundValidationMillis() + { + if (childNode.getTextValueForPatternName("background-validation-millis") != null && !childNode.getTextValueForPatternName("background-validation-millis").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("background-validation-millis")); + } + return null; + } + + /** + * Removes the background-validation-millis element + * @return the current instance of ValidationType + */ + public ValidationType removeBackgroundValidationMillis() + { + childNode.removeChildren("background-validation-millis"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : use-fast-fail + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-fast-fail element + * @param useFastFail the value for the element use-fast-fail + * @return the current instance of ValidationType + */ + public ValidationType useFastFail(Boolean useFastFail) + { + childNode.getOrCreate("use-fast-fail").text(useFastFail); + return this; + } + + /** + * Returns the use-fast-fail element + * @return the node defined for the element use-fast-fail + */ + public Boolean isUseFastFail() + { + return Strings.isTrue(childNode.getTextValueForPatternName("use-fast-fail")); + } + + /** + * Removes the use-fast-fail element + * @return the current instance of ValidationType + */ + public ValidationType removeUseFastFail() + { + childNode.removeChildren("use-fast-fail"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: datasources:extensionType ElementType : stale-connection-checker + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new stale-connection-checker element with the given value will be created. + * Otherwise, the existing stale-connection-checker element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateStaleConnectionChecker() + { + Node node = childNode.getOrCreate("stale-connection-checker"); + ExtensionType> staleConnectionChecker = new ExtensionTypeImpl>(this, "stale-connection-checker", childNode, node); + return staleConnectionChecker; + } + + /** + * Removes the stale-connection-checker element + * @return the current instance of ValidationType + */ + public ValidationType removeStaleConnectionChecker() + { + childNode.removeChildren("stale-connection-checker"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: datasources:extensionType ElementType : exception-sorter + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new exception-sorter element with the given value will be created. + * Otherwise, the existing exception-sorter element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateExceptionSorter() + { + Node node = childNode.getOrCreate("exception-sorter"); + ExtensionType> exceptionSorter = new ExtensionTypeImpl>(this, "exception-sorter", childNode, node); + return exceptionSorter; + } + + /** + * Removes the exception-sorter element + * @return the current instance of ValidationType + */ + public ValidationType removeExceptionSorter() + { + childNode.removeChildren("exception-sorter"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaDatasourcePropertyTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaDatasourcePropertyTypeImpl.java new file mode 100644 index 00000000..00a6a300 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaDatasourcePropertyTypeImpl.java @@ -0,0 +1,97 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourcePropertyType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the xa-datasource-propertyType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class XaDatasourcePropertyTypeImpl implements Child, XaDatasourcePropertyType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public XaDatasourcePropertyTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public XaDatasourcePropertyTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourcePropertyType ElementName: xsd:token ElementType : name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the name attribute + * @param name the value for the attribute name + * @return the current instance of XaDatasourcePropertyType + */ + public XaDatasourcePropertyType name(String name) + { + childNode.attribute("name", name); + return this; + } + + /** + * Returns the name attribute + * @return the value defined for the attribute name + */ + public String getName() + { + return childNode.getAttribute("name"); + } + + /** + * Removes the name attribute + * @return the current instance of XaDatasourcePropertyType + */ + public XaDatasourcePropertyType removeName() + { + childNode.removeAttribute("name"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaDatasourceTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaDatasourceTypeImpl.java new file mode 100644 index 00000000..4075ef53 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaDatasourceTypeImpl.java @@ -0,0 +1,744 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourceType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourcePropertyType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.XaDatasourcePropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TransactionIsolationType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaPoolType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.XaPoolTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DsSecurityType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DsSecurityTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ValidationType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ValidationTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TimeoutType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.TimeoutTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.StatementType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.StatementTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.RecoverType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.RecoverTypeImpl; + +/** + * This class implements the xa-datasourceType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class XaDatasourceTypeImpl implements Child, XaDatasourceType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public XaDatasourceTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public XaDatasourceTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:token ElementType : jndi-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jndi-name attribute + * @param jndiName the value for the attribute jndi-name + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType jndiName(String jndiName) + { + childNode.attribute("jndi-name", jndiName); + return this; + } + + /** + * Returns the jndi-name attribute + * @return the value defined for the attribute jndi-name + */ + public String getJndiName() + { + return childNode.getAttribute("jndi-name"); + } + + /** + * Removes the jndi-name attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeJndiName() + { + childNode.removeAttribute("jndi-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:token ElementType : pool-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pool-name attribute + * @param poolName the value for the attribute pool-name + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType poolName(String poolName) + { + childNode.attribute("pool-name", poolName); + return this; + } + + /** + * Returns the pool-name attribute + * @return the value defined for the attribute pool-name + */ + public String getPoolName() + { + return childNode.getAttribute("pool-name"); + } + + /** + * Removes the pool-name attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removePoolName() + { + childNode.removeAttribute("pool-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:boolean ElementType : enabled + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the enabled attribute + * @param enabled the value for the attribute enabled + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType enabled(Boolean enabled) + { + childNode.attribute("enabled", enabled); + return this; + } + + /** + * Returns the enabled attribute + * @return the value defined for the attribute enabled + */ + public Boolean isEnabled() + { + return Strings.isTrue(childNode.getAttribute("enabled")); + } + + /** + * Removes the enabled attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeEnabled() + { + childNode.removeAttribute("enabled"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:boolean ElementType : use-java-context + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-java-context attribute + * @param useJavaContext the value for the attribute use-java-context + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType useJavaContext(Boolean useJavaContext) + { + childNode.attribute("use-java-context", useJavaContext); + return this; + } + + /** + * Returns the use-java-context attribute + * @return the value defined for the attribute use-java-context + */ + public Boolean isUseJavaContext() + { + return Strings.isTrue(childNode.getAttribute("use-java-context")); + } + + /** + * Removes the use-java-context attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeUseJavaContext() + { + childNode.removeAttribute("use-java-context"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:boolean ElementType : spy + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the spy attribute + * @param spy the value for the attribute spy + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType spy(Boolean spy) + { + childNode.attribute("spy", spy); + return this; + } + + /** + * Returns the spy attribute + * @return the value defined for the attribute spy + */ + public Boolean isSpy() + { + return Strings.isTrue(childNode.getAttribute("spy")); + } + + /** + * Removes the spy attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeSpy() + { + childNode.removeAttribute("spy"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:boolean ElementType : use-ccm + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-ccm attribute + * @param useCcm the value for the attribute use-ccm + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType useCcm(Boolean useCcm) + { + childNode.attribute("use-ccm", useCcm); + return this; + } + + /** + * Returns the use-ccm attribute + * @return the value defined for the attribute use-ccm + */ + public Boolean isUseCcm() + { + return Strings.isTrue(childNode.getAttribute("use-ccm")); + } + + /** + * Removes the use-ccm attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeUseCcm() + { + childNode.removeAttribute("use-ccm"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:xa-datasource-propertyType ElementType : xa-datasource-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new xa-datasource-property element will be created and returned. + * Otherwise, the first existing xa-datasource-property element will be returned. + * @return the instance defined for the element xa-datasource-property + */ + public XaDatasourcePropertyType> getOrCreateXaDatasourceProperty() + { + List nodeList = childNode.get("xa-datasource-property"); + if (nodeList != null && nodeList.size() > 1) + { + return new XaDatasourcePropertyTypeImpl>(this, "xa-datasource-property", childNode, nodeList.get(0)); + } + return createXaDatasourceProperty(); + } + + /** + * Creates a new xa-datasource-property element + * @return the new created instance of XaDatasourcePropertyType> + */ + public XaDatasourcePropertyType> createXaDatasourceProperty() + { + return new XaDatasourcePropertyTypeImpl>(this, "xa-datasource-property", childNode); + } + + /** + * Returns all xa-datasource-property elements + * @return list of xa-datasource-property + */ + public List>> getAllXaDatasourceProperty() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("xa-datasource-property"); + for(Node node: nodeList) + { + XaDatasourcePropertyType> type = new XaDatasourcePropertyTypeImpl>(this, "xa-datasource-property", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all xa-datasource-property elements + * @return the current instance of XaDatasourcePropertyType> + */ + public XaDatasourceType removeAllXaDatasourceProperty() + { + childNode.removeChildren("xa-datasource-property"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:token ElementType : xa-datasource-class + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the xa-datasource-class element + * @param xaDatasourceClass the value for the element xa-datasource-class + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType xaDatasourceClass(String xaDatasourceClass) + { + childNode.getOrCreate("xa-datasource-class").text(xaDatasourceClass); + return this; + } + + /** + * Returns the xa-datasource-class element + * @return the node defined for the element xa-datasource-class + */ + public String getXaDatasourceClass() + { + return childNode.getTextValueForPatternName("xa-datasource-class"); + } + + /** + * Removes the xa-datasource-class element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeXaDatasourceClass() + { + childNode.removeChildren("xa-datasource-class"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:token ElementType : driver + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the driver element + * @param driver the value for the element driver + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType driver(String driver) + { + childNode.getOrCreate("driver").text(driver); + return this; + } + + /** + * Returns the driver element + * @return the node defined for the element driver + */ + public String getDriver() + { + return childNode.getTextValueForPatternName("driver"); + } + + /** + * Removes the driver element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeDriver() + { + childNode.removeChildren("driver"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:token ElementType : url-delimiter + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the url-delimiter element + * @param urlDelimiter the value for the element url-delimiter + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType urlDelimiter(String urlDelimiter) + { + childNode.getOrCreate("url-delimiter").text(urlDelimiter); + return this; + } + + /** + * Returns the url-delimiter element + * @return the node defined for the element url-delimiter + */ + public String getUrlDelimiter() + { + return childNode.getTextValueForPatternName("url-delimiter"); + } + + /** + * Removes the url-delimiter element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeUrlDelimiter() + { + childNode.removeChildren("url-delimiter"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:token ElementType : url-selector-strategy-class-name + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the url-selector-strategy-class-name element + * @param urlSelectorStrategyClassName the value for the element url-selector-strategy-class-name + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType urlSelectorStrategyClassName(String urlSelectorStrategyClassName) + { + childNode.getOrCreate("url-selector-strategy-class-name").text(urlSelectorStrategyClassName); + return this; + } + + /** + * Returns the url-selector-strategy-class-name element + * @return the node defined for the element url-selector-strategy-class-name + */ + public String getUrlSelectorStrategyClassName() + { + return childNode.getTextValueForPatternName("url-selector-strategy-class-name"); + } + + /** + * Removes the url-selector-strategy-class-name element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeUrlSelectorStrategyClassName() + { + childNode.removeChildren("url-selector-strategy-class-name"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: xsd:string ElementType : new-connection-sql + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the new-connection-sql element + * @param newConnectionSql the value for the element new-connection-sql + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType newConnectionSql(String newConnectionSql) + { + childNode.getOrCreate("new-connection-sql").text(newConnectionSql); + return this; + } + + /** + * Returns the new-connection-sql element + * @return the node defined for the element new-connection-sql + */ + public String getNewConnectionSql() + { + return childNode.getTextValueForPatternName("new-connection-sql"); + } + + /** + * Removes the new-connection-sql element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeNewConnectionSql() + { + childNode.removeChildren("new-connection-sql"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:transaction-isolationType ElementType : transaction-isolation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: true isDataType: false + // --------------------------------------------------------------------------------------------------------|| + /** + * Sets the transaction-isolation element + * @param transactionIsolation the value for the element transaction-isolation + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType transactionIsolation(TransactionIsolationType transactionIsolation) + { + childNode.getOrCreate("transaction-isolation").text(transactionIsolation); + return this; + } + /** + * Sets the transaction-isolation element + * @param transactionIsolation the value for the element transaction-isolation + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType transactionIsolation(String transactionIsolation) + { + childNode.getOrCreate("transaction-isolation").text(transactionIsolation); + return this; + } + + /** + * Returns the transaction-isolation element + * @return the value found for the element transaction-isolation + */ + public TransactionIsolationType getTransactionIsolation() + { + return TransactionIsolationType.getFromStringValue(childNode.getTextValueForPatternName("transaction-isolation")); + } + + /** + * Returns the transaction-isolation element + * @return the value found for the element transaction-isolation + */ + public String getTransactionIsolationAsString() + { + return childNode.getTextValueForPatternName("transaction-isolation"); + } + + /** + * Removes the transaction-isolation attribute + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeTransactionIsolation() + { + childNode.removeAttribute("transaction-isolation"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:xa-poolType ElementType : xa-pool + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new xa-pool element with the given value will be created. + * Otherwise, the existing xa-pool element will be returned. + * @return a new or existing instance of XaPoolType> + */ + public XaPoolType> getOrCreateXaPool() + { + Node node = childNode.getOrCreate("xa-pool"); + XaPoolType> xaPool = new XaPoolTypeImpl>(this, "xa-pool", childNode, node); + return xaPool; + } + + /** + * Removes the xa-pool element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeXaPool() + { + childNode.removeChildren("xa-pool"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:dsSecurityType ElementType : security + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new security element with the given value will be created. + * Otherwise, the existing security element will be returned. + * @return a new or existing instance of DsSecurityType> + */ + public DsSecurityType> getOrCreateSecurity() + { + Node node = childNode.getOrCreate("security"); + DsSecurityType> security = new DsSecurityTypeImpl>(this, "security", childNode, node); + return security; + } + + /** + * Removes the security element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeSecurity() + { + childNode.removeChildren("security"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:validationType ElementType : validation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new validation element with the given value will be created. + * Otherwise, the existing validation element will be returned. + * @return a new or existing instance of ValidationType> + */ + public ValidationType> getOrCreateValidation() + { + Node node = childNode.getOrCreate("validation"); + ValidationType> validation = new ValidationTypeImpl>(this, "validation", childNode, node); + return validation; + } + + /** + * Removes the validation element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeValidation() + { + childNode.removeChildren("validation"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:timeoutType ElementType : timeout + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new timeout element with the given value will be created. + * Otherwise, the existing timeout element will be returned. + * @return a new or existing instance of TimeoutType> + */ + public TimeoutType> getOrCreateTimeout() + { + Node node = childNode.getOrCreate("timeout"); + TimeoutType> timeout = new TimeoutTypeImpl>(this, "timeout", childNode, node); + return timeout; + } + + /** + * Removes the timeout element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeTimeout() + { + childNode.removeChildren("timeout"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:statementType ElementType : statement + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new statement element with the given value will be created. + * Otherwise, the existing statement element will be returned. + * @return a new or existing instance of StatementType> + */ + public StatementType> getOrCreateStatement() + { + Node node = childNode.getOrCreate("statement"); + StatementType> statement = new StatementTypeImpl>(this, "statement", childNode, node); + return statement; + } + + /** + * Removes the statement element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeStatement() + { + childNode.removeChildren("statement"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaDatasourceType ElementName: datasources:recoverType ElementType : recovery + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recovery element with the given value will be created. + * Otherwise, the existing recovery element will be returned. + * @return a new or existing instance of RecoverType> + */ + public RecoverType> getOrCreateRecovery() + { + Node node = childNode.getOrCreate("recovery"); + RecoverType> recovery = new RecoverTypeImpl>(this, "recovery", childNode, node); + return recovery; + } + + /** + * Removes the recovery element + * @return the current instance of XaDatasourceType + */ + public XaDatasourceType removeRecovery() + { + childNode.removeChildren("recovery"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaPoolTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaPoolTypeImpl.java new file mode 100644 index 00000000..31f12dad --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaPoolTypeImpl.java @@ -0,0 +1,239 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaPoolType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the xa-poolType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class XaPoolTypeImpl implements Child, XaPoolType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public XaPoolTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public XaPoolTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : is-same-rm-override + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the is-same-rm-override element + * @param isSameRmOverride the value for the element is-same-rm-override + * @return the current instance of XaPoolType + */ + public XaPoolType isSameRmOverride(Boolean isSameRmOverride) + { + childNode.getOrCreate("is-same-rm-override").text(isSameRmOverride); + return this; + } + + /** + * Returns the is-same-rm-override element + * @return the node defined for the element is-same-rm-override + */ + public Boolean isIsSameRmOverride() + { + return Strings.isTrue(childNode.getTextValueForPatternName("is-same-rm-override")); + } + + /** + * Removes the is-same-rm-override element + * @return the current instance of XaPoolType + */ + public XaPoolType removeIsSameRmOverride() + { + childNode.removeChildren("is-same-rm-override"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: javaee:emptyType ElementType : interleaving + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the interleaving element + * @return the current instance of XaPoolType + */ + public XaPoolType interleaving() + { + childNode.getOrCreate("interleaving"); + return this; + } + + /** + * Removes the interleaving element + * @return the current instance of XaPoolType + */ + public Boolean isInterleaving() + { + return childNode.getSingle("interleaving") != null; + } + + /** + * Removes the interleaving element + * @return the current instance of XaPoolType + */ + public XaPoolType removeInterleaving() + { + childNode.removeChild("interleaving"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: javaee:emptyType ElementType : no-tx-separate-pools + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public XaPoolType noTxSeparatePools() + { + childNode.getOrCreate("no-tx-separate-pools"); + return this; + } + + /** + * Removes the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public Boolean isNoTxSeparatePools() + { + return childNode.getSingle("no-tx-separate-pools") != null; + } + + /** + * Removes the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public XaPoolType removeNoTxSeparatePools() + { + childNode.removeChild("no-tx-separate-pools"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : pad-xid + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pad-xid element + * @param padXid the value for the element pad-xid + * @return the current instance of XaPoolType + */ + public XaPoolType padXid(Boolean padXid) + { + childNode.getOrCreate("pad-xid").text(padXid); + return this; + } + + /** + * Returns the pad-xid element + * @return the node defined for the element pad-xid + */ + public Boolean isPadXid() + { + return Strings.isTrue(childNode.getTextValueForPatternName("pad-xid")); + } + + /** + * Removes the pad-xid element + * @return the current instance of XaPoolType + */ + public XaPoolType removePadXid() + { + childNode.removeChildren("pad-xid"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : wrap-xa-resource + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the wrap-xa-resource element + * @param wrapXaResource the value for the element wrap-xa-resource + * @return the current instance of XaPoolType + */ + public XaPoolType wrapXaResource(Boolean wrapXaResource) + { + childNode.getOrCreate("wrap-xa-resource").text(wrapXaResource); + return this; + } + + /** + * Returns the wrap-xa-resource element + * @return the node defined for the element wrap-xa-resource + */ + public Boolean isWrapXaResource() + { + return Strings.isTrue(childNode.getTextValueForPatternName("wrap-xa-resource")); + } + + /** + * Removes the wrap-xa-resource element + * @return the current instance of XaPoolType + */ + public XaPoolType removeWrapXaResource() + { + childNode.removeChildren("wrap-xa-resource"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/package-info.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/package-info.java new file mode 100644 index 00000000..50270e8e --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/package-info.java @@ -0,0 +1,5 @@ + /** + * Provides the implementation classes as defined in the schema datasources_1_0.xsd + */ + +package org.jboss.shrinkwrap.descriptor.impl.datasources10; diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/AdminObjectTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/AdminObjectTypeImpl.java new file mode 100644 index 00000000..f3f2a1ce --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/AdminObjectTypeImpl.java @@ -0,0 +1,294 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConfigPropertyTypeImpl; + +/** + * This class implements the admin-objectType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class AdminObjectTypeImpl implements Child, AdminObjectType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public AdminObjectTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public AdminObjectTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of AdminObjectType + */ + public AdminObjectType className(String className) + { + childNode.attribute("class-name", className); + return this; + } + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ + public String getClassName() + { + return childNode.getAttribute("class-name"); + } + + /** + * Removes the class-name attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeClassName() + { + childNode.removeAttribute("class-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:token ElementType : jndi-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jndi-name attribute + * @param jndiName the value for the attribute jndi-name + * @return the current instance of AdminObjectType + */ + public AdminObjectType jndiName(String jndiName) + { + childNode.attribute("jndi-name", jndiName); + return this; + } + + /** + * Returns the jndi-name attribute + * @return the value defined for the attribute jndi-name + */ + public String getJndiName() + { + return childNode.getAttribute("jndi-name"); + } + + /** + * Removes the jndi-name attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeJndiName() + { + childNode.removeAttribute("jndi-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:boolean ElementType : enabled + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the enabled attribute + * @param enabled the value for the attribute enabled + * @return the current instance of AdminObjectType + */ + public AdminObjectType enabled(Boolean enabled) + { + childNode.attribute("enabled", enabled); + return this; + } + + /** + * Returns the enabled attribute + * @return the value defined for the attribute enabled + */ + public Boolean isEnabled() + { + return Strings.isTrue(childNode.getAttribute("enabled")); + } + + /** + * Removes the enabled attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeEnabled() + { + childNode.removeAttribute("enabled"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:boolean ElementType : use-java-context + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-java-context attribute + * @param useJavaContext the value for the attribute use-java-context + * @return the current instance of AdminObjectType + */ + public AdminObjectType useJavaContext(Boolean useJavaContext) + { + childNode.attribute("use-java-context", useJavaContext); + return this; + } + + /** + * Returns the use-java-context attribute + * @return the value defined for the attribute use-java-context + */ + public Boolean isUseJavaContext() + { + return Strings.isTrue(childNode.getAttribute("use-java-context")); + } + + /** + * Removes the use-java-context attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeUseJavaContext() + { + childNode.removeAttribute("use-java-context"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:token ElementType : pool-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pool-name attribute + * @param poolName the value for the attribute pool-name + * @return the current instance of AdminObjectType + */ + public AdminObjectType poolName(String poolName) + { + childNode.attribute("pool-name", poolName); + return this; + } + + /** + * Returns the pool-name attribute + * @return the value defined for the attribute pool-name + */ + public String getPoolName() + { + return childNode.getAttribute("pool-name"); + } + + /** + * Removes the pool-name attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removePoolName() + { + childNode.removeAttribute("pool-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: ironjacamar:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty() + { + List nodeList = childNode.get("config-property"); + if (nodeList != null && nodeList.size() > 1) + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode, nodeList.get(0)); + } + return createConfigProperty(); + } + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty() + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode); + } + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("config-property"); + for(Node node: nodeList) + { + ConfigPropertyType> type = new ConfigPropertyTypeImpl>(this, "config-property", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public AdminObjectType removeAllConfigProperty() + { + childNode.removeChildren("config-property"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/AdminObjectsTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/AdminObjectsTypeImpl.java new file mode 100644 index 00000000..91ea2a51 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/AdminObjectsTypeImpl.java @@ -0,0 +1,119 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectsType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.AdminObjectTypeImpl; + +/** + * This class implements the admin-objectsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class AdminObjectsTypeImpl implements Child, AdminObjectsType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public AdminObjectsTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public AdminObjectsTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectsType ElementName: ironjacamar:admin-objectType ElementType : admin-object + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new admin-object element will be created and returned. + * Otherwise, the first existing admin-object element will be returned. + * @return the instance defined for the element admin-object + */ + public AdminObjectType> getOrCreateAdminObject() + { + List nodeList = childNode.get("admin-object"); + if (nodeList != null && nodeList.size() > 1) + { + return new AdminObjectTypeImpl>(this, "admin-object", childNode, nodeList.get(0)); + } + return createAdminObject(); + } + + /** + * Creates a new admin-object element + * @return the new created instance of AdminObjectType> + */ + public AdminObjectType> createAdminObject() + { + return new AdminObjectTypeImpl>(this, "admin-object", childNode); + } + + /** + * Returns all admin-object elements + * @return list of admin-object + */ + public List>> getAllAdminObject() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("admin-object"); + for(Node node: nodeList) + { + AdminObjectType> type = new AdminObjectTypeImpl>(this, "admin-object", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all admin-object elements + * @return the current instance of AdminObjectType> + */ + public AdminObjectsType removeAllAdminObject() + { + childNode.removeChildren("admin-object"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/BeanValidationGroupsTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/BeanValidationGroupsTypeImpl.java new file mode 100644 index 00000000..088b428e --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/BeanValidationGroupsTypeImpl.java @@ -0,0 +1,110 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.BeanValidationGroupsType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the bean-validation-groupsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class BeanValidationGroupsTypeImpl implements Child, BeanValidationGroupsType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public BeanValidationGroupsTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public BeanValidationGroupsTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: BeanValidationGroupsType ElementName: xsd:token ElementType : bean-validation-group + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Creates for all String objects representing bean-validation-group elements, + * a new bean-validation-group element + * @param values list of bean-validation-group objects + * @return the current instance of BeanValidationGroupsType + */ + public BeanValidationGroupsType beanValidationGroup(String ... values) + { + if (values != null) + { + for(String name: values) + { + childNode.createChild("bean-validation-group").text(name); + } + } + return this; + } + + /** + * Returns all bean-validation-group elements + * @return list of bean-validation-group + */ +public List getAllBeanValidationGroup() + { + List result = new ArrayList(); + List nodes = childNode.get("bean-validation-group"); + for (Node node : nodes) + { + result.add(node.getText()); + } + return result; + } + + /** + * Removes the bean-validation-group element + * @return the current instance of BeanValidationGroupsType + */ + public BeanValidationGroupsType removeAllBeanValidationGroup() + { + childNode.removeChildren("bean-validation-group"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConfigPropertyTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConfigPropertyTypeImpl.java new file mode 100644 index 00000000..a83dd6e6 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConfigPropertyTypeImpl.java @@ -0,0 +1,142 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the config-propertyType xsd type + *

+ * Original Documentation: + *

+ *
+ * [
+ * Specifies an override for a config-property element in ra.xml or a @ConfigProperty
+ *
+ *
+ * + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ConfigPropertyTypeImpl implements Child, ConfigPropertyType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ConfigPropertyTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ConfigPropertyTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConfigPropertyType ElementName: xsd:token ElementType : name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the name attribute + * @param name the value for the attribute name + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType name(String name) + { + childNode.attribute("name", name); + return this; + } + + /** + * Returns the name attribute + * @return the value defined for the attribute name + */ + public String getName() + { + return childNode.getAttribute("name"); + } + + /** + * Removes the name attribute + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType removeName() + { + childNode.removeAttribute("name"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConfigPropertyType ElementName: xsd:token ElementType : config-propertyType + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the config-propertyType element + * @param configPropertyType the value for the element config-propertyType + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType configPropertyType(String configPropertyType) + { + childNode.getOrCreate("config-propertyType").text(configPropertyType); + return this; + } + + /** + * Returns the config-propertyType element + * @return the node defined for the element config-propertyType + */ + public String getConfigPropertyType() + { + return childNode.getTextValueForPatternName("config-propertyType"); + } + + /** + * Removes the config-propertyType element + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType removeConfigPropertyType() + { + childNode.removeChildren("config-propertyType"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConnectionDefinitionsTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConnectionDefinitionsTypeImpl.java new file mode 100644 index 00000000..bdfcf0dd --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConnectionDefinitionsTypeImpl.java @@ -0,0 +1,119 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefinitionsType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefintionType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConnectionDefintionTypeImpl; + +/** + * This class implements the connection-definitionsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ConnectionDefinitionsTypeImpl implements Child, ConnectionDefinitionsType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ConnectionDefinitionsTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ConnectionDefinitionsTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefinitionsType ElementName: ironjacamar:connection-defintionType ElementType : connection-definition + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new connection-definition element will be created and returned. + * Otherwise, the first existing connection-definition element will be returned. + * @return the instance defined for the element connection-definition + */ + public ConnectionDefintionType> getOrCreateConnectionDefinition() + { + List nodeList = childNode.get("connection-definition"); + if (nodeList != null && nodeList.size() > 1) + { + return new ConnectionDefintionTypeImpl>(this, "connection-definition", childNode, nodeList.get(0)); + } + return createConnectionDefinition(); + } + + /** + * Creates a new connection-definition element + * @return the new created instance of ConnectionDefintionType> + */ + public ConnectionDefintionType> createConnectionDefinition() + { + return new ConnectionDefintionTypeImpl>(this, "connection-definition", childNode); + } + + /** + * Returns all connection-definition elements + * @return list of connection-definition + */ + public List>> getAllConnectionDefinition() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("connection-definition"); + for(Node node: nodeList) + { + ConnectionDefintionType> type = new ConnectionDefintionTypeImpl>(this, "connection-definition", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all connection-definition elements + * @return the current instance of ConnectionDefintionType> + */ + public ConnectionDefinitionsType removeAllConnectionDefinition() + { + childNode.removeChildren("connection-definition"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConnectionDefintionTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConnectionDefintionTypeImpl.java new file mode 100644 index 00000000..7e851444 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConnectionDefintionTypeImpl.java @@ -0,0 +1,510 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefintionType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConfigPropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.SecurityType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.SecurityTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.TimeoutType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.TimeoutTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ValidationType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ValidationTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.RecoverType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.RecoverTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.PoolType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.PoolTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.XaPoolType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.XaPoolTypeImpl; + +/** + * This class implements the connection-defintionType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ConnectionDefintionTypeImpl implements Child, ConnectionDefintionType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ConnectionDefintionTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ConnectionDefintionTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType className(String className) + { + childNode.attribute("class-name", className); + return this; + } + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ + public String getClassName() + { + return childNode.getAttribute("class-name"); + } + + /** + * Removes the class-name attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeClassName() + { + childNode.removeAttribute("class-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:token ElementType : jndi-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jndi-name attribute + * @param jndiName the value for the attribute jndi-name + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType jndiName(String jndiName) + { + childNode.attribute("jndi-name", jndiName); + return this; + } + + /** + * Returns the jndi-name attribute + * @return the value defined for the attribute jndi-name + */ + public String getJndiName() + { + return childNode.getAttribute("jndi-name"); + } + + /** + * Removes the jndi-name attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeJndiName() + { + childNode.removeAttribute("jndi-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:boolean ElementType : enabled + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the enabled attribute + * @param enabled the value for the attribute enabled + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType enabled(Boolean enabled) + { + childNode.attribute("enabled", enabled); + return this; + } + + /** + * Returns the enabled attribute + * @return the value defined for the attribute enabled + */ + public Boolean isEnabled() + { + return Strings.isTrue(childNode.getAttribute("enabled")); + } + + /** + * Removes the enabled attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeEnabled() + { + childNode.removeAttribute("enabled"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:boolean ElementType : use-java-context + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-java-context attribute + * @param useJavaContext the value for the attribute use-java-context + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType useJavaContext(Boolean useJavaContext) + { + childNode.attribute("use-java-context", useJavaContext); + return this; + } + + /** + * Returns the use-java-context attribute + * @return the value defined for the attribute use-java-context + */ + public Boolean isUseJavaContext() + { + return Strings.isTrue(childNode.getAttribute("use-java-context")); + } + + /** + * Removes the use-java-context attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeUseJavaContext() + { + childNode.removeAttribute("use-java-context"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:token ElementType : pool-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pool-name attribute + * @param poolName the value for the attribute pool-name + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType poolName(String poolName) + { + childNode.attribute("pool-name", poolName); + return this; + } + + /** + * Returns the pool-name attribute + * @return the value defined for the attribute pool-name + */ + public String getPoolName() + { + return childNode.getAttribute("pool-name"); + } + + /** + * Removes the pool-name attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removePoolName() + { + childNode.removeAttribute("pool-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty() + { + List nodeList = childNode.get("config-property"); + if (nodeList != null && nodeList.size() > 1) + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode, nodeList.get(0)); + } + return createConfigProperty(); + } + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty() + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode); + } + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("config-property"); + for(Node node: nodeList) + { + ConfigPropertyType> type = new ConfigPropertyTypeImpl>(this, "config-property", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public ConnectionDefintionType removeAllConfigProperty() + { + childNode.removeChildren("config-property"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:securityType ElementType : security + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new security element with the given value will be created. + * Otherwise, the existing security element will be returned. + * @return a new or existing instance of SecurityType> + */ + public SecurityType> getOrCreateSecurity() + { + Node node = childNode.getOrCreate("security"); + SecurityType> security = new SecurityTypeImpl>(this, "security", childNode, node); + return security; + } + + /** + * Removes the security element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeSecurity() + { + childNode.removeChildren("security"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:timeoutType ElementType : timeout + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new timeout element with the given value will be created. + * Otherwise, the existing timeout element will be returned. + * @return a new or existing instance of TimeoutType> + */ + public TimeoutType> getOrCreateTimeout() + { + Node node = childNode.getOrCreate("timeout"); + TimeoutType> timeout = new TimeoutTypeImpl>(this, "timeout", childNode, node); + return timeout; + } + + /** + * Removes the timeout element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeTimeout() + { + childNode.removeChildren("timeout"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:validationType ElementType : validation + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new validation element with the given value will be created. + * Otherwise, the existing validation element will be returned. + * @return a new or existing instance of ValidationType> + */ + public ValidationType> getOrCreateValidation() + { + Node node = childNode.getOrCreate("validation"); + ValidationType> validation = new ValidationTypeImpl>(this, "validation", childNode, node); + return validation; + } + + /** + * Removes the validation element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeValidation() + { + childNode.removeChildren("validation"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:recoverType ElementType : recovery + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recovery element with the given value will be created. + * Otherwise, the existing recovery element will be returned. + * @return a new or existing instance of RecoverType> + */ + public RecoverType> getOrCreateRecovery() + { + Node node = childNode.getOrCreate("recovery"); + RecoverType> recovery = new RecoverTypeImpl>(this, "recovery", childNode, node); + return recovery; + } + + /** + * Removes the recovery element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeRecovery() + { + childNode.removeChildren("recovery"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:poolType ElementType : pool + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new pool element with the given value will be created. + * Otherwise, the existing pool element will be returned. + * @return a new or existing instance of PoolType> + */ + public PoolType> getOrCreatePool() + { + Node node = childNode.getOrCreate("pool"); + PoolType> pool = new PoolTypeImpl>(this, "pool", childNode, node); + return pool; + } + + /** + * Removes the pool element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removePool() + { + childNode.removeChildren("pool"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: ironjacamar:xa-poolType ElementType : xa-pool + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new xa-pool element with the given value will be created. + * Otherwise, the existing xa-pool element will be returned. + * @return a new or existing instance of XaPoolType> + */ + public XaPoolType> getOrCreateXaPool() + { + Node node = childNode.getOrCreate("xa-pool"); + XaPoolType> xaPool = new XaPoolTypeImpl>(this, "xa-pool", childNode, node); + return xaPool; + } + + /** + * Removes the xa-pool element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeXaPool() + { + childNode.removeChildren("xa-pool"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:boolean ElementType : use-ccm + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-ccm attribute + * @param useCcm the value for the attribute use-ccm + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType useCcm(Boolean useCcm) + { + childNode.attribute("use-ccm", useCcm); + return this; + } + + /** + * Returns the use-ccm attribute + * @return the value defined for the attribute use-ccm + */ + public Boolean isUseCcm() + { + return Strings.isTrue(childNode.getAttribute("use-ccm")); + } + + /** + * Removes the use-ccm attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeUseCcm() + { + childNode.removeAttribute("use-ccm"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/CredentialTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/CredentialTypeImpl.java new file mode 100644 index 00000000..f6903c20 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/CredentialTypeImpl.java @@ -0,0 +1,169 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.CredentialType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the credentialType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class CredentialTypeImpl implements Child, CredentialType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public CredentialTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public CredentialTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: CredentialType ElementName: xsd:token ElementType : user-name + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the user-name element + * @param userName the value for the element user-name + * @return the current instance of CredentialType + */ + public CredentialType userName(String userName) + { + childNode.getOrCreate("user-name").text(userName); + return this; + } + + /** + * Returns the user-name element + * @return the node defined for the element user-name + */ + public String getUserName() + { + return childNode.getTextValueForPatternName("user-name"); + } + + /** + * Removes the user-name element + * @return the current instance of CredentialType + */ + public CredentialType removeUserName() + { + childNode.removeChildren("user-name"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: CredentialType ElementName: xsd:token ElementType : password + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the password element + * @param password the value for the element password + * @return the current instance of CredentialType + */ + public CredentialType password(String password) + { + childNode.getOrCreate("password").text(password); + return this; + } + + /** + * Returns the password element + * @return the node defined for the element password + */ + public String getPassword() + { + return childNode.getTextValueForPatternName("password"); + } + + /** + * Removes the password element + * @return the current instance of CredentialType + */ + public CredentialType removePassword() + { + childNode.removeChildren("password"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: CredentialType ElementName: xsd:token ElementType : security-domain + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain element + * @param securityDomain the value for the element security-domain + * @return the current instance of CredentialType + */ + public CredentialType securityDomain(String securityDomain) + { + childNode.getOrCreate("security-domain").text(securityDomain); + return this; + } + + /** + * Returns the security-domain element + * @return the node defined for the element security-domain + */ + public String getSecurityDomain() + { + return childNode.getTextValueForPatternName("security-domain"); + } + + /** + * Removes the security-domain element + * @return the current instance of CredentialType + */ + public CredentialType removeSecurityDomain() + { + childNode.removeChildren("security-domain"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ExtensionTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ExtensionTypeImpl.java new file mode 100644 index 00000000..a30ce50a --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ExtensionTypeImpl.java @@ -0,0 +1,127 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ExtensionType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConfigPropertyTypeImpl; + +/** + * This class implements the extensionType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ExtensionTypeImpl implements Child, ExtensionType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ExtensionTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ExtensionTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ExtensionType ElementName: ironjacamar:config-propertyType ElementType : config-property + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element with the given value will be created. + * Otherwise, the existing config-property element will be returned. + * @return a new or existing instance of ConfigPropertyType> + */ + public ConfigPropertyType> getOrCreateConfigProperty() + { + Node node = childNode.getOrCreate("config-property"); + ConfigPropertyType> configProperty = new ConfigPropertyTypeImpl>(this, "config-property", childNode, node); + return configProperty; + } + + /** + * Removes the config-property element + * @return the current instance of ExtensionType + */ + public ExtensionType removeConfigProperty() + { + childNode.removeChildren("config-property"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ExtensionType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of ExtensionType + */ + public ExtensionType className(String className) + { + childNode.attribute("class-name", className); + return this; + } + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ + public String getClassName() + { + return childNode.getAttribute("class-name"); + } + + /** + * Removes the class-name attribute + * @return the current instance of ExtensionType + */ + public ExtensionType removeClassName() + { + childNode.removeAttribute("class-name"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/IronjacamarDescriptorImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/IronjacamarDescriptorImpl.java new file mode 100644 index 00000000..1db0564e --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/IronjacamarDescriptorImpl.java @@ -0,0 +1,383 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.IronjacamarDescriptor; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.BeanValidationGroupsType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.BeanValidationGroupsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConfigPropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.TransactionSupportType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefinitionsType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConnectionDefinitionsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectsType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.AdminObjectsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace; + +import org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorImplBase; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.spi.node.Node; + +/** + *

+ * This deployment descriptor provides the functionalities as described in the ironjacamar_1_0.xsd specification + *

+ * Example: + *

+ * + * IronjacamarDescriptor descriptor = Descriptors.create(IronjacamarDescriptor.class); + * + * + * + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class IronjacamarDescriptorImpl extends NodeDescriptorImplBase implements DescriptorNamespace, IronjacamarDescriptor +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private Node model; + + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public IronjacamarDescriptorImpl(String descriptorName) + { + this(descriptorName, new Node("ironjacamar")); + } + + public IronjacamarDescriptorImpl(String descriptorName, Node node) + { + super(descriptorName); + this.model = node; + addDefaultNamespaces(); + } + + // -------------------------------------------------------------------------------------|| + // Methods + // -------------------------------------------------------------------------------------|| + + public Node getRootNode() + { + return model; + } + + + + // -------------------------------------------------------------------------------------|| + // Namespace + // -------------------------------------------------------------------------------------|| + + + /** + * Adds the default namespaces as defined in the specification + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor addDefaultNamespaces() + { + addNamespace("xmlns", "http://www.jboss.org/ironjacamar/schema"); + addNamespace("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); + addNamespace("xsi:schemaLocation", "http://www.jboss.org/ironjacamar/schema http://www.jboss.org/ironjacamar/schema/ironjacamar_1_0.xsd"); + return this; + } + + /** + * Adds a new namespace + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor addNamespace(String name, String value) + { + model.attribute(name, value); + return this; + } + + /** + * Returns all defined namespaces. + * @return all defined namespaces + */ + public List getNamespaces() + { + List namespaceList = new ArrayList(); + Map attributes = model.getAttributes(); + for (String name: attributes.keySet()) + { + String value = attributes.get(name); + if (value != null && value.startsWith("http://")) + { + namespaceList.add(name + "=" + value); + } + } + return namespaceList; + } + + /** + * Removes all existing namespaces. + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor removeAllNamespaces() + { + List nameSpaceKeys = new ArrayList(); + Map attributes = model.getAttributes(); + for (String name: attributes.keySet()) + { + String value = attributes.get(name); + if (value != null && value.startsWith("http://")) + { + nameSpaceKeys.add(name); + } + } + for (String name: nameSpaceKeys) + { + model.removeAttribute(name); + } + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarDescriptor ElementName: ironjacamar:bean-validation-groupsType ElementType : bean-validation-groups + // MaxOccurs: -1 isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new bean-validation-groups element with the given value will be created. + * Otherwise, the existing bean-validation-groups element will be returned. + * @return a new or existing instance of BeanValidationGroupsType + */ + public BeanValidationGroupsType getOrCreateBeanValidationGroups() + { + Node node = model.getOrCreate("bean-validation-groups"); + BeanValidationGroupsType beanValidationGroups = new BeanValidationGroupsTypeImpl(this, "bean-validation-groups", model, node); + return beanValidationGroups; + } + + /** + * Removes the bean-validation-groups element + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor removeBeanValidationGroups() + { + model.removeChildren("bean-validation-groups"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarDescriptor ElementName: xsd:token ElementType : bootstrap-context + // MaxOccurs: -1 isGeneric: false isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the bootstrap-context element + * @param bootstrapContext the value for the element bootstrap-context + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor bootstrapContext(String bootstrapContext) + { + model.getOrCreate("bootstrap-context").text(bootstrapContext); + return this; + } + + /** + * Returns the bootstrap-context element + * @return the node defined for the element bootstrap-context + */ + public String getBootstrapContext() + { + return model.getTextValueForPatternName("bootstrap-context"); + } + + /** + * Removes the bootstrap-context element + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor removeBootstrapContext() + { + model.removeChildren("bootstrap-context"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarDescriptor ElementName: ironjacamar:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType getOrCreateConfigProperty() + { + List nodeList = model.get("config-property"); + if (nodeList != null && nodeList.size() > 1) + { + return new ConfigPropertyTypeImpl(this, "config-property", model, nodeList.get(0)); + } + return createConfigProperty(); + } + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType + */ + public ConfigPropertyType createConfigProperty() + { + return new ConfigPropertyTypeImpl(this, "config-property", model); + } + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List> getAllConfigProperty() + { + List> list = new ArrayList>(); + List nodeList = model.get("config-property"); + for(Node node: nodeList) + { + ConfigPropertyType type = new ConfigPropertyTypeImpl(this, "config-property", model, node); + list.add(type); + } + return list; + } + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType + */ + public IronjacamarDescriptor removeAllConfigProperty() + { + model.removeChildren("config-property"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarDescriptor ElementName: ironjacamar:transaction-supportType ElementType : transaction-support + // MaxOccurs: - isGeneric: false isAttribute: false isEnum: true isDataType: false + // --------------------------------------------------------------------------------------------------------|| + /** + * Sets the transaction-support element + * @param transactionSupport the value for the element transaction-support + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor transactionSupport(TransactionSupportType transactionSupport) + { + model.getOrCreate("transaction-support").text(transactionSupport); + return this; + } + /** + * Sets the transaction-support element + * @param transactionSupport the value for the element transaction-support + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor transactionSupport(String transactionSupport) + { + model.getOrCreate("transaction-support").text(transactionSupport); + return this; + } + + /** + * Returns the transaction-support element + * @return the value found for the element transaction-support + */ + public TransactionSupportType getTransactionSupport() + { + return TransactionSupportType.getFromStringValue(model.getTextValueForPatternName("transaction-support")); + } + + /** + * Returns the transaction-support element + * @return the value found for the element transaction-support + */ + public String getTransactionSupportAsString() + { + return model.getTextValueForPatternName("transaction-support"); + } + + /** + * Removes the transaction-support attribute + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor removeTransactionSupport() + { + model.removeAttribute("transaction-support"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarDescriptor ElementName: ironjacamar:connection-definitionsType ElementType : connection-definitions + // MaxOccurs: -1 isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new connection-definitions element with the given value will be created. + * Otherwise, the existing connection-definitions element will be returned. + * @return a new or existing instance of ConnectionDefinitionsType + */ + public ConnectionDefinitionsType getOrCreateConnectionDefinitions() + { + Node node = model.getOrCreate("connection-definitions"); + ConnectionDefinitionsType connectionDefinitions = new ConnectionDefinitionsTypeImpl(this, "connection-definitions", model, node); + return connectionDefinitions; + } + + /** + * Removes the connection-definitions element + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor removeConnectionDefinitions() + { + model.removeChildren("connection-definitions"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarDescriptor ElementName: ironjacamar:admin-objectsType ElementType : admin-objects + // MaxOccurs: -1 isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new admin-objects element with the given value will be created. + * Otherwise, the existing admin-objects element will be returned. + * @return a new or existing instance of AdminObjectsType + */ + public AdminObjectsType getOrCreateAdminObjects() + { + Node node = model.getOrCreate("admin-objects"); + AdminObjectsType adminObjects = new AdminObjectsTypeImpl(this, "admin-objects", model, node); + return adminObjects; + } + + /** + * Removes the admin-objects element + * @return the current instance of IronjacamarDescriptor + */ + public IronjacamarDescriptor removeAdminObjects() + { + model.removeChildren("admin-objects"); + return this; + } + +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/IronjacamarTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/IronjacamarTypeImpl.java new file mode 100644 index 00000000..7b9fba94 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/IronjacamarTypeImpl.java @@ -0,0 +1,300 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.IronjacamarType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.BeanValidationGroupsType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.BeanValidationGroupsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConfigPropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.TransactionSupportType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefinitionsType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConnectionDefinitionsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectsType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.AdminObjectsTypeImpl; + +/** + * This class implements the ironjacamarType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class IronjacamarTypeImpl implements Child, IronjacamarType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public IronjacamarTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public IronjacamarTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarType ElementName: ironjacamar:bean-validation-groupsType ElementType : bean-validation-groups + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new bean-validation-groups element with the given value will be created. + * Otherwise, the existing bean-validation-groups element will be returned. + * @return a new or existing instance of BeanValidationGroupsType> + */ + public BeanValidationGroupsType> getOrCreateBeanValidationGroups() + { + Node node = childNode.getOrCreate("bean-validation-groups"); + BeanValidationGroupsType> beanValidationGroups = new BeanValidationGroupsTypeImpl>(this, "bean-validation-groups", childNode, node); + return beanValidationGroups; + } + + /** + * Removes the bean-validation-groups element + * @return the current instance of IronjacamarType + */ + public IronjacamarType removeBeanValidationGroups() + { + childNode.removeChildren("bean-validation-groups"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarType ElementName: xsd:token ElementType : bootstrap-context + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the bootstrap-context element + * @param bootstrapContext the value for the element bootstrap-context + * @return the current instance of IronjacamarType + */ + public IronjacamarType bootstrapContext(String bootstrapContext) + { + childNode.getOrCreate("bootstrap-context").text(bootstrapContext); + return this; + } + + /** + * Returns the bootstrap-context element + * @return the node defined for the element bootstrap-context + */ + public String getBootstrapContext() + { + return childNode.getTextValueForPatternName("bootstrap-context"); + } + + /** + * Removes the bootstrap-context element + * @return the current instance of IronjacamarType + */ + public IronjacamarType removeBootstrapContext() + { + childNode.removeChildren("bootstrap-context"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarType ElementName: ironjacamar:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty() + { + List nodeList = childNode.get("config-property"); + if (nodeList != null && nodeList.size() > 1) + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode, nodeList.get(0)); + } + return createConfigProperty(); + } + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty() + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode); + } + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("config-property"); + for(Node node: nodeList) + { + ConfigPropertyType> type = new ConfigPropertyTypeImpl>(this, "config-property", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public IronjacamarType removeAllConfigProperty() + { + childNode.removeChildren("config-property"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarType ElementName: ironjacamar:transaction-supportType ElementType : transaction-support + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: true isDataType: false + // --------------------------------------------------------------------------------------------------------|| + /** + * Sets the transaction-support element + * @param transactionSupport the value for the element transaction-support + * @return the current instance of IronjacamarType + */ + public IronjacamarType transactionSupport(TransactionSupportType transactionSupport) + { + childNode.getOrCreate("transaction-support").text(transactionSupport); + return this; + } + /** + * Sets the transaction-support element + * @param transactionSupport the value for the element transaction-support + * @return the current instance of IronjacamarType + */ + public IronjacamarType transactionSupport(String transactionSupport) + { + childNode.getOrCreate("transaction-support").text(transactionSupport); + return this; + } + + /** + * Returns the transaction-support element + * @return the value found for the element transaction-support + */ + public TransactionSupportType getTransactionSupport() + { + return TransactionSupportType.getFromStringValue(childNode.getTextValueForPatternName("transaction-support")); + } + + /** + * Returns the transaction-support element + * @return the value found for the element transaction-support + */ + public String getTransactionSupportAsString() + { + return childNode.getTextValueForPatternName("transaction-support"); + } + + /** + * Removes the transaction-support attribute + * @return the current instance of IronjacamarType + */ + public IronjacamarType removeTransactionSupport() + { + childNode.removeAttribute("transaction-support"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarType ElementName: ironjacamar:connection-definitionsType ElementType : connection-definitions + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new connection-definitions element with the given value will be created. + * Otherwise, the existing connection-definitions element will be returned. + * @return a new or existing instance of ConnectionDefinitionsType> + */ + public ConnectionDefinitionsType> getOrCreateConnectionDefinitions() + { + Node node = childNode.getOrCreate("connection-definitions"); + ConnectionDefinitionsType> connectionDefinitions = new ConnectionDefinitionsTypeImpl>(this, "connection-definitions", childNode, node); + return connectionDefinitions; + } + + /** + * Removes the connection-definitions element + * @return the current instance of IronjacamarType + */ + public IronjacamarType removeConnectionDefinitions() + { + childNode.removeChildren("connection-definitions"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: IronjacamarType ElementName: ironjacamar:admin-objectsType ElementType : admin-objects + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new admin-objects element with the given value will be created. + * Otherwise, the existing admin-objects element will be returned. + * @return a new or existing instance of AdminObjectsType> + */ + public AdminObjectsType> getOrCreateAdminObjects() + { + Node node = childNode.getOrCreate("admin-objects"); + AdminObjectsType> adminObjects = new AdminObjectsTypeImpl>(this, "admin-objects", childNode, node); + return adminObjects; + } + + /** + * Removes the admin-objects element + * @return the current instance of IronjacamarType + */ + public IronjacamarType removeAdminObjects() + { + childNode.removeChildren("admin-objects"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/PoolTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/PoolTypeImpl.java new file mode 100644 index 00000000..a5d1af9a --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/PoolTypeImpl.java @@ -0,0 +1,247 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.PoolType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the poolType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class PoolTypeImpl implements Child, PoolType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public PoolTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public PoolTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:nonNegativeInteger ElementType : min-pool-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the min-pool-size element + * @param minPoolSize the value for the element min-pool-size + * @return the current instance of PoolType + */ + public PoolType minPoolSize(Integer minPoolSize) + { + childNode.getOrCreate("min-pool-size").text(minPoolSize); + return this; + } + + /** + * Returns the min-pool-size element + * @return the node defined for the element min-pool-size + */ + public Integer getMinPoolSize() + { + if (childNode.getTextValueForPatternName("min-pool-size") != null && !childNode.getTextValueForPatternName("min-pool-size").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("min-pool-size")); + } + return null; + } + + /** + * Removes the min-pool-size element + * @return the current instance of PoolType + */ + public PoolType removeMinPoolSize() + { + childNode.removeChildren("min-pool-size"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:nonNegativeInteger ElementType : max-pool-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the max-pool-size element + * @param maxPoolSize the value for the element max-pool-size + * @return the current instance of PoolType + */ + public PoolType maxPoolSize(Integer maxPoolSize) + { + childNode.getOrCreate("max-pool-size").text(maxPoolSize); + return this; + } + + /** + * Returns the max-pool-size element + * @return the node defined for the element max-pool-size + */ + public Integer getMaxPoolSize() + { + if (childNode.getTextValueForPatternName("max-pool-size") != null && !childNode.getTextValueForPatternName("max-pool-size").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("max-pool-size")); + } + return null; + } + + /** + * Removes the max-pool-size element + * @return the current instance of PoolType + */ + public PoolType removeMaxPoolSize() + { + childNode.removeChildren("max-pool-size"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:boolean ElementType : prefill + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the prefill element + * @param prefill the value for the element prefill + * @return the current instance of PoolType + */ + public PoolType prefill(Boolean prefill) + { + childNode.getOrCreate("prefill").text(prefill); + return this; + } + + /** + * Returns the prefill element + * @return the node defined for the element prefill + */ + public Boolean isPrefill() + { + return Strings.isTrue(childNode.getTextValueForPatternName("prefill")); + } + + /** + * Removes the prefill element + * @return the current instance of PoolType + */ + public PoolType removePrefill() + { + childNode.removeChildren("prefill"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:boolean ElementType : use-strict-min + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-strict-min element + * @param useStrictMin the value for the element use-strict-min + * @return the current instance of PoolType + */ + public PoolType useStrictMin(Boolean useStrictMin) + { + childNode.getOrCreate("use-strict-min").text(useStrictMin); + return this; + } + + /** + * Returns the use-strict-min element + * @return the node defined for the element use-strict-min + */ + public Boolean isUseStrictMin() + { + return Strings.isTrue(childNode.getTextValueForPatternName("use-strict-min")); + } + + /** + * Removes the use-strict-min element + * @return the current instance of PoolType + */ + public PoolType removeUseStrictMin() + { + childNode.removeChildren("use-strict-min"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:token ElementType : flush-strategy + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the flush-strategy element + * @param flushStrategy the value for the element flush-strategy + * @return the current instance of PoolType + */ + public PoolType flushStrategy(String flushStrategy) + { + childNode.getOrCreate("flush-strategy").text(flushStrategy); + return this; + } + + /** + * Returns the flush-strategy element + * @return the node defined for the element flush-strategy + */ + public String getFlushStrategy() + { + return childNode.getTextValueForPatternName("flush-strategy"); + } + + /** + * Removes the flush-strategy element + * @return the current instance of PoolType + */ + public PoolType removeFlushStrategy() + { + childNode.removeChildren("flush-strategy"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/RecoverTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/RecoverTypeImpl.java new file mode 100644 index 00000000..aad1a65f --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/RecoverTypeImpl.java @@ -0,0 +1,157 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.RecoverType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.CredentialType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.CredentialTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ExtensionTypeImpl; + +/** + * This class implements the recoverType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class RecoverTypeImpl implements Child, RecoverType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public RecoverTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public RecoverTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: ironjacamar:credentialType ElementType : recover-credential + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recover-credential element with the given value will be created. + * Otherwise, the existing recover-credential element will be returned. + * @return a new or existing instance of CredentialType> + */ + public CredentialType> getOrCreateRecoverCredential() + { + Node node = childNode.getOrCreate("recover-credential"); + CredentialType> recoverCredential = new CredentialTypeImpl>(this, "recover-credential", childNode, node); + return recoverCredential; + } + + /** + * Removes the recover-credential element + * @return the current instance of RecoverType + */ + public RecoverType removeRecoverCredential() + { + childNode.removeChildren("recover-credential"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: ironjacamar:extensionType ElementType : recover-plugin + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recover-plugin element with the given value will be created. + * Otherwise, the existing recover-plugin element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateRecoverPlugin() + { + Node node = childNode.getOrCreate("recover-plugin"); + ExtensionType> recoverPlugin = new ExtensionTypeImpl>(this, "recover-plugin", childNode, node); + return recoverPlugin; + } + + /** + * Removes the recover-plugin element + * @return the current instance of RecoverType + */ + public RecoverType removeRecoverPlugin() + { + childNode.removeChildren("recover-plugin"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: xsd:boolean ElementType : no-recovery + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the no-recovery attribute + * @param noRecovery the value for the attribute no-recovery + * @return the current instance of RecoverType + */ + public RecoverType noRecovery(Boolean noRecovery) + { + childNode.attribute("no-recovery", noRecovery); + return this; + } + + /** + * Returns the no-recovery attribute + * @return the value defined for the attribute no-recovery + */ + public Boolean isNoRecovery() + { + return Strings.isTrue(childNode.getAttribute("no-recovery")); + } + + /** + * Removes the no-recovery attribute + * @return the current instance of RecoverType + */ + public RecoverType removeNoRecovery() + { + childNode.removeAttribute("no-recovery"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/SecurityTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/SecurityTypeImpl.java new file mode 100644 index 00000000..4716e1e9 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/SecurityTypeImpl.java @@ -0,0 +1,168 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.SecurityType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the securityType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class SecurityTypeImpl implements Child, SecurityType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public SecurityTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public SecurityTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: SecurityType ElementName: javaee:emptyType ElementType : application + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the application element + * @return the current instance of SecurityType + */ + public SecurityType application() + { + childNode.getOrCreate("application"); + return this; + } + + /** + * Removes the application element + * @return the current instance of SecurityType + */ + public Boolean isApplication() + { + return childNode.getSingle("application") != null; + } + + /** + * Removes the application element + * @return the current instance of SecurityType + */ + public SecurityType removeApplication() + { + childNode.removeChild("application"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: SecurityType ElementName: xsd:token ElementType : security-domain + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain element + * @param securityDomain the value for the element security-domain + * @return the current instance of SecurityType + */ + public SecurityType securityDomain(String securityDomain) + { + childNode.getOrCreate("security-domain").text(securityDomain); + return this; + } + + /** + * Returns the security-domain element + * @return the node defined for the element security-domain + */ + public String getSecurityDomain() + { + return childNode.getTextValueForPatternName("security-domain"); + } + + /** + * Removes the security-domain element + * @return the current instance of SecurityType + */ + public SecurityType removeSecurityDomain() + { + childNode.removeChildren("security-domain"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: SecurityType ElementName: xsd:token ElementType : security-domain-and-application + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain-and-application element + * @param securityDomainAndApplication the value for the element security-domain-and-application + * @return the current instance of SecurityType + */ + public SecurityType securityDomainAndApplication(String securityDomainAndApplication) + { + childNode.getOrCreate("security-domain-and-application").text(securityDomainAndApplication); + return this; + } + + /** + * Returns the security-domain-and-application element + * @return the node defined for the element security-domain-and-application + */ + public String getSecurityDomainAndApplication() + { + return childNode.getTextValueForPatternName("security-domain-and-application"); + } + + /** + * Removes the security-domain-and-application element + * @return the current instance of SecurityType + */ + public SecurityType removeSecurityDomainAndApplication() + { + childNode.removeChildren("security-domain-and-application"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/TimeoutTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/TimeoutTypeImpl.java new file mode 100644 index 00000000..24ae2916 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/TimeoutTypeImpl.java @@ -0,0 +1,256 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.TimeoutType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the timeoutType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class TimeoutTypeImpl implements Child, TimeoutType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public TimeoutTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public TimeoutTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : blocking-timeout-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the blocking-timeout-millis element + * @param blockingTimeoutMillis the value for the element blocking-timeout-millis + * @return the current instance of TimeoutType + */ + public TimeoutType blockingTimeoutMillis(Integer blockingTimeoutMillis) + { + childNode.getOrCreate("blocking-timeout-millis").text(blockingTimeoutMillis); + return this; + } + + /** + * Returns the blocking-timeout-millis element + * @return the node defined for the element blocking-timeout-millis + */ + public Integer getBlockingTimeoutMillis() + { + if (childNode.getTextValueForPatternName("blocking-timeout-millis") != null && !childNode.getTextValueForPatternName("blocking-timeout-millis").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("blocking-timeout-millis")); + } + return null; + } + + /** + * Removes the blocking-timeout-millis element + * @return the current instance of TimeoutType + */ + public TimeoutType removeBlockingTimeoutMillis() + { + childNode.removeChildren("blocking-timeout-millis"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : idle-timeout-minutes + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the idle-timeout-minutes element + * @param idleTimeoutMinutes the value for the element idle-timeout-minutes + * @return the current instance of TimeoutType + */ + public TimeoutType idleTimeoutMinutes(Integer idleTimeoutMinutes) + { + childNode.getOrCreate("idle-timeout-minutes").text(idleTimeoutMinutes); + return this; + } + + /** + * Returns the idle-timeout-minutes element + * @return the node defined for the element idle-timeout-minutes + */ + public Integer getIdleTimeoutMinutes() + { + if (childNode.getTextValueForPatternName("idle-timeout-minutes") != null && !childNode.getTextValueForPatternName("idle-timeout-minutes").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("idle-timeout-minutes")); + } + return null; + } + + /** + * Removes the idle-timeout-minutes element + * @return the current instance of TimeoutType + */ + public TimeoutType removeIdleTimeoutMinutes() + { + childNode.removeChildren("idle-timeout-minutes"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : allocation-retry + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the allocation-retry element + * @param allocationRetry the value for the element allocation-retry + * @return the current instance of TimeoutType + */ + public TimeoutType allocationRetry(Integer allocationRetry) + { + childNode.getOrCreate("allocation-retry").text(allocationRetry); + return this; + } + + /** + * Returns the allocation-retry element + * @return the node defined for the element allocation-retry + */ + public Integer getAllocationRetry() + { + if (childNode.getTextValueForPatternName("allocation-retry") != null && !childNode.getTextValueForPatternName("allocation-retry").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("allocation-retry")); + } + return null; + } + + /** + * Removes the allocation-retry element + * @return the current instance of TimeoutType + */ + public TimeoutType removeAllocationRetry() + { + childNode.removeChildren("allocation-retry"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : allocation-retry-wait-millis + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the allocation-retry-wait-millis element + * @param allocationRetryWaitMillis the value for the element allocation-retry-wait-millis + * @return the current instance of TimeoutType + */ + public TimeoutType allocationRetryWaitMillis(Integer allocationRetryWaitMillis) + { + childNode.getOrCreate("allocation-retry-wait-millis").text(allocationRetryWaitMillis); + return this; + } + + /** + * Returns the allocation-retry-wait-millis element + * @return the node defined for the element allocation-retry-wait-millis + */ + public Integer getAllocationRetryWaitMillis() + { + if (childNode.getTextValueForPatternName("allocation-retry-wait-millis") != null && !childNode.getTextValueForPatternName("allocation-retry-wait-millis").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("allocation-retry-wait-millis")); + } + return null; + } + + /** + * Removes the allocation-retry-wait-millis element + * @return the current instance of TimeoutType + */ + public TimeoutType removeAllocationRetryWaitMillis() + { + childNode.removeChildren("allocation-retry-wait-millis"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : xa-resource-timeout + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the xa-resource-timeout element + * @param xaResourceTimeout the value for the element xa-resource-timeout + * @return the current instance of TimeoutType + */ + public TimeoutType xaResourceTimeout(Integer xaResourceTimeout) + { + childNode.getOrCreate("xa-resource-timeout").text(xaResourceTimeout); + return this; + } + + /** + * Returns the xa-resource-timeout element + * @return the node defined for the element xa-resource-timeout + */ + public Integer getXaResourceTimeout() + { + if (childNode.getTextValueForPatternName("xa-resource-timeout") != null && !childNode.getTextValueForPatternName("xa-resource-timeout").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("xa-resource-timeout")); + } + return null; + } + + /** + * Removes the xa-resource-timeout element + * @return the current instance of TimeoutType + */ + public TimeoutType removeXaResourceTimeout() + { + childNode.removeChildren("xa-resource-timeout"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ValidationTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ValidationTypeImpl.java new file mode 100644 index 00000000..710bb135 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ValidationTypeImpl.java @@ -0,0 +1,172 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ValidationType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the validationType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ValidationTypeImpl implements Child, ValidationType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ValidationTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ValidationTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : background-validation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the background-validation element + * @param backgroundValidation the value for the element background-validation + * @return the current instance of ValidationType + */ + public ValidationType backgroundValidation(Boolean backgroundValidation) + { + childNode.getOrCreate("background-validation").text(backgroundValidation); + return this; + } + + /** + * Returns the background-validation element + * @return the node defined for the element background-validation + */ + public Boolean isBackgroundValidation() + { + return Strings.isTrue(childNode.getTextValueForPatternName("background-validation")); + } + + /** + * Removes the background-validation element + * @return the current instance of ValidationType + */ + public ValidationType removeBackgroundValidation() + { + childNode.removeChildren("background-validation"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:nonNegativeInteger ElementType : background-validation-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the background-validation-millis element + * @param backgroundValidationMillis the value for the element background-validation-millis + * @return the current instance of ValidationType + */ + public ValidationType backgroundValidationMillis(Integer backgroundValidationMillis) + { + childNode.getOrCreate("background-validation-millis").text(backgroundValidationMillis); + return this; + } + + /** + * Returns the background-validation-millis element + * @return the node defined for the element background-validation-millis + */ + public Integer getBackgroundValidationMillis() + { + if (childNode.getTextValueForPatternName("background-validation-millis") != null && !childNode.getTextValueForPatternName("background-validation-millis").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("background-validation-millis")); + } + return null; + } + + /** + * Removes the background-validation-millis element + * @return the current instance of ValidationType + */ + public ValidationType removeBackgroundValidationMillis() + { + childNode.removeChildren("background-validation-millis"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : use-fast-fail + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-fast-fail element + * @param useFastFail the value for the element use-fast-fail + * @return the current instance of ValidationType + */ + public ValidationType useFastFail(Boolean useFastFail) + { + childNode.getOrCreate("use-fast-fail").text(useFastFail); + return this; + } + + /** + * Returns the use-fast-fail element + * @return the node defined for the element use-fast-fail + */ + public Boolean isUseFastFail() + { + return Strings.isTrue(childNode.getTextValueForPatternName("use-fast-fail")); + } + + /** + * Removes the use-fast-fail element + * @return the current instance of ValidationType + */ + public ValidationType removeUseFastFail() + { + childNode.removeChildren("use-fast-fail"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/XaPoolTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/XaPoolTypeImpl.java new file mode 100644 index 00000000..236715cd --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/XaPoolTypeImpl.java @@ -0,0 +1,239 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.XaPoolType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the xa-poolType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class XaPoolTypeImpl implements Child, XaPoolType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public XaPoolTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public XaPoolTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : is-same-rm-override + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the is-same-rm-override element + * @param isSameRmOverride the value for the element is-same-rm-override + * @return the current instance of XaPoolType + */ + public XaPoolType isSameRmOverride(Boolean isSameRmOverride) + { + childNode.getOrCreate("is-same-rm-override").text(isSameRmOverride); + return this; + } + + /** + * Returns the is-same-rm-override element + * @return the node defined for the element is-same-rm-override + */ + public Boolean isIsSameRmOverride() + { + return Strings.isTrue(childNode.getTextValueForPatternName("is-same-rm-override")); + } + + /** + * Removes the is-same-rm-override element + * @return the current instance of XaPoolType + */ + public XaPoolType removeIsSameRmOverride() + { + childNode.removeChildren("is-same-rm-override"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: javaee:emptyType ElementType : interleaving + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the interleaving element + * @return the current instance of XaPoolType + */ + public XaPoolType interleaving() + { + childNode.getOrCreate("interleaving"); + return this; + } + + /** + * Removes the interleaving element + * @return the current instance of XaPoolType + */ + public Boolean isInterleaving() + { + return childNode.getSingle("interleaving") != null; + } + + /** + * Removes the interleaving element + * @return the current instance of XaPoolType + */ + public XaPoolType removeInterleaving() + { + childNode.removeChild("interleaving"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: javaee:emptyType ElementType : no-tx-separate-pools + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public XaPoolType noTxSeparatePools() + { + childNode.getOrCreate("no-tx-separate-pools"); + return this; + } + + /** + * Removes the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public Boolean isNoTxSeparatePools() + { + return childNode.getSingle("no-tx-separate-pools") != null; + } + + /** + * Removes the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public XaPoolType removeNoTxSeparatePools() + { + childNode.removeChild("no-tx-separate-pools"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : pad-xid + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pad-xid element + * @param padXid the value for the element pad-xid + * @return the current instance of XaPoolType + */ + public XaPoolType padXid(Boolean padXid) + { + childNode.getOrCreate("pad-xid").text(padXid); + return this; + } + + /** + * Returns the pad-xid element + * @return the node defined for the element pad-xid + */ + public Boolean isPadXid() + { + return Strings.isTrue(childNode.getTextValueForPatternName("pad-xid")); + } + + /** + * Removes the pad-xid element + * @return the current instance of XaPoolType + */ + public XaPoolType removePadXid() + { + childNode.removeChildren("pad-xid"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : wrap-xa-resource + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the wrap-xa-resource element + * @param wrapXaResource the value for the element wrap-xa-resource + * @return the current instance of XaPoolType + */ + public XaPoolType wrapXaResource(Boolean wrapXaResource) + { + childNode.getOrCreate("wrap-xa-resource").text(wrapXaResource); + return this; + } + + /** + * Returns the wrap-xa-resource element + * @return the node defined for the element wrap-xa-resource + */ + public Boolean isWrapXaResource() + { + return Strings.isTrue(childNode.getTextValueForPatternName("wrap-xa-resource")); + } + + /** + * Removes the wrap-xa-resource element + * @return the current instance of XaPoolType + */ + public XaPoolType removeWrapXaResource() + { + childNode.removeChildren("wrap-xa-resource"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/package-info.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/package-info.java new file mode 100644 index 00000000..6d24643c --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/package-info.java @@ -0,0 +1,5 @@ + /** + * Provides the implementation classes as defined in the schema ironjacamar_1_0.xsd + */ + +package org.jboss.shrinkwrap.descriptor.impl.ironjacamar10; diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/AdminObjectTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/AdminObjectTypeImpl.java new file mode 100644 index 00000000..940f7245 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/AdminObjectTypeImpl.java @@ -0,0 +1,294 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.AdminObjectType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConfigPropertyTypeImpl; + +/** + * This class implements the admin-objectType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class AdminObjectTypeImpl implements Child, AdminObjectType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public AdminObjectTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public AdminObjectTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of AdminObjectType + */ + public AdminObjectType className(String className) + { + childNode.attribute("class-name", className); + return this; + } + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ + public String getClassName() + { + return childNode.getAttribute("class-name"); + } + + /** + * Removes the class-name attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeClassName() + { + childNode.removeAttribute("class-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:token ElementType : jndi-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jndi-name attribute + * @param jndiName the value for the attribute jndi-name + * @return the current instance of AdminObjectType + */ + public AdminObjectType jndiName(String jndiName) + { + childNode.attribute("jndi-name", jndiName); + return this; + } + + /** + * Returns the jndi-name attribute + * @return the value defined for the attribute jndi-name + */ + public String getJndiName() + { + return childNode.getAttribute("jndi-name"); + } + + /** + * Removes the jndi-name attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeJndiName() + { + childNode.removeAttribute("jndi-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:boolean ElementType : enabled + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the enabled attribute + * @param enabled the value for the attribute enabled + * @return the current instance of AdminObjectType + */ + public AdminObjectType enabled(Boolean enabled) + { + childNode.attribute("enabled", enabled); + return this; + } + + /** + * Returns the enabled attribute + * @return the value defined for the attribute enabled + */ + public Boolean isEnabled() + { + return Strings.isTrue(childNode.getAttribute("enabled")); + } + + /** + * Removes the enabled attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeEnabled() + { + childNode.removeAttribute("enabled"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:boolean ElementType : use-java-context + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-java-context attribute + * @param useJavaContext the value for the attribute use-java-context + * @return the current instance of AdminObjectType + */ + public AdminObjectType useJavaContext(Boolean useJavaContext) + { + childNode.attribute("use-java-context", useJavaContext); + return this; + } + + /** + * Returns the use-java-context attribute + * @return the value defined for the attribute use-java-context + */ + public Boolean isUseJavaContext() + { + return Strings.isTrue(childNode.getAttribute("use-java-context")); + } + + /** + * Removes the use-java-context attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removeUseJavaContext() + { + childNode.removeAttribute("use-java-context"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: xsd:token ElementType : pool-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pool-name attribute + * @param poolName the value for the attribute pool-name + * @return the current instance of AdminObjectType + */ + public AdminObjectType poolName(String poolName) + { + childNode.attribute("pool-name", poolName); + return this; + } + + /** + * Returns the pool-name attribute + * @return the value defined for the attribute pool-name + */ + public String getPoolName() + { + return childNode.getAttribute("pool-name"); + } + + /** + * Removes the pool-name attribute + * @return the current instance of AdminObjectType + */ + public AdminObjectType removePoolName() + { + childNode.removeAttribute("pool-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectType ElementName: resourceadapters:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty() + { + List nodeList = childNode.get("config-property"); + if (nodeList != null && nodeList.size() > 1) + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode, nodeList.get(0)); + } + return createConfigProperty(); + } + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty() + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode); + } + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("config-property"); + for(Node node: nodeList) + { + ConfigPropertyType> type = new ConfigPropertyTypeImpl>(this, "config-property", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public AdminObjectType removeAllConfigProperty() + { + childNode.removeChildren("config-property"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/AdminObjectsTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/AdminObjectsTypeImpl.java new file mode 100644 index 00000000..b05e54cb --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/AdminObjectsTypeImpl.java @@ -0,0 +1,119 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.AdminObjectsType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.AdminObjectType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.AdminObjectTypeImpl; + +/** + * This class implements the admin-objectsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class AdminObjectsTypeImpl implements Child, AdminObjectsType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public AdminObjectsTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public AdminObjectsTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: AdminObjectsType ElementName: resourceadapters:admin-objectType ElementType : admin-object + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new admin-object element will be created and returned. + * Otherwise, the first existing admin-object element will be returned. + * @return the instance defined for the element admin-object + */ + public AdminObjectType> getOrCreateAdminObject() + { + List nodeList = childNode.get("admin-object"); + if (nodeList != null && nodeList.size() > 1) + { + return new AdminObjectTypeImpl>(this, "admin-object", childNode, nodeList.get(0)); + } + return createAdminObject(); + } + + /** + * Creates a new admin-object element + * @return the new created instance of AdminObjectType> + */ + public AdminObjectType> createAdminObject() + { + return new AdminObjectTypeImpl>(this, "admin-object", childNode); + } + + /** + * Returns all admin-object elements + * @return list of admin-object + */ + public List>> getAllAdminObject() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("admin-object"); + for(Node node: nodeList) + { + AdminObjectType> type = new AdminObjectTypeImpl>(this, "admin-object", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all admin-object elements + * @return the current instance of AdminObjectType> + */ + public AdminObjectsType removeAllAdminObject() + { + childNode.removeChildren("admin-object"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/BeanValidationGroupsTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/BeanValidationGroupsTypeImpl.java new file mode 100644 index 00000000..71c1e59a --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/BeanValidationGroupsTypeImpl.java @@ -0,0 +1,110 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.BeanValidationGroupsType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the bean-validation-groupsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class BeanValidationGroupsTypeImpl implements Child, BeanValidationGroupsType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public BeanValidationGroupsTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public BeanValidationGroupsTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: BeanValidationGroupsType ElementName: xsd:token ElementType : bean-validation-group + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Creates for all String objects representing bean-validation-group elements, + * a new bean-validation-group element + * @param values list of bean-validation-group objects + * @return the current instance of BeanValidationGroupsType + */ + public BeanValidationGroupsType beanValidationGroup(String ... values) + { + if (values != null) + { + for(String name: values) + { + childNode.createChild("bean-validation-group").text(name); + } + } + return this; + } + + /** + * Returns all bean-validation-group elements + * @return list of bean-validation-group + */ +public List getAllBeanValidationGroup() + { + List result = new ArrayList(); + List nodes = childNode.get("bean-validation-group"); + for (Node node : nodes) + { + result.add(node.getText()); + } + return result; + } + + /** + * Removes the bean-validation-group element + * @return the current instance of BeanValidationGroupsType + */ + public BeanValidationGroupsType removeAllBeanValidationGroup() + { + childNode.removeChildren("bean-validation-group"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConfigPropertyTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConfigPropertyTypeImpl.java new file mode 100644 index 00000000..eedcba3f --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConfigPropertyTypeImpl.java @@ -0,0 +1,142 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the config-propertyType xsd type + *

+ * Original Documentation: + *

+ *
+ * [
+ * Specifies an override for a config-property element in ra.xml or a @ConfigProperty
+ *
+ *
+ * + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ConfigPropertyTypeImpl implements Child, ConfigPropertyType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ConfigPropertyTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ConfigPropertyTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConfigPropertyType ElementName: xsd:token ElementType : name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the name attribute + * @param name the value for the attribute name + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType name(String name) + { + childNode.attribute("name", name); + return this; + } + + /** + * Returns the name attribute + * @return the value defined for the attribute name + */ + public String getName() + { + return childNode.getAttribute("name"); + } + + /** + * Removes the name attribute + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType removeName() + { + childNode.removeAttribute("name"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConfigPropertyType ElementName: xsd:token ElementType : config-propertyType + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the config-propertyType element + * @param configPropertyType the value for the element config-propertyType + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType configPropertyType(String configPropertyType) + { + childNode.getOrCreate("config-propertyType").text(configPropertyType); + return this; + } + + /** + * Returns the config-propertyType element + * @return the node defined for the element config-propertyType + */ + public String getConfigPropertyType() + { + return childNode.getTextValueForPatternName("config-propertyType"); + } + + /** + * Removes the config-propertyType element + * @return the current instance of ConfigPropertyType + */ + public ConfigPropertyType removeConfigPropertyType() + { + childNode.removeChildren("config-propertyType"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConnectionDefinitionsTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConnectionDefinitionsTypeImpl.java new file mode 100644 index 00000000..01832e1c --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConnectionDefinitionsTypeImpl.java @@ -0,0 +1,119 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConnectionDefinitionsType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConnectionDefintionType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConnectionDefintionTypeImpl; + +/** + * This class implements the connection-definitionsType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ConnectionDefinitionsTypeImpl implements Child, ConnectionDefinitionsType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ConnectionDefinitionsTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ConnectionDefinitionsTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefinitionsType ElementName: resourceadapters:connection-defintionType ElementType : connection-definition + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new connection-definition element will be created and returned. + * Otherwise, the first existing connection-definition element will be returned. + * @return the instance defined for the element connection-definition + */ + public ConnectionDefintionType> getOrCreateConnectionDefinition() + { + List nodeList = childNode.get("connection-definition"); + if (nodeList != null && nodeList.size() > 1) + { + return new ConnectionDefintionTypeImpl>(this, "connection-definition", childNode, nodeList.get(0)); + } + return createConnectionDefinition(); + } + + /** + * Creates a new connection-definition element + * @return the new created instance of ConnectionDefintionType> + */ + public ConnectionDefintionType> createConnectionDefinition() + { + return new ConnectionDefintionTypeImpl>(this, "connection-definition", childNode); + } + + /** + * Returns all connection-definition elements + * @return list of connection-definition + */ + public List>> getAllConnectionDefinition() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("connection-definition"); + for(Node node: nodeList) + { + ConnectionDefintionType> type = new ConnectionDefintionTypeImpl>(this, "connection-definition", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all connection-definition elements + * @return the current instance of ConnectionDefintionType> + */ + public ConnectionDefinitionsType removeAllConnectionDefinition() + { + childNode.removeChildren("connection-definition"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConnectionDefintionTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConnectionDefintionTypeImpl.java new file mode 100644 index 00000000..eaf7a8d2 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConnectionDefintionTypeImpl.java @@ -0,0 +1,510 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConnectionDefintionType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConfigPropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.SecurityType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.SecurityTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.TimeoutType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.TimeoutTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ValidationType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ValidationTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.RecoverType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.RecoverTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.PoolType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.PoolTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.XaPoolType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.XaPoolTypeImpl; + +/** + * This class implements the connection-defintionType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ConnectionDefintionTypeImpl implements Child, ConnectionDefintionType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ConnectionDefintionTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ConnectionDefintionTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType className(String className) + { + childNode.attribute("class-name", className); + return this; + } + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ + public String getClassName() + { + return childNode.getAttribute("class-name"); + } + + /** + * Removes the class-name attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeClassName() + { + childNode.removeAttribute("class-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:token ElementType : jndi-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the jndi-name attribute + * @param jndiName the value for the attribute jndi-name + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType jndiName(String jndiName) + { + childNode.attribute("jndi-name", jndiName); + return this; + } + + /** + * Returns the jndi-name attribute + * @return the value defined for the attribute jndi-name + */ + public String getJndiName() + { + return childNode.getAttribute("jndi-name"); + } + + /** + * Removes the jndi-name attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeJndiName() + { + childNode.removeAttribute("jndi-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:boolean ElementType : enabled + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the enabled attribute + * @param enabled the value for the attribute enabled + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType enabled(Boolean enabled) + { + childNode.attribute("enabled", enabled); + return this; + } + + /** + * Returns the enabled attribute + * @return the value defined for the attribute enabled + */ + public Boolean isEnabled() + { + return Strings.isTrue(childNode.getAttribute("enabled")); + } + + /** + * Removes the enabled attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeEnabled() + { + childNode.removeAttribute("enabled"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:boolean ElementType : use-java-context + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-java-context attribute + * @param useJavaContext the value for the attribute use-java-context + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType useJavaContext(Boolean useJavaContext) + { + childNode.attribute("use-java-context", useJavaContext); + return this; + } + + /** + * Returns the use-java-context attribute + * @return the value defined for the attribute use-java-context + */ + public Boolean isUseJavaContext() + { + return Strings.isTrue(childNode.getAttribute("use-java-context")); + } + + /** + * Removes the use-java-context attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeUseJavaContext() + { + childNode.removeAttribute("use-java-context"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:token ElementType : pool-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pool-name attribute + * @param poolName the value for the attribute pool-name + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType poolName(String poolName) + { + childNode.attribute("pool-name", poolName); + return this; + } + + /** + * Returns the pool-name attribute + * @return the value defined for the attribute pool-name + */ + public String getPoolName() + { + return childNode.getAttribute("pool-name"); + } + + /** + * Removes the pool-name attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removePoolName() + { + childNode.removeAttribute("pool-name"); + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty() + { + List nodeList = childNode.get("config-property"); + if (nodeList != null && nodeList.size() > 1) + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode, nodeList.get(0)); + } + return createConfigProperty(); + } + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty() + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode); + } + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("config-property"); + for(Node node: nodeList) + { + ConfigPropertyType> type = new ConfigPropertyTypeImpl>(this, "config-property", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public ConnectionDefintionType removeAllConfigProperty() + { + childNode.removeChildren("config-property"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:securityType ElementType : security + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new security element with the given value will be created. + * Otherwise, the existing security element will be returned. + * @return a new or existing instance of SecurityType> + */ + public SecurityType> getOrCreateSecurity() + { + Node node = childNode.getOrCreate("security"); + SecurityType> security = new SecurityTypeImpl>(this, "security", childNode, node); + return security; + } + + /** + * Removes the security element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeSecurity() + { + childNode.removeChildren("security"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:timeoutType ElementType : timeout + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new timeout element with the given value will be created. + * Otherwise, the existing timeout element will be returned. + * @return a new or existing instance of TimeoutType> + */ + public TimeoutType> getOrCreateTimeout() + { + Node node = childNode.getOrCreate("timeout"); + TimeoutType> timeout = new TimeoutTypeImpl>(this, "timeout", childNode, node); + return timeout; + } + + /** + * Removes the timeout element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeTimeout() + { + childNode.removeChildren("timeout"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:validationType ElementType : validation + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new validation element with the given value will be created. + * Otherwise, the existing validation element will be returned. + * @return a new or existing instance of ValidationType> + */ + public ValidationType> getOrCreateValidation() + { + Node node = childNode.getOrCreate("validation"); + ValidationType> validation = new ValidationTypeImpl>(this, "validation", childNode, node); + return validation; + } + + /** + * Removes the validation element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeValidation() + { + childNode.removeChildren("validation"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:recoverType ElementType : recovery + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recovery element with the given value will be created. + * Otherwise, the existing recovery element will be returned. + * @return a new or existing instance of RecoverType> + */ + public RecoverType> getOrCreateRecovery() + { + Node node = childNode.getOrCreate("recovery"); + RecoverType> recovery = new RecoverTypeImpl>(this, "recovery", childNode, node); + return recovery; + } + + /** + * Removes the recovery element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeRecovery() + { + childNode.removeChildren("recovery"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:poolType ElementType : pool + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new pool element with the given value will be created. + * Otherwise, the existing pool element will be returned. + * @return a new or existing instance of PoolType> + */ + public PoolType> getOrCreatePool() + { + Node node = childNode.getOrCreate("pool"); + PoolType> pool = new PoolTypeImpl>(this, "pool", childNode, node); + return pool; + } + + /** + * Removes the pool element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removePool() + { + childNode.removeChildren("pool"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: resourceadapters:xa-poolType ElementType : xa-pool + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new xa-pool element with the given value will be created. + * Otherwise, the existing xa-pool element will be returned. + * @return a new or existing instance of XaPoolType> + */ + public XaPoolType> getOrCreateXaPool() + { + Node node = childNode.getOrCreate("xa-pool"); + XaPoolType> xaPool = new XaPoolTypeImpl>(this, "xa-pool", childNode, node); + return xaPool; + } + + /** + * Removes the xa-pool element + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeXaPool() + { + childNode.removeChildren("xa-pool"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ConnectionDefintionType ElementName: xsd:boolean ElementType : use-ccm + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-ccm attribute + * @param useCcm the value for the attribute use-ccm + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType useCcm(Boolean useCcm) + { + childNode.attribute("use-ccm", useCcm); + return this; + } + + /** + * Returns the use-ccm attribute + * @return the value defined for the attribute use-ccm + */ + public Boolean isUseCcm() + { + return Strings.isTrue(childNode.getAttribute("use-ccm")); + } + + /** + * Removes the use-ccm attribute + * @return the current instance of ConnectionDefintionType + */ + public ConnectionDefintionType removeUseCcm() + { + childNode.removeAttribute("use-ccm"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/CredentialTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/CredentialTypeImpl.java new file mode 100644 index 00000000..0f8df6b1 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/CredentialTypeImpl.java @@ -0,0 +1,169 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.CredentialType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the credentialType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class CredentialTypeImpl implements Child, CredentialType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public CredentialTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public CredentialTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: CredentialType ElementName: xsd:token ElementType : user-name + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the user-name element + * @param userName the value for the element user-name + * @return the current instance of CredentialType + */ + public CredentialType userName(String userName) + { + childNode.getOrCreate("user-name").text(userName); + return this; + } + + /** + * Returns the user-name element + * @return the node defined for the element user-name + */ + public String getUserName() + { + return childNode.getTextValueForPatternName("user-name"); + } + + /** + * Removes the user-name element + * @return the current instance of CredentialType + */ + public CredentialType removeUserName() + { + childNode.removeChildren("user-name"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: CredentialType ElementName: xsd:token ElementType : password + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the password element + * @param password the value for the element password + * @return the current instance of CredentialType + */ + public CredentialType password(String password) + { + childNode.getOrCreate("password").text(password); + return this; + } + + /** + * Returns the password element + * @return the node defined for the element password + */ + public String getPassword() + { + return childNode.getTextValueForPatternName("password"); + } + + /** + * Removes the password element + * @return the current instance of CredentialType + */ + public CredentialType removePassword() + { + childNode.removeChildren("password"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: CredentialType ElementName: xsd:token ElementType : security-domain + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain element + * @param securityDomain the value for the element security-domain + * @return the current instance of CredentialType + */ + public CredentialType securityDomain(String securityDomain) + { + childNode.getOrCreate("security-domain").text(securityDomain); + return this; + } + + /** + * Returns the security-domain element + * @return the node defined for the element security-domain + */ + public String getSecurityDomain() + { + return childNode.getTextValueForPatternName("security-domain"); + } + + /** + * Removes the security-domain element + * @return the current instance of CredentialType + */ + public CredentialType removeSecurityDomain() + { + childNode.removeChildren("security-domain"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ExtensionTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ExtensionTypeImpl.java new file mode 100644 index 00000000..f14f3913 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ExtensionTypeImpl.java @@ -0,0 +1,127 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ExtensionType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConfigPropertyTypeImpl; + +/** + * This class implements the extensionType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ExtensionTypeImpl implements Child, ExtensionType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ExtensionTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ExtensionTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ExtensionType ElementName: resourceadapters:config-propertyType ElementType : config-property + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element with the given value will be created. + * Otherwise, the existing config-property element will be returned. + * @return a new or existing instance of ConfigPropertyType> + */ + public ConfigPropertyType> getOrCreateConfigProperty() + { + Node node = childNode.getOrCreate("config-property"); + ConfigPropertyType> configProperty = new ConfigPropertyTypeImpl>(this, "config-property", childNode, node); + return configProperty; + } + + /** + * Removes the config-property element + * @return the current instance of ExtensionType + */ + public ExtensionType removeConfigProperty() + { + childNode.removeChildren("config-property"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ExtensionType ElementName: xsd:token ElementType : class-name + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the class-name attribute + * @param className the value for the attribute class-name + * @return the current instance of ExtensionType + */ + public ExtensionType className(String className) + { + childNode.attribute("class-name", className); + return this; + } + + /** + * Returns the class-name attribute + * @return the value defined for the attribute class-name + */ + public String getClassName() + { + return childNode.getAttribute("class-name"); + } + + /** + * Removes the class-name attribute + * @return the current instance of ExtensionType + */ + public ExtensionType removeClassName() + { + childNode.removeAttribute("class-name"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/PoolTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/PoolTypeImpl.java new file mode 100644 index 00000000..f70ae765 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/PoolTypeImpl.java @@ -0,0 +1,247 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.PoolType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the poolType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class PoolTypeImpl implements Child, PoolType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public PoolTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public PoolTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:nonNegativeInteger ElementType : min-pool-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the min-pool-size element + * @param minPoolSize the value for the element min-pool-size + * @return the current instance of PoolType + */ + public PoolType minPoolSize(Integer minPoolSize) + { + childNode.getOrCreate("min-pool-size").text(minPoolSize); + return this; + } + + /** + * Returns the min-pool-size element + * @return the node defined for the element min-pool-size + */ + public Integer getMinPoolSize() + { + if (childNode.getTextValueForPatternName("min-pool-size") != null && !childNode.getTextValueForPatternName("min-pool-size").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("min-pool-size")); + } + return null; + } + + /** + * Removes the min-pool-size element + * @return the current instance of PoolType + */ + public PoolType removeMinPoolSize() + { + childNode.removeChildren("min-pool-size"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:nonNegativeInteger ElementType : max-pool-size + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the max-pool-size element + * @param maxPoolSize the value for the element max-pool-size + * @return the current instance of PoolType + */ + public PoolType maxPoolSize(Integer maxPoolSize) + { + childNode.getOrCreate("max-pool-size").text(maxPoolSize); + return this; + } + + /** + * Returns the max-pool-size element + * @return the node defined for the element max-pool-size + */ + public Integer getMaxPoolSize() + { + if (childNode.getTextValueForPatternName("max-pool-size") != null && !childNode.getTextValueForPatternName("max-pool-size").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("max-pool-size")); + } + return null; + } + + /** + * Removes the max-pool-size element + * @return the current instance of PoolType + */ + public PoolType removeMaxPoolSize() + { + childNode.removeChildren("max-pool-size"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:boolean ElementType : prefill + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the prefill element + * @param prefill the value for the element prefill + * @return the current instance of PoolType + */ + public PoolType prefill(Boolean prefill) + { + childNode.getOrCreate("prefill").text(prefill); + return this; + } + + /** + * Returns the prefill element + * @return the node defined for the element prefill + */ + public Boolean isPrefill() + { + return Strings.isTrue(childNode.getTextValueForPatternName("prefill")); + } + + /** + * Removes the prefill element + * @return the current instance of PoolType + */ + public PoolType removePrefill() + { + childNode.removeChildren("prefill"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:boolean ElementType : use-strict-min + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-strict-min element + * @param useStrictMin the value for the element use-strict-min + * @return the current instance of PoolType + */ + public PoolType useStrictMin(Boolean useStrictMin) + { + childNode.getOrCreate("use-strict-min").text(useStrictMin); + return this; + } + + /** + * Returns the use-strict-min element + * @return the node defined for the element use-strict-min + */ + public Boolean isUseStrictMin() + { + return Strings.isTrue(childNode.getTextValueForPatternName("use-strict-min")); + } + + /** + * Removes the use-strict-min element + * @return the current instance of PoolType + */ + public PoolType removeUseStrictMin() + { + childNode.removeChildren("use-strict-min"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: PoolType ElementName: xsd:token ElementType : flush-strategy + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the flush-strategy element + * @param flushStrategy the value for the element flush-strategy + * @return the current instance of PoolType + */ + public PoolType flushStrategy(String flushStrategy) + { + childNode.getOrCreate("flush-strategy").text(flushStrategy); + return this; + } + + /** + * Returns the flush-strategy element + * @return the node defined for the element flush-strategy + */ + public String getFlushStrategy() + { + return childNode.getTextValueForPatternName("flush-strategy"); + } + + /** + * Removes the flush-strategy element + * @return the current instance of PoolType + */ + public PoolType removeFlushStrategy() + { + childNode.removeChildren("flush-strategy"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/RecoverTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/RecoverTypeImpl.java new file mode 100644 index 00000000..05bc0d6d --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/RecoverTypeImpl.java @@ -0,0 +1,157 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.RecoverType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.CredentialType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.CredentialTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ExtensionTypeImpl; + +/** + * This class implements the recoverType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class RecoverTypeImpl implements Child, RecoverType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public RecoverTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public RecoverTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: resourceadapters:credentialType ElementType : recover-credential + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recover-credential element with the given value will be created. + * Otherwise, the existing recover-credential element will be returned. + * @return a new or existing instance of CredentialType> + */ + public CredentialType> getOrCreateRecoverCredential() + { + Node node = childNode.getOrCreate("recover-credential"); + CredentialType> recoverCredential = new CredentialTypeImpl>(this, "recover-credential", childNode, node); + return recoverCredential; + } + + /** + * Removes the recover-credential element + * @return the current instance of RecoverType + */ + public RecoverType removeRecoverCredential() + { + childNode.removeChildren("recover-credential"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: resourceadapters:extensionType ElementType : recover-plugin + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new recover-plugin element with the given value will be created. + * Otherwise, the existing recover-plugin element will be returned. + * @return a new or existing instance of ExtensionType> + */ + public ExtensionType> getOrCreateRecoverPlugin() + { + Node node = childNode.getOrCreate("recover-plugin"); + ExtensionType> recoverPlugin = new ExtensionTypeImpl>(this, "recover-plugin", childNode, node); + return recoverPlugin; + } + + /** + * Removes the recover-plugin element + * @return the current instance of RecoverType + */ + public RecoverType removeRecoverPlugin() + { + childNode.removeChildren("recover-plugin"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: RecoverType ElementName: xsd:boolean ElementType : no-recovery + // MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the no-recovery attribute + * @param noRecovery the value for the attribute no-recovery + * @return the current instance of RecoverType + */ + public RecoverType noRecovery(Boolean noRecovery) + { + childNode.attribute("no-recovery", noRecovery); + return this; + } + + /** + * Returns the no-recovery attribute + * @return the value defined for the attribute no-recovery + */ + public Boolean isNoRecovery() + { + return Strings.isTrue(childNode.getAttribute("no-recovery")); + } + + /** + * Removes the no-recovery attribute + * @return the current instance of RecoverType + */ + public RecoverType removeNoRecovery() + { + childNode.removeAttribute("no-recovery"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdapterTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdapterTypeImpl.java new file mode 100644 index 00000000..0941e21f --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdapterTypeImpl.java @@ -0,0 +1,336 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdapterType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.BeanValidationGroupsType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.BeanValidationGroupsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConfigPropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.TransactionSupportType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConnectionDefinitionsType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConnectionDefinitionsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.AdminObjectsType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.AdminObjectsTypeImpl; + +/** + * This class implements the resource-adapterType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ResourceAdapterTypeImpl implements Child, ResourceAdapterType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ResourceAdapterTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ResourceAdapterTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: xsd:token ElementType : archive + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the archive element + * @param archive the value for the element archive + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType archive(String archive) + { + childNode.getOrCreate("archive").text(archive); + return this; + } + + /** + * Returns the archive element + * @return the node defined for the element archive + */ + public String getArchive() + { + return childNode.getTextValueForPatternName("archive"); + } + + /** + * Removes the archive element + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType removeArchive() + { + childNode.removeChildren("archive"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: resourceadapters:bean-validation-groupsType ElementType : bean-validation-groups + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new bean-validation-groups element with the given value will be created. + * Otherwise, the existing bean-validation-groups element will be returned. + * @return a new or existing instance of BeanValidationGroupsType> + */ + public BeanValidationGroupsType> getOrCreateBeanValidationGroups() + { + Node node = childNode.getOrCreate("bean-validation-groups"); + BeanValidationGroupsType> beanValidationGroups = new BeanValidationGroupsTypeImpl>(this, "bean-validation-groups", childNode, node); + return beanValidationGroups; + } + + /** + * Removes the bean-validation-groups element + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType removeBeanValidationGroups() + { + childNode.removeChildren("bean-validation-groups"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: xsd:token ElementType : bootstrap-context + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the bootstrap-context element + * @param bootstrapContext the value for the element bootstrap-context + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType bootstrapContext(String bootstrapContext) + { + childNode.getOrCreate("bootstrap-context").text(bootstrapContext); + return this; + } + + /** + * Returns the bootstrap-context element + * @return the node defined for the element bootstrap-context + */ + public String getBootstrapContext() + { + return childNode.getTextValueForPatternName("bootstrap-context"); + } + + /** + * Removes the bootstrap-context element + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType removeBootstrapContext() + { + childNode.removeChildren("bootstrap-context"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: resourceadapters:config-propertyType ElementType : config-property + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new config-property element will be created and returned. + * Otherwise, the first existing config-property element will be returned. + * @return the instance defined for the element config-property + */ + public ConfigPropertyType> getOrCreateConfigProperty() + { + List nodeList = childNode.get("config-property"); + if (nodeList != null && nodeList.size() > 1) + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode, nodeList.get(0)); + } + return createConfigProperty(); + } + + /** + * Creates a new config-property element + * @return the new created instance of ConfigPropertyType> + */ + public ConfigPropertyType> createConfigProperty() + { + return new ConfigPropertyTypeImpl>(this, "config-property", childNode); + } + + /** + * Returns all config-property elements + * @return list of config-property + */ + public List>> getAllConfigProperty() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("config-property"); + for(Node node: nodeList) + { + ConfigPropertyType> type = new ConfigPropertyTypeImpl>(this, "config-property", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all config-property elements + * @return the current instance of ConfigPropertyType> + */ + public ResourceAdapterType removeAllConfigProperty() + { + childNode.removeChildren("config-property"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: resourceadapters:transaction-supportType ElementType : transaction-support + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: true isDataType: false + // --------------------------------------------------------------------------------------------------------|| + /** + * Sets the transaction-support element + * @param transactionSupport the value for the element transaction-support + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType transactionSupport(TransactionSupportType transactionSupport) + { + childNode.getOrCreate("transaction-support").text(transactionSupport); + return this; + } + /** + * Sets the transaction-support element + * @param transactionSupport the value for the element transaction-support + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType transactionSupport(String transactionSupport) + { + childNode.getOrCreate("transaction-support").text(transactionSupport); + return this; + } + + /** + * Returns the transaction-support element + * @return the value found for the element transaction-support + */ + public TransactionSupportType getTransactionSupport() + { + return TransactionSupportType.getFromStringValue(childNode.getTextValueForPatternName("transaction-support")); + } + + /** + * Returns the transaction-support element + * @return the value found for the element transaction-support + */ + public String getTransactionSupportAsString() + { + return childNode.getTextValueForPatternName("transaction-support"); + } + + /** + * Removes the transaction-support attribute + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType removeTransactionSupport() + { + childNode.removeAttribute("transaction-support"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: resourceadapters:connection-definitionsType ElementType : connection-definitions + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new connection-definitions element with the given value will be created. + * Otherwise, the existing connection-definitions element will be returned. + * @return a new or existing instance of ConnectionDefinitionsType> + */ + public ConnectionDefinitionsType> getOrCreateConnectionDefinitions() + { + Node node = childNode.getOrCreate("connection-definitions"); + ConnectionDefinitionsType> connectionDefinitions = new ConnectionDefinitionsTypeImpl>(this, "connection-definitions", childNode, node); + return connectionDefinitions; + } + + /** + * Removes the connection-definitions element + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType removeConnectionDefinitions() + { + childNode.removeChildren("connection-definitions"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdapterType ElementName: resourceadapters:admin-objectsType ElementType : admin-objects + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new admin-objects element with the given value will be created. + * Otherwise, the existing admin-objects element will be returned. + * @return a new or existing instance of AdminObjectsType> + */ + public AdminObjectsType> getOrCreateAdminObjects() + { + Node node = childNode.getOrCreate("admin-objects"); + AdminObjectsType> adminObjects = new AdminObjectsTypeImpl>(this, "admin-objects", childNode, node); + return adminObjects; + } + + /** + * Removes the admin-objects element + * @return the current instance of ResourceAdapterType + */ + public ResourceAdapterType removeAdminObjects() + { + childNode.removeChildren("admin-objects"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdaptersDescriptorImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdaptersDescriptorImpl.java new file mode 100644 index 00000000..9902e362 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdaptersDescriptorImpl.java @@ -0,0 +1,207 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdaptersDescriptor; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdapterType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ResourceAdapterTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace; + +import org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorImplBase; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.spi.node.Node; + +/** + *

+ * This deployment descriptor provides the functionalities as described in the resource-adapters_1_0.xsd specification + *

+ * Example: + *

+ * + * ResourceAdaptersDescriptor descriptor = Descriptors.create(ResourceAdaptersDescriptor.class); + * + * + * + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ResourceAdaptersDescriptorImpl extends NodeDescriptorImplBase implements DescriptorNamespace, ResourceAdaptersDescriptor +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private Node model; + + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ResourceAdaptersDescriptorImpl(String descriptorName) + { + this(descriptorName, new Node("resource-adapters")); + } + + public ResourceAdaptersDescriptorImpl(String descriptorName, Node node) + { + super(descriptorName); + this.model = node; + addDefaultNamespaces(); + } + + // -------------------------------------------------------------------------------------|| + // Methods + // -------------------------------------------------------------------------------------|| + + public Node getRootNode() + { + return model; + } + + + + // -------------------------------------------------------------------------------------|| + // Namespace + // -------------------------------------------------------------------------------------|| + + + /** + * Adds the default namespaces as defined in the specification + * @return the current instance of ResourceAdaptersDescriptor + */ + public ResourceAdaptersDescriptor addDefaultNamespaces() + { + addNamespace("xmlns", "http://www.jboss.org/ironjacamar/schema"); + addNamespace("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); + addNamespace("xsi:schemaLocation", "http://www.jboss.org/ironjacamar/schema http://www.jboss.org/ironjacamar/schema/resource-adapters_1_0.xsd"); + return this; + } + + /** + * Adds a new namespace + * @return the current instance of ResourceAdaptersDescriptor + */ + public ResourceAdaptersDescriptor addNamespace(String name, String value) + { + model.attribute(name, value); + return this; + } + + /** + * Returns all defined namespaces. + * @return all defined namespaces + */ + public List getNamespaces() + { + List namespaceList = new ArrayList(); + Map attributes = model.getAttributes(); + for (String name: attributes.keySet()) + { + String value = attributes.get(name); + if (value != null && value.startsWith("http://")) + { + namespaceList.add(name + "=" + value); + } + } + return namespaceList; + } + + /** + * Removes all existing namespaces. + * @return the current instance of ResourceAdaptersDescriptor + */ + public ResourceAdaptersDescriptor removeAllNamespaces() + { + List nameSpaceKeys = new ArrayList(); + Map attributes = model.getAttributes(); + for (String name: attributes.keySet()) + { + String value = attributes.get(name); + if (value != null && value.startsWith("http://")) + { + nameSpaceKeys.add(name); + } + } + for (String name: nameSpaceKeys) + { + model.removeAttribute(name); + } + return this; + } + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdaptersDescriptor ElementName: resourceadapters:resource-adapterType ElementType : resource-adapter + // MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new resource-adapter element will be created and returned. + * Otherwise, the first existing resource-adapter element will be returned. + * @return the instance defined for the element resource-adapter + */ + public ResourceAdapterType getOrCreateResourceAdapter() + { + List nodeList = model.get("resource-adapter"); + if (nodeList != null && nodeList.size() > 1) + { + return new ResourceAdapterTypeImpl(this, "resource-adapter", model, nodeList.get(0)); + } + return createResourceAdapter(); + } + + /** + * Creates a new resource-adapter element + * @return the new created instance of ResourceAdapterType + */ + public ResourceAdapterType createResourceAdapter() + { + return new ResourceAdapterTypeImpl(this, "resource-adapter", model); + } + + /** + * Returns all resource-adapter elements + * @return list of resource-adapter + */ + public List> getAllResourceAdapter() + { + List> list = new ArrayList>(); + List nodeList = model.get("resource-adapter"); + for(Node node: nodeList) + { + ResourceAdapterType type = new ResourceAdapterTypeImpl(this, "resource-adapter", model, node); + list.add(type); + } + return list; + } + + /** + * Removes all resource-adapter elements + * @return the current instance of ResourceAdapterType + */ + public ResourceAdaptersDescriptor removeAllResourceAdapter() + { + model.removeChildren("resource-adapter"); + return this; + } + +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdaptersTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdaptersTypeImpl.java new file mode 100644 index 00000000..b4c2da88 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdaptersTypeImpl.java @@ -0,0 +1,119 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdaptersType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdapterType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ResourceAdapterTypeImpl; + +/** + * This class implements the resource-adaptersType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ResourceAdaptersTypeImpl implements Child, ResourceAdaptersType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ResourceAdaptersTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ResourceAdaptersTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ResourceAdaptersType ElementName: resourceadapters:resource-adapterType ElementType : resource-adapter + // MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * If not already created, a new resource-adapter element will be created and returned. + * Otherwise, the first existing resource-adapter element will be returned. + * @return the instance defined for the element resource-adapter + */ + public ResourceAdapterType> getOrCreateResourceAdapter() + { + List nodeList = childNode.get("resource-adapter"); + if (nodeList != null && nodeList.size() > 1) + { + return new ResourceAdapterTypeImpl>(this, "resource-adapter", childNode, nodeList.get(0)); + } + return createResourceAdapter(); + } + + /** + * Creates a new resource-adapter element + * @return the new created instance of ResourceAdapterType> + */ + public ResourceAdapterType> createResourceAdapter() + { + return new ResourceAdapterTypeImpl>(this, "resource-adapter", childNode); + } + + /** + * Returns all resource-adapter elements + * @return list of resource-adapter + */ + public List>> getAllResourceAdapter() + { + List>> list = new ArrayList>>(); + List nodeList = childNode.get("resource-adapter"); + for(Node node: nodeList) + { + ResourceAdapterType> type = new ResourceAdapterTypeImpl>(this, "resource-adapter", childNode, node); + list.add(type); + } + return list; + } + + /** + * Removes all resource-adapter elements + * @return the current instance of ResourceAdapterType> + */ + public ResourceAdaptersType removeAllResourceAdapter() + { + childNode.removeChildren("resource-adapter"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/SecurityTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/SecurityTypeImpl.java new file mode 100644 index 00000000..87490977 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/SecurityTypeImpl.java @@ -0,0 +1,168 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.SecurityType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the securityType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class SecurityTypeImpl implements Child, SecurityType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public SecurityTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public SecurityTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: SecurityType ElementName: javaee:emptyType ElementType : application + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the application element + * @return the current instance of SecurityType + */ + public SecurityType application() + { + childNode.getOrCreate("application"); + return this; + } + + /** + * Removes the application element + * @return the current instance of SecurityType + */ + public Boolean isApplication() + { + return childNode.getSingle("application") != null; + } + + /** + * Removes the application element + * @return the current instance of SecurityType + */ + public SecurityType removeApplication() + { + childNode.removeChild("application"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: SecurityType ElementName: xsd:token ElementType : security-domain + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain element + * @param securityDomain the value for the element security-domain + * @return the current instance of SecurityType + */ + public SecurityType securityDomain(String securityDomain) + { + childNode.getOrCreate("security-domain").text(securityDomain); + return this; + } + + /** + * Returns the security-domain element + * @return the node defined for the element security-domain + */ + public String getSecurityDomain() + { + return childNode.getTextValueForPatternName("security-domain"); + } + + /** + * Removes the security-domain element + * @return the current instance of SecurityType + */ + public SecurityType removeSecurityDomain() + { + childNode.removeChildren("security-domain"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: SecurityType ElementName: xsd:token ElementType : security-domain-and-application + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the security-domain-and-application element + * @param securityDomainAndApplication the value for the element security-domain-and-application + * @return the current instance of SecurityType + */ + public SecurityType securityDomainAndApplication(String securityDomainAndApplication) + { + childNode.getOrCreate("security-domain-and-application").text(securityDomainAndApplication); + return this; + } + + /** + * Returns the security-domain-and-application element + * @return the node defined for the element security-domain-and-application + */ + public String getSecurityDomainAndApplication() + { + return childNode.getTextValueForPatternName("security-domain-and-application"); + } + + /** + * Removes the security-domain-and-application element + * @return the current instance of SecurityType + */ + public SecurityType removeSecurityDomainAndApplication() + { + childNode.removeChildren("security-domain-and-application"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/TimeoutTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/TimeoutTypeImpl.java new file mode 100644 index 00000000..814b9826 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/TimeoutTypeImpl.java @@ -0,0 +1,256 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.TimeoutType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the timeoutType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class TimeoutTypeImpl implements Child, TimeoutType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public TimeoutTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public TimeoutTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : blocking-timeout-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the blocking-timeout-millis element + * @param blockingTimeoutMillis the value for the element blocking-timeout-millis + * @return the current instance of TimeoutType + */ + public TimeoutType blockingTimeoutMillis(Integer blockingTimeoutMillis) + { + childNode.getOrCreate("blocking-timeout-millis").text(blockingTimeoutMillis); + return this; + } + + /** + * Returns the blocking-timeout-millis element + * @return the node defined for the element blocking-timeout-millis + */ + public Integer getBlockingTimeoutMillis() + { + if (childNode.getTextValueForPatternName("blocking-timeout-millis") != null && !childNode.getTextValueForPatternName("blocking-timeout-millis").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("blocking-timeout-millis")); + } + return null; + } + + /** + * Removes the blocking-timeout-millis element + * @return the current instance of TimeoutType + */ + public TimeoutType removeBlockingTimeoutMillis() + { + childNode.removeChildren("blocking-timeout-millis"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : idle-timeout-minutes + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the idle-timeout-minutes element + * @param idleTimeoutMinutes the value for the element idle-timeout-minutes + * @return the current instance of TimeoutType + */ + public TimeoutType idleTimeoutMinutes(Integer idleTimeoutMinutes) + { + childNode.getOrCreate("idle-timeout-minutes").text(idleTimeoutMinutes); + return this; + } + + /** + * Returns the idle-timeout-minutes element + * @return the node defined for the element idle-timeout-minutes + */ + public Integer getIdleTimeoutMinutes() + { + if (childNode.getTextValueForPatternName("idle-timeout-minutes") != null && !childNode.getTextValueForPatternName("idle-timeout-minutes").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("idle-timeout-minutes")); + } + return null; + } + + /** + * Removes the idle-timeout-minutes element + * @return the current instance of TimeoutType + */ + public TimeoutType removeIdleTimeoutMinutes() + { + childNode.removeChildren("idle-timeout-minutes"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : allocation-retry + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the allocation-retry element + * @param allocationRetry the value for the element allocation-retry + * @return the current instance of TimeoutType + */ + public TimeoutType allocationRetry(Integer allocationRetry) + { + childNode.getOrCreate("allocation-retry").text(allocationRetry); + return this; + } + + /** + * Returns the allocation-retry element + * @return the node defined for the element allocation-retry + */ + public Integer getAllocationRetry() + { + if (childNode.getTextValueForPatternName("allocation-retry") != null && !childNode.getTextValueForPatternName("allocation-retry").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("allocation-retry")); + } + return null; + } + + /** + * Removes the allocation-retry element + * @return the current instance of TimeoutType + */ + public TimeoutType removeAllocationRetry() + { + childNode.removeChildren("allocation-retry"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : allocation-retry-wait-millis + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the allocation-retry-wait-millis element + * @param allocationRetryWaitMillis the value for the element allocation-retry-wait-millis + * @return the current instance of TimeoutType + */ + public TimeoutType allocationRetryWaitMillis(Integer allocationRetryWaitMillis) + { + childNode.getOrCreate("allocation-retry-wait-millis").text(allocationRetryWaitMillis); + return this; + } + + /** + * Returns the allocation-retry-wait-millis element + * @return the node defined for the element allocation-retry-wait-millis + */ + public Integer getAllocationRetryWaitMillis() + { + if (childNode.getTextValueForPatternName("allocation-retry-wait-millis") != null && !childNode.getTextValueForPatternName("allocation-retry-wait-millis").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("allocation-retry-wait-millis")); + } + return null; + } + + /** + * Removes the allocation-retry-wait-millis element + * @return the current instance of TimeoutType + */ + public TimeoutType removeAllocationRetryWaitMillis() + { + childNode.removeChildren("allocation-retry-wait-millis"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: TimeoutType ElementName: xsd:nonNegativeInteger ElementType : xa-resource-timeout + // MaxOccurs: -1 isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the xa-resource-timeout element + * @param xaResourceTimeout the value for the element xa-resource-timeout + * @return the current instance of TimeoutType + */ + public TimeoutType xaResourceTimeout(Integer xaResourceTimeout) + { + childNode.getOrCreate("xa-resource-timeout").text(xaResourceTimeout); + return this; + } + + /** + * Returns the xa-resource-timeout element + * @return the node defined for the element xa-resource-timeout + */ + public Integer getXaResourceTimeout() + { + if (childNode.getTextValueForPatternName("xa-resource-timeout") != null && !childNode.getTextValueForPatternName("xa-resource-timeout").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("xa-resource-timeout")); + } + return null; + } + + /** + * Removes the xa-resource-timeout element + * @return the current instance of TimeoutType + */ + public TimeoutType removeXaResourceTimeout() + { + childNode.removeChildren("xa-resource-timeout"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ValidationTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ValidationTypeImpl.java new file mode 100644 index 00000000..b2df9616 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ValidationTypeImpl.java @@ -0,0 +1,172 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ValidationType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the validationType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class ValidationTypeImpl implements Child, ValidationType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public ValidationTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public ValidationTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : background-validation + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the background-validation element + * @param backgroundValidation the value for the element background-validation + * @return the current instance of ValidationType + */ + public ValidationType backgroundValidation(Boolean backgroundValidation) + { + childNode.getOrCreate("background-validation").text(backgroundValidation); + return this; + } + + /** + * Returns the background-validation element + * @return the node defined for the element background-validation + */ + public Boolean isBackgroundValidation() + { + return Strings.isTrue(childNode.getTextValueForPatternName("background-validation")); + } + + /** + * Removes the background-validation element + * @return the current instance of ValidationType + */ + public ValidationType removeBackgroundValidation() + { + childNode.removeChildren("background-validation"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:nonNegativeInteger ElementType : background-validation-millis + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the background-validation-millis element + * @param backgroundValidationMillis the value for the element background-validation-millis + * @return the current instance of ValidationType + */ + public ValidationType backgroundValidationMillis(Integer backgroundValidationMillis) + { + childNode.getOrCreate("background-validation-millis").text(backgroundValidationMillis); + return this; + } + + /** + * Returns the background-validation-millis element + * @return the node defined for the element background-validation-millis + */ + public Integer getBackgroundValidationMillis() + { + if (childNode.getTextValueForPatternName("background-validation-millis") != null && !childNode.getTextValueForPatternName("background-validation-millis").equals("null")) { + return Integer.valueOf(childNode.getTextValueForPatternName("background-validation-millis")); + } + return null; + } + + /** + * Removes the background-validation-millis element + * @return the current instance of ValidationType + */ + public ValidationType removeBackgroundValidationMillis() + { + childNode.removeChildren("background-validation-millis"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: ValidationType ElementName: xsd:boolean ElementType : use-fast-fail + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the use-fast-fail element + * @param useFastFail the value for the element use-fast-fail + * @return the current instance of ValidationType + */ + public ValidationType useFastFail(Boolean useFastFail) + { + childNode.getOrCreate("use-fast-fail").text(useFastFail); + return this; + } + + /** + * Returns the use-fast-fail element + * @return the node defined for the element use-fast-fail + */ + public Boolean isUseFastFail() + { + return Strings.isTrue(childNode.getTextValueForPatternName("use-fast-fail")); + } + + /** + * Removes the use-fast-fail element + * @return the current instance of ValidationType + */ + public ValidationType removeUseFastFail() + { + childNode.removeChildren("use-fast-fail"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/XaPoolTypeImpl.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/XaPoolTypeImpl.java new file mode 100644 index 00000000..4fc6fa31 --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/XaPoolTypeImpl.java @@ -0,0 +1,239 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.XaPoolType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +/** + * This class implements the xa-poolType xsd type + * @since Generation date :2011-10-02T12:23:24.492+02:00 + */ +public class XaPoolTypeImpl implements Child, XaPoolType +{ + // -------------------------------------------------------------------------------------|| + // Instance Members + // -------------------------------------------------------------------------------------|| + + private T t; + private Node childNode; + // -------------------------------------------------------------------------------------|| + // Constructor + // -------------------------------------------------------------------------------------|| + + public XaPoolTypeImpl(T t, String nodeName, Node node) { + this.t = t; + this.childNode = node.createChild(nodeName); + } + + public XaPoolTypeImpl(T t, String nodeName, Node node, Node childNode) { + this.t = t; + this.childNode = childNode; + } + + + public T up() + { + return t; + } + + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : is-same-rm-override + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the is-same-rm-override element + * @param isSameRmOverride the value for the element is-same-rm-override + * @return the current instance of XaPoolType + */ + public XaPoolType isSameRmOverride(Boolean isSameRmOverride) + { + childNode.getOrCreate("is-same-rm-override").text(isSameRmOverride); + return this; + } + + /** + * Returns the is-same-rm-override element + * @return the node defined for the element is-same-rm-override + */ + public Boolean isIsSameRmOverride() + { + return Strings.isTrue(childNode.getTextValueForPatternName("is-same-rm-override")); + } + + /** + * Removes the is-same-rm-override element + * @return the current instance of XaPoolType + */ + public XaPoolType removeIsSameRmOverride() + { + childNode.removeChildren("is-same-rm-override"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: javaee:emptyType ElementType : interleaving + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the interleaving element + * @return the current instance of XaPoolType + */ + public XaPoolType interleaving() + { + childNode.getOrCreate("interleaving"); + return this; + } + + /** + * Removes the interleaving element + * @return the current instance of XaPoolType + */ + public Boolean isInterleaving() + { + return childNode.getSingle("interleaving") != null; + } + + /** + * Removes the interleaving element + * @return the current instance of XaPoolType + */ + public XaPoolType removeInterleaving() + { + childNode.removeChild("interleaving"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: javaee:emptyType ElementType : no-tx-separate-pools + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public XaPoolType noTxSeparatePools() + { + childNode.getOrCreate("no-tx-separate-pools"); + return this; + } + + /** + * Removes the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public Boolean isNoTxSeparatePools() + { + return childNode.getSingle("no-tx-separate-pools") != null; + } + + /** + * Removes the no-tx-separate-pools element + * @return the current instance of XaPoolType + */ + public XaPoolType removeNoTxSeparatePools() + { + childNode.removeChild("no-tx-separate-pools"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : pad-xid + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the pad-xid element + * @param padXid the value for the element pad-xid + * @return the current instance of XaPoolType + */ + public XaPoolType padXid(Boolean padXid) + { + childNode.getOrCreate("pad-xid").text(padXid); + return this; + } + + /** + * Returns the pad-xid element + * @return the node defined for the element pad-xid + */ + public Boolean isPadXid() + { + return Strings.isTrue(childNode.getTextValueForPatternName("pad-xid")); + } + + /** + * Removes the pad-xid element + * @return the current instance of XaPoolType + */ + public XaPoolType removePadXid() + { + childNode.removeChildren("pad-xid"); + return this; + } + + + // --------------------------------------------------------------------------------------------------------|| + // ClassName: XaPoolType ElementName: xsd:boolean ElementType : wrap-xa-resource + // MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true + // --------------------------------------------------------------------------------------------------------|| + + /** + * Sets the wrap-xa-resource element + * @param wrapXaResource the value for the element wrap-xa-resource + * @return the current instance of XaPoolType + */ + public XaPoolType wrapXaResource(Boolean wrapXaResource) + { + childNode.getOrCreate("wrap-xa-resource").text(wrapXaResource); + return this; + } + + /** + * Returns the wrap-xa-resource element + * @return the node defined for the element wrap-xa-resource + */ + public Boolean isWrapXaResource() + { + return Strings.isTrue(childNode.getTextValueForPatternName("wrap-xa-resource")); + } + + /** + * Removes the wrap-xa-resource element + * @return the current instance of XaPoolType + */ + public XaPoolType removeWrapXaResource() + { + childNode.removeChildren("wrap-xa-resource"); + return this; + } +} diff --git a/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/package-info.java b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/package-info.java new file mode 100644 index 00000000..443d05ba --- /dev/null +++ b/cli/temp/temp/src/main/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/package-info.java @@ -0,0 +1,5 @@ + /** + * Provides the implementation classes as defined in the schema resource-adapters_1_0.xsd + */ + +package org.jboss.shrinkwrap.descriptor.impl.resourceadapters10; diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ConfigPropertyTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ConfigPropertyTypeImplTestCase.java new file mode 100644 index 00000000..44ef7f5f --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ConfigPropertyTypeImplTestCase.java @@ -0,0 +1,64 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ConfigPropertyType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class ConfigPropertyTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConfigPropertyType type = new ConfigPropertyTypeImpl(provider, "config-propertyType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConfigPropertyType type = new ConfigPropertyTypeImpl(provider, "config-propertyType", provider.getRootNode()); + type.name("test"); + assertEquals(type.getName(), "test"); + type.removeName(); + assertNull(type.getName()); + } + + + @Test + public void testConfigPropertyType() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConfigPropertyType type = new ConfigPropertyTypeImpl(provider, "config-propertyType", provider.getRootNode()); + type.configPropertyType("test"); + assertEquals(type.getConfigPropertyType(), "test"); + type.removeConfigPropertyType(); + assertNull(type.getConfigPropertyType()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ConnectionPropertyTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ConnectionPropertyTypeImplTestCase.java new file mode 100644 index 00000000..104474a8 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ConnectionPropertyTypeImplTestCase.java @@ -0,0 +1,52 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ConnectionPropertyType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class ConnectionPropertyTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionPropertyType type = new ConnectionPropertyTypeImpl(provider, "connection-propertyType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionPropertyType type = new ConnectionPropertyTypeImpl(provider, "connection-propertyType", provider.getRootNode()); + type.name("test"); + assertEquals(type.getName(), "test"); + type.removeName(); + assertNull(type.getName()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourceTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourceTypeImplTestCase.java new file mode 100644 index 00000000..412f57e5 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourceTypeImplTestCase.java @@ -0,0 +1,298 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourceType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ConnectionPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ConnectionPropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TransactionIsolationType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.PoolType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.PoolTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DsSecurityType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DsSecurityTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ValidationType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ValidationTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TimeoutType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.TimeoutTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.StatementType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.StatementTypeImpl; + +public class DatasourceTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testJndiName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.jndiName("test"); + assertEquals(type.getJndiName(), "test"); + type.removeJndiName(); + assertNull(type.getJndiName()); + } + + @Test + public void testPoolName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.poolName("test"); + assertEquals(type.getPoolName(), "test"); + type.removePoolName(); + assertNull(type.getPoolName()); + } + + @Test + public void testEnabled() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.enabled(true); + assertTrue(type.isEnabled()); + type.removeEnabled(); + assertFalse(type.isEnabled()); + } + + @Test + public void testUseJavaContext() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.useJavaContext(true); + assertTrue(type.isUseJavaContext()); + type.removeUseJavaContext(); + assertFalse(type.isUseJavaContext()); + } + + @Test + public void testSpy() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.spy(true); + assertTrue(type.isSpy()); + type.removeSpy(); + assertFalse(type.isSpy()); + } + + @Test + public void testUseCcm() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.useCcm(true); + assertTrue(type.isUseCcm()); + type.removeUseCcm(); + assertFalse(type.isUseCcm()); + } + + @Test + public void testConnectionUrl() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.connectionUrl("test"); + assertEquals(type.getConnectionUrl(), "test"); + type.removeConnectionUrl(); + assertNull(type.getConnectionUrl()); + } + + + @Test + public void testDriverClass() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.driverClass("test"); + assertEquals(type.getDriverClass(), "test"); + type.removeDriverClass(); + assertNull(type.getDriverClass()); + } + + + @Test + public void testDatasourceClass() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.datasourceClass("test"); + assertEquals(type.getDatasourceClass(), "test"); + type.removeDatasourceClass(); + assertNull(type.getDatasourceClass()); + } + + + @Test + public void testDriver() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.driver("test"); + assertEquals(type.getDriver(), "test"); + type.removeDriver(); + assertNull(type.getDriver()); + } + + + @Test + public void testConnectionProperty() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.createConnectionProperty().up(); + type.createConnectionProperty().up(); + assertTrue(type.getAllConnectionProperty().size() == 2); + type.removeAllConnectionProperty(); + assertTrue(type.getAllConnectionProperty().size() == 0); + } + + + @Test + public void testNewConnectionSql() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.newConnectionSql("test"); + assertEquals(type.getNewConnectionSql(), "test"); + type.removeNewConnectionSql(); + assertNull(type.getNewConnectionSql()); + } + + + @Test + public void testTransactionIsolation() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + for(TransactionIsolationType e: TransactionIsolationType.values()) + { + type.transactionIsolation(e); + assertEquals(type.getTransactionIsolation(), e); + type.transactionIsolation(e.toString()); + assertEquals(type.getTransactionIsolationAsString(), e.toString()); + } + } + + + @Test + public void testUrlDelimiter() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.urlDelimiter("test"); + assertEquals(type.getUrlDelimiter(), "test"); + type.removeUrlDelimiter(); + assertNull(type.getUrlDelimiter()); + } + + + @Test + public void testUrlSelectorStrategyClassName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.urlSelectorStrategyClassName("test"); + assertEquals(type.getUrlSelectorStrategyClassName(), "test"); + type.removeUrlSelectorStrategyClassName(); + assertNull(type.getUrlSelectorStrategyClassName()); + } + + + @Test + public void testPool() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.getOrCreatePool().up(); + type.removePool(); + assertNull(provider.getRootNode().getSingle("pool")); + } + + + @Test + public void testSecurity() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.getOrCreateSecurity().up(); + type.removeSecurity(); + assertNull(provider.getRootNode().getSingle("security")); + } + + + @Test + public void testValidation() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.getOrCreateValidation().up(); + type.removeValidation(); + assertNull(provider.getRootNode().getSingle("validation")); + } + + + @Test + public void testTimeout() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.getOrCreateTimeout().up(); + type.removeTimeout(); + assertNull(provider.getRootNode().getSingle("timeout")); + } + + + @Test + public void testStatement() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.getOrCreateStatement().up(); + type.removeStatement(); + assertNull(provider.getRootNode().getSingle("statement")); + } + + + @Test + public void testJta() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourceType type = new DatasourceTypeImpl(provider, "datasourceType", provider.getRootNode()); + type.jta(true); + assertTrue(type.isJta()); + type.removeJta(); + assertFalse(type.isJta()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourcesDescriptorImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourcesDescriptorImplTestCase.java new file mode 100644 index 00000000..64a17e69 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourcesDescriptorImplTestCase.java @@ -0,0 +1,73 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourcesDescriptor; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriversType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DriversTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourceType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DatasourceTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourceType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.XaDatasourceTypeImpl; + +public class DatasourcesDescriptorImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + DatasourcesDescriptor type = Descriptors.create(DatasourcesDescriptor.class); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testDrivers() throws Exception + { + DatasourcesDescriptor type = Descriptors.create(DatasourcesDescriptor.class); + type.getOrCreateDrivers().up(); + type.removeDrivers(); + assertNull(((DatasourcesDescriptorImpl)type).getRootNode().getSingle("drivers")); + } + + @Test + public void testDatasource() throws Exception + { + DatasourcesDescriptor type = Descriptors.create(DatasourcesDescriptor.class); + type.getOrCreateDatasource().up(); + type.removeDatasource(); + assertNull(((DatasourcesDescriptorImpl)type).getRootNode().getSingle("datasource")); + } + + @Test + public void testXaDatasource() throws Exception + { + DatasourcesDescriptor type = Descriptors.create(DatasourcesDescriptor.class); + type.getOrCreateXaDatasource().up(); + type.removeXaDatasource(); + assertNull(((DatasourcesDescriptorImpl)type).getRootNode().getSingle("xa-datasource")); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourcesTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourcesTypeImplTestCase.java new file mode 100644 index 00000000..05b2c17d --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DatasourcesTypeImplTestCase.java @@ -0,0 +1,79 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourcesType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriversType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DriversTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourceType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DatasourceTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourceType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.XaDatasourceTypeImpl; + +public class DatasourcesTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourcesType type = new DatasourcesTypeImpl(provider, "datasourcesType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testDrivers() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourcesType type = new DatasourcesTypeImpl(provider, "datasourcesType", provider.getRootNode()); + type.getOrCreateDrivers().up(); + type.removeDrivers(); + assertNull(provider.getRootNode().getSingle("drivers")); + } + + + @Test + public void testDatasource() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourcesType type = new DatasourcesTypeImpl(provider, "datasourcesType", provider.getRootNode()); + type.getOrCreateDatasource().up(); + type.removeDatasource(); + assertNull(provider.getRootNode().getSingle("datasource")); + } + + + @Test + public void testXaDatasource() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DatasourcesType type = new DatasourcesTypeImpl(provider, "datasourcesType", provider.getRootNode()); + type.getOrCreateXaDatasource().up(); + type.removeXaDatasource(); + assertNull(provider.getRootNode().getSingle("xa-datasource")); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DriverTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DriverTypeImplTestCase.java new file mode 100644 index 00000000..d54c3b98 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DriverTypeImplTestCase.java @@ -0,0 +1,124 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriverType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class DriverTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DriverType type = new DriverTypeImpl(provider, "driverType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testDriverClass() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DriverType type = new DriverTypeImpl(provider, "driverType", provider.getRootNode()); + type.driverClass("test"); + assertEquals(type.getDriverClass(), "test"); + type.removeDriverClass(); + assertNull(type.getDriverClass()); + } + + + @Test + public void testDatasourceClass() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DriverType type = new DriverTypeImpl(provider, "driverType", provider.getRootNode()); + type.datasourceClass("test"); + assertEquals(type.getDatasourceClass(), "test"); + type.removeDatasourceClass(); + assertNull(type.getDatasourceClass()); + } + + + @Test + public void testXaDatasourceClass() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DriverType type = new DriverTypeImpl(provider, "driverType", provider.getRootNode()); + type.xaDatasourceClass("test"); + assertEquals(type.getXaDatasourceClass(), "test"); + type.removeXaDatasourceClass(); + assertNull(type.getXaDatasourceClass()); + } + + + @Test + public void testName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DriverType type = new DriverTypeImpl(provider, "driverType", provider.getRootNode()); + type.name("test"); + assertEquals(type.getName(), "test"); + type.removeName(); + assertNull(type.getName()); + } + + + @Test + public void testModule() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DriverType type = new DriverTypeImpl(provider, "driverType", provider.getRootNode()); + type.module("test"); + assertEquals(type.getModule(), "test"); + type.removeModule(); + assertNull(type.getModule()); + } + + + @Test + public void testMajorVersion() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DriverType type = new DriverTypeImpl(provider, "driverType", provider.getRootNode()); + type.majorVersion("test"); + assertEquals(type.getMajorVersion(), "test"); + type.removeMajorVersion(); + assertNull(type.getMajorVersion()); + } + + + @Test + public void testMinorVerion() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DriverType type = new DriverTypeImpl(provider, "driverType", provider.getRootNode()); + type.minorVerion("test"); + assertEquals(type.getMinorVerion(), "test"); + type.removeMinorVerion(); + assertNull(type.getMinorVerion()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DriversTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DriversTypeImplTestCase.java new file mode 100644 index 00000000..65cc5b3f --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DriversTypeImplTestCase.java @@ -0,0 +1,55 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriversType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DriverType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DriverTypeImpl; + +public class DriversTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DriversType type = new DriversTypeImpl(provider, "driversType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testDriver() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DriversType type = new DriversTypeImpl(provider, "driversType", provider.getRootNode()); + type.createDriver().up(); + type.createDriver().up(); + assertTrue(type.getAllDriver().size() == 2); + type.removeAllDriver(); + assertTrue(type.getAllDriver().size() == 0); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DsSecurityTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DsSecurityTypeImplTestCase.java new file mode 100644 index 00000000..95d3e7f6 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/DsSecurityTypeImplTestCase.java @@ -0,0 +1,89 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DsSecurityType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ExtensionTypeImpl; + +public class DsSecurityTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DsSecurityType type = new DsSecurityTypeImpl(provider, "dsSecurityType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testUserName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DsSecurityType type = new DsSecurityTypeImpl(provider, "dsSecurityType", provider.getRootNode()); + type.userName("test"); + assertEquals(type.getUserName(), "test"); + type.removeUserName(); + assertNull(type.getUserName()); + } + + + @Test + public void testPassword() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DsSecurityType type = new DsSecurityTypeImpl(provider, "dsSecurityType", provider.getRootNode()); + type.password("test"); + assertEquals(type.getPassword(), "test"); + type.removePassword(); + assertNull(type.getPassword()); + } + + + @Test + public void testSecurityDomain() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DsSecurityType type = new DsSecurityTypeImpl(provider, "dsSecurityType", provider.getRootNode()); + type.securityDomain("test"); + assertEquals(type.getSecurityDomain(), "test"); + type.removeSecurityDomain(); + assertNull(type.getSecurityDomain()); + } + + + @Test + public void testReauthPlugin() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + DsSecurityType type = new DsSecurityTypeImpl(provider, "dsSecurityType", provider.getRootNode()); + type.getOrCreateReauthPlugin().up(); + type.removeReauthPlugin(); + assertNull(provider.getRootNode().getSingle("reauth-plugin")); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ExtensionTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ExtensionTypeImplTestCase.java new file mode 100644 index 00000000..3e406230 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ExtensionTypeImplTestCase.java @@ -0,0 +1,67 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ConfigPropertyTypeImpl; + +public class ExtensionTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ExtensionType type = new ExtensionTypeImpl(provider, "extensionType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testConfigProperty() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ExtensionType type = new ExtensionTypeImpl(provider, "extensionType", provider.getRootNode()); + type.createConfigProperty().up(); + type.createConfigProperty().up(); + assertTrue(type.getAllConfigProperty().size() == 2); + type.removeAllConfigProperty(); + assertTrue(type.getAllConfigProperty().size() == 0); + } + + + @Test + public void testClassName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ExtensionType type = new ExtensionTypeImpl(provider, "extensionType", provider.getRootNode()); + type.className("test"); + assertEquals(type.getClassName(), "test"); + type.removeClassName(); + assertNull(type.getClassName()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/PoolTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/PoolTypeImplTestCase.java new file mode 100644 index 00000000..fa38515e --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/PoolTypeImplTestCase.java @@ -0,0 +1,100 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.PoolType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class PoolTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testMinPoolSize() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.minPoolSize(8); + assertTrue(type.getMinPoolSize() == 8); + type.removeMinPoolSize(); + assertNull(type.getMinPoolSize()); + } + + + @Test + public void testMaxPoolSize() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.maxPoolSize(8); + assertTrue(type.getMaxPoolSize() == 8); + type.removeMaxPoolSize(); + assertNull(type.getMaxPoolSize()); + } + + + @Test + public void testPrefill() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.prefill(true); + assertTrue(type.isPrefill()); + type.removePrefill(); + assertFalse(type.isPrefill()); + } + + + @Test + public void testUseStrictMin() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.useStrictMin(true); + assertTrue(type.isUseStrictMin()); + type.removeUseStrictMin(); + assertFalse(type.isUseStrictMin()); + } + + + @Test + public void testFlushStrategy() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.flushStrategy("test"); + assertEquals(type.getFlushStrategy(), "test"); + type.removeFlushStrategy(); + assertNull(type.getFlushStrategy()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/RecoverTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/RecoverTypeImplTestCase.java new file mode 100644 index 00000000..05ba2df8 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/RecoverTypeImplTestCase.java @@ -0,0 +1,78 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.RecoverType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DsSecurityType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DsSecurityTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ExtensionTypeImpl; + +public class RecoverTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + RecoverType type = new RecoverTypeImpl(provider, "recoverType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testRecoverCredential() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + RecoverType type = new RecoverTypeImpl(provider, "recoverType", provider.getRootNode()); + type.getOrCreateRecoverCredential().up(); + type.removeRecoverCredential(); + assertNull(provider.getRootNode().getSingle("recover-credential")); + } + + + @Test + public void testRecoverPlugin() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + RecoverType type = new RecoverTypeImpl(provider, "recoverType", provider.getRootNode()); + type.getOrCreateRecoverPlugin().up(); + type.removeRecoverPlugin(); + assertNull(provider.getRootNode().getSingle("recover-plugin")); + } + + + @Test + public void testNoRecovery() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + RecoverType type = new RecoverTypeImpl(provider, "recoverType", provider.getRootNode()); + type.noRecovery(true); + assertTrue(type.isNoRecovery()); + type.removeNoRecovery(); + assertFalse(type.isNoRecovery()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/StatementTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/StatementTypeImplTestCase.java new file mode 100644 index 00000000..f9d68a80 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/StatementTypeImplTestCase.java @@ -0,0 +1,80 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.StatementType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TrackStatementsType; + +public class StatementTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + StatementType type = new StatementTypeImpl(provider, "statementType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testTrackStatements() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + StatementType type = new StatementTypeImpl(provider, "statementType", provider.getRootNode()); + for(TrackStatementsType e: TrackStatementsType.values()) + { + type.trackStatements(e); + assertEquals(type.getTrackStatements(), e); + type.trackStatements(e.toString()); + assertEquals(type.getTrackStatementsAsString(), e.toString()); + } + } + + + @Test + public void testPreparedStatementCacheSize() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + StatementType type = new StatementTypeImpl(provider, "statementType", provider.getRootNode()); + type.preparedStatementCacheSize(8); + assertTrue(type.getPreparedStatementCacheSize() == 8); + type.removePreparedStatementCacheSize(); + assertNull(type.getPreparedStatementCacheSize()); + } + + + @Test + public void testSharePreparedStatements() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + StatementType type = new StatementTypeImpl(provider, "statementType", provider.getRootNode()); + type.sharePreparedStatements(); + assertTrue(type.isSharePreparedStatements()); + type.removeSharePreparedStatements(); + assertFalse(type.isSharePreparedStatements()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/TimeoutTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/TimeoutTypeImplTestCase.java new file mode 100644 index 00000000..d9e77ef2 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/TimeoutTypeImplTestCase.java @@ -0,0 +1,136 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TimeoutType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class TimeoutTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testBlockingTimeoutMillis() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.blockingTimeoutMillis(8); + assertTrue(type.getBlockingTimeoutMillis() == 8); + type.removeBlockingTimeoutMillis(); + assertNull(type.getBlockingTimeoutMillis()); + } + + + @Test + public void testIdleTimeoutMinutes() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.idleTimeoutMinutes(8); + assertTrue(type.getIdleTimeoutMinutes() == 8); + type.removeIdleTimeoutMinutes(); + assertNull(type.getIdleTimeoutMinutes()); + } + + + @Test + public void testSetTxQueryTimeout() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.setTxQueryTimeout(); + assertTrue(type.isSetTxQueryTimeout()); + type.removeSetTxQueryTimeout(); + assertFalse(type.isSetTxQueryTimeout()); + } + + + @Test + public void testQueryTimeout() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.queryTimeout(8); + assertTrue(type.getQueryTimeout() == 8); + type.removeQueryTimeout(); + assertNull(type.getQueryTimeout()); + } + + + @Test + public void testUseTryLock() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.useTryLock(8); + assertTrue(type.getUseTryLock() == 8); + type.removeUseTryLock(); + assertNull(type.getUseTryLock()); + } + + + @Test + public void testAllocationRetry() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.allocationRetry(8); + assertTrue(type.getAllocationRetry() == 8); + type.removeAllocationRetry(); + assertNull(type.getAllocationRetry()); + } + + + @Test + public void testAllocationRetryWaitMillis() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.allocationRetryWaitMillis(8); + assertTrue(type.getAllocationRetryWaitMillis() == 8); + type.removeAllocationRetryWaitMillis(); + assertNull(type.getAllocationRetryWaitMillis()); + } + + + @Test + public void testXaResourceTimeout() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.xaResourceTimeout("test"); + assertEquals(type.getXaResourceTimeout(), "test"); + type.removeXaResourceTimeout(); + assertNull(type.getXaResourceTimeout()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ValidationTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ValidationTypeImplTestCase.java new file mode 100644 index 00000000..25ebc270 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/ValidationTypeImplTestCase.java @@ -0,0 +1,139 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ValidationType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ExtensionTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ExtensionTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ExtensionTypeImpl; + +public class ValidationTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testValidConnectionChecker() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.getOrCreateValidConnectionChecker().up(); + type.removeValidConnectionChecker(); + assertNull(provider.getRootNode().getSingle("valid-connection-checker")); + } + + + @Test + public void testCheckValidConnectionSql() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.checkValidConnectionSql("test"); + assertEquals(type.getCheckValidConnectionSql(), "test"); + type.removeCheckValidConnectionSql(); + assertNull(type.getCheckValidConnectionSql()); + } + + + @Test + public void testValidateOnMatch() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.validateOnMatch(true); + assertTrue(type.isValidateOnMatch()); + type.removeValidateOnMatch(); + assertFalse(type.isValidateOnMatch()); + } + + + @Test + public void testBackgroundValidation() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.backgroundValidation(true); + assertTrue(type.isBackgroundValidation()); + type.removeBackgroundValidation(); + assertFalse(type.isBackgroundValidation()); + } + + + @Test + public void testBackgroundValidationMillis() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.backgroundValidationMillis(8); + assertTrue(type.getBackgroundValidationMillis() == 8); + type.removeBackgroundValidationMillis(); + assertNull(type.getBackgroundValidationMillis()); + } + + + @Test + public void testUseFastFail() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.useFastFail(true); + assertTrue(type.isUseFastFail()); + type.removeUseFastFail(); + assertFalse(type.isUseFastFail()); + } + + + @Test + public void testStaleConnectionChecker() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.getOrCreateStaleConnectionChecker().up(); + type.removeStaleConnectionChecker(); + assertNull(provider.getRootNode().getSingle("stale-connection-checker")); + } + + + @Test + public void testExceptionSorter() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.getOrCreateExceptionSorter().up(); + type.removeExceptionSorter(); + assertNull(provider.getRootNode().getSingle("exception-sorter")); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaDatasourcePropertyTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaDatasourcePropertyTypeImplTestCase.java new file mode 100644 index 00000000..ced7d787 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaDatasourcePropertyTypeImplTestCase.java @@ -0,0 +1,52 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourcePropertyType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class XaDatasourcePropertyTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourcePropertyType type = new XaDatasourcePropertyTypeImpl(provider, "xa-datasource-propertyType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourcePropertyType type = new XaDatasourcePropertyTypeImpl(provider, "xa-datasource-propertyType", provider.getRootNode()); + type.name("test"); + assertEquals(type.getName(), "test"); + type.removeName(); + assertNull(type.getName()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaDatasourceTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaDatasourceTypeImplTestCase.java new file mode 100644 index 00000000..6a40ebbd --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaDatasourceTypeImplTestCase.java @@ -0,0 +1,275 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourceType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaDatasourcePropertyType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.XaDatasourcePropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TransactionIsolationType; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaPoolType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.XaPoolTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DsSecurityType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.DsSecurityTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.ValidationType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.ValidationTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.TimeoutType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.TimeoutTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.StatementType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.StatementTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.datasources10.RecoverType; +import org.jboss.shrinkwrap.descriptor.impl.datasources10.RecoverTypeImpl; + +public class XaDatasourceTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testJndiName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.jndiName("test"); + assertEquals(type.getJndiName(), "test"); + type.removeJndiName(); + assertNull(type.getJndiName()); + } + + @Test + public void testPoolName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.poolName("test"); + assertEquals(type.getPoolName(), "test"); + type.removePoolName(); + assertNull(type.getPoolName()); + } + + @Test + public void testEnabled() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.enabled(true); + assertTrue(type.isEnabled()); + type.removeEnabled(); + assertFalse(type.isEnabled()); + } + + @Test + public void testUseJavaContext() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.useJavaContext(true); + assertTrue(type.isUseJavaContext()); + type.removeUseJavaContext(); + assertFalse(type.isUseJavaContext()); + } + + @Test + public void testSpy() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.spy(true); + assertTrue(type.isSpy()); + type.removeSpy(); + assertFalse(type.isSpy()); + } + + @Test + public void testUseCcm() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.useCcm(true); + assertTrue(type.isUseCcm()); + type.removeUseCcm(); + assertFalse(type.isUseCcm()); + } + + @Test + public void testXaDatasourceProperty() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.createXaDatasourceProperty().up(); + type.createXaDatasourceProperty().up(); + assertTrue(type.getAllXaDatasourceProperty().size() == 2); + type.removeAllXaDatasourceProperty(); + assertTrue(type.getAllXaDatasourceProperty().size() == 0); + } + + + @Test + public void testXaDatasourceClass() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.xaDatasourceClass("test"); + assertEquals(type.getXaDatasourceClass(), "test"); + type.removeXaDatasourceClass(); + assertNull(type.getXaDatasourceClass()); + } + + + @Test + public void testDriver() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.driver("test"); + assertEquals(type.getDriver(), "test"); + type.removeDriver(); + assertNull(type.getDriver()); + } + + + @Test + public void testUrlDelimiter() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.urlDelimiter("test"); + assertEquals(type.getUrlDelimiter(), "test"); + type.removeUrlDelimiter(); + assertNull(type.getUrlDelimiter()); + } + + + @Test + public void testUrlSelectorStrategyClassName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.urlSelectorStrategyClassName("test"); + assertEquals(type.getUrlSelectorStrategyClassName(), "test"); + type.removeUrlSelectorStrategyClassName(); + assertNull(type.getUrlSelectorStrategyClassName()); + } + + + @Test + public void testNewConnectionSql() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.newConnectionSql("test"); + assertEquals(type.getNewConnectionSql(), "test"); + type.removeNewConnectionSql(); + assertNull(type.getNewConnectionSql()); + } + + + @Test + public void testTransactionIsolation() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + for(TransactionIsolationType e: TransactionIsolationType.values()) + { + type.transactionIsolation(e); + assertEquals(type.getTransactionIsolation(), e); + type.transactionIsolation(e.toString()); + assertEquals(type.getTransactionIsolationAsString(), e.toString()); + } + } + + + @Test + public void testXaPool() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.getOrCreateXaPool().up(); + type.removeXaPool(); + assertNull(provider.getRootNode().getSingle("xa-pool")); + } + + + @Test + public void testSecurity() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.getOrCreateSecurity().up(); + type.removeSecurity(); + assertNull(provider.getRootNode().getSingle("security")); + } + + + @Test + public void testValidation() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.getOrCreateValidation().up(); + type.removeValidation(); + assertNull(provider.getRootNode().getSingle("validation")); + } + + + @Test + public void testTimeout() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.getOrCreateTimeout().up(); + type.removeTimeout(); + assertNull(provider.getRootNode().getSingle("timeout")); + } + + + @Test + public void testStatement() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.getOrCreateStatement().up(); + type.removeStatement(); + assertNull(provider.getRootNode().getSingle("statement")); + } + + + @Test + public void testRecovery() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaDatasourceType type = new XaDatasourceTypeImpl(provider, "xa-datasourceType", provider.getRootNode()); + type.getOrCreateRecovery().up(); + type.removeRecovery(); + assertNull(provider.getRootNode().getSingle("recovery")); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaPoolTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaPoolTypeImplTestCase.java new file mode 100644 index 00000000..2daff1f7 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/datasources10/XaPoolTypeImplTestCase.java @@ -0,0 +1,100 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.datasources10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.datasources10.XaPoolType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class XaPoolTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testIsSameRmOverride() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.isSameRmOverride(true); + assertTrue(type.isIsSameRmOverride()); + type.removeIsSameRmOverride(); + assertFalse(type.isIsSameRmOverride()); + } + + + @Test + public void testInterleaving() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.interleaving(); + assertTrue(type.isInterleaving()); + type.removeInterleaving(); + assertFalse(type.isInterleaving()); + } + + + @Test + public void testNoTxSeparatePools() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.noTxSeparatePools(); + assertTrue(type.isNoTxSeparatePools()); + type.removeNoTxSeparatePools(); + assertFalse(type.isNoTxSeparatePools()); + } + + + @Test + public void testPadXid() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.padXid(true); + assertTrue(type.isPadXid()); + type.removePadXid(); + assertFalse(type.isPadXid()); + } + + + @Test + public void testWrapXaResource() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.wrapXaResource(true); + assertTrue(type.isWrapXaResource()); + type.removeWrapXaResource(); + assertFalse(type.isWrapXaResource()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/AdminObjectTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/AdminObjectTypeImplTestCase.java new file mode 100644 index 00000000..e6951298 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/AdminObjectTypeImplTestCase.java @@ -0,0 +1,110 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConfigPropertyTypeImpl; + +public class AdminObjectTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testClassName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + type.className("test"); + assertEquals(type.getClassName(), "test"); + type.removeClassName(); + assertNull(type.getClassName()); + } + + @Test + public void testJndiName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + type.jndiName("test"); + assertEquals(type.getJndiName(), "test"); + type.removeJndiName(); + assertNull(type.getJndiName()); + } + + @Test + public void testEnabled() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + type.enabled(true); + assertTrue(type.isEnabled()); + type.removeEnabled(); + assertFalse(type.isEnabled()); + } + + @Test + public void testUseJavaContext() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + type.useJavaContext(true); + assertTrue(type.isUseJavaContext()); + type.removeUseJavaContext(); + assertFalse(type.isUseJavaContext()); + } + + @Test + public void testPoolName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + type.poolName("test"); + assertEquals(type.getPoolName(), "test"); + type.removePoolName(); + assertNull(type.getPoolName()); + } + + @Test + public void testConfigProperty() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + type.createConfigProperty().up(); + type.createConfigProperty().up(); + assertTrue(type.getAllConfigProperty().size() == 2); + type.removeAllConfigProperty(); + assertTrue(type.getAllConfigProperty().size() == 0); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/AdminObjectsTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/AdminObjectsTypeImplTestCase.java new file mode 100644 index 00000000..d601b098 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/AdminObjectsTypeImplTestCase.java @@ -0,0 +1,55 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectsType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.AdminObjectTypeImpl; + +public class AdminObjectsTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectsType type = new AdminObjectsTypeImpl(provider, "admin-objectsType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testAdminObject() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectsType type = new AdminObjectsTypeImpl(provider, "admin-objectsType", provider.getRootNode()); + type.createAdminObject().up(); + type.createAdminObject().up(); + assertTrue(type.getAllAdminObject().size() == 2); + type.removeAllAdminObject(); + assertTrue(type.getAllAdminObject().size() == 0); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/BeanValidationGroupsTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/BeanValidationGroupsTypeImplTestCase.java new file mode 100644 index 00000000..0c679672 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/BeanValidationGroupsTypeImplTestCase.java @@ -0,0 +1,58 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.BeanValidationGroupsType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class BeanValidationGroupsTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + BeanValidationGroupsType type = new BeanValidationGroupsTypeImpl(provider, "bean-validation-groupsType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testBeanValidationGroup() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + BeanValidationGroupsType type = new BeanValidationGroupsTypeImpl(provider, "bean-validation-groupsType", provider.getRootNode()); + type.beanValidationGroup("value1"); + type.beanValidationGroup("value2"); + type.beanValidationGroup("value3", "value4"); + assertTrue(type.getAllBeanValidationGroup().size() == 4); + assertEquals(type.getAllBeanValidationGroup().get(0), "value1"); + assertEquals(type.getAllBeanValidationGroup().get(1), "value2"); + assertEquals(type.getAllBeanValidationGroup().get(2), "value3"); + assertEquals(type.getAllBeanValidationGroup().get(3), "value4"); + type.removeAllBeanValidationGroup(); + assertTrue(type.getAllBeanValidationGroup().size() == 0); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConfigPropertyTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConfigPropertyTypeImplTestCase.java new file mode 100644 index 00000000..d743e892 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConfigPropertyTypeImplTestCase.java @@ -0,0 +1,64 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class ConfigPropertyTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConfigPropertyType type = new ConfigPropertyTypeImpl(provider, "config-propertyType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConfigPropertyType type = new ConfigPropertyTypeImpl(provider, "config-propertyType", provider.getRootNode()); + type.name("test"); + assertEquals(type.getName(), "test"); + type.removeName(); + assertNull(type.getName()); + } + + + @Test + public void testConfigPropertyType() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConfigPropertyType type = new ConfigPropertyTypeImpl(provider, "config-propertyType", provider.getRootNode()); + type.configPropertyType("test"); + assertEquals(type.getConfigPropertyType(), "test"); + type.removeConfigPropertyType(); + assertNull(type.getConfigPropertyType()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConnectionDefinitionsTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConnectionDefinitionsTypeImplTestCase.java new file mode 100644 index 00000000..89489d60 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConnectionDefinitionsTypeImplTestCase.java @@ -0,0 +1,55 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefinitionsType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefintionType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConnectionDefintionTypeImpl; + +public class ConnectionDefinitionsTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefinitionsType type = new ConnectionDefinitionsTypeImpl(provider, "connection-definitionsType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testConnectionDefinition() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefinitionsType type = new ConnectionDefinitionsTypeImpl(provider, "connection-definitionsType", provider.getRootNode()); + type.createConnectionDefinition().up(); + type.createConnectionDefinition().up(); + assertTrue(type.getAllConnectionDefinition().size() == 2); + type.removeAllConnectionDefinition(); + assertTrue(type.getAllConnectionDefinition().size() == 0); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConnectionDefintionTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConnectionDefintionTypeImplTestCase.java new file mode 100644 index 00000000..31990e6e --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ConnectionDefintionTypeImplTestCase.java @@ -0,0 +1,200 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefintionType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConfigPropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.SecurityType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.SecurityTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.TimeoutType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.TimeoutTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ValidationType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ValidationTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.RecoverType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.RecoverTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.PoolType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.PoolTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.XaPoolType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.XaPoolTypeImpl; + +public class ConnectionDefintionTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testClassName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.className("test"); + assertEquals(type.getClassName(), "test"); + type.removeClassName(); + assertNull(type.getClassName()); + } + + @Test + public void testJndiName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.jndiName("test"); + assertEquals(type.getJndiName(), "test"); + type.removeJndiName(); + assertNull(type.getJndiName()); + } + + @Test + public void testEnabled() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.enabled(true); + assertTrue(type.isEnabled()); + type.removeEnabled(); + assertFalse(type.isEnabled()); + } + + @Test + public void testUseJavaContext() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.useJavaContext(true); + assertTrue(type.isUseJavaContext()); + type.removeUseJavaContext(); + assertFalse(type.isUseJavaContext()); + } + + @Test + public void testPoolName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.poolName("test"); + assertEquals(type.getPoolName(), "test"); + type.removePoolName(); + assertNull(type.getPoolName()); + } + + @Test + public void testConfigProperty() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.createConfigProperty().up(); + type.createConfigProperty().up(); + assertTrue(type.getAllConfigProperty().size() == 2); + type.removeAllConfigProperty(); + assertTrue(type.getAllConfigProperty().size() == 0); + } + + + @Test + public void testSecurity() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.getOrCreateSecurity().up(); + type.removeSecurity(); + assertNull(provider.getRootNode().getSingle("security")); + } + + + @Test + public void testTimeout() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.getOrCreateTimeout().up(); + type.removeTimeout(); + assertNull(provider.getRootNode().getSingle("timeout")); + } + + + @Test + public void testValidation() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.getOrCreateValidation().up(); + type.removeValidation(); + assertNull(provider.getRootNode().getSingle("validation")); + } + + + @Test + public void testRecovery() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.getOrCreateRecovery().up(); + type.removeRecovery(); + assertNull(provider.getRootNode().getSingle("recovery")); + } + + + @Test + public void testPool() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.getOrCreatePool().up(); + type.removePool(); + assertNull(provider.getRootNode().getSingle("pool")); + } + + + @Test + public void testXaPool() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.getOrCreateXaPool().up(); + type.removeXaPool(); + assertNull(provider.getRootNode().getSingle("xa-pool")); + } + + + @Test + public void testUseCcm() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.useCcm(true); + assertTrue(type.isUseCcm()); + type.removeUseCcm(); + assertFalse(type.isUseCcm()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/CredentialTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/CredentialTypeImplTestCase.java new file mode 100644 index 00000000..5b65bd56 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/CredentialTypeImplTestCase.java @@ -0,0 +1,76 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.CredentialType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class CredentialTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + CredentialType type = new CredentialTypeImpl(provider, "credentialType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testUserName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + CredentialType type = new CredentialTypeImpl(provider, "credentialType", provider.getRootNode()); + type.userName("test"); + assertEquals(type.getUserName(), "test"); + type.removeUserName(); + assertNull(type.getUserName()); + } + + + @Test + public void testPassword() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + CredentialType type = new CredentialTypeImpl(provider, "credentialType", provider.getRootNode()); + type.password("test"); + assertEquals(type.getPassword(), "test"); + type.removePassword(); + assertNull(type.getPassword()); + } + + + @Test + public void testSecurityDomain() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + CredentialType type = new CredentialTypeImpl(provider, "credentialType", provider.getRootNode()); + type.securityDomain("test"); + assertEquals(type.getSecurityDomain(), "test"); + type.removeSecurityDomain(); + assertNull(type.getSecurityDomain()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ExtensionTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ExtensionTypeImplTestCase.java new file mode 100644 index 00000000..33d17d9d --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ExtensionTypeImplTestCase.java @@ -0,0 +1,65 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ExtensionType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConfigPropertyTypeImpl; + +public class ExtensionTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ExtensionType type = new ExtensionTypeImpl(provider, "extensionType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testConfigProperty() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ExtensionType type = new ExtensionTypeImpl(provider, "extensionType", provider.getRootNode()); + type.getOrCreateConfigProperty().up(); + type.removeConfigProperty(); + assertNull(provider.getRootNode().getSingle("config-property")); + } + + + @Test + public void testClassName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ExtensionType type = new ExtensionTypeImpl(provider, "extensionType", provider.getRootNode()); + type.className("test"); + assertEquals(type.getClassName(), "test"); + type.removeClassName(); + assertNull(type.getClassName()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/IronjacamarDescriptorImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/IronjacamarDescriptorImplTestCase.java new file mode 100644 index 00000000..e261cfd2 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/IronjacamarDescriptorImplTestCase.java @@ -0,0 +1,110 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.IronjacamarDescriptor; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.BeanValidationGroupsType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.BeanValidationGroupsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConfigPropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.TransactionSupportType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefinitionsType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConnectionDefinitionsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectsType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.AdminObjectsTypeImpl; + +public class IronjacamarDescriptorImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + IronjacamarDescriptor type = Descriptors.create(IronjacamarDescriptor.class); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testBeanValidationGroups() throws Exception + { + IronjacamarDescriptor type = Descriptors.create(IronjacamarDescriptor.class); + type.getOrCreateBeanValidationGroups().up(); + type.removeBeanValidationGroups(); + assertNull(((IronjacamarDescriptorImpl)type).getRootNode().getSingle("bean-validation-groups")); + } + + @Test + public void testBootstrapContext() throws Exception + { + IronjacamarDescriptor type = Descriptors.create(IronjacamarDescriptor.class); + type.bootstrapContext("test"); + assertEquals(type.getBootstrapContext(), "test"); + type.removeBootstrapContext(); + assertNull(type.getBootstrapContext()); + } + + @Test + public void testConfigProperty() throws Exception + { + IronjacamarDescriptor type = Descriptors.create(IronjacamarDescriptor.class); + type.createConfigProperty().up(); + type.createConfigProperty().up(); + assertTrue(type.getAllConfigProperty().size() == 2); + type.removeAllConfigProperty(); + assertTrue(type.getAllConfigProperty().size() == 0); + } + + @Test + public void testTransactionSupport() throws Exception + { + IronjacamarDescriptor type = Descriptors.create(IronjacamarDescriptor.class); + for(TransactionSupportType e: TransactionSupportType.values()) + { + type.transactionSupport(e); + assertEquals(type.getTransactionSupport(), e); + type.transactionSupport(e.toString()); + assertEquals(type.getTransactionSupportAsString(), e.toString()); + } + } + + @Test + public void testConnectionDefinitions() throws Exception + { + IronjacamarDescriptor type = Descriptors.create(IronjacamarDescriptor.class); + type.getOrCreateConnectionDefinitions().up(); + type.removeConnectionDefinitions(); + assertNull(((IronjacamarDescriptorImpl)type).getRootNode().getSingle("connection-definitions")); + } + + @Test + public void testAdminObjects() throws Exception + { + IronjacamarDescriptor type = Descriptors.create(IronjacamarDescriptor.class); + type.getOrCreateAdminObjects().up(); + type.removeAdminObjects(); + assertNull(((IronjacamarDescriptorImpl)type).getRootNode().getSingle("admin-objects")); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/IronjacamarTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/IronjacamarTypeImplTestCase.java new file mode 100644 index 00000000..54350695 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/IronjacamarTypeImplTestCase.java @@ -0,0 +1,122 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.IronjacamarType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.BeanValidationGroupsType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.BeanValidationGroupsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConfigPropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.TransactionSupportType; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ConnectionDefinitionsType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ConnectionDefinitionsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.AdminObjectsType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.AdminObjectsTypeImpl; + +public class IronjacamarTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + IronjacamarType type = new IronjacamarTypeImpl(provider, "ironjacamarType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testBeanValidationGroups() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + IronjacamarType type = new IronjacamarTypeImpl(provider, "ironjacamarType", provider.getRootNode()); + type.getOrCreateBeanValidationGroups().up(); + type.removeBeanValidationGroups(); + assertNull(provider.getRootNode().getSingle("bean-validation-groups")); + } + + + @Test + public void testBootstrapContext() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + IronjacamarType type = new IronjacamarTypeImpl(provider, "ironjacamarType", provider.getRootNode()); + type.bootstrapContext("test"); + assertEquals(type.getBootstrapContext(), "test"); + type.removeBootstrapContext(); + assertNull(type.getBootstrapContext()); + } + + + @Test + public void testConfigProperty() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + IronjacamarType type = new IronjacamarTypeImpl(provider, "ironjacamarType", provider.getRootNode()); + type.createConfigProperty().up(); + type.createConfigProperty().up(); + assertTrue(type.getAllConfigProperty().size() == 2); + type.removeAllConfigProperty(); + assertTrue(type.getAllConfigProperty().size() == 0); + } + + + @Test + public void testTransactionSupport() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + IronjacamarType type = new IronjacamarTypeImpl(provider, "ironjacamarType", provider.getRootNode()); + for(TransactionSupportType e: TransactionSupportType.values()) + { + type.transactionSupport(e); + assertEquals(type.getTransactionSupport(), e); + type.transactionSupport(e.toString()); + assertEquals(type.getTransactionSupportAsString(), e.toString()); + } + } + + + @Test + public void testConnectionDefinitions() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + IronjacamarType type = new IronjacamarTypeImpl(provider, "ironjacamarType", provider.getRootNode()); + type.getOrCreateConnectionDefinitions().up(); + type.removeConnectionDefinitions(); + assertNull(provider.getRootNode().getSingle("connection-definitions")); + } + + + @Test + public void testAdminObjects() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + IronjacamarType type = new IronjacamarTypeImpl(provider, "ironjacamarType", provider.getRootNode()); + type.getOrCreateAdminObjects().up(); + type.removeAdminObjects(); + assertNull(provider.getRootNode().getSingle("admin-objects")); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/PoolTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/PoolTypeImplTestCase.java new file mode 100644 index 00000000..fb43755d --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/PoolTypeImplTestCase.java @@ -0,0 +1,100 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.PoolType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class PoolTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testMinPoolSize() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.minPoolSize(8); + assertTrue(type.getMinPoolSize() == 8); + type.removeMinPoolSize(); + assertNull(type.getMinPoolSize()); + } + + + @Test + public void testMaxPoolSize() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.maxPoolSize(8); + assertTrue(type.getMaxPoolSize() == 8); + type.removeMaxPoolSize(); + assertNull(type.getMaxPoolSize()); + } + + + @Test + public void testPrefill() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.prefill(true); + assertTrue(type.isPrefill()); + type.removePrefill(); + assertFalse(type.isPrefill()); + } + + + @Test + public void testUseStrictMin() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.useStrictMin(true); + assertTrue(type.isUseStrictMin()); + type.removeUseStrictMin(); + assertFalse(type.isUseStrictMin()); + } + + + @Test + public void testFlushStrategy() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.flushStrategy("test"); + assertEquals(type.getFlushStrategy(), "test"); + type.removeFlushStrategy(); + assertNull(type.getFlushStrategy()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/RecoverTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/RecoverTypeImplTestCase.java new file mode 100644 index 00000000..ef910eef --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/RecoverTypeImplTestCase.java @@ -0,0 +1,78 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.RecoverType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.CredentialType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.CredentialTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.ExtensionTypeImpl; + +public class RecoverTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + RecoverType type = new RecoverTypeImpl(provider, "recoverType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testRecoverCredential() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + RecoverType type = new RecoverTypeImpl(provider, "recoverType", provider.getRootNode()); + type.getOrCreateRecoverCredential().up(); + type.removeRecoverCredential(); + assertNull(provider.getRootNode().getSingle("recover-credential")); + } + + + @Test + public void testRecoverPlugin() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + RecoverType type = new RecoverTypeImpl(provider, "recoverType", provider.getRootNode()); + type.getOrCreateRecoverPlugin().up(); + type.removeRecoverPlugin(); + assertNull(provider.getRootNode().getSingle("recover-plugin")); + } + + + @Test + public void testNoRecovery() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + RecoverType type = new RecoverTypeImpl(provider, "recoverType", provider.getRootNode()); + type.noRecovery(true); + assertTrue(type.isNoRecovery()); + type.removeNoRecovery(); + assertFalse(type.isNoRecovery()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/SecurityTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/SecurityTypeImplTestCase.java new file mode 100644 index 00000000..ab57c6c2 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/SecurityTypeImplTestCase.java @@ -0,0 +1,76 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.SecurityType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class SecurityTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + SecurityType type = new SecurityTypeImpl(provider, "securityType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testApplication() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + SecurityType type = new SecurityTypeImpl(provider, "securityType", provider.getRootNode()); + type.application(); + assertTrue(type.isApplication()); + type.removeApplication(); + assertFalse(type.isApplication()); + } + + + @Test + public void testSecurityDomain() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + SecurityType type = new SecurityTypeImpl(provider, "securityType", provider.getRootNode()); + type.securityDomain("test"); + assertEquals(type.getSecurityDomain(), "test"); + type.removeSecurityDomain(); + assertNull(type.getSecurityDomain()); + } + + + @Test + public void testSecurityDomainAndApplication() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + SecurityType type = new SecurityTypeImpl(provider, "securityType", provider.getRootNode()); + type.securityDomainAndApplication("test"); + assertEquals(type.getSecurityDomainAndApplication(), "test"); + type.removeSecurityDomainAndApplication(); + assertNull(type.getSecurityDomainAndApplication()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/TimeoutTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/TimeoutTypeImplTestCase.java new file mode 100644 index 00000000..e3eda501 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/TimeoutTypeImplTestCase.java @@ -0,0 +1,100 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.TimeoutType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class TimeoutTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testBlockingTimeoutMillis() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.blockingTimeoutMillis(8); + assertTrue(type.getBlockingTimeoutMillis() == 8); + type.removeBlockingTimeoutMillis(); + assertNull(type.getBlockingTimeoutMillis()); + } + + + @Test + public void testIdleTimeoutMinutes() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.idleTimeoutMinutes(8); + assertTrue(type.getIdleTimeoutMinutes() == 8); + type.removeIdleTimeoutMinutes(); + assertNull(type.getIdleTimeoutMinutes()); + } + + + @Test + public void testAllocationRetry() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.allocationRetry(8); + assertTrue(type.getAllocationRetry() == 8); + type.removeAllocationRetry(); + assertNull(type.getAllocationRetry()); + } + + + @Test + public void testAllocationRetryWaitMillis() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.allocationRetryWaitMillis(8); + assertTrue(type.getAllocationRetryWaitMillis() == 8); + type.removeAllocationRetryWaitMillis(); + assertNull(type.getAllocationRetryWaitMillis()); + } + + + @Test + public void testXaResourceTimeout() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.xaResourceTimeout(8); + assertTrue(type.getXaResourceTimeout() == 8); + type.removeXaResourceTimeout(); + assertNull(type.getXaResourceTimeout()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ValidationTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ValidationTypeImplTestCase.java new file mode 100644 index 00000000..a8aee768 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/ValidationTypeImplTestCase.java @@ -0,0 +1,76 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.ValidationType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class ValidationTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testBackgroundValidation() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.backgroundValidation(true); + assertTrue(type.isBackgroundValidation()); + type.removeBackgroundValidation(); + assertFalse(type.isBackgroundValidation()); + } + + + @Test + public void testBackgroundValidationMillis() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.backgroundValidationMillis(8); + assertTrue(type.getBackgroundValidationMillis() == 8); + type.removeBackgroundValidationMillis(); + assertNull(type.getBackgroundValidationMillis()); + } + + + @Test + public void testUseFastFail() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.useFastFail(true); + assertTrue(type.isUseFastFail()); + type.removeUseFastFail(); + assertFalse(type.isUseFastFail()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/XaPoolTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/XaPoolTypeImplTestCase.java new file mode 100644 index 00000000..008fadb3 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/ironjacamar10/XaPoolTypeImplTestCase.java @@ -0,0 +1,100 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.ironjacamar10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.XaPoolType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class XaPoolTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testIsSameRmOverride() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.isSameRmOverride(true); + assertTrue(type.isIsSameRmOverride()); + type.removeIsSameRmOverride(); + assertFalse(type.isIsSameRmOverride()); + } + + + @Test + public void testInterleaving() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.interleaving(); + assertTrue(type.isInterleaving()); + type.removeInterleaving(); + assertFalse(type.isInterleaving()); + } + + + @Test + public void testNoTxSeparatePools() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.noTxSeparatePools(); + assertTrue(type.isNoTxSeparatePools()); + type.removeNoTxSeparatePools(); + assertFalse(type.isNoTxSeparatePools()); + } + + + @Test + public void testPadXid() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.padXid(true); + assertTrue(type.isPadXid()); + type.removePadXid(); + assertFalse(type.isPadXid()); + } + + + @Test + public void testWrapXaResource() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.wrapXaResource(true); + assertTrue(type.isWrapXaResource()); + type.removeWrapXaResource(); + assertFalse(type.isWrapXaResource()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/AdminObjectTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/AdminObjectTypeImplTestCase.java new file mode 100644 index 00000000..89eca216 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/AdminObjectTypeImplTestCase.java @@ -0,0 +1,110 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.AdminObjectType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConfigPropertyTypeImpl; + +public class AdminObjectTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testClassName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + type.className("test"); + assertEquals(type.getClassName(), "test"); + type.removeClassName(); + assertNull(type.getClassName()); + } + + @Test + public void testJndiName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + type.jndiName("test"); + assertEquals(type.getJndiName(), "test"); + type.removeJndiName(); + assertNull(type.getJndiName()); + } + + @Test + public void testEnabled() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + type.enabled(true); + assertTrue(type.isEnabled()); + type.removeEnabled(); + assertFalse(type.isEnabled()); + } + + @Test + public void testUseJavaContext() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + type.useJavaContext(true); + assertTrue(type.isUseJavaContext()); + type.removeUseJavaContext(); + assertFalse(type.isUseJavaContext()); + } + + @Test + public void testPoolName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + type.poolName("test"); + assertEquals(type.getPoolName(), "test"); + type.removePoolName(); + assertNull(type.getPoolName()); + } + + @Test + public void testConfigProperty() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectType type = new AdminObjectTypeImpl(provider, "admin-objectType", provider.getRootNode()); + type.createConfigProperty().up(); + type.createConfigProperty().up(); + assertTrue(type.getAllConfigProperty().size() == 2); + type.removeAllConfigProperty(); + assertTrue(type.getAllConfigProperty().size() == 0); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/AdminObjectsTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/AdminObjectsTypeImplTestCase.java new file mode 100644 index 00000000..c6ed04e4 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/AdminObjectsTypeImplTestCase.java @@ -0,0 +1,55 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.AdminObjectsType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.AdminObjectType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.AdminObjectTypeImpl; + +public class AdminObjectsTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectsType type = new AdminObjectsTypeImpl(provider, "admin-objectsType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testAdminObject() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + AdminObjectsType type = new AdminObjectsTypeImpl(provider, "admin-objectsType", provider.getRootNode()); + type.createAdminObject().up(); + type.createAdminObject().up(); + assertTrue(type.getAllAdminObject().size() == 2); + type.removeAllAdminObject(); + assertTrue(type.getAllAdminObject().size() == 0); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/BeanValidationGroupsTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/BeanValidationGroupsTypeImplTestCase.java new file mode 100644 index 00000000..482b1e0f --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/BeanValidationGroupsTypeImplTestCase.java @@ -0,0 +1,58 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.BeanValidationGroupsType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class BeanValidationGroupsTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + BeanValidationGroupsType type = new BeanValidationGroupsTypeImpl(provider, "bean-validation-groupsType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testBeanValidationGroup() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + BeanValidationGroupsType type = new BeanValidationGroupsTypeImpl(provider, "bean-validation-groupsType", provider.getRootNode()); + type.beanValidationGroup("value1"); + type.beanValidationGroup("value2"); + type.beanValidationGroup("value3", "value4"); + assertTrue(type.getAllBeanValidationGroup().size() == 4); + assertEquals(type.getAllBeanValidationGroup().get(0), "value1"); + assertEquals(type.getAllBeanValidationGroup().get(1), "value2"); + assertEquals(type.getAllBeanValidationGroup().get(2), "value3"); + assertEquals(type.getAllBeanValidationGroup().get(3), "value4"); + type.removeAllBeanValidationGroup(); + assertTrue(type.getAllBeanValidationGroup().size() == 0); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConfigPropertyTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConfigPropertyTypeImplTestCase.java new file mode 100644 index 00000000..02214363 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConfigPropertyTypeImplTestCase.java @@ -0,0 +1,64 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class ConfigPropertyTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConfigPropertyType type = new ConfigPropertyTypeImpl(provider, "config-propertyType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConfigPropertyType type = new ConfigPropertyTypeImpl(provider, "config-propertyType", provider.getRootNode()); + type.name("test"); + assertEquals(type.getName(), "test"); + type.removeName(); + assertNull(type.getName()); + } + + + @Test + public void testConfigPropertyType() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConfigPropertyType type = new ConfigPropertyTypeImpl(provider, "config-propertyType", provider.getRootNode()); + type.configPropertyType("test"); + assertEquals(type.getConfigPropertyType(), "test"); + type.removeConfigPropertyType(); + assertNull(type.getConfigPropertyType()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConnectionDefinitionsTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConnectionDefinitionsTypeImplTestCase.java new file mode 100644 index 00000000..e7e6061a --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConnectionDefinitionsTypeImplTestCase.java @@ -0,0 +1,55 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConnectionDefinitionsType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConnectionDefintionType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConnectionDefintionTypeImpl; + +public class ConnectionDefinitionsTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefinitionsType type = new ConnectionDefinitionsTypeImpl(provider, "connection-definitionsType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testConnectionDefinition() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefinitionsType type = new ConnectionDefinitionsTypeImpl(provider, "connection-definitionsType", provider.getRootNode()); + type.createConnectionDefinition().up(); + type.createConnectionDefinition().up(); + assertTrue(type.getAllConnectionDefinition().size() == 2); + type.removeAllConnectionDefinition(); + assertTrue(type.getAllConnectionDefinition().size() == 0); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConnectionDefintionTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConnectionDefintionTypeImplTestCase.java new file mode 100644 index 00000000..0e995660 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ConnectionDefintionTypeImplTestCase.java @@ -0,0 +1,200 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConnectionDefintionType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConfigPropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.SecurityType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.SecurityTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.TimeoutType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.TimeoutTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ValidationType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ValidationTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.RecoverType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.RecoverTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.PoolType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.PoolTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.XaPoolType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.XaPoolTypeImpl; + +public class ConnectionDefintionTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testClassName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.className("test"); + assertEquals(type.getClassName(), "test"); + type.removeClassName(); + assertNull(type.getClassName()); + } + + @Test + public void testJndiName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.jndiName("test"); + assertEquals(type.getJndiName(), "test"); + type.removeJndiName(); + assertNull(type.getJndiName()); + } + + @Test + public void testEnabled() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.enabled(true); + assertTrue(type.isEnabled()); + type.removeEnabled(); + assertFalse(type.isEnabled()); + } + + @Test + public void testUseJavaContext() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.useJavaContext(true); + assertTrue(type.isUseJavaContext()); + type.removeUseJavaContext(); + assertFalse(type.isUseJavaContext()); + } + + @Test + public void testPoolName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.poolName("test"); + assertEquals(type.getPoolName(), "test"); + type.removePoolName(); + assertNull(type.getPoolName()); + } + + @Test + public void testConfigProperty() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.createConfigProperty().up(); + type.createConfigProperty().up(); + assertTrue(type.getAllConfigProperty().size() == 2); + type.removeAllConfigProperty(); + assertTrue(type.getAllConfigProperty().size() == 0); + } + + + @Test + public void testSecurity() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.getOrCreateSecurity().up(); + type.removeSecurity(); + assertNull(provider.getRootNode().getSingle("security")); + } + + + @Test + public void testTimeout() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.getOrCreateTimeout().up(); + type.removeTimeout(); + assertNull(provider.getRootNode().getSingle("timeout")); + } + + + @Test + public void testValidation() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.getOrCreateValidation().up(); + type.removeValidation(); + assertNull(provider.getRootNode().getSingle("validation")); + } + + + @Test + public void testRecovery() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.getOrCreateRecovery().up(); + type.removeRecovery(); + assertNull(provider.getRootNode().getSingle("recovery")); + } + + + @Test + public void testPool() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.getOrCreatePool().up(); + type.removePool(); + assertNull(provider.getRootNode().getSingle("pool")); + } + + + @Test + public void testXaPool() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.getOrCreateXaPool().up(); + type.removeXaPool(); + assertNull(provider.getRootNode().getSingle("xa-pool")); + } + + + @Test + public void testUseCcm() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ConnectionDefintionType type = new ConnectionDefintionTypeImpl(provider, "connection-defintionType", provider.getRootNode()); + type.useCcm(true); + assertTrue(type.isUseCcm()); + type.removeUseCcm(); + assertFalse(type.isUseCcm()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/CredentialTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/CredentialTypeImplTestCase.java new file mode 100644 index 00000000..e08c2329 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/CredentialTypeImplTestCase.java @@ -0,0 +1,76 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.CredentialType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class CredentialTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + CredentialType type = new CredentialTypeImpl(provider, "credentialType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testUserName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + CredentialType type = new CredentialTypeImpl(provider, "credentialType", provider.getRootNode()); + type.userName("test"); + assertEquals(type.getUserName(), "test"); + type.removeUserName(); + assertNull(type.getUserName()); + } + + + @Test + public void testPassword() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + CredentialType type = new CredentialTypeImpl(provider, "credentialType", provider.getRootNode()); + type.password("test"); + assertEquals(type.getPassword(), "test"); + type.removePassword(); + assertNull(type.getPassword()); + } + + + @Test + public void testSecurityDomain() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + CredentialType type = new CredentialTypeImpl(provider, "credentialType", provider.getRootNode()); + type.securityDomain("test"); + assertEquals(type.getSecurityDomain(), "test"); + type.removeSecurityDomain(); + assertNull(type.getSecurityDomain()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ExtensionTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ExtensionTypeImplTestCase.java new file mode 100644 index 00000000..b1469e2b --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ExtensionTypeImplTestCase.java @@ -0,0 +1,65 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ExtensionType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConfigPropertyTypeImpl; + +public class ExtensionTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ExtensionType type = new ExtensionTypeImpl(provider, "extensionType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testConfigProperty() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ExtensionType type = new ExtensionTypeImpl(provider, "extensionType", provider.getRootNode()); + type.getOrCreateConfigProperty().up(); + type.removeConfigProperty(); + assertNull(provider.getRootNode().getSingle("config-property")); + } + + + @Test + public void testClassName() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ExtensionType type = new ExtensionTypeImpl(provider, "extensionType", provider.getRootNode()); + type.className("test"); + assertEquals(type.getClassName(), "test"); + type.removeClassName(); + assertNull(type.getClassName()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/PoolTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/PoolTypeImplTestCase.java new file mode 100644 index 00000000..bc8e9ddd --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/PoolTypeImplTestCase.java @@ -0,0 +1,100 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.PoolType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class PoolTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testMinPoolSize() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.minPoolSize(8); + assertTrue(type.getMinPoolSize() == 8); + type.removeMinPoolSize(); + assertNull(type.getMinPoolSize()); + } + + + @Test + public void testMaxPoolSize() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.maxPoolSize(8); + assertTrue(type.getMaxPoolSize() == 8); + type.removeMaxPoolSize(); + assertNull(type.getMaxPoolSize()); + } + + + @Test + public void testPrefill() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.prefill(true); + assertTrue(type.isPrefill()); + type.removePrefill(); + assertFalse(type.isPrefill()); + } + + + @Test + public void testUseStrictMin() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.useStrictMin(true); + assertTrue(type.isUseStrictMin()); + type.removeUseStrictMin(); + assertFalse(type.isUseStrictMin()); + } + + + @Test + public void testFlushStrategy() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + PoolType type = new PoolTypeImpl(provider, "poolType", provider.getRootNode()); + type.flushStrategy("test"); + assertEquals(type.getFlushStrategy(), "test"); + type.removeFlushStrategy(); + assertNull(type.getFlushStrategy()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/RecoverTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/RecoverTypeImplTestCase.java new file mode 100644 index 00000000..21dc1668 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/RecoverTypeImplTestCase.java @@ -0,0 +1,78 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.RecoverType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.CredentialType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.CredentialTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ExtensionType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ExtensionTypeImpl; + +public class RecoverTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + RecoverType type = new RecoverTypeImpl(provider, "recoverType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testRecoverCredential() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + RecoverType type = new RecoverTypeImpl(provider, "recoverType", provider.getRootNode()); + type.getOrCreateRecoverCredential().up(); + type.removeRecoverCredential(); + assertNull(provider.getRootNode().getSingle("recover-credential")); + } + + + @Test + public void testRecoverPlugin() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + RecoverType type = new RecoverTypeImpl(provider, "recoverType", provider.getRootNode()); + type.getOrCreateRecoverPlugin().up(); + type.removeRecoverPlugin(); + assertNull(provider.getRootNode().getSingle("recover-plugin")); + } + + + @Test + public void testNoRecovery() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + RecoverType type = new RecoverTypeImpl(provider, "recoverType", provider.getRootNode()); + type.noRecovery(true); + assertTrue(type.isNoRecovery()); + type.removeNoRecovery(); + assertFalse(type.isNoRecovery()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdapterTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdapterTypeImplTestCase.java new file mode 100644 index 00000000..88093f4e --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdapterTypeImplTestCase.java @@ -0,0 +1,134 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdapterType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.BeanValidationGroupsType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.BeanValidationGroupsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConfigPropertyType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConfigPropertyTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.TransactionSupportType; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ConnectionDefinitionsType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ConnectionDefinitionsTypeImpl; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.AdminObjectsType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.AdminObjectsTypeImpl; + +public class ResourceAdapterTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ResourceAdapterType type = new ResourceAdapterTypeImpl(provider, "resource-adapterType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testArchive() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ResourceAdapterType type = new ResourceAdapterTypeImpl(provider, "resource-adapterType", provider.getRootNode()); + type.archive("test"); + assertEquals(type.getArchive(), "test"); + type.removeArchive(); + assertNull(type.getArchive()); + } + + + @Test + public void testBeanValidationGroups() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ResourceAdapterType type = new ResourceAdapterTypeImpl(provider, "resource-adapterType", provider.getRootNode()); + type.getOrCreateBeanValidationGroups().up(); + type.removeBeanValidationGroups(); + assertNull(provider.getRootNode().getSingle("bean-validation-groups")); + } + + + @Test + public void testBootstrapContext() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ResourceAdapterType type = new ResourceAdapterTypeImpl(provider, "resource-adapterType", provider.getRootNode()); + type.bootstrapContext("test"); + assertEquals(type.getBootstrapContext(), "test"); + type.removeBootstrapContext(); + assertNull(type.getBootstrapContext()); + } + + + @Test + public void testConfigProperty() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ResourceAdapterType type = new ResourceAdapterTypeImpl(provider, "resource-adapterType", provider.getRootNode()); + type.createConfigProperty().up(); + type.createConfigProperty().up(); + assertTrue(type.getAllConfigProperty().size() == 2); + type.removeAllConfigProperty(); + assertTrue(type.getAllConfigProperty().size() == 0); + } + + + @Test + public void testTransactionSupport() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ResourceAdapterType type = new ResourceAdapterTypeImpl(provider, "resource-adapterType", provider.getRootNode()); + for(TransactionSupportType e: TransactionSupportType.values()) + { + type.transactionSupport(e); + assertEquals(type.getTransactionSupport(), e); + type.transactionSupport(e.toString()); + assertEquals(type.getTransactionSupportAsString(), e.toString()); + } + } + + + @Test + public void testConnectionDefinitions() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ResourceAdapterType type = new ResourceAdapterTypeImpl(provider, "resource-adapterType", provider.getRootNode()); + type.getOrCreateConnectionDefinitions().up(); + type.removeConnectionDefinitions(); + assertNull(provider.getRootNode().getSingle("connection-definitions")); + } + + + @Test + public void testAdminObjects() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ResourceAdapterType type = new ResourceAdapterTypeImpl(provider, "resource-adapterType", provider.getRootNode()); + type.getOrCreateAdminObjects().up(); + type.removeAdminObjects(); + assertNull(provider.getRootNode().getSingle("admin-objects")); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdaptersDescriptorImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdaptersDescriptorImplTestCase.java new file mode 100644 index 00000000..aabdde2f --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdaptersDescriptorImplTestCase.java @@ -0,0 +1,53 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdaptersDescriptor; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdapterType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ResourceAdapterTypeImpl; + +public class ResourceAdaptersDescriptorImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + ResourceAdaptersDescriptor type = Descriptors.create(ResourceAdaptersDescriptor.class); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testResourceAdapter() throws Exception + { + ResourceAdaptersDescriptor type = Descriptors.create(ResourceAdaptersDescriptor.class); + type.createResourceAdapter().up(); + type.createResourceAdapter().up(); + assertTrue(type.getAllResourceAdapter().size() == 2); + type.removeAllResourceAdapter(); + assertTrue(type.getAllResourceAdapter().size() == 0); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdaptersTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdaptersTypeImplTestCase.java new file mode 100644 index 00000000..e54d77b2 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ResourceAdaptersTypeImplTestCase.java @@ -0,0 +1,55 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdaptersType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdapterType; +import org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ResourceAdapterTypeImpl; + +public class ResourceAdaptersTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ResourceAdaptersType type = new ResourceAdaptersTypeImpl(provider, "resource-adaptersType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testResourceAdapter() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ResourceAdaptersType type = new ResourceAdaptersTypeImpl(provider, "resource-adaptersType", provider.getRootNode()); + type.createResourceAdapter().up(); + type.createResourceAdapter().up(); + assertTrue(type.getAllResourceAdapter().size() == 2); + type.removeAllResourceAdapter(); + assertTrue(type.getAllResourceAdapter().size() == 0); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/SecurityTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/SecurityTypeImplTestCase.java new file mode 100644 index 00000000..af9d3a3e --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/SecurityTypeImplTestCase.java @@ -0,0 +1,76 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.SecurityType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class SecurityTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + SecurityType type = new SecurityTypeImpl(provider, "securityType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testApplication() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + SecurityType type = new SecurityTypeImpl(provider, "securityType", provider.getRootNode()); + type.application(); + assertTrue(type.isApplication()); + type.removeApplication(); + assertFalse(type.isApplication()); + } + + + @Test + public void testSecurityDomain() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + SecurityType type = new SecurityTypeImpl(provider, "securityType", provider.getRootNode()); + type.securityDomain("test"); + assertEquals(type.getSecurityDomain(), "test"); + type.removeSecurityDomain(); + assertNull(type.getSecurityDomain()); + } + + + @Test + public void testSecurityDomainAndApplication() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + SecurityType type = new SecurityTypeImpl(provider, "securityType", provider.getRootNode()); + type.securityDomainAndApplication("test"); + assertEquals(type.getSecurityDomainAndApplication(), "test"); + type.removeSecurityDomainAndApplication(); + assertNull(type.getSecurityDomainAndApplication()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/TimeoutTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/TimeoutTypeImplTestCase.java new file mode 100644 index 00000000..da7e4a4b --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/TimeoutTypeImplTestCase.java @@ -0,0 +1,100 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.TimeoutType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class TimeoutTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testBlockingTimeoutMillis() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.blockingTimeoutMillis(8); + assertTrue(type.getBlockingTimeoutMillis() == 8); + type.removeBlockingTimeoutMillis(); + assertNull(type.getBlockingTimeoutMillis()); + } + + + @Test + public void testIdleTimeoutMinutes() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.idleTimeoutMinutes(8); + assertTrue(type.getIdleTimeoutMinutes() == 8); + type.removeIdleTimeoutMinutes(); + assertNull(type.getIdleTimeoutMinutes()); + } + + + @Test + public void testAllocationRetry() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.allocationRetry(8); + assertTrue(type.getAllocationRetry() == 8); + type.removeAllocationRetry(); + assertNull(type.getAllocationRetry()); + } + + + @Test + public void testAllocationRetryWaitMillis() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.allocationRetryWaitMillis(8); + assertTrue(type.getAllocationRetryWaitMillis() == 8); + type.removeAllocationRetryWaitMillis(); + assertNull(type.getAllocationRetryWaitMillis()); + } + + + @Test + public void testXaResourceTimeout() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + TimeoutType type = new TimeoutTypeImpl(provider, "timeoutType", provider.getRootNode()); + type.xaResourceTimeout(8); + assertTrue(type.getXaResourceTimeout() == 8); + type.removeXaResourceTimeout(); + assertNull(type.getXaResourceTimeout()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ValidationTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ValidationTypeImplTestCase.java new file mode 100644 index 00000000..c0972e84 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/ValidationTypeImplTestCase.java @@ -0,0 +1,76 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ValidationType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class ValidationTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testBackgroundValidation() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.backgroundValidation(true); + assertTrue(type.isBackgroundValidation()); + type.removeBackgroundValidation(); + assertFalse(type.isBackgroundValidation()); + } + + + @Test + public void testBackgroundValidationMillis() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.backgroundValidationMillis(8); + assertTrue(type.getBackgroundValidationMillis() == 8); + type.removeBackgroundValidationMillis(); + assertNull(type.getBackgroundValidationMillis()); + } + + + @Test + public void testUseFastFail() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + ValidationType type = new ValidationTypeImpl(provider, "validationType", provider.getRootNode()); + type.useFastFail(true); + assertTrue(type.isUseFastFail()); + type.removeUseFastFail(); + assertFalse(type.isUseFastFail()); + } +} diff --git a/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/XaPoolTypeImplTestCase.java b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/XaPoolTypeImplTestCase.java new file mode 100644 index 00000000..e791e540 --- /dev/null +++ b/cli/temp/temp/src/test/java/org/jboss/shrinkwrap/descriptor/impl/resourceadapters10/XaPoolTypeImplTestCase.java @@ -0,0 +1,100 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2011, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.impl.resourceadapters10; + +import org.jboss.shrinkwrap.descriptor.spi.node.Node; +import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; +import org.jboss.shrinkwrap.descriptor.api.Descriptors;import org.junit.Test; +import static org.junit.Assert.*; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.XaPoolType; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.shrinkwrap.descriptor.api.Child; +import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; +import org.jboss.shrinkwrap.descriptor.impl.base.Strings; +import org.jboss.shrinkwrap.descriptor.api.DescriptorExporter; + +public class XaPoolTypeImplTestCase +{ + @Test + public void testNullArg() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + TestDescriptorImpl.testNullArgs(type); + } + + @Test + public void testIsSameRmOverride() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.isSameRmOverride(true); + assertTrue(type.isIsSameRmOverride()); + type.removeIsSameRmOverride(); + assertFalse(type.isIsSameRmOverride()); + } + + + @Test + public void testInterleaving() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.interleaving(); + assertTrue(type.isInterleaving()); + type.removeInterleaving(); + assertFalse(type.isInterleaving()); + } + + + @Test + public void testNoTxSeparatePools() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.noTxSeparatePools(); + assertTrue(type.isNoTxSeparatePools()); + type.removeNoTxSeparatePools(); + assertFalse(type.isNoTxSeparatePools()); + } + + + @Test + public void testPadXid() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.padXid(true); + assertTrue(type.isPadXid()); + type.removePadXid(); + assertFalse(type.isPadXid()); + } + + + @Test + public void testWrapXaResource() throws Exception + { + TestDescriptorImpl provider = new TestDescriptorImpl("test"); + XaPoolType type = new XaPoolTypeImpl(provider, "xa-poolType", provider.getRootNode()); + type.wrapXaResource(true); + assertTrue(type.isWrapXaResource()); + type.removeWrapXaResource(); + assertFalse(type.isWrapXaResource()); + } +} diff --git a/cli/temp/xslt/ddJava.xsl b/cli/temp/xslt/ddJava.xsl new file mode 100644 index 00000000..5c69adba --- /dev/null +++ b/cli/temp/xslt/ddJava.xsl @@ -0,0 +1,1022 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + + + _ + + (" + + ") + + , + + + + ; + + + private String value; + + + + + (String value) + { this.value = value; } + + + public String toString() {return value;} + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : : + + + + + + + + + + + + <T> + extends Child<T> + + { + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + import org.jboss.shrinkwrap.descriptor.api.Descriptor; + import org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace; + + + + { + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + import org.jboss.shrinkwrap.descriptor.spi.node.Node; + + + + + + + + + <T> + implements Child<T>, + + + { + + + + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + import org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace; + import org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorImplBase; + import org.jboss.shrinkwrap.descriptor.impl.base.XMLDate; + import org.jboss.shrinkwrap.descriptor.spi.node.Node; + + + + + + { + + + + + + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + import org.jboss.shrinkwrap.descriptor.spi.node.Node; + import org.jboss.shrinkwrap.descriptor.gen.TestDescriptorImpl; + import org.jboss.shrinkwrap.descriptor.api.Descriptors; + import org.junit.Test; + import static org.junit.Assert.*; + + + + + + + + + + + + + + + + + + + { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cli/temp/xslt/metadata.xsl b/cli/temp/xslt/metadata.xsl new file mode 100644 index 00000000..a1df991f --- /dev/null +++ b/cli/temp/xslt/metadata.xsl @@ -0,0 +1,1265 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gen/pom.xml b/gen/pom.xml index 498a7ea3..a8116b5e 100644 --- a/gen/pom.xml +++ b/gen/pom.xml @@ -206,6 +206,43 @@ + + + + transform-to-metadata-j2ee13 + + many-to-one + + + src/main/resources/xslt/metadata.xsl + src/main/resources/xsd + **/*.xsd + src/main/resources/xslt/schemasJ2ee13.xml + src/main/resources/xslt/metadataJ2ee13.xml + + + + + transform-to-java-j2ee13 + + many-to-one + + + + ${output.folder.impl.javaee} + ${output.folder.apl.javaee} + ${output.folder.test.javaee} + + src/main/resources/xslt/ddJava.xsl + src/main/resources/xslt + **/*.xml + src/main/resources/xslt/metadataJ2ee13.xml + src/main/resources/xslt/ddJavaJ2ee13.xml + + + diff --git a/gen/src/main/resources/lib/xdd-printElement.xsl b/gen/src/main/resources/lib/xdd-printElement.xsl index 4ccc7ed8..f71011c0 100644 --- a/gen/src/main/resources/lib/xdd-printElement.xsl +++ b/gen/src/main/resources/lib/xdd-printElement.xsl @@ -265,11 +265,99 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -294,6 +382,11 @@ + + + + + @@ -380,7 +473,7 @@ - + @@ -398,8 +491,8 @@ - - + + @@ -461,7 +554,7 @@ - + @@ -494,6 +587,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -548,7 +677,7 @@ - + diff --git a/gen/src/main/resources/lib/xdd-util.xsl b/gen/src/main/resources/lib/xdd-util.xsl index 72d87b9b..97d41efa 100644 --- a/gen/src/main/resources/lib/xdd-util.xsl +++ b/gen/src/main/resources/lib/xdd-util.xsl @@ -157,6 +157,9 @@ + + + @@ -177,6 +180,9 @@ + + + diff --git a/gen/src/main/resources/xsd/converted/connector_1_0.xsd b/gen/src/main/resources/xsd/converted/connector_1_0.xsd new file mode 100644 index 00000000..b2c3fe15 --- /dev/null +++ b/gen/src/main/resources/xsd/converted/connector_1_0.xsd @@ -0,0 +1,701 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gen/src/main/resources/xsd/ironjacamar/connector_1_0.dtd b/gen/src/main/resources/xsd/ironjacamar/connector_1_0.dtd new file mode 100644 index 00000000..bf869551 --- /dev/null +++ b/gen/src/main/resources/xsd/ironjacamar/connector_1_0.dtd @@ -0,0 +1,468 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gen/src/main/resources/xsd/ironjacamar/connector_1_0.xsd b/gen/src/main/resources/xsd/ironjacamar/connector_1_0.xsd new file mode 100644 index 00000000..67ad3601 --- /dev/null +++ b/gen/src/main/resources/xsd/ironjacamar/connector_1_0.xsd @@ -0,0 +1,645 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gen/src/main/resources/xsd/ironjacamar/connector_1_5.xsd b/gen/src/main/resources/xsd/ironjacamar/connector_1_5.xsd new file mode 100644 index 00000000..43536ab0 --- /dev/null +++ b/gen/src/main/resources/xsd/ironjacamar/connector_1_5.xsd @@ -0,0 +1,1035 @@ + + + + + @(#)connector_1_5.xsds 1.27 06/17/03 + + + + + + + Copyright 2003 Sun Microsystems, Inc., 901 San Antonio + Road, Palo Alto, California 94303, U.S.A. All rights + reserved. + + Sun Microsystems, Inc. has intellectual property rights + relating to technology described in this document. In + particular, and without limitation, these intellectual + property rights may include one or more of the U.S. patents + listed at http://www.sun.com/patents and one or more + additional patents or pending patent applications in the + U.S. and other countries. + + This document and the technology which it describes are + distributed under licenses restricting their use, copying, + distribution, and decompilation. No part of this document + may be reproduced in any form by any means without prior + written authorization of Sun and its licensors, if any. + + Third-party software, including font technology, is + copyrighted and licensed from Sun suppliers. + + Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE, + JavaServer Pages, Enterprise JavaBeans and the Java Coffee + Cup logo are trademarks or registered trademarks of Sun + Microsystems, Inc. in the U.S. and other countries. + + Federal Acquisitions: Commercial Software - Government Users + Subject to Standard License Terms and Conditions. + + + + + + + + ... + + + The instance documents may indicate the published version of + the schema using the xsi:schemaLocation attribute for J2EE + namespace with the following location: + + http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd + + ]]> + + + + + + + The following conventions apply to all J2EE + deployment descriptor elements unless indicated otherwise. + + - In elements that specify a pathname to a file within the + same JAR file, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the JAR file's namespace. Absolute filenames (i.e., those + starting with "/") also specify names in the root of the + JAR file's namespace. In general, relative names are + preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + + The connector element is the root element of the deployment + descriptor for the resource adapter. This element includes + general information - vendor name, resource adapter version, + icon - about the resource adapter module. It also includes + information specific to the implementation of the resource + adapter library as specified through the element + resourceadapter. + + + + + + + + + + + + + The activationspecType specifies an activation + specification. The information includes fully qualified + Java class name of an activation specification and a set of + required configuration property names. + + + + + + + + + com.wombat.ActivationSpecImpl + + + ]]> + + + + + + + + + + + + + + + The adminobjectType specifies information about an + administered object. Administered objects are specific to a + messaging style or message provider. This contains + information on the Java type of the interface implemented by + an administered object, its Java class name and its + configuration properties. + + + + + + + + + javax.jms.Destination + + + ]]> + + + + + + + + com.wombat.DestinationImpl + + + ]]> + + + + + + + + + + + + + + + + The authentication-mechanismType specifies an authentication + mechanism supported by the resource adapter. Note that this + support is for the resource adapter and not for the + underlying EIS instance. The optional description specifies + any resource adapter specific requirement for the support of + security contract and authentication mechanism. + + Note that BasicPassword mechanism type should support the + javax.resource.spi.security.PasswordCredential interface. + The Kerbv5 mechanism type should support the + org.ietf.jgss.GSSCredential interface or the deprecated + javax.resource.spi.security.GenericCredential interface. + + + + + + + + + + BasicPassword + + + Kerbv5 + + + Any additional security mechanisms are outside the + scope of the Connector architecture specification. + + ]]> + + + + + + + + + + + + + + + ServerName + + ]]> + + + + + + + + + + + + + java.lang.String + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + The config-propertyType contains a declaration of a single + configuration property that may be used for providing + configuration information. + + The declaration consists of an optional description, name, + type and an optional value of the configuration property. If + the resource adapter provider does not specify a value than + the deployer is responsible for providing a valid value for + a configuration property. + + Any bounds or well-defined values of properties should be + described in the description element. + + + + + + + + + + + WombatServer + + ]]> + + + + + + + + + + + + + + The connection-definitionType defines a set of connection + interfaces and classes pertaining to a particular connection + type. This also includes configurable properties for + ManagedConnectionFactory instances that may be produced out + of this set. + + + + + + + + + + com.wombat.ManagedConnectionFactoryImpl + + + ]]> + + + + + + + + com.wombat.ConnectionFactory + + + OR + + javax.resource.cci.ConnectionFactory + + + ]]> + + + + + + + + com.wombat.ConnectionFactoryImpl + + + ]]> + + + + + + + javax.resource.cci.Connection + + + ]]> + + + + + + + com.wombat.ConnectionImpl + + + ]]> + + + + + + + + + + + + + + The connectorType defines a resource adapter. + + + + + + + + + + + The element vendor-name specifies the name of + resource adapter provider vendor. + + + + + + + + + The element eis-type contains information about the + type of the EIS. For example, the type of an EIS can + be product name of EIS independent of any version + info. + + This helps in identifying EIS instances that can be + used with this resource adapter. + + + + + + + + + The element resourceadapter-version specifies a string-based version + of the resource adapter from the resource adapter + provider. + + + + + + + + + + + + + + The version specifies the version of the + connector architecture specification that is + supported by this resource adapter. This information + enables deployer to configure the resource adapter to + support deployment and runtime requirements of the + corresponding connector architecture specification. + + + + + + + + + + + + + + The credential-interfaceType specifies the + interface that the resource adapter implementation + supports for the representation of the + credentials. This element(s) that use this type, + i.e. credential-interface, should be used by + application server to find out the Credential + interface it should use as part of the security + contract. + + The possible values are: + + javax.resource.spi.security.PasswordCredential + org.ietf.jgss.GSSCredential + javax.resource.spi.security.GenericCredential + + + + + + + + + + + + + + + + + + + The inbound-resourceadapterType specifies information + about an inbound resource adapter. This contains information + specific to the implementation of the resource adapter + library as specified through the messageadapter element. + + + + + + + + + + + The messagelistener-type element content must be + unique in the messageadapter. Several messagelisteners + can not use the same messagelistener-type. + + + + + + + + + + + + + + + + + + The licenseType specifies licensing requirements for the + resource adapter module. This type specifies whether a + license is required to deploy and use this resource adapter, + and an optional description of the licensing terms + (examples: duration of license, number of connection + restrictions). It is used by the license element. + + + + + + + + + + + The element license-required specifies whether a + license is required to deploy and use the + resource adapter. This element must be one of + the following, "true" or "false". + + + + + + + + + + + + + + + The messageadapterType specifies information about the + messaging capabilities of the resource adapter. This + contains information specific to the implementation of the + resource adapter library as specified through the + messagelistener element. + + + + + + + + + + + + + + + + + The messagelistenerType specifies information about a + specific message listener supported by the messaging + resource adapter. It contains information on the Java type + of the message listener interface and an activation + specification. + + + + + + + + + javax.jms.MessageListener + + + ]]> + + + + + + + + + + + + + + + + The outbound-resourceadapterType specifies information about + an outbound resource adapter. The information includes fully + qualified names of classes/interfaces required as part of + the connector architecture specified contracts for + connection management, level of transaction support + provided, one or more authentication mechanisms supported + and additional required security permissions. + + If there is no authentication-mechanism specified as part of + resource adapter element then the resource adapter does not + support any standard security authentication mechanisms as + part of security contract. The application server ignores + the security part of the system contracts in this case. + + + + + + + + + + + + + The element reauthentication-support specifies + whether the resource adapter implementation supports + re-authentication of existing Managed- Connection + instance. Note that this information is for the + resource adapter implementation and not for the + underlying EIS instance. This element must have + either a "true" or "false" value. + + + + + + + + + + + + + + + Destination + + ]]> + + + + + + + + + + + + + + + + + The resourceadapterType specifies information about the + resource adapter. The information includes fully qualified + resource adapter Java class name, configuration properties, + information specific to the implementation of the resource + adapter library as specified through the + outbound-resourceadapter and inbound-resourceadapter + elements, and an optional set of administered objects. + + + + + + + + + + The element resourceadapter-class specifies the + fully qualified name of a Java class that implements + the javax.resource.spi.ResourceAdapter + interface. This Java class is provided as part of + resource adapter's implementation of connector + architecture specified contracts. The implementation + of this class is required to be a JavaBean. + + + + + + + + + + + + The connectionfactory-interface element content + must be unique in the outbound-resourceadapter. + Multiple connection-definitions can not use the + same connectionfactory-type. + + + + + + + + + + + + + + + + + + + + + The security-permissionType specifies a security + permission that is required by the resource adapter code. + + The security permission listed in the deployment descriptor + are ones that are different from those required by the + default permission set as specified in the connector + specification. The optional description can mention specific + reason that resource adapter requires a given security + permission. + + + + + + + + + + + The element security-permission-spec specifies a security + permission based on the Security policy file + syntax. Refer to the following URL for Sun's + implementation of the security permission + specification: + + http://java.sun.com/products/jdk/1.4/docs/guide/security/PolicyFiles.html#FileSyntax + + + + + + + + + + + + + + The transaction-supportType specifies the level of + transaction support provided by the resource adapter. It is + used by transaction-support elements. + + The value must be one of the following: + + NoTransaction + LocalTransaction + XATransaction + + + + + + + + + + + + + + diff --git a/gen/src/main/resources/xsd/ironjacamar/connector_1_6.xsd b/gen/src/main/resources/xsd/ironjacamar/connector_1_6.xsd new file mode 100644 index 00000000..384169e7 --- /dev/null +++ b/gen/src/main/resources/xsd/ironjacamar/connector_1_6.xsd @@ -0,0 +1,1269 @@ + + + + + + $Id$ + + + + + + + + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + + Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved. + + The contents of this file are subject to the terms of either the + GNU General Public License Version 2 only ("GPL") or the Common + Development and Distribution License("CDDL") (collectively, the + "License"). You may not use this file except in compliance with + the License. You can obtain a copy of the License at + https://glassfish.dev.java.net/public/CDDL+GPL.html or + glassfish/bootstrap/legal/LICENSE.txt. See the License for the + specific language governing permissions and limitations under the + License. + + When distributing the software, include this License Header + Notice in each file and include the License file at + glassfish/bootstrap/legal/LICENSE.txt. Sun designates this + particular file as subject to the "Classpath" exception as + provided by Sun in the GPL Version 2 section of the License file + that accompanied this code. If applicable, add the following + below the License Header, with the fields enclosed by brackets [] + replaced by your own identifying information: + "Portions Copyrighted [year] [name of copyright owner]" + + Contributor(s): + + If you wish your version of this file to be governed by only the + CDDL or only the GPL Version 2, indicate your decision by adding + "[Contributor] elects to include this software in this + distribution under the [CDDL or GPL Version 2] license." If you + don't indicate a single choice of license, a recipient has the + option to distribute your version of this file under either the + CDDL, the GPL Version 2 or to extend the choice of license to its + licensees as provided above. However, if you add GPL Version 2 + code and therefore, elected the GPL Version 2 license, then the + option applies only if the new code is made subject to such + option by the copyright holder. + + + + + + + + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + + Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved. + + The contents of this file are subject to the terms of either the + GNU General Public License Version 2 only ("GPL") or the Common + Development and Distribution License("CDDL") (collectively, the + "License"). You may not use this file except in compliance with + the License. You can obtain a copy of the License at + https://glassfish.dev.java.net/public/CDDL+GPL.html or + glassfish/bootstrap/legal/LICENSE.txt. See the License for the + specific language governing permissions and limitations under the + License. + + When distributing the software, include this License Header + Notice in each file and include the License file at + glassfish/bootstrap/legal/LICENSE.txt. Sun designates this + particular file as subject to the "Classpath" exception as + provided by Sun in the GPL Version 2 section of the License file + that accompanied this code. If applicable, add the following + below the License Header, with the fields enclosed by brackets [] + replaced by your own identifying information: + "Portions Copyrighted [year] [name of copyright owner]" + + Contributor(s): + + If you wish your version of this file to be governed by only the + CDDL or only the GPL Version 2, indicate your decision by adding + "[Contributor] elects to include this software in this + distribution under the [CDDL or GPL Version 2] license." If you + don't indicate a single choice of license, a recipient has the + option to distribute your version of this file under either the + CDDL, the GPL Version 2 or to extend the choice of license to its + licensees as provided above. However, if you add GPL Version 2 + code and therefore, elected the GPL Version 2 license, then the + option applies only if the new code is made subject to such + option by the copyright holder. + + + + + + + + ... + + + The instance documents may indicate the published version of + the schema using the xsi:schemaLocation attribute for Java EE + namespace with the following location: + + http://java.sun.com/xml/ns/javaee/connector_1_6.xsd + + ]]> + + + + + + + The following conventions apply to all Java EE + deployment descriptor elements unless indicated otherwise. + + - In elements that specify a pathname to a file within the + same JAR file, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the JAR file's namespace. Absolute filenames (i.e., those + starting with "/") also specify names in the root of the + JAR file's namespace. In general, relative names are + preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + The connector element is the root element of the deployment + descriptor for the resource adapter. This element includes + general information - vendor name, resource adapter version, + icon - about the resource adapter module. It also includes + information specific to the implementation of the resource + adapter library as specified through the element + resourceadapter. + + + + + + + + + + + + + The activationspecType specifies an activation + specification. The information includes fully qualified + Java class name of an activation specification and a set of + required configuration property names. + + + + + + + + com.wombat.ActivationSpecImpl + + + ]]> + + + + + + + + The required-config-property element is deprecated since + Connectors 1.6 specification. The resource adapter + implementation is recommended to use the @NotNull + Bean Validation annotation or its XML validation + descriptor equivalent to indicate that a configuration + property is required to be specified by the deployer. + See the Connectors specification for more information. + + + + + + + + + + + + + + + + + The adminobjectType specifies information about an + administered object. Administered objects are specific to a + messaging style or message provider. This contains + information on the Java type of the interface implemented by + an administered object, its Java class name and its + configuration properties. + + + + + + + + javax.jms.Destination + + + ]]> + + + + + + + com.wombat.DestinationImpl + + + ]]> + + + + + + + + + + + + + + + + The authentication-mechanismType specifies an authentication + mechanism supported by the resource adapter. Note that this + support is for the resource adapter and not for the + underlying EIS instance. The optional description specifies + any resource adapter specific requirement for the support of + security contract and authentication mechanism. + + Note that BasicPassword mechanism type should support the + javax.resource.spi.security.PasswordCredential interface. + The Kerbv5 mechanism type should support the + org.ietf.jgss.GSSCredential interface or the deprecated + javax.resource.spi.security.GenericCredential interface. + + + + + + + + + BasicPassword + + + Kerbv5 + + + Any additional security mechanisms are outside the + scope of the Connector architecture specification. + + ]]> + + + + + + + + + + + + + + + ServerName + + ]]> + + + + + + + + + + + + + + java.lang.String + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + The config-propertyType contains a declaration of a single + configuration property that may be used for providing + configuration information. + + The declaration consists of an optional description, name, + type and an optional value of the configuration property. If + the resource adapter provider does not specify a value than + the deployer is responsible for providing a valid value for + a configuration property. + + Any bounds or well-defined values of properties should be + described in the description element. + + + + + + + + + + + WombatServer + + ]]> + + + + + + + + The element config-property-ignore is used to specify + whether the configuration tools must ignore considering the + configuration property during auto-discovery of + Configuration properties. See the Connector specification for + more details. If unspecified, the container must not ignore + the configuration property during auto-discovery. + This element must be one of the following, "true" or "false". + + + + + + + + + The element config-property-supports-dynamic-updates is used to specify + whether the configuration property allows its value to be updated, by + application server's configuration tools, during the lifetime of + the JavaBean instance. See the Connector specification for + more details. If unspecified, the container must not dynamically + reconfigure the property. + This element must be one of the following, "true" or "false". + + + + + + + + + The element config-property-confidential is used to specify + whether the configuration property is confidential and + recommends application server's configuration tools to use special + visual aids for editing them. See the Connector specification for + more details. If unspecified, the container must not treat the + property as confidential. + This element must be one of the following, "true" or "false". + + + + + + + + + + + + + + + + The connection-definitionType defines a set of connection + interfaces and classes pertaining to a particular connection + type. This also includes configurable properties for + ManagedConnectionFactory instances that may be produced out + of this set. + + + + + + + + + com.wombat.ManagedConnectionFactoryImpl + + + ]]> + + + + + + + + com.wombat.ConnectionFactory + + + OR + + javax.resource.cci.ConnectionFactory + + + ]]> + + + + + + + com.wombat.ConnectionFactoryImpl + + + ]]> + + + + + + + javax.resource.cci.Connection + + + ]]> + + + + + + + com.wombat.ConnectionImpl + + + ]]> + + + + + + + + + + + + + + + The connectorType defines a resource adapter. + + + + + + + + + The element module-name specifies the name of the + resource adapter. + + If there is no module-name specified, the module-name + is determined as defined in Section EE.8.1.1 and EE.8.1.2 + of the Java Platform, Enterprise Edition (Java EE) + Specification, version 6. + + + + + + + + + + The element vendor-name specifies the name of + resource adapter provider vendor. + + If there is no vendor-name specified, the application + server must consider the default "" (empty string) as + the name of the resource adapter provider vendor. + + + + + + + + + The element eis-type contains information about the + type of the EIS. For example, the type of an EIS can + be product name of EIS independent of any version + info. + + This helps in identifying EIS instances that can be + used with this resource adapter. + + If there is no eis-type specified, the application + server must consider the default "" (empty string) as + the type of the EIS. + + + + + + + + + The element resourceadapter-version specifies a string-based version + of the resource adapter from the resource adapter + provider. + + If there is no resourceadapter-version specified, the application + server must consider the default "" (empty string) as + the version of the resource adapter. + + + + + + + + + + + + The element required-work-context specifies a fully qualified class + name that implements WorkContext interface, that the resource adapter + requires the application server to support. + + + + + + + + + + The version indicates the version of the schema to be used by the + deployment tool. This element doesn't have a default, and the resource adapter + developer/deployer is required to specify it. The element allows the deployment + tool to choose which schema to validate the descriptor against. + + + + + + + + + + The metadata-complete attribute defines whether the deployment + descriptor for the resource adapter module is complete, or whether + the class files available to the module and packaged with the resource + adapter should be examined for annotations that specify deployment + information. + + If metadata-complete is set to "true", the deployment tool of the + application server must ignore any annotations that specify deployment + information, which might be present in the class files of the + application.If metadata-complete is not specified or is set to "false", + the deployment tool must examine the class files of the application for + annotations, as specified by this specification. If the + deployment descriptor is not included or is included but not marked + metadata-complete, the deployment tool will process annotations. + + Application servers must assume that metadata-complete is true for + resource adapter modules with deployment descriptor version + lower than 1.6. + + + + + + + + + + + + + + + The credential-interfaceType specifies the + interface that the resource adapter implementation + supports for the representation of the + credentials. This element(s) that use this type, + i.e. credential-interface, should be used by + application server to find out the Credential + interface it should use as part of the security + contract. + + The possible values are: + + javax.resource.spi.security.PasswordCredential + org.ietf.jgss.GSSCredential + javax.resource.spi.security.GenericCredential + + + + + + + + + + + + + + + + + + + + The inbound-resourceadapterType specifies information + about an inbound resource adapter. This contains information + specific to the implementation of the resource adapter + library as specified through the messageadapter element. + + + + + + + + + + The messagelistener-type element content must be + unique in the messageadapter. Several messagelisteners + can not use the same messagelistener-type. + + + + + + + + + + + + + + + + + + + The licenseType specifies licensing requirements for the + resource adapter module. This type specifies whether a + license is required to deploy and use this resource adapter, + and an optional description of the licensing terms + (examples: duration of license, number of connection + restrictions). It is used by the license element. + + + + + + + + + + The element license-required specifies whether a + license is required to deploy and use the + resource adapter. This element must be one of + the following, "true" or "false". + + + + + + + + + + + + + + + + The messageadapterType specifies information about the + messaging capabilities of the resource adapter. This + contains information specific to the implementation of the + resource adapter library as specified through the + messagelistener element. + + + + + + + + + + + + + + + + + The messagelistenerType specifies information about a + specific message listener supported by the messaging + resource adapter. It contains information on the Java type + of the message listener interface and an activation + specification. + + + + + + + + javax.jms.MessageListener + + + ]]> + + + + + + + + + + + + + + + + The outbound-resourceadapterType specifies information about + an outbound resource adapter. The information includes fully + qualified names of classes/interfaces required as part of + the connector architecture specified contracts for + connection management, level of transaction support + provided, one or more authentication mechanisms supported + and additional required security permissions. + + If any of the outbound resource adapter elements (transaction-support, + authentication-mechanism, reauthentication-support) is specified through + this element or metadata annotations, and no connection-definition is + specified as part of this element or through annotations, the + application server must consider this an error and fail deployment. + + If there is no authentication-mechanism specified as part of + this element or metadata annotations, then the resource adapter does + not support any standard security authentication mechanisms as + part of security contract. The application server ignores the security + part of the system contracts in this case. + + If there is no transaction-support specified as part of this element + or metadata annotation, then the application server must consider that + the resource adapter does not support either the resource manager local + or JTA transactions and must consider the transaction support as + NoTransaction. Note that resource adapters may specify the level of + transaction support to be used at runtime for a ManagedConnectionFactory + through the TransactionSupport interface. + + If there is no reauthentication-support specified as part of + this element or metadata annotation, then the application server must consider + that the resource adapter does not support re-authentication of + ManagedConnections. + + + + + + + + + + + + The element reauthentication-support specifies + whether the resource adapter implementation supports + re-authentication of existing Managed- Connection + instance. Note that this information is for the + resource adapter implementation and not for the + underlying EIS instance. This element must have + either a "true" or "false" value. + + + + + + + + + + + + + + + + + Destination + + + ]]> + + + + + + + + + + + + + + + + + The resourceadapterType specifies information about the + resource adapter. The information includes fully qualified + resource adapter Java class name, configuration properties, + information specific to the implementation of the resource + adapter library as specified through the + outbound-resourceadapter and inbound-resourceadapter + elements, and an optional set of administered objects. + + + + + + + + + The element resourceadapter-class specifies the + fully qualified name of a Java class that implements + the javax.resource.spi.ResourceAdapter + interface. This Java class is provided as part of + resource adapter's implementation of connector + architecture specified contracts. The implementation + of this class is required to be a JavaBean. + + + + + + + + + + + The connectionfactory-interface element content + must be unique in the outbound-resourceadapter. + Multiple connection-definitions can not use the + same connectionfactory-type. + + + + + + + + + + + + + + The adminobject-interface and adminobject-class element content must be + unique in the resourceadapterType. Several admin objects + can not use the same adminobject-interface and adminobject-class. + + + + + + + + + + + + + + + + + + + + + The security-permissionType specifies a security + permission that is required by the resource adapter code. + + The security permission listed in the deployment descriptor + are ones that are different from those required by the + default permission set as specified in the connector + specification. The optional description can mention specific + reason that resource adapter requires a given security + permission. + + + + + + + + + + The element security-permission-spec specifies a security + permission based on the Security policy file + syntax. Refer to the following URL for Sun's + implementation of the security permission + specification: + + http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyFiles.html + + + + + + + + + + + + + + + + The transaction-supportType specifies the level of + transaction support provided by the resource adapter. It is + used by transaction-support elements. + + The value must be one of the following: + + NoTransaction + LocalTransaction + XATransaction + + + + + + + + + + + + + diff --git a/gen/src/main/resources/xsd/ironjacamar/datasources_1_0.xsd b/gen/src/main/resources/xsd/ironjacamar/datasources_1_0.xsd new file mode 100644 index 00000000..67aac8c9 --- /dev/null +++ b/gen/src/main/resources/xsd/ironjacamar/datasources_1_0.xsd @@ -0,0 +1,937 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jdbc:hsqldb:hsql://localhost:1701 + ]]> + + + + + + + org.hsqldb.jdbcDriver + ]]> + + + + + + + org.h2.jdbcx.JdbcDataSource + ]]> + + + + + + + + + + + + + + UTF-8 + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + myhost.mydomain.com + 1557 + mydb + myserver + ]]> + + + + + + + oracle.jdbc.xa.client.OracleXADataSource + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + ]]> + + + + + + + + ]]> + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + 300 + ]]> + + + + + + + 300 + ]]> + + + + + + + + + + + + + + + + + + + + + 300 + ]]> + + + + + + + + + + + + + + + + + + nowarn + ]]> + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + 1 + ]]> + + + + + + + + + + + + + + true. + Default is false + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + true + ]]> + + + + + + + + ]]> + + + + + + + + Ex: + ]]> + + + + + + + true + ]]> + + + + + + + true + ]]> + + + + + + + + + + + + + sa + ]]> + + + + + + + sa-pass + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.hsqldb.jdbcDriver + ]]> + + + + + + + + + + + + + oracle.jdbc.xa.client.OracleXADataSource + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gen/src/main/resources/xsd/ironjacamar/ironjacamar_1_0.xsd b/gen/src/main/resources/xsd/ironjacamar/ironjacamar_1_0.xsd new file mode 100644 index 00000000..c2bab060 --- /dev/null +++ b/gen/src/main/resources/xsd/ironjacamar/ironjacamar_1_0.xsd @@ -0,0 +1,645 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 300 + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + true + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + ]]> + + + + + + + + + + + + + + false. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + ]]> + + + + + + + + ]]> + + + + + + + + Ex: + ]]> + + + + + + + true + ]]> + + + + + + + true + ]]> + + + + + + + + + + + + + + + + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sa + ]]> + + + + + + + sa-pass + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + + + + + + + + + diff --git a/gen/src/main/resources/xsd/ironjacamar/resource-adapters_1_0.xsd b/gen/src/main/resources/xsd/ironjacamar/resource-adapters_1_0.xsd new file mode 100644 index 00000000..cb8833dd --- /dev/null +++ b/gen/src/main/resources/xsd/ironjacamar/resource-adapters_1_0.xsd @@ -0,0 +1,665 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + myra.rar + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 300 + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + true + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + ]]> + + + + + + + + + + + + + + false. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + ]]> + + + + + + + + ]]> + + + + + + + + Ex: + ]]> + + + + + + + true + ]]> + + + + + + + true + ]]> + + + + + + + + + + + + + + + + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sa + ]]> + + + + + + + sa-pass + ]]> + + + + + + + HsqlDbRealm + ]]> + + + + + + + diff --git a/gen/src/main/resources/xslt/ddJava.xsl b/gen/src/main/resources/xslt/ddJava.xsl index 8e342f56..42395a7f 100644 --- a/gen/src/main/resources/xslt/ddJava.xsl +++ b/gen/src/main/resources/xslt/ddJava.xsl @@ -371,7 +371,7 @@ - + } @@ -590,6 +590,9 @@ + + + @@ -811,6 +814,10 @@ + + + + @@ -891,7 +898,11 @@ - + + + + + diff --git a/gen/src/main/resources/xslt/metadata.xsl b/gen/src/main/resources/xslt/metadata.xsl index 4c5dcdd3..83b8af71 100644 --- a/gen/src/main/resources/xslt/metadata.xsl +++ b/gen/src/main/resources/xslt/metadata.xsl @@ -83,6 +83,7 @@ + @@ -150,6 +151,7 @@ + @@ -168,6 +170,7 @@ + @@ -227,6 +230,18 @@ + + + + + + + + + + + + @@ -367,74 +382,101 @@ + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -445,20 +487,104 @@ + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -469,36 +595,311 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - + - + - + + - - - - + + + + - + @@ -506,85 +907,48 @@ - - + + - - - - - - - + + + + + + + + + + + + + + + + + + + - + - - + + + + - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - + + + + @@ -771,6 +1135,24 @@ + + + + + + + + + + + + + + + + + + @@ -861,7 +1243,7 @@ - + @@ -915,8 +1297,8 @@ - - + + @@ -942,7 +1324,7 @@ - + diff --git a/gen/src/main/resources/xslt/schemasJ2ee13.xml b/gen/src/main/resources/xslt/schemasJ2ee13.xml new file mode 100644 index 00000000..3eed9ddc --- /dev/null +++ b/gen/src/main/resources/xslt/schemasJ2ee13.xml @@ -0,0 +1,17 @@ + +

+ + + + + + + + + + + + + + +
diff --git a/gen/src/main/resources/xslt/schemasJBossEE6.xml b/gen/src/main/resources/xslt/schemasJBossEE6.xml index 020c0931..11c4f8bc 100644 --- a/gen/src/main/resources/xslt/schemasJBossEE6.xml +++ b/gen/src/main/resources/xslt/schemasJBossEE6.xml @@ -26,5 +26,27 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/impl-javaee/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.connector10.ConnectorDescriptor b/impl-javaee/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.connector10.ConnectorDescriptor new file mode 100644 index 00000000..5bd7e38c --- /dev/null +++ b/impl-javaee/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.connector10.ConnectorDescriptor @@ -0,0 +1,3 @@ +implClass=org.jboss.shrinkwrap.descriptor.impl.connector10.ConnectorDescriptorImpl +importerClass=org.jboss.shrinkwrap.descriptor.spi.node.dom.XmlDomNodeDescriptorImporterImpl +defaultName=ra.xml \ No newline at end of file diff --git a/impl-jboss/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourcesDescriptor b/impl-jboss/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourcesDescriptor new file mode 100644 index 00000000..3a42f91a --- /dev/null +++ b/impl-jboss/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourcesDescriptor @@ -0,0 +1,3 @@ +implClass=org.jboss.shrinkwrap.descriptor.impl.datasources10.DatasourcesDescriptorImpl +importerClass=org.jboss.shrinkwrap.descriptor.spi.node.dom.XmlDomNodeDescriptorImporterImpl +defaultName=datasources.xml \ No newline at end of file diff --git a/impl-jboss/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.ironjacamar10.IronjacamarDescriptor b/impl-jboss/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.ironjacamar10.IronjacamarDescriptor new file mode 100644 index 00000000..9c3ca305 --- /dev/null +++ b/impl-jboss/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.ironjacamar10.IronjacamarDescriptor @@ -0,0 +1,3 @@ +implClass=org.jboss.shrinkwrap.descriptor.impl.ironjacamar10.IronjacamarDescriptorImpl +importerClass=org.jboss.shrinkwrap.descriptor.spi.node.dom.XmlDomNodeDescriptorImporterImpl +defaultName=ironjacamar.xml \ No newline at end of file diff --git a/impl-jboss/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdaptersDescriptor b/impl-jboss/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdaptersDescriptor new file mode 100644 index 00000000..33ab8e4e --- /dev/null +++ b/impl-jboss/src/main/resources/META-INF/services/org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdaptersDescriptor @@ -0,0 +1,3 @@ +implClass=org.jboss.shrinkwrap.descriptor.impl.resourceadapters10.ResourceAdaptersDescriptorImpl +importerClass=org.jboss.shrinkwrap.descriptor.spi.node.dom.XmlDomNodeDescriptorImporterImpl +defaultName=resourceadapters.xml \ No newline at end of file diff --git a/pom.xml b/pom.xml index a730668a..ce85e7b9 100644 --- a/pom.xml +++ b/pom.xml @@ -61,6 +61,7 @@ impl-base impl-javaee impl-jboss + cli spi test test-util diff --git a/test/src/test/java/org/jboss/shrinkwrap/descriptor/test/connector10/ConnectorDescriptorTestCase.java b/test/src/test/java/org/jboss/shrinkwrap/descriptor/test/connector10/ConnectorDescriptorTestCase.java new file mode 100644 index 00000000..d5ba707d --- /dev/null +++ b/test/src/test/java/org/jboss/shrinkwrap/descriptor/test/connector10/ConnectorDescriptorTestCase.java @@ -0,0 +1,114 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2009, Red Hat Middleware LLC, and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * Licensed 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.jboss.shrinkwrap.descriptor.test.connector10; + +import static org.junit.Assert.assertTrue; + +import java.io.BufferedReader; +import java.io.FileReader; + +import junit.framework.Assert; + +import org.jboss.shrinkwrap.descriptor.api.Descriptors; +import org.jboss.shrinkwrap.descriptor.api.connector10.ConnectorDescriptor; +import org.jboss.shrinkwrap.descriptor.test.util.XmlAssert; +import org.junit.Test; + + +public class ConnectorDescriptorTestCase +{ + + //-------------------------------------------------------------------------------------|| + // Basic API --------------------------------------------------------------------------|| + //-------------------------------------------------------------------------------------|| + + @Test + public void testDefaultName() throws Exception + { + Assert.assertEquals("ra.xml", create().getDescriptorName()); + } + + @Test + public void testSetName() throws Exception + { + Assert.assertEquals("test.xml", Descriptors.create(ConnectorDescriptor.class, "test.xml").getDescriptorName()); + } + + @Test + public void testHornetQExample() throws Exception + { + ConnectorDescriptor jca10Generated = create() + .displayName("Sample Adapter") + .description("It is a sample resource adapter") + .vendorName("JBoss") + .specVersion("1.0") + .eisType("Sample") + .version("1.0") + .getOrCreateLicense() + .description("description0") + .licenseRequired("true") + .up() + .getOrCreateResourceadapter() + .managedconnectionfactoryClass("org.jboss.messaging.adapters.jcasample.SampleManagedConnectionFactory") + .connectionfactoryInterface("javax.resource.cci.ConnectionFactory") + .connectionfactoryImplClass("org.jboss.messaging.adapters.jcasample.SampleConnectionFactory") + .connectionInterface("javax.resource.cci.Connection") + .connectionImplClass("org.jboss.messaging.adapters.jcasample.SampleConnection") + .transactionSupport("NoTransaction") + .createConfigProperty() + .configPropertyName("Input") + .configPropertyType("java.lang.String") + .configPropertyValue("test messages").up() + .createAuthenticationMechanism() + .authenticationMechanismType("BasicPassword") + .credentialInterface("javax.resource.security.PasswordCredential").up() + .reauthenticationSupport("false") + .up(); + + String generatedRaXml = jca10Generated.exportAsString(); + String originalRaXml = this.getResourceContents("src/test/resources/test-orig-connector10.xml"); + +// System.out.println(generatedRaXml); + + XmlAssert.assertIdentical(originalRaXml, generatedRaXml); + } + + + //-------------------------------------------------------------------------------------|| + // Internal Helper --------------------------------------------------------------------|| + //-------------------------------------------------------------------------------------|| + + private String getResourceContents(String resource) throws Exception + { + assert resource != null && resource.length() > 0 : "Resource must be specified"; + final BufferedReader reader = new BufferedReader(new FileReader(resource)); + final StringBuilder builder = new StringBuilder(); + String line; + while ((line = reader.readLine()) != null) + { + builder.append(line); + builder.append("\n"); + } + return builder.toString(); + } + + private ConnectorDescriptor create() + { + return Descriptors.create(ConnectorDescriptor.class); + } + +} diff --git a/test/src/test/java/org/jboss/shrinkwrap/descriptor/test/ironjacamar/DataSourcesTestCase.java b/test/src/test/java/org/jboss/shrinkwrap/descriptor/test/ironjacamar/DataSourcesTestCase.java new file mode 100644 index 00000000..f69bbff2 --- /dev/null +++ b/test/src/test/java/org/jboss/shrinkwrap/descriptor/test/ironjacamar/DataSourcesTestCase.java @@ -0,0 +1,201 @@ +package org.jboss.shrinkwrap.descriptor.test.ironjacamar; + +import java.io.BufferedReader; +import java.io.FileReader; +import java.text.SimpleDateFormat; +import java.util.TimeZone; + +import org.jboss.shrinkwrap.descriptor.api.Descriptors; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourcesDescriptor; +import org.jboss.shrinkwrap.descriptor.test.util.XmlAssert; +import org.junit.Before; +import org.junit.Test; + + +public class DataSourcesTestCase +{ + final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-DD hh:mm:ss"); + + @Before + public void init() + { + sdf.setTimeZone(TimeZone.getTimeZone("GMT")); + } + + @Test + public void testGeneratedDataSourcesXml() throws Exception + { + DatasourcesDescriptor dataSourcesGenerated = create() + .addDefaultNamespaces() + .createDatasource() + .jta(true).jndiName("jndi-name1").poolName("pool-name1") + .enabled(true).useJavaContext(true).spy(false).useCcm(true) + .connectionUrl("connection-url0") + .driverClass("driver-class0") + .datasourceClass("datasource-class0") + .driver("driver0") + .createConnectionProperty().name("name1").up() + .createConnectionProperty().name("name3").up() + .newConnectionSql("new-connection-sql0") + .transactionIsolation("TRANSACTION_READ_UNCOMMITTED") + .urlDelimiter("url-delimiter0") + .urlSelectorStrategyClassName("url-selector-strategy-class-name0") + .getOrCreatePool() + .minPoolSize(50) + .maxPoolSize(50) + .prefill(false) + .useStrictMin(false) + .flushStrategy("flush-strategy0").up() + .getOrCreateSecurity() + .userName("user-name0") + .password("password0") + .securityDomain("security-domain0") + .getOrCreateReauthPlugin().className("class-name1") + .createConfigProperty().name("name5").text("config-property0").up() + .createConfigProperty().name("name7").text("config-property1").up() + .up().up() + .getOrCreateValidation() + .getOrCreateValidConnectionChecker().className("class-name3") + .createConfigProperty().name("name9").text("config-property2").up() + .createConfigProperty().name("name11").text("config-property3").up() + .up() + .checkValidConnectionSql("check-valid-connection-sql0") + .validateOnMatch(false) + .backgroundValidation(false) + .backgroundValidationMillis(50) + .useFastFail(false) + .getOrCreateStaleConnectionChecker().className("class-name5") + .createConfigProperty().name("name13").text("config-property4").up() + .createConfigProperty().name("name15").text("config-property5").up() + .up() + .getOrCreateExceptionSorter().className("class-name7") + .createConfigProperty().name("name17").text("config-property6").up() + .createConfigProperty().name("name19").text("config-property7").up() + .up() + .up() + .getOrCreateTimeout() + .blockingTimeoutMillis(50) + .idleTimeoutMinutes(50) + .setTxQueryTimeout() + .queryTimeout(50) + .useTryLock(50) + .allocationRetry(50) + .allocationRetryWaitMillis(50) + .xaResourceTimeout("xa-resource-timeout0") + .up() + .getOrCreateStatement() + .trackStatements("true") + .preparedStatementCacheSize(50) + .sharePreparedStatements() + .up() + .up() + .createDatasource() + .jta(true).jndiName("jndi-name3").poolName("pool-name3") + .enabled(true).useJavaContext(true).spy(false).useCcm(true) + .connectionUrl("connection-url1") + .driverClass("driver-class1") + .datasourceClass("datasource-class1") + .driver("driver1") + .createConnectionProperty().name("name21").up() + .createConnectionProperty().name("name23").up() + .newConnectionSql("new-connection-sql1") + .transactionIsolation("TRANSACTION_READ_UNCOMMITTED") + .urlDelimiter("url-delimiter1") + .urlSelectorStrategyClassName("url-selector-strategy-class-name1") + .getOrCreatePool() + .minPoolSize(50) + .maxPoolSize(50) + .prefill(false) + .useStrictMin(false) + .flushStrategy("flush-strategy1").up() + .getOrCreateSecurity() + .userName("user-name1") + .password("password1") + .securityDomain("security-domain1") + .getOrCreateReauthPlugin().className("class-name9") + .createConfigProperty().name("name25").text("config-property8").up() + .createConfigProperty().name("name27").text("config-property9").up() + .up().up() + .getOrCreateValidation() + .getOrCreateValidConnectionChecker().className("class-name11") + .createConfigProperty().name("name29").text("config-property10").up() + .createConfigProperty().name("name31").text("config-property11").up() + .up() + .checkValidConnectionSql("check-valid-connection-sql1") + .validateOnMatch(false) + .backgroundValidation(false) + .backgroundValidationMillis(50) + .useFastFail(false) + .getOrCreateStaleConnectionChecker().className("class-name13") + .createConfigProperty().name("name33").text("config-property12").up() + .createConfigProperty().name("name35").text("config-property13").up() + .up() + .getOrCreateExceptionSorter().className("class-name15") + .createConfigProperty().name("name37").text("config-property14").up() + .createConfigProperty().name("name39").text("config-property15").up() + .up() + .up() + .getOrCreateTimeout() + .blockingTimeoutMillis(50) + .idleTimeoutMinutes(50) + .setTxQueryTimeout() + .queryTimeout(50) + .useTryLock(50) + .allocationRetry(50) + .allocationRetryWaitMillis(50) + .xaResourceTimeout("xa-resource-timeout1") + .up() + .getOrCreateStatement() + .trackStatements("true") + .preparedStatementCacheSize(50) + .sharePreparedStatements() + .up() + .up() + .getOrCreateDrivers() + .createDriver() + .name("name41").module("module1").majorVersion(0).minorVerion(0) + .driverClass("driver-class2") + .datasourceClass("datasource-class2") + .xaDatasourceClass("xa-datasource-class0") + .up() + .createDriver() + .name("name43").module("module3").majorVersion(0).minorVerion(0) + .driverClass("driver-class3") + .datasourceClass("datasource-class3") + .xaDatasourceClass("xa-datasource-class1") + .up() + .up(); + + + String dataSourcesGeneratedXmlGenerated = dataSourcesGenerated.exportAsString(); + String dataSourcesGeneratedXmlOriginal = getResourceContents("src/test/resources/test-gen-datasources10.xml"); + +// System.out.println(dataSourcesGeneratedXmlGenerated); + XmlAssert.assertIdentical(dataSourcesGeneratedXmlOriginal, dataSourcesGeneratedXmlGenerated); + } + + + // -------------------------------------------------------------------------------------|| + // Helper Methods ----------------------------------------------------------------------|| + // -------------------------------------------------------------------------------------|| + + private String getResourceContents(String resource) throws Exception + { + assert resource != null && resource.length() > 0 : "Resource must be specified"; + final BufferedReader reader = new BufferedReader(new FileReader(resource)); + final StringBuilder builder = new StringBuilder(); + String line; + while ((line = reader.readLine()) != null) + { + builder.append(line); + builder.append("\n"); + } + return builder.toString(); + } + + private DatasourcesDescriptor create() + { + return Descriptors.create(DatasourcesDescriptor.class); + } + +} diff --git a/test/src/test/java/org/jboss/shrinkwrap/descriptor/test/ironjacamar/IronJacamarTestCase.java b/test/src/test/java/org/jboss/shrinkwrap/descriptor/test/ironjacamar/IronJacamarTestCase.java new file mode 100644 index 00000000..59788f6b --- /dev/null +++ b/test/src/test/java/org/jboss/shrinkwrap/descriptor/test/ironjacamar/IronJacamarTestCase.java @@ -0,0 +1,152 @@ +package org.jboss.shrinkwrap.descriptor.test.ironjacamar; + +import java.io.BufferedReader; +import java.io.FileReader; +import java.text.SimpleDateFormat; +import java.util.TimeZone; + +import org.jboss.shrinkwrap.descriptor.api.Descriptors; +import org.jboss.shrinkwrap.descriptor.api.ironjacamar10.IronjacamarDescriptor; +import org.jboss.shrinkwrap.descriptor.test.util.XmlAssert; +import org.junit.Before; +import org.junit.Test; + + +public class IronJacamarTestCase +{ + final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-DD hh:mm:ss"); + + @Before + public void init() + { + sdf.setTimeZone(TimeZone.getTimeZone("GMT")); + } + + @Test + public void testGeneratedIronJacamarXml() throws Exception + { + IronjacamarDescriptor ironJacamarGenerated = create() + .addDefaultNamespaces() + .getOrCreateBeanValidationGroups() + .beanValidationGroup("bean-validation-group0") + .beanValidationGroup("bean-validation-group1").up() + .bootstrapContext("bootstrap-context0") + .createConfigProperty().name("name1").text("config-property0").up() + .createConfigProperty().name("name3").text("config-property1").up() + .transactionSupport("NoTransaction") + .getOrCreateConnectionDefinitions() + .createConnectionDefinition() + .useCcm(true).className("class-name1").jndiName("jndi-name1") + .enabled(true).useJavaContext(true).poolName("pool-name1") + .createConfigProperty().name("name5").text("config-property2").up() + .createConfigProperty().name("name7").text("config-property3").up() + .getOrCreatePool() + .minPoolSize(50) + .maxPoolSize(50) + .prefill(false) + .useStrictMin(false) + .flushStrategy("flush-strategy0").up() + .getOrCreateSecurity() + .securityDomainAndApplication("security-domain-and-application0").up() + .getOrCreateTimeout() + .blockingTimeoutMillis(50) + .idleTimeoutMinutes(50) + .allocationRetry(50) + .allocationRetryWaitMillis(50) + .xaResourceTimeout(50).up() + .getOrCreateValidation() + .backgroundValidation(false) + .backgroundValidationMillis(50) + .useFastFail(false).up() + .getOrCreateRecovery() + .noRecovery(false) + .getOrCreateRecoverCredential() + .userName("user-name0") + .password("password0") + .securityDomain("security-domain0").up() + .getOrCreateRecoverPlugin().className("class-name3") + .getOrCreateConfigProperty().name("name9") + .text("config-property4").up().up().up().up() + .createConnectionDefinition() + .useCcm(true).className("class-name5").jndiName("jndi-name3") + .enabled(true).useJavaContext(true).poolName("pool-name3") + .createConfigProperty().name("name11").text("config-property5").up() + .createConfigProperty().name("name13").text("config-property6").up() + .getOrCreateXaPool() + .minPoolSize(50) + .maxPoolSize(50) + .prefill(false) + .useStrictMin(false) + .flushStrategy("flush-strategy1") + .isSameRmOverride(false) + .interleaving() + .noTxSeparatePools() + .padXid(false) + .wrapXaResource(false) + .up() + .getOrCreateSecurity() + .securityDomainAndApplication("security-domain-and-application1").up() + .getOrCreateTimeout() + .blockingTimeoutMillis(50) + .idleTimeoutMinutes(50) + .allocationRetry(50) + .allocationRetryWaitMillis(50) + .xaResourceTimeout(50).up() + .getOrCreateValidation() + .backgroundValidation(false) + .backgroundValidationMillis(50) + .useFastFail(false).up() + .getOrCreateRecovery() + .noRecovery(false) + .getOrCreateRecoverCredential() + .userName("user-name1") + .password("password1") + .securityDomain("security-domain1").up() + .getOrCreateRecoverPlugin().className("class-name7") + .getOrCreateConfigProperty().name("name15").text("config-property7").up().up().up().up().up() + .getOrCreateAdminObjects() + .createAdminObject() + .className("class-name9").jndiName("jndi-name5").enabled(true) + .useJavaContext(true).poolName("pool-name5") + .createConfigProperty().name("name17").text("config-property8").up() + .createConfigProperty().name("name19").text("config-property9").up().up() + .createAdminObject() + .className("class-name11").jndiName("jndi-name7").enabled(true) + .useJavaContext(true).poolName("pool-name7") + .createConfigProperty().name("name21").text("config-property10").up() + .createConfigProperty().name("name23").text("config-property11").up().up() + .up() + ; + + String ironJacamarXmlGenerated = ironJacamarGenerated.exportAsString(); + String ironJacamarXmlOriginal = getResourceContents("src/test/resources/test-gen-ironjacamar.xml"); + + System.out.println(ironJacamarXmlGenerated); + XmlAssert.assertIdentical(ironJacamarXmlOriginal, ironJacamarXmlGenerated); + } + + + // -------------------------------------------------------------------------------------|| + // Helper Methods ----------------------------------------------------------------------|| + // -------------------------------------------------------------------------------------|| + + private String getResourceContents(String resource) throws Exception + { + assert resource != null && resource.length() > 0 : "Resource must be specified"; + final BufferedReader reader = new BufferedReader(new FileReader(resource)); + final StringBuilder builder = new StringBuilder(); + String line; + while ((line = reader.readLine()) != null) + { + builder.append(line); + builder.append("\n"); + } + return builder.toString(); + } + + private IronjacamarDescriptor create() + { + return Descriptors.create(IronjacamarDescriptor.class); + } + +} diff --git a/test/src/test/java/org/jboss/shrinkwrap/descriptor/test/ironjacamar/ResourceAdaptersTestCase.java b/test/src/test/java/org/jboss/shrinkwrap/descriptor/test/ironjacamar/ResourceAdaptersTestCase.java new file mode 100644 index 00000000..b79dc12e --- /dev/null +++ b/test/src/test/java/org/jboss/shrinkwrap/descriptor/test/ironjacamar/ResourceAdaptersTestCase.java @@ -0,0 +1,231 @@ +package org.jboss.shrinkwrap.descriptor.test.ironjacamar; + +import java.io.BufferedReader; +import java.io.FileReader; +import java.text.SimpleDateFormat; +import java.util.TimeZone; + +import org.jboss.shrinkwrap.descriptor.api.Descriptors; +import org.jboss.shrinkwrap.descriptor.api.datasources10.DatasourcesDescriptor; +import org.jboss.shrinkwrap.descriptor.api.resourceadapters10.ResourceAdaptersDescriptor; +import org.jboss.shrinkwrap.descriptor.test.util.XmlAssert; +import org.junit.Before; +import org.junit.Test; + + +public class ResourceAdaptersTestCase +{ + final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-DD hh:mm:ss"); + + @Before + public void init() + { + sdf.setTimeZone(TimeZone.getTimeZone("GMT")); + } + + @Test + public void testGeneratedDataSourcesXml() throws Exception + { + ResourceAdaptersDescriptor resourceAdaptersGenerated = create() + .addDefaultNamespaces() + .createResourceAdapter() + .archive("archive0") + .getOrCreateBeanValidationGroups() + .beanValidationGroup("bean-validation-group0") + .beanValidationGroup("bean-validation-group1").up() + .bootstrapContext("bootstrap-context0") + .createConfigProperty().name("name1").text("config-property0").up() + .createConfigProperty().name("name3").text("config-property1").up() + .transactionSupport("NoTransaction") + .getOrCreateConnectionDefinitions() + .createConnectionDefinition() + .useCcm(true).className("class-name1").jndiName("jndi-name1") + .enabled(true).useJavaContext(true).poolName("pool-name1") + .createConfigProperty().name("name5").text("config-property2").up() + .createConfigProperty().name("name7").text("config-property3").up() + .getOrCreatePool() + .minPoolSize(50) + .maxPoolSize(50) + .prefill(false) + .useStrictMin(false) + .flushStrategy("flush-strategy0").up() + .getOrCreateSecurity() + .securityDomain("security-domain0").up() + .getOrCreateTimeout() + .blockingTimeoutMillis(50) + .idleTimeoutMinutes(50) + .allocationRetry(50) + .allocationRetryWaitMillis(50) + .xaResourceTimeout(50).up() + .getOrCreateValidation() + .backgroundValidation(false) + .backgroundValidationMillis(50) + .useFastFail(false).up() + .getOrCreateRecovery() + .noRecovery(false) + .getOrCreateRecoverCredential().up() + .getOrCreateRecoverPlugin().className("class-name3") + .getOrCreateConfigProperty().name("name9") + .text("config-property4").up().up().up().up() + .createConnectionDefinition() + .useCcm(true).className("class-name5").jndiName("jndi-name3") + .enabled(true).useJavaContext(true).poolName("pool-name3") + .createConfigProperty().name("name11").text("config-property5").up() + .createConfigProperty().name("name13").text("config-property6").up() + .getOrCreatePool() + .minPoolSize(50) + .maxPoolSize(50) + .prefill(false) + .useStrictMin(false) + .flushStrategy("flush-strategy1") + .up() + .getOrCreateSecurity() + .securityDomain("security-domain1").up() + .getOrCreateTimeout() + .blockingTimeoutMillis(50) + .idleTimeoutMinutes(50) + .allocationRetry(50) + .allocationRetryWaitMillis(50) + .xaResourceTimeout(50).up() + .getOrCreateValidation() + .backgroundValidation(false) + .backgroundValidationMillis(50) + .useFastFail(false).up() + .getOrCreateRecovery() + .noRecovery(false) + .getOrCreateRecoverCredential().up() + .getOrCreateRecoverPlugin().className("class-name7") + .getOrCreateConfigProperty().name("name15").text("config-property7").up().up().up().up().up() + .getOrCreateAdminObjects() + .createAdminObject() + .className("class-name9").jndiName("jndi-name5").enabled(true) + .useJavaContext(true).poolName("pool-name5") + .createConfigProperty().name("name17").text("config-property8").up() + .createConfigProperty().name("name19").text("config-property9").up().up() + .createAdminObject() + .className("class-name11").jndiName("jndi-name7").enabled(true) + .useJavaContext(true).poolName("pool-name7") + .createConfigProperty().name("name21").text("config-property10").up() + .createConfigProperty().name("name23").text("config-property11").up().up() + .up().up() + .createResourceAdapter() + .archive("archive1") + .getOrCreateBeanValidationGroups() + .beanValidationGroup("bean-validation-group2") + .beanValidationGroup("bean-validation-group3").up() + .bootstrapContext("bootstrap-context1") + .createConfigProperty().name("name25").text("config-property12").up() + .createConfigProperty().name("name27").text("config-property13").up() + .transactionSupport("NoTransaction") + .getOrCreateConnectionDefinitions() + .createConnectionDefinition() + .useCcm(true).className("class-name13").jndiName("jndi-name9") + .enabled(true).useJavaContext(true).poolName("pool-name9") + .createConfigProperty().name("name29").text("config-property14").up() + .createConfigProperty().name("name31").text("config-property15").up() + .getOrCreateXaPool() + .minPoolSize(50) + .maxPoolSize(50) + .prefill(false) + .useStrictMin(false) + .flushStrategy("flush-strategy2") + .isSameRmOverride(false) + .interleaving() + .noTxSeparatePools() + .padXid(false) + .wrapXaResource(false) + .up() + .getOrCreateSecurity() + .securityDomain("security-domain2").up() + .getOrCreateTimeout() + .blockingTimeoutMillis(50) + .idleTimeoutMinutes(50) + .allocationRetry(50) + .allocationRetryWaitMillis(50) + .xaResourceTimeout(50).up() + .getOrCreateValidation() + .backgroundValidation(false) + .backgroundValidationMillis(50) + .useFastFail(false).up() + .getOrCreateRecovery() + .noRecovery(false) + .getOrCreateRecoverCredential().up() + .getOrCreateRecoverPlugin().className("class-name15") + .getOrCreateConfigProperty().name("name33") + .text("config-property16").up().up().up().up() + .createConnectionDefinition() + .useCcm(true).className("class-name17").jndiName("jndi-name11") + .enabled(true).useJavaContext(true).poolName("pool-name11") + .createConfigProperty().name("name35").text("config-property17").up() + .createConfigProperty().name("name37").text("config-property18").up() + .getOrCreatePool() + .minPoolSize(50) + .maxPoolSize(50) + .prefill(false) + .useStrictMin(false) + .flushStrategy("flush-strategy3") + .up() + .getOrCreateSecurity() + .securityDomain("security-domain3").up() + .getOrCreateTimeout() + .blockingTimeoutMillis(50) + .idleTimeoutMinutes(50) + .allocationRetry(50) + .allocationRetryWaitMillis(50) + .xaResourceTimeout(50).up() + .getOrCreateValidation() + .backgroundValidation(false) + .backgroundValidationMillis(50) + .useFastFail(false).up() + .getOrCreateRecovery() + .noRecovery(false) + .getOrCreateRecoverCredential().up() + .getOrCreateRecoverPlugin().className("class-name19") + .getOrCreateConfigProperty().name("name39").text("config-property19").up().up().up().up().up() + .getOrCreateAdminObjects() + .createAdminObject() + .className("class-name21").jndiName("jndi-name13").enabled(true) + .useJavaContext(true).poolName("pool-name13") + .createConfigProperty().name("name41").text("config-property20").up() + .createConfigProperty().name("name43").text("config-property21").up().up() + .createAdminObject() + .className("class-name23").jndiName("jndi-name15").enabled(true) + .useJavaContext(true).poolName("pool-name15") + .createConfigProperty().name("name45").text("config-property22").up() + .createConfigProperty().name("name47").text("config-property23").up().up() + .up().up() + ; + + + String resourceAdaptersXmlGenerated = resourceAdaptersGenerated.exportAsString(); + String resourceAdaptersXmlOriginal = getResourceContents("src/test/resources/test-gen-resourceadapter10.xml"); + +// System.out.println(resourceAdaptersXmlGenerated); + XmlAssert.assertIdentical(resourceAdaptersXmlOriginal, resourceAdaptersXmlGenerated); + } + + + // -------------------------------------------------------------------------------------|| + // Helper Methods ----------------------------------------------------------------------|| + // -------------------------------------------------------------------------------------|| + + private String getResourceContents(String resource) throws Exception + { + assert resource != null && resource.length() > 0 : "Resource must be specified"; + final BufferedReader reader = new BufferedReader(new FileReader(resource)); + final StringBuilder builder = new StringBuilder(); + String line; + while ((line = reader.readLine()) != null) + { + builder.append(line); + builder.append("\n"); + } + return builder.toString(); + } + + private ResourceAdaptersDescriptor create() + { + return Descriptors.create(ResourceAdaptersDescriptor.class); + } + +} diff --git a/test/src/test/resources/test-gen-datasources10.xml b/test/src/test/resources/test-gen-datasources10.xml new file mode 100644 index 00000000..6ac26d95 --- /dev/null +++ b/test/src/test/resources/test-gen-datasources10.xml @@ -0,0 +1,145 @@ + + + + connection-url0 + driver-class0 + datasource-class0 + driver0 + + + + + new-connection-sql0 + TRANSACTION_READ_UNCOMMITTED + url-delimiter0 + url-selector-strategy-class-name0 + + 50 + 50 + false + false + flush-strategy0 + + + user-name0 + password0 + security-domain0 + + config-property0 + config-property1 + + + + + config-property2 + config-property3 + + check-valid-connection-sql0 + false + false + 50 + false + + config-property4 + config-property5 + + + config-property6 + config-property7 + + + + 50 + 50 + + 50 + 50 + 50 + 50 + xa-resource-timeout0 + + + true + 50 + + + + + connection-url1 + driver-class1 + datasource-class1 + driver1 + + + + + new-connection-sql1 + TRANSACTION_READ_UNCOMMITTED + url-delimiter1 + url-selector-strategy-class-name1 + + 50 + 50 + false + false + flush-strategy1 + + + user-name1 + password1 + security-domain1 + + config-property8 + config-property9 + + + + + config-property10 + config-property11 + + check-valid-connection-sql1 + false + false + 50 + false + + config-property12 + config-property13 + + + config-property14 + config-property15 + + + + 50 + 50 + + 50 + 50 + 50 + 50 + xa-resource-timeout1 + + + true + 50 + + + + + + driver-class2 + datasource-class2 + xa-datasource-class0 + + + driver-class3 + datasource-class3 + xa-datasource-class1 + + + diff --git a/test/src/test/resources/test-gen-ironjacamar.xml b/test/src/test/resources/test-gen-ironjacamar.xml new file mode 100644 index 00000000..98f650fd --- /dev/null +++ b/test/src/test/resources/test-gen-ironjacamar.xml @@ -0,0 +1,102 @@ + + + + bean-validation-group0 + bean-validation-group1 + + bootstrap-context0 + config-property0 + config-property1 + NoTransaction + + + config-property2 + config-property3 + + 50 + 50 + false + false + flush-strategy0 + + + security-domain-and-application0 + + + 50 + 50 + 50 + 50 + 50 + + + false + 50 + false + + + + user-name0 + password0 + security-domain0 + + + config-property4 + + + + + config-property5 + config-property6 + + 50 + 50 + false + false + flush-strategy1 + false + + + false + false + + + security-domain-and-application1 + + + 50 + 50 + 50 + 50 + 50 + + + false + 50 + false + + + + user-name1 + password1 + security-domain1 + + + config-property7 + + + + + + + config-property8 + config-property9 + + + config-property10 + config-property11 + + + diff --git a/test/src/test/resources/test-gen-resourceadapter10.xml b/test/src/test/resources/test-gen-resourceadapter10.xml new file mode 100644 index 00000000..d8cd0814 --- /dev/null +++ b/test/src/test/resources/test-gen-resourceadapter10.xml @@ -0,0 +1,188 @@ + + + + archive0 + + bean-validation-group0 + bean-validation-group1 + + bootstrap-context0 + config-property0 + config-property1 + NoTransaction + + + config-property2 + config-property3 + + 50 + 50 + false + false + flush-strategy0 + + + security-domain0 + + + 50 + 50 + 50 + 50 + 50 + + + false + 50 + false + + + + + + config-property4 + + + + + config-property5 + config-property6 + + 50 + 50 + false + false + flush-strategy1 + + + security-domain1 + + + 50 + 50 + 50 + 50 + 50 + + + false + 50 + false + + + + + + config-property7 + + + + + + + config-property8 + config-property9 + + + config-property10 + config-property11 + + + + + archive1 + + bean-validation-group2 + bean-validation-group3 + + bootstrap-context1 + config-property12 + config-property13 + NoTransaction + + + config-property14 + config-property15 + + 50 + 50 + false + false + flush-strategy2 + false + + + false + false + + + security-domain2 + + + 50 + 50 + 50 + 50 + 50 + + + false + 50 + false + + + + + + config-property16 + + + + + config-property17 + config-property18 + + 50 + 50 + false + false + flush-strategy3 + + + security-domain3 + + + 50 + 50 + 50 + 50 + 50 + + + false + 50 + false + + + + + + config-property19 + + + + + + + config-property20 + config-property21 + + + config-property22 + config-property23 + + + + diff --git a/test/src/test/resources/test-orig-connector10.xml b/test/src/test/resources/test-orig-connector10.xml new file mode 100644 index 00000000..1d3a8c67 --- /dev/null +++ b/test/src/test/resources/test-orig-connector10.xml @@ -0,0 +1,31 @@ + + + Sample Adapter + It is a sample resource adapter + JBoss + 1.0 + Sample + 1.0 + + description0 + true + + + org.jboss.messaging.adapters.jcasample.SampleManagedConnectionFactory + javax.resource.cci.ConnectionFactory + org.jboss.messaging.adapters.jcasample.SampleConnectionFactory + javax.resource.cci.Connection + org.jboss.messaging.adapters.jcasample.SampleConnection + NoTransaction + + Input + java.lang.String + test messages + + + BasicPassword + javax.resource.security.PasswordCredential + + false + +