1    /*
2     * Copyright 2006 :torweg free software group
3     * 
4     * This program is free software: you can redistribute it and/or modify
5     * it under the terms of the GNU General Public License as published by
6     * the Free Software Foundation, either version 3 of the License, or
7     * (at your option) any later version.
8     * 
9     * This program is distributed in the hope that it will be useful,
10    * but WITHOUT ANY WARRANTY; without even the implied warranty of
11    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    * GNU General Public License for more details.
13    * 
14    * You should have received a copy of the GNU General Public License
15    * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16    *
17    */
18   package org.torweg.pulse.component.core.site.map;
19   
20   import org.jdom.Element;
21   import org.torweg.pulse.bundle.Result;
22   
23   /**
24    * the {@code Result} for {@code Controller}
25    * {@code GetFullSitemap}.
26    * 
27    * @author Daniel Dietz
28    * @version $Revision: 1459 $
29    */
30   public class GetFullSitemapResult implements Result {
31   
32       /**
33        * serialVersionUID.
34        */
35       private static final long serialVersionUID = -6385584786578829519L;
36   
37       /**
38        * the commandSiteMapNodes.
39        */
40       private Element commandSiteMapNodes;
41   
42       /**
43        * @return returns the result as an {@code Element}.
44        * @see org.torweg.pulse.bundle.Result#deserializeToJDOM()
45        */
46       public final Element deserializeToJDOM() {
47           Element result = new Element("result").setAttribute("class", this
48                   .getClass().getCanonicalName());
49           if (this.commandSiteMapNodes != null) {
50               Element cmdSitemap = new Element("Sitemap");
51               cmdSitemap.addContent(this.commandSiteMapNodes);
52               result.addContent(cmdSitemap);
53           }
54           return result;
55       }
56   
57       /**
58        * sets the commandSiteMapNodes {@code Elements}.
59        * 
60        * @param csns
61        *            the {@code Element} representing the
62        *            {@code SitemapNode}s
63        */
64       public final void setCommandSitemapNodes(final Element csns) {
65           this.commandSiteMapNodes = csns;
66   
67       }
68   
69   }
70