cancel
Showing results for 
Search instead for 
Did you mean: 

Content description saved value locale problem?

nenad982
Champ on-the-rise
Champ on-the-rise
Hi all,

I am experiencing following problem. My clients are using German and English locales to work with Alfresco (they like Explorer and they don't want to use Share). If they add some value for node description on English locale and search for that description value in Advanced Search in German locale this DOCUMENT IS FOUND (switch from Lucene to Solr fixed the problem to find document with specific description that is entered in one locale and searched on another) but description IS NOT SHOWN on UI for that node (also node browser do now show value for description if we are in different locale). But if they search on English locale (locale on which this value is added) DOCUMENT IS FOUND and description IS SHOWN on UI and on node browser.

Is there possibility to use Java API to save value for description for ALL LOCALES that are supported (we have behavior that will create specific description based on parent nodes and other values)?

Thanks
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
Is there possibility to use Java API to save value for description for ALL LOCALES.

Yes.  I'm thinking of a policy that sets the value for each language.  Or the other approach is to remove or replace the MLText interceptor.

nenad982
Champ on-the-rise
Champ on-the-rise
Hi mrogers,

thank you for your answer. What is the name of that MLText interceptor? This part with policy is not clear to me, so could you give me point where to look for some example or something?

Thanks a lot

kaynezhang
World-Class Innovator
World-Class Innovator
MLText interceptor is not a policy,it is an aop method interceptor

The MLPropertyInterceptor(org.alfresco.repo.node.MLPropertyInterceptor) is used to deal with the localized node properties .
1.It intercepts the node service methods: getProperty, getProperties to filter out multilingual text properties and return only current local
2.It intercepts the node service methods: setProperties, setProperty、createNode、addAspect to set the current local  property value of a multilingual text.
You can override  MLPropertyInterceptor's
public Object invoke(final MethodInvocation invocation) throws Throwable
method:
in your implematation version of intercepting the node service methods: setProperties, setProperty、createNode、addAspect,add all local valuse to MLText.

Hi all,

overriding of MLPropertyInterceptor.java fixed my issue.

Thanks to all…