From 100c5e6f937a571ffadf2f1275a4d8529ea6cc59 Mon Sep 17 00:00:00 2001 From: Mark Rogers Date: Tue, 22 Jul 2014 16:13:06 +0000 Subject: [PATCH] Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud) 76635: Merged EOL2 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 76545: ACE-2016: EOL Google Docs v1 in 5.0 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@77670 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../google-docs-checkin.atomentry.ftl | 14 ---- .../google-docs-checkout.atomentry.ftl | 14 ---- .../repository/googledocs/status.get.desc.xml | 10 --- .../repository/googledocs/status.get.json.ftl | 6 -- .../documentlibrary-v2/evaluator.lib.js | 16 ----- .../documentlibrary/activity.post.json.js | 2 - .../documentlibrary/evaluator.lib.js | 41 ------------ .../web-scripts-application-context.xml | 6 -- .../repo/web/scripts/googledocs/Status.java | 66 ------------------- 9 files changed, 175 deletions(-) delete mode 100644 config/alfresco/templates/activities/org/alfresco/documentlibrary/google-docs-checkin.atomentry.ftl delete mode 100644 config/alfresco/templates/activities/org/alfresco/documentlibrary/google-docs-checkout.atomentry.ftl delete mode 100644 config/alfresco/templates/webscripts/org/alfresco/repository/googledocs/status.get.desc.xml delete mode 100644 config/alfresco/templates/webscripts/org/alfresco/repository/googledocs/status.get.json.ftl delete mode 100644 source/java/org/alfresco/repo/web/scripts/googledocs/Status.java diff --git a/config/alfresco/templates/activities/org/alfresco/documentlibrary/google-docs-checkin.atomentry.ftl b/config/alfresco/templates/activities/org/alfresco/documentlibrary/google-docs-checkin.atomentry.ftl deleted file mode 100644 index 9a1b4e9344..0000000000 --- a/config/alfresco/templates/activities/org/alfresco/documentlibrary/google-docs-checkin.atomentry.ftl +++ /dev/null @@ -1,14 +0,0 @@ -<#include "../slingshot-common.lib.ftl"> - - File checked in from Google Docs: ${htmlTitle?xml} - - http://www.alfresco.org/rss/atom/${id} - ${xmldate(date)} - - - - - ${userName?xml} - ${userId?xml} - - \ No newline at end of file diff --git a/config/alfresco/templates/activities/org/alfresco/documentlibrary/google-docs-checkout.atomentry.ftl b/config/alfresco/templates/activities/org/alfresco/documentlibrary/google-docs-checkout.atomentry.ftl deleted file mode 100644 index 3a95dd4f7a..0000000000 --- a/config/alfresco/templates/activities/org/alfresco/documentlibrary/google-docs-checkout.atomentry.ftl +++ /dev/null @@ -1,14 +0,0 @@ -<#include "../slingshot-common.lib.ftl"> - - File checked out to Google Docs: ${htmlTitle?xml} - - http://www.alfresco.org/rss/atom/${id} - ${xmldate(date)} - - - - - ${userName?xml} - ${userId?xml} - - \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/googledocs/status.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/repository/googledocs/status.get.desc.xml deleted file mode 100644 index 816f862383..0000000000 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/googledocs/status.get.desc.xml +++ /dev/null @@ -1,10 +0,0 @@ - - Get GoogleDocs Integration Status Information - - Get information about the GoogleDocs integration current status. - - /api/googledocs/status - argument - user - required - \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/googledocs/status.get.json.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/googledocs/status.get.json.ftl deleted file mode 100644 index d5debcdfd1..0000000000 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/googledocs/status.get.json.ftl +++ /dev/null @@ -1,6 +0,0 @@ -{ - "data" : - { - "enabled" : ${enabled?string} - } -} \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/evaluator.lib.js b/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/evaluator.lib.js index f87d293018..40437abee8 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/evaluator.lib.js +++ b/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/evaluator.lib.js @@ -70,13 +70,6 @@ var Evaluator = { workingCopy["workingCopyVersion"] = wcNode.properties["cm:versionLabel"]; } - - // Google Doc? - if (node.hasAspect("{http://www.alfresco.org/model/googledocs/1.0}googleResource")) - { - // Property is duplicated here for convenience - workingCopy["googleDocUrl"] = node.properties["gd:url"]; - } } else { @@ -89,15 +82,6 @@ var Evaluator = var srcNode = node.assocs["cm:workingcopylink"][0]; workingCopy["hasWorkingCopy"] = true; workingCopy["workingCopyNodeRef"] = srcNode.nodeRef; - - if (srcNode.hasPermission("Read")) - { - // Google Doc? - if (srcNode.hasAspect("{http://www.alfresco.org/model/googledocs/1.0}googleResource")) - { - workingCopy["googleDocUrl"] = srcNode.properties["gd:url"]; - } - } } } diff --git a/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/activity.post.json.js b/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/activity.post.json.js index 3bf6f0b63b..e2b6b87d00 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/activity.post.json.js +++ b/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/activity.post.json.js @@ -85,8 +85,6 @@ function postActivity() case "file-previewed": case "file-downloaded": case "folder-liked": - case "google-docs-checkout": - case "google-docs-checkin": case "inline-edit": data.title = json.get("fileName"); data.nodeRef = nodeRef; diff --git a/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/evaluator.lib.js b/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/evaluator.lib.js index e8560183b0..2721aa1c28 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/evaluator.lib.js +++ b/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/evaluator.lib.js @@ -175,23 +175,6 @@ var Evaluator = } permissions["view-original"] = true; - // Google Doc? - if (node.hasAspect("{http://www.alfresco.org/model/googledocs/1.0}googleResource")) - { - custom["googleDocUrl"] = node.properties["gd:url"]; - permissions["view-google-doc"] = true; - if (lockOwnerUser == person.properties.userName) - { - permissions["checkin-from-google"] = true; - wcStatus = "google-docs-owner"; - actionSet = "googleDocOwner"; - } - else - { - wcStatus = "google-docs-locked " + lockedBy.displayName + "|" + lockedBy.userName; - actionSet = "googleDocLocked"; - } - } status[wcStatus] = true; } // Locked? @@ -216,24 +199,6 @@ var Evaluator = custom["hasWorkingCopy"] = true; custom["workingCopyNode"] = srcNode.nodeRef; permissions["view-working-copy"] = true; - - // Google Doc? - if (srcNode.hasAspect("{http://www.alfresco.org/model/googledocs/1.0}googleResource")) - { - custom["googleDocUrl"] = srcNode.properties["gd:url"]; - permissions["view-google-doc"] = true; - if (lockOwnerUser == person.properties.userName) - { - permissions["checkin-from-google"] = true; - lockStatus = "google-docs-owner"; - actionSet = "googleDocOwner"; - } - else - { - lockStatus = "google-docs-locked " + lockedBy.displayName + "|" + lockedBy.userName; - actionSet = "googleDocLocked"; - } - } } status[lockStatus] = true; } @@ -243,12 +208,6 @@ var Evaluator = { permissions["inline-edit"] = true; } - - // Google Docs editable aspect? - if (node.hasAspect("{http://www.alfresco.org/model/googledocs/1.0}googleEditable")) - { - permissions["googledocs-edit"] = true; - } /* Transferred Nodes */ if (node.hasAspect("trx:transferred")) diff --git a/config/alfresco/web-scripts-application-context.xml b/config/alfresco/web-scripts-application-context.xml index 8a5e701ae0..6bc682f5dd 100644 --- a/config/alfresco/web-scripts-application-context.xml +++ b/config/alfresco/web-scripts-application-context.xml @@ -1439,12 +1439,6 @@ - - - - diff --git a/source/java/org/alfresco/repo/web/scripts/googledocs/Status.java b/source/java/org/alfresco/repo/web/scripts/googledocs/Status.java deleted file mode 100644 index c99738deef..0000000000 --- a/source/java/org/alfresco/repo/web/scripts/googledocs/Status.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2005-2013 Alfresco Software Limited. - * - * This file is part of Alfresco - * - * Alfresco is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Alfresco is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Alfresco. If not, see . - */ -package org.alfresco.repo.web.scripts.googledocs; - -import java.util.HashMap; -import java.util.Map; - -import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory; -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.NoSuchBeanDefinitionException; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.extensions.webscripts.Cache; -import org.springframework.extensions.webscripts.DeclarativeWebScript; -import org.springframework.extensions.webscripts.WebScriptRequest; - -/** - * Google Doc service status web script implementation - */ -public class Status extends DeclarativeWebScript implements ApplicationContextAware -{ - private ApplicationContext applicationContext; - - @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException - { - this.applicationContext = applicationContext; - } - - @Override - protected Map executeImpl(WebScriptRequest req, org.springframework.extensions.webscripts.Status status, Cache cache) - { - Map model = new HashMap(1); - try - { - ChildApplicationContextFactory subsystem = (ChildApplicationContextFactory)applicationContext.getBean("googledocs"); - - // note: getting property (rather than getting googleDocsService bean to check isEnabled) does not cause subsystem startup (if stopped) - // hence providing ability for subsystem to be disabled (whilst still supporting ability to check status and/or dynamically start via JMX) - String isEnabled = (String)subsystem.getProperty("googledocs.googleeditable.enabled"); - - model.put("enabled", isEnabled == null ? false : new Boolean(isEnabled).booleanValue()); - } - catch (NoSuchBeanDefinitionException nsbde) - { - model.put("enabled", false); - } - return model; - } -}