mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Plugged in the correct mlTranslationInterceptor for FileFolderService and removed the NodeService interceptor.
Removed some unecessary interceptor work. Fixed content filtering to default to the pivot translation if there is no translation for a required language. Fixed content filtering when switching back to ALL LANGUAGES. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5802 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,9 +25,7 @@
|
||||
package org.alfresco.repo.model.filefolder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
@@ -46,7 +44,6 @@ public class FileInfoImpl implements FileInfo
|
||||
{
|
||||
private NodeRef nodeRef;
|
||||
private NodeRef linkNodeRef;
|
||||
private Map<Locale, FileInfo> translations;
|
||||
private boolean isFolder;
|
||||
private boolean isLink;
|
||||
private Map<QName, Serializable> properties;
|
||||
@@ -54,33 +51,14 @@ public class FileInfoImpl implements FileInfo
|
||||
/**
|
||||
* Package-level constructor
|
||||
*/
|
||||
/* package */ FileInfoImpl(NodeRef nodeRef, boolean isFolder, Map<QName, Serializable> properties)
|
||||
{
|
||||
this(nodeRef, isFolder, properties, Collections.<Locale, FileInfo>emptyMap());
|
||||
}
|
||||
|
||||
/**
|
||||
* Package-level constructor
|
||||
*
|
||||
* @param translations a map of translations including this instance. It may be null.
|
||||
*/
|
||||
/* package */ FileInfoImpl(
|
||||
NodeRef nodeRef,
|
||||
boolean isFolder,
|
||||
Map<QName, Serializable> properties,
|
||||
Map<Locale, FileInfo> translations)
|
||||
Map<QName, Serializable> properties)
|
||||
{
|
||||
this.nodeRef = nodeRef;
|
||||
this.isFolder = isFolder;
|
||||
this.properties = properties;
|
||||
if (translations == null || isFolder)
|
||||
{
|
||||
this.translations = Collections.<Locale, FileInfo>emptyMap();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.translations = translations;
|
||||
}
|
||||
|
||||
// Check if this is a link node
|
||||
if ( properties.containsKey( ContentModel.PROP_LINK_DESTINATION))
|
||||
@@ -97,7 +75,15 @@ public class FileInfoImpl implements FileInfo
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if (obj == null || this.getClass().isInstance(obj))
|
||||
if (obj == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (this == obj)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (obj instanceof FileInfoImpl == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -130,8 +116,6 @@ public class FileInfoImpl implements FileInfo
|
||||
sb.append(linkNodeRef);
|
||||
}
|
||||
|
||||
sb.append(", translations=").append(translations.size());
|
||||
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
@@ -156,11 +140,6 @@ public class FileInfoImpl implements FileInfo
|
||||
return linkNodeRef;
|
||||
}
|
||||
|
||||
public Map<Locale, FileInfo> getTranslations()
|
||||
{
|
||||
return translations;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return (String) properties.get(ContentModel.PROP_NAME);
|
||||
|
Reference in New Issue
Block a user