Class AbstractGeneratorSubOptions
java.lang.Object
org.brapi.schematools.core.options.AbstractGeneratorSubOptions
- All Implemented Interfaces:
Options,Validatable
- Direct Known Subclasses:
AbstractGraphQLOptions,AbstractOpenAPIOptions
Provides general options for all sub-options in generators
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringgetDescriptionFor(@NonNull String name) Gets the description for a specific primary modelfinal StringgetDescriptionFor(@NonNull BrAPIType type) Gets the description for a specific primary modelfinal booleanDetermines if the Endpoint/Query/Mutation is generated for any primary model.final booleanisGeneratingFor(@NonNull String name) Determines if the Endpoint/Query/Mutation is generated for a specific primary modelfinal booleanisGeneratingFor(@NonNull BrAPIType type) Determines if the Endpoint/Query/Mutation is generated for a specific primary modelvoidoverride(AbstractGeneratorSubOptions overrideOptions) Overrides the values in this Options Object from the provided Options Object if they are non-nullsetGenerateFor(String name, boolean generate) Sets if the Endpoint/Query/Mutation is generated for a specific primary model.setGenerateFor(BrAPIType type, boolean generate) Sets if the Endpoint/Query/Mutation is generated for a specific primary model.validate()Checks if the current options are valid, return a list of errors if the options are not valid
-
Constructor Details
-
AbstractGeneratorSubOptions
public AbstractGeneratorSubOptions()
-
-
Method Details
-
validate
Checks if the current options are valid, return a list of errors if the options are not valid- Specified by:
validatein interfaceValidatable- Returns:
- a Validation object than can be used queried to find if the options are valid and any errors if the options are not valid
-
override
Overrides the values in this Options Object from the provided Options Object if they are non-null- Parameters:
overrideOptions- the options which will be used to override this Options Object
-
isGenerating
public final boolean isGenerating()Determines if the Endpoint/Query/Mutation is generated for any primary model. Returnstrueifgenerateis set totrueorgenerateForis set totruefor any type- Returns:
trueif the Generator should generate any Endpoints/Queries/Mutations,falseotherwise
-
isGeneratingFor
Determines if the Endpoint/Query/Mutation is generated for a specific primary model- Parameters:
name- the name of the primary model- Returns:
trueif the Endpoint/Query/Mutation is generated for a specific primary model,falseotherwise
-
isGeneratingFor
Determines if the Endpoint/Query/Mutation is generated for a specific primary model- Parameters:
type- the primary model- Returns:
trueif the Endpoint/Query/Mutation is generated for a specific primary model,falseotherwise
-
setGenerateFor
Sets if the Endpoint/Query/Mutation is generated for a specific primary model.- Parameters:
name- the name of the primary modelgenerate-trueif the Endpoint/Query/Mutation is generated for a specific primary model,false- Returns:
- the options for chaining
-
setGenerateFor
Sets if the Endpoint/Query/Mutation is generated for a specific primary model.- Parameters:
type- the primary modelgenerate-trueif the Endpoint/Query/Mutation is generated for a specific primary model,false- Returns:
- the options for chaining
-
getDescriptionFor
Gets the description for a specific primary model- Parameters:
name- the name of the primary model- Returns:
- the description for a specific primary model
-
getDescriptionFor
Gets the description for a specific primary model- Parameters:
type- the primary model- Returns:
- the description for a specific primary model
-