Class ModelValidatorImpl

  • All Implemented Interfaces:
    ModelValidator

    public class ModelValidatorImpl
    extends java.lang.Object
    implements ModelValidator
    Model change validation covering model deletes, model constituent changes e.g. property deletes, additions, etc.
    Author:
    sglover
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canDeleteModel​(org.alfresco.service.namespace.QName modelName)
      Can the model be deleted (validate against repository contents / workflows)?
      void setDictionaryDAO​(org.alfresco.repo.dictionary.DictionaryDAO dictionaryDAO)  
      void setDictionaryService​(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)  
      void setEnforceTenantInNamespace​(boolean enforceTenantInNamespace)  
      void setNamespaceService​(org.alfresco.service.namespace.NamespaceService namespaceService)  
      void setQnameDAO​(QNameDAO qnameDAO)  
      void setTenantAdminService​(TenantAdminService tenantAdminService)  
      void setTenantService​(org.alfresco.repo.tenant.TenantService tenantService)  
      void setTransactionService​(TransactionService transactionService)  
      void setWorkflowService​(WorkflowService workflowService)  
      void validateModel​(org.alfresco.repo.dictionary.CompiledModel compiledModel)
      validate against dictionary if new model then nothing to validate else if an existing model then could be updated (or unchanged) so validate to currently only allow incremental updates - addition of new types, aspects (except default aspects), properties, associations - no deletion of types, aspects or properties or associations - no addition, update or deletion of default/mandatory aspects
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ModelValidatorImpl

        public ModelValidatorImpl()
    • Method Detail

      • setEnforceTenantInNamespace

        public void setEnforceTenantInNamespace​(boolean enforceTenantInNamespace)
      • setTransactionService

        public void setTransactionService​(TransactionService transactionService)
      • setQnameDAO

        public void setQnameDAO​(QNameDAO qnameDAO)
      • setDictionaryDAO

        public void setDictionaryDAO​(org.alfresco.repo.dictionary.DictionaryDAO dictionaryDAO)
      • setNamespaceService

        public void setNamespaceService​(org.alfresco.service.namespace.NamespaceService namespaceService)
      • setWorkflowService

        public void setWorkflowService​(WorkflowService workflowService)
      • setTenantService

        public void setTenantService​(org.alfresco.repo.tenant.TenantService tenantService)
      • setTenantAdminService

        public void setTenantAdminService​(TenantAdminService tenantAdminService)
      • setDictionaryService

        public void setDictionaryService​(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      • canDeleteModel

        public boolean canDeleteModel​(org.alfresco.service.namespace.QName modelName)
        Can the model be deleted (validate against repository contents / workflows)?
        Specified by:
        canDeleteModel in interface ModelValidator
        Returns:
        true only if the model is not being used or if the model does not exist
      • validateModel

        public void validateModel​(org.alfresco.repo.dictionary.CompiledModel compiledModel)
        validate against dictionary if new model then nothing to validate else if an existing model then could be updated (or unchanged) so validate to currently only allow incremental updates - addition of new types, aspects (except default aspects), properties, associations - no deletion of types, aspects or properties or associations - no addition, update or deletion of default/mandatory aspects
        Specified by:
        validateModel in interface ModelValidator