Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-16189

Use Environment.NUXEO_CONTEXT_PATH constant

    XMLWordPrintable

    Details

    • Tags:
    • Sprint:
      DevOps Sprint 10, DevOps Sprint 11
    • Story Points:
      1

      Description

      Use org.nuxeo.common.Environment.NUXEO_CONTEXT_PATH constant instead of hardcoded strings:

      $ jf org.nuxeo.ecm.contextPath |grep .java
      ./nuxeo-jsf/nuxeo-theme-jsf/src/main/java/org/nuxeo/theme/jsf/renderer/ThemeStylesRenderer.java:72:        String basePath = Framework.getProperty("org.nuxeo.ecm.contextPath", "/nuxeo");
      ./nuxeo-theme/nuxeo-theme-html/src/main/java/org/nuxeo/theme/html/CSSUtils.java:374:            text = text.replaceAll("\\$\\{org.nuxeo.ecm.contextPath\\}", Matcher.quoteReplacement(basePath));
      ./nuxeo-theme/nuxeo-theme-html/src/main/java/org/nuxeo/theme/html/servlets/Resources.java:162:                    // also expand ${org.nuxeo.ecm.contextPath}
      ./nuxeo-theme/nuxeo-theme-html/src/main/java/org/nuxeo/theme/html/servlets/Resources.java:163:                    source = source.replaceAll("\\$\\{org.nuxeo.ecm.contextPath\\}", Matcher.quoteReplacement(basePath));
      ./nuxeo-runtime/nuxeo-launcher-commons/src/main/java/org/nuxeo/launcher/config/ConfigurationGenerator.java:171:    public static final String PARAM_CONTEXT_PATH = "org.nuxeo.ecm.contextPath";
      ./nuxeo-runtime/nuxeo-runtime/src/main/java/org/nuxeo/runtime/osgi/OSGiRuntimeService.java:411:        String varName = "org.nuxeo.ecm.contextPath";
      ./nuxeo-common/src/main/java/org/nuxeo/common/Environment.java:110:    public static final String NUXEO_CONTEXT_PATH = "org.nuxeo.ecm.contextPath";
      ./nuxeo-services/nuxeo-platform-web-common/src/main/java/org/nuxeo/ecm/platform/web/common/vh/VirtualHostHelper.java:160:     * {@code org.nuxeo.ecm.contextPath} system property. Fallback on default context path {@code /nuxeo}.
      ./nuxeo-services/nuxeo-platform-web-common/src/main/java/org/nuxeo/ecm/platform/web/common/vh/VirtualHostHelper.java:172:        return Framework.getProperty("org.nuxeo.ecm.contextPath", "/nuxeo");
      ./addons/nuxeo-template-rendering/nuxeo-template-rendering-core/src/main/java/org/nuxeo/template/context/BlobHolderWrapper.java:32:        return Framework.getProperty("org.nuxeo.ecm.contextPath", "/nuxeo");
      ./addons/nuxeo-template-rendering/nuxeo-template-rendering-jaxrs/src/main/java/org/nuxeo/template/jaxrs/context/JAXRSExtensions.java:22:        return Framework.getProperty("org.nuxeo.ecm.contextPath", "/nuxeo");
      ./addons/nuxeo-web-mobile/nuxeo-application-definition/src/main/java/org/nuxeo/ecm/mobile/ApplicationRedirectServiceImpl.java:70:            nuxeoRelativeContextPath = new Path(Framework.getProperty("org.nuxeo.ecm.contextPath"));
      ./addons/nuxeo-web-mobile/nuxeo-web-mobile/nuxeo-web-mobile-cap/src/main/java/org/nuxeo/ecm/mobile/webengine/document/MobileDocument.java:224:            nuxeoContextPath = Framework.getProperty("org.nuxeo.ecm.contextPath");
      ./addons/nuxeo-web-mobile/nuxeo-web-mobile/nuxeo-web-mobile-cap/src/main/java/org/nuxeo/ecm/mobile/webengine/Profile.java:85:        String contextPath = Framework.getProperty("org.nuxeo.ecm.contextPath");
      ./addons/nuxeo-web-mobile/nuxeo-web-mobile/nuxeo-web-mobile-cap/src/main/java/org/nuxeo/ecm/mobile/webengine/adapter/PreviewAdapter.java:92:            nuxeoContextPath = Framework.getProperty("org.nuxeo.ecm.contextPath");
      ./addons/nuxeo-web-mobile/nuxeo-web-mobile/nuxeo-web-mobile-cap/src/main/java/org/nuxeo/ecm/mobile/webengine/WebMobileAuthentication.java:72:            nuxeoContextPath = Framework.getProperty("org.nuxeo.ecm.contextPath");
      ./addons/nuxeo-filesystem-connectors/nuxeo-wss-front/src/main/java/org/nuxeo/wss/servlet/BaseWSSFilter.java:61:    public final String nuxeoRootUrl = System.getProperty("org.nuxeo.ecm.contextPath", DEFAULT_CONTEXT_PATH);
      ./addons/nuxeo-filesystem-connectors/nuxeo-wss-front/src/main/java/org/nuxeo/wss/servlet/WSSFrontFilter.java:60:            rootFilterTarget = System.getProperty("org.nuxeo.ecm.contextPath", "/nuxeo");
      ./addons/nuxeo-filesystem-connectors/nuxeo-wss/src/main/java/org/nuxeo/wss/handlers/fakews/FakeDWS.java:200:            siteRoot = System.getProperty("org.nuxeo.ecm.contextPath", "/nuxeo");
      ./addons/nuxeo-chemistry/nuxeo-opencmis-impl/src/main/java/org/nuxeo/ecm/core/opencmis/impl/server/NuxeoRepository.java:115:    private static final String NUXEO_CONTEXT_PATH_PROP = "org.nuxeo.ecm.contextPath";
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jcarsique Julien Carsique
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: