use of org.jboss.as.controller.PrimitiveListAttributeDefinition in project wildfly by wildfly.
the class ExternalPooledConnectionFactoryDefinition method copy.
private static AttributeDefinition copy(AttributeDefinition attribute, AttributeAccess.Flag flag) {
AbstractAttributeDefinitionBuilder builder;
if (attribute instanceof SimpleListAttributeDefinition) {
builder = new SimpleListAttributeDefinition.Builder((SimpleListAttributeDefinition) attribute);
} else if (attribute instanceof SimpleMapAttributeDefinition) {
builder = new SimpleMapAttributeDefinition.Builder((SimpleMapAttributeDefinition) attribute);
} else if (attribute instanceof PrimitiveListAttributeDefinition) {
builder = new PrimitiveListAttributeDefinition.Builder((PrimitiveListAttributeDefinition) attribute);
} else {
builder = new SimpleAttributeDefinitionBuilder((SimpleAttributeDefinition) attribute);
}
builder.setFlags(flag);
return builder.build();
}
use of org.jboss.as.controller.PrimitiveListAttributeDefinition in project wildfly by wildfly.
the class PooledConnectionFactoryDefinition method copy.
private static AttributeDefinition copy(AttributeDefinition attribute, AttributeAccess.Flag flag) {
AbstractAttributeDefinitionBuilder builder;
if (attribute instanceof SimpleListAttributeDefinition) {
builder = new SimpleListAttributeDefinition.Builder((SimpleListAttributeDefinition) attribute);
} else if (attribute instanceof SimpleMapAttributeDefinition) {
builder = new SimpleMapAttributeDefinition.Builder((SimpleMapAttributeDefinition) attribute);
} else if (attribute instanceof PrimitiveListAttributeDefinition) {
builder = new PrimitiveListAttributeDefinition.Builder((PrimitiveListAttributeDefinition) attribute);
} else {
builder = new SimpleAttributeDefinitionBuilder((SimpleAttributeDefinition) attribute);
}
builder.setFlags(flag);
return builder.build();
}
use of org.jboss.as.controller.PrimitiveListAttributeDefinition in project wildfly by wildfly.
the class PooledConnectionFactoryDefinition method copy.
private static AttributeDefinition copy(AttributeDefinition attribute, AttributeAccess.Flag flag) {
AbstractAttributeDefinitionBuilder builder;
if (attribute instanceof SimpleListAttributeDefinition) {
builder = new SimpleListAttributeDefinition.Builder((SimpleListAttributeDefinition) attribute);
// TODO remove once WFCORE-95 is fixed
((SimpleListAttributeDefinition.Builder) builder).setListValidator(attribute.getValidator());
} else if (attribute instanceof SimpleMapAttributeDefinition) {
builder = new SimpleMapAttributeDefinition.Builder((SimpleMapAttributeDefinition) attribute);
} else if (attribute instanceof PrimitiveListAttributeDefinition) {
builder = new PrimitiveListAttributeDefinition.Builder((PrimitiveListAttributeDefinition) attribute);
// TODO remove once WFCORE-95 is fixed
((PrimitiveListAttributeDefinition.Builder) builder).setListValidator(attribute.getValidator());
} else {
builder = new SimpleAttributeDefinitionBuilder((SimpleAttributeDefinition) attribute);
}
builder.setFlags(flag);
return builder.build();
}
Aggregations