org.alfresco.repo.googledocs
Interface GoogleDocsService

All Known Implementing Classes:
GoogleDocsServiceImpl

public interface GoogleDocsService

Google docs integration service interface


Method Summary
 void createGoogleDoc(org.alfresco.service.cmr.repository.NodeRef nodeRef, GoogleDocsPermissionContext permissionContext)
          Create a google doc from a given node.
 void deleteGoogleResource(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Deletes the google resource associated with the node reference.
 java.io.InputStream getGoogleDocContent(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Gets the content as an input stream of google doc associated with the given node.
 boolean isEnabled()
          Indicates whether the GoogleDocs service is enabled or not.
 boolean isSupportedMimetype(java.lang.String mimetype)
          Indicates whether the mimetype is supported for creation in google docs.
 

Method Detail

isEnabled

boolean isEnabled()
Indicates whether the GoogleDocs service is enabled or not.

Returns:
boolean true if enabled, false otherwise

isSupportedMimetype

boolean isSupportedMimetype(java.lang.String mimetype)
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

Parameters:
mimetype - mimetype
Returns:
boolean true if mimetype is supported, false otherwise

createGoogleDoc

void createGoogleDoc(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                     GoogleDocsPermissionContext permissionContext)
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.

Parameters:
nodeRef - node reference
permissionContext - permission context
Throws:
GoogleDocsUnsupportedMimetypeException

deleteGoogleResource

void deleteGoogleResource(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Deletes the google resource associated with the node reference. This could be a folder or document.

Parameters:
nodeRef - node reference

getGoogleDocContent

java.io.InputStream getGoogleDocContent(org.alfresco.service.cmr.repository.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.

Parameters:
nodeRef - node reference
Returns:
InputStream the content of the associated google doc


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.