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) |
@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 nullIllegalArgumentException - 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 nullIllegalArgumentException - 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 nullisRuntime - 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()
ResourceDefinitionnull
if this is a definition of a root resource.getPathElement in interface ResourceDefinitionnull if this is a definition of a root resource.public DescriptionProvider getDescriptionProvider(ImmutableManagementResourceRegistration resourceRegistration)
ResourceDefinitionDescriptionProvider for the given resource.getDescriptionProvider in interface ResourceDefinitionresourceRegistration - the resource. Cannot be nullnullpublic void registerOperations(ManagementResourceRegistration resourceRegistration)
registerOperations in interface ResourceDefinitionresourceRegistration - a ManagementResourceRegistration created from this definitionpublic void registerAttributes(ManagementResourceRegistration resourceRegistration)
ResourceDefinitionregisterAttributes in interface ResourceDefinitionresourceRegistration - a ManagementResourceRegistration created from this definitionpublic void registerNotifications(ManagementResourceRegistration resourceRegistration)
ResourceDefinitionregisterNotifications in interface ResourceDefinitionresourceRegistration - a ManagementResourceRegistration created from this definitionpublic void registerChildren(ManagementResourceRegistration resourceRegistration)
ResourceDefinitionregisterChildren in interface ResourceDefinitionresourceRegistration - a ManagementResourceRegistration created from this definitionpublic void registerCapabilities(ManagementResourceRegistration resourceRegistration)
ResourceDefinitionregisterCapabilities in interface ResourceDefinitionresourceRegistration - 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 ResourceDefinitionprotected void setDeprecated(ModelVersion since)
protected DeprecationData getDeprecationData()
public boolean isRuntime()
isRuntime in interface ResourceDefinitionpublic 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 ResourceDefinitionCopyright © 2015 JBoss by Red Hat. All rights reserved.