public class SimpleResourceDefinition extends Object implements ConstrainedResourceDefinition
ResourceDefinition
.Constructor and Description |
---|
SimpleResourceDefinition(PathElement pathElement,
DescriptionProvider descriptionProvider)
Deprecated.
|
SimpleResourceDefinition(PathElement pathElement,
ResourceDescriptionResolver descriptionResolver)
ResourceDefinition that uses the given {code descriptionResolver} to configure a
DefaultResourceDescriptionProvider to describe the resource. |
SimpleResourceDefinition(PathElement pathElement,
ResourceDescriptionResolver descriptionResolver,
OperationStepHandler addHandler,
OperationStepHandler removeHandler)
ResourceDefinition that uses the given {code descriptionResolver} to configure a
DefaultResourceDescriptionProvider to describe the resource. |
SimpleResourceDefinition(PathElement pathElement,
ResourceDescriptionResolver descriptionResolver,
OperationStepHandler addHandler,
OperationStepHandler removeHandler,
OperationEntry.Flag addRestartLevel,
OperationEntry.Flag removeRestartLevel)
ResourceDefinition that uses the given {code descriptionResolver} to configure a
DefaultResourceDescriptionProvider to describe the resource. |
Modifier and Type | Method and Description |
---|---|
List<AccessConstraintDefinition> |
getAccessConstraints()
Get the definition of any access constraints associated with the resource.
|
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. |
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 |
registerChildren(ManagementResourceRegistration resourceRegistration)
Register child resources 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.
|
@Deprecated public SimpleResourceDefinition(PathElement pathElement, DescriptionProvider descriptionProvider)
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
.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
public SimpleResourceDefinition(PathElement pathElement, ResourceDescriptionResolver descriptionResolver, OperationStepHandler addHandler, OperationStepHandler removeHandler, OperationEntry.Flag addRestartLevel, OperationEntry.Flag removeRestartLevel)
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
.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 registerChildren(ManagementResourceRegistration resourceRegistration)
ResourceDefinition
registerChildren
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 ConstrainedResourceDefinition
Copyright © 2013 JBoss by Red Hat. All rights reserved.