Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14449055
D19818.id47370.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D19818.id47370.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1367,6 +1367,7 @@
'HarbormasterBuildableListController' => 'applications/harbormaster/controller/HarbormasterBuildableListController.php',
'HarbormasterBuildablePHIDType' => 'applications/harbormaster/phid/HarbormasterBuildablePHIDType.php',
'HarbormasterBuildableQuery' => 'applications/harbormaster/query/HarbormasterBuildableQuery.php',
+ 'HarbormasterBuildableSearchAPIMethod' => 'applications/harbormaster/conduit/HarbormasterBuildableSearchAPIMethod.php',
'HarbormasterBuildableSearchEngine' => 'applications/harbormaster/query/HarbormasterBuildableSearchEngine.php',
'HarbormasterBuildableStatus' => 'applications/harbormaster/constants/HarbormasterBuildableStatus.php',
'HarbormasterBuildableTransaction' => 'applications/harbormaster/storage/HarbormasterBuildableTransaction.php',
@@ -6845,6 +6846,7 @@
'PhabricatorApplicationTransactionInterface',
'PhabricatorPolicyInterface',
'HarbormasterBuildableInterface',
+ 'PhabricatorConduitResultInterface',
'PhabricatorDestructibleInterface',
),
'HarbormasterBuildableActionController' => 'HarbormasterController',
@@ -6852,6 +6854,7 @@
'HarbormasterBuildableListController' => 'HarbormasterController',
'HarbormasterBuildablePHIDType' => 'PhabricatorPHIDType',
'HarbormasterBuildableQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
+ 'HarbormasterBuildableSearchAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
'HarbormasterBuildableSearchEngine' => 'PhabricatorApplicationSearchEngine',
'HarbormasterBuildableStatus' => 'Phobject',
'HarbormasterBuildableTransaction' => 'PhabricatorApplicationTransaction',
diff --git a/src/applications/harbormaster/conduit/HarbormasterBuildableSearchAPIMethod.php b/src/applications/harbormaster/conduit/HarbormasterBuildableSearchAPIMethod.php
new file mode 100644
--- /dev/null
+++ b/src/applications/harbormaster/conduit/HarbormasterBuildableSearchAPIMethod.php
@@ -0,0 +1,18 @@
+<?php
+
+final class HarbormasterBuildableSearchAPIMethod
+ extends PhabricatorSearchEngineAPIMethod {
+
+ public function getAPIMethodName() {
+ return 'harbormaster.buildable.search';
+ }
+
+ public function newSearchEngine() {
+ return new HarbormasterBuildableSearchEngine();
+ }
+
+ public function getMethodSummary() {
+ return pht('Find out information about buildables.');
+ }
+
+}
diff --git a/src/applications/harbormaster/storage/HarbormasterBuildable.php b/src/applications/harbormaster/storage/HarbormasterBuildable.php
--- a/src/applications/harbormaster/storage/HarbormasterBuildable.php
+++ b/src/applications/harbormaster/storage/HarbormasterBuildable.php
@@ -6,6 +6,7 @@
PhabricatorApplicationTransactionInterface,
PhabricatorPolicyInterface,
HarbormasterBuildableInterface,
+ PhabricatorConduitResultInterface,
PhabricatorDestructibleInterface {
protected $buildablePHID;
@@ -355,6 +356,46 @@
}
+/* -( PhabricatorConduitResultInterface )---------------------------------- */
+
+
+ public function getFieldSpecificationsForConduit() {
+ return array(
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('objectPHID')
+ ->setType('phid')
+ ->setDescription(pht('PHID of the object that is built.')),
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('containerPHID')
+ ->setType('phid')
+ ->setDescription(pht('PHID of the object containing this buildable.')),
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('buildableStatus')
+ ->setType('map<string, wild>')
+ ->setDescription(pht('The current status of this buildable.')),
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('isManual')
+ ->setType('bool')
+ ->setDescription(pht('True if this is a manual buildable.')),
+ );
+ }
+
+ public function getFieldValuesForConduit() {
+ return array(
+ 'objectPHID' => $this->getBuildablePHID(),
+ 'containerPHID' => $this->getContainerPHID(),
+ 'buildableStatus' => array(
+ 'value' => $this->getBuildableStatus(),
+ ),
+ 'isManual' => (bool)$this->getIsManualBuildable(),
+ );
+ }
+
+ public function getConduitSearchAttachments() {
+ return array();
+ }
+
+
/* -( PhabricatorDestructibleInterface )----------------------------------- */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 27, 7:35 PM (2 h, 6 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6933090
Default Alt Text
D19818.id47370.diff (4 KB)
Attached To
Mode
D19818: Add harbormaster.buildable.search API Method
Attached
Detach File
Event Timeline
Log In to Comment