| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.seasar.teeda.core.config.faces.assembler; |
| 17 | |
|
| 18 | |
import javax.faces.application.Application; |
| 19 | |
|
| 20 | |
import org.seasar.teeda.core.util.MarshalUtil; |
| 21 | |
|
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | |
public abstract class ApplicationChildAssembler implements JsfAssembler { |
| 26 | |
|
| 27 | |
private Application application_; |
| 28 | |
|
| 29 | |
private String targetName_; |
| 30 | |
|
| 31 | 39 | public ApplicationChildAssembler(String targetName, Application application) { |
| 32 | 39 | if (targetName == null || targetName.equals("")) { |
| 33 | 0 | throw new IllegalArgumentException("targetName"); |
| 34 | |
} |
| 35 | 39 | if (application == null) { |
| 36 | 0 | throw new IllegalArgumentException("application"); |
| 37 | |
} |
| 38 | 39 | application_ = application; |
| 39 | 39 | targetName_ = targetName; |
| 40 | 39 | } |
| 41 | |
|
| 42 | 4 | public ApplicationChildAssembler(Application application) { |
| 43 | 4 | if (application == null) { |
| 44 | 0 | throw new IllegalArgumentException("application"); |
| 45 | |
} |
| 46 | 4 | application_ = application; |
| 47 | 4 | } |
| 48 | |
|
| 49 | |
protected Object createMarshalInstance(Class clazz, Object previous) { |
| 50 | 31 | return MarshalUtil.createMarshalInstance(targetName_, clazz, previous); |
| 51 | |
} |
| 52 | |
|
| 53 | |
protected final Application getApplication() { |
| 54 | 78 | return application_; |
| 55 | |
} |
| 56 | |
|
| 57 | |
protected final String getTargetName() { |
| 58 | 8 | return targetName_; |
| 59 | |
} |
| 60 | |
} |