Merging from EC-MC: Checkpoint before refactor

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5744 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-05-22 05:03:16 +00:00
parent 2d461f5dd9
commit d818c54e99
22 changed files with 644 additions and 416 deletions

View File

@@ -52,6 +52,15 @@ public interface MultilingualContentService
@Auditable(key = Auditable.Key.ARG_0, parameters = {"localizedNodeRef"})
void renameWithMLExtension(NodeRef localizedNodeRef);
/**
* Checks whether an existing document is part of a translation group.
*
* @param contentNodeRef An existing <b>cm:content</b>
* @return Returns <tt>true</tt> if the document has a <b>cm:mlContainer</b> parent
*/
@Auditable(key = Auditable.Key.ARG_0, parameters = {"contentNodeRef"})
boolean isTranslation(NodeRef contentNodeRef);
/**
* Make an existing document into a translation by adding the <b>cm:mlDocument</b> aspect and
* creating a <b>cm:mlContainer</b> parent. If it is already a translation, then nothing is done.
@@ -132,12 +141,14 @@ public interface MultilingualContentService
List<Locale> getMissingTranslations(NodeRef localizedNodeRef, boolean addThisNodeLocale);
/**
* Given any node, this returns the pivot translation. The pivot translation is the translation
* that its locale is referenced by the locale of the MLContainer. The translation can't be an
* empty translation.
* Given any node, this returns the pivot translation. All multilingual documents belong to
* a group linked by a hidden parent node of type <b>cm:mlContainer</b>. The pivot language
* for the translations is stored on the parent, and the child that has the same locale is the
* pivot translation.
*
* @param nodeRef the node to test
* @return the pivot translation
* @param nodeRef a <b>cm:mlDocument</b>
* @return Returns a corresponding <b>cm:mlDocument</b> that matches the locale of
* of the <b>cm:mlContainer</b>.
*/
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"})
NodeRef getPivotTranslation(NodeRef nodeRef);

View File

@@ -26,6 +26,7 @@ package org.alfresco.service.cmr.model;
import java.io.Serializable;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
import org.alfresco.service.cmr.repository.ContentData;
@@ -61,6 +62,15 @@ public interface FileInfo
*/
public NodeRef getLinkNodeRef();
/**
* Get all translated versions of the file info. The map will always be empty if this
* instance references {@link #isFolder() a folder}. The map may also be empty if the
* file represented is not multilingual.
*
* @return Returns a map of transalations keyed on locale
*/
public Map<Locale, FileInfo> getTranslations();
/**
* @return Returns the name of the file or folder within the parent folder
*/