mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
82339: Merged WAT2 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 75270: Added event generation for site creation git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@83204 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1510,7 +1510,10 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
|
|||||||
*/
|
*/
|
||||||
public void updateSite(SiteInfo siteInfo)
|
public void updateSite(SiteInfo siteInfo)
|
||||||
{
|
{
|
||||||
String shortName = siteInfo.getShortName();
|
final String shortName = siteInfo.getShortName();
|
||||||
|
final String title = siteInfo.getTitle();
|
||||||
|
final String description = siteInfo.getDescription();
|
||||||
|
|
||||||
NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
||||||
if (siteNodeRef == null)
|
if (siteNodeRef == null)
|
||||||
{
|
{
|
||||||
@@ -1522,8 +1525,8 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
|
|||||||
|
|
||||||
// Update the properties of the site
|
// Update the properties of the site
|
||||||
// Note: the site preset and short name should never be updated!
|
// Note: the site preset and short name should never be updated!
|
||||||
properties.put(ContentModel.PROP_TITLE, siteInfo.getTitle());
|
properties.put(ContentModel.PROP_TITLE, title);
|
||||||
properties.put(ContentModel.PROP_DESCRIPTION, siteInfo.getDescription());
|
properties.put(ContentModel.PROP_DESCRIPTION, description);
|
||||||
|
|
||||||
// Update the permissions based on the visibility
|
// Update the permissions based on the visibility
|
||||||
SiteVisibility currentVisibility = getSiteVisibility(siteNodeRef);
|
SiteVisibility currentVisibility = getSiteVisibility(siteNodeRef);
|
||||||
@@ -1598,6 +1601,18 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
|
|||||||
|
|
||||||
// Set the updated properties back onto the site node reference
|
// Set the updated properties back onto the site node reference
|
||||||
this.nodeService.setProperties(siteNodeRef, properties);
|
this.nodeService.setProperties(siteNodeRef, properties);
|
||||||
|
|
||||||
|
final SiteVisibility visibility = siteInfo.getVisibility();
|
||||||
|
final String sitePreset = siteInfo.getSitePreset();
|
||||||
|
|
||||||
|
eventPublisher.publishEvent(new EventPreparator(){
|
||||||
|
@Override
|
||||||
|
public Event prepareEvent(String user, String networkId, String transactionId)
|
||||||
|
{
|
||||||
|
return new SiteManagementEvent("site.update", transactionId, networkId, new Date().getTime(),
|
||||||
|
user, shortName,title,description, visibility.toString(),sitePreset);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user