class documentation

class ZMSIndex(ZMSItem.ZMSItem): (source)

Constructor: ZMSIndex()

Implements interfaces: Products.zms.IZMSConfigurationProvider.IZMSConfigurationProvider

View In Hierarchy

Catalog-backed index manager for ZMS content trees.

Method __init__ Initialize the singleton index object.
Method catalog_object Catalog a single object after duplicate-uid checks.
Method doi Resolve DOI-style short URLs via the catalog and redirect to the target.
Method duplicate_object Detect duplicate uids and optionally regenerate them.
Method get_catalog Return the site catalog, creating or recreating it when needed.
Method get_index_names Return configured catalog field names.
Method get_log Filter collected log lines by the requested log level.
Method initialize Ensure the catalog exists and build its initial index entries.
Method manage_options Undocumented
Method manage_reindex Rebuild catalog entries for the requested site roots.
Method manage_resync Rewrite stored inline references and URL fields to current targets.
Method manage_sub_options Undocumented
Method manage_test Compare catalog contents with the live content tree.
Method ObjectAdded Catalog a newly added object and its descendants.
Method ObjectImported Refresh the catalog after an object import operation.
Method ObjectMoved Re-catalog a moved object tree under its new path.
Method ObjectRemoved Remove a deleted object tree from the catalog.
Method uncatalog_object Remove a single object from the catalog by its path.
Class Variable catalog_id Undocumented
Class Variable manage_main Undocumented
Class Variable manage_options_default_action Undocumented
Class Variable meta_type Undocumented
Class Variable zmi_icon Undocumented
Instance Variable id Undocumented
def __init__(self): (source)

Initialize the singleton index object.

def catalog_object(self, catalog, node, regenerate_duplicates=False): (source)

Catalog a single object after duplicate-uid checks.

Parameters
catalog:Products.ZCatalog.ZCatalog.ZCatalogActive catalog.
node:OFS.SimpleItem.ItemObject being cataloged.
regenerate_duplicates:boolRegenerate duplicate uids when possible.
Returns
tupleDuplicate flag and regenerate flag.
def doi(self): (source)

Resolve DOI-style short URLs via the catalog and redirect to the target.

Configure the catalog to index attr_dc_identifier_doi on document nodes to enable redirects such as /doi/faq or /doi/10.1109/5.771073.

Returns
objectRedirect response payload or a not-found message.
def duplicate_object(self, catalog, node, regenerate_duplicates=False): (source)

Detect duplicate uids and optionally regenerate them.

Parameters
catalog:Products.ZCatalog.ZCatalog.ZCatalogActive catalog.
node:OFS.SimpleItem.ItemObject being cataloged.
regenerate_duplicates:boolRegenerate duplicate uids when possible.
Returns
tupleDuplicate flag and regenerate flag.
def get_catalog(self, recreate=False): (source)

Return the site catalog, creating or recreating it when needed.

Parameters
recreate:boolDrop and rebuild the catalog first.
Returns
Products.ZCatalog.ZCatalog.ZCatalogCatalog used by the ZMS index.
def get_index_names(self, complete=True): (source)

Return configured catalog field names.

Parameters
complete:boolPrefix names for catalog storage fields.
Returns
listCatalog index names.
def get_log(self, log, request): (source)

Filter collected log lines by the requested log level.

Parameters
log:listAccumulated log lines.
request:ZPublisher.HTTPRequestCurrent request or None.
Returns
strJoined log output.
def initialize(self): (source)

Ensure the catalog exists and build its initial index entries.

def manage_options(self): (source)

Undocumented

def manage_reindex(self, regenerate_all=None, regenerate_duplicates=None, REQUEST=None): (source)

Rebuild catalog entries for the requested site roots.

Parameters
regenerate_all:boolForce a full rebuild for matching roots.
regenerate_duplicates:boolRegenerate duplicate uids during indexing.
REQUEST:ZPublisher.HTTPRequestOptional request overriding the current one.
Returns
strFiltered log output.
def manage_resync(self): (source)

Rewrite stored inline references and URL fields to current targets.

Returns
strFiltered resync log.
def manage_sub_options(self): (source)

Undocumented

def manage_test(self): (source)

Compare catalog contents with the live content tree.

Returns
strFiltered validation log.
def ObjectAdded(self, context): (source)

Catalog a newly added object and its descendants.

Parameters
context:OFS.SimpleItem.ItemAdded object context.
Returns
boolAlways True after cataloging.
def ObjectImported(self, context): (source)

Refresh the catalog after an object import operation.

Parameters
context:OFS.SimpleItem.ItemImported object context.
def ObjectMoved(self, context): (source)

Re-catalog a moved object tree under its new path.

Parameters
context:OFS.SimpleItem.ItemMoved object context.
def ObjectRemoved(self, context): (source)

Remove a deleted object tree from the catalog.

Parameters
context:OFS.SimpleItem.ItemRemoved object context.
def uncatalog_object(self, catalog, node): (source)

Remove a single object from the catalog by its path.

Parameters
catalog:Products.ZCatalog.ZCatalog.ZCatalogActive catalog.
node:OFS.SimpleItem.ItemObject being removed.
catalog_id: str = (source)

Undocumented

manage_main = (source)

Undocumented

manage_options_default_action: str = (source)

Undocumented

meta_type: str = (source)

Undocumented

zmi_icon: str = (source)

Undocumented

Undocumented