enonic/wem-ce — pull request #86 by vfi (2012-12-07 14:02:50+00:00)
Title: CMS-683 Introduce ContentTypeValidator and Command for it

in package com.enonic.wem.api.content.type

Which takes a ContentType and validates:
- superType is not "final" (see: ContentType.isFinal) - this means the class needs access to "command client" so it can lookup the supert type using GetContentTypes command.

ContentTypeValidator should be configurable whether exceptions should be recorded or thrown out of the validator (see com.enonic.wem.api.content.type.Validator for inspiration).

Then Introduce command for it:

Create: ValidateContentTypeResult in com.enonic.wem.api.content.type
Create: ValidateContentType extends Command in com.enonic.wem.api.command.content.type
Extend ContentTypeCommands with command ValidateContentType
Create: ValidateContentTypeHandler which creates a ContentTypeValidator and executes with recordExceptions=false and build and return ValidateContentTypeResult