<?php
namespace Claromentis\Documents;

$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] ?: array()) + array("_a4b4fe29a876bd36f8024" . "f56a625bf4c" => base64_decode("Zm9" . "sZG" . "Vy"), "_56100f7d6bde4" . "be25e2fa5f816a" . "456b8" => base64_decode("ZnVsbF" . "90cmVl"), "_5989f91aa208834ef93a68" . "a3580e6756" => base64_decode("X2xvY" . "2Fs"), "_8e7f4b5c8440c0a24fb1" . "b632eee28538" => base64_decode("YW" . "N0" . "aW" . "9u"), "_ced8580252a232" . "4a514ada7c68c53" . "339" => base64_decode("cGVybWlzc" . "2lvbnNfdH" . "JlZQ=="), "_fc4ffcaec4dff19ed04cc1c9" . "229222d1" => base64_decode("ZG9j" . "dW1l" . "bnQ="));
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["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_a4b4fe29a876bd36f8024f56" . "a625bf4c"], $_b15aac3aa29c10ea6d1228f58cb9a7e8->GetId(), 0, IndexingInstruction::SPECIAL, array($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_8e7f4b5c8440c0a" . "24fb1b632eee2853" . "8"] => $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_56100f7d6bde4be25e2fa5f816a4" . "56b8"]));
        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["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_8e7f4b5c8440c0a24fb1b632eee2853" . "8"] => $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_ced8580252a2324a514ada7c68" . "c53339"]));
            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["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_8e7f4b5c8440c0a24fb1b632eee285" . "38"] => $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_ced8580252a2324a514ada7" . "c68c53339"], $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_5989f91aa208834ef93a68a3580e675" . "6"] => array($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_a4b4fe29a876bd36f8024f" . "56a625bf4c"] => $_68ffaaa31e3ba49ed9d6159fbee9f043, $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_fc4ffcae" . "c4dff19ed" . "04cc1c922" . "9222d1"] => $_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);
    }
}