• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / sitemesh2 / 59

22 Mar 2026 02:30AM UTC coverage: 40.347%. Remained the same
59

push

github

hazendaz
[mvn] Update maven wrapper

698 of 1891 branches covered (36.91%)

Branch coverage included in aggregate %.

1555 of 3693 relevant lines covered (42.11%)

0.42 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/opensymphony/module/sitemesh/mapper/FrameSetDecoratorMapper.java
1
/*
2
 * SPDX-License-Identifier: Apache-2.0
3
 * Copyright 2011-2026 Hazendaz
4
 */
5
/*
6
 * Title:        FrameSetDecoratorMapper
7
 * Description:
8
 *
9
 * This software is published under the terms of the OpenSymphony Software
10
 * License version 1.1, of which a copy has been included with this
11
 * distribution in the LICENSE.txt file.
12
 */
13

14
package com.opensymphony.module.sitemesh.mapper;
15

16
import com.opensymphony.module.sitemesh.Config;
17
import com.opensymphony.module.sitemesh.Decorator;
18
import com.opensymphony.module.sitemesh.DecoratorMapper;
19
import com.opensymphony.module.sitemesh.HTMLPage;
20
import com.opensymphony.module.sitemesh.Page;
21

22
import jakarta.servlet.http.HttpServletRequest;
23

24
import java.util.Properties;
25

26
/**
27
 * The FrameSetDecoratorMapper will use the specified decorator when the Page is an instance of
28
 * {@link com.opensymphony.module.sitemesh.HTMLPage} and <code>isFrameSet()</code> returns true.
29
 * <p>
30
 * The name of this decorator should be supplied in the <code>decorator</code> property - if no decorator property is
31
 * supplied, no decorator is applied to frame based pages.
32
 *
33
 * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
34
 *
35
 * @see com.opensymphony.module.sitemesh.DecoratorMapper
36
 */
37
public class FrameSetDecoratorMapper extends AbstractDecoratorMapper {
×
38

39
    /** The decorator. */
40
    private String decorator = null;
×
41

42
    @Override
43
    public void init(Config config, Properties properties, DecoratorMapper parent) throws InstantiationException {
44
        super.init(config, properties, parent);
×
45
        decorator = properties.getProperty("decorator");
×
46
    }
×
47

48
    @Override
49
    public Decorator getDecorator(HttpServletRequest request, Page page) {
50
        if (page instanceof HTMLPage && ((HTMLPage) page).isFrameSet()) {
×
51
            return getNamedDecorator(request, decorator);
×
52
        }
53
        return super.getDecorator(request, page);
×
54
    }
55
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc