if (format != null && format.getWantSecure() != null) {
url.setQueryParameterValue(Constants.SECURE_PARAMETER, format.getWantSecure().toString());
}
if (containerURL instanceof ActionURL) {
ActionURL actionURL = (ActionURL) containerURL;
StateString state = actionURL.getInteractionState();
if (state != null && !state.getStringValue().equals(StateString.JBPNS_PREFIX)) {
url.setQueryParameterValue(INTERACTION_STATE_PARAM_NAME, state.getStringValue());
}
state = actionURL.getNavigationalState();
if (state != null && !state.getStringValue().equals(StateString.JBPNS_PREFIX)) {
url.setQueryParameterValue(NAVIGATIONAL_STATE_PARAM_NAME, state.getStringValue());
}
WindowState windowState = actionURL.getWindowState();
if (windowState != null) {
url.setQueryParameterValue(Constants.WINDOW_STATE_PARAMETER, windowState.toString());
}
Mode mode = actionURL.getMode();
if (mode != null) {
url.setQueryParameterValue(Constants.PORTLET_MODE_PARAMETER, mode.toString());
}
} else if (containerURL instanceof ResourceURL) {
ResourceURL resourceURL = (ResourceURL) containerURL;