| 1 | |
package org.webslinger.rules; |
| 2 | |
|
| 3 | |
import java.io.IOException; |
| 4 | |
import javax.servlet.ServletRequest; |
| 5 | |
import javax.servlet.http.HttpServletRequest; |
| 6 | |
import javax.servlet.http.HttpSession; |
| 7 | |
|
| 8 | |
import org.webslinger.PathContext; |
| 9 | |
import org.webslinger.Webslinger; |
| 10 | |
|
| 11 | |
public class CSSThemeValue extends AbstractPathValue { |
| 12 | |
private String path; |
| 13 | |
|
| 14 | |
public CSSThemeValue(int id) { |
| 15 | 0 | super(id); |
| 16 | 0 | } |
| 17 | |
|
| 18 | |
public CSSThemeValue(Rules p, int id) { |
| 19 | 43 | super(p, id); |
| 20 | 43 | } |
| 21 | |
|
| 22 | |
|
| 23 | |
public Object jjtAccept(RulesVisitor visitor, Object data) { |
| 24 | 0 | return visitor.visit(this, data); |
| 25 | |
} |
| 26 | |
|
| 27 | |
void setPath(String path) { |
| 28 | 43 | this.path = path; |
| 29 | 43 | } |
| 30 | |
|
| 31 | |
public String getPath() { |
| 32 | 527 | return path; |
| 33 | |
} |
| 34 | |
|
| 35 | |
public PathContext getValue(ServletRequest request, Webslinger top) throws IOException { |
| 36 | 527 | return top.resolvePath(request.getAttribute("THEMEPATH") + "/" + getPath()); |
| 37 | |
} |
| 38 | |
|
| 39 | |
public String toString() { |
| 40 | 0 | return "ThemeValue(" + getPath() + ")"; |
| 41 | |
} |
| 42 | |
} |