Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.0.0 #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.0.0] 2020-02-07

### Changed
* Support Java 11 for Alfresco 6.x (replace depricated javex.annotation.Resource to org.springframework.beans.factory.annotation).
* Editor config and view parameters.

### Fixed
* Can't find amp-plagin location
* Don't generat correct project.version
* Don't switch editor languages.
* Show all users as Anonymous.

## [1.4.1] 2018-10-11

### Fixed
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This Share plugin enables users to edit and preview Office documents within ONLYOFFICE from Alfresco Share. This will create a new **Edit in ONLYOFFICE** action within the document library for Office documents. This allows multiple users to collaborate in real time and to save back those changes to Alfresco.

Tested with Enterprise 5.0.\*, 5.1.\*, 5.2.\* and Community 5.1.\*, 5.2.\*
Version 2.0.0 tested only with Community 6.1 (java 11)

## Features

Expand Down
10 changes: 8 additions & 2 deletions repo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ allprojects {
ext {
alfresco = [:]
alfresco.version = "5.2.f"

}

ByteArrayOutputStream byteOut = new ByteArrayOutputStream()
project.exec {
commandLine = "git describe --tags".split(" ")
standardOutput = byteOut
}
project.version = byteOut.toString().trim()
project.description = "ONLYOFFICE Integration for Alfresco"
version = "git describe --tags".execute().text.trim()

repositories {
mavenCentral()
Expand All @@ -42,6 +46,8 @@ configurations {
}

dependencies {
// https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api
compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'

compile "org.alfresco:alfresco-repository:${alfresco.version}"
compile ('com.monitorjbl:xlsx-streamer:1.0.2') { transitive = false }
Expand Down
5 changes: 3 additions & 2 deletions repo/src/main/java/com/parashift/onlyoffice/CallBack.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.extensions.webscripts.AbstractWebScript;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.transaction.Status;
import javax.transaction.SystemException;
Expand All @@ -55,7 +55,8 @@ public class CallBack extends AbstractWebScript {
@Autowired
NodeService nodeService;

@Resource(name = "policyBehaviourFilter")
@Autowired
@Qualifier("policyBehaviourFilter")
BehaviourFilter behaviourFilter;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import org.alfresco.service.namespace.QName;
import org.alfresco.util.UrlUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.Serializable;
Expand Down Expand Up @@ -40,7 +40,8 @@ public class OnlyOfficeService {
@Autowired
NodeService nodeService;

@Resource(name = "global-properties")
@Autowired
@Qualifier( "global-properties")
Properties globalProp;

private byte[] token;
Expand Down
5 changes: 3 additions & 2 deletions repo/src/main/java/com/parashift/onlyoffice/Prepare.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.extensions.webscripts.AbstractWebScript;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.io.*;
import java.util.*;

Expand All @@ -48,7 +48,8 @@ public class Prepare extends AbstractWebScript {
@Autowired
ContentService contentService;

@Resource(name = "global-properties")
@Autowired
@Qualifier("global-properties")
Properties globalProp;

Integer docxMaxParagraph;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.extensions.webscripts.AbstractWebScript;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.io.IOException;
import java.io.Serializable;
import java.io.Writer;
Expand All @@ -41,7 +41,8 @@ public class PrepareNoAuth extends AbstractWebScript {
@Autowired
NodeService nodeService;

@Resource(name = "global-properties")
@Autowired
@Qualifier("global-properties")
Properties globalProp;

@Override
Expand Down
7 changes: 6 additions & 1 deletion share/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ allprojects {
targetCompatibility = 1.7
}

ByteArrayOutputStream byteOut = new ByteArrayOutputStream()
project.exec {
commandLine = "git describe --tags".split(" ")
standardOutput = byteOut
}
project.version = byteOut.toString().trim()
project.description = "ONLYOFFICE Integration for Alfresco Share"
version = "git describe --tags".execute().text.trim()

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,20 @@
fileType: translateDocumentType(docType),
key: this.attributes.key,
permissions: {
edit: true
edit: true,
comment: false
}
},
editorConfig: {
mode: "view",
lang: this.attributes.lang,
callbackUrl: this.attributes.callbackUrl,
user: this.attributes.user
user: this.attributes.user,
customization: {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this customisation needed?

zoom: -2,
chat: false,
comments: false
}
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@
},
editorConfig: {
mode: "edit",
lang: "${lang}",
callbackUrl: "${callbackUrl}",
user: {
id: "${userId}",
firstname: "${firstName}",
lastname: "${lastName}"
lastname: "${lastName}",
name: "${firstName} ${lastName}"
}
},
events: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ if (model.widgets)
pObj.user = {
userId: user.id,
firstName: user.firstName,
lastName: user.lastName
lastName: user.lastName,
name: user.firstName + " " + user.lastName
}

widget.options.pluginConditions = jsonUtils.toJSONString([{
Expand Down