Skip to content

Commit

Permalink
Faces 4.1: deprecate FSS #5337
Browse files Browse the repository at this point in the history
  • Loading branch information
BalusC committed Oct 15, 2023
1 parent 0f214f1 commit bd467e4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@

import java.util.HashSet;
import java.util.Set;
import java.util.logging.Logger;

import com.sun.faces.config.WebConfiguration;
import com.sun.faces.util.FacesLogger;

import jakarta.faces.application.StateManager;

/**
* This class maintains per-application information pertaining to partail or full state saving as a whole or partial
* state saving with some views using full state saving.
*/
public class ApplicationStateInfo {

private static final Logger LOGGER = FacesLogger.APPLICATION.getLogger();

private final boolean partialStateSaving;
private Set<String> fullStateViewIds;

Expand All @@ -47,6 +53,10 @@ public ApplicationStateInfo() {
fullStateViewIds = new HashSet<>(viewIds.length, 1.0f);
fullStateViewIds.addAll(asList(viewIds));
}
else {
LOGGER.warning("The configuration '" + StateManager.PARTIAL_STATE_SAVING_PARAM_NAME
+ "' is deprecated as of Faces 4.1 and should not longer be used.");
}

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,24 @@ public abstract class StateManager {
* </div>
*
* @since 2.0
* @deprecated Full state saving is widely considered to be a historical mistake in Faces.
* Full state saving will be removed in favor of partial state saving in order to keep the spec simple.
* Therefore disabling partial state saving via this context parameter will not anymore be an option.
*/
@Deprecated(forRemoval = true, since = "4.1")
public static final String PARTIAL_STATE_SAVING_PARAM_NAME = "jakarta.faces.PARTIAL_STATE_SAVING";

/**
* <p class="changed_added_2_0">
* The runtime must interpret the value of this parameter as a comma separated list of view IDs, each of which must have
* their state saved using the state saving mechanism specified in Jakarta Faces 1.2.
* </p>
*
* @deprecated Full state saving is widely considered to be a historical mistake in Faces.
* Full state saving will be removed in favor of partial state saving in order to keep the spec simple.
* Therefore specifying full state saving view IDs via this context parameter will not anymore be an option.
*/
@Deprecated(forRemoval = true, since = "4.1")
public static final String FULL_STATE_SAVING_VIEW_IDS_PARAM_NAME = "jakarta.faces.FULL_STATE_SAVING_VIEW_IDS";

/**
Expand Down

0 comments on commit bd467e4

Please sign in to comment.