mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-30 18:15:39 +00:00
- Added web script to return the status of the GDoc service (see ALF-8684) - Refactor of service code to fix some of the issues when configuration details are changed via JMX or Share git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28681 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
85 lines
3.1 KiB
Java
Executable File
85 lines
3.1 KiB
Java
Executable File
/*
|
|
* Copyright (C) 2005-2010 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 <http://www.gnu.org/licenses/>.
|
|
*/
|
|
package org.alfresco.repo.googledocs;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import org.alfresco.service.cmr.repository.NodeRef;
|
|
|
|
/**
|
|
* Google docs integration service interface
|
|
*/
|
|
public interface GoogleDocsService
|
|
{
|
|
/**
|
|
* Indicates whether the GoogleDocs service is enabled or not.
|
|
* @return boolean true if enabled, false otherwise
|
|
*/
|
|
boolean isEnabled();
|
|
|
|
/**
|
|
* Initialises the googles doc service, checking the provided credentials are correct. This need
|
|
* not be called manually since other service calls will initialise the service on demand, but it can
|
|
* be helpful to know the "health" of the service up front.
|
|
*/
|
|
void initialise() throws GoogleDocsServiceInitException;
|
|
|
|
/**
|
|
* Indicates whether the mimetype is supported for creation in google docs.
|
|
*
|
|
* NOTE: This method presumes that the account being used is not for a "premium" customer
|
|
*
|
|
* @param mimetype mimetype
|
|
* @return boolean true if mimetype is supported, false otherwise
|
|
*/
|
|
boolean isSupportedMimetype(String mimetype);
|
|
|
|
/**
|
|
* Create a google doc from a given node. The content of the node will be used
|
|
* as a basis of the associated google doc. If the node has no content a new, empty google
|
|
* doc of the correct type will be created.
|
|
*
|
|
* The permission context provides information about how google sharing permissions should be
|
|
* set on the created google doc.
|
|
*
|
|
* @param nodeRef node reference
|
|
* @param permissionContext permission context
|
|
* @throws GoogleDocsUnsupportedMimetypeException
|
|
*/
|
|
void createGoogleDoc(NodeRef nodeRef, GoogleDocsPermissionContext permissionContext);
|
|
|
|
/**
|
|
* Deletes the google resource associated with the node reference. This could be a folder or
|
|
* document.
|
|
*
|
|
* @param nodeRef node reference
|
|
*/
|
|
void deleteGoogleResource(NodeRef nodeRef);
|
|
|
|
/**
|
|
* Gets the content as an input stream of google doc associated with the given node. The
|
|
* node must have the google resource aspect and the associated resource should not be a
|
|
* folder.
|
|
*
|
|
* @param nodeRef node reference
|
|
* @return InputStream the content of the associated google doc
|
|
*/
|
|
InputStream getGoogleDocContent(NodeRef nodeRef);
|
|
|
|
} |