protected void executeImpl(Action action, NodeRef node) {
// TODO Auto-generated method stub
logger.debug("executeImpl");
//logger del nombre del nodo, funciona bien y me da su nombre
logger.debug("node.name: "+nodeService.getProperty(node, ContentModel.PROP_NAME));
//Cojo el parent del nodo
ChildAssociationRef childAssociationRef = nodeService.getPrimaryParent(node);
NodeRef parent = childAssociationRef.getParentRef();
//logger del nombre del parent, funciona correctamente y me da el nombre del parent
logger.debug("parent.name: "+nodeService.getProperty(parent, ContentModel.PROP_NAME));
//Aqui es donde tengo los problemas, teniendo el parent no consigo obtener el nodo de otro fuchero
NodeRef nodoPrueba = nodeService.getChildByName(parent, ContentModel.PROP_CONTENT, "prueba.txt");
NodeRef nodoPrueba2 = nodeService.getChildByName(parent, ContentModel.PROP_CONTENT, "eec2e919-9bd8-44ef-9315-99b554bf5d3a");
// el nodeRef del nodo: workspace://SpacesStore/eec2e919-9bd8-44ef-9315-99b554bf5d3a
}
NodeRef nodoPrueba = fileFolderService.searchSimple(parent, "prueba.txt");
NodeRef nodoPrueba = nodeService.getChildByName(parent, ContentModel.ASSOC_CONTAINS, "prueba.txt");
NodeRef nodoPrueba = fileFolderService.searchSimple(parent, "prueba.txt");
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.