Changeset View
Changeset View
Standalone View
Standalone View
src/applications/nuance/storage/NuanceItem.php
| Show All 20 Lines | final class NuanceItem | ||||
| protected $itemKey; | protected $itemKey; | ||||
| protected $itemContainerKey; | protected $itemContainerKey; | ||||
| protected $data = array(); | protected $data = array(); | ||||
| protected $mailKey; | protected $mailKey; | ||||
| private $source = self::ATTACHABLE; | private $source = self::ATTACHABLE; | ||||
| private $implementation = self::ATTACHABLE; | private $implementation = self::ATTACHABLE; | ||||
| public static function initializeNewItem() { | public static function initializeNewItem($item_type) { | ||||
| // TODO: Validate that the type is valid, and construct and attach it. | |||||
| return id(new NuanceItem()) | return id(new NuanceItem()) | ||||
| ->setItemType($item_type) | |||||
| ->setStatus(self::STATUS_OPEN); | ->setStatus(self::STATUS_OPEN); | ||||
| } | } | ||||
| protected function getConfiguration() { | protected function getConfiguration() { | ||||
| return array( | return array( | ||||
| self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
| self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
| 'data' => self::SERIALIZATION_JSON, | 'data' => self::SERIALIZATION_JSON, | ||||
| ), | ), | ||||
| self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
| 'ownerPHID' => 'phid?', | 'ownerPHID' => 'phid?', | ||||
| 'requestorPHID' => 'phid?', | 'requestorPHID' => 'phid?', | ||||
| 'queuePHID' => 'phid?', | 'queuePHID' => 'phid?', | ||||
| 'itemType' => 'text64', | 'itemType' => 'text64', | ||||
| 'itemKey' => 'text64', | 'itemKey' => 'text64?', | ||||
| 'itemContainerKey' => 'text64?', | 'itemContainerKey' => 'text64?', | ||||
| 'status' => 'text32', | 'status' => 'text32', | ||||
| 'mailKey' => 'bytes20', | 'mailKey' => 'bytes20', | ||||
| ), | ), | ||||
| self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
| 'key_source' => array( | 'key_source' => array( | ||||
| 'columns' => array('sourcePHID', 'status'), | 'columns' => array('sourcePHID', 'status'), | ||||
| ), | ), | ||||
| ▲ Show 20 Lines • Show All 144 Lines • Show Last 20 Lines | |||||