%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
org.apache.jetspeed.om.page.psml.DefaultsImpl |
|
|
1 | /* |
|
2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
|
3 | * contributor license agreements. See the NOTICE file distributed with |
|
4 | * this work for additional information regarding copyright ownership. |
|
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
|
6 | * (the "License"); you may not use this file except in compliance with |
|
7 | * the License. You may obtain a copy of the License at |
|
8 | * |
|
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
10 | * |
|
11 | * Unless required by applicable law or agreed to in writing, software |
|
12 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 | * See the License for the specific language governing permissions and |
|
15 | * limitations under the License. |
|
16 | */ |
|
17 | ||
18 | package org.apache.jetspeed.om.page.psml; |
|
19 | ||
20 | import java.util.Map; |
|
21 | import java.util.HashMap; |
|
22 | ||
23 | import org.apache.jetspeed.om.page.Fragment; |
|
24 | ||
25 | /** |
|
26 | * @version $Id: DefaultsImpl.java 516448 2007-03-09 16:25:47Z ate $ |
|
27 | */ |
|
28 | 0 | public class DefaultsImpl |
29 | { |
|
30 | ||
31 | 0 | private String skin = null; |
32 | 0 | private Map decoratorMap = new HashMap(); |
33 | ||
34 | /** |
|
35 | * getSkin |
|
36 | * |
|
37 | * @return skin name used in decorators |
|
38 | */ |
|
39 | public String getSkin() |
|
40 | { |
|
41 | 0 | return this.skin; |
42 | } |
|
43 | ||
44 | /** |
|
45 | * setSkin |
|
46 | * |
|
47 | * @param skin name used in decorators |
|
48 | */ |
|
49 | public void setSkin(String skin) |
|
50 | { |
|
51 | 0 | this.skin = skin; |
52 | 0 | } |
53 | ||
54 | /** |
|
55 | * getDecorator |
|
56 | * |
|
57 | * @param type Fragment.LAYOUT or Fragment.PORTLET constants |
|
58 | * @return decorator name |
|
59 | */ |
|
60 | public String getDecorator(String type) |
|
61 | { |
|
62 | 0 | return (String)decoratorMap.get(type); |
63 | } |
|
64 | ||
65 | /** |
|
66 | * setDecorator |
|
67 | * |
|
68 | * @param type Fragment.LAYOUT or Fragment.PORTLET constants |
|
69 | * @param decorator decorator name |
|
70 | */ |
|
71 | public void setDecorator(String type, String decorator) |
|
72 | { |
|
73 | 0 | decoratorMap.put(type,decorator); |
74 | 0 | } |
75 | ||
76 | /** |
|
77 | * getLayoutDecorator |
|
78 | * |
|
79 | * @return Fragment.LAYOUT decorator name |
|
80 | */ |
|
81 | public String getLayoutDecorator() |
|
82 | { |
|
83 | 0 | return getDecorator(Fragment.LAYOUT); |
84 | } |
|
85 | ||
86 | /** |
|
87 | * setLayoutDecorator |
|
88 | * |
|
89 | * @param decorator Fragment.LAYOUT decorator name |
|
90 | */ |
|
91 | public void setLayoutDecorator(String decorator) |
|
92 | { |
|
93 | 0 | setDecorator(Fragment.LAYOUT,decorator); |
94 | 0 | } |
95 | ||
96 | /** |
|
97 | * getPortletDecorator |
|
98 | * |
|
99 | * @return Fragment.PORTLET decorator name |
|
100 | */ |
|
101 | public String getPortletDecorator() |
|
102 | { |
|
103 | 0 | return getDecorator(Fragment.PORTLET); |
104 | } |
|
105 | ||
106 | /** |
|
107 | * setPortletDecorator |
|
108 | * |
|
109 | * @param decorator Fragment.PORTLET decorator name |
|
110 | */ |
|
111 | public void setPortletDecorator(String decorator) |
|
112 | { |
|
113 | 0 | setDecorator(Fragment.PORTLET,decorator); |
114 | 0 | } |
115 | ||
116 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |