ProPeler
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
cpanel-ccs
/
txdav
/
common
/
datastore
/
Filename :
sql_external.pyc
back
Copy
� �t�ac @ s d Z d d l m Z d d l m Z m Z m Z d d l m Z d d l m Z m Z m Z d d l m Z m Z d d l m Z d d l m Z m Z d d l m Z e � Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ e e _ d S( s SQL data store. i����( t Logger( t inlineCallbackst returnValuet succeed( t PropertyStore( t CommonHomet CommonHomeChildt CommonObjectResource( t NotificationCollectiont NotificationObjectRecord( t _HOME_STATUS_EXTERNAL( t NonExistentExternalSharet ExternalShareFailed( t ChangeCategoryt CommonHomeExternalc B s e Z d Z e d � � Z d � Z d � Z e d � � Z d � Z d � Z d � Z d � Z d � Z e d d � � Z e d � Z e d � � Z d � Z d � Z e d � � Z d � Z g e d � Z d � Z e j d � Z d � Z d � Z e d � � Z RS( s0 A CommonHome for a user not hosted on this system, but on another pod. This is needed to provide a "reference" to the external user so we can share with them. Actual operations to list child resources, etc are all stubbed out since no data for the user is actually hosted in this store. c C se i | d 6| d 6t d 6} g | j � D] } | j | � ^ q( } | | | � } | j j | _ | S( s� During migration we need to refer to the remote home as an external home but without have a local representation of it in the store. There will be a new local store home for the migrating user that will operate on local store objects. The synthetic home operates only on remote objects. @param diruid: directory UID of user @type diruid: L{str} @param resourceID: resource ID in the remote store @type resourceID: L{int} t _resourceIDt _ownerUIDt _status( R t homeAttributest gett _childClasst _externalClass( t clst transactiont diruidt resourceIDt attrMapt attrt homeDatat result( ( s6 /opt/cpanel-ccs/txdav/common/datastore/sql_external.pyt makeSyntheticExternalHome. s (c C s t t | � j | | � d S( N( t superR t __init__( t selfR R ( ( s6 /opt/cpanel-ccs/txdav/common/datastore/sql_external.pyR D s c C sF x9 | j j j � D]% \ } } | j | | j | � � q Wt | � S( s� External share does not have metadata or properties so we skip those by by-passing the super method, but we do need to add notifiers. ( t _txnt _notifierFactoriest itemst addNotifiert newNotifierR ( R! t factory_typet factory( ( s6 /opt/cpanel-ccs/txdav/common/datastore/sql_external.pyt initFromStoreG s c c s- | j j � j j | � V} | j | � d S( s` Read the home metadata from remote home and save as attributes on this object. N( R"