Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webapp.directory
Class VocabularyTreeNode

java.lang.Object
  extended by org.nuxeo.ecm.webapp.directory.VocabularyTreeNode

public class VocabularyTreeNode
extends Object

A vocabulary tree node based on l10nvocabulary or l10nxvocabulary directory. These schemas store translations in columns of the form label_xx_XX or label_xx. The label of a node is retrieved from column label_xx_XX (where xx_XX is the current locale name) if it exists, from column label_xx (where xx is the current locale language) else. If this one doesn't exist either, the english label (from label_en) is used.

Since:
5.4.3
Author:
Quentin Lamerand

Field Summary
static String DEFAULT_LANGUAGE
           
static String LABEL_FIELD_PREFIX
           
static String OBSOLETE_FIELD
           
static String PARENT_FIELD_ID
           
 
Constructor Summary
VocabularyTreeNode(int level, String id, String description, String path, String vocabularyName, DirectoryService directoryService)
           
VocabularyTreeNode(int level, String id, String description, String path, String vocabularyName, DirectoryService directoryService, boolean displayObsoleteEntries, char keySeparator, String orderingField)
           
VocabularyTreeNode(int level, String id, String description, String path, String vocabularyName, DirectoryService directoryService, boolean displayObsoleteEntries, char keySeparator, String orderingField, Comparable orderingValue)
           
 
Method Summary
static String computeLabel(Locale locale, DocumentModel entry, String schemaName)
           
 List<VocabularyTreeNode> getChildren()
           
 String getId()
           
 String getLabel()
           
 Comparable getOrdering()
           
 String getPath()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARENT_FIELD_ID

public static final String PARENT_FIELD_ID
See Also:
Constant Field Values

LABEL_FIELD_PREFIX

public static final String LABEL_FIELD_PREFIX
See Also:
Constant Field Values

DEFAULT_LANGUAGE

public static final String DEFAULT_LANGUAGE
See Also:
Constant Field Values

OBSOLETE_FIELD

public static final String OBSOLETE_FIELD
See Also:
Constant Field Values
Constructor Detail

VocabularyTreeNode

public VocabularyTreeNode(int level,
                          String id,
                          String description,
                          String path,
                          String vocabularyName,
                          DirectoryService directoryService)

VocabularyTreeNode

public VocabularyTreeNode(int level,
                          String id,
                          String description,
                          String path,
                          String vocabularyName,
                          DirectoryService directoryService,
                          boolean displayObsoleteEntries,
                          char keySeparator,
                          String orderingField)

VocabularyTreeNode

public VocabularyTreeNode(int level,
                          String id,
                          String description,
                          String path,
                          String vocabularyName,
                          DirectoryService directoryService,
                          boolean displayObsoleteEntries,
                          char keySeparator,
                          String orderingField,
                          Comparable orderingValue)
Method Detail

getChildren

public List<VocabularyTreeNode> getChildren()

computeLabel

public static String computeLabel(Locale locale,
                                  DocumentModel entry,
                                  String schemaName)

getId

public String getId()

getLabel

public String getLabel()

getPath

public String getPath()

getOrdering

public Comparable getOrdering()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.