Skip to content

Upgrade notes: remaining Java deprecations of XP 8.1 - #93

Merged
rymsha merged 1 commit into
masterfrom
claude/guillotine-pr-review-92srxb
Oct 12, 2026
Merged

rymsha merged 1 commit into
masterfrom
claude/guillotine-pr-review-92srxb

Conversation

@rymsha

@rymsha rymsha commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

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

Copilot AI balanced review requested due to automatic review settings October 12, 2026 13:04
@rymsha
rymsha merged commit 9ab2d0d into master Oct 12, 2026
3 checks passed
@rymsha
rymsha deleted the claude/guillotine-pr-review-92srxb branch October 12, 2026 13:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread docs/upgrade.adoc
`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 thread docs/upgrade.adoc
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()`;
Comment thread docs/upgrade.adoc
==== 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.
Comment thread docs/upgrade.adoc

* `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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants