Package org.alfresco.repo.node
Class MLPropertyInterceptor
java.lang.Object
org.alfresco.repo.node.MLPropertyInterceptor
- All Implemented Interfaces:
org.aopalliance.aop.Advice,org.aopalliance.intercept.Interceptor,org.aopalliance.intercept.MethodInterceptor
public class MLPropertyInterceptor
extends Object
implements org.aopalliance.intercept.MethodInterceptor
Interceptor to filter out multilingual text properties from getter methods and
transform to multilingual text for setter methods.
This interceptor ensures that all multilingual (ML) text is transformed to the locale chosen for the request for getters and transformed to the default locale type for setters.
Where ML text has been passed in, this
will be allowed to pass.
- Author:
- Derek Hulley, Philippe Dubois
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClosestLocale(Collection<?> collection) invoke(org.aopalliance.intercept.MethodInvocation invocation) static booleanvoidsetDictionaryService(DictionaryService dictionaryService) static booleansetMLAware(boolean mlAwareVal) Change the filtering behaviour of this interceptor on the curren thread.voidsetMultilingualContentService(MultilingualContentService multilingualContentService) voidsetNodeService(NodeService bean)
-
Constructor Details
-
MLPropertyInterceptor
public MLPropertyInterceptor()
-
-
Method Details
-
setMLAware
public static boolean setMLAware(boolean mlAwareVal) Change the filtering behaviour of this interceptor on the curren thread. Use this to switch off the filtering and just pass out properties as handed out of the node service.- Parameters:
mlAwareVal- true if the current thread is able to handled:mltextproperty types, otherwise false.- Returns:
- true if the current transaction is ML aware
-
isMLAware
public static boolean isMLAware()- Returns:
- Returns true if the current thread has marked itself
as being able to handle
d:mltexttypes properly.
-
setNodeService
-
setMultilingualContentService
-
setDictionaryService
-
invoke
- Specified by:
invokein interfaceorg.aopalliance.intercept.MethodInterceptor- Throws:
Throwable
-
getClosestLocale
-