AnsweredAssumed Answered

Problemi in fase di creazione di spazi

Question asked by fracat71 on Apr 28, 2010
Latest reply on May 11, 2010 by fracat71
Ciao,
ho una classe main che usa le foundation API per creare una cartella

private static NodeRef createFolder(ServiceRegistry serviceRegistry, NodeRef node, String name) {
Map<QName, Serializable> contentProps = new HashMap<QName, Serializable>();
contentProps.put(ContentModel.PROP_NAME, name);
contentProps.put(ContentModel.PROP_DESCRIPTION, name);   
NodeService nodeService = serviceRegistry.getNodeService();
ChildAssociationRef association = nodeService.createNode(node, ContentModel.ASSOC_CONTAINS, QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, name), ContentModel.TYPE_FOLDER, contentProps);
return association.getChildRef();
}

quando la ricerco usando lucene - PATH:"/app:company_home/cm:ParentSpace/*" non la trovo.

Ho  anche una classe main che usa i webservice  API per creare una cartella

ParentReference parentReference = new ParentReference(STORE, null, parentFolder, Constants.ASSOC_CONTAINS, Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, realfolderName));

// Create folder
NamedValue[] properties = new NamedValue[] { Utils.createNamedValue(Constants.PROP_NAME, realfolderNameRepalced), Utils.createNamedValue(Constants.PROP_DESCRIPTION, realfolderNameRepalced) };
CMLCreate create = new CMLCreate("1", parentReference, null, null, null, Constants.TYPE_FOLDER, properties);

CML cml = new CML();
cml.setCreate(new CMLCreate[] { create });
UpdateResult[] results = WebServiceFactory.getRepositoryService().update(cml);


quando la cerco con lucene - PATH:"/app:company_home/cm:ParentSpace/*" la trovo.

Pera ricerca con lucene non funziona se creo la cartella con le foudation API?

Grazie
Francesco

Outcomes