package org.atosorigin.repo.action.executer;
import org.alfresco.error.AlfrescoRuntimeException;
public class testException extends AlfrescoRuntimeException {
/**
*
*/
private String cannotPaste;
public testException(String cannotPaste){
super(cannotPaste);
this.cannotPaste=cannotPaste;
}
/*public String getCannotPaste(){
return cannotPaste;
}*/
public String getMessage(){
return (" Attention " + cannotPaste + ", cette valeur est encorre utilisé."); //getCannotPaste();
}
}
protected void executeImpl(final Action ruleAction,
final NodeRef actionedUponNodeRef)
{
/*
* recuperation du name de l'espace et celui de l'espace parent
*/
String namevaleur = nodeService.getProperty(actionedUponNodeRef,
valeurMetadata(actionedUponNodeRef, "name")).toString();
NodeRef nodeparent = nodeService.getPrimaryParent(actionedUponNodeRef)
.getParentRef();
String nameParent = nodeService.getProperty(nodeparent,
valeurMetadata(actionedUponNodeRef, "name")).toString();
nameParent = nameParent.replaceAll("\\s", "");
if (nameParent.contains("toto")) {
List<NodeRef> result = requeteLucene("ASPECT", "propertytoto");
if (!verifieValeur(result, "titi", namevaleur)) {
System.out.println("je v supprimer la valeur");
deleteValeur(namevaleur, nameParent);
} else {
System.out.println("afficher message d'erreur");
throw new testException(namevaleur);
}
}
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.