public class GoogleDocsServiceImpl extends TransactionListenerAdapter implements GoogleDocsService, GoogleDocsModel
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE_DOCUMENT
Google document types
|
static java.lang.String |
TYPE_PDF |
static java.lang.String |
TYPE_PRESENTATION |
static java.lang.String |
TYPE_SPREADSHEET |
ASPECT_GOOGLEEDITABLE, ASPECT_GOOGLERESOURCE, GOOGLE_DOCS_MODEL_1_0_URI, GOOGLE_DOCS_PREFIX, PROP_RESOURCE_ID, PROP_RESOURCE_TYPE, PROP_URL| Constructor and Description |
|---|
GoogleDocsServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterCommit()
Invoked after transaction commit.
|
void |
afterRollback()
Invoked after transaction rollback.
|
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.
|
com.google.gdata.client.docs.DocsService |
getDocumentService()
Get a new instance of a document service
|
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.
|
com.google.gdata.client.media.MediaService |
getMediaService(java.lang.String serviceName) |
com.google.gdata.client.media.MediaService |
getSpreadSheetService()
Get a new instance of the spread sheet service
|
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.
|
void |
setApplicationName(java.lang.String applicationName) |
void |
setAuthorityService(AuthorityService authorityService) |
void |
setContentService(ContentService contentService) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setDownloadUrl(java.lang.String downloadUrl) |
void |
setEnabled(boolean enabled)
Set whether the service is enabled or not.
|
void |
setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setOwnableService(OwnableService ownableService) |
void |
setPassword(java.lang.String password) |
void |
setPermissionMap(java.util.Map permissionMap) |
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) |
void |
setPersonService(PersonService personService) |
void |
setSpreadsheetDownloadUrl(java.lang.String spreadsheetDownloadUrl) |
void |
setSpreadSheetServiceName(java.lang.String spreadSheetServiceName) |
void |
setUrl(java.lang.String url) |
void |
setUsername(java.lang.String username) |
beforeCommit, beforeCompletion, flushpublic static final java.lang.String TYPE_DOCUMENT
public static final java.lang.String TYPE_SPREADSHEET
public static final java.lang.String TYPE_PRESENTATION
public static final java.lang.String TYPE_PDF
public com.google.gdata.client.media.MediaService getSpreadSheetService()
public com.google.gdata.client.docs.DocsService getDocumentService()
public com.google.gdata.client.media.MediaService getMediaService(java.lang.String serviceName)
serviceName - public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService - node servicepublic void setContentService(ContentService contentService)
contentService - content servicepublic void setPersonService(PersonService personService)
personService - person servicepublic void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
mimetypeService - mime type servicepublic void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
permissionService - permission servicepublic void setOwnableService(OwnableService ownableService)
ownableService - ownable servicepublic void setAuthorityService(AuthorityService authorityService)
authorityService - authority servicepublic void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService - dictionary servicepublic void setUrl(java.lang.String url)
url - root googleDoc URLpublic void setDownloadUrl(java.lang.String downloadUrl)
downloadUrl - root download URLpublic void setSpreadsheetDownloadUrl(java.lang.String spreadsheetDownloadUrl)
spreadsheetDownloadUrl - root spreadsheet download URLpublic void setApplicationName(java.lang.String applicationName)
applicationName - GDoc application namepublic void setSpreadSheetServiceName(java.lang.String spreadSheetServiceName)
spreadSheetServiceName - GDoc spread sheet service namepublic void setUsername(java.lang.String username)
username - google service user namepublic void setPassword(java.lang.String password)
password - google service passwordpublic void setPermissionMap(java.util.Map permissionMap)
permissionMap - permission mappublic void setEnabled(boolean enabled)
enabled - true if enabled, false otherwisepublic boolean isEnabled()
GoogleDocsServiceisEnabled in interface GoogleDocsServiceGoogleDocsService.isEnabled()public boolean isSupportedMimetype(java.lang.String mimetype)
GoogleDocsServiceisSupportedMimetype in interface GoogleDocsServicemimetype - mimetypeGoogleDocsService.isSupportedMimetype(java.lang.String)public void createGoogleDoc(org.alfresco.service.cmr.repository.NodeRef nodeRef,
GoogleDocsPermissionContext permissionContext)
GoogleDocsServicecreateGoogleDoc in interface GoogleDocsServicenodeRef - node referencepermissionContext - permission contextGoogleDocsUnsupportedMimetypeExceptionorg.alfresco.google.docs.GoogleDocsService#upload(org.alfresco.service.cmr.repository.NodeRef)public void deleteGoogleResource(org.alfresco.service.cmr.repository.NodeRef nodeRef)
GoogleDocsServicedeleteGoogleResource in interface GoogleDocsServicenodeRef - node referenceorg.alfresco.google.docs.GoogleDocsService#deleteGoogleResource(org.alfresco.service.cmr.repository.NodeRef)public java.io.InputStream getGoogleDocContent(org.alfresco.service.cmr.repository.NodeRef nodeRef)
GoogleDocsServicegetGoogleDocContent in interface GoogleDocsServicenodeRef - node referenceorg.alfresco.google.docs.GoogleDocsService#getGoogleDocContent(org.alfresco.service.cmr.repository.NodeRef)public void afterCommit()
TransactionListenerAdapterAny exceptions generated here will only be logged and will have no effect on the state of the transaction.
Although all transaction resources are still available, this method should be used only for cleaning up resources after a commit has occured.
afterCommit in interface TransactionListenerafterCommit in class TransactionListenerAdapterTransactionListenerAdapter.afterCommit()public void afterRollback()
TransactionListenerAdapterAny exceptions generated here will only be logged and will have no effect on the state of the transaction.
Although all transaction resources are still available, this method should be used only for cleaning up resources after a rollback has occured.
afterRollback in interface TransactionListenerafterRollback in class TransactionListenerAdapterTransactionListenerAdapter.afterRollback()Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.