本文整理汇总了Java中org.jboss.as.controller.SimpleAttributeDefinition类的典型用法代码示例。如果您正苦于以下问题:Java SimpleAttributeDefinition类的具体用法?Java SimpleAttributeDefinition怎么用?Java SimpleAttributeDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleAttributeDefinition类属于org.jboss.as.controller包,在下文中一共展示了SimpleAttributeDefinition类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getAttributeDefinitions
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的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
};
}
开发者ID:kenweezy,项目名称:teiid,代码行数:22,代码来源:VDBMetadataMapper.java
示例2: getAttributeDefinition
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的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();
}
开发者ID:kenweezy,项目名称:teiid,代码行数:19,代码来源:VDBMetadataMapper.java
示例3: init
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
private void init() {
complexValueType = new ModelNode();
complexValueType.get("int-value", DESCRIPTION).set("An int value");
complexValueType.get("int-value", EXPRESSIONS_ALLOWED).set(allowExpressions);
complexValueType.get("int-value", TYPE).set(ModelType.INT);
complexValueType.get("bigdecimal-value", DESCRIPTION).set("A bigdecimal value");
complexValueType.get("bigdecimal-value", TYPE).set(ModelType.BIG_DECIMAL);
complexValueType.get("bigdecimal-value", EXPRESSIONS_ALLOWED).set(allowExpressions);
SimpleAttributeDefinition intValue = createAttribute("int-value", ModelType.INT, allowExpressions);
SimpleAttributeDefinition bigDecimal = createAttribute("bigdecimal-value", ModelType.BIG_DECIMAL, allowExpressions);
complex = new ObjectTypeAttributeDefinition.Builder("complex", intValue, bigDecimal).build();
AttributeDefinition param1 = new ObjectTypeAttributeDefinition.Builder("param1", intValue, bigDecimal).build();
COMPLEX_OP_DEF = new SimpleOperationDefinitionBuilder("complex", new NonResolvingResourceDescriptionResolver())
.addParameter(param1)
.setReplyType(ModelType.OBJECT)
.setReplyParameters(complex)
.build();
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:22,代码来源:ModelControllerResourceDefinition.java
示例4: addOperation
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
void addOperation(String name, boolean readOnly, boolean runtimeOnly, SimpleAttributeDefinition[] parameters, AccessConstraintDefinition...constraints) {
SimpleOperationDefinitionBuilder builder = new SimpleOperationDefinitionBuilder(name, new NonResolvingResourceDescriptionResolver());
if (constraints != null) {
builder.setAccessConstraints(constraints);
}
if (readOnly) {
builder.setReadOnly();
}
if (runtimeOnly) {
builder.setRuntimeOnly();
}
if (parameters != null) {
for (SimpleAttributeDefinition param : parameters) {
builder.addParameter(param);
}
}
operations.add(builder.build());
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:19,代码来源:JmxFacadeRbacEnabledTestCase.java
示例5: create
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
private static ResourceDefinition create(final PathElement pathElement, final CacheFor cacheFor) {
SimpleAttributeDefinition[] configurationAttributes = new SimpleAttributeDefinition[] { EVICTION_TIME, CACHE_FAILURES, MAX_CACHE_SIZE };
SimpleAttributeDefinition[] runtimeAttributes = new SimpleAttributeDefinition[] { CACHE_SIZE };
final SimpleOperationDefinition[] runtimeOperations;
final OperationStepHandler runtimeHandler;
switch (cacheFor) {
case AuthUser:
runtimeOperations = new SimpleOperationDefinition[] { FLUSH_CACHE_NAME_ONLY, CONTAINS_NAME_ONLY };
runtimeHandler = NAME_ONLY_HANDLER;
break;
default:
runtimeOperations = new SimpleOperationDefinition[] { FLUSH_CACHE_FULL, CONTAINS_FULL };
runtimeHandler = FULL_HANDLER;
}
return new LdapCacheResourceDefinition(pathElement, configurationAttributes, runtimeAttributes, runtimeOperations,
runtimeHandler);
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:19,代码来源:LdapCacheResourceDefinition.java
示例6: LegacyResourceDefinition
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
public LegacyResourceDefinition(ModelNode modelDescription) {
this.description = modelDescription.get(ModelDescriptionConstants.MODEL_DESCRIPTION);
ModelNode attributes = description.has(ModelDescriptionConstants.ATTRIBUTES) ? description.get(ModelDescriptionConstants.ATTRIBUTES) : new ModelNode();
address = PathAddress.pathAddress(modelDescription.get(ModelDescriptionConstants.ADDRESS));
if (attributes.isDefined()) {
for (Property property : attributes.asPropertyList()) {
String name = property.getName();
SimpleAttributeDefinition def = SimpleAttributeDefinitionBuilder.create(name, property.getValue()).build();
this.attributes.put(name, new AttributeAccess(
AttributeAccess.AccessType.READ_ONLY, AttributeAccess.Storage.CONFIGURATION, null, null, def)
);
}
}
ModelNode children = modelDescription.get(ModelDescriptionConstants.CHILDREN);
if (!children.isDefined()) {
return;
}
for (ModelNode child : children.asList()) {
this.children.add(new LegacyResourceDefinition(child));
}
description.remove(ModelDescriptionConstants.CHILDREN);
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:24,代码来源:LegacyResourceDefinition.java
示例7: writeJobExecutorContent
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
protected void writeJobExecutorContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException {
ModelNode node = context.getModelNode();
ModelNode jobExecutorNode = node.get(Element.JOB_EXECUTOR.getLocalName());
if (jobExecutorNode.isDefined()) {
writer.writeStartElement(Element.JOB_EXECUTOR.getLocalName());
for (Property property : jobExecutorNode.asPropertyList()) {
ModelNode propertyValue = property.getValue();
for (AttributeDefinition jobExecutorAttribute : SubsystemAttributeDefinitons.JOB_EXECUTOR_ATTRIBUTES) {
if (jobExecutorAttribute.equals(SubsystemAttributeDefinitons.NAME)) {
((SimpleAttributeDefinition) jobExecutorAttribute).marshallAsAttribute(propertyValue, writer);
} else {
jobExecutorAttribute.marshallAsElement(propertyValue, writer);
}
}
writeJobAcquisitionsContent(writer, context, propertyValue);
}
// end job-executor
writer.writeEndElement();
}
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:27,代码来源:BpmPlatformParser1_1.java
示例8: writeJobAcquisitionsContent
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
protected void writeJobAcquisitionsContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context, ModelNode parentNode) throws XMLStreamException {
writer.writeStartElement(Element.JOB_AQUISITIONS.getLocalName());
ModelNode jobAcquisitionConfigurations = parentNode.get(Element.JOB_AQUISITIONS.getLocalName());
if (jobAcquisitionConfigurations.isDefined()) {
for (Property property : jobAcquisitionConfigurations.asPropertyList()) {
// write each child element to xml
writer.writeStartElement(Element.JOB_AQUISITION.getLocalName());
for (AttributeDefinition jobAcquisitionAttribute : SubsystemAttributeDefinitons.JOB_ACQUISITION_ATTRIBUTES) {
if (jobAcquisitionAttribute.equals(SubsystemAttributeDefinitons.NAME)) {
((SimpleAttributeDefinition) jobAcquisitionAttribute).marshallAsAttribute(property.getValue(), writer);
} else {
jobAcquisitionAttribute.marshallAsElement(property.getValue(), writer);
}
}
writer.writeEndElement();
}
}
// end job-acquisitions
writer.writeEndElement();
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:25,代码来源:BpmPlatformParser1_1.java
示例9: registerAttributes
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
@Override
public void registerAttributes(final ManagementResourceRegistration properties) {
//super.registerAttributes(resourceRegistration);
properties.registerReadOnlyAttribute(NAME_ATTR, null);
for (SimpleAttributeDefinition def : PROPERTY_ATTRIBUTES) {
properties.registerReadWriteAttribute(def, null, new ReloadRequiredWriteAttributeHandler(def));
}
}
开发者ID:RestComm,项目名称:smpp-extensions,代码行数:9,代码来源:SmppMbeanPropertyDefinition.java
示例10: populateModel
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
@Override
protected void populateModel(final ModelNode operation, final ModelNode model) throws OperationFailedException {
SmppMbeanPropertyDefinition.NAME_ATTR.validateAndSet(operation, model);
for (SimpleAttributeDefinition def : PROPERTY_ATTRIBUTES) {
def.validateAndSet(operation, model);
}
}
开发者ID:RestComm,项目名称:smpp-extensions,代码行数:8,代码来源:SmppMbeanPropertyAdd.java
示例11: injectPrincipalTransformer
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
private static void injectPrincipalTransformer(SimpleAttributeDefinition principalTransformerAttribute, ServiceBuilder<?> serviceBuilder, OperationContext context, ModelNode model, Injector<PrincipalTransformer> principalTransformer) throws OperationFailedException {
String principalTransformerName = principalTransformerAttribute.resolveModelAttribute(context, model).asStringOrNull();
if (principalTransformerName != null) {
serviceBuilder.addDependency(context.getCapabilityServiceName(
buildDynamicCapabilityName(PRINCIPAL_TRANSFORMER_CAPABILITY, principalTransformerName), PrincipalTransformer.class),
PrincipalTransformer.class, principalTransformer);
}
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:9,代码来源:AuthenticationFactoryDefinitions.java
示例12: injectSecurityFactory
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
private static void injectSecurityFactory(SimpleAttributeDefinition securityFactoryAttribute, ServiceBuilder<?> serviceBuilder, OperationContext context, ModelNode model, Injector<SecurityFactory> securityFactoryInjector) throws OperationFailedException {
String securityFactory = securityFactoryAttribute.resolveModelAttribute(context, model).asStringOrNull();
if (securityFactory != null) {
serviceBuilder.addDependency(context.getCapabilityServiceName(
buildDynamicCapabilityName(SECURITY_FACTORY_CREDENTIAL_CAPABILITY, securityFactory), SecurityFactory.class),
SecurityFactory.class, securityFactoryInjector);
}
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:9,代码来源:AuthenticationFactoryDefinitions.java
示例13: injectRealmMapper
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
private static void injectRealmMapper(SimpleAttributeDefinition realmMapperAttribute, ServiceBuilder<?> serviceBuilder, OperationContext context, ModelNode model, Injector<RealmMapper> realmMapperInjector) throws OperationFailedException {
String realmMapper = realmMapperAttribute.resolveModelAttribute(context, model).asStringOrNull();
if (realmMapper != null) {
serviceBuilder.addDependency(context.getCapabilityServiceName(
buildDynamicCapabilityName(REALM_MAPPER_CAPABILITY, realmMapper), RealmMapper.class),
RealmMapper.class, realmMapperInjector);
}
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:9,代码来源:AuthenticationFactoryDefinitions.java
示例14: addDependency
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
private static <T> InjectedValue<T> addDependency(String baseName, SimpleAttributeDefinition attribute,
Class<T> type, ServiceBuilder<SSLContext> serviceBuilder, OperationContext context, ModelNode model) throws OperationFailedException {
String dynamicNameElement = attribute.resolveModelAttribute(context, model).asStringOrNull();
InjectedValue<T> injectedValue = new InjectedValue<>();
if (dynamicNameElement != null) {
serviceBuilder.addDependency(context.getCapabilityServiceName(
buildDynamicCapabilityName(baseName, dynamicNameElement), type),
type, injectedValue);
}
return injectedValue;
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:14,代码来源:SSLDefinitions.java
示例15: ExposeModelResource
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
ExposeModelResource(PathElement pathElement, ManagedAuditLogger auditLoggerInfo, JmxAuthorizer authorizer, Supplier<SecurityIdentity> securityIdentitySupplier,
RuntimeHostControllerInfoAccessor hostInfoAccessor, SimpleAttributeDefinition domainName, SimpleAttributeDefinition...otherAttributes) {
super(pathElement,
JMXExtension.getResourceDescriptionResolver(CommonAttributes.EXPOSE_MODEL + "." + pathElement.getValue()),
new ShowModelAdd(auditLoggerInfo, authorizer, securityIdentitySupplier, domainName, hostInfoAccessor, otherAttributes),
new ShowModelRemove(auditLoggerInfo, authorizer, securityIdentitySupplier, hostInfoAccessor));
this.auditLoggerInfo = auditLoggerInfo;
this.authorizer = authorizer;
this.securityIdentitySupplier = securityIdentitySupplier;
this.domainName = domainName;
this.hostInfoAccessor = hostInfoAccessor;
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:13,代码来源:ExposeModelResource.java
示例16: getDomainNameAttribute
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
static SimpleAttributeDefinition getDomainNameAttribute(String childName) {
if (CommonAttributes.RESOLVED.equals(childName)){
return ExposeModelResourceResolved.DOMAIN_NAME;
} else if (CommonAttributes.EXPRESSION.equals(childName)) {
return ExposeModelResourceExpression.DOMAIN_NAME;
}
throw JmxLogger.ROOT_LOGGER.unknownChild(childName);
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:10,代码来源:ExposeModelResource.java
示例17: ShowModelAdd
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
private ShowModelAdd(ManagedAuditLogger auditLoggerInfo, JmxAuthorizer authorizer, Supplier<SecurityIdentity> securityIdentitySupplier,
SimpleAttributeDefinition domainName, RuntimeHostControllerInfoAccessor hostInfoAccessor,
SimpleAttributeDefinition...otherAttributes) {
super(ModelDescriptionConstants.SUBSYSTEM);
this.auditLoggerInfo = auditLoggerInfo;
this.authorizer = authorizer;
this.securityIdentitySupplier = securityIdentitySupplier;
this.domainName = domainName;
this.otherAttributes = otherAttributes;
this.hostInfoAccessor = hostInfoAccessor;
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:12,代码来源:ExposeModelResource.java
示例18: populateModel
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
@Override
protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException {
domainName.validateAndSet(operation, model);
if (otherAttributes.length > 0) {
for (SimpleAttributeDefinition attr : otherAttributes) {
attr.validateAndSet(operation, model);
}
}
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:10,代码来源:ExposeModelResource.java
示例19: LdapCacheResourceDefinition
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
private LdapCacheResourceDefinition(final PathElement pathElement,
final SimpleAttributeDefinition[] configurationAttributes, final SimpleAttributeDefinition[] runtimeAttributes,
final SimpleOperationDefinition[] runtimeOperations, final OperationStepHandler runtimeStepHandler) {
super(new Parameters(pathElement, ControllerResolver.getDeprecatedResolver(SecurityRealmResourceDefinition.DEPRECATED_PARENT_CATEGORY,
"core.management.security-realm.ldap.cache"))
.setAddHandler(new CacheChildAddHandler(configurationAttributes))
.setRemoveHandler(new SecurityRealmChildRemoveHandler(false))
.setAddRestartLevel(OperationEntry.Flag.RESTART_ALL_SERVICES)
.setRemoveRestartLevel(OperationEntry.Flag.RESTART_ALL_SERVICES)
.setDeprecatedSince(ModelVersion.create(1, 7)));
this.configurationAttributes = configurationAttributes;
this.runtimeAttributes = runtimeAttributes;
this.runtimeOperations = runtimeOperations;
this.runtimeStepHandler = runtimeStepHandler;
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:16,代码来源:LdapCacheResourceDefinition.java
示例20: registerAttributes
import org.jboss.as.controller.SimpleAttributeDefinition; //导入依赖的package包/类
@Override
public void registerAttributes(final ManagementResourceRegistration resourceRegistration) {
super.registerAttributes(resourceRegistration);
final OperationStepHandler writeHandler = new ReloadRequiredWriteAttributeHandler(ATTRIBUTES);
for (SimpleAttributeDefinition attribute : ATTRIBUTES) {
resourceRegistration.registerReadWriteAttribute(attribute, null, writeHandler);
}
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:10,代码来源:LoggingResourceDefinition.java
注:本文中的org.jboss.as.controller.SimpleAttributeDefinition类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论