KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > theme > strategy > AbstractLayoutStrategy


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 package org.jboss.portal.server.theme.strategy;
9
10 import org.jboss.portal.common.MediaType;
11
12 /**
13  * Abstract implementation of the layout strategy interface.
14  * <p>This implementation serves as base class for all layout strategies. All strategies have to extend this class.</p>
15  *
16  * @author <a HREF="mailto:mholzner@novell.com">Martin Holzner</a>.
17  * @version <tt>$Revision: 1.2 $</tt>
18  * @see LayoutStrategy
19  */

20 public abstract class AbstractLayoutStrategy implements LayoutStrategy
21 {
22    private MediaType mediaType = null;
23    private String JavaDoc name = null;
24    private String JavaDoc appName = null;
25
26    public AbstractLayoutStrategy()
27    {
28    }
29
30    /**
31     * Set the media type (the content type) of this strategy.
32     *
33     * @param mediaType the media type to set
34     */

35    public void setMediaType(MediaType mediaType)
36    {
37       this.mediaType = mediaType;
38    }
39
40    /**
41     * Get the media type (content/mime type) this strategy is assigned to.
42     *
43     * @return the media type this strategy handles
44     */

45    public MediaType getMediaType()
46    {
47       return mediaType;
48    }
49
50    /**
51     * Get the name of this strategy.
52     *
53     * @return the name of this strategy
54     */

55    public String JavaDoc getName()
56    {
57       return name;
58    }
59
60    /**
61     * Set the name of this strategy.
62     *
63     * @param name the name of this strategy
64     */

65    public void setName(String JavaDoc name)
66    {
67       this.name = name;
68    }
69
70    /**
71     * Get the name of the application (the WAR) that contains this strategy.
72     *
73     * @return the name of the application (the WAR) that contains this strategy
74     */

75    public String JavaDoc getAppName()
76    {
77       return appName;
78    }
79
80    /**
81     * Set the name of the application that contains this strategy.
82     *
83     * @param appName the name of the application that contains this strategy
84     */

85    public void setAppName(String JavaDoc appName)
86    {
87       this.appName = appName;
88    }
89 }
90
Popular Tags