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.
var properties = node.getAspectPropertiesOnly('xy:myAspect'); // <— just an example this method does not exists for (key in properties) { logger.log(key + "=" + properties[key]); // do some operation… }
var ctx = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext(); var model = Packages.org.alfresco.model.ContentModel; var dictionaryService = ctx.getBean("DictionaryService"); var myAspect = dictionaryService.getAspect(model.ASPECT_TITLED); var props = myAspect.getProperties(); for (var i = 0; i < props.length; i++) { print("Prop Name = " + props.name); print(node.properties[props.name]); }
var ctx = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext(); var dictionaryService = ctx.getBean("DictionaryService"); var namespaceService = ctx.getBean("NamespaceService"); var QName = Packages.org.alfresco.service.namespace.QName; var qnameAspect = QName.createQName("xy:myAspect", namespaceService); var myAspect = dictionaryService.getAspect(qnameAspect); var props = myAspect.getProperties(); for (var i = 0; i < props.length; i++) { print("Prop Name = " + props.name); print(node.properties[props.name]); }