Repository navigation
Upgrade notes: remaining Java deprecations of XP 8.1 - #93
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Several API references are inaccurate or incomplete, including omitted Trace deprecations.
4 open findings
What changed in this PR
Expands the XP 8.1 upgrade reference with previously undocumented Java API deprecations.
Changes:
- Documents deprecated Java services, queries, listeners, URL parameters, and runtime APIs.
- Provides recommended migration paths.
| File | Description |
|---|---|
docs/upgrade.adoc |
Adds remaining XP 8.1 Java deprecation guidance. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| `ContentService.findByParent()`, `findIdsByParent()` and `findPaths()` are deprecated, as are `NodeService.findByParent()` and `NodeQuery.Builder.withPath()`. A query does the same job and accepts every constraint a search supports: | ||
|
|
||
| * `ContentService.find()` with `ContentQuery.Builder.parentPath()` or `parentId()`, followed by `getByIds()` for the contents actually needed; | ||
| * `find()` with `returnFields()` naming `_path`, in place of `findPaths()`; |
Comment on lines
+317
to
+320
| * `baseUrl` on `ImageUrlParams`, `AttachmentUrlParams`, `ProcessHtmlParams`, `ImageUrlGeneratorParams` and `AttachmentUrlGeneratorParams`: configure where the media APIs are served, with a virtual host mapping or `media.defaultBaseUrl` in `com.enonic.xp.portal.cfg`; | ||
| * `setBaseUrl()` on `ApiUrlParams` and `ApiUrlGeneratorParams`: expose the API location as a virtual host mapping; | ||
| * `projectName()` and `branch()` on `PageUrlParams`: use `PortalUrlService.pageUrlParts()` with a `PortalScope` resolved for the project and branch; | ||
| * `setProjectName()`, `setBranch()`, `setId()` and `setPath()` on `BaseUrlParams`: use `PortalUrlService.portalScope()`; |
| ==== Scripts and tracing | ||
|
|
||
| * `PortalScriptService.executeAsync()` and `ScriptRuntime.executeAsync()`: use `bootstrap()` for bootstrap scripts, or `execute()` on an executor of your choice. | ||
| * `ScriptSettings.Builder.globalVariable()`, `ScriptSettings.getGlobalVariables()` and `ScriptTestSupport.addGlobalVariable()`: custom JavaScript globals are phased out, and `app` is the only supported global. |
|
|
||
| * `PortalScriptService.executeAsync()` and `ScriptRuntime.executeAsync()`: use `bootstrap()` for bootstrap scripts, or `execute()` on an executor of your choice. | ||
| * `ScriptSettings.Builder.globalVariable()`, `ScriptSettings.getGlobalVariables()` and `ScriptTestSupport.addGlobalVariable()`: custom JavaScript globals are phased out, and `app` is the only supported global. | ||
| * `Trace.putAll()` and `clear()`: record attributes with the typed `attribute()` methods; `Trace` will stop extending `Map`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The XP 8.1 Java APIs section listed only NodeService, ApplicationListener and MacroService. Adds the other Java deprecations: ApplicationInvalidator, children and path lookups on ContentService/NodeService, progress listener renames, export/import params, modified times, portal URL params, and script/trace APIs.
🤖 Generated with Claude Code
https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
Generated by Claude Code