public class SimpleResourceDefinition extends Object implements ResourceDefinition
ResourceDefinition
.Modifier and Type | Class and Description |
---|---|
static class |
SimpleResourceDefinition.Parameters
Parameters object for the SimpleResourceDefinition constructor
|
Modifier and Type | Method and Description |
---|---|
List<AccessConstraintDefinition> |
getAccessConstraints()
Get the definition of any access constraints associated with the resource.
|
protected DeprecationData |
getDeprecationData() |
DescriptionProvider |
getDescriptionProvider(ImmutableManagementResourceRegistration resourceRegistration)
Gets a
DescriptionProvider for the given resource. |
protected static EnumSet<OperationEntry.Flag> |
getFlagsSet(OperationEntry.Flag... vararg) |
PathElement |
getPathElement()
Gets the path element that describes how to navigate to this resource from its parent resource, or
null
if this is a definition of a root resource. |
ResourceDescriptionResolver |
getResourceDescriptionResolver()
Gets the
ResourceDescriptionResolver used by this resource definition, or null
if a ResourceDescriptionResolver is not used. |
boolean |
isOrderedChild()
Whether this resource registration is ordered in the parent.
|
boolean |
isRuntime() |
protected void |
registerAddOperation(ManagementResourceRegistration registration,
AbstractAddStepHandler handler,
OperationEntry.Flag... flags)
Registers add operation
Registers add operation
|
protected void |
registerAddOperation(ManagementResourceRegistration registration,
OperationStepHandler handler,
OperationEntry.Flag... flags)
|
void |
registerAttributes(ManagementResourceRegistration resourceRegistration)
Register operations associated with this resource.
|
void |
registerCapabilities(ManagementResourceRegistration resourceRegistration)
Register capabilities associated with this resource.
|
void |
registerChildren(ManagementResourceRegistration resourceRegistration)
Register child resources associated with this resource.
|
void |
registerNotifications(ManagementResourceRegistration resourceRegistration)
Register notifications associated with this resource.
|
void |
registerOperations(ManagementResourceRegistration resourceRegistration)
Register operations associated with this resource.
|
protected void |
registerRemoveOperation(ManagementResourceRegistration registration,
AbstractRemoveStepHandler handler,
OperationEntry.Flag... flags) |
protected void |
registerRemoveOperation(ManagementResourceRegistration registration,
OperationStepHandler handler,
OperationEntry.Flag... flags)
Deprecated.
|
protected void |
setDeprecated(ModelVersion since) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMaxOccurs, getMinOccurs
@Deprecated public SimpleResourceDefinition(PathElement pathElement, DescriptionProvider descriptionProvider)
SimpleResourceDefinition(Parameters)
ResourceDefinition
that uses the given {code descriptionProvider} to describe the resource.pathElement
- the path. Can be null
.descriptionProvider
- the description provider. Cannot be null
IllegalArgumentException
- if descriptionProvider
is null
.public SimpleResourceDefinition(PathElement pathElement, ResourceDescriptionResolver descriptionResolver)
ResourceDefinition
that uses the given {code descriptionResolver} to configure a
DefaultResourceDescriptionProvider
to describe the resource.pathElement
- the path. Cannot be null
.descriptionResolver
- the description resolver to use in the description provider. Cannot be null
IllegalArgumentException
- if any parameter is null
.@Deprecated public SimpleResourceDefinition(PathElement pathElement, ResourceDescriptionResolver descriptionResolver, boolean isRuntime)
SimpleResourceDefinition(Parameters)
ResourceDefinition
that uses the given {code descriptionResolver} to configure a
DefaultResourceDescriptionProvider
to describe the resource.pathElement
- the path. Cannot be null
.descriptionResolver
- the description resolver to use in the description provider. Cannot be null
isRuntime
- tells if resource is runtimeIllegalArgumentException
- if any parameter is null
.public SimpleResourceDefinition(PathElement pathElement, ResourceDescriptionResolver descriptionResolver, OperationStepHandler addHandler, OperationStepHandler removeHandler)
ResourceDefinition
that uses the given {code descriptionResolver} to configure a
DefaultResourceDescriptionProvider
to describe the resource.pathElement
- the path. Cannot be null
.descriptionResolver
- the description resolver to use in the description provider. Cannot be null
*addHandler
- a handler to register
for the resource "add" operation.
Can be {null}removeHandler
- a handler to register
for the resource "remove" operation.
Can be {null}IllegalArgumentException
- if any parameter is null
@Deprecated public SimpleResourceDefinition(PathElement pathElement, ResourceDescriptionResolver descriptionResolver, OperationStepHandler addHandler, OperationStepHandler removeHandler, boolean isRuntime)
SimpleResourceDefinition(Parameters)
ResourceDefinition
that uses the given {code descriptionResolver} to configure a
DefaultResourceDescriptionProvider
to describe the resource.pathElement
- the path. Cannot be null
.descriptionResolver
- the description resolver to use in the description provider. Cannot be null
*addHandler
- a handler to register
for the resource "add" operation.
Can be {null}removeHandler
- a handler to register
for the resource "remove" operation.
Can be {null}isRuntime
- tells is resources is runtime or notIllegalArgumentException
- if any parameter is null
@Deprecated public SimpleResourceDefinition(PathElement pathElement, ResourceDescriptionResolver descriptionResolver, OperationStepHandler addHandler, OperationStepHandler removeHandler, DeprecationData deprecationData)
SimpleResourceDefinition(Parameters)
ResourceDefinition
that uses the given {code descriptionResolver} to configure a
DefaultResourceDescriptionProvider
to describe the resource.pathElement
- the path. Cannot be null
.descriptionResolver
- the description resolver to use in the description provider. Cannot be null
*addHandler
- a handler to register
for the resource "add" operation.
Can be {null}removeHandler
- a handler to register
for the resource "remove" operation.
Can be {null}deprecationData
- Information describing deprecation of this resource. Can be null
if the resource isn't deprecated.IllegalArgumentException
- if any parameter is null
@Deprecated public SimpleResourceDefinition(PathElement pathElement, ResourceDescriptionResolver descriptionResolver, OperationStepHandler addHandler, OperationStepHandler removeHandler, OperationEntry.Flag addRestartLevel, OperationEntry.Flag removeRestartLevel)
SimpleResourceDefinition(Parameters)
ResourceDefinition
that uses the given {code descriptionResolver} to configure a
DefaultResourceDescriptionProvider
to describe the resource.pathElement
- the path. Can be null
.descriptionResolver
- the description resolver to use in the description provider. Cannot be null
*addHandler
- a handler to register
for the resource "add" operation.
Can be {null}removeHandler
- a handler to register
for the resource "remove" operation.
Can be {null}IllegalArgumentException
- if descriptionResolver
is null
.@Deprecated public SimpleResourceDefinition(PathElement pathElement, ResourceDescriptionResolver descriptionResolver, OperationStepHandler addHandler, OperationStepHandler removeHandler, OperationEntry.Flag addRestartLevel, OperationEntry.Flag removeRestartLevel, DeprecationData deprecationData)
SimpleResourceDefinition(Parameters)
ResourceDefinition
that uses the given {code descriptionResolver} to configure a
DefaultResourceDescriptionProvider
to describe the resource.pathElement
- the path. Can be null
.descriptionResolver
- the description resolver to use in the description provider. Cannot be null
*addHandler
- a handler to register
for the resource "add" operation.
Can be {null}removeHandler
- a handler to register
for the resource "remove" operation.
Can be {null}deprecationData
- Information describing deprecation of this resource. Can be null
if the resource isn't deprecated.IllegalArgumentException
- if descriptionResolver
is null
.@Deprecated public SimpleResourceDefinition(PathElement pathElement, ResourceDescriptionResolver descriptionResolver, OperationStepHandler addHandler, OperationStepHandler removeHandler, OperationEntry.Flag addRestartLevel, OperationEntry.Flag removeRestartLevel, DeprecationData deprecationData, boolean runtime)
SimpleResourceDefinition(Parameters)
ResourceDefinition
that uses the given {code descriptionResolver} to configure a
DefaultResourceDescriptionProvider
to describe the resource.pathElement
- the path. Can be null
.descriptionResolver
- the description resolver to use in the description provider. Cannot be null
*addHandler
- a handler to register
for the resource "add" operation.
Can be {null}removeHandler
- a handler to register
for the resource "remove" operation.
Can be {null}deprecationData
- Information describing deprecation of this resource. Can be null
if the resource isn't deprecated.runtime
- Whether this is a runtime resourceIllegalArgumentException
- if descriptionResolver
is null
.public SimpleResourceDefinition(SimpleResourceDefinition.Parameters parameters)
ResourceDefinition
using the passed in parameters object.parameters
- SimpleResourceDefinition.Parameters
to configure this ResourceDefinitionIllegalStateException
- if the parameters object is not valid.public PathElement getPathElement()
ResourceDefinition
null
if this is a definition of a root resource.getPathElement
in interface ResourceDefinition
null
if this is a definition of a root resource.public DescriptionProvider getDescriptionProvider(ImmutableManagementResourceRegistration resourceRegistration)
ResourceDefinition
DescriptionProvider
for the given resource.getDescriptionProvider
in interface ResourceDefinition
resourceRegistration
- the resource. Cannot be null
null
public void registerOperations(ManagementResourceRegistration resourceRegistration)
registerOperations
in interface ResourceDefinition
resourceRegistration
- a ManagementResourceRegistration
created from this definitionpublic void registerAttributes(ManagementResourceRegistration resourceRegistration)
ResourceDefinition
registerAttributes
in interface ResourceDefinition
resourceRegistration
- a ManagementResourceRegistration
created from this definitionpublic void registerNotifications(ManagementResourceRegistration resourceRegistration)
ResourceDefinition
registerNotifications
in interface ResourceDefinition
resourceRegistration
- a ManagementResourceRegistration
created from this definitionpublic void registerChildren(ManagementResourceRegistration resourceRegistration)
ResourceDefinition
registerChildren
in interface ResourceDefinition
resourceRegistration
- a ManagementResourceRegistration
created from this definitionpublic void registerCapabilities(ManagementResourceRegistration resourceRegistration)
ResourceDefinition
registerCapabilities
in interface ResourceDefinition
resourceRegistration
- a ManagementResourceRegistration
created from this definitionpublic ResourceDescriptionResolver getResourceDescriptionResolver()
ResourceDescriptionResolver
used by this resource definition, or null
if a ResourceDescriptionResolver
is not used.null
@Deprecated protected void registerAddOperation(ManagementResourceRegistration registration, OperationStepHandler handler, OperationEntry.Flag... flags)
registration
- resource on which to registerhandler
- operation handler to registerflags
- with flagsprotected void registerAddOperation(ManagementResourceRegistration registration, AbstractAddStepHandler handler, OperationEntry.Flag... flags)
registration
- resource on which to registerhandler
- operation handler to registerflags
- with flags@Deprecated protected void registerRemoveOperation(ManagementResourceRegistration registration, OperationStepHandler handler, OperationEntry.Flag... flags)
protected void registerRemoveOperation(ManagementResourceRegistration registration, AbstractRemoveStepHandler handler, OperationEntry.Flag... flags)
protected static EnumSet<OperationEntry.Flag> getFlagsSet(OperationEntry.Flag... vararg)
public List<AccessConstraintDefinition> getAccessConstraints()
getAccessConstraints
in interface ResourceDefinition
protected void setDeprecated(ModelVersion since)
protected DeprecationData getDeprecationData()
public boolean isRuntime()
isRuntime
in interface ResourceDefinition
public boolean isOrderedChild()
add-index
parameter added. Also, it will get registered as an ordered child in the parent's
management resource registration.isOrderedChild
in interface ResourceDefinition
Copyright © 2023 JBoss by Red Hat. All rights reserved.