当前位置: 首页>>代码示例>>Java>>正文


Java ResourceDescriptionResolver类代码示例

本文整理汇总了Java中org.jboss.as.controller.descriptions.ResourceDescriptionResolver的典型用法代码示例。如果您正苦于以下问题:Java ResourceDescriptionResolver类的具体用法?Java ResourceDescriptionResolver怎么用?Java ResourceDescriptionResolver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ResourceDescriptionResolver类属于org.jboss.as.controller.descriptions包,在下文中一共展示了ResourceDescriptionResolver类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getOperationDefinition

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
@Override
 public OperationDefinition getOperationDefinition() {
 	final AttributeDefinition[] parameters = new AttributeDefinition[] {OperationsConstants.VDB_NAME, OperationsConstants.VDB_VERSION};
 	final ResourceDescriptionResolver resolver = new TeiidResourceDescriptionResolver(name());
     return new OperationDefinition(name(), OperationEntry.EntryType.PUBLIC, EnumSet.noneOf(OperationEntry.Flag.class), ModelType.OBJECT, null, true, null, null, parameters) {
@Override
public DescriptionProvider getDescriptionProvider() {
	return new DefaultOperationDescriptionProvider(name(), resolver, resolver,  ModelType.OBJECT, ModelType.OBJECT, null, null, this.parameters) {
		@Override
	    protected ModelNode getReplyValueTypeDescription(ResourceDescriptionResolver descriptionResolver, Locale locale, ResourceBundle bundle) {
			return VDBMetadataMapper.INSTANCE.describe( new ModelNode());
	    }
	};
}
     };
 }
 
开发者ID:kenweezy,项目名称:teiid,代码行数:17,代码来源:TeiidOperationHandler.java

示例2: TrivialResourceDefinition

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
private TrivialResourceDefinition(String pathKey, ResourceDescriptionResolver resourceDescriptionResolver, AbstractAddStepHandler add, AttributeDefinition[] attributes,
        Map<AttributeDefinition, OperationStepHandler> readOnlyAttributes, Map<OperationDefinition, OperationStepHandler> operations, List<ResourceDefinition> children,
        RuntimeCapability<?>[] runtimeCapabilities) {
    super(new Parameters(PathElement.pathElement(pathKey),
            resourceDescriptionResolver)
        .setAddHandler(add)
        .setRemoveHandler(new TrivialCapabilityServiceRemoveHandler(add, runtimeCapabilities))
        .setAddRestartLevel(OperationEntry.Flag.RESTART_RESOURCE_SERVICES)
        .setRemoveRestartLevel(OperationEntry.Flag.RESTART_RESOURCE_SERVICES)
        .setCapabilities(runtimeCapabilities));

    this.pathKey = pathKey;
    this.firstCapability = runtimeCapabilities[0];
    this.attributes = attributes;
    this.readOnlyAttributes = readOnlyAttributes;
    this.operations = operations;
    this.children = children;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:19,代码来源:TrivialResourceDefinition.java

示例3: registerOperations

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
@Override
public void registerOperations(final ManagementResourceRegistration registration) {
    super.registerOperations(registration);
    final ResourceDescriptionResolver resourceDescriptionResolver = getResourceDescriptionResolver();
    registration.registerOperationHandler(new SimpleOperationDefinitionBuilder(ADD_SUBHANDLER_OPERATION_NAME, resourceDescriptionResolver)
            .setDeprecated(ModelVersion.create(1, 2, 0))
            .setParameters(CommonAttributes.HANDLER_NAME)
            .build(), HandlerOperations.ADD_SUBHANDLER);

    registration.registerOperationHandler(new SimpleOperationDefinitionBuilder(REMOVE_SUBHANDLER_OPERATION_NAME, resourceDescriptionResolver)
            .setDeprecated(ModelVersion.create(1, 2, 0))
            .setParameters(CommonAttributes.HANDLER_NAME)
            .build(), HandlerOperations.REMOVE_SUBHANDLER);

    registration.registerOperationHandler(new SimpleOperationDefinitionBuilder(ADD_HANDLER_OPERATION_NAME, resourceDescriptionResolver)
            .setParameters(CommonAttributes.HANDLER_NAME)
            .build(), HandlerOperations.ADD_SUBHANDLER);

    registration.registerOperationHandler(new SimpleOperationDefinitionBuilder(REMOVE_HANDLER_OPERATION_NAME, resourceDescriptionResolver)
            .setParameters(CommonAttributes.HANDLER_NAME)
            .build(), HandlerOperations.REMOVE_SUBHANDLER);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:23,代码来源:AsyncHandlerResourceDefinition.java

示例4: SimpleOperationDefinition

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
/** @deprecated use {@link org.jboss.as.controller.SimpleOperationDefinitionBuilder} */
@Deprecated
@SuppressWarnings("deprecation")
protected SimpleOperationDefinition(final String name,
        final ResourceDescriptionResolver resolver,
        final ResourceDescriptionResolver attributeResolver,
        final OperationEntry.EntryType entryType,
        final EnumSet<OperationEntry.Flag> flags,
        final ModelType replyType,
        final ModelType replyValueType,
        final boolean replyAllowNull,
        final DeprecationData deprecationData,
        final AttributeDefinition[] replyParameters,
        final AttributeDefinition[] parameters,
        final AccessConstraintDefinition[] accessConstraints) {
    super(name, entryType, flags, replyType, replyValueType, replyAllowNull, deprecationData, replyParameters, parameters, accessConstraints);
    this.resolver = resolver;
    this.attributeResolver = attributeResolver;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:20,代码来源:SimpleOperationDefinition.java

示例5: SimpleResourceDefinition

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
/**
 * {@link ResourceDefinition} that uses the given {code descriptionResolver} to configure a
 * {@link DefaultResourceDescriptionProvider} to describe the resource.
 *
 * @param pathElement         the path. Can be {@code null}.
 * @param descriptionResolver the description resolver to use in the description provider. Cannot be {@code null}      *
 * @param addHandler          a handler to {@link #registerOperations(ManagementResourceRegistration) register} for the resource "add" operation.
 *                            Can be {null}
 * @param removeHandler       a handler to {@link #registerOperations(ManagementResourceRegistration) register} for the resource "remove" operation.
 *                            Can be {null}
 * @param deprecationData     Information describing deprecation of this resource. Can be {@code null} if the resource isn't deprecated.
 * @param runtime             Whether this is a runtime resource
 * @throws IllegalArgumentException if {@code descriptionResolver} is {@code null}.
 * @deprecated Use {@link #SimpleResourceDefinition(Parameters)}
 */
@Deprecated
@SuppressWarnings("deprecation")
public SimpleResourceDefinition(final PathElement pathElement, final ResourceDescriptionResolver descriptionResolver,
                                final OperationStepHandler addHandler, final OperationStepHandler removeHandler,
                                final OperationEntry.Flag addRestartLevel, final OperationEntry.Flag removeRestartLevel,
                                final DeprecationData deprecationData, final boolean runtime) {
    //Don't add new constructor variants!
    //Use the Parameters variety

    //Can be removed when we get to 3.0.0
    this(new Parameters(pathElement, descriptionResolver)
            .setAddHandler(addHandler)
            .setAddRestartLevel(addRestartLevel == null ? restartLevelForAdd(addHandler) : addRestartLevel)
            .setRemoveHandler(removeHandler)
            .setRemoveRestartLevel(removeRestartLevel == null ? restartLevelForRemove(removeHandler) : removeRestartLevel)
            .setDeprecationData(deprecationData)
            .setRuntime(runtime));
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:34,代码来源:SimpleResourceDefinition.java

示例6: getResourceDescriptionResolver

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
static ResourceDescriptionResolver getResourceDescriptionResolver(final boolean useUnprefixedChildTypes, final String... keyPrefix) {
    StringBuilder prefix = new StringBuilder();
    for (String kp : keyPrefix) {
        if (prefix.length() > 0){
            prefix.append('.');
        }
        prefix.append(kp);
    }
    return new StandardResourceDescriptionResolver(prefix.toString(), RESOURCE_NAME, SubsystemExtension.class.getClassLoader(), true, useUnprefixedChildTypes);
}
 
开发者ID:wildfly-extras,项目名称:wildfly-microprofile-config,代码行数:11,代码来源:SubsystemExtension.java

示例7: register

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
static void register(ManagementResourceRegistration resourceRegistration, ResourceDescriptionResolver descriptionResolver) {
    SimpleOperationDefinition READ_ALIASES = new SimpleOperationDefinitionBuilder(ElytronDescriptionConstants.READ_ALIASES, descriptionResolver)
            .setReadOnly()
            .setRuntimeOnly()
            .build();
    resourceRegistration.registerOperationHandler(READ_ALIASES, new ReadAliasesHandler());
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:8,代码来源:ModifiableKeyStoreDecorator.java

示例8: registerOperations

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
@Override
public void registerOperations(ManagementResourceRegistration resourceRegistration) {
    super.registerOperations(resourceRegistration);
    ResourceDescriptionResolver resolver = ElytronExtension.getResourceDescriptionResolver(ElytronDescriptionConstants.MODIFIABLE_SECURITY_REALM);
    ReadIdentityHandler.register(resourceRegistration, resolver);
    if (isServerOrHostController(resourceRegistration)) {
        AddIdentityHandler.register(resourceRegistration, resolver);
        RemoveIdentityHandler.register(resourceRegistration, resolver);
        AddIdentityAttributeHandler.register(resourceRegistration, resolver);
        RemoveIdentityAttributeHandler.register(resourceRegistration, resolver);
        SetPasswordHandler.register(resourceRegistration, resolver);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:14,代码来源:ModifiableRealmDecorator.java

示例9: register

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
static void register(ManagementResourceRegistration resourceRegistration, ResourceDescriptionResolver descriptionResolver) {
    resourceRegistration.registerOperationHandler(
            new SimpleOperationDefinitionBuilder(ElytronDescriptionConstants.ADD_IDENTITY, descriptionResolver)
                    .setParameters(IDENTITY)
                    .setRuntimeOnly()
                    .build(),
            new AddIdentityHandler());
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:9,代码来源:ModifiableRealmDecorator.java

示例10: createResourceDescriptionResolver

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
static ResourceDescriptionResolver createResourceDescriptionResolver() {
    final Map<String, String> strings = new HashMap<String, String>();
    strings.put("test", "The test resource");
    strings.put("test.child", "Child test resource");
    strings.put("test.data-source", "Override singleton test resource");
    strings.put("test.service", "Pure singleton test resource");

    return new StandardResourceDescriptionResolver("test", SingletonResourceTestCase.class.getName() + ".properties", SingletonResourceTestCase.class.getClassLoader(), true, false) {

        @Override
        public ResourceBundle getResourceBundle(Locale locale) {
            return new ResourceBundle() {

                @Override
                protected Object handleGetObject(String key) {
                    return strings.get(key);
                }

                @Override
                public Enumeration<String> getKeys() {
                    return null;
                }
            };
        }

    };
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:28,代码来源:SingletonResourceTestCase.java

示例11: register

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
static void register(ManagementResourceRegistration resourceRegistration, ResourceDescriptionResolver descriptionResolver) {
    resourceRegistration.registerOperationHandler(
            new SimpleOperationDefinitionBuilder(ElytronDescriptionConstants.READ_IDENTITY, descriptionResolver)
                    .setParameters(NAME)
                    .setRuntimeOnly()
                    .setReadOnly()
                    .build(),
            new ReadSecurityDomainIdentityHandler());
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:10,代码来源:DomainDefinition.java

示例12: LdapResourceDefinition

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
public LdapResourceDefinition(PathElement pathElement, ResourceDescriptionResolver descriptionResolver,
        OperationStepHandler addHandler, OperationStepHandler removeHandler, Flag addRestartLevel, Flag removeRestartLevel) {
    this(new Parameters(pathElement, descriptionResolver)
            .setAddHandler(addHandler)
            .setAddRestartLevel(addRestartLevel)
            .setRemoveHandler(removeHandler)
            .setRemoveRestartLevel(removeRestartLevel));
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:9,代码来源:LdapResourceDefinition.java

示例13: PropertiesFileResourceDefinition

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
public PropertiesFileResourceDefinition(final PathElement pathElement,
        final ResourceDescriptionResolver descriptionResolver, final OperationStepHandler addHandler,
        final OperationStepHandler removeHandler, final OperationEntry.Flag addRestartLevel,
        final OperationEntry.Flag removeRestartLevel) {
    this(new Parameters(pathElement, descriptionResolver)
            .setAddHandler(addHandler)
            .setAddRestartLevel(addRestartLevel)
            .setRemoveHandler(removeHandler)
            .setRemoveRestartLevel(removeRestartLevel));
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:11,代码来源:PropertiesFileResourceDefinition.java

示例14: BaseLdapGroupSearchResource

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
protected BaseLdapGroupSearchResource(final GroupSearchType searchType,
        final ResourceDescriptionResolver descriptionResolver, final OperationStepHandler addHandler,
        final OperationStepHandler removeHandler) {
    super(PathElement.pathElement(ModelDescriptionConstants.GROUP_SEARCH, searchType.getModelValue()),
            descriptionResolver, addHandler, removeHandler, OperationEntry.Flag.RESTART_NONE,
            OperationEntry.Flag.RESTART_RESOURCE_SERVICES);
    setDeprecated(ModelVersion.create(1, 7));
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:9,代码来源:BaseLdapGroupSearchResource.java

示例15: AbstractPlugInAuthResourceDefinition

import org.jboss.as.controller.descriptions.ResourceDescriptionResolver; //导入依赖的package包/类
AbstractPlugInAuthResourceDefinition(PathElement pathElement, ResourceDescriptionResolver resourceDescriptionResolver,
        SecurityRealmChildAddHandler securityRealmChildAddHandler,
        SecurityRealmChildRemoveHandler securityRealmChildRemoveHandler, Flag restartResourceServices,
        Flag restartResourceServices2) {
    this(new Parameters(pathElement, resourceDescriptionResolver)
            .setAddHandler(securityRealmChildAddHandler)
            .setAddRestartLevel(restartResourceServices)
            .setRemoveHandler(securityRealmChildRemoveHandler)
            .setRemoveRestartLevel(restartResourceServices2));
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:11,代码来源:AbstractPlugInAuthResourceDefinition.java


注:本文中的org.jboss.as.controller.descriptions.ResourceDescriptionResolver类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。