Skip to content

Commit

Permalink
Merge pull request #291 from nextcloud/richDocumentsProductName
Browse files Browse the repository at this point in the history
Add product name to rich documents
  • Loading branch information
AndyScherzinger authored May 9, 2019
2 parents c7c34b1 + 2149b2d commit b15a976
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public class GetRemoteCapabilitiesOperation extends RemoteOperation {
private static final String NODE_OPTIONAL_MIMETYPES = "mimetypesNoDefaultOpen";
private static final String NODE_RICHDOCUMENTS_DIRECT_EDITING = "direct_editing";
private static final String NODE_RICHDOCUMENTS_TEMPLATES = "templates";
private static final String NODE_RICHDOCUMENTS_PRODUCT_NAME = "productName";

// activity
private static final String NODE_ACTIVITY = "activity";
Expand Down Expand Up @@ -450,6 +451,11 @@ protected RemoteOperationResult run(OwnCloudClient client) {
} else {
capability.setRichDocumentsTemplatesAvailable(CapabilityBooleanType.FALSE);
}

if (richDocumentsCapability.has(NODE_RICHDOCUMENTS_PRODUCT_NAME)) {
capability.setRichDocumentsProductName(
richDocumentsCapability.getString(NODE_RICHDOCUMENTS_PRODUCT_NAME));
}
} else {
capability.setRichDocuments(CapabilityBooleanType.FALSE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public class OCCapability {
private CapabilityBooleanType richDocumentsTemplatesAvailable;
private List<String> richDocumentsMimeTypeList;
private List<String> richDocumentsOptionalMimeTypeList;
private String richDocumentsProductName;

private CapabilityBooleanType activity;

Expand Down Expand Up @@ -154,6 +155,7 @@ public OCCapability() {
richDocumentsOptionalMimeTypeList = new ArrayList<>();
richDocumentsDirectEditing = CapabilityBooleanType.FALSE;
richDocumentsTemplatesAvailable = CapabilityBooleanType.FALSE;
richDocumentsProductName = "Collabora Online";
}

public OwnCloudVersion getVersion() {
Expand Down

0 comments on commit b15a976

Please sign in to comment.