1 17 18 19 20 package org.apache.lenya.cms.publication.task; 21 22 import org.apache.lenya.cms.publication.Document; 23 import org.apache.lenya.cms.task.ExecutionException; 24 25 28 public class CopyDocumentToArea extends DocumentTask { 29 30 public static final String PARAMETER_DESTINATION_AREA = "destination-area"; 31 32 35 public void execute(String servletContextPath) throws ExecutionException { 36 37 Document document = getDocument(); 38 String area; 39 try { 40 area = getParameters().getParameter(PARAMETER_DESTINATION_AREA); 41 getPublication().copyDocumentToArea(document, area); 42 } catch (Exception e) { 43 throw new ExecutionException(e); 44 } 45 } 46 47 } 48 | Popular Tags |