As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
{http://www.alfresco.org/model/application/1.0}interface-language
/{http://www.alfresco.org/model/system/1.0}system/{http://www.alfresco.org/model/system/1.0}people/{http://www.alfresco.org/model/content/1.0}person/{http://www.alfresco.org/model/application/1.0}configurations/{http://www.alfresco.org/model/application/1.0}preferences
app:configurations/app:preferences
Bonjour,C'est la valeurs de la méta donnée {http://www.alfresco.org/model/application/1.0}interface-language Et elle se trouve via le navigateur de nœud : /{http://www.alfresco.org/model/system/1.0}system/{http://www.alfresco.org/model/system/1.0}people/{http://www.alfresco.org/model/content/1.0}person/{http://www.alfresco.org/model/application/1.0}configurations/{http://www.alfresco.org/model/application/1.0}preferences Donc pour ce faire, il faut rechercher l'utilisateur courant (qui est de type cmerson) et puis sur cette node prendre le XPath: app:configurations/app:preferences Et au final, avec le nodeService prendre la propriété nommée plus haut.Bien à Toi.
NodeRef nodeRef = personService.getPerson(userName); locale = (Locale)nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE);
StoreRef store = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore"); String query = "+TYPE:\"cm:person\" +@cm\\:userName:\"USER_NAME\""; ResultSet rs = searchService.query(store, SearchService.LANGUAGE_LUCENE, query); if(rs !=null && rs.length()>0) { NodeRef node = rs.getNodeRef(0); NodeRef child =nodeService.getChildByName(node, QName.createQName("{http://www.alfresco.org/model/application/1.0}configurations"), "{http://www.alfresco.org/model/application/1.0}configurations"); child = nodeService.getChildByName(child, ContentModel.ASSOC_CONTAINS, "{http://www.alfresco.org/model/application/1.0}preferences"); String locale = (String)nodeService.getProperty(child, QName.createQName("{http://www.alfresco.org/model/application/1.0}interface-language")); }
serviceRegistry.getNodeService().getProperty(person, ContentModel.PROP_LOCALE).toString()