Class TacticDDDLanguageValidator
java.lang.Object
org.eclipse.xtext.validation.AbstractInjectableValidator
org.eclipse.xtext.validation.AbstractDeclarativeValidator
org.contextmapper.tactic.dsl.validation.AbstractTacticDDDLanguageValidator
org.contextmapper.tactic.dsl.validation.TacticDDDLanguageValidator
- All Implemented Interfaces:
IssueCodes
,org.eclipse.emf.ecore.EValidator
,org.eclipse.xtext.validation.ValidationMessageAcceptor
- Direct Known Subclasses:
ContextMappingDSLValidator
public class TacticDDDLanguageValidator
extends AbstractTacticDDDLanguageValidator
implements IssueCodes
Custom validation rules.
see http://www.eclipse.org/Xtext/documentation.html#validation
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.xtext.validation.AbstractDeclarativeValidator
org.eclipse.xtext.validation.AbstractDeclarativeValidator.MethodWrapper, org.eclipse.xtext.validation.AbstractDeclarativeValidator.State, org.eclipse.xtext.validation.AbstractDeclarativeValidator.StateAccess
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.EValidator
org.eclipse.emf.ecore.EValidator.Descriptor, org.eclipse.emf.ecore.EValidator.PatternMatcher, org.eclipse.emf.ecore.EValidator.Registry, org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider, org.eclipse.emf.ecore.EValidator.ValidationDelegate
-
Field Summary
Fields inherited from class org.eclipse.xtext.validation.AbstractInjectableValidator
CURRENT_LANGUAGE_NAME, ISSUE_SEVERITIES
Fields inherited from interface org.eclipse.emf.ecore.EValidator
MARKER, RELATED_URIS_ATTRIBUTE, URI_ATTRIBUTE
Fields inherited from interface org.contextmapper.tactic.dsl.validation.IssueCodes
ALL_LOWERCASE_NAME, CAPITALIZED_NAME, DUPLICATE_NAME, ISSUE_CODE_PREFIX, NON_PERSISTENT_EVENT, UNCAPITALIZED_NAME, USED_RESERVED_KEYWORD
Fields inherited from interface org.eclipse.xtext.validation.ValidationMessageAcceptor
INSIGNIFICANT_INDEX
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
checkAssertFalse
(Attribute attr) void
checkAssertTrue
(Attribute attr) void
checkBelongsToRefersToAggregateRoot
(DomainObject domainObj) void
checkCache
(Reference ref) void
checkCascade
(Reference ref) void
void
void
void
For bidirectional one-to-many associations it should only be possible to define databaseColumn on the reference pointing to the one-side.void
checkDigits
(Attribute attr) void
checkDiscriminatorValue
(Entity domainObj) void
checkDiscriminatorValue
(ValueObject domainObj) void
checkDomainObjectNameStartsWithUpperCase
(SimpleDomainObject domainObject) void
checkEmail
(Attribute attr) void
checkEnumAttributeKey
(Enum dslEnum) void
checkEnumAttributes
(Enum dslEnum) void
checkEnumDatabaseLength
(Enum dslEnum) void
checkEnumImplicitAttribute
(Enum dslEnum) void
checkEnumOrdinal
(Enum dslEnum) void
checkEnumOrdinalOrDatabaseLength
(Enum dslEnum) void
checkEnumParameter
(Enum dslEnum) void
checkEnumValues
(Enum dslEnum) void
checkFuture
(Attribute attr) void
void
checkGap
(DomainObject domainObj) void
checkGap
(Repository repository) void
void
checkInverse
(Reference ref) void
checkJoinColumn
(Reference ref) void
checkJoinTable
(Reference ref) void
void
void
checkKeyRequired
(Property prop) void
checkLength
(Attribute attr) void
void
void
void
void
void
Type for collection matches a domain object, but due to missing '-', comes in as a Attribute rather than a Referencevoid
Type matches a domain object, but due to missing '-', comes in as a Attribute rather than a Referencevoid
checkNotEmpty
(Attribute attr) void
checkNotEmpty
(Reference ref) void
checkNullable
(Attribute attr) void
checkNullable
(Reference ref) void
checkNullableKey
(Property prop) void
checkOpposite
(Reference ref) void
checkOrderBy
(Reference ref) void
void
void
void
void
void
checkRange
(Attribute attr) void
checkRepositoryDuplicateName
(Repository repository) void
checkRepositoryEvent
(Event event) void
checkRepositoryName
(Repository repository) void
checkRepositoryNameStartsWithUpperCase
(Repository repository) void
checkRepositoryOnlyForAggregateRoot
(DomainObject domainObj) void
checkRequired
(Property prop) void
checkScaffoldEvent
(Event event) void
checkScaffoldValueObject
(ValueObject valueObj) void
void
Methods inherited from class org.contextmapper.tactic.dsl.validation.AbstractTacticDDDLanguageValidator
getEPackages
Methods inherited from class org.eclipse.xtext.validation.AbstractDeclarativeValidator
acceptError, acceptError, acceptInfo, acceptInfo, acceptWarning, acceptWarning, addIssue, addIssue, addIssue, addIssue, addIssue, addIssueToState, checkDone, checkIsFromCurrentlyCheckedResource, createDiagnostic, createDiagnostic, createMethodWrapper, error, error, error, error, error, error, error, error, getCancelIndicator, getChain, getCheckMode, getContext, getCurrentMethod, getCurrentObject, getIssueSeverities, getMessageAcceptor, guard, handleExceptionDuringValidation, info, info, info, info, info, info, info, info, internalValidate, isIgnored, newInstance, setInjector, setMessageAcceptor, toDiagnosticSeverity, warning, warning, warning, warning, warning, warning, warning, warning
Methods inherited from class org.eclipse.xtext.validation.AbstractInjectableValidator
getCurrentLanguage, isLanguageSpecific, isResponsible, register, validate, validate, validate
-
Constructor Details
-
TacticDDDLanguageValidator
public TacticDDDLanguageValidator()
-
-
Method Details
-
checkServiceNameStartsWithUpperCase
-
checkRepositoryNameStartsWithUpperCase
-
checkDomainObjectNameStartsWithUpperCase
-
checkPropertyNameStartsWithLowerCase
-
checkParamterNameStartsWithLowerCase
-
checkRequired
-
checkKeyNotChangeable
-
checkKeyRequired
-
checkCollectionCache
-
checkInverse
-
checkJoinTable
-
checkJoinColumn
-
checkNullable
-
checkDatabaseColumnForBidirectionalOneToMany
For bidirectional one-to-many associations it should only be possible to define databaseColumn on the reference pointing to the one-side. -
checkOpposite
-
checkChangeableCollection
-
checkOrderBy
-
checkOrderColumn
-
checkOrderByOrOrderColumn
-
checkNullableKey
-
checkKeyNotManyRefererence
-
checkCascade
-
checkCache
-
checkRepositoryName
-
checkEnumValues
-
checkEnumAttributes
-
checkEnumParameter
-
checkEnumImplicitAttribute
-
checkEnumAttributeKey
-
checkEnumOrdinal
-
checkEnumOrdinalOrDatabaseLength
-
checkEnumDatabaseLength
-
checkGap
-
checkGap
-
checkGap
-
checkGap
-
checkDiscriminatorValue
-
checkDiscriminatorValue
-
checkRepositoryOnlyForAggregateRoot
-
checkBelongsToRefersToAggregateRoot
-
checkAggregateRootOnlyForPersistentValueObject
-
checkLength
-
checkNullable
-
checkCreditCardNumber
-
checkEmail
-
checkNotEmpty
-
checkNotEmpty
-
checkSize
-
checkPast
-
checkFuture
-
checkMin
-
checkMax
-
checkRange
-
checkDigits
-
checkAssertTrue
-
checkAssertFalse
-
checkScaffoldValueObject
-
checkScaffoldEvent
-
checkRepositoryEvent
-
checkRepositoryDuplicateName
-
checkMissingReferenceNotationWithNoCollection
Type matches a domain object, but due to missing '-', comes in as a Attribute rather than a Reference -
checkMissingReferenceNotationWithCollection
Type for collection matches a domain object, but due to missing '-', comes in as a Attribute rather than a Reference -
checkMissingDomainObjectInServiceOperationReturnType
-
checkMissingDomainObjectInRepositoryOperationReturnType
-
checkMissingDomainObjectInParameter
-