public class MultiLanguageServiceImpl extends Object implements MultiLanguageService
| Modifier and Type | Field and Description |
|---|---|
static String |
JCR_LASTMODIFIED
Property name jcr:lastModified
|
static String |
JCR_MIMETYPE
Property name keep mimeType of data
|
static String |
JCRCONTENT
Path to child node keep content of parent node
|
static String |
JCRDATA
Property name keep data of node
|
static String |
NTFILE
NodeType name nt:file
|
static String |
NTFOLDER
NodeType name nt:folder
|
static String |
NTUNSTRUCTURED
NodeType name nt:unstructured
|
COMMENTS, EXO_LANGUAGE, LANGUAGES| Constructor and Description |
|---|
MultiLanguageServiceImpl(CmsService cmsService)
Constructor method
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFileLanguage(javax.jcr.Node node,
String language,
Map mappings,
boolean isDefault)
Add newLanguageNode node, then set property in mapping to newLanguageNode
|
void |
addFileLanguage(javax.jcr.Node node,
String fileName,
javax.jcr.Value value,
String mimeType,
String language,
String repositoryName,
boolean isDefault)
Add newLanguageNode node, then add new file to newLanguageNode
|
void |
addFolderLanguage(javax.jcr.Node node,
Map inputs,
String language,
boolean isDefault,
String nodeType,
String repositoryName)
Add new language node as a folder
|
void |
addLanguage(javax.jcr.Node node,
Map inputs,
String language,
boolean isDefault)
Add new language for current node
Set value of property in inputs Map to new language node
|
void |
addLanguage(javax.jcr.Node node,
Map inputs,
String language,
boolean isDefault,
String nodeType)
Add new language for current node
Processing for some new added node
Set value of property in inputs Map to new language node
Processing for nodeType in child node of current node and some new added node
|
void |
addLinkedLanguage(javax.jcr.Node node,
javax.jcr.Node translationNode)
Add newLanguageNode node with a symlink, based on exo:language targetNode property
|
void |
addLinkedLanguage(javax.jcr.Node node,
javax.jcr.Node translationNode,
boolean forceReplace)
Add newLanguageNode node with a symlink, based on exo:language targetNode property
|
void |
addSynchronizedLinkedLanguage(javax.jcr.Node selectedNode,
javax.jcr.Node newTranslationNode)
Add new translation for one node and synchronize all related translation nodes.
|
String |
getDefault(javax.jcr.Node node)
Get value of property exo:language in current node
|
javax.jcr.Node |
getLanguage(javax.jcr.Node node,
String language)
Get node following relative path = "languages/" + language
|
List<String> |
getSupportedLanguages(javax.jcr.Node node)
Get list of value in exo:language property in child node of current node
|
void |
setDefault(javax.jcr.Node node,
String language,
String repositoryName)
Set data for current node
|
public static final String JCRCONTENT
public static final String JCRDATA
public static final String JCR_MIMETYPE
public static final String NTUNSTRUCTURED
public static final String NTFOLDER
public static final String NTFILE
public static final String JCR_LASTMODIFIED
public MultiLanguageServiceImpl(CmsService cmsService) throws Exception
cmsService - CmsService objectExceptionpublic void addLanguage(javax.jcr.Node node,
Map inputs,
String language,
boolean isDefault)
throws Exception
addLanguage in interface MultiLanguageServicenode - current nodeinputs - Map includes key and value of propertylanguage - language nameisDefault - flag to define default language is used or notExceptionpublic void addLinkedLanguage(javax.jcr.Node node,
javax.jcr.Node translationNode,
boolean forceReplace)
throws Exception
addLinkedLanguage in interface MultiLanguageServicenode - current nodetranslationNode - target translation nodeforceReplace - true if override existing symlink pointing to other translation, else throw ItemExistsExceptionExceptionpublic void addLinkedLanguage(javax.jcr.Node node,
javax.jcr.Node translationNode)
throws Exception
addLinkedLanguage in interface MultiLanguageServicenode - current nodetranslationNode - target translation nodeExceptionpublic void addSynchronizedLinkedLanguage(javax.jcr.Node selectedNode,
javax.jcr.Node newTranslationNode)
throws Exception
addSynchronizedLinkedLanguage in interface MultiLanguageServiceselectedNode - Selected NodenewTranslationNode - New Translation NodeExceptionpublic void addLanguage(javax.jcr.Node node,
Map inputs,
String language,
boolean isDefault,
String nodeType)
throws Exception
addLanguage in interface MultiLanguageServicenode - current nodeinputs - Map includes key and value of propertylanguage - language nameisDefault - flag to define default language is used or notnodeType - node nameExceptionpublic void addFileLanguage(javax.jcr.Node node,
String fileName,
javax.jcr.Value value,
String mimeType,
String language,
String repositoryName,
boolean isDefault)
throws Exception
addFileLanguage in interface MultiLanguageServicenode - current nodefileName - name of filevalue - value of filemimeType - mimiTypelanguage - language namerepositoryName - repository nameisDefault - flag to use new language or default languageExceptionpublic void addFileLanguage(javax.jcr.Node node,
String language,
Map mappings,
boolean isDefault)
throws Exception
addFileLanguage in interface MultiLanguageServicenode - current nodelanguage - language namemappings - Map includes property and valueisDefault - flag to use new language or default languageExceptionpublic String getDefault(javax.jcr.Node node) throws Exception
getDefault in interface MultiLanguageServicenode - current nodeExceptionpublic List<String> getSupportedLanguages(javax.jcr.Node node) throws Exception
getSupportedLanguages in interface MultiLanguageServicenode - current nodeExceptionpublic void setDefault(javax.jcr.Node node,
String language,
String repositoryName)
throws Exception
setDefault in interface MultiLanguageServicenode - current nodelanguage - language namerepositoryName - repository nameExceptionpublic javax.jcr.Node getLanguage(javax.jcr.Node node,
String language)
throws Exception
getLanguage in interface MultiLanguageServiceExceptionpublic void addFolderLanguage(javax.jcr.Node node,
Map inputs,
String language,
boolean isDefault,
String nodeType,
String repositoryName)
throws Exception
MultiLanguageServiceaddFolderLanguage in interface MultiLanguageServiceExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.