@@ -5,7 +5,8 @@ final class PhabricatorRepositoryURI
5
5
implements
6
6
PhabricatorApplicationTransactionInterface,
7
7
PhabricatorPolicyInterface,
8
- PhabricatorExtendedPolicyInterface {
8
+ PhabricatorExtendedPolicyInterface,
9
+ PhabricatorConduitResultInterface {
9
10
10
11
protected $ repositoryPHID ;
11
12
protected $ uri ;
@@ -512,4 +513,87 @@ public function getExtendedPolicy($capability, PhabricatorUser $viewer) {
512
513
return $ extended ;
513
514
}
514
515
516
+
517
+ /* -( PhabricatorConduitResultInterface )---------------------------------- */
518
+
519
+
520
+ public function getFieldSpecificationsForConduit () {
521
+ return array (
522
+ id (new PhabricatorConduitSearchFieldSpecification ())
523
+ ->setKey ('repositoryPHID ' )
524
+ ->setType ('phid ' )
525
+ ->setDescription (pht ('The associated repository PHID. ' )),
526
+ id (new PhabricatorConduitSearchFieldSpecification ())
527
+ ->setKey ('uri ' )
528
+ ->setType ('map<string, string> ' )
529
+ ->setDescription (pht ('The raw and effective URI. ' )),
530
+ id (new PhabricatorConduitSearchFieldSpecification ())
531
+ ->setKey ('io ' )
532
+ ->setType ('map<string, const> ' )
533
+ ->setDescription (
534
+ pht ('The raw, default, and effective I/O Type settings. ' )),
535
+ id (new PhabricatorConduitSearchFieldSpecification ())
536
+ ->setKey ('display ' )
537
+ ->setType ('map<string, const> ' )
538
+ ->setDescription (
539
+ pht ('The raw, default, and effective Display Type settings. ' )),
540
+ id (new PhabricatorConduitSearchFieldSpecification ())
541
+ ->setKey ('credentialPHID ' )
542
+ ->setType ('phid? ' )
543
+ ->setDescription (
544
+ pht ('The associated credential PHID, if one exists. ' )),
545
+ id (new PhabricatorConduitSearchFieldSpecification ())
546
+ ->setKey ('disabled ' )
547
+ ->setType ('bool ' )
548
+ ->setDescription (pht ('True if the URI is disabled. ' )),
549
+ id (new PhabricatorConduitSearchFieldSpecification ())
550
+ ->setKey ('builtin ' )
551
+ ->setType ('map<string, string> ' )
552
+ ->setDescription (
553
+ pht ('Information about builtin URIs. ' )),
554
+ id (new PhabricatorConduitSearchFieldSpecification ())
555
+ ->setKey ('dateCreated ' )
556
+ ->setType ('int ' )
557
+ ->setDescription (
558
+ pht ('Epoch timestamp when the object was created. ' )),
559
+ id (new PhabricatorConduitSearchFieldSpecification ())
560
+ ->setKey ('dateModified ' )
561
+ ->setType ('int ' )
562
+ ->setDescription (
563
+ pht ('Epoch timestamp when the object was last updated. ' )),
564
+ );
565
+ }
566
+
567
+ public function getFieldValuesForConduit () {
568
+ return array (
569
+ 'repositoryPHID ' => $ this ->getRepositoryPHID (),
570
+ 'uri ' => array (
571
+ 'raw ' => $ this ->getURI (),
572
+ 'effective ' => (string )$ this ->getDisplayURI (),
573
+ ),
574
+ 'io ' => array (
575
+ 'raw ' => $ this ->getIOType (),
576
+ 'default ' => $ this ->getDefaultIOType (),
577
+ 'effective ' => $ this ->getEffectiveIOType (),
578
+ ),
579
+ 'display ' => array (
580
+ 'raw ' => $ this ->getDisplayType (),
581
+ 'default ' => $ this ->getDefaultDisplayType (),
582
+ 'effective ' => $ this ->getEffectiveDisplayType (),
583
+ ),
584
+ 'credentialPHID ' => $ this ->getCredentialPHID (),
585
+ 'disabled ' => (bool )$ this ->getIsDisabled (),
586
+ 'builtin ' => array (
587
+ 'protocol ' => $ this ->getBuiltinProtocol (),
588
+ 'identifier ' => $ this ->getBuiltinIdentifier (),
589
+ ),
590
+ 'dateCreated ' => $ this ->getDateCreated (),
591
+ 'dateModified ' => $ this ->getDateModified (),
592
+ );
593
+ }
594
+
595
+ public function getConduitSearchAttachments () {
596
+ return array ();
597
+ }
598
+
515
599
}
0 commit comments