Merged V2.1 to HEAD

6846: used ] instead of } in ${ldap.synchronisation.userIdAttributeName]
   6856: Fixed 2 NPEs, one reported by MIT and one found by Jan (WCM-835)
   6859: Truncate an existing file when uploading via FTP. WCM-836.
   6869: Removed temporary files and folders from deploy-installer project
   6870: Updated ignore property
   6875: Fix for AWC-1605
   6878: Fix for AWC-1587
   6880: Fix for French language pack - locked_user message
   6883: Fix for AWC-1565
   6884: Relax trhe permissions required to get the parent links from a child node
   6891: Fix for AR-1781 and AR-1782 (requires CHK-1451)
   6892: Fixed AR-1777: Node status not updated for addition and removal of secondary associations (affects index tracking)
   6893: Sample for replicating content store sample
   6896: Added JVM shutdown check into inner loop to get faster breakout in the event of shutdown.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6899 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-10-02 16:10:58 +00:00
parent f78733d78f
commit d90fd683b3
8 changed files with 50 additions and 26 deletions

View File

@@ -14,6 +14,7 @@
<property name="contentService" ref="contentService" />
<property name="fileFolderService" ref="fileFolderService" />
<property name="searchService" ref="SearchService" />
<property name="permissionService" ref="PermissionService" />
</bean>
<bean id="webscripts.classpathstore" class="org.alfresco.web.scripts.ClassPathStore" abstract="true" />

View File

@@ -799,7 +799,7 @@ public class BrowseBean implements IContextListener
node = new MapNode(nodeRef, this.nodeService, fileInfo.getProperties());
// only display the user has the permissions to navigate to the target of the link
NodeRef destRef = (NodeRef)node.getProperties().get(ContentModel.PROP_LINK_DESTINATION);
if (new Node(destRef).hasPermission(PermissionService.READ) == true)
if (destRef != null && new Node(destRef).hasPermission(PermissionService.READ) == true)
{
node.addPropertyResolver("url", this.resolverLinkUrl);
node.addPropertyResolver("webdavUrl", this.resolverLinkWebdavUrl);
@@ -818,7 +818,7 @@ public class BrowseBean implements IContextListener
node = new MapNode(nodeRef, this.nodeService, fileInfo.getProperties());
// only display the user has the permissions to navigate to the target of the link
NodeRef destRef = (NodeRef)node.getProperties().get(ContentModel.PROP_LINK_DESTINATION);
if (new Node(destRef).hasPermission(PermissionService.READ) == true)
if (destRef != null && new Node(destRef).hasPermission(PermissionService.READ) == true)
{
node.addPropertyResolver("icon", this.resolverSpaceIcon);
node.addPropertyResolver("smallIcon", this.resolverSmallIcon);

View File

@@ -39,6 +39,8 @@ import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.web.app.Application;
import org.alfresco.web.app.servlet.BaseTemplateContentServlet;
import org.alfresco.web.app.servlet.BaseTemplateContentServlet.URLHelper;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.repo.component.template.DefaultModelHelper;
@@ -123,6 +125,9 @@ public class TemplateMailHelperBean
services, Application.getCurrentUser(fc), templateRef);
model.put("role", roleText);
model.put("space", node);
// object to allow client urls to be generated in emails
model.put("url", new BaseTemplateContentServlet.URLHelper(
fc.getExternalContext().getRequestContextPath()));
body = services.getTemplateService().processTemplate("freemarker", templateRef.toString(), model);
}

View File

@@ -391,7 +391,8 @@ final class Column
*/
public Column(Column copy)
{
this.dashlets = (List<DashletDefinition>)((ArrayList<DashletDefinition>)copy.dashlets).clone();
this.dashlets = new ArrayList<DashletDefinition>(copy.dashlets.size());
this.dashlets.addAll(copy.dashlets);
}
public void addDashlet(DashletDefinition dashlet)

View File

@@ -494,7 +494,8 @@ public class RegenerateRenditionsWizard
query.append("+ASPECT:\"" + WCMAppModel.ASPECT_RENDITION + "\"");
}
if (this.regenerateScope.equals(REGENERATE_SCOPE_FORM))
if (this.regenerateScope.equals(REGENERATE_SCOPE_FORM) &&
this.selectedForms != null)
{
query.append(" +(");
for (int i = 0; i < this.selectedForms.length; i++)
@@ -508,7 +509,9 @@ public class RegenerateRenditionsWizard
}
query.append(") ");
}
if (this.regenerateScope.equals(REGENERATE_SCOPE_RENDERING_ENGINE_TEMPLATE))
if (this.regenerateScope.equals(REGENERATE_SCOPE_RENDERING_ENGINE_TEMPLATE) &&
this.selectedRenderingEngineTemplates != null)
{
query.append(" +(");
for (int i = 0; i < this.selectedRenderingEngineTemplates.length; i++)

View File

@@ -494,7 +494,8 @@ public abstract class InviteUsersWizard extends BaseWizardBean
String personName = Application.getCurrentUser(context).getFullName(this.nodeService);
String msgInvitedTo = Application.getMessage(context, MSG_INVITED_TO);
Node node = this.getNode();
String path = this.nodeService.getPath(node.getNodeRef()).toDisplayPath(this.nodeService);
String path = this.nodeService.getPath(node.getNodeRef()).toDisplayPath(
this.nodeService, this.permissionService);
buf.append(MessageFormat.format(msgInvitedTo, new Object[] {
path + '/' + node.getName(),
personName}) );

View File

@@ -23,24 +23,30 @@
*/
package org.alfresco.web.forms;
import java.io.*;
import java.util.*;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel;
import org.alfresco.model.WCMAppModel;
import org.alfresco.repo.avm.AVMNodeConverter;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.avm.AVMNotFoundException;
import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.repository.*;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.wcm.AVMUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.*;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
/**
@@ -48,10 +54,8 @@ import org.xml.sax.SAXException;
*
* @author Ariel Backenroth
*/
/* package */ class FormInstanceDataImpl
implements FormInstanceData
/* package */ class FormInstanceDataImpl implements FormInstanceData
{
private static final Log LOGGER = LogFactory.getLog(RenditionImpl.class);
private final NodeRef nodeRef;
@@ -151,17 +155,15 @@ import org.xml.sax.SAXException;
if (LOGGER.isDebugEnabled())
LOGGER.debug("regenerating renditions of " + this);
final AVMService avmService = this.getServiceRegistry().getAVMService();
String originalParentAvmPath =
avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
PropertyValue pv = avmService.getNodeProperty(
AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
WCMAppModel.PROP_ORIGINAL_PARENT_PATH).getStringValue();
WCMAppModel.PROP_ORIGINAL_PARENT_PATH);
String originalParentAvmPath = (pv == null) ?
AVMNodeConverter.SplitBase(this.getPath())[0] : pv.getStringValue();
if (originalParentAvmPath == null)
{
originalParentAvmPath = AVMNodeConverter.SplitBase(this.getPath())[0];
}
final HashSet<RenderingEngineTemplate> allRets =
new HashSet<RenderingEngineTemplate>(this.getForm().getRenderingEngineTemplates());
final List<RegenerateResult> result = new LinkedList<RegenerateResult>();

View File

@@ -50,6 +50,7 @@ import org.alfresco.service.cmr.repository.ScriptLocation;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.search.ResultSet;
import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.util.AbstractLifecycleBean;
import org.springframework.beans.BeansException;
@@ -82,6 +83,7 @@ public class RepoStore implements WebScriptStore, ApplicationContextAware, Appli
protected ContentService contentService;
protected FileFolderService fileService;
protected NamespaceService namespaceService;
protected PermissionService permissionService;
/**
@@ -132,6 +134,14 @@ public class RepoStore implements WebScriptStore, ApplicationContextAware, Appli
this.namespaceService = namespaceService;
}
/**
* Sets the permission service
*/
public void setPermissionService(PermissionService permissionService)
{
this.permissionService = permissionService;
}
/**
* Sets whether the repo store must exist
*
@@ -248,7 +258,8 @@ public class RepoStore implements WebScriptStore, ApplicationContextAware, Appli
*/
protected String getPath(NodeRef nodeRef)
{
return nodeService.getPath(nodeRef).toDisplayPath(nodeService) + "/" + nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
return nodeService.getPath(nodeRef).toDisplayPath(nodeService, permissionService) +
"/" + nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
}
/**