From 48023b8f558ed5eafa380ba98844bd98dc963fd0 Mon Sep 17 00:00:00 2001 From: jensp Date: Thu, 21 Mar 2013 20:31:25 +0000 Subject: [PATCH] Some documentation added to the PublicationExportLink component. git-svn-id: https://svn.libreccm.org/ccm/trunk@2102 8810af33-2d31-482b-a856-94f89814c4df --- .../ui/PublicationExportLinks.java | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ccm-sci-publicationsexportlinks/src/com/arsdigita/cms/scipublications/ui/PublicationExportLinks.java b/ccm-sci-publicationsexportlinks/src/com/arsdigita/cms/scipublications/ui/PublicationExportLinks.java index e59fcdb70..0bc534873 100644 --- a/ccm-sci-publicationsexportlinks/src/com/arsdigita/cms/scipublications/ui/PublicationExportLinks.java +++ b/ccm-sci-publicationsexportlinks/src/com/arsdigita/cms/scipublications/ui/PublicationExportLinks.java @@ -9,20 +9,31 @@ import com.arsdigita.xml.Element; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** - * + * This component creates export links for all publications in a category. The export works with the descendCategories + * parameter set to true and false. Filters from a {@link CustomizableObjectList} are also supported. To add the + * component add the following to your JSP template: + * + *
+ *      
+ *       
+ *  ((com.arsdigita.cms.scipublications.ui.PublicationExportLinks)publicationExportLinks).setObjList(objList);
+ *  
+ * 
+ * + * {@code objList} is to be supposed the name of variable for the object list in the template. + * * @author Jens Pelzetter * @version $Id$ */ public class PublicationExportLinks extends AbstractComponent { private CustomizableObjectList objList; - + public Element generateXML(final HttpServletRequest request, final HttpServletResponse response) { @@ -41,7 +52,7 @@ public class PublicationExportLinks extends AbstractComponent { public void setObjList(final CustomizableObjectList objList) { this.objList = objList; } - + private void createExportLink(final PublicationFormat format, final Element parent, final Category category) { @@ -59,7 +70,7 @@ public class PublicationExportLinks extends AbstractComponent { filterSqlElem.setText(""); } final Element desCatsElem = exportLinkElem.newChildElement("descendCategories"); - if (objList.getDefinition().getDescendCategories()) { + if (objList.getDefinition().getDescendCategories()) { desCatsElem.setText("true"); } else { desCatsElem.setText("false");