Skip to content

Feat/delete migrated datasets in dns update - #573

Merged
frankgiordano merged 3 commits into
zowe:mainfrom
Charishma1707:feat/delete-migratedDatasets-in-DnsUpdate
Jul 15, 2026
Merged

Feat/delete migrated datasets in dns update#573
frankgiordano merged 3 commits into
zowe:mainfrom
Charishma1707:feat/delete-migratedDatasets-in-DnsUpdate

Conversation

@Charishma1707

Copy link
Copy Markdown
Contributor

Overview

This PR refactors the migrated dataset deletion (hdelete) functionality into the new centralized DsnUpdate class.

Why We Chose This Method Overloading Strategy

In Java, we cannot define the following two signatures at the same time:

public Response deleteMigrated(final String dataSetName, final boolean wait)
public Response deleteMigrated(final String dataSetName, final boolean purge)

Because both methods resolve to the exact same parameter type signature (String, boolean), Java compilation will throw a duplicate method definition error.

To circumvent this while keeping the API simple:

  • deleteMigrated(final String dataSetName) was added for standard deletion (defaults optional parameters to null, excluding them from the request payload).
  • deleteMigrated(final String dataSetName, final boolean wait, final boolean purge) was added to allow callers to explicitly specify both flags.
  • Both overloads delegate internally to a private deleteMigratedCommon(...) helper to eliminate code duplication and centralize payload construction.

Changes Made

  • DsnUpdate.java

    • Added overloaded deleteMigrated public APIs.
    • Added private deleteMigratedCommon(...) helper.
  • README.md

    • Added a new Update dataset and member section.
    • Included examples for DsnUpdate, including dataset rename and deleteMigrated() usage.
  • Tests

    • DsnUpdateTest.java.
    • Updated tests to validate the new overloaded API.

Verification

  • Ran:
mvn clean test

Closes

Closes #567

)

Signed-off-by: Charishma1707 <charishmaalam8@gmail.com>
Signed-off-by: Charishma1707 <charishmaalam8@gmail.com>
@frankgiordano frankgiordano added the enhancement New feature or request label Jul 15, 2026
@frankgiordano
frankgiordano self-requested a review July 15, 2026 12:07
@frankgiordano
frankgiordano merged commit 61cb3f2 into zowe:main Jul 15, 2026
4 checks passed
@frankgiordano

Copy link
Copy Markdown
Collaborator

@Charishma1707 can you submit new PR and change * @author Charishma1707 with your real name.. we all use real names for this field. otherwise remove alias. thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Delete Migrated Datasets API to zosfiles.dsn.methods package

2 participants