ALF-13441: WebDAV: activities should be raised/published

* WebDAV methods raise activities for file creation, modification, deletion.
* Repository property to enabled/disable activity feed generation is disabled by default.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@34748 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Matt Ward
2012-03-26 14:25:26 +00:00
parent bb8fd4c88b
commit b8e8b5f250
4 changed files with 28 additions and 9 deletions

View File

@@ -36,6 +36,7 @@ location.license.shared=classpath*:/alfresco/extension/license/*.lic
system.webdav.servlet.enabled=true system.webdav.servlet.enabled=true
system.webdav.storeName=${protocols.storeName} system.webdav.storeName=${protocols.storeName}
system.webdav.rootPath=${protocols.rootPath} system.webdav.rootPath=${protocols.rootPath}
system.webdav.activities.enabled=false
# Is the JBPM Deploy Process Servlet enabled? # Is the JBPM Deploy Process Servlet enabled?
# Default is false. Should not be enabled in production environments as the # Default is false. Should not be enabled in production environments as the

View File

@@ -22,6 +22,7 @@
<property name="fileFolderService" ref="FileFolderService" /> <property name="fileFolderService" ref="FileFolderService" />
<property name="rootNode" ref="webdavRootNode" /> <property name="rootNode" ref="webdavRootNode" />
<property name="enabled"><value>${system.webdav.servlet.enabled}</value></property> <property name="enabled"><value>${system.webdav.servlet.enabled}</value></property>
<property name="activitiesEnabled" value="${system.webdav.activities.enabled}"/>
</bean> </bean>
<bean id="webdavLockStoreFactory" class="org.alfresco.repo.webdav.LockStoreFactoryImpl"> <bean id="webdavLockStoreFactory" class="org.alfresco.repo.webdav.LockStoreFactoryImpl">

View File

@@ -47,17 +47,15 @@ import org.springframework.extensions.surf.util.URLEncoder;
public class WebDavServiceImpl implements WebDavService public class WebDavServiceImpl implements WebDavService
{ {
public static final String WEBDAV_PREFIX = "webdav"; public static final String WEBDAV_PREFIX = "webdav";
private static Log logger = LogFactory.getLog(WebDavServiceImpl.class); private static Log logger = LogFactory.getLog(WebDavServiceImpl.class);
private boolean enabled = false; private boolean enabled = false;
private NodeService nodeService; private NodeService nodeService;
private DictionaryService dictionaryService; private DictionaryService dictionaryService;
private FileFolderService fileFolderService; private FileFolderService fileFolderService;
// Root nodes // Root nodes
private MTNodesCache2 rootNode; private MTNodesCache2 rootNode;
private boolean activitiesEnabled;
/** /**
@@ -186,4 +184,15 @@ public class WebDavServiceImpl implements WebDavService
{ {
return rootNode; return rootNode;
} }
@Override
public boolean activitiesEnabled()
{
return activitiesEnabled;
}
public void setActivitiesEnabled(boolean enabled)
{
activitiesEnabled = enabled;
}
} }

View File

@@ -29,4 +29,12 @@ public interface WebDavService
*/ */
public String getWebdavUrl(NodeRef nodeRef); public String getWebdavUrl(NodeRef nodeRef);
/**
* Determines whether activity post generation is enabled for WebDAV. When enabled,
* file creation, modification and deletion will create activities that can be viewed
* in the Share web client.
*
* @return true if activity generation is enabled.
*/
public boolean activitiesEnabled();
} }