
    j	                     :    d dl mZ ddlmZ  G d de          ZdS )   )Watcher    )Modelc                       e Zd ZdZdededefdZdededefdZdedededefd	Zd
e	fdZ
dededegfdZdededegfdZdS )	WatcherExzD
    WatcherEx is the strengthened version of PyCasbin Watcher.
    secptypeparamsc                     dS )z
        update_for_add_policy calls the update callback of other instances to synchronize their policy.
        It is called after Enforcer.AddPolicy()
        N selfr   r	   r
   s       c/lsinfo/ai/hellotax_ai/base_platform/venv/lib/python3.11/site-packages/casbin/persist/watcher_ex.pyupdate_for_add_policyzWatcherEx.update_for_add_policy   	    
 	    c                     dS )z
        update_for_remove_policy calls the update callback of other instances to synchronize their policy.
        It is called after Enforcer.RemovePolicy()
        Nr   r   s       r   update_for_remove_policyz"WatcherEx.update_for_remove_policy   r   r   field_indexfield_valuesc                     dS )z
        update_for_remove_filtered_policy calls the update callback of other instances to synchronize their policy.
        It is called after Enforcer.RemoveFilteredNamedGroupingPolicy()
        Nr   )r   r   r	   r   r   s        r   !update_for_remove_filtered_policyz+WatcherEx.update_for_remove_filtered_policy&   r   r   modelc                     dS )z
        update_for_save_policy calls the update callback of other instances to synchronize their policy.
        It is called after Enforcer.RemoveFilteredNamedGroupingPolicy()
        Nr   )r   r   s     r   update_for_save_policyz WatcherEx.update_for_save_policy-   r   r   rulesc                     dS )z
        update_for_add_policies calls the update callback of other instances to synchronize their policy.
        It is called after Enforcer.AddPolicies()
        Nr   r   r   r	   r   s       r   update_for_add_policiesz!WatcherEx.update_for_add_policies4   r   r   c                     dS )z
        update_for_remove_policies calls the update callback of other instances to synchronize their policy.
        It is called after Enforcer.RemovePolicies()
        Nr   r   s       r   update_for_remove_policiesz$WatcherEx.update_for_remove_policies;   r   r   N)__name__
__module____qualname____doc__strr   r   intr   r   r   r   r!   r   r   r   r   r      s         S 3    C  c    S  SV gj    E    3 s SE    c # u      r   r   N)watcherr   casbin.modelr   r   r   r   r   <module>r*      s_               - - - - - - - - - -r   