Package org.jboss.as.controller
Class SimpleOperationDefinitionBuilder
java.lang.Object
org.jboss.as.controller.SimpleOperationDefinitionBuilder
Builder for helping construct
SimpleOperationDefinition- Author:
- Tomaz Cerar
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AccessConstraintDefinition[]protected DeprecationDataprotected OperationEntry.EntryTypeprotected Set<OperationEntry.Flag>protected Stringprotected AttributeDefinition[]protected booleanprotected AttributeDefinition[]protected org.jboss.dmr.ModelTypeprotected org.jboss.dmr.ModelType -
Constructor Summary
ConstructorsConstructorDescriptionSimpleOperationDefinitionBuilder(String name, ResourceDescriptionResolver resolver) -
Method Summary
Modifier and TypeMethodDescriptionaddAccessConstraint(AccessConstraintDefinition accessConstraint) addParameter(AttributeDefinition parameter) build()protected static EnumSet<OperationEntry.Flag>getFlagsSet(OperationEntry.Flag... vararg) protected SimpleOperationDefinitioninternalBuild(ResourceDescriptionResolver resolver, ResourceDescriptionResolver attributeResolver) of(String name, ResourceDescriptionResolver resolver) of(String name, OperationDefinition basis) Convenience method that delegates toof(String, SimpleOperationDefinition).of(String name, SimpleOperationDefinition basis) Creates an operation definition builder with the specified name, based on the configuration of the specified operation definition.setAccessConstraints(AccessConstraintDefinition... accessConstraints) setDeprecated(ModelVersion since) Marks the operation as deprecated since the given API version.setDeprecated(ModelVersion since, boolean notificationUseful) Marks the attribute as deprecated since the given API version, with the ability to configure that notifications to the user (e.g. via a log message) about deprecation of the operation should not be emitted.setDescriptionProvider(DescriptionProvider provider) setEntryType(OperationEntry.EntryType entryType) setParameters(AttributeDefinition... parameters) setReplyParameters(AttributeDefinition... replyParameters) setReplyType(org.jboss.dmr.ModelType replyType) setReplyValueType(org.jboss.dmr.ModelType replyValueType) setStability(Stability stability) withFlag(OperationEntry.Flag flag) withFlags(Set<OperationEntry.Flag> flags) withFlags(OperationEntry.Flag... flags)
-
Field Details
-
name
-
entryType
-
flags
-
parameters
-
replyType
protected org.jboss.dmr.ModelType replyType -
replyValueType
protected org.jboss.dmr.ModelType replyValueType -
replyAllowNull
protected boolean replyAllowNull -
deprecationData
-
replyParameters
-
accessConstraints
-
-
Constructor Details
-
SimpleOperationDefinitionBuilder
-
-
Method Details
-
of
public static SimpleOperationDefinitionBuilder of(String name, ResourceDescriptionResolver resolver) -
of
Convenience method that delegates toof(String, SimpleOperationDefinition).- Parameters:
name- the operation namebasis- an operation used to configure a new operation- Returns:
- a new operation definition builder
- Throws:
IllegalArgumentException- if the specified basis is not aSimpleOperationDefinition.
-
of
Creates an operation definition builder with the specified name, based on the configuration of the specified operation definition.- Parameters:
name- the operation namebasis- an operation used to configure a new operation- Returns:
- a new operation definition builder
-
build
-
internalBuild
protected SimpleOperationDefinition internalBuild(ResourceDescriptionResolver resolver, ResourceDescriptionResolver attributeResolver) -
getFlagsSet
-
setEntryType
-
setPrivateEntry
-
withFlags
-
withFlags
-
withFlag
-
setRuntimeOnly
-
setReadOnly
-
setParameters
-
addParameter
-
setReplyType
-
setReplyValueType
-
allowReturnNull
-
setDeprecated
Marks the operation as deprecated since the given API version. This is equivalent to callingsetDeprecated(ModelVersion, boolean)with thenotificationUsefulparameter set totrue.- Parameters:
since- the API version, with the API being the one (core or a subsystem) in which the attribute is used- Returns:
- a builder that can be used to continue building the attribute definition
-
setDeprecated
public SimpleOperationDefinitionBuilder setDeprecated(ModelVersion since, boolean notificationUseful) Marks the attribute as deprecated since the given API version, with the ability to configure that notifications to the user (e.g. via a log message) about deprecation of the operation should not be emitted. Notifying the user should only be done if the user can take some action in response. Advising that something will be removed in a later release is not useful if there is no alternative in the current release. If thenotificationUsefulparam istruethe text description of the operation deprecation available from theread-operation-descriptionmanagement operation should provide useful information about how the user can avoid using the operation.- Parameters:
since- the API version, with the API being the one (core or a subsystem) in which the attribute is usednotificationUseful- whether actively advising the user about the deprecation is useful- Returns:
- a builder that can be used to continue building the attribute definition
-
setReplyParameters
-
setAttributeResolver
-
setAccessConstraints
public SimpleOperationDefinitionBuilder setAccessConstraints(AccessConstraintDefinition... accessConstraints) -
addAccessConstraint
public SimpleOperationDefinitionBuilder addAccessConstraint(AccessConstraintDefinition accessConstraint) -
setDescriptionProvider
-
setStability
-