Skip to content

Commit 09cf421

Browse files
wip
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
1 parent 81a517b commit 09cf421

File tree

20 files changed

+106
-56
lines changed

20 files changed

+106
-56
lines changed

library/src/androidTest/java/com/owncloud/android/GetCapabilitiesRemoteOperationIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ private void checkCapability(OCCapability capability, String userId) {
168168
}
169169

170170
@Test
171-
public void testDeclarativeUI() {
171+
public void testClientIntegration() {
172172
// get capabilities
173173
RemoteOperationResult result = new GetCapabilitiesRemoteOperation().execute(nextcloudClient);
174174
assertTrue(result.isSuccess());
175175
assertNotNull(result.getSingleData());
176176

177177
OCCapability capability = (OCCapability) result.getSingleData();
178178

179-
assertEquals(5, capability.getDeclarativeUiEndpoints(Type.CONTEXT_MENU, "").size());
180-
assertEquals(2, capability.getDeclarativeUiEndpoints(Type.CREATE_NEW, "").size());
179+
assertEquals(5, capability.getClientIntegrationEndpoints(Type.CONTEXT_MENU, "").size());
180+
assertEquals(2, capability.getClientIntegrationEndpoints(Type.CREATE_NEW, "").size());
181181
}
182182
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
* Nextcloud Android Library
33
*
4-
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
5-
* SPDX-FileCopyrightText: 2024 Tobias Kaminsky <tobias@kaminsky.me>
4+
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
5+
* SPDX-FileCopyrightText: 2025 Tobias Kaminsky <tobias@kaminsky.me>
66
* SPDX-License-Identifier: MIT
77
*/
88
package com.nextcloud.android.lib.resources.declarativeui
@@ -16,15 +16,15 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult
1616
import com.owncloud.android.lib.common.utils.Log_OC
1717
import com.owncloud.android.lib.ocs.ServerResponse
1818
import com.owncloud.android.lib.resources.OCSRemoteOperation
19-
import com.owncloud.android.lib.resources.declarativeui.DeclarativeUI
20-
import com.owncloud.android.lib.resources.declarativeui.Element
21-
import com.owncloud.android.lib.resources.declarativeui.ElementTypeAdapter
19+
import com.owncloud.android.lib.resources.clientintegration.ClientIntegrationUI
20+
import com.owncloud.android.lib.resources.clientintegration.Element
21+
import com.owncloud.android.lib.resources.clientintegration.ElementTypeAdapter
2222
import org.apache.commons.httpclient.HttpStatus
2323

2424
/**
25-
* Get terms of service of an user
25+
* Get client integration
2626
*/
27-
class GetDeclarativeUiJsonOperation(
27+
class GetClientIntegrationJsonOperation(
2828
val url: String
2929
) : OCSRemoteOperation<JsonArray>() {
3030
@Suppress("TooGenericExceptionCaught")
@@ -60,7 +60,7 @@ class GetDeclarativeUiJsonOperation(
6060
result = RemoteOperationResult(e)
6161
Log_OC.e(
6262
TAG,
63-
"Get terms failed: " + result.logMessage,
63+
"Get client integration failed: " + result.logMessage,
6464
result.exception
6565
)
6666
} finally {
@@ -69,16 +69,16 @@ class GetDeclarativeUiJsonOperation(
6969
return result
7070
}
7171

72-
fun parseResult(response: String): DeclarativeUI {
72+
fun parseResult(response: String): ClientIntegrationUI {
7373
val gson =
7474
GsonBuilder()
7575
.registerTypeHierarchyAdapter(Element::class.java, ElementTypeAdapter())
7676
.create()
7777

78-
return gson.fromJson(response, DeclarativeUI::class.java)
78+
return gson.fromJson(response, ClientIntegrationUI::class.java)
7979
}
8080

8181
companion object {
82-
private val TAG = GetDeclarativeUiJsonOperation::class.java.simpleName
82+
private val TAG = GetClientIntegrationJsonOperation::class.java.simpleName
8383
}
8484
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Nextcloud Android Library
3+
*
4+
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
5+
* SPDX-FileCopyrightText: 2025 Tobias Kaminsky <tobias@kaminsky.me>
6+
* SPDX-License-Identifier: MIT
7+
*/
8+
9+
package com.owncloud.android.lib.resources.clientintegration
10+
11+
import com.google.gson.annotations.SerializedName
12+
13+
data class App(
14+
val version: Double,
15+
@SerializedName("context-menu")
16+
val contextMenu: List<Endpoint>,
17+
@SerializedName("create-new")
18+
val createNew: List<Endpoint>
19+
)

library/src/main/java/com/owncloud/android/lib/resources/declarativeui/Button.kt renamed to library/src/main/java/com/owncloud/android/lib/resources/clientintegration/Button.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: AGPL-3.0-or-later
66
*/
77

8-
package com.owncloud.android.lib.resources.declarativeui
8+
package com.owncloud.android.lib.resources.clientintegration
99

1010
data class Button(
1111
val label: String,

library/src/main/java/com/owncloud/android/lib/resources/declarativeui/DeclarativeUI.kt renamed to library/src/main/java/com/owncloud/android/lib/resources/clientintegration/ClientIntegrationUI.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
* SPDX-License-Identifier: AGPL-3.0-or-later
66
*/
77

8-
package com.owncloud.android.lib.resources.declarativeui
8+
package com.owncloud.android.lib.resources.clientintegration
99

10-
data class DeclarativeUI(
10+
data class ClientIntegrationUI(
1111
val version: Double,
1212
val root: Layout
1313
)

library/src/main/java/com/owncloud/android/lib/resources/declarativeui/Element.kt renamed to library/src/main/java/com/owncloud/android/lib/resources/clientintegration/Element.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
* SPDX-License-Identifier: MIT
66
*/
77

8-
package com.owncloud.android.lib.resources.declarativeui
8+
package com.owncloud.android.lib.resources.clientintegration
99

1010
interface Element
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: AGPL-3.0-or-later
66
*/
77

8-
package com.owncloud.android.lib.resources.declarativeui
8+
package com.owncloud.android.lib.resources.clientintegration
99

1010
import com.google.gson.Gson
1111
import com.google.gson.JsonDeserializationContext

library/src/main/java/com/owncloud/android/lib/resources/declarativeui/Endpoint.kt renamed to library/src/main/java/com/owncloud/android/lib/resources/clientintegration/Endpoint.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: MIT
66
*/
77

8-
package com.owncloud.android.lib.resources.declarativeui
8+
package com.owncloud.android.lib.resources.clientintegration
99

1010
import android.os.Parcelable
1111
import com.google.gson.annotations.SerializedName

library/src/main/java/com/owncloud/android/lib/resources/declarativeui/Image.kt renamed to library/src/main/java/com/owncloud/android/lib/resources/clientintegration/Image.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: AGPL-3.0-or-later
66
*/
77

8-
package com.owncloud.android.lib.resources.declarativeui
8+
package com.owncloud.android.lib.resources.clientintegration
99

1010
data class Image(
1111
val url: String

library/src/main/java/com/owncloud/android/lib/resources/declarativeui/Layout.kt renamed to library/src/main/java/com/owncloud/android/lib/resources/clientintegration/Layout.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: MIT
66
*/
77

8-
package com.owncloud.android.lib.resources.declarativeui
8+
package com.owncloud.android.lib.resources.clientintegration
99

1010
import com.google.gson.annotations.SerializedName
1111

0 commit comments

Comments
 (0)