12-09-2011 04:53 AM
12-09-2011 06:02 AM
/**
* The root node has an entry in the path(s) returned. For this reason, there
* will always be <b>at least one</b> path element in the returned path(s).
* The first element will have a null parent reference and qname.
*
* @param nodeRef
* @return Returns the path to the node along the primary node path
* @throws InvalidNodeRefException if the node could not be found
*
* @see #getPaths(NodeRef, boolean)
*/
@Auditable(parameters = {"nodeRef"})
public Path getPath(NodeRef nodeRef) throws InvalidNodeRefException;
12-09-2011 06:42 AM
var origine = companyhome.childByNamePath("A TRAITER");
var destination = companyhome.childByNamePath("RESERVE");
var i=0;
var fichier = origine.children;
var nombreDeFichier = fichier.length;
for(i=0;i<nombreDeFichier;i++)
{
if(fichier[i] != null)
{
var fichierEntrant=fichier[i];
var nomDuFichier=getPath(fichierEntrant);
//récupérer le fichier ayant le méme nom dans l'espace "valider" et le transférer dans le dossier "RESERVE"
var reference = ["workspace", "SpacesStore", "Company Home" ,"valider" , nomDuFichier];
var referenceType = "path";
var rechercheFichier = search.findNode(referenceType, reference);
rechercheFichier.move(destination);
}
}
le dossier valider contient le fichier "test.doc"Failed to create content due to error: 1109714767 Failed to execute script 'workspace://SpacesStore/040c905a-47de-41dc-ab25-e70a48b2ac5f': 1109714766 ReferenceError: "getPath" is not defined. (workspace://SpacesStore/040c905a-47de-41dc-ab25-e70a48b2ac5f#21)
12-09-2011 07:14 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.