Package org.jboss.as.controller
Class SimpleOperationDefinitionBuilder
- java.lang.Object
-
- org.jboss.as.controller.SimpleOperationDefinitionBuilder
-
public class SimpleOperationDefinitionBuilder extends Object
Builder for helping constructSimpleOperationDefinition
- Author:
- Tomaz Cerar
-
-
Field Summary
Fields Modifier and Type Field Description protected AccessConstraintDefinition[]
accessConstraints
protected DeprecationData
deprecationData
protected OperationEntry.EntryType
entryType
protected EnumSet<OperationEntry.Flag>
flags
protected String
name
protected AttributeDefinition[]
parameters
protected boolean
replyAllowNull
protected AttributeDefinition[]
replyParameters
protected org.jboss.dmr.ModelType
replyType
protected org.jboss.dmr.ModelType
replyValueType
-
Constructor Summary
Constructors Constructor Description SimpleOperationDefinitionBuilder(String name, ResourceDescriptionResolver resolver)
-
Method Summary
-
-
-
Field Detail
-
name
protected String name
-
entryType
protected OperationEntry.EntryType entryType
-
flags
protected EnumSet<OperationEntry.Flag> flags
-
parameters
protected AttributeDefinition[] parameters
-
replyType
protected org.jboss.dmr.ModelType replyType
-
replyValueType
protected org.jboss.dmr.ModelType replyValueType
-
replyAllowNull
protected boolean replyAllowNull
-
deprecationData
protected DeprecationData deprecationData
-
replyParameters
protected AttributeDefinition[] replyParameters
-
accessConstraints
protected AccessConstraintDefinition[] accessConstraints
-
-
Constructor Detail
-
SimpleOperationDefinitionBuilder
public SimpleOperationDefinitionBuilder(String name, ResourceDescriptionResolver resolver)
-
-
Method Detail
-
of
public static SimpleOperationDefinitionBuilder of(String name, ResourceDescriptionResolver resolver)
-
build
public SimpleOperationDefinition build()
-
internalBuild
protected SimpleOperationDefinition internalBuild(ResourceDescriptionResolver resolver, ResourceDescriptionResolver attributeResolver)
-
getFlagsSet
protected static EnumSet<OperationEntry.Flag> getFlagsSet(OperationEntry.Flag... vararg)
-
setEntryType
public SimpleOperationDefinitionBuilder setEntryType(OperationEntry.EntryType entryType)
-
setPrivateEntry
public SimpleOperationDefinitionBuilder setPrivateEntry()
-
withFlags
public SimpleOperationDefinitionBuilder withFlags(EnumSet<OperationEntry.Flag> flags)
-
withFlags
public SimpleOperationDefinitionBuilder withFlags(OperationEntry.Flag... flags)
-
withFlag
public SimpleOperationDefinitionBuilder withFlag(OperationEntry.Flag flag)
-
setRuntimeOnly
public SimpleOperationDefinitionBuilder setRuntimeOnly()
-
setReadOnly
public SimpleOperationDefinitionBuilder setReadOnly()
-
setParameters
public SimpleOperationDefinitionBuilder setParameters(AttributeDefinition... parameters)
-
addParameter
public SimpleOperationDefinitionBuilder addParameter(AttributeDefinition parameter)
-
setReplyType
public SimpleOperationDefinitionBuilder setReplyType(org.jboss.dmr.ModelType replyType)
-
setReplyValueType
public SimpleOperationDefinitionBuilder setReplyValueType(org.jboss.dmr.ModelType replyValueType)
-
allowReturnNull
public SimpleOperationDefinitionBuilder allowReturnNull()
-
setDeprecated
public SimpleOperationDefinitionBuilder setDeprecated(ModelVersion since)
Marks the operation as deprecated since the given API version. This is equivalent to callingsetDeprecated(ModelVersion, boolean)
with thenotificationUseful
parameter 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 thenotificationUseful
param istrue
the text description of the operation deprecation available from theread-operation-description
management 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
public SimpleOperationDefinitionBuilder setReplyParameters(AttributeDefinition... replyParameters)
-
setAttributeResolver
public SimpleOperationDefinitionBuilder setAttributeResolver(ResourceDescriptionResolver resolver)
-
setAccessConstraints
public SimpleOperationDefinitionBuilder setAccessConstraints(AccessConstraintDefinition... accessConstraints)
-
addAccessConstraint
public SimpleOperationDefinitionBuilder addAccessConstraint(AccessConstraintDefinition accessConstraint)
-
-