aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-09-24 16:51:40 +0300
committerLeif Åstrand <leif@vaadin.com>2012-09-24 16:51:40 +0300
commitaa20ecbfb7cebb719a05ec1be6439badd228366e (patch)
treedeb47fed4553a8885b3d9f4540cf36a50d710fd1 /server
parentcb474f17b6de48f85287491ba24f4c8975c62b0f (diff)
downloadvaadin-framework-aa20ecbfb7cebb719a05ec1be6439badd228366e.tar.gz
vaadin-framework-aa20ecbfb7cebb719a05ec1be6439badd228366e.zip
Rename getVaadinXyz() methods to getXyz() (#9726)
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/AbstractCommunicationManager.java12
-rw-r--r--server/src/com/vaadin/server/AddonContext.java4
-rw-r--r--server/src/com/vaadin/server/BootstrapHandler.java43
-rw-r--r--server/src/com/vaadin/server/BootstrapResponse.java2
-rw-r--r--server/src/com/vaadin/server/CombinedRequest.java4
-rw-r--r--server/src/com/vaadin/server/CommunicationManager.java2
-rw-r--r--server/src/com/vaadin/server/DefaultUIProvider.java4
-rw-r--r--server/src/com/vaadin/server/GAEVaadinServlet.java8
-rw-r--r--server/src/com/vaadin/server/LegacyVaadinPortlet.java8
-rw-r--r--server/src/com/vaadin/server/LegacyVaadinServlet.java8
-rw-r--r--server/src/com/vaadin/server/PortletCommunicationManager.java2
-rw-r--r--server/src/com/vaadin/server/UIProviderEvent.java2
-rw-r--r--server/src/com/vaadin/server/VaadinPortlet.java18
-rw-r--r--server/src/com/vaadin/server/VaadinPortletRequest.java2
-rw-r--r--server/src/com/vaadin/server/VaadinPortletResponse.java2
-rw-r--r--server/src/com/vaadin/server/VaadinPortletSession.java2
-rw-r--r--server/src/com/vaadin/server/VaadinRequest.java2
-rw-r--r--server/src/com/vaadin/server/VaadinResponse.java2
-rw-r--r--server/src/com/vaadin/server/VaadinService.java8
-rw-r--r--server/src/com/vaadin/server/VaadinServlet.java30
-rw-r--r--server/src/com/vaadin/server/VaadinServletRequest.java2
-rw-r--r--server/src/com/vaadin/server/VaadinServletResponse.java2
-rw-r--r--server/src/com/vaadin/server/VaadinSession.java10
-rw-r--r--server/src/com/vaadin/server/VaadinSessionDestroyEvent.java4
-rw-r--r--server/src/com/vaadin/server/VaadinSessionInitializeEvent.java4
-rw-r--r--server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java6
28 files changed, 99 insertions, 100 deletions
diff --git a/server/src/com/vaadin/server/AbstractCommunicationManager.java b/server/src/com/vaadin/server/AbstractCommunicationManager.java
index b5237438ba..3d334e11a5 100644
--- a/server/src/com/vaadin/server/AbstractCommunicationManager.java
+++ b/server/src/com/vaadin/server/AbstractCommunicationManager.java
@@ -185,7 +185,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
requireLocale(session.getLocale().toString());
}
- protected VaadinSession getVaadinSession() {
+ protected VaadinSession getSession() {
return session;
}
@@ -379,7 +379,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
"StreamVariable for the post not found");
}
- final VaadinSession session = getVaadinSession();
+ final VaadinSession session = getSession();
OutputStream out = null;
int totalBytes = 0;
@@ -593,7 +593,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
if (!handleVariables(request, response, callback, session, uI)) {
// var inconsistency; the client is probably out-of-sync
- SystemMessages ci = response.getVaadinService()
+ SystemMessages ci = response.getService()
.getSystemMessages();
String msg = ci.getOutOfSyncMessage();
String cap = ci.getOutOfSyncCaption();
@@ -1050,7 +1050,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
}
}
- SystemMessages ci = request.getVaadinService().getSystemMessages();
+ SystemMessages ci = request.getService().getSystemMessages();
// meta instruction for client to enable auto-forward to
// sessionExpiredURL after timer expires.
@@ -2460,7 +2460,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
}
private UI getBrowserDetailsUI(VaadinRequest request) {
- VaadinService vaadinService = request.getVaadinService();
+ VaadinService vaadinService = request.getService();
VaadinSession session = VaadinSession.getForSession(request
.getWrappedSession());
@@ -2614,7 +2614,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
.substring(ApplicationConstants.CONNECTOR_RESOURCE_PREFIX
.length() + 2);
- final String mimetype = response.getVaadinService().getMimeType(
+ final String mimetype = response.getService().getMimeType(
resourceName);
// Security check: avoid accidentally serving from the UI of the
diff --git a/server/src/com/vaadin/server/AddonContext.java b/server/src/com/vaadin/server/AddonContext.java
index 6c7cb9bf98..513d56150b 100644
--- a/server/src/com/vaadin/server/AddonContext.java
+++ b/server/src/com/vaadin/server/AddonContext.java
@@ -61,7 +61,7 @@ public class AddonContext implements Serializable {
VaadinSessionInitializeEvent event)
throws ServiceException {
for (BootstrapListener l : bootstrapListeners) {
- event.getVaadinSession().addBootstrapListener(l);
+ event.getSession().addBootstrapListener(l);
}
}
});
@@ -73,7 +73,7 @@ public class AddonContext implements Serializable {
*
* @return the vaadin service
*/
- public VaadinService getVaadinService() {
+ public VaadinService getService() {
return vaadinService;
}
diff --git a/server/src/com/vaadin/server/BootstrapHandler.java b/server/src/com/vaadin/server/BootstrapHandler.java
index dcd933945c..a6c72b9885 100644
--- a/server/src/com/vaadin/server/BootstrapHandler.java
+++ b/server/src/com/vaadin/server/BootstrapHandler.java
@@ -76,8 +76,8 @@ public abstract class BootstrapHandler implements RequestHandler {
return bootstrapResponse.getRequest();
}
- public VaadinSession getVaadinSession() {
- return bootstrapResponse.getVaadinSession();
+ public VaadinSession getSession() {
+ return bootstrapResponse.getSession();
}
public Class<? extends UI> getUIClass() {
@@ -116,8 +116,8 @@ public abstract class BootstrapHandler implements RequestHandler {
VaadinResponse response) throws IOException {
try {
- List<UIProvider> uiProviders = request.getVaadinService()
- .getUIProviders(session);
+ List<UIProvider> uiProviders = request.getService().getUIProviders(
+ session);
UIClassSelectionEvent classSelectionEvent = new UIClassSelectionEvent(
request);
@@ -162,7 +162,7 @@ public abstract class BootstrapHandler implements RequestHandler {
private String getBootstrapHtml(BootstrapContext context) {
VaadinRequest request = context.getRequest();
VaadinResponse response = context.getResponse();
- VaadinService vaadinService = request.getVaadinService();
+ VaadinService vaadinService = request.getService();
BootstrapFragmentResponse fragmentResponse = context
.getBootstrapResponse();
@@ -171,9 +171,8 @@ public abstract class BootstrapHandler implements RequestHandler {
Map<String, Object> headers = new LinkedHashMap<String, Object>();
Document document = Document.createShell("");
BootstrapPageResponse pageResponse = new BootstrapPageResponse(
- this, request, context.getVaadinSession(),
- context.getUIClass(), document, headers,
- fragmentResponse.getUIProvider());
+ this, request, context.getSession(), context.getUIClass(),
+ document, headers, fragmentResponse.getUIProvider());
List<Node> fragmentNodes = fragmentResponse.getFragmentNodes();
Element body = document.body();
for (Node node : fragmentNodes) {
@@ -181,7 +180,7 @@ public abstract class BootstrapHandler implements RequestHandler {
}
setupStandaloneDocument(context, pageResponse);
- context.getVaadinSession().modifyBootstrapResponse(pageResponse);
+ context.getSession().modifyBootstrapResponse(pageResponse);
sendBootstrapHeaders(response, headers);
@@ -246,8 +245,7 @@ public abstract class BootstrapHandler implements RequestHandler {
.attr("content", "chrome=1");
String title = response.getUIProvider().getPageTitle(
- new UICreateEvent(context.getRequest(), context
- .getUIClass()));
+ new UICreateEvent(context.getRequest(), context.getUIClass()));
if (title != null) {
head.appendElement("title").appendText(title);
}
@@ -289,12 +287,12 @@ public abstract class BootstrapHandler implements RequestHandler {
public String getWidgetsetForUI(BootstrapContext context) {
VaadinRequest request = context.getRequest();
- UICreateEvent event = new UICreateEvent(context.getRequest(), context.getUIClass());
+ UICreateEvent event = new UICreateEvent(context.getRequest(),
+ context.getUIClass());
String widgetset = context.getBootstrapResponse().getUIProvider()
.getWidgetset(event);
if (widgetset == null) {
- widgetset = request.getVaadinService().getConfiguredWidgetset(
- request);
+ widgetset = request.getService().getConfiguredWidgetset(request);
}
widgetset = VaadinServlet.stripSpecialChars(widgetset);
@@ -327,7 +325,7 @@ public abstract class BootstrapHandler implements RequestHandler {
*/
String appClass = "v-app-"
- + context.getVaadinSession().getClass().getSimpleName();
+ + context.getSession().getClass().getSimpleName();
String classNames = "v-app " + appClass;
List<Node> fragmentNodes = context.getBootstrapResponse()
@@ -346,7 +344,7 @@ public abstract class BootstrapHandler implements RequestHandler {
VaadinRequest request = context.getRequest();
- VaadinService vaadinService = request.getVaadinService();
+ VaadinService vaadinService = request.getService();
String staticFileLocation = vaadinService
.getStaticFileLocation(request);
@@ -385,7 +383,7 @@ public abstract class BootstrapHandler implements RequestHandler {
JSONObject defaults = getDefaultParameters(context);
JSONObject appConfig = getApplicationParameters(context);
- boolean isDebug = !context.getVaadinSession().getConfiguration()
+ boolean isDebug = !context.getSession().getConfiguration()
.isProductionMode();
builder.append("vaadin.setDefaults(");
@@ -442,8 +440,8 @@ public abstract class BootstrapHandler implements RequestHandler {
JSONObject defaults = new JSONObject();
VaadinRequest request = context.getRequest();
- VaadinSession session = context.getVaadinSession();
- VaadinService vaadinService = request.getVaadinService();
+ VaadinSession session = context.getSession();
+ VaadinService vaadinService = request.getService();
// Get system messages
SystemMessages systemMessages = vaadinService.getSystemMessages();
@@ -505,7 +503,7 @@ public abstract class BootstrapHandler implements RequestHandler {
*/
public String getThemeUri(BootstrapContext context, String themeName) {
VaadinRequest request = context.getRequest();
- final String staticFilePath = request.getVaadinService()
+ final String staticFilePath = request.getService()
.getStaticFileLocation(request);
return staticFilePath + "/" + VaadinServlet.THEME_DIRECTORY_PATH
+ themeName;
@@ -518,7 +516,8 @@ public abstract class BootstrapHandler implements RequestHandler {
* @return
*/
public String getThemeName(BootstrapContext context) {
- UICreateEvent event = new UICreateEvent(context.getRequest(), context.getUIClass());
+ UICreateEvent event = new UICreateEvent(context.getRequest(),
+ context.getUIClass());
return context.getBootstrapResponse().getUIProvider().getTheme(event);
}
@@ -532,7 +531,7 @@ public abstract class BootstrapHandler implements RequestHandler {
String themeName = getThemeName(context);
if (themeName == null) {
VaadinRequest request = context.getRequest();
- themeName = request.getVaadinService().getConfiguredTheme(request);
+ themeName = request.getService().getConfiguredTheme(request);
}
// XSS preventation, theme names shouldn't contain special chars anyway.
diff --git a/server/src/com/vaadin/server/BootstrapResponse.java b/server/src/com/vaadin/server/BootstrapResponse.java
index c6e5fdc2ad..7b12085a7b 100644
--- a/server/src/com/vaadin/server/BootstrapResponse.java
+++ b/server/src/com/vaadin/server/BootstrapResponse.java
@@ -86,7 +86,7 @@ public abstract class BootstrapResponse extends EventObject {
*
* @return the vaadin session
*/
- public VaadinSession getVaadinSession() {
+ public VaadinSession getSession() {
return session;
}
diff --git a/server/src/com/vaadin/server/CombinedRequest.java b/server/src/com/vaadin/server/CombinedRequest.java
index b3569a249c..589596136b 100644
--- a/server/src/com/vaadin/server/CombinedRequest.java
+++ b/server/src/com/vaadin/server/CombinedRequest.java
@@ -183,8 +183,8 @@ public class CombinedRequest implements VaadinRequest {
}
@Override
- public VaadinService getVaadinService() {
- return secondRequest.getVaadinService();
+ public VaadinService getService() {
+ return secondRequest.getService();
}
@Override
diff --git a/server/src/com/vaadin/server/CommunicationManager.java b/server/src/com/vaadin/server/CommunicationManager.java
index 7e55396592..8dc490c36a 100644
--- a/server/src/com/vaadin/server/CommunicationManager.java
+++ b/server/src/com/vaadin/server/CommunicationManager.java
@@ -83,7 +83,7 @@ public class CommunicationManager extends AbstractCommunicationManager {
URL url;
try {
- url = context.getRequest().getVaadinService()
+ url = context.getRequest().getService()
.getApplicationUrl(context.getRequest());
} catch (MalformedURLException e) {
throw new RuntimeException(e);
diff --git a/server/src/com/vaadin/server/DefaultUIProvider.java b/server/src/com/vaadin/server/DefaultUIProvider.java
index 7262249d7b..7769747906 100644
--- a/server/src/com/vaadin/server/DefaultUIProvider.java
+++ b/server/src/com/vaadin/server/DefaultUIProvider.java
@@ -30,14 +30,14 @@ public class DefaultUIProvider extends UIProvider {
return null;
}
- Object uiClassNameObj = request.getVaadinService()
+ Object uiClassNameObj = request.getService()
.getDeploymentConfiguration().getInitParameters()
.getProperty(VaadinSession.UI_PARAMETER);
if (uiClassNameObj instanceof String) {
String uiClassName = uiClassNameObj.toString();
- ClassLoader classLoader = request.getVaadinService()
+ ClassLoader classLoader = request.getService()
.getClassLoader();
if (classLoader == null) {
classLoader = getClass().getClassLoader();
diff --git a/server/src/com/vaadin/server/GAEVaadinServlet.java b/server/src/com/vaadin/server/GAEVaadinServlet.java
index df7daedfb8..2849dc73a0 100644
--- a/server/src/com/vaadin/server/GAEVaadinServlet.java
+++ b/server/src/com/vaadin/server/GAEVaadinServlet.java
@@ -172,9 +172,9 @@ public class GAEVaadinServlet extends VaadinServlet {
HttpServletResponse unwrappedResponse) throws ServletException,
IOException {
VaadinServletRequest request = new VaadinServletRequest(
- unwrappedRequest, getVaadinService());
+ unwrappedRequest, getService());
VaadinServletResponse response = new VaadinServletResponse(
- unwrappedResponse, getVaadinService());
+ unwrappedResponse, getService());
if (isCleanupRequest(request)) {
cleanDatastore();
@@ -199,7 +199,7 @@ public class GAEVaadinServlet extends VaadinServlet {
return;
}
- final HttpSession session = request.getSession(getVaadinService()
+ final HttpSession session = request.getSession(getService()
.requestCanCreateSession(request));
if (session == null) {
handleServiceSessionExpired(request, response);
@@ -341,7 +341,7 @@ public class GAEVaadinServlet extends VaadinServlet {
// will create new context if the above did not
try {
- return getVaadinService().findVaadinSession(
+ return getService().findVaadinSession(
createVaadinRequest(request));
} catch (Exception e) {
throw new ServletException(e);
diff --git a/server/src/com/vaadin/server/LegacyVaadinPortlet.java b/server/src/com/vaadin/server/LegacyVaadinPortlet.java
index f433b14478..1402a88c7d 100644
--- a/server/src/com/vaadin/server/LegacyVaadinPortlet.java
+++ b/server/src/com/vaadin/server/LegacyVaadinPortlet.java
@@ -47,7 +47,7 @@ public class LegacyVaadinPortlet extends VaadinPortlet {
public void init() throws PortletException {
super.init();
- getVaadinService().addVaadinSessionInitializationListener(
+ getService().addVaadinSessionInitializationListener(
new VaadinSessionInitializationListener() {
@Override
public void vaadinSessionInitialized(
@@ -57,7 +57,7 @@ public class LegacyVaadinPortlet extends VaadinPortlet {
onVaadinSessionStarted(VaadinPortletRequest
.cast(event.getRequest()),
(VaadinPortletSession) event
- .getVaadinSession());
+ .getSession());
} catch (PortletException e) {
throw new ServiceException(e);
}
@@ -69,7 +69,7 @@ public class LegacyVaadinPortlet extends VaadinPortlet {
throws ClassNotFoundException {
try {
return ServletPortletHelper
- .getLegacyApplicationClass(getVaadinService());
+ .getLegacyApplicationClass(getService());
} catch (ServiceException e) {
throw new RuntimeException(e);
}
@@ -87,7 +87,7 @@ public class LegacyVaadinPortlet extends VaadinPortlet {
private void onVaadinSessionStarted(VaadinPortletRequest request,
VaadinPortletSession session) throws PortletException {
- getVaadinService().addUIProvider(session, provider);
+ getService().addUIProvider(session, provider);
}
protected boolean shouldCreateApplication(PortletRequest request) {
diff --git a/server/src/com/vaadin/server/LegacyVaadinServlet.java b/server/src/com/vaadin/server/LegacyVaadinServlet.java
index 3a44df517d..1209ca8419 100644
--- a/server/src/com/vaadin/server/LegacyVaadinServlet.java
+++ b/server/src/com/vaadin/server/LegacyVaadinServlet.java
@@ -49,7 +49,7 @@ public class LegacyVaadinServlet extends VaadinServlet {
public void init(ServletConfig servletConfig) throws ServletException {
super.init(servletConfig);
- getVaadinService().addVaadinSessionInitializationListener(
+ getService().addVaadinSessionInitializationListener(
new VaadinSessionInitializationListener() {
@Override
public void vaadinSessionInitialized(
@@ -57,7 +57,7 @@ public class LegacyVaadinServlet extends VaadinServlet {
throws ServiceException {
try {
onVaadinSessionStarted(event.getRequest(),
- event.getVaadinSession());
+ event.getSession());
} catch (ServletException e) {
throw new ServiceException(e);
}
@@ -69,7 +69,7 @@ public class LegacyVaadinServlet extends VaadinServlet {
throws ClassNotFoundException {
try {
return ServletPortletHelper
- .getLegacyApplicationClass(getVaadinService());
+ .getLegacyApplicationClass(getService());
} catch (ServiceException e) {
throw new RuntimeException(e);
}
@@ -92,7 +92,7 @@ public class LegacyVaadinServlet extends VaadinServlet {
private void onVaadinSessionStarted(VaadinRequest request,
VaadinSession session) throws ServletException {
- getVaadinService().addUIProvider(session, provider);
+ getService().addUIProvider(session, provider);
}
}
diff --git a/server/src/com/vaadin/server/PortletCommunicationManager.java b/server/src/com/vaadin/server/PortletCommunicationManager.java
index 449d39b38b..938bd2927d 100644
--- a/server/src/com/vaadin/server/PortletCommunicationManager.java
+++ b/server/src/com/vaadin/server/PortletCommunicationManager.java
@@ -132,7 +132,7 @@ public class PortletCommunicationManager extends AbstractCommunicationManager {
@Override
protected String getMainDivStyle(BootstrapContext context) {
VaadinService vaadinService = context.getRequest()
- .getVaadinService();
+ .getService();
return vaadinService.getDeploymentConfiguration()
.getApplicationOrSystemProperty(
VaadinPortlet.PORTLET_PARAMETER_STYLE, null);
diff --git a/server/src/com/vaadin/server/UIProviderEvent.java b/server/src/com/vaadin/server/UIProviderEvent.java
index cf552a70fc..c0a41846c3 100644
--- a/server/src/com/vaadin/server/UIProviderEvent.java
+++ b/server/src/com/vaadin/server/UIProviderEvent.java
@@ -38,7 +38,7 @@ public class UIProviderEvent extends EventObject implements Serializable {
* the request for which the event is UI provider is invoked
*/
public UIProviderEvent(VaadinRequest request) {
- super(request.getVaadinService());
+ super(request.getService());
this.request = request;
}
diff --git a/server/src/com/vaadin/server/VaadinPortlet.java b/server/src/com/vaadin/server/VaadinPortlet.java
index d862a13945..cdf7030f98 100644
--- a/server/src/com/vaadin/server/VaadinPortlet.java
+++ b/server/src/com/vaadin/server/VaadinPortlet.java
@@ -360,9 +360,9 @@ public class VaadinPortlet extends GenericPortlet implements Constants {
VaadinPortletRequest vaadinRequest = createVaadinRequest(request);
VaadinPortletResponse vaadinResponse = new VaadinPortletResponse(
- response, getVaadinService());
+ response, getService());
- getVaadinService().setCurrentInstances(vaadinRequest,
+ getService().setCurrentInstances(vaadinRequest,
vaadinResponse);
RequestType requestType = getRequestType(vaadinRequest);
@@ -393,7 +393,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants {
// TODO What about PARAM_UNLOADBURST &
// redirectToApplication??
- vaadinSession = (VaadinPortletSession) getVaadinService()
+ vaadinSession = (VaadinPortletSession) getService()
.findVaadinSession(vaadinRequest);
if (vaadinSession == null) {
return;
@@ -423,7 +423,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants {
// Finds the right UI
UI uI = null;
if (requestType == RequestType.UIDL) {
- uI = getVaadinService().findUI(vaadinRequest);
+ uI = getService().findUI(vaadinRequest);
}
// TODO Should this happen before or after the transaction
@@ -506,16 +506,16 @@ public class VaadinPortlet extends GenericPortlet implements Constants {
String portalInfo = request.getPortalContext().getPortalInfo()
.toLowerCase();
if (portalInfo.contains("liferay")) {
- return new VaadinLiferayRequest(request, getVaadinService());
+ return new VaadinLiferayRequest(request, getService());
} else if (portalInfo.contains("gatein")) {
- return new VaadinGateinRequest(request, getVaadinService());
+ return new VaadinGateinRequest(request, getService());
} else {
- return new VaadinPortletRequest(request, getVaadinService());
+ return new VaadinPortletRequest(request, getService());
}
}
- protected VaadinPortletService getVaadinService() {
+ protected VaadinPortletService getService() {
return vaadinService;
}
@@ -635,7 +635,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants {
// if this was an UIDL request, response UIDL back to client
if (getRequestType(request) == RequestType.UIDL) {
- SystemMessages ci = getVaadinService().getSystemMessages();
+ SystemMessages ci = getService().getSystemMessages();
criticalNotification(request, response,
ci.getInternalErrorCaption(), ci.getInternalErrorMessage(),
null, ci.getInternalErrorURL());
diff --git a/server/src/com/vaadin/server/VaadinPortletRequest.java b/server/src/com/vaadin/server/VaadinPortletRequest.java
index 3290c49950..63d5d1f467 100644
--- a/server/src/com/vaadin/server/VaadinPortletRequest.java
+++ b/server/src/com/vaadin/server/VaadinPortletRequest.java
@@ -202,7 +202,7 @@ public class VaadinPortletRequest implements VaadinRequest {
}
@Override
- public VaadinPortletService getVaadinService() {
+ public VaadinPortletService getService() {
return vaadinService;
}
diff --git a/server/src/com/vaadin/server/VaadinPortletResponse.java b/server/src/com/vaadin/server/VaadinPortletResponse.java
index efec091bb3..c59af2f2b0 100644
--- a/server/src/com/vaadin/server/VaadinPortletResponse.java
+++ b/server/src/com/vaadin/server/VaadinPortletResponse.java
@@ -115,7 +115,7 @@ public class VaadinPortletResponse implements VaadinResponse {
}
@Override
- public VaadinPortletService getVaadinService() {
+ public VaadinPortletService getService() {
return vaadinService;
}
} \ No newline at end of file
diff --git a/server/src/com/vaadin/server/VaadinPortletSession.java b/server/src/com/vaadin/server/VaadinPortletSession.java
index e5b512588d..4a2cf04dc3 100644
--- a/server/src/com/vaadin/server/VaadinPortletSession.java
+++ b/server/src/com/vaadin/server/VaadinPortletSession.java
@@ -87,7 +87,7 @@ public class VaadinPortletSession extends VaadinSession {
public PortletConfig getPortletConfig() {
VaadinPortletResponse response = (VaadinPortletResponse) CurrentInstance
.get(VaadinResponse.class);
- return response.getVaadinService().getPortlet().getPortletConfig();
+ return response.getService().getPortlet().getPortletConfig();
}
public void addPortletListener(PortletListener listener) {
diff --git a/server/src/com/vaadin/server/VaadinRequest.java b/server/src/com/vaadin/server/VaadinRequest.java
index e48b9ede84..7e2ae75850 100644
--- a/server/src/com/vaadin/server/VaadinRequest.java
+++ b/server/src/com/vaadin/server/VaadinRequest.java
@@ -285,6 +285,6 @@ public interface VaadinRequest extends Serializable {
*
* @see VaadinService
*/
- public VaadinService getVaadinService();
+ public VaadinService getService();
}
diff --git a/server/src/com/vaadin/server/VaadinResponse.java b/server/src/com/vaadin/server/VaadinResponse.java
index bfa36015a3..d1b2ac1254 100644
--- a/server/src/com/vaadin/server/VaadinResponse.java
+++ b/server/src/com/vaadin/server/VaadinResponse.java
@@ -155,5 +155,5 @@ public interface VaadinResponse extends Serializable {
*
* @see VaadinService
*/
- public VaadinService getVaadinService();
+ public VaadinService getService();
}
diff --git a/server/src/com/vaadin/server/VaadinService.java b/server/src/com/vaadin/server/VaadinService.java
index 9a4a3a80f5..2c0331c65e 100644
--- a/server/src/com/vaadin/server/VaadinService.java
+++ b/server/src/com/vaadin/server/VaadinService.java
@@ -110,7 +110,7 @@ public abstract class VaadinService implements Serializable {
*
* @return the Vaadin service that htis data belongs to
*/
- public VaadinService getVaadinService() {
+ public VaadinService getService() {
return vaadinService;
}
@@ -651,7 +651,7 @@ public abstract class VaadinService implements Serializable {
* @return an unmodifiable list of UI providers
*/
public List<UIProvider> getUIProviders(VaadinSession session) {
- return session.getVaadinServiceData(this).getUIProviders();
+ return session.getServiceData(this).getUIProviders();
}
/**
@@ -696,7 +696,7 @@ public abstract class VaadinService implements Serializable {
* the UI provider that should be added
*/
public void addUIProvider(VaadinSession vaadinSession, UIProvider uiProvider) {
- vaadinSession.getVaadinServiceData(this).addUIProvider(uiProvider);
+ vaadinSession.getServiceData(this).addUIProvider(uiProvider);
}
/**
@@ -709,7 +709,7 @@ public abstract class VaadinService implements Serializable {
*/
public void removeUIProvider(VaadinSession vaadinSession,
UIProvider uiProvider) {
- vaadinSession.getVaadinServiceData(this).removeUIProvider(uiProvider);
+ vaadinSession.getServiceData(this).removeUIProvider(uiProvider);
}
/**
diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java
index ac8643bcaa..633cffab2a 100644
--- a/server/src/com/vaadin/server/VaadinServlet.java
+++ b/server/src/com/vaadin/server/VaadinServlet.java
@@ -217,7 +217,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
RequestTimer requestTimer = new RequestTimer();
requestTimer.start();
- getVaadinService().setCurrentInstances(request, response);
+ getService().setCurrentInstances(request, response);
AbstractApplicationServletWrapper servletWrapper = new AbstractApplicationServletWrapper(
this);
@@ -249,13 +249,13 @@ public class VaadinServlet extends HttpServlet implements Constants {
&& request.getParameterMap().containsKey(
ApplicationConstants.PARAM_UNLOADBURST)
&& request.getContentLength() < 1
- && getVaadinService().getExistingSession(request, false) == null) {
+ && getService().getExistingSession(request, false) == null) {
redirectToApplication(request, response);
return;
}
// Find out the Vaadin session this request is related to
- vaadinSession = (VaadinServletSession) getVaadinService()
+ vaadinSession = (VaadinServletSession) getService()
.findVaadinSession(request);
if (vaadinSession == null) {
return;
@@ -285,7 +285,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
response);
return;
} else if (requestType == RequestType.UIDL) {
- UI uI = getVaadinService().findUI(request);
+ UI uI = getService().findUI(request);
if (uI == null) {
throw new ServletException(ERROR_NO_UI_FOUND);
}
@@ -330,7 +330,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
private VaadinServletResponse createVaadinResponse(
HttpServletResponse response) {
- return new VaadinServletResponse(response, getVaadinService());
+ return new VaadinServletResponse(response, getService());
}
/**
@@ -343,7 +343,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
*/
protected VaadinServletRequest createVaadinRequest(
HttpServletRequest request) {
- return new VaadinServletRequest(request, getVaadinService());
+ return new VaadinServletRequest(request, getService());
}
/**
@@ -351,7 +351,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
*
* @return the vaadin service
*/
- protected VaadinServletService getVaadinService() {
+ protected VaadinServletService getService() {
return servletService;
}
@@ -378,7 +378,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
// This can be removed if cookieless mode (#3228) is supported
if (request.getRequestedSessionId() == null) {
// User has cookies disabled
- SystemMessages systemMessages = getVaadinService()
+ SystemMessages systemMessages = getService()
.getSystemMessages();
criticalNotification(request, response,
systemMessages.getCookiesDisabledCaption(),
@@ -535,7 +535,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
Throwable e) throws IOException, ServletException {
// if this was an UIDL request, response UIDL back to client
if (getRequestType(request) == RequestType.UIDL) {
- SystemMessages ci = getVaadinService().getSystemMessages();
+ SystemMessages ci = getService().getSystemMessages();
criticalNotification(request, response,
ci.getInternalErrorCaption(), ci.getInternalErrorMessage(),
null, ci.getInternalErrorURL());
@@ -610,7 +610,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
}
try {
- SystemMessages ci = getVaadinService().getSystemMessages();
+ SystemMessages ci = getService().getSystemMessages();
RequestType requestType = getRequestType(request);
if (requestType == RequestType.UIDL) {
/*
@@ -655,7 +655,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
}
try {
- SystemMessages ci = getVaadinService().getSystemMessages();
+ SystemMessages ci = getService().getSystemMessages();
RequestType requestType = getRequestType(request);
if (requestType == RequestType.UIDL) {
// send uidl redirect
@@ -822,7 +822,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
* cache timeout can be configured by setting the resourceCacheTime
* parameter in web.xml
*/
- int resourceCacheTime = getVaadinService()
+ int resourceCacheTime = getService()
.getDeploymentConfiguration().getResourceCacheTime();
response.setHeader("Cache-Control",
"max-age= " + String.valueOf(resourceCacheTime));
@@ -850,7 +850,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
filename = filename.substring(1);
}
- resourceUrl = getVaadinService().getClassLoader().getResource(
+ resourceUrl = getService().getClassLoader().getResource(
filename);
}
return resourceUrl;
@@ -859,7 +859,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
private boolean serveOnTheFlyCompiledScss(String filename,
HttpServletRequest request, HttpServletResponse response,
ServletContext sc) throws IOException {
- if (getVaadinService().getDeploymentConfiguration().isProductionMode()) {
+ if (getService().getDeploymentConfiguration().isProductionMode()) {
// This is not meant for production mode.
return false;
}
@@ -909,7 +909,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
// This is for development mode only so instruct the browser to never
// cache it
response.setHeader("Cache-Control", "no-cache");
- final String mimetype = getVaadinService().getMimeType(filename);
+ final String mimetype = getService().getMimeType(filename);
writeResponse(response, mimetype, scss.toString());
return true;
diff --git a/server/src/com/vaadin/server/VaadinServletRequest.java b/server/src/com/vaadin/server/VaadinServletRequest.java
index ece7d187bc..6526766b0f 100644
--- a/server/src/com/vaadin/server/VaadinServletRequest.java
+++ b/server/src/com/vaadin/server/VaadinServletRequest.java
@@ -79,7 +79,7 @@ public class VaadinServletRequest extends HttpServletRequestWrapper implements
}
@Override
- public VaadinServletService getVaadinService() {
+ public VaadinServletService getService() {
return vaadinService;
}
diff --git a/server/src/com/vaadin/server/VaadinServletResponse.java b/server/src/com/vaadin/server/VaadinServletResponse.java
index f999a470dd..72d1207ac5 100644
--- a/server/src/com/vaadin/server/VaadinServletResponse.java
+++ b/server/src/com/vaadin/server/VaadinServletResponse.java
@@ -79,7 +79,7 @@ public class VaadinServletResponse extends HttpServletResponseWrapper implements
}
@Override
- public VaadinServletService getVaadinService() {
+ public VaadinServletService getService() {
return vaadinService;
}
} \ No newline at end of file
diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java
index 0bf5f8616b..febdc5dad5 100644
--- a/server/src/com/vaadin/server/VaadinSession.java
+++ b/server/src/com/vaadin/server/VaadinSession.java
@@ -212,7 +212,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
// closing
// Notify all services that have used this session.
for (VaadinServiceData vaadinServiceData : serviceData.values()) {
- vaadinServiceData.getVaadinService().fireSessionDestroy(this);
+ vaadinServiceData.getService().fireSessionDestroy(this);
}
}
@@ -1057,7 +1057,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* the passed Vaadin service; otherwise <code>false</code>
*/
public boolean hasVaadinServiceData(VaadinService vaadinService) {
- return getVaadinServiceData(vaadinService) != null;
+ return getServiceData(vaadinService) != null;
}
/**
@@ -1071,21 +1071,21 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* @return the Vaadin service data for the provided Vaadin service; or
* <code>null</code> if there is no data for the service
*/
- public VaadinServiceData getVaadinServiceData(VaadinService vaadinService) {
+ public VaadinServiceData getServiceData(VaadinService vaadinService) {
return serviceData.get(getServiceKey(vaadinService));
}
/**
* Adds Vaadin service specific data to this session.
*
- * @see #getVaadinServiceData(VaadinService)
+ * @see #getServiceData(VaadinService)
* @see VaadinServiceData
*
* @param serviceData
* the Vaadin service data to add
*/
public void addVaadinServiceData(VaadinServiceData serviceData) {
- VaadinService vaadinService = serviceData.getVaadinService();
+ VaadinService vaadinService = serviceData.getService();
assert !hasVaadinServiceData(vaadinService);
this.serviceData.put(getServiceKey(vaadinService), serviceData);
diff --git a/server/src/com/vaadin/server/VaadinSessionDestroyEvent.java b/server/src/com/vaadin/server/VaadinSessionDestroyEvent.java
index 3916f756e9..9dc877863f 100644
--- a/server/src/com/vaadin/server/VaadinSessionDestroyEvent.java
+++ b/server/src/com/vaadin/server/VaadinSessionDestroyEvent.java
@@ -54,7 +54,7 @@ public class VaadinSessionDestroyEvent extends EventObject {
*
* @return the Vaadin service
*/
- public VaadinService getVaadinService() {
+ public VaadinService getService() {
return getSource();
}
@@ -63,7 +63,7 @@ public class VaadinSessionDestroyEvent extends EventObject {
*
* @return the Vaadin session
*/
- public VaadinSession getVaadinSession() {
+ public VaadinSession getSession() {
return session;
}
diff --git a/server/src/com/vaadin/server/VaadinSessionInitializeEvent.java b/server/src/com/vaadin/server/VaadinSessionInitializeEvent.java
index 217e3d8f7d..a05b40a7dc 100644
--- a/server/src/com/vaadin/server/VaadinSessionInitializeEvent.java
+++ b/server/src/com/vaadin/server/VaadinSessionInitializeEvent.java
@@ -64,7 +64,7 @@ public class VaadinSessionInitializeEvent extends EventObject {
*
* @return the Vaadin service instance
*/
- public VaadinService getVaadinService() {
+ public VaadinService getService() {
return getSource();
}
@@ -73,7 +73,7 @@ public class VaadinSessionInitializeEvent extends EventObject {
*
* @return the Vaadin session
*/
- public VaadinSession getVaadinSession() {
+ public VaadinSession getSession() {
return session;
}
diff --git a/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java b/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
index 18f7fae166..533bcc8422 100644
--- a/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
+++ b/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
@@ -78,7 +78,7 @@ public class TestAbstractApplicationServletStaticFilesLocation extends TestCase
// Set request into replay mode
replay(request);
- String location = servlet.getVaadinService().getStaticFileLocation(
+ String location = servlet.getService().getStaticFileLocation(
servlet.createVaadinRequest(request));
return location;
}
@@ -91,7 +91,7 @@ public class TestAbstractApplicationServletStaticFilesLocation extends TestCase
// Set request into replay mode
replay(request);
- String location = servlet.getVaadinService().getStaticFileLocation(
+ String location = servlet.getService().getStaticFileLocation(
servlet.createVaadinRequest(request));
return location;
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java b/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java
index e84d1c9939..c7730e9294 100644
--- a/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java
+++ b/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java
@@ -81,7 +81,7 @@ public class CustomUIClassLoader extends TestCase {
// Mock a VaadinRequest to give the mocked vaadin service
VaadinRequest requestMock = EasyMock.createMock(VaadinRequest.class);
- EasyMock.expect(requestMock.getVaadinService()).andReturn(
+ EasyMock.expect(requestMock.getService()).andReturn(
configurationMock);
EasyMock.replay(configurationMock, requestMock);
diff --git a/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java b/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java
index a41b200664..09cb75a9eb 100644
--- a/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java
+++ b/server/tests/src/com/vaadin/tests/server/component/window/AttachDetachWindow.java
@@ -238,12 +238,12 @@ public class AttachDetachWindow {
private void assertUnattached(TestContainer win) {
assertSame("window not detached", win.getSession(), null);
assertSame("window content not detached",
- getVaadinSession(win.getTestContent()), null);
+ getSession(win.getTestContent()), null);
assertSame("window children not detached",
- getVaadinSession(win.getTestContent().child), null);
+ getSession(win.getTestContent().child), null);
}
- private VaadinSession getVaadinSession(ClientConnector testContainer) {
+ private VaadinSession getSession(ClientConnector testContainer) {
UI ui = testContainer.getUI();
if (ui != null) {
return ui.getSession();