Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(28)  |  Call(19)  |  Derive(0)  |  Import(9)

src/t/o/tomcom.plonechanges.plonesite-4.3.0.2/tomcom/plonechanges/plonesite/patch.py   tomcom.plonechanges.plonesite(Download)
from Products.Archetypes.utils import shasattr, isFactoryContained
from Products.CMFCore.utils import getToolByName
from Products.Archetypes.config import CATALOGMAP_USES_PORTALTYPE, TOOL_NAME
from Products.CMFPlone.Portal import PloneSite
from Products.Archetypes import config as archetypes_config
from Products.Archetypes.exceptions import ReferenceException
from Products.Archetypes.interfaces import IReferenceable
from Products.Archetypes.utils import shasattr, isFactoryContained,getRelURL
 
from OFS.ObjectManager import BeforeDeleteException
def indexObject(self):
    if isFactoryContained(self):
        return
    catalogs = getCatalogs(self)
    url = '/'.join(self.getPhysicalPath())
def unindexObject(self):
    if isFactoryContained(self):
        return
    catalogs = getCatalogs()
    url = '/'.join(self.getPhysicalPath())

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/CatalogMultiplex.py   Products.Archetypes(Download)
from Products.Archetypes.log import log
from Products.Archetypes.Referenceable import Referenceable
from Products.Archetypes.utils import shasattr, isFactoryContained
 
 
    def indexObject(self):
        if isFactoryContained(self):
            return
        catalogs = self.getCatalogs()
        url = self.__url()
    def unindexObject(self):
        if isFactoryContained(self):
            return
        catalogs = self.getCatalogs()
        url = self.__url()
    def reindexObjectSecurity(self, skip_self=False):
        """update security information in all registered catalogs.
        """
        if isFactoryContained(self):
            return
        if idxs is None:
            idxs = []
        if isFactoryContained(self):
            return
        if idxs == [] and shasattr(self, 'notifyModified'):

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/CatalogMultiplex.py   Products.Archetypes(Download)
from Products.Archetypes.log import log
from Products.Archetypes.Referenceable import Referenceable
from Products.Archetypes.utils import shasattr, isFactoryContained
 
 
    def indexObject(self):
        if isFactoryContained(self):
            return
        catalogs = self.getCatalogs()
        url = self.__url()
    def unindexObject(self):
        if isFactoryContained(self):
            return
        catalogs = self.getCatalogs()
        url = self.__url()
    def reindexObjectSecurity(self, skip_self=False):
        """update security information in all registered catalogs.
        """
        if isFactoryContained(self):
            return
        if idxs is None:
            idxs = []
        if isFactoryContained(self):
            return
        if idxs == [] and shasattr(self, 'notifyModified'):

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/Referenceable.py   Products.Archetypes(Download)
from Products.Archetypes.exceptions import ReferenceException
from Products.Archetypes.interfaces import IReferenceable
from Products.Archetypes.utils import shasattr, isFactoryContained
 
from Acquisition import aq_base, aq_parent, aq_inner
    def manage_afterAdd(self, item, container):
        # Get a UID
        # (Called when the object is created or moved.)
 
        if isFactoryContained(self):
    def _uncatalogUID(self, aq, uc=None):
        if isFactoryContained(self):
            return
        if not uc:
            uc = getToolByName(self, config.UID_CATALOG)
    def _uncatalogRefs(self, aq, uc=None, rc=None):
        if isFactoryContained(self):
            return
        annotations = self._getReferenceAnnotations()
        if annotations:

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/Referenceable.py   Products.Archetypes(Download)
from Products.Archetypes.exceptions import ReferenceException
from Products.Archetypes.interfaces import IReferenceable
from Products.Archetypes.utils import shasattr, isFactoryContained
 
from Acquisition import aq_base, aq_parent, aq_inner
    def manage_afterAdd(self, item, container):
        # Get a UID
        # (Called when the object is created or moved.)
 
        if isFactoryContained(self):
    def _uncatalogUID(self, aq, uc=None):
        if isFactoryContained(self):
            return
        if not uc:
            uc = getToolByName(self, config.UID_CATALOG)
    def _uncatalogRefs(self, aq, uc=None, rc=None):
        if isFactoryContained(self):
            return
        annotations = self._getReferenceAnnotations()
        if annotations:

src/f/t/ftw.permissionmanager-2.1.1/ftw/permissionmanager/patches.py   ftw.permissionmanager(Download)
from Products.Archetypes.utils import isFactoryContained
from Products.CMFCore.utils import getToolByName
from Products.Archetypes.config import TOOL_NAME
from Products.CMFCore.interfaces import ICatalogTool
from Products.Archetypes.log import log
def egov_reindexObjectSecurity(self, skip_self=False):
    if isFactoryContained(self):
        return
    at = getToolByName(self, TOOL_NAME, None)
    if at is None:

src/f/t/ftw.solr-1.3/ftw/solr/patches/reindex.py   ftw.solr(Download)
from Products.Archetypes.config import TOOL_NAME
from Products.Archetypes.utils import isFactoryContained
from Products.CMFCore.interfaces import ICatalogTool
from Products.CMFCore.utils import getToolByName
from collective.indexing.queue import getQueue
def ftw_solr_CatalogMultiplex_reindexObjectSecurity(self, skip_self=False):
    """update security information in all registered catalogs.
    """
    if isFactoryContained(self):
        return

src/c/o/collective.elasticsearch-HEAD/collective/elasticsearch/__init__.py   collective.elasticsearch(Download)
from Acquisition import aq_base
from zope.interface import classImplements
from Products.Archetypes.utils import isFactoryContained
 
from collective.elasticsearch.interfaces import IElasticSearchCatalog
def unindexObject(self):
    if isFactoryContained(self):
        return
    catalogs = self.getCatalogs()
    url = '/'.join(self.getPhysicalPath())