private void MoverDirectorio(Reference directorio, Reference destino, string nombreNuevo, string nombreViejo)
{
ParentReference padreDestino = ConvertirAPadre(destino);
padreDestino.childName = Constantes.crearQNameString(Constantes.NAMESPACE_CONTENT_MODEL, Constantes.normaliza(nombreNuevo));
CMLMove cmlMover = new CMLMove();
cmlMover.childName = Constantes.crearQNameString(Constantes.NAMESPACE_CONTENT_MODEL, nombreViejo);
cmlMover.associationType = Constantes.ASSOC_CONTAINS;
cmlMover.to = padreDestino;
Predicate pred = new Predicate();
pred.Items = new Reference[]{directorio};
cmlMover.where = pred;
//move.setWhere(new Predicate(new Reference[] {space},STORE,null));
NamedValue nvalue = new NamedValue();
nvalue.name = Constantes.PROP_NAME;
nvalue.value = nombreNuevo;
CMLUpdate cmlActualizar = new CMLUpdate();
cmlActualizar.property = new NamedValue[] { nvalue };
cmlActualizar.where = pred;
//cmlActualizar.where_id = this.contenedorCarpetas.address;
//update.setWhere(new Predicate(new Reference[]{space},STORE,null));
CML cml = new CML();
cml.move = new CMLMove[]{cmlMover};
cml.update = new CMLUpdate[]{cmlActualizar};
//Execute the CML move and Update statement
try
{
servicioRepository.update(cml);
}
catch (Exception e2)
{
throw e2;
}
}
En el ejemplo de la página construyen el objeto predicado pasándole un store general, pero el constructor del predicado no tiene parámetros, así que no sé cómo hacerlo.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.