Class BaseBehaviourBean

    • Field Detail

      • LOGGER

        protected static final org.apache.commons.logging.Log LOGGER
        Logger
      • behaviourFilter

        protected org.alfresco.repo.policy.BehaviourFilter behaviourFilter
        behaviour filter
      • behaviours

        protected Map<String,​org.alfresco.repo.policy.Behaviour> behaviours
        behaviour map
    • Constructor Detail

      • BaseBehaviourBean

        public BaseBehaviourBean()
    • Method Detail

      • setBehaviourFilter

        public void setBehaviourFilter​(org.alfresco.repo.policy.BehaviourFilter behaviourFilter)
        Parameters:
        behaviourFilter - behaviour filter
      • registerBehaviour

        public void registerBehaviour​(String name,
                                      org.alfresco.repo.policy.Behaviour behaviour)
        Specified by:
        registerBehaviour in interface org.alfresco.repo.policy.annotation.BehaviourRegistry
        See Also:
        BehaviourRegistry.registerBehaviour(java.lang.String, org.alfresco.repo.policy.Behaviour)
      • getBehaviour

        public org.alfresco.repo.policy.Behaviour getBehaviour​(String name)
        Specified by:
        getBehaviour in interface org.alfresco.repo.policy.annotation.BehaviourRegistry
        See Also:
        BehaviourRegistry.getBehaviour(java.lang.String)
      • validateNewChildAssociation

        protected void validateNewChildAssociation​(org.alfresco.service.cmr.repository.NodeRef parent,
                                                   org.alfresco.service.cmr.repository.NodeRef child,
                                                   List<org.alfresco.service.namespace.QName> acceptedUniqueChildType,
                                                   List<org.alfresco.service.namespace.QName> acceptedMultipleChildType)
                                            throws org.alfresco.repo.node.integrity.IntegrityException
        Helper method that checks if the newly created child association complies with the RM rules
        Parameters:
        parent - the parent node
        child - the child node
        acceptedUniqueChildType - a list of node types that are accepted as children of the provided parent only once
        acceptedMultipleChildType - a list of node types that are accepted as children of the provided parent multiple times
        Throws:
        org.alfresco.repo.node.integrity.IntegrityException - if the child association doesn't comply with the RM rules
      • validateNewChildAssociationSubTypesIncluded

        protected void validateNewChildAssociationSubTypesIncluded​(org.alfresco.service.cmr.repository.NodeRef child,
                                                                   List<org.alfresco.service.namespace.QName> acceptedMultipleChildType)
                                                            throws org.alfresco.repo.node.integrity.IntegrityException
        Helper method that checks if the newly created child association is between the sub-types of accepted types.
        Parameters:
        child - the child node
        acceptedMultipleChildType - a list of node types that are accepted as children of the provided parent multiple times
        Throws:
        org.alfresco.repo.node.integrity.IntegrityException - if the child association isn't between the sub-types of accepted types