<?php
namespace Claromentis\Documents;

$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"] = (@$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] ?: array()) + array("_a4b4fe29a876bd36f" . "8024f56a625bf4c" => base64_decode("Zm9sZ" . "GVy"), "_8e7f4b5c8440c0a24fb1b" . "632eee28538" => base64_decode("YWN0a" . "W9u"), "_fc4ffcaec4dff19ed04" . "cc1c9229222d1" => base64_decode("ZG9jdW1lbn" . "Q="), "_5989f91aa208834ef93a68a3580e" . "6756" => base64_decode("X2" . "xv" . "Y2" . "Fs"), "_56100f7d6bde4be25" . "e2fa5f816a456b8" => base64_decode("ZnVsbF9" . "0cmVl"), "_ced8580252a2324a5" . "14ada7c68c53339" => base64_decode("cGVybWlzc2lvbnNfdHJlZ" . "Q=="));
use Claromentis\Search\Indexing\IndexingInstruction;
use Claromentis\Search\Indexing\IndexingQueue;
use ERMSObject;




class IndexingUtils
{
    
    
    
    
    
    
    public static function IndexTree($_b15aac3aa29c10ea6d1228f58cb9a7e8)
    {
        
        
        
        IndexingQueue::Reindex($_b15aac3aa29c10ea6d1228f58cb9a7e8->GetSearchType(), $_b15aac3aa29c10ea6d1228f58cb9a7e8 instanceof \ERMSDataObj ? $_b15aac3aa29c10ea6d1228f58cb9a7e8->GetDocID() : $_b15aac3aa29c10ea6d1228f58cb9a7e8->GetId());
        
        
        $_8c5f17e2e918145535955f8a633b6c7b = new IndexingInstruction($GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_a4b4fe29a876" . "bd36f8024f56a" . "625bf4c"], $_b15aac3aa29c10ea6d1228f58cb9a7e8->GetId(), 0, IndexingInstruction::SPECIAL, array($GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_8e7f4b5c" . "8440c0a24" . "fb1b632ee" . "e28538"] => $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_56100f7d6bde4be" . "25e2fa5f816a456b" . "8"]));
        IndexingQueue::AddInstruction($_8c5f17e2e918145535955f8a633b6c7b);
    }
    
    
    
    
    
    
    public static function ReindexPermissionsTree($_b15aac3aa29c10ea6d1228f58cb9a7e8)
    {
        
        
        self::IndexPermissions($_b15aac3aa29c10ea6d1228f58cb9a7e8);
        
        
        if ($_b15aac3aa29c10ea6d1228f58cb9a7e8->IsFilePlan()) {
            $_8c5f17e2e918145535955f8a633b6c7b = new IndexingInstruction(\Claromentis\Search\ItemType\Indexing\Folder::TYPE_NAME, $_b15aac3aa29c10ea6d1228f58cb9a7e8->GetId(), 0, IndexingInstruction::SPECIAL, array($GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_8e7f4b5c84" . "40c0a24fb1b" . "632eee28538"] => $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_ced8580" . "252a2324" . "a514ada7" . "c68c5333" . "9"]));
            IndexingQueue::AddInstruction($_8c5f17e2e918145535955f8a633b6c7b);
        }
    }
    
    
    
    
    
    
    public static function IndexPermissions($_68ffaaa31e3ba49ed9d6159fbee9f043)
    {
        $_8c5f17e2e918145535955f8a633b6c7b = new IndexingInstruction($_68ffaaa31e3ba49ed9d6159fbee9f043->GetSearchType(), $_68ffaaa31e3ba49ed9d6159fbee9f043 instanceof \ERMSDataObj ? $_68ffaaa31e3ba49ed9d6159fbee9f043->GetDocId() : $_68ffaaa31e3ba49ed9d6159fbee9f043->GetId(), \Claromentis\Search\ItemType\Indexing\Document::SUB_PERMS, IndexingInstruction::INDEX, array($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_8e7f4b5c8440c0a24fb1b632eee" . "28538"] => $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_ced8580252a" . "2324a514ada7" . "c68c53339"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_5989f91aa208" . "834ef93a68a35" . "80e6756"] => array($GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_a4b4fe29" . "a876bd36f" . "8024f56a6" . "25bf4c"] => $_68ffaaa31e3ba49ed9d6159fbee9f043, $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_fc4ffcaec4dff19ed0" . "4cc1c9229222d1"] => $_68ffaaa31e3ba49ed9d6159fbee9f043)));
        IndexingQueue::AddInstruction($_8c5f17e2e918145535955f8a633b6c7b);
    }
    
    
    
    
    
    
    
    public static function IndexPermissionsById($aggregation, $object_id)
    {
        $_8c5f17e2e918145535955f8a633b6c7b = new IndexingInstruction(ERMSObject::GetSearchTypeFromAggregation($aggregation), $object_id, \Claromentis\Search\ItemType\Indexing\Document::SUB_PERMS, IndexingInstruction::INDEX);
        IndexingQueue::AddInstruction($_8c5f17e2e918145535955f8a633b6c7b);
    }
}