Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15407240
D19337.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D19337.id.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
@@ -88,6 +88,7 @@
'AlmanacNamesTestCase' => 'applications/almanac/util/__tests__/AlmanacNamesTestCase.php',
'AlmanacNamespace' => 'applications/almanac/storage/AlmanacNamespace.php',
'AlmanacNamespaceController' => 'applications/almanac/controller/AlmanacNamespaceController.php',
+ 'AlmanacNamespaceEditConduitAPIMethod' => 'applications/almanac/conduit/AlmanacNamespaceEditConduitAPIMethod.php',
'AlmanacNamespaceEditController' => 'applications/almanac/controller/AlmanacNamespaceEditController.php',
'AlmanacNamespaceEditEngine' => 'applications/almanac/editor/AlmanacNamespaceEditEngine.php',
'AlmanacNamespaceEditor' => 'applications/almanac/editor/AlmanacNamespaceEditor.php',
@@ -96,6 +97,7 @@
'AlmanacNamespaceNameTransaction' => 'applications/almanac/xaction/AlmanacNamespaceNameTransaction.php',
'AlmanacNamespacePHIDType' => 'applications/almanac/phid/AlmanacNamespacePHIDType.php',
'AlmanacNamespaceQuery' => 'applications/almanac/query/AlmanacNamespaceQuery.php',
+ 'AlmanacNamespaceSearchConduitAPIMethod' => 'applications/almanac/conduit/AlmanacNamespaceSearchConduitAPIMethod.php',
'AlmanacNamespaceSearchEngine' => 'applications/almanac/query/AlmanacNamespaceSearchEngine.php',
'AlmanacNamespaceTransaction' => 'applications/almanac/storage/AlmanacNamespaceTransaction.php',
'AlmanacNamespaceTransactionQuery' => 'applications/almanac/query/AlmanacNamespaceTransactionQuery.php',
@@ -5301,8 +5303,10 @@
'AlmanacPropertyInterface',
'PhabricatorDestructibleInterface',
'PhabricatorNgramsInterface',
+ 'PhabricatorConduitResultInterface',
),
'AlmanacNamespaceController' => 'AlmanacController',
+ 'AlmanacNamespaceEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
'AlmanacNamespaceEditController' => 'AlmanacNamespaceController',
'AlmanacNamespaceEditEngine' => 'PhabricatorEditEngine',
'AlmanacNamespaceEditor' => 'AlmanacEditor',
@@ -5311,6 +5315,7 @@
'AlmanacNamespaceNameTransaction' => 'AlmanacNamespaceTransactionType',
'AlmanacNamespacePHIDType' => 'PhabricatorPHIDType',
'AlmanacNamespaceQuery' => 'AlmanacQuery',
+ 'AlmanacNamespaceSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
'AlmanacNamespaceSearchEngine' => 'PhabricatorApplicationSearchEngine',
'AlmanacNamespaceTransaction' => 'AlmanacModularTransaction',
'AlmanacNamespaceTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
diff --git a/src/applications/almanac/conduit/AlmanacNamespaceEditConduitAPIMethod.php b/src/applications/almanac/conduit/AlmanacNamespaceEditConduitAPIMethod.php
new file mode 100644
--- /dev/null
+++ b/src/applications/almanac/conduit/AlmanacNamespaceEditConduitAPIMethod.php
@@ -0,0 +1,19 @@
+<?php
+
+final class AlmanacNamespaceEditConduitAPIMethod
+ extends PhabricatorEditEngineAPIMethod {
+
+ public function getAPIMethodName() {
+ return 'almanac.namespace.edit';
+ }
+
+ public function newEditEngine() {
+ return new AlmanacNamespaceEditEngine();
+ }
+
+ public function getMethodSummary() {
+ return pht(
+ 'Apply transactions to create a new namespace or edit an existing one.');
+ }
+
+}
diff --git a/src/applications/almanac/conduit/AlmanacNamespaceSearchConduitAPIMethod.php b/src/applications/almanac/conduit/AlmanacNamespaceSearchConduitAPIMethod.php
new file mode 100644
--- /dev/null
+++ b/src/applications/almanac/conduit/AlmanacNamespaceSearchConduitAPIMethod.php
@@ -0,0 +1,18 @@
+<?php
+
+final class AlmanacNamespaceSearchConduitAPIMethod
+ extends PhabricatorSearchEngineAPIMethod {
+
+ public function getAPIMethodName() {
+ return 'almanac.namespace.search';
+ }
+
+ public function newSearchEngine() {
+ return new AlmanacNamespaceSearchEngine();
+ }
+
+ public function getMethodSummary() {
+ return pht('Read information about Almanac namespaces.');
+ }
+
+}
diff --git a/src/applications/almanac/storage/AlmanacNamespace.php b/src/applications/almanac/storage/AlmanacNamespace.php
--- a/src/applications/almanac/storage/AlmanacNamespace.php
+++ b/src/applications/almanac/storage/AlmanacNamespace.php
@@ -8,7 +8,8 @@
PhabricatorProjectInterface,
AlmanacPropertyInterface,
PhabricatorDestructibleInterface,
- PhabricatorNgramsInterface {
+ PhabricatorNgramsInterface,
+ PhabricatorConduitResultInterface {
protected $name;
protected $nameIndex;
@@ -224,4 +225,28 @@
);
}
+
+/* -( PhabricatorConduitResultInterface )---------------------------------- */
+
+
+ public function getFieldSpecificationsForConduit() {
+ return array(
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('name')
+ ->setType('string')
+ ->setDescription(pht('The name of the namespace.')),
+ );
+ }
+
+ public function getFieldValuesForConduit() {
+ return array(
+ 'name' => $this->getName(),
+ );
+ }
+
+ public function getConduitSearchAttachments() {
+ return array();
+ }
+
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 19, 4:28 PM (9 h, 3 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7683415
Default Alt Text
D19337.id.diff (5 KB)
Attached To
Mode
D19337: Add "almanac.namespace.edit" and "almanac.namespace.search" API methods
Attached
Detach File
Event Timeline
Log In to Comment