|
|||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| BrownieIncludeTagHandler.java | 0% | 0% | 0% | 0% |
|
||||||||||||||
| 1 |
/*
|
|
| 2 |
* brownies and its relative products are published under the terms
|
|
| 3 |
* of the Apache Software License.
|
|
| 4 |
*
|
|
| 5 |
* Created on 2004/06/11 2:08:31
|
|
| 6 |
*/
|
|
| 7 |
package org.asyrinx.brownie.seasar.container.factory;
|
|
| 8 |
|
|
| 9 |
import org.seasar.framework.container.S2Container;
|
|
| 10 |
import org.seasar.framework.container.factory.TagAttributeNotDefinedRuntimeException;
|
|
| 11 |
import org.seasar.framework.xml.TagHandler;
|
|
| 12 |
import org.seasar.framework.xml.TagHandlerContext;
|
|
| 13 |
import org.xml.sax.Attributes;
|
|
| 14 |
|
|
| 15 |
/**
|
|
| 16 |
* @author akima
|
|
| 17 |
*/
|
|
| 18 |
public class BrownieIncludeTagHandler extends TagHandler { |
|
| 19 |
|
|
| 20 |
/**
|
|
| 21 |
*
|
|
| 22 |
*/
|
|
| 23 | 0 |
public BrownieIncludeTagHandler() {
|
| 24 | 0 |
super();
|
| 25 |
} |
|
| 26 |
|
|
| 27 |
/**
|
|
| 28 |
* @see org.seasar.framework.xml.sax.handler.TagHandler#start(org.seasar.framework.xml.sax.handler.TagHandlerContext,
|
|
| 29 |
* org.xml.sax.Attributes)
|
|
| 30 |
*/
|
|
| 31 | 0 |
public void start(TagHandlerContext context, Attributes attributes) { |
| 32 | 0 |
final String path = attributes.getValue("path");
|
| 33 | 0 |
if (path == null) { |
| 34 | 0 |
throw new TagAttributeNotDefinedRuntimeException("include", "path"); |
| 35 |
} |
|
| 36 |
/*
|
|
| 37 |
* ここが変わってます。
|
|
| 38 |
*/
|
|
| 39 | 0 |
final S2Container child = BrownieS2ContainerFactory.create(path); |
| 40 | 0 |
final S2Container container = (S2Container) context.peek(); |
| 41 | 0 |
container.include(child); |
| 42 |
} |
|
| 43 |
} |
|
||||||||||