Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add displayName method for Action Execution enum #6056

Merged
merged 3 commits into from
Oct 24, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,24 @@

package org.wso2.carbon.identity.action.execution.model;

import org.wso2.carbon.identity.action.management.model.Action;

/**
* This class models the Action Type.
* Action Type is the type of the action that is executed by the Action Executor Service.
*/
public enum ActionType {
PRE_ISSUE_ACCESS_TOKEN,
AUTHENTICATION
PRE_ISSUE_ACCESS_TOKEN("PRE_ISSUE_ACCESS_TOKEN"),
AUTHENTICATION("AUTHENTICATION");

private final String value;

ActionType(String value) {
this.value = value;
}

public String getDisplayName() {

return Action.ActionTypes.valueOf(this.value).getDisplayName();
Copy link
Member

Choose a reason for hiding this comment

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

we don't need this string instance variable right ? why not just use this.name()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 7628689

}
}
Loading