You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WidgetsetInfoImpl.java 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright 2000-2014 Vaadin Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.vaadin.server;
  17. /**
  18. * Default implementation of {@link WidgetsetInfo} that is used for internal
  19. * communication between the parts of the framework.
  20. * <p>
  21. * Class needs to be static so that it can be easily used in e.g.
  22. * BootstrapHandler.
  23. * <p>
  24. * This class is intended primarily for internal use. It is recommended to
  25. * implement WidgetsetInfo directly rather than extending or using this
  26. * class outside the framework, and this class is subject to changes.
  27. *
  28. * @since 7.7
  29. */
  30. class WidgetsetInfoImpl implements WidgetsetInfo {
  31. private final boolean cdn;
  32. private final String widgetsetUrl;
  33. private final String widgetsetName;
  34. public WidgetsetInfoImpl(boolean cdn, String widgetsetUrl,
  35. String widgetsetName) {
  36. this.cdn = cdn;
  37. this.widgetsetUrl = widgetsetUrl;
  38. this.widgetsetName = widgetsetName;
  39. }
  40. public WidgetsetInfoImpl(String widgetsetName) {
  41. this(false, null, widgetsetName);
  42. }
  43. @Override
  44. public boolean isCdn() {
  45. return cdn;
  46. }
  47. @Override
  48. public String getWidgetsetUrl() {
  49. return widgetsetUrl;
  50. }
  51. @Override
  52. public String getWidgetsetName() {
  53. return widgetsetName;
  54. }
  55. }