| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.seasar.teeda.core.config.faces.assembler.impl; |
| 17 | |
|
| 18 | |
import java.util.Collections; |
| 19 | |
import java.util.Iterator; |
| 20 | |
import java.util.List; |
| 21 | |
|
| 22 | |
import javax.faces.application.Application; |
| 23 | |
|
| 24 | |
import org.seasar.teeda.core.config.faces.assembler.ApplicationAssemblerHelper; |
| 25 | |
import org.seasar.teeda.core.config.faces.element.LocaleConfigElement; |
| 26 | |
import org.seasar.teeda.core.util.IteratorUtil; |
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
public class ApplicationAssemblerHelperImpl implements |
| 34 | |
ApplicationAssemblerHelper { |
| 35 | |
|
| 36 | |
private Application application_; |
| 37 | |
|
| 38 | 3 | private List assemblers_ = Collections.EMPTY_LIST; |
| 39 | |
|
| 40 | |
public ApplicationAssemblerHelperImpl(Application application, |
| 41 | 3 | List assemblers) { |
| 42 | 3 | application_ = application; |
| 43 | 3 | assemblers_ = assemblers; |
| 44 | 3 | } |
| 45 | |
|
| 46 | |
public void setupActionListenerAssembler(List listenerNames) { |
| 47 | |
|
| 48 | 3 | for (Iterator itr = IteratorUtil.getIterator(listenerNames); itr |
| 49 | 6 | .hasNext();) { |
| 50 | 3 | String actionListenerName = (String) itr.next(); |
| 51 | 3 | assemblers_.add(new ActionListenerAssembler(actionListenerName, |
| 52 | |
application_)); |
| 53 | |
} |
| 54 | 3 | } |
| 55 | |
|
| 56 | |
public void setupLocaleConfigAssembler(List localeConfigs) { |
| 57 | 3 | for (Iterator itr = IteratorUtil.getIterator(localeConfigs); itr |
| 58 | 6 | .hasNext();) { |
| 59 | 3 | LocaleConfigElement localeConfig = (LocaleConfigElement) itr.next(); |
| 60 | 3 | assemblers_.add(new LocaleConfigAssembler(localeConfig, |
| 61 | |
application_)); |
| 62 | |
} |
| 63 | 3 | } |
| 64 | |
|
| 65 | |
public void setupNavigationHandlerAssembler(List navigationHandlers) { |
| 66 | 3 | for (Iterator itr = IteratorUtil.getIterator(navigationHandlers); itr |
| 67 | 6 | .hasNext();) { |
| 68 | 3 | String handlerName = (String) itr.next(); |
| 69 | 3 | assemblers_.add(new NavigationHandlerAssembler(handlerName, |
| 70 | |
application_)); |
| 71 | |
} |
| 72 | 3 | } |
| 73 | |
|
| 74 | |
public void setupPropertyResolverAssembler(List propertyResolvers) { |
| 75 | 3 | for (Iterator itr = IteratorUtil.getIterator(propertyResolvers); itr |
| 76 | 6 | .hasNext();) { |
| 77 | 3 | String resolverName = (String) itr.next(); |
| 78 | 3 | assemblers_.add(new PropertyResolverAssembler(resolverName, |
| 79 | |
application_)); |
| 80 | |
} |
| 81 | 3 | } |
| 82 | |
|
| 83 | |
public void setupStateManagerAssembler(List stateManagers) { |
| 84 | 3 | for (Iterator itr = IteratorUtil.getIterator(stateManagers); itr |
| 85 | 6 | .hasNext();) { |
| 86 | 3 | String stateManagerName = (String) itr.next(); |
| 87 | 3 | assemblers_.add(new StateManagerAssembler(stateManagerName, |
| 88 | |
application_)); |
| 89 | |
} |
| 90 | 3 | } |
| 91 | |
|
| 92 | |
public void setupVariableResolverAssembler(List variableResolvers) { |
| 93 | 3 | for (Iterator itr = IteratorUtil.getIterator(variableResolvers); itr |
| 94 | 6 | .hasNext();) { |
| 95 | 3 | String resolverName = (String) itr.next(); |
| 96 | 3 | assemblers_.add(new VariableResolverAssembler(resolverName, |
| 97 | |
application_)); |
| 98 | |
} |
| 99 | 3 | } |
| 100 | |
|
| 101 | |
public void setupViewHandlerAssembler(List viewHandlers) { |
| 102 | 3 | for (Iterator itr = IteratorUtil.getIterator(viewHandlers); itr |
| 103 | 6 | .hasNext();) { |
| 104 | 3 | String handlerName = (String) itr.next(); |
| 105 | 3 | assemblers_ |
| 106 | |
.add(new ViewHandlerAssembler(handlerName, application_)); |
| 107 | |
} |
| 108 | 3 | } |
| 109 | |
|
| 110 | |
public void setupDefaultRenderKitIdAssembler(List defaultRenderKitIds) { |
| 111 | 3 | for (Iterator itr = IteratorUtil.getIterator(defaultRenderKitIds); itr |
| 112 | 6 | .hasNext();) { |
| 113 | 3 | String defaultRenderKitId = (String) itr.next(); |
| 114 | 3 | assemblers_.add(new DefaultRenderKitIdAssembler(defaultRenderKitId, |
| 115 | |
application_)); |
| 116 | |
} |
| 117 | 3 | } |
| 118 | |
|
| 119 | |
public void setupMessageBundleAssembler(List messageBundles) { |
| 120 | 3 | for (Iterator itr = IteratorUtil.getIterator(messageBundles); itr |
| 121 | 6 | .hasNext();) { |
| 122 | 3 | String messageBundle = (String) itr.next(); |
| 123 | 3 | assemblers_.add(new MessageBundleAssembler(messageBundle, |
| 124 | |
application_)); |
| 125 | |
} |
| 126 | 3 | } |
| 127 | |
|
| 128 | |
public List getCollectedAssemblers() { |
| 129 | 3 | return assemblers_; |
| 130 | |
} |
| 131 | |
|
| 132 | |
} |