Handle initialization for objectData

@param ObjectDataInterface $objectData
429932
private function initializeObjectData(ObjectDataInterface $objectData)
    {
        // handle properties
        if ($objectData->getProperties() !== null) {
            $this->initializeObjectDataProperties($objectData->getProperties());
        }

        // handle allowable actions
        if ($objectData->getAllowableActions() !== null) {
            $this->allowableActions = $objectData->getAllowableActions();
            $this->extensions[(string) ExtensionLevel::cast(
                ExtensionLevel::ALLOWABLE_ACTIONS
            )] = $objectData->getAllowableActions()->getExtensions();
        }

        // handle renditions
        foreach ($objectData->getRenditions() as $rendition) {
            $this->renditions[] = $this->getObjectFactory()->convertRendition($this->getId(), $rendition);
        }

        // handle ACL
        if ($objectData->getAcl() !== null) {
            $this->acl = $objectData->getAcl();
            $this->extensions[(string) ExtensionLevel::cast(ExtensionLevel::ACL)] = $objectData->getAcl(
            )->getExtensions();
        }

        // handle policies
        if ($objectData->getPolicyIds() !== null) {
            $this->initializeObjectDataPolicies($objectData->getPolicyIds());
        }

        // handle relationships
        foreach ($objectData->getRelationships() as $relationshipData) {
            $relationship = $this->getObjectFactory()->convertObject(
                $relationshipData,
                $this->getCreationContext()
            );
            if ($relationship instanceof RelationshipInterface) {
                $this->relationships[] = $relationship;
            }
        }

        $this->extensions[(string) ExtensionLevel::OBJECT] = $objectData->getExtensions();
    }
239889
protected function set_customdata($customdata) {
        // Always include the courseid (because is not stored in the notifications or messages table).
        if (!empty($this->courseid) && (is_object($customdata) || is_array($customdata))) {
            $customdata = (array) $customdata;
            $customdata['courseid'] = $this->courseid;
        }
        $this->customdata = json_encode($customdata);
    }
143795
public function load(string $objectName): void
    {
        // only Froq! stuff
        if (0 !== strpos($objectName, self::NAMESPACE)) {
            return;
        }

        $objectFile = $this->getObjectFile($objectName);

        if ($objectFile == null) {
            throw new \RuntimeException("Could not specify object file '{$objectName}'");
        }

        if (!file_exists($objectFile)) {
            throw new \RuntimeException("Could not find object file '{$objectFile}'");
        }

        require $objectFile;
    }
482317
private function openConnection(\stdClass $initData)
    {
        $connectionOptions = $this->parseConnectionData($initData);
        if (isset($this->persistent) && (boolean) $this->persistent) {
            $this->persistentConnect($connectionOptions);
        } else {
            $this->notPersistentConnect($connectionOptions);
        }
    }
1096991
protected function initData()
    {
        parent::initData();
        array_walk($this->_data, function (&$indexConfigData, $indexName) {
            $indexConfigData = $this->initIndexConfig($indexName, $indexConfigData);
        });
    }
459270
public synchronized void initialize(ContainerConfig configData) throws CSIException {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d532639.2

        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "initialize");

        if (initialized) {
            throw new CSIException("already initialized");
        }

        this.containerExtFactory = configData.getContainerExtensionFactory(); // 125942
        this.ivEJBRuntime = configData.getEJBRuntime(); // F743-12528
        classLoader = configData.getClassLoader();
        if (classLoader == null)
            classLoader = this.getClass().getClassLoader(); // 92886
        this.ivName = configData.getContainerName();
        this.persisterFactory = configData.getPersisterFactory();
        EJSContainer.sessionKeyFactory = configData.getSessionKeyFactory();
        this.sessionHandleFactory = configData.getStatefulSessionHandleFactory();//86203
        this.ivSecurityCollaborator = configData.getSecurityCollaborator();

        this.uowCtrl = configData.getUOWControl();
        this.userTransactionImpl = uowCtrl.getUserTransaction();
        this.ivUOWManager = UOWManagerFactory.getUOWManager(); // LI4548-11
        this.ivAfterActivationCollaborators = configData.getAfterActivationCollaborators();
        this.ivBeforeActivationCollaborators = configData.getBeforeActivationCollaborators();
        this.ivBeforeActivationAfterCompletionCollaborators = configData.getBeforeActivationAfterCompletionCollaborators();//92702
        j2eeNameFactory = configData.getJ2EENameFactory();//89554
        this.pmiFactory = configData.getPmiBeanFactory();//86523.3
        this.ivObjectCopier = configData.getObjectCopier(); // RTC102299
        this.orbUtils = configData.getOrbUtils();//87918.11
        this.ivEntityHelper = configData.getEntityHelper();
        this.ivSFSBFailoverEnabled = configData.isEnabledSFSBFailover(); //LIDB2018-1
        this.ivSfFailoverCache = configData.getStatefulFailoverCache(); //LIDB2018-1
        this.passivator = configData.getStatefulPassivator(); // F87439
        this.ivStatefulBeanEnqDeq = configData.getStatefulBeanEnqDeq(); // d646413.2
        this.ivDispatchEventListenerManager = configData.getDispatchEventListenerManager(); // d646413.2

        //-------------------------------------------------
        // FIX ME: make cache size parameters configurable
        //-------------------------------------------------

        poolManager = configData.getPoolManager();//87918.7
        activator = new Activator(this, configData.getEJBCache(), configData.getPassivationPolicy(), passivator, ivSfFailoverCache); //LIDB2018-1
        homeOfHomes = new HomeOfHomes(this, activator);
        int uncached = Activator.UNCACHED_ACTIVATION_STRATEGY;
        ActivationStrategy as = activator.getActivationStrategy(uncached);
        homeOfHomes.setActivationStrategy(as);

        wrapperManager = configData.getWrapperManager();

        // Register an instance of RunUnderUOWCallback with the UOWManager,
        // so the EJB Container is notified when a 'user' (like Spring)
        // initiates a transaction.                                      LI4548-11
        ivUOWManager.registerRunUnderUOWCallback(new RunUnderUOWCallback());

        initialized = true;
        defaultContainer = this; // f111627.1

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "initialize");
    }
1184299
public function setDescription($objectData, $customData = [])
    {
        $this->set('description', $customData['description']);
        // Custom description
        if(isset($customData['description'])) {
            $this->set('description', $customData['description']);
        }else{
            // Avoid duplicate meta tags
            if(!$this->metaExists('description') && isset($objectData->description)) {
                $this->set('description', $objectData->description);
            }
        }

        return $this;
    }
1122260
protected function initialize()
    {
        if (!is_array($this->queryResult)) {
            $this->queryResult = $this->dataMapper->mapToObjects($this->persistenceManager->getObjectDataByQuery($this->query));
        }
    }
1216108
public function init(\stdClass $initData = null)
    {
        if ($initData === null) {
            $this->connection->connect();
        } else {
            $this->openConnection($initData);
        }
    }
749488
public function storeObjectAttribute($objectAttribute)
    {
        $value = $this->storage->storeFieldData($objectAttribute, $objectAttribute->content());

        $objectAttribute->setAttribute(self::RICH_TEXT_FIELD, (string)$value);
    }
1331957
function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion != false )
        {
            $xmlText = eZXMLTextType::rawXMLText( $originalContentObjectAttribute );
            $contentObjectAttribute->setAttribute( "data_text", $xmlText );
        }
        else
        {
            $parser = new eZXMLInputParser();
            $doc = $parser->createRootNode();
            $xmlText = eZXMLTextType::domString( $doc );
            $contentObjectAttribute->setAttribute( "data_text", $xmlText );
        }
    }
1153384
private function load($objectName, $datas)
	{
		if(!$this->initialized)
		{
			$this->initialize();
			$this->initialized = true;
		}
		$this->bag[$objectName] = $this->doLoad(isset($datas) ? $datas : $objectName);
	}
984011
protected function _initialize(ObjectConfig $config)
    {
        $config->append(array(
            'priority'   => self::PRIORITY_HIGH,
            'secret'     => '',
            'max_age'    => 900,
            'check_user'   => true,
            'check_age'    => true,
            'check_expire' => true,
        ));

        parent::_initialize($config);
    }
603920
protected function initData()
    {
        if ($this->data !== null) {
            return;
        }

        if ($this->value !== null) {
            $this->data = $this->value;
            return;
        }

        if ($this->model instanceof Model) {
            $data = ($this->model->hasProperty($this->attribute) || isset($this->model->{$this->attribute}))
                ? ArrayHelper::getValue($this->model, $this->attribute, [])
                : [];

            if (!is_array($data) && empty($data)) {
                return;
            }

            if (!($data instanceof \Traversable)) {
                $data = (array) $data;
            }

            foreach ($data as $index => $value) {
                $this->data[$index] = $value;
            }
        }
    }
440806
protected function init() {
        $this->data['crud'] = 'd';
        $this->data['edulevel'] = self::LEVEL_OTHER;
        $this->data['objecttable'] = plan::TABLE;
    }
1332060
protected function _initialize(ObjectConfig $config)
    {
        $config->append(array(
            'command_chain'     => 'lib:command.chain',
            'command_handlers'  => array(),
            'priority'          => self::PRIORITY_HIGHEST,
        ));

        parent::_initialize($config);
    }
39767
private function setDataArrayForObjectOrArray($objectOrArray)
    {
        if ($objectOrArray instanceof EntityInterface) {
            $this->getAttributesFromObjectAndSetDataArray($objectOrArray);
        }
        elseif (is_array($objectOrArray)) {
            $this->data[] = $objectOrArray;
        }
    }