class CasLogoutActionBuilder implements LogoutActionBuilder {

    private final String serverLogoutUrl;

    private final String postLogoutUrlParameter;

    /**
     * <p>Constructor for CasLogoutActionBuilder.</p>
     *
     * @param serverLogoutUrl a {@link String} object
     * @param postLogoutUrlParameter a {@link String} object
     */
    public CasLogoutActionBuilder(final String serverLogoutUrl, final String postLogoutUrlParameter) {
        if (isNotBlank(serverLogoutUrl)) {
            assertNotBlank("postLogoutUrlParameter", postLogoutUrlParameter);
        }
        this.serverLogoutUrl = serverLogoutUrl;
        this.postLogoutUrlParameter = postLogoutUrlParameter;
    }

    /** {@inheritDoc} */
    @Override
    public Optional<RedirectionAction> getLogoutAction(final CallContext ctx, final UserProfile currentProfile, final String targetUrl) {<FILL_FUNCTION_BODY>}
}

        if (isBlank(serverLogoutUrl)) {
            return Optional.empty();
        }

        var redirectUrl = serverLogoutUrl;
        if (isNotBlank(targetUrl)) {
            redirectUrl = addParameter(redirectUrl, postLogoutUrlParameter, targetUrl);
        }
        LOGGER.debug("redirectUrl: {}", redirectUrl);
        return Optional.of(HttpActionHelper.buildRedirectUrlAction(ctx.webContext(), redirectUrl));
    
<no_super_class>