Class DynamicModelAttributeOperations
java.lang.Object
io.jmix.dynmodelai.modelchange.impl.DynamicModelAttributeOperations
@Component("dmagent_DynamicModelAttributeOperations")
public class DynamicModelAttributeOperations
extends Object
Operations that edit attributes and references of the target Dynamic Model entity.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CorePropertiesprotected final CurrentAuthenticationprotected final DynamicModelToolsprotected final Messagesprotected final Metadata -
Constructor Summary
ConstructorsConstructorDescriptionDynamicModelAttributeOperations(CurrentAuthentication currentAuthentication, CoreProperties coreProperties, Metadata metadata, DynamicModelTools dynamicModelTools, Messages messages) -
Method Summary
Modifier and TypeMethodDescriptionaddAttribute(DynamicModelDefinition definition, String entityName, DynamicModelDefinition baseline, @Nullable DynamicAttributeDefinition previous, String name, AttributeType type, @Nullable Caption caption, @Nullable Boolean required, @Nullable Integer length, @Nullable Boolean displayName, @Nullable Boolean unique) addReference(DynamicModelDefinition definition, String entityName, DynamicModelDefinition baseline, @Nullable DynamicAttributeDefinition previous, String name, String targetEntity, @Nullable Caption caption, @Nullable Boolean required, @Nullable Boolean collection) protected StringThe message key of the analyst's language among the application locales: a key with a country, such as en_US, must be written as such, or the old text under it would stay visible.protected @Nullable MutationIssuecaptionLocaleIssue(@Nullable Caption caption) A caption may use only the application's locales: other texts would never be shown.captionMessages(@Nullable Caption caption, String name) Captions by locale.protected MutationResultprotected MutationIssueAn issue whose guidance has the key of its message followed byGuidance.moveAttribute(DynamicModelDefinition definition, String entityName, String name, @Nullable String before) removeAttribute(DynamicModelDefinition definition, String entityName, String attributeName) reorderAttributes(DynamicModelDefinition definition, String entityName, List<String> attributeNames) protected MutationIssueunknownEntity(String entityName, DynamicModelDefinition definition) updateAttributeCaption(DynamicModelDefinition definition, String entityName, String name, Caption caption)
-
Field Details
-
metadata
-
dynamicModelTools
-
currentAuthentication
-
coreProperties
-
messages
-
-
Constructor Details
-
DynamicModelAttributeOperations
public DynamicModelAttributeOperations(CurrentAuthentication currentAuthentication, CoreProperties coreProperties, Metadata metadata, DynamicModelTools dynamicModelTools, Messages messages)
-
-
Method Details
-
addAttribute
public MutationResult addAttribute(DynamicModelDefinition definition, String entityName, DynamicModelDefinition baseline, @Nullable DynamicAttributeDefinition previous, String name, AttributeType type, @Nullable Caption caption, @Nullable Boolean required, @Nullable Integer length, @Nullable Boolean displayName, @Nullable Boolean unique) -
removeAttribute
public MutationResult removeAttribute(DynamicModelDefinition definition, String entityName, String attributeName) -
reorderAttributes
public MutationResult reorderAttributes(DynamicModelDefinition definition, String entityName, List<String> attributeNames) -
moveAttribute
public MutationResult moveAttribute(DynamicModelDefinition definition, String entityName, String name, @Nullable String before) -
updateAttributeCaption
public MutationResult updateAttributeCaption(DynamicModelDefinition definition, String entityName, String name, Caption caption) -
addReference
public MutationResult addReference(DynamicModelDefinition definition, String entityName, DynamicModelDefinition baseline, @Nullable DynamicAttributeDefinition previous, String name, String targetEntity, @Nullable Caption caption, @Nullable Boolean required, @Nullable Boolean collection) -
issue
An issue whose guidance has the key of its message followed byGuidance. -
failed
-
captionMessages
Captions by locale. A text without a locale belongs to the language the analyst works in: the current user locale, falling back to the first available locale. A caption derived from the name is the only text there is, so every application locale gets it. -
captionLocaleIssue
A caption may use only the application's locales: other texts would never be shown. -
captionLocale
The message key of the analyst's language among the application locales: a key with a country, such as en_US, must be written as such, or the old text under it would stay visible. -
unknownEntity
-