File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88namespace OCA \ContextChat \Public ;
99
10- class ContentItem extends \OCP \ContextChat \ContentItem {
10+ if (class_exists (\OCP \ContextChat \ContenItem::class)) {
11+ // Available starting with nc 32
12+ class ContentItem extends \OCP \ContextChat \ContentItem {
13+ }
14+ } else {
15+ class ContentItem {
16+ /**
17+ * @param string $itemId
18+ * @param string $providerId
19+ * @param string $title
20+ * @param string $content
21+ * @param string $documentType
22+ * @param \DateTime $lastModified
23+ * @param string[] $users
24+ */
25+ public function __construct (
26+ public string $ itemId ,
27+ public string $ providerId ,
28+ public string $ title ,
29+ public string $ content ,
30+ public string $ documentType ,
31+ public \DateTime $ lastModified ,
32+ public array $ users ,
33+ ) {
34+ }
35+ }
1136}
Original file line number Diff line number Diff line change 1616use OCA \ContextChat \Service \ActionScheduler ;
1717use OCA \ContextChat \Service \ProviderConfigService ;
1818use OCP \BackgroundJob \IJobList ;
19- use OCP \ContextChat \IContentManager ;
2019use OCP \EventDispatcher \IEventDispatcher ;
2120use OCP \Server ;
2221use Psr \Container \ContainerExceptionInterface ;
2322use Psr \Container \NotFoundExceptionInterface ;
2423
25- class ContentManager implements IContentManager {
24+ if (class_exists (\OCP \ContextChat \IContentManager::class)) {
25+ // Available starting with nc 32
26+ interface IInternalContentManager extends OCP \ContextChat \IContentManager {
27+ }
28+ } else {
29+ interface IInternalContentManager {
30+ }
31+ }
32+
33+ class ContentManager implements IInternalContentManager {
2634 public function __construct (
2735 private IJobList $ jobList ,
2836 private ProviderConfigService $ providerConfig ,
Original file line number Diff line number Diff line change 77
88namespace OCA \ContextChat \Public ;
99
10- /**
11- * @since 1.1.0
12- */
13- interface IContentProvider extends \OCP \ContextChat \IContentProvider {
10+ if (class_exists (\OCP \ContextChat \IContentProvider::class)) {
11+ // Available starting with nc 32
12+ /**
13+ * @since 1.1.0
14+ */
15+ interface IContentProvider extends \OCP \ContextChat \IContentProvider {
16+ }
17+ } else {
18+
19+ /**
20+ * This interface defines methods to implement a content provider
21+ * @since 1.1.0
22+ */
23+ interface IContentProvider {
24+ /**
25+ * The ID of the provider
26+ *
27+ * @return string
28+ * @since 1.1.0
29+ */
30+ public function getId (): string ;
31+
32+ /**
33+ * The ID of the app making the provider avaialble
34+ *
35+ * @return string
36+ * @since 1.1.0
37+ */
38+ public function getAppId (): string ;
39+
40+ /**
41+ * The absolute URL to the content item
42+ *
43+ * @param string $id
44+ * @return string
45+ * @since 1.1.0
46+ */
47+ public function getItemUrl (string $ id ): string ;
48+
49+ /**
50+ * Starts the initial import of content items into content chat
51+ *
52+ * @return void
53+ * @since 1.1.0
54+ */
55+ public function triggerInitialImport (): void ;
56+ }
1457}
Original file line number Diff line number Diff line change 77
88namespace OCA \ContextChat \Public ;
99
10- class UpdateAccessOp extends \OCA \ContextChat \Type \UpdateAccessOp {
10+ if (class_exists (\OCA \ContextChat \Type \UpdateAccessOp::class)) {
11+ // Available starting with nc 32
12+ class UpdateAccessOp extends \OCA \ContextChat \Type \UpdateAccessOp {
13+ }
14+ } else {
15+ class UpdateAccessOp {
16+ public const ALLOW = 'allow ' ;
17+ public const DENY = 'deny ' ;
18+ }
1119}
You can’t perform that action at this time.
0 commit comments