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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTrace​(java.lang.StackTraceElement[] trace)  
      boolean equals​(java.lang.Object obj)
      Compares based on the class of this instance and the incoming instance, before comparing based on all the internal data.
      protected org.alfresco.service.cmr.dictionary.AssociationDefinition getAssocDef​(java.util.List<IntegrityRecord> eventResults, org.alfresco.service.namespace.QName assocTypeQName)
      Gets the association definition from the dictionary.
      protected java.lang.String getMultiplicityString​(boolean mandatory, boolean allowMany)  
      protected org.alfresco.service.cmr.repository.NodeRef getNodeRef()  
      protected org.alfresco.service.namespace.QName getNodeType​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
      Gets the node type if the node exists
      protected org.alfresco.service.namespace.QName getQName()  
      java.util.List<java.lang.StackTraceElement[]> getTraces()  
      protected org.alfresco.service.namespace.QName getTypeQName()  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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 java.lang.Object
      • equals

        public boolean equals​(java.lang.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 java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.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
      • getTraces

        public java.util.List<java.lang.StackTraceElement[]> getTraces()
        Specified by:
        getTraces in interface IntegrityEvent
        Returns:
        Returns the traces (if present) that caused the creation of this event
      • addTrace

        public void addTrace​(java.lang.StackTraceElement[] trace)
        Specified by:
        addTrace in interface IntegrityEvent
      • 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​(java.util.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 java.lang.String getMultiplicityString​(boolean mandatory,
                                                         boolean allowMany)