Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14033965
D16593.id39944.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D16593.id39944.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
@@ -937,6 +937,7 @@
'DrydockBlueprintNameNgrams' => 'applications/drydock/storage/DrydockBlueprintNameNgrams.php',
'DrydockBlueprintPHIDType' => 'applications/drydock/phid/DrydockBlueprintPHIDType.php',
'DrydockBlueprintQuery' => 'applications/drydock/query/DrydockBlueprintQuery.php',
+ 'DrydockBlueprintSearchConduitAPIMethod' => 'applications/drydock/conduit/DrydockBlueprintSearchConduitAPIMethod.php',
'DrydockBlueprintSearchEngine' => 'applications/drydock/query/DrydockBlueprintSearchEngine.php',
'DrydockBlueprintTransaction' => 'applications/drydock/storage/DrydockBlueprintTransaction.php',
'DrydockBlueprintTransactionQuery' => 'applications/drydock/query/DrydockBlueprintTransactionQuery.php',
@@ -5460,6 +5461,7 @@
'PhabricatorCustomFieldInterface',
'PhabricatorNgramsInterface',
'PhabricatorProjectInterface',
+ 'PhabricatorConduitResultInterface',
),
'DrydockBlueprintController' => 'DrydockController',
'DrydockBlueprintCoreCustomField' => array(
@@ -5478,6 +5480,7 @@
'DrydockBlueprintNameNgrams' => 'PhabricatorSearchNgrams',
'DrydockBlueprintPHIDType' => 'PhabricatorPHIDType',
'DrydockBlueprintQuery' => 'DrydockQuery',
+ 'DrydockBlueprintSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
'DrydockBlueprintSearchEngine' => 'PhabricatorApplicationSearchEngine',
'DrydockBlueprintTransaction' => 'PhabricatorApplicationTransaction',
'DrydockBlueprintTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
diff --git a/src/applications/drydock/conduit/DrydockBlueprintSearchConduitAPIMethod.php b/src/applications/drydock/conduit/DrydockBlueprintSearchConduitAPIMethod.php
new file mode 100644
--- /dev/null
+++ b/src/applications/drydock/conduit/DrydockBlueprintSearchConduitAPIMethod.php
@@ -0,0 +1,18 @@
+<?php
+
+final class DrydockBlueprintSearchConduitAPIMethod
+ extends PhabricatorSearchEngineAPIMethod {
+
+ public function getAPIMethodName() {
+ return 'drydock.blueprint.search';
+ }
+
+ public function newSearchEngine() {
+ return new DrydockBlueprintSearchEngine();
+ }
+
+ public function getMethodSummary() {
+ return pht('Retrieve information about Drydock blueprints.');
+ }
+
+}
diff --git a/src/applications/drydock/storage/DrydockBlueprint.php b/src/applications/drydock/storage/DrydockBlueprint.php
--- a/src/applications/drydock/storage/DrydockBlueprint.php
+++ b/src/applications/drydock/storage/DrydockBlueprint.php
@@ -10,7 +10,8 @@
PhabricatorPolicyInterface,
PhabricatorCustomFieldInterface,
PhabricatorNgramsInterface,
- PhabricatorProjectInterface {
+ PhabricatorProjectInterface,
+ PhabricatorConduitResultInterface {
protected $className;
protected $blueprintName;
@@ -360,4 +361,38 @@
);
}
+
+/* -( PhabricatorConduitResultInterface )---------------------------------- */
+
+
+ public function getFieldSpecificationsForConduit() {
+ return array(
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('name')
+ ->setType('string')
+ ->setDescription(pht('The name of this blueprint.')),
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('type')
+ ->setType('string')
+ ->setDescription(pht('The type of resource this blueprint provides.')),
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('class')
+ ->setType('string')
+ ->setDescription(pht('The implementation class for this blueprint.')),
+ );
+ }
+
+ public function getFieldValuesForConduit() {
+ return array(
+ 'name' => $this->getBlueprintName(),
+ 'type' => $this->getImplementation()->getType(),
+ 'class' => $this->getClassName(),
+ );
+ }
+
+ public function getConduitSearchAttachments() {
+ return array(
+ );
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 10, 9:04 PM (1 w, 15 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6745056
Default Alt Text
D16593.id39944.diff (3 KB)
Attached To
Mode
D16593: Expose Drydock blueprints via Conduit
Attached
Detach File
Event Timeline
Log In to Comment