本文整理汇总了Java中org.jboss.as.controller.ObjectListAttributeDefinition类的典型用法代码示例。如果您正苦于以下问题:Java ObjectListAttributeDefinition类的具体用法?Java ObjectListAttributeDefinition怎么用?Java ObjectListAttributeDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectListAttributeDefinition类属于org.jboss.as.controller包,在下文中一共展示了ObjectListAttributeDefinition类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAttributeDefinitions
import org.jboss.as.controller.ObjectListAttributeDefinition; //导入依赖的package包/类
public AttributeDefinition[] getAttributeDefinitions() {
ObjectListAttributeDefinition properties = ObjectListAttributeDefinition.Builder.of(PROPERTIES, PropertyMetaDataMapper.INSTANCE.getAttributeDefinition()).build();
ObjectListAttributeDefinition vdbimports = ObjectListAttributeDefinition.Builder.of(IMPORT_VDBS, VDBImportMapper.INSTANCE.getAttributeDefinition()).build();
ObjectListAttributeDefinition models = ObjectListAttributeDefinition.Builder.of(MODELS, ModelMetadataMapper.INSTANCE.getAttributeDefinition()).build();
ObjectListAttributeDefinition translators = ObjectListAttributeDefinition.Builder.of(OVERRIDE_TRANSLATORS, VDBTranslatorMetaDataMapper.INSTANCE.getAttributeDefinition()).build();
ObjectListAttributeDefinition policies = ObjectListAttributeDefinition.Builder.of(DATA_POLICIES, DataPolicyMetadataMapper.INSTANCE.getAttributeDefinition()).build();
return new AttributeDefinition[] {
new SimpleAttributeDefinition(VDBNAME, ModelType.STRING, false),
new SimpleAttributeDefinition(CONNECTIONTYPE, ModelType.INT, false),
new SimpleAttributeDefinition(STATUS, ModelType.BOOLEAN, false),
new SimpleAttributeDefinition(VERSION, ModelType.BOOLEAN, false),
new SimpleAttributeDefinition(VDB_DESCRIPTION, ModelType.BOOLEAN, true),
new SimpleAttributeDefinition(XML_DEPLOYMENT, ModelType.BOOLEAN, true),
properties,
vdbimports,
models,
translators,
policies
};
}
示例2: getAttributeDefinition
import org.jboss.as.controller.ObjectListAttributeDefinition; //导入依赖的package包/类
public ObjectTypeAttributeDefinition getAttributeDefinition() {
ObjectListAttributeDefinition properties = ObjectListAttributeDefinition.Builder.of(PROPERTIES, PropertyMetaDataMapper.INSTANCE.getAttributeDefinition()).build();
ObjectListAttributeDefinition sourceMappings = ObjectListAttributeDefinition.Builder.of(SOURCE_MAPPINGS, SourceMappingMetadataMapper.INSTANCE.getAttributeDefinition()).build();
ObjectListAttributeDefinition errors = ObjectListAttributeDefinition.Builder.of(VALIDITY_ERRORS, ValidationErrorMapper.INSTANCE.getAttributeDefinition()).build();
return ObjectTypeAttributeDefinition.Builder.of("ModelMetadataMapper", //$NON-NLS-1$
new AttributeDefinition[] {
new SimpleAttributeDefinition(MODEL_NAME, ModelType.STRING, false),
new SimpleAttributeDefinition(DESCRIPTION, ModelType.INT, true),
new SimpleAttributeDefinition(VISIBLE, ModelType.INT, true),
new SimpleAttributeDefinition(MODEL_TYPE, ModelType.BOOLEAN, false),
new SimpleAttributeDefinition(MODELPATH, ModelType.BOOLEAN, true),
new SimpleAttributeDefinition(METADATA_STATUS, ModelType.STRING, true),
ObjectTypeAttributeDefinition.Builder.of(PROPERTIES, properties).build(),
ObjectTypeAttributeDefinition.Builder.of(SOURCE_MAPPINGS, sourceMappings).build(),
ObjectTypeAttributeDefinition.Builder.of(VALIDITY_ERRORS, errors).build(),
}).build();
}
示例3: marshallAsElement
import org.jboss.as.controller.ObjectListAttributeDefinition; //导入依赖的package包/类
@Override
public void marshallAsElement(AttributeDefinition attribute, ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException {
if (attribute instanceof ObjectListAttributeDefinition) {
attribute = getValueType(attribute, ObjectListAttributeDefinition.class);
}
if (!(attribute instanceof ObjectTypeAttributeDefinition)) {
throw new XMLStreamException(
String.format("Attribute of class %s is expected, but %s received", "ObjectTypeAttributeDefinition", attribute.getClass().getSimpleName())
);
}
AttributeDefinition[] valueTypes;
valueTypes = CustomMarshaller.getValueTypes(attribute, ObjectTypeAttributeDefinition.class);
writer.writeStartElement(attribute.getXmlName());
for (AttributeDefinition valueType : valueTypes) {
valueType.marshallAsElement(resourceModel, marshallDefault, writer);
}
writer.writeEndElement();
}
示例4: getMechanismConfiguration
import org.jboss.as.controller.ObjectListAttributeDefinition; //导入依赖的package包/类
static AttributeDefinition getMechanismConfiguration(String forCapability) {
SimpleAttributeDefinition preRealmPrincipalTransformerAttribute = new SimpleAttributeDefinitionBuilder(BASE_PRE_REALM_PRINCIPAL_TRANSFORMER)
.setCapabilityReference(PRINCIPAL_TRANSFORMER_CAPABILITY, forCapability, true)
.build();
SimpleAttributeDefinition postRealmPrincipalTransformerAttribute = new SimpleAttributeDefinitionBuilder(BASE_POST_REALM_PRINCIPAL_TRANSFORMER)
.setCapabilityReference(PRINCIPAL_TRANSFORMER_CAPABILITY, forCapability, true)
.build();
SimpleAttributeDefinition finalprincipalTransformerAttribute = new SimpleAttributeDefinitionBuilder(BASE_FINAL_PRINCIPAL_TRANSFORMER)
.setCapabilityReference(PRINCIPAL_TRANSFORMER_CAPABILITY, forCapability, true)
.build();
SimpleAttributeDefinition realmMapperAttribute = new SimpleAttributeDefinitionBuilder(BASE_REALM_MAPPER)
.setCapabilityReference(REALM_MAPPER_CAPABILITY, forCapability, true)
.build();
ObjectTypeAttributeDefinition mechanismRealmConfiguration = new ObjectTypeAttributeDefinition.Builder(ElytronDescriptionConstants.MECHANISM_REALM_CONFIGURATION, REALM_NAME, preRealmPrincipalTransformerAttribute, postRealmPrincipalTransformerAttribute, finalprincipalTransformerAttribute, realmMapperAttribute)
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
.setXmlName(ElytronDescriptionConstants.MECHANISM_REALM)
.build();
ObjectListAttributeDefinition mechanismRealmConfigurations = new ObjectListAttributeDefinition.Builder(ElytronDescriptionConstants.MECHANISM_REALM_CONFIGURATIONS, mechanismRealmConfiguration)
.setRequired(false)
.setAllowExpression(false)
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
.setAttributeParser(AttributeParser.UNWRAPPED_OBJECT_LIST_PARSER)
.setAttributeMarshaller(AttributeMarshaller.UNWRAPPED_OBJECT_LIST_MARSHALLER)
//.setXmlName(ElytronDescriptionConstants.MECHANISM_REALM)
.build();
SimpleAttributeDefinition credentialSecurityFactoryAttribute = new SimpleAttributeDefinitionBuilder(BASE_CREDENTIAL_SECURITY_FACTORY)
.setCapabilityReference(SECURITY_FACTORY_CREDENTIAL_CAPABILITY, forCapability, true)
.build();
ObjectTypeAttributeDefinition mechanismConfiguration = new ObjectTypeAttributeDefinition.Builder(ElytronDescriptionConstants.MECHANISM_CONFIGURATION, MECHANISM_NAME, HOST_NAME, PROTOCOL,
preRealmPrincipalTransformerAttribute, postRealmPrincipalTransformerAttribute, finalprincipalTransformerAttribute, realmMapperAttribute, mechanismRealmConfigurations, credentialSecurityFactoryAttribute)
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
.setXmlName(ElytronDescriptionConstants.MECHANISM)
.build();
return new ObjectListAttributeDefinition.Builder(ElytronDescriptionConstants.MECHANISM_CONFIGURATIONS, mechanismConfiguration)
.setRequired(false)
.setRestartAllServices()
.setXmlName(ElytronDescriptionConstants.MECHANISM_CONFIGURATION)
.build();
}
示例5: getNamedCertificateList
import org.jboss.as.controller.ObjectListAttributeDefinition; //导入依赖的package包/类
static ObjectListAttributeDefinition getNamedCertificateList(final String name) {
return new ObjectListAttributeDefinition.Builder(name, CERTIFICATE)
.setRequired(false)
.setStorageRuntime()
.build();
}