|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.transaction.TransactionListenerAdapter
org.alfresco.repo.googledocs.GoogleDocsServiceImpl
public class GoogleDocsServiceImpl
Google docs integration service implementation
| Field Summary | |
|---|---|
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
|
| Fields inherited from interface org.alfresco.repo.googledocs.GoogleDocsModel |
|---|
ASPECT_GOOGLEEDITABLE, ASPECT_GOOGLERESOURCE, GOOGLE_DOCS_MODEL_1_0_URI, GOOGLE_DOCS_PREFIX, PROP_RESOURCE_ID, PROP_RESOURCE_TYPE, PROP_URL |
| Constructor Summary | |
|---|---|
GoogleDocsServiceImpl()
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class org.alfresco.repo.transaction.TransactionListenerAdapter |
|---|
beforeCommit, beforeCompletion, flush |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public 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
| Constructor Detail |
|---|
public GoogleDocsServiceImpl()
| Method Detail |
|---|
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()
GoogleDocsService
isEnabled in interface GoogleDocsServiceGoogleDocsService.isEnabled()public boolean isSupportedMimetype(java.lang.String mimetype)
GoogleDocsService
isSupportedMimetype in interface GoogleDocsServicemimetype - mimetype
GoogleDocsService.isSupportedMimetype(java.lang.String)
public void createGoogleDoc(org.alfresco.service.cmr.repository.NodeRef nodeRef,
GoogleDocsPermissionContext permissionContext)
GoogleDocsService
createGoogleDoc in interface GoogleDocsServicenodeRef - node referencepermissionContext - permission context
GoogleDocsUnsupportedMimetypeExceptionorg.alfresco.google.docs.GoogleDocsService#upload(org.alfresco.service.cmr.repository.NodeRef)public void deleteGoogleResource(org.alfresco.service.cmr.repository.NodeRef nodeRef)
GoogleDocsService
deleteGoogleResource 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)
GoogleDocsService
getGoogleDocContent in interface GoogleDocsServicenodeRef - node reference
org.alfresco.google.docs.GoogleDocsService#getGoogleDocContent(org.alfresco.service.cmr.repository.NodeRef)public void afterCommit()
TransactionListenerAdapterAny exceptions generated here will cause the transaction to rollback.
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()
TransactionListenerAdapterAlthough 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()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||