mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
82373: Merged WAT2 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 76479: Supporting Client class from alfresco-events git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@83217 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -28,6 +28,8 @@ import java.util.Map;
|
|||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.model.ForumModel;
|
import org.alfresco.model.ForumModel;
|
||||||
|
import org.alfresco.repo.Client;
|
||||||
|
import org.alfresco.repo.Client.ClientType;
|
||||||
import org.alfresco.repo.content.MimetypeMap;
|
import org.alfresco.repo.content.MimetypeMap;
|
||||||
import org.alfresco.repo.policy.BehaviourFilter;
|
import org.alfresco.repo.policy.BehaviourFilter;
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||||
@@ -46,7 +48,6 @@ import org.alfresco.service.cmr.security.PersonService;
|
|||||||
import org.alfresco.service.namespace.NamespaceService;
|
import org.alfresco.service.namespace.NamespaceService;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.alfresco.service.namespace.RegexQNamePattern;
|
import org.alfresco.service.namespace.RegexQNamePattern;
|
||||||
import org.alfresco.util.FileFilterMode.Client;
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.json.JSONStringer;
|
import org.json.JSONStringer;
|
||||||
@@ -150,7 +151,7 @@ public class CommentsPost extends DeclarativeWebScript {
|
|||||||
|
|
||||||
String jsonActivityData = jsonWriter.endObject().toString();
|
String jsonActivityData = jsonWriter.endObject().toString();
|
||||||
|
|
||||||
activityService.postActivity("org.alfresco.comments.comment-created", siteId, "comments", jsonActivityData, Client.webclient);
|
activityService.postActivity("org.alfresco.comments.comment-created", siteId, "comments", jsonActivityData, Client.asType(ClientType.webclient));
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
|
@@ -17,6 +17,8 @@ import org.alfresco.events.types.ContentEvent;
|
|||||||
import org.alfresco.events.types.ContentEventImpl;
|
import org.alfresco.events.types.ContentEventImpl;
|
||||||
import org.alfresco.events.types.Event;
|
import org.alfresco.events.types.Event;
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.repo.Client;
|
||||||
|
import org.alfresco.repo.Client.ClientType;
|
||||||
import org.alfresco.repo.content.MimetypeMap;
|
import org.alfresco.repo.content.MimetypeMap;
|
||||||
import org.alfresco.repo.content.filestore.FileContentReader;
|
import org.alfresco.repo.content.filestore.FileContentReader;
|
||||||
import org.alfresco.repo.events.EventPreparator;
|
import org.alfresco.repo.events.EventPreparator;
|
||||||
@@ -31,7 +33,6 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
|||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
import org.alfresco.service.cmr.site.SiteService;
|
import org.alfresco.service.cmr.site.SiteService;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.alfresco.util.FileFilterMode.Client;
|
|
||||||
import org.alfresco.util.TempFileProvider;
|
import org.alfresco.util.TempFileProvider;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
@@ -364,7 +365,7 @@ public class ContentStreamer implements ResourceLoaderAware
|
|||||||
String siteId = siteService.getSiteShortName(nodeRef);
|
String siteId = siteService.getSiteShortName(nodeRef);
|
||||||
|
|
||||||
return new ContentEventImpl(ContentEvent.DOWNLOAD, user, networkId, transactionId,
|
return new ContentEventImpl(ContentEvent.DOWNLOAD, user, networkId, transactionId,
|
||||||
nodeRef.getId(), siteId, propertyQName.toString(), Client.webclient, attachFileName, finalMimetype, size, encoding);
|
nodeRef.getId(), siteId, propertyQName.toString(), Client.asType(ClientType.webclient), attachFileName, finalMimetype, size, encoding);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -20,12 +20,13 @@ package org.alfresco.repo.webdav;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.alfresco.repo.Client;
|
||||||
|
import org.alfresco.repo.Client.ClientType;
|
||||||
import org.alfresco.repo.activities.ActivityType;
|
import org.alfresco.repo.activities.ActivityType;
|
||||||
import org.alfresco.repo.tenant.TenantService;
|
import org.alfresco.repo.tenant.TenantService;
|
||||||
import org.alfresco.service.cmr.activities.ActivityService;
|
import org.alfresco.service.cmr.activities.ActivityService;
|
||||||
import org.alfresco.service.cmr.model.FileInfo;
|
import org.alfresco.service.cmr.model.FileInfo;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.util.FileFilterMode.Client;
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
@@ -125,7 +126,7 @@ public class ActivityPosterImpl implements ActivityPoster
|
|||||||
siteId,
|
siteId,
|
||||||
appTool,
|
appTool,
|
||||||
json.toString(),
|
json.toString(),
|
||||||
Client.webdav,
|
Client.asType(ClientType.webdav),
|
||||||
contentNodeInfo);
|
contentNodeInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -38,6 +38,8 @@ import org.alfresco.events.types.ContentReadRangeEvent;
|
|||||||
import org.alfresco.events.types.Event;
|
import org.alfresco.events.types.Event;
|
||||||
import org.alfresco.jlan.util.IPAddress;
|
import org.alfresco.jlan.util.IPAddress;
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.repo.Client;
|
||||||
|
import org.alfresco.repo.Client.ClientType;
|
||||||
import org.alfresco.repo.events.EventPreparator;
|
import org.alfresco.repo.events.EventPreparator;
|
||||||
import org.alfresco.repo.events.EventPublisher;
|
import org.alfresco.repo.events.EventPublisher;
|
||||||
import org.alfresco.repo.lock.LockUtils;
|
import org.alfresco.repo.lock.LockUtils;
|
||||||
@@ -62,7 +64,6 @@ import org.alfresco.service.cmr.security.PermissionService;
|
|||||||
import org.alfresco.service.cmr.site.SiteService;
|
import org.alfresco.service.cmr.site.SiteService;
|
||||||
import org.alfresco.service.namespace.NamespaceService;
|
import org.alfresco.service.namespace.NamespaceService;
|
||||||
import org.alfresco.util.EqualsHelper;
|
import org.alfresco.util.EqualsHelper;
|
||||||
import org.alfresco.util.FileFilterMode.Client;
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.springframework.extensions.surf.util.URLDecoder;
|
import org.springframework.extensions.surf.util.URLDecoder;
|
||||||
@@ -1100,12 +1101,12 @@ public class WebDAVHelper
|
|||||||
if (StringUtils.hasText(range))
|
if (StringUtils.hasText(range))
|
||||||
{
|
{
|
||||||
return new ContentReadRangeEvent(user, networkId, transactionId, realNodeInfo.getNodeRef().getId(),
|
return new ContentReadRangeEvent(user, networkId, transactionId, realNodeInfo.getNodeRef().getId(),
|
||||||
null, realNodeInfo.getType().toString(), Client.webdav, realNodeInfo.getName(), mimetype, size, contentEncoding, range);
|
null, realNodeInfo.getType().toString(), Client.asType(ClientType.webdav), realNodeInfo.getName(), mimetype, size, contentEncoding, range);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return new ContentEventImpl(ContentEvent.DOWNLOAD, user, networkId, transactionId, realNodeInfo.getNodeRef().getId(),
|
return new ContentEventImpl(ContentEvent.DOWNLOAD, user, networkId, transactionId, realNodeInfo.getNodeRef().getId(),
|
||||||
null, realNodeInfo.getType().toString(), Client.webdav, realNodeInfo.getName(), mimetype, size, contentEncoding);
|
null, realNodeInfo.getType().toString(), Client.asType(ClientType.webdav), realNodeInfo.getName(), mimetype, size, contentEncoding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user