Class AbstractIntegrityEvent

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService  
      protected org.alfresco.service.cmr.repository.NodeService nodeService  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractIntegrityEvent​(org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName typeQName, org.alfresco.service.namespace.QName qname)
      Constructor with helper values for storage
    • Field Detail

      • nodeService

        protected final org.alfresco.service.cmr.repository.NodeService nodeService
      • dictionaryService

        protected final org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService
    • Constructor Detail

      • AbstractIntegrityEvent

        protected AbstractIntegrityEvent​(org.alfresco.service.cmr.repository.NodeService nodeService,
                                         org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
                                         org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                         org.alfresco.service.namespace.QName typeQName,
                                         org.alfresco.service.namespace.QName qname)
        Constructor with helper values for storage
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object obj)
        Compares based on the class of this instance and the incoming instance, before comparing based on all the internal data. If derived classes store additional data for their functionality, then they should override this.
        Overrides:
        equals in class Object
      • getNodeType

        protected org.alfresco.service.namespace.QName getNodeType​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Gets the node type if the node exists
        Parameters:
        nodeRef - NodeRef
        Returns:
        Returns the node's type or null if the node no longer exists
      • getNodeRef

        protected org.alfresco.service.cmr.repository.NodeRef getNodeRef()
      • getTypeQName

        protected org.alfresco.service.namespace.QName getTypeQName()
      • getQName

        protected org.alfresco.service.namespace.QName getQName()
      • getAssocDef

        protected org.alfresco.service.cmr.dictionary.AssociationDefinition getAssocDef​(List<IntegrityRecord> eventResults,
                                                                                        org.alfresco.service.namespace.QName assocTypeQName)
        Gets the association definition from the dictionary. If the source node type is provided then the association particular to the subtype is attempted.
        Parameters:
        eventResults - results to add a violation message to
        assocTypeQName - the type of the association
        Returns:
        Returns the association definition, or null if not found
      • getMultiplicityString

        protected String getMultiplicityString​(boolean mandatory,
                                               boolean allowMany)