Class ControlledVocabularyOptions
java.lang.Object
org.brapi.schematools.core.openapi.generator.options.ControlledVocabularyOptions
- All Implemented Interfaces:
Options,Validatable
Provides options for the generation of Controlled Vocabulary Endpoints
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringgetDescriptionFor(@NonNull String typeName, @NonNull String propertyName) Gets the description for a specific primary modelfinal StringgetDescriptionFor(@NonNull BrAPIType type, @NonNull BrAPIObjectProperty property) Gets the description for a specific primary modelfinal StringgetSummaryFor(@NonNull String typeName, @NonNull String propertyName) Gets the summary for a specific primary modelfinal StringgetSummaryFor(@NonNull BrAPIType type, @NonNull BrAPIObjectProperty property) Gets the summary for a specific primary modelfinal booleanDetermines if the Endpoint/Query/Mutation is generated for any primary model.final booleanisGeneratingFor(@NonNull String typeName, @NonNull String propertyName) Determines if the Endpoint is generated for a specific BrAPI Propertyfinal booleanisGeneratingFor(@NonNull BrAPIType type, @NonNull BrAPIObjectProperty property) Determines if the Endpoint is generated for a specific BrAPI PropertybooleanisGeneratingFor(@NonNull BrAPIObjectTypeWithProperty typeWithProperty) Determines if the Endpoint is generated for a specific BrAPI Propertyvoidoverride(ControlledVocabularyOptions overrideOptions) Overrides the values in this Options Object from the provided Options Object if they are non-nullsetGenerateFor(String typeName, String propertyName, boolean generate) Sets if the Endpoint is generated for a specific BrAPI PropertysetGenerateFor(@NonNull BrAPIType type, @NonNull BrAPIObjectProperty property, 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
-
ControlledVocabularyOptions
public ControlledVocabularyOptions()
-
-
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
public final boolean isGeneratingFor(@NonNull @NonNull String typeName, @NonNull @NonNull String propertyName) Determines if the Endpoint is generated for a specific BrAPI Property- Parameters:
typeName- the name of the primary modelpropertyName- the name of the property- Returns:
trueif the Endpoint specific BrAPI Property,falseotherwise
-
isGeneratingFor
public final boolean isGeneratingFor(@NonNull @NonNull BrAPIType type, @NonNull @NonNull BrAPIObjectProperty property) Determines if the Endpoint is generated for a specific BrAPI Property- Parameters:
type- the primary modelproperty- the property- Returns:
trueif the Endpoint specific BrAPI Property,falseotherwise
-
isGeneratingFor
Determines if the Endpoint is generated for a specific BrAPI Property- Parameters:
typeWithProperty- the primary model with the property- Returns:
trueif the Endpoint specific BrAPI Property,falseotherwise
-
setGenerateFor
public ControlledVocabularyOptions setGenerateFor(String typeName, String propertyName, boolean generate) Sets if the Endpoint is generated for a specific BrAPI Property- Parameters:
typeName- the name of the primary modelpropertyName- the name of the propertygenerate-trueif the Endpoint/Query/Mutation is generated for a specific BrAPI Property,false- Returns:
- the options for chaining
-
setGenerateFor
public ControlledVocabularyOptions setGenerateFor(@NonNull @NonNull BrAPIType type, @NonNull @NonNull BrAPIObjectProperty property, boolean generate) Sets if the Endpoint/Query/Mutation is generated for a specific primary model.- Parameters:
type- the primary modelproperty- the propertygenerate-trueif the Endpoint/Query/Mutation is generated for a specific primary model,false- Returns:
- the options for chaining
-
getDescriptionFor
public final String getDescriptionFor(@NonNull @NonNull String typeName, @NonNull @NonNull String propertyName) Gets the description for a specific primary model- Parameters:
typeName- the name of the primary modelpropertyName- the name of the property- Returns:
- the description for a specific primary model
-
getDescriptionFor
public final String getDescriptionFor(@NonNull @NonNull BrAPIType type, @NonNull @NonNull BrAPIObjectProperty property) Gets the description for a specific primary model- Parameters:
type- the primary modelproperty- the property- Returns:
- the description for a specific primary model
-
getSummaryFor
public final String getSummaryFor(@NonNull @NonNull String typeName, @NonNull @NonNull String propertyName) Gets the summary for a specific primary model- Parameters:
typeName- the name of the primary modelpropertyName- the name of the property- Returns:
- the summary for a specific primary model
-
getSummaryFor
public final String getSummaryFor(@NonNull @NonNull BrAPIType type, @NonNull @NonNull BrAPIObjectProperty property) Gets the summary for a specific primary model- Parameters:
type- the primary model- Returns:
- the summary for a specific primary model
-