You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2008/05/08 08:31:41 UTC
svn commit: r654427 [2/2] - in
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry:
internal/test/ internal/transform/ internal/util/ json/ runtime/ services/
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/ApplicationStateContribution.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/ApplicationStateContribution.java?rev=654427&r1=654426&r2=654427&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/ApplicationStateContribution.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/ApplicationStateContribution.java Wed May 7 23:31:40 2008
@@ -22,9 +22,9 @@
*/
public final class ApplicationStateContribution
{
- private final String _strategy;
+ private final String strategy;
- private final ApplicationStateCreator _creator;
+ private final ApplicationStateCreator creator;
public ApplicationStateContribution(String strategy)
{
@@ -35,8 +35,8 @@
{
Defense.notBlank(strategy, "strategy");
- _strategy = strategy;
- _creator = creator;
+ this.strategy = strategy;
+ this.creator = creator;
}
/**
@@ -45,7 +45,7 @@
*/
public ApplicationStateCreator getCreator()
{
- return _creator;
+ return creator;
}
/**
@@ -53,7 +53,7 @@
*/
public String getStrategy()
{
- return _strategy;
+ return strategy;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/BeanBlockContribution.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/BeanBlockContribution.java?rev=654427&r1=654426&r2=654427&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/BeanBlockContribution.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/BeanBlockContribution.java Wed May 7 23:31:40 2008
@@ -23,13 +23,13 @@
*/
public final class BeanBlockContribution
{
- private final String _dataType;
+ private final String dataType;
- private final String _pageName;
+ private final String pageName;
- private final String _blockId;
+ private final String blockId;
- private final boolean _edit;
+ private final boolean edit;
public BeanBlockContribution(String dataType, String pageName, String blockId, boolean edit)
{
@@ -37,10 +37,10 @@
notBlank(pageName, "pageName");
notBlank(blockId, "blockId");
- _dataType = dataType;
- _pageName = pageName;
- _blockId = blockId;
- _edit = edit;
+ this.dataType = dataType;
+ this.pageName = pageName;
+ this.blockId = blockId;
+ this.edit = edit;
}
/**
@@ -48,7 +48,7 @@
*/
public String getDataType()
{
- return _dataType;
+ return dataType;
}
/**
@@ -56,7 +56,7 @@
*/
public String getBlockId()
{
- return _blockId;
+ return blockId;
}
/**
@@ -66,7 +66,7 @@
*/
public boolean isEdit()
{
- return _edit;
+ return edit;
}
/**
@@ -74,7 +74,7 @@
*/
public String getPageName()
{
- return _pageName;
+ return pageName;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/ComponentEventRequestParameters.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/ComponentEventRequestParameters.java?rev=654427&r1=654426&r2=654427&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/ComponentEventRequestParameters.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/ComponentEventRequestParameters.java Wed May 7 23:31:40 2008
@@ -22,12 +22,8 @@
*/
public final class ComponentEventRequestParameters
{
- private final String _activePageName;
- private final String _containingPageName;
- private final String _nestedComponentId;
- private final String _eventType;
- private final EventContext _pageActivationContext;
- private final EventContext _eventContext;
+ private final String activePageName, containingPageName, nestedComponentId, eventType;
+ private final EventContext pageActivationContext, eventContext;
public ComponentEventRequestParameters(String activePageName, String containingPageName, String nestedComponentId,
String eventType, EventContext pageActivationContext,
@@ -40,12 +36,12 @@
Defense.notNull(pageActivationContext, "pageActivationContext");
Defense.notNull(eventContext, "eventContext");
- _activePageName = activePageName;
- _containingPageName = containingPageName;
- _nestedComponentId = nestedComponentId;
- _eventType = eventType;
- _pageActivationContext = pageActivationContext;
- _eventContext = eventContext;
+ this.activePageName = activePageName;
+ this.containingPageName = containingPageName;
+ this.nestedComponentId = nestedComponentId;
+ this.eventType = eventType;
+ this.pageActivationContext = pageActivationContext;
+ this.eventContext = eventContext;
}
// Implements equals() as a convienience for testing.
@@ -57,14 +53,14 @@
ComponentEventRequestParameters that = (ComponentEventRequestParameters) o;
- if (!_activePageName.equals(that._activePageName)) return false;
- if (!_containingPageName.equals(that._containingPageName)) return false;
- if (!_eventType.equals(that._eventType)) return false;
- if (!_nestedComponentId.equals(that._nestedComponentId)) return false;
+ if (!activePageName.equals(that.activePageName)) return false;
+ if (!containingPageName.equals(that.containingPageName)) return false;
+ if (!eventType.equals(that.eventType)) return false;
+ if (!nestedComponentId.equals(that.nestedComponentId)) return false;
- if (!isEqual(_eventContext, that._eventContext)) return false;
+ if (!isEqual(eventContext, that.eventContext)) return false;
- return isEqual(_pageActivationContext, that._pageActivationContext);
+ return isEqual(pageActivationContext, that.pageActivationContext);
}
private boolean isEqual(EventContext left, EventContext right)
@@ -91,7 +87,7 @@
*/
public String getActivePageName()
{
- return _activePageName;
+ return activePageName;
}
/**
@@ -101,7 +97,7 @@
*/
public String getContainingPageName()
{
- return _containingPageName;
+ return containingPageName;
}
/**
@@ -110,7 +106,7 @@
*/
public String getNestedComponentId()
{
- return _nestedComponentId;
+ return nestedComponentId;
}
/**
@@ -119,7 +115,7 @@
*/
public String getEventType()
{
- return _eventType;
+ return eventType;
}
/**
@@ -130,7 +126,7 @@
*/
public EventContext getPageActivationContext()
{
- return _pageActivationContext;
+ return pageActivationContext;
}
/**
@@ -141,6 +137,6 @@
*/
public EventContext getEventContext()
{
- return _eventContext;
+ return eventContext;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/LibraryMapping.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/LibraryMapping.java?rev=654427&r1=654426&r2=654427&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/LibraryMapping.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/LibraryMapping.java Wed May 7 23:31:40 2008
@@ -28,29 +28,27 @@
*/
public final class LibraryMapping
{
- private final String _pathPrefix;
-
- private final String _rootPackage;
+ private final String pathPrefix, rootPackage;
public LibraryMapping(String pathPrefix, String rootPackage)
{
- _pathPrefix = pathPrefix;
- _rootPackage = rootPackage;
+ this.pathPrefix = pathPrefix;
+ this.rootPackage = rootPackage;
}
public String getPathPrefix()
{
- return _pathPrefix;
+ return pathPrefix;
}
public String getRootPackage()
{
- return _rootPackage;
+ return rootPackage;
}
@Override
public String toString()
{
- return String.format("LibraryMapping[%s, %s]", _pathPrefix, _rootPackage);
+ return String.format("LibraryMapping[%s, %s]", pathPrefix, rootPackage);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/PageRenderRequestParameters.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/PageRenderRequestParameters.java?rev=654427&r1=654426&r2=654427&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/PageRenderRequestParameters.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/PageRenderRequestParameters.java Wed May 7 23:31:40 2008
@@ -24,26 +24,26 @@
*/
public class PageRenderRequestParameters
{
- private final String _logicalPageName;
+ private final String logicalPageName;
- private final EventContext _activationContext;
+ private final EventContext activationContext;
public PageRenderRequestParameters(String logicalPageName, EventContext activationContext)
{
Defense.notNull(logicalPageName, "logicalPageName");
Defense.notNull(activationContext, "activationContext");
- _logicalPageName = logicalPageName;
- _activationContext = activationContext;
+ this.logicalPageName = logicalPageName;
+ this.activationContext = activationContext;
}
public String getLogicalPageName()
{
- return _logicalPageName;
+ return logicalPageName;
}
public EventContext getActivationContext()
{
- return _activationContext;
+ return activationContext;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TapestryModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TapestryModule.java?rev=654427&r1=654426&r2=654427&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TapestryModule.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TapestryModule.java Wed May 7 23:31:40 2008
@@ -36,7 +36,6 @@
import org.apache.tapestry.ioc.*;
import org.apache.tapestry.ioc.annotations.*;
import org.apache.tapestry.ioc.internal.util.CollectionFactory;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newCaseInsensitiveMap;
import org.apache.tapestry.ioc.internal.util.IdAllocator;
import org.apache.tapestry.ioc.services.*;
import org.apache.tapestry.ioc.util.StrategyRegistry;
@@ -67,35 +66,35 @@
@SubModule(InternalModule.class)
public final class TapestryModule
{
- private final PipelineBuilder _pipelineBuilder;
+ private final PipelineBuilder pipelineBuilder;
- private final ApplicationGlobals _applicationGlobals;
+ private final ApplicationGlobals applicationGlobals;
- private final PropertyShadowBuilder _shadowBuilder;
+ private final PropertyShadowBuilder shadowBuilder;
- private final Environment _environment;
+ private final Environment environment;
- private final StrategyBuilder _strategyBuilder;
+ private final StrategyBuilder strategyBuilder;
- private final PropertyAccess _propertyAccess;
+ private final PropertyAccess propertyAccess;
- private final ComponentInstantiatorSource _componentInstantiatorSource;
+ private final ComponentInstantiatorSource componentInstantiatorSource;
- private final UpdateListenerHub _updateListenerHub;
+ private final UpdateListenerHub updateListenerHub;
- private final ChainBuilder _chainBuilder;
+ private final ChainBuilder chainBuilder;
- private final Request _request;
+ private final Request request;
- private final Response _response;
+ private final Response response;
- private final ThreadLocale _threadLocale;
+ private final ThreadLocale threadLocale;
- private final RequestGlobals _requestGlobals;
+ private final RequestGlobals requestGlobals;
- private final ActionRenderResponseGenerator _actionRenderResponseGenerator;
+ private final ActionRenderResponseGenerator actionRenderResponseGenerator;
- private final EnvironmentalShadowBuilder _environmentalBuilder;
+ private final EnvironmentalShadowBuilder environmentalBuilder;
/**
@@ -134,21 +133,21 @@
EnvironmentalShadowBuilder environmentalBuilder)
{
- _pipelineBuilder = pipelineBuilder;
- _shadowBuilder = shadowBuilder;
- _requestGlobals = requestGlobals;
- _applicationGlobals = applicationGlobals;
- _chainBuilder = chainBuilder;
- _environment = environment;
- _strategyBuilder = strategyBuilder;
- _componentInstantiatorSource = componentInstantiatorSource;
- _propertyAccess = propertyAccess;
- _updateListenerHub = updateListenerHub;
- _request = request;
- _response = response;
- _threadLocale = threadLocale;
- _actionRenderResponseGenerator = actionRenderResponseGenerator;
- _environmentalBuilder = environmentalBuilder;
+ this.pipelineBuilder = pipelineBuilder;
+ this.shadowBuilder = shadowBuilder;
+ this.requestGlobals = requestGlobals;
+ this.applicationGlobals = applicationGlobals;
+ this.chainBuilder = chainBuilder;
+ this.environment = environment;
+ this.strategyBuilder = strategyBuilder;
+ this.componentInstantiatorSource = componentInstantiatorSource;
+ this.propertyAccess = propertyAccess;
+ this.updateListenerHub = updateListenerHub;
+ this.request = request;
+ this.response = response;
+ this.threadLocale = threadLocale;
+ this.actionRenderResponseGenerator = actionRenderResponseGenerator;
+ this.environmentalBuilder = environmentalBuilder;
}
public static void bind(ServiceBinder binder)
@@ -584,14 +583,14 @@
{
public boolean service(Request request, Response response, RequestHandler handler) throws IOException
{
- _requestGlobals.storeRequestResponse(request, response);
+ requestGlobals.storeRequestResponse(request, response);
return handler.service(request, response);
}
};
configuration.add("CheckForUpdates",
- new CheckForUpdatesFilter(_updateListenerHub, checkInterval, updateTimeout), "before:*");
+ new CheckForUpdatesFilter(updateListenerHub, checkInterval, updateTimeout), "before:*");
configuration.add("StaticFiles", staticFilesFilter);
@@ -747,7 +746,7 @@
public Context buildContext(ApplicationGlobals globals)
{
- return _shadowBuilder.build(globals, "context", Context.class);
+ return shadowBuilder.build(globals, "context", Context.class);
}
public ComponentClassResolver buildComponentClassResolver(ServiceResources resources)
@@ -756,7 +755,7 @@
// Allow the resolver to clean its cache when the source is invalidated
- _componentInstantiatorSource.addInvalidationListener(service);
+ componentInstantiatorSource.addInvalidationListener(service);
return service;
}
@@ -774,7 +773,7 @@
@Marker(ContextProvider.class)
public AssetFactory buildContextAssetFactory(ApplicationGlobals globals, RequestPathOptimizer optimizer)
{
- return new ContextAssetFactory(_request, globals.getContext(), optimizer);
+ return new ContextAssetFactory(request, globals.getContext(), optimizer);
}
/**
@@ -792,7 +791,7 @@
configuration.add(service);
- return _chainBuilder.build(BindingFactory.class, configuration);
+ return chainBuilder.build(BindingFactory.class, configuration);
}
/**
@@ -806,7 +805,7 @@
ValidationMessagesSourceImpl service = new ValidationMessagesSourceImpl(configuration,
classpathAssetFactory.getRootResource());
- _updateListenerHub.addUpdateListener(service);
+ updateListenerHub.addUpdateListener(service);
return service;
}
@@ -815,7 +814,7 @@
{
MetaDataLocatorImpl service = resources.autobuild(MetaDataLocatorImpl.class);
- _componentInstantiatorSource.addInvalidationListener(service);
+ componentInstantiatorSource.addInvalidationListener(service);
return service;
}
@@ -836,7 +835,7 @@
*/
public PageRenderSupport buildPageRenderSupport()
{
- return _environmentalBuilder.build(PageRenderSupport.class);
+ return environmentalBuilder.build(PageRenderSupport.class);
}
/**
@@ -845,7 +844,7 @@
*/
public FormSupport buildFormSupport()
{
- return _environmentalBuilder.build(FormSupport.class);
+ return environmentalBuilder.build(FormSupport.class);
}
/**
@@ -854,7 +853,7 @@
public ComponentClassTransformWorker buildComponentClassTransformWorker(
List<ComponentClassTransformWorker> configuration)
{
- return _chainBuilder.build(ComponentClassTransformWorker.class, configuration);
+ return chainBuilder.build(ComponentClassTransformWorker.class, configuration);
}
/**
@@ -865,7 +864,7 @@
@Marker(Primary.class)
public DataTypeAnalyzer buildDataTypeAnalyzer(List<DataTypeAnalyzer> configuration)
{
- return _chainBuilder.build(DataTypeAnalyzer.class, configuration);
+ return chainBuilder.build(DataTypeAnalyzer.class, configuration);
}
/**
@@ -876,7 +875,7 @@
public InjectionProvider buildInjectionProvider(List<InjectionProvider> configuration)
{
- return _chainBuilder.build(InjectionProvider.class, configuration);
+ return chainBuilder.build(InjectionProvider.class, configuration);
}
@@ -891,12 +890,12 @@
{
public void initializeApplication(Context context)
{
- _applicationGlobals.storeContext(context);
+ applicationGlobals.storeContext(context);
}
};
- return _pipelineBuilder.build(logger, ApplicationInitializer.class, ApplicationInitializerFilter.class,
- configuration, terminator);
+ return pipelineBuilder.build(logger, ApplicationInitializer.class, ApplicationInitializerFilter.class,
+ configuration, terminator);
}
public HttpServletRequestHandler buildHttpServletRequestHandler(Logger logger,
@@ -910,7 +909,7 @@
public boolean service(HttpServletRequest servletRequest, HttpServletResponse servletResponse)
throws IOException
{
- _requestGlobals.storeServletRequestResponse(servletRequest, servletResponse);
+ requestGlobals.storeServletRequestResponse(servletRequest, servletResponse);
Request request = new RequestImpl(servletRequest);
Response response = new ResponseImpl(servletResponse);
@@ -921,8 +920,8 @@
}
};
- return _pipelineBuilder.build(logger, HttpServletRequestHandler.class, HttpServletRequestFilter.class,
- configuration, terminator);
+ return pipelineBuilder.build(logger, HttpServletRequestHandler.class, HttpServletRequestFilter.class,
+ configuration, terminator);
}
@Marker(Primary.class)
@@ -935,13 +934,13 @@
{
public boolean service(Request request, Response response) throws IOException
{
- _requestGlobals.storeRequestResponse(request, response);
+ requestGlobals.storeRequestResponse(request, response);
return masterDispatcher.dispatch(request, response);
}
};
- return _pipelineBuilder.build(logger, RequestHandler.class, RequestFilter.class, configuration, terminator);
+ return pipelineBuilder.build(logger, RequestHandler.class, RequestFilter.class, configuration, terminator);
}
public ServletApplicationInitializer buildServletApplicationInitializer(Logger logger,
@@ -954,7 +953,7 @@
{
public void initializeApplication(ServletContext context)
{
- _applicationGlobals.storeServletContext(context);
+ applicationGlobals.storeServletContext(context);
// And now, down the (Web) ApplicationInitializer pipeline ...
@@ -962,8 +961,8 @@
}
};
- return _pipelineBuilder.build(logger, ServletApplicationInitializer.class,
- ServletApplicationInitializerFilter.class, configuration, terminator);
+ return pipelineBuilder.build(logger, ServletApplicationInitializer.class,
+ ServletApplicationInitializerFilter.class, configuration, terminator);
}
/**
@@ -999,7 +998,7 @@
StrategyRegistry<ComponentEventResultProcessor> registry = StrategyRegistry.newInstance(
ComponentEventResultProcessor.class, configuration);
- return _strategyBuilder.build(registry);
+ return strategyBuilder.build(registry);
}
/**
@@ -1010,7 +1009,7 @@
{
DefaultDataTypeAnalyzer service = resources.autobuild(DefaultDataTypeAnalyzer.class);
- _componentInstantiatorSource.addInvalidationListener(service);
+ componentInstantiatorSource.addInvalidationListener(service);
return service;
}
@@ -1019,7 +1018,7 @@
{
TranslatorSourceImpl service = resources.autobuild(TranslatorSourceImpl.class);
- _componentInstantiatorSource.addInvalidationListener(service);
+ componentInstantiatorSource.addInvalidationListener(service);
return service;
}
@@ -1029,7 +1028,7 @@
{
StrategyRegistry<ObjectRenderer> registry = StrategyRegistry.newInstance(ObjectRenderer.class, configuration);
- return _strategyBuilder.build(registry);
+ return strategyBuilder.build(registry);
}
public ComponentMessagesSource buildComponentMessagesSource(
@@ -1043,7 +1042,7 @@
ComponentMessagesSourceImpl service = new ComponentMessagesSourceImpl(contextAssetFactory
.getRootResource(), appCatalog);
- _updateListenerHub.addUpdateListener(service);
+ updateListenerHub.addUpdateListener(service);
return service;
}
@@ -1058,7 +1057,7 @@
@Marker(ComponentLayer.class)
public ClassFactory buildComponentClassFactory()
{
- return _shadowBuilder.build(_componentInstantiatorSource, "classFactory", ClassFactory.class);
+ return shadowBuilder.build(componentInstantiatorSource, "classFactory", ClassFactory.class);
}
@@ -1068,14 +1067,14 @@
@Marker(Primary.class)
public Dispatcher buildMasterDispatcher(List<Dispatcher> configuration)
{
- return _chainBuilder.build(Dispatcher.class, configuration);
+ return chainBuilder.build(Dispatcher.class, configuration);
}
public PropertyConduitSource buildPropertyConduitSource(@ComponentLayer ClassFactory componentClassFactory)
{
- PropertyConduitSourceImpl service = new PropertyConduitSourceImpl(_propertyAccess, componentClassFactory);
+ PropertyConduitSourceImpl service = new PropertyConduitSourceImpl(propertyAccess, componentClassFactory);
- _componentInstantiatorSource.addInvalidationListener(service);
+ componentInstantiatorSource.addInvalidationListener(service);
return service;
}
@@ -1086,7 +1085,7 @@
*/
public Request buildRequest()
{
- return _shadowBuilder.build(_requestGlobals, "request", Request.class);
+ return shadowBuilder.build(requestGlobals, "request", Request.class);
}
/**
@@ -1095,7 +1094,7 @@
*/
public HttpServletRequest buildHttpServletRequest()
{
- return _shadowBuilder.build(_requestGlobals, "HTTPServletRequest", HttpServletRequest.class);
+ return shadowBuilder.build(requestGlobals, "HTTPServletRequest", HttpServletRequest.class);
}
/**
@@ -1104,7 +1103,7 @@
*/
public Response buildResponse()
{
- return _shadowBuilder.build(_requestGlobals, "response", Response.class);
+ return shadowBuilder.build(requestGlobals, "response", Response.class);
}
@@ -1131,8 +1130,8 @@
}
};
- return _pipelineBuilder.build(logger, MarkupRenderer.class, MarkupRendererFilter.class, configuration,
- terminator);
+ return pipelineBuilder.build(logger, MarkupRenderer.class, MarkupRendererFilter.class, configuration,
+ terminator);
}
/**
@@ -1159,15 +1158,15 @@
}
};
- return _pipelineBuilder.build(logger, PartialMarkupRenderer.class, PartialMarkupRendererFilter.class,
- configuration, terminator);
+ return pipelineBuilder.build(logger, PartialMarkupRenderer.class, PartialMarkupRendererFilter.class,
+ configuration, terminator);
}
public PageRenderRequestHandler buildPageRenderRequestHandler(List<PageRenderRequestFilter> configuration,
Logger logger, ServiceResources resources)
{
- return _pipelineBuilder.build(logger, PageRenderRequestHandler.class, PageRenderRequestFilter.class,
- configuration, resources.autobuild(PageRenderRequestHandlerImpl.class));
+ return pipelineBuilder.build(logger, PageRenderRequestHandler.class, PageRenderRequestFilter.class,
+ configuration, resources.autobuild(PageRenderRequestHandlerImpl.class));
}
@@ -1181,8 +1180,8 @@
public ComponentEventRequestHandler buildComponentEventRequestHandler(
List<ComponentEventRequestFilter> configuration, Logger logger, ServiceResources resources)
{
- return _pipelineBuilder.build(logger, ComponentEventRequestHandler.class, ComponentEventRequestFilter.class,
- configuration, resources.autobuild(ComponentEventRequestHandlerImpl.class));
+ return pipelineBuilder.build(logger, ComponentEventRequestHandler.class, ComponentEventRequestFilter.class,
+ configuration, resources.autobuild(ComponentEventRequestHandlerImpl.class));
}
/**
@@ -1193,8 +1192,8 @@
public ComponentEventRequestHandler buildAjaxComponentEventRequestHandler(
List<ComponentEventRequestFilter> configuration, Logger logger, ServiceResources resources)
{
- return _pipelineBuilder.build(logger, ComponentEventRequestHandler.class, ComponentEventRequestFilter.class,
- configuration, resources.autobuild(AjaxComponentEventRequestHandler.class));
+ return pipelineBuilder.build(logger, ComponentEventRequestHandler.class, ComponentEventRequestFilter.class,
+ configuration, resources.autobuild(AjaxComponentEventRequestHandler.class));
}
// ========================================================================
@@ -1248,7 +1247,7 @@
{
public void processResultValue(Link value) throws IOException
{
- _response.sendRedirect(value);
+ response.sendRedirect(value);
}
});
@@ -1256,18 +1255,18 @@
{
public void processResultValue(URL value) throws IOException
{
- _response.sendRedirect(value.toExternalForm());
+ response.sendRedirect(value.toExternalForm());
}
});
- configuration.add(String.class, new StringResultProcessor(requestPageCache, _actionRenderResponseGenerator));
+ configuration.add(String.class, new StringResultProcessor(requestPageCache, actionRenderResponseGenerator));
configuration.add(Class.class, new ClassResultProcessor(componentClassResolver, requestPageCache,
- _actionRenderResponseGenerator));
+ actionRenderResponseGenerator));
configuration.add(Component.class, componentInstanceProcessor);
- configuration.add(StreamResponse.class, new StreamResponseResultProcessor(_response));
+ configuration.add(StreamResponse.class, new StreamResponseResultProcessor(response));
}
@@ -1285,8 +1284,8 @@
{
configuration.add(RenderCommand.class, locator.autobuild(RenderCommandComponentEventResultProcessor.class));
configuration.add(Component.class, locator.autobuild(AjaxComponentInstanceEventResultProcessor.class));
- configuration.add(JSONObject.class, new JSONObjectEventResultProcessor(_response));
- configuration.add(StreamResponse.class, new StreamResponseResultProcessor(_response));
+ configuration.add(JSONObject.class, new JSONObjectEventResultProcessor(response));
+ configuration.add(StreamResponse.class, new StreamResponseResultProcessor(response));
}
/**
@@ -1412,7 +1411,7 @@
support.addStylesheetLink(stylesheetAsset, null);
- _environment.push(PageRenderSupport.class, support);
+ environment.push(PageRenderSupport.class, support);
renderer.renderMarkup(writer);
@@ -1420,7 +1419,7 @@
linker.updateDocument(writer.getDocument());
- _environment.pop(PageRenderSupport.class);
+ environment.pop(PageRenderSupport.class);
}
};
@@ -1428,15 +1427,15 @@
{
public void renderMarkup(MarkupWriter writer, MarkupRenderer renderer)
{
- PageRenderSupport pageRenderSupport = _environment.peekRequired(PageRenderSupport.class);
+ PageRenderSupport pageRenderSupport = environment.peekRequired(PageRenderSupport.class);
ClientBehaviorSupportImpl clientBehaviorSupport = new ClientBehaviorSupportImpl(pageRenderSupport);
- _environment.push(ClientBehaviorSupport.class, clientBehaviorSupport);
+ environment.push(ClientBehaviorSupport.class, clientBehaviorSupport);
renderer.renderMarkup(writer);
- _environment.pop(ClientBehaviorSupport.class);
+ environment.pop(ClientBehaviorSupport.class);
clientBehaviorSupport.commit();
}
@@ -1450,11 +1449,11 @@
heartbeat.begin();
- _environment.push(Heartbeat.class, heartbeat);
+ environment.push(Heartbeat.class, heartbeat);
renderer.renderMarkup(writer);
- _environment.pop(Heartbeat.class);
+ environment.pop(Heartbeat.class);
heartbeat.end();
}
@@ -1464,16 +1463,16 @@
{
public void renderMarkup(MarkupWriter writer, MarkupRenderer renderer)
{
- Messages messages = validationMessagesSource.getValidationMessages(_threadLocale.getLocale());
+ Messages messages = validationMessagesSource.getValidationMessages(threadLocale.getLocale());
- ValidationDecorator decorator = new DefaultValidationDecorator(_environment, messages, fieldErrorIcon,
+ ValidationDecorator decorator = new DefaultValidationDecorator(environment, messages, fieldErrorIcon,
writer);
- _environment.push(ValidationDecorator.class, decorator);
+ environment.push(ValidationDecorator.class, decorator);
renderer.renderMarkup(writer);
- _environment.pop(ValidationDecorator.class);
+ environment.pop(ValidationDecorator.class);
}
};
@@ -1540,13 +1539,13 @@
PageRenderSupportImpl support = new PageRenderSupportImpl(builder, symbolSource, assetSource,
idAllocator);
- _environment.push(PageRenderSupport.class, support);
+ environment.push(PageRenderSupport.class, support);
renderer.renderMarkup(writer, reply);
support.commit();
- _environment.pop(PageRenderSupport.class);
+ environment.pop(PageRenderSupport.class);
if (buffer.length() > 0)
reply.put("script", buffer.toString());
@@ -1557,15 +1556,15 @@
{
public void renderMarkup(MarkupWriter writer, JSONObject reply, PartialMarkupRenderer renderer)
{
- PageRenderSupport pageRenderSupport = _environment.peekRequired(PageRenderSupport.class);
+ PageRenderSupport pageRenderSupport = environment.peekRequired(PageRenderSupport.class);
ClientBehaviorSupportImpl support = new ClientBehaviorSupportImpl(pageRenderSupport);
- _environment.push(ClientBehaviorSupport.class, support);
+ environment.push(ClientBehaviorSupport.class, support);
renderer.renderMarkup(writer, reply);
- _environment.pop(ClientBehaviorSupport.class);
+ environment.pop(ClientBehaviorSupport.class);
support.commit();
}
@@ -1579,11 +1578,11 @@
heartbeat.begin();
- _environment.push(Heartbeat.class, heartbeat);
+ environment.push(Heartbeat.class, heartbeat);
renderer.renderMarkup(writer, reply);
- _environment.pop(Heartbeat.class);
+ environment.pop(Heartbeat.class);
heartbeat.end();
}
@@ -1593,16 +1592,16 @@
{
public void renderMarkup(MarkupWriter writer, JSONObject reply, PartialMarkupRenderer renderer)
{
- Messages messages = validationMessagesSource.getValidationMessages(_threadLocale.getLocale());
+ Messages messages = validationMessagesSource.getValidationMessages(threadLocale.getLocale());
- ValidationDecorator decorator = new DefaultValidationDecorator(_environment, messages, fieldErrorIcon,
+ ValidationDecorator decorator = new DefaultValidationDecorator(environment, messages, fieldErrorIcon,
writer);
- _environment.push(ValidationDecorator.class, decorator);
+ environment.push(ValidationDecorator.class, decorator);
renderer.renderMarkup(writer, reply);
- _environment.pop(ValidationDecorator.class);
+ environment.pop(ValidationDecorator.class);
}
};
@@ -1639,7 +1638,7 @@
{
ValueEncoderSourceImpl service = new ValueEncoderSourceImpl(configuration);
- _componentInstantiatorSource.addInvalidationListener(service);
+ componentInstantiatorSource.addInvalidationListener(service);
return service;
}
@@ -1806,7 +1805,7 @@
{
public void objectWasInvalidated()
{
- _propertyAccess.clearCache();
+ propertyAccess.clearCache();
typeCoercer.clearCache();
}
@@ -1819,7 +1818,7 @@
// Snuck in here is the logic to clear the PropertyAccess service's cache whenever
// the component class loader is invalidated.
- _componentInstantiatorSource.addInvalidationListener(listener);
+ componentInstantiatorSource.addInvalidationListener(listener);
initializer.initializeApplication(context);
@@ -1837,12 +1836,12 @@
{
BindingFactory keywordFactory = new BindingFactory()
{
- private final Map<String, Object> _keywords = newCaseInsensitiveMap();
+ private final Map<String, Object> keywords = CollectionFactory.newCaseInsensitiveMap();
{
- _keywords.put("true", Boolean.TRUE);
- _keywords.put("false", Boolean.FALSE);
- _keywords.put("null", null);
+ keywords.put("true", Boolean.TRUE);
+ keywords.put("false", Boolean.FALSE);
+ keywords.put("null", null);
}
public Binding newBinding(String description, ComponentResources container, ComponentResources component,
@@ -1850,7 +1849,7 @@
{
String key = expression.trim();
- if (_keywords.containsKey(key)) return new LiteralBinding(description, _keywords.get(key), location);
+ if (keywords.containsKey(key)) return new LiteralBinding(description, keywords.get(key), location);
return null;
}
@@ -1871,12 +1870,12 @@
BindingFactory longFactory = new BindingFactory()
{
- private final Pattern _pattern = Pattern.compile("^\\s*(-?\\d+)\\s*$");
+ private final Pattern pattern = Pattern.compile("^\\s*(-?\\d+)\\s*$");
public Binding newBinding(String description, ComponentResources container, ComponentResources component,
String expression, Location location)
{
- Matcher matcher = _pattern.matcher(expression);
+ Matcher matcher = pattern.matcher(expression);
if (matcher.matches())
{
@@ -1891,13 +1890,13 @@
BindingFactory intRangeFactory = new BindingFactory()
{
- private final Pattern _pattern = Pattern
+ private final Pattern pattern = Pattern
.compile("^\\s*(-?\\d+)\\s*\\.\\.\\s*(-?\\d+)\\s*$");
public Binding newBinding(String description, ComponentResources container, ComponentResources component,
String expression, Location location)
{
- Matcher matcher = _pattern.matcher(expression);
+ Matcher matcher = pattern.matcher(expression);
if (matcher.matches())
{
@@ -1916,13 +1915,13 @@
BindingFactory doubleFactory = new BindingFactory()
{
// So, either 1234. or 1234.56 or .78
- private final Pattern _pattern = Pattern
+ private final Pattern pattern = Pattern
.compile("^\\s*(\\-?((\\d+\\.)|(\\d*\\.\\d+)))\\s*$");
public Binding newBinding(String description, ComponentResources container, ComponentResources component,
String expression, Location location)
{
- Matcher matcher = _pattern.matcher(expression);
+ Matcher matcher = pattern.matcher(expression);
if (matcher.matches())
{
@@ -1939,12 +1938,12 @@
{
// This will match embedded single quotes as-is, no escaping necessary.
- private final Pattern _pattern = Pattern.compile("^\\s*'(.*)'\\s*$");
+ private final Pattern pattern = Pattern.compile("^\\s*'(.*)'\\s*$");
public Binding newBinding(String description, ComponentResources container, ComponentResources component,
String expression, Location location)
{
- Matcher matcher = _pattern.matcher(expression);
+ Matcher matcher = pattern.matcher(expression);
if (matcher.matches())
{
@@ -1990,7 +1989,7 @@
}
};
- configuration.add("Ajax", new AjaxFilter(_request, ajaxHandler));
+ configuration.add("Ajax", new AjaxFilter(request, ajaxHandler));
configuration.add("ImmediateRender", locator.autobuild(ImmediateActionRenderResponseFilter.class));
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TransformConstants.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TransformConstants.java?rev=654427&r1=654426&r2=654427&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TransformConstants.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TransformConstants.java Wed May 7 23:31:40 2008
@@ -122,10 +122,6 @@
*/
public static final TransformMethodSignature CLEANUP_RENDER_SIGNATURE = renderPhaseSignature("cleanupRender");
- private TransformConstants()
- {
- }
-
private static TransformMethodSignature renderPhaseSignature(String name)
{
return new TransformMethodSignature(Modifier.PUBLIC, "void", name, RENDER_PHASE_METHOD_PARAMETERS, null);
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TransformMethodSignature.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TransformMethodSignature.java?rev=654427&r1=654426&r2=654427&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TransformMethodSignature.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TransformMethodSignature.java Wed May 7 23:31:40 2008
@@ -27,17 +27,13 @@
*/
public class TransformMethodSignature implements Comparable<TransformMethodSignature>
{
- private int _hashCode = -1;
+ private int hashCode = -1;
- private final int _modifiers;
+ private final int modifiers;
- private final String _returnType;
+ private final String returnType, methodName;
- private final String _methodName;
-
- private final String[] _parameterTypes;
-
- private final String[] _exceptionTypes;
+ private final String[] parameterTypes, exceptionTypes;
private static final String[] EMPTY_STRINGS = new String[0];
@@ -53,16 +49,16 @@
public TransformMethodSignature(int modifiers, String type, String name,
String[] parameterTypes, String[] exceptionTypes)
{
- _modifiers = modifiers;
+ this.modifiers = modifiers;
- _returnType = notBlank(type, "type");
- _methodName = notBlank(name, "name");
+ returnType = notBlank(type, "type");
+ methodName = notBlank(name, "name");
// TODO: Checks that no element within the two arrays
// is null or blank.
- _parameterTypes = typeNamesOrEmpty(parameterTypes);
- _exceptionTypes = typeNamesOrEmpty(exceptionTypes);
+ this.parameterTypes = typeNamesOrEmpty(parameterTypes);
+ this.exceptionTypes = typeNamesOrEmpty(exceptionTypes);
}
private String[] typeNamesOrEmpty(String[] types)
@@ -76,7 +72,7 @@
*/
public String[] getExceptionTypes()
{
- return _exceptionTypes;
+ return exceptionTypes;
}
/**
@@ -84,7 +80,7 @@
*/
public String getMethodName()
{
- return _methodName;
+ return methodName;
}
/**
@@ -94,7 +90,7 @@
*/
public int getModifiers()
{
- return _modifiers;
+ return modifiers;
}
/**
@@ -102,7 +98,7 @@
*/
public String[] getParameterTypes()
{
- return _parameterTypes;
+ return parameterTypes;
}
/**
@@ -110,30 +106,30 @@
*/
public String getReturnType()
{
- return _returnType;
+ return returnType;
}
@Override
public int hashCode()
{
- if (_hashCode == -1)
+ if (hashCode == -1)
{
- _hashCode = 17 * _modifiers;
- _hashCode += 31 * _returnType.hashCode();
- _hashCode += 31 * _methodName.hashCode();
+ hashCode = 17 * modifiers;
+ hashCode += 31 * returnType.hashCode();
+ hashCode += 31 * methodName.hashCode();
- for (String parameterType : _parameterTypes)
+ for (String parameterType : parameterTypes)
{
- _hashCode += 31 * parameterType.hashCode();
+ hashCode += 31 * parameterType.hashCode();
}
- for (String exceptionType : _exceptionTypes)
+ for (String exceptionType : exceptionTypes)
{
- _hashCode += 31 * exceptionType.hashCode();
+ hashCode += 31 * exceptionType.hashCode();
}
}
- return _hashCode;
+ return hashCode;
}
@Override
@@ -143,10 +139,10 @@
TransformMethodSignature ms = (TransformMethodSignature) other;
- return _modifiers == ms._modifiers && _returnType.equals(ms._returnType)
- && _methodName.equals(ms._methodName)
- && matches(_parameterTypes, ms._parameterTypes)
- && matches(_exceptionTypes, ms._exceptionTypes);
+ return modifiers == ms.modifiers && returnType.equals(ms.returnType)
+ && methodName.equals(ms.methodName)
+ && matches(parameterTypes, ms.parameterTypes)
+ && matches(exceptionTypes, ms.exceptionTypes);
}
private boolean matches(String[] values, String[] otherValues)
@@ -173,25 +169,25 @@
// Package private is simply omitted.
- if (_modifiers != 0)
+ if (modifiers != 0)
{
- builder.append(Modifier.toString(_modifiers));
+ builder.append(Modifier.toString(modifiers));
builder.append(' ');
}
- builder.append(_returnType);
+ builder.append(returnType);
builder.append(' ');
addMethodNameAndParameters(builder);
- for (int i = 0; i < _exceptionTypes.length; i++)
+ for (int i = 0; i < exceptionTypes.length; i++)
{
if (i == 0)
builder.append(" throws ");
else
builder.append(", ");
- builder.append(_exceptionTypes[i]);
+ builder.append(exceptionTypes[i]);
}
return builder.toString();
@@ -199,14 +195,14 @@
private void addMethodNameAndParameters(StringBuilder builder)
{
- builder.append(_methodName);
+ builder.append(methodName);
builder.append('(');
- for (int i = 0; i < _parameterTypes.length; i++)
+ for (int i = 0; i < parameterTypes.length; i++)
{
if (i > 0) builder.append(", ");
- builder.append(_parameterTypes[i]);
+ builder.append(parameterTypes[i]);
}
builder.append(')');
@@ -218,10 +214,10 @@
*/
public int compareTo(TransformMethodSignature o)
{
- int result = _methodName.compareTo(o._methodName);
+ int result = methodName.compareTo(o.methodName);
// Sort descending
- if (result == 0) result = o._parameterTypes.length - _parameterTypes.length;
+ if (result == 0) result = o.parameterTypes.length - parameterTypes.length;
return result;
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TransformUtils.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TransformUtils.java?rev=654427&r1=654426&r2=654427&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TransformUtils.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TransformUtils.java Wed May 7 23:31:40 2008
@@ -29,32 +29,17 @@
static class PrimitiveTypeInfo
{
- private final Class _wrapperType;
+ private final Class wrapperType;
- private final String _unwrapperMethodName;
+ private final String unwrapperMethodName;
- private final String _defaultValue;
+ private final String defaultValue;
public PrimitiveTypeInfo(Class wrapperType, String unwrapperMethodName, String defaultValue)
{
- _wrapperType = wrapperType;
- _unwrapperMethodName = unwrapperMethodName;
- _defaultValue = defaultValue;
- }
-
- public String getUnwrapperMethodName()
- {
- return _unwrapperMethodName;
- }
-
- public String getDefaultValue()
- {
- return _defaultValue;
- }
-
- public Class getWrapperType()
- {
- return _wrapperType;
+ this.wrapperType = wrapperType;
+ this.unwrapperMethodName = unwrapperMethodName;
+ this.defaultValue = defaultValue;
}
}
@@ -100,7 +85,7 @@
{
PrimitiveTypeInfo info = _nameToInfo.get(type);
- return info == null ? type : info.getWrapperType().getName();
+ return info == null ? type : info.wrapperType.getName();
}
/**
@@ -113,7 +98,7 @@
{
PrimitiveTypeInfo info = _nameToInfo.get(type);
- return info == null ? null : info.getUnwrapperMethodName();
+ return info == null ? null : info.unwrapperMethodName;
}
/**
@@ -126,7 +111,7 @@
{
PrimitiveTypeInfo info = _classToInfo.get(type);
- return info == null ? type : info.getWrapperType();
+ return info == null ? type : info.wrapperType;
}
/**
@@ -137,6 +122,6 @@
{
PrimitiveTypeInfo info = _nameToInfo.get(type);
- return info == null ? "null" : info.getDefaultValue();
+ return info == null ? "null" : info.defaultValue;
}
}