Sets the object state $stateId to content with $contentId ID.

@param mixed $contentId
@param mixed $groupId
@param mixed $stateId
779080
public function setContentState($contentId, $groupId, $stateId)
    {
        try {
            return $this->innerGateway->setContentState($contentId, $groupId, $stateId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
156468
private function isUserContent($contentId)
    {
        try {
            $this->repository->getUserService()->loadUser($contentId);

            return true;
        } catch (NotFoundException $e) {
            return false;
        }
    }
132382
public function setEntryState($entryId, $state)
    {
        /** @var SimpleWorkflowEntry $theEntry */
        $theEntry = $this->findEntry($entryId);
        $theEntry->setState($state);
    }
277594
public function assignSectionToContent($sectionId, $contentId)
    {
        try {
            return $this->innerGateway->assignSectionToContent($sectionId, $contentId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
105325
public function deleteGroup($groupId)
    {
        $uri  = self::APPS_BASE_FEED_URI . self::APPS_GROUP_PATH . '/';
        $uri .= $this->getDomain() . '/' . $groupId;

        $this->delete($uri);
    }
413454
public void putRolloutGroupStatus(final Long groupId, final List<TotalTargetCountActionStatus> status) {
        final Cache cache = cacheManager.getCache(CACHE_GR_NAME);
        putIntoCache(groupId, status, cache);
    }
1253109
public function removeRawContent($contentId)
    {
        $this->locationGateway->removeElementFromTrash(
            $this->loadContentInfo($contentId)->mainLocationId
        );

        foreach ($this->listVersions($contentId) as $versionInfo) {
            $this->fieldHandler->deleteFields($contentId, $versionInfo);
        }
        // Must be called before deleteRelations()
        $this->contentGateway->removeReverseFieldRelations($contentId);
        $this->contentGateway->deleteRelations($contentId);
        $this->contentGateway->deleteVersions($contentId);
        $this->contentGateway->deleteNames($contentId);
        $this->contentGateway->deleteContent($contentId);
    }
407986
public function delete($stateId)
    {
        // Get the object state first as we need group ID
        // to reorder the priorities and reassign content to another state in the group
        $objectState = $this->load($stateId);

        $this->objectStateGateway->deleteObjectState($objectState->id);

        $remainingStates = $this->loadObjectStates($objectState->groupId);
        if (empty($remainingStates)) {
            // If there are no more states in the group, just remove the state links
            $this->objectStateGateway->deleteObjectStateLinks($objectState->id);

            return;
        }

        $priority = 0;
        foreach ($remainingStates as $remainingState) {
            $this->objectStateGateway->updateObjectStatePriority($remainingState->id, $priority);
            ++$priority;
        }

        $remainingStates = $this->loadObjectStates($objectState->groupId);
        $this->objectStateGateway->updateObjectStateLinks($objectState->id, current($remainingStates)->id);
    }
272101
protected function getObjectStateIds($contentId)
    {
        $objectStateIds = array();

        foreach ($this->objectStateHandler->loadAllGroups() as $objectStateGroup) {
            $objectStateIds[] = $this->objectStateHandler->getContentState(
                $contentId,
                $objectStateGroup->id
            )->id;
        }

        return $objectStateIds;
    }
37979
public function load($stateId)
    {
        $data = $this->objectStateGateway->loadObjectStateData($stateId);

        if (empty($data)) {
            throw new NotFoundException('ObjectState', $stateId);
        }

        return $this->objectStateMapper->createObjectStateFromData($data);
    }
776584
public function loadObjectStateData($stateId)
    {
        try {
            return $this->innerGateway->loadObjectStateData($stateId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
757956
public function setStartState($stateId)
    {
        $state = $this->stateMachine->getState(StateMachine::STATE_INITIAL);
        if ($state === null) {
            $state = new InitialState(StateMachine::STATE_INITIAL);
            $this->stateMachine->addState($state);
        }

        $this->addTransition(StateMachine::STATE_INITIAL, $stateId, StateMachine::EVENT_START);
    }
578438
public function getContentCount($stateId)
    {
        $query = $this->dbHandler->createSelectQuery();
        $query->select(
            $query->alias($query->expr->count('*'), 'count')
        )->from(
            $this->dbHandler->quoteTable('ezcobj_state_link')
        )->where(
            $query->expr->eq(
                $this->dbHandler->quoteColumn('contentobject_state_id'),
                $query->bindValue($stateId, null, \PDO::PARAM_INT)
            )
        );

        $statement = $query->prepare();
        $statement->execute();

        $count = $statement->fetchColumn();

        return $count !== null ? (int)$count : 0;
    }
226198
public function loadObjectStateDataForContent($contentId, $stateGroupId)
    {
        try {
            return $this->innerGateway->loadObjectStateDataForContent($contentId, $stateGroupId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
1189043
protected function _addLanguage( MW_Container_Content_Interface $contentItem, $langid, array $ids )
	{
		$manager = MShop_Catalog_Manager_Factory::createManager( $this->_getContext() );

		foreach( $ids as $id )
		{
			foreach( $this->_getNodeList( $manager->getTree( $id, array('text') ) ) as $item ) {
				$this->_addItem( $contentItem, $item, $langid );
			}
		}
	}
977443
public function changeGroup ($userOpenID, $groupID)
    {
        $failed = $this->changeAllGroups([$userOpenID], $groupID);

        if (count($failed) <= 0) {
            return true;
        }

        return false;
    }
268785
public function deleteObjectState($stateId)
    {
        try {
            return $this->innerGateway->deleteObjectState($stateId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }