8b6198b1170e3128c5df83267597f0058d07c70dJames Phillpottsimport javax.servlet.http.HttpServletRequest;
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemayimport com.iplanet.jato.view.event.ChildContentDisplayEvent;
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemayimport com.sun.identity.console.base.AMPrimaryMastHeadViewBean;
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemayimport com.sun.identity.console.base.AMPropertySheet;
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemayimport com.sun.identity.console.base.model.AMConsoleException;
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemayimport com.sun.identity.console.base.model.AMModel;
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemayimport com.sun.identity.console.base.model.AMPropertySheetModel;
8b6198b1170e3128c5df83267597f0058d07c70dJames Phillpottsimport com.sun.identity.console.task.model.OAuth2Model;
8b6198b1170e3128c5df83267597f0058d07c70dJames Phillpottsimport com.sun.identity.console.task.model.OAuth2ModelImpl;
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemayimport com.sun.identity.console.task.model.TaskModel;
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemayimport com.sun.web.ui.view.pagetitle.CCPageTitle;
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay public static final String DEFAULT_DISPLAY_URL =
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay private static final String PAGETITLE = "pgtitle";
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay private static final String PROPERTY_ATTRIBUTE = "propertyAttributes";
8b6198b1170e3128c5df83267597f0058d07c70dJames Phillpotts private static final String TITLE_MESSAGE = "configure.oauth2profile.title.message";
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay private AMPropertySheetModel propertySheetModel;
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay //public void forwardTo(RequestContext rc) {
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay super("ConfigureOAuth2");
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay //ptModel.registerChildren(this);
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay view = new AMPropertySheet(this, propertySheetModel, name);
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay } else if (propertySheetModel.isChildSupported(name)) {
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay view = propertySheetModel.createChild(this, name, getModel());
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay getClass().getClassLoader().getResourceAsStream(
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay "com/sun/identity/console/twoBtnsPageTitle.xml"));
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay getClass().getClassLoader().getResourceAsStream(
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay "com/sun/identity/console/propertyConfigureOAuth2.xml"));
f58c87ece2202b8f85310d8885c7e39a7f435c09Jason Lemay HttpServletRequest req = getRequestContext().getRequest();
8b6198b1170e3128c5df83267597f0058d07c70dJames Phillpotts return new OAuth2ModelImpl(req, getPageSessionAttributes());
8b6198b1170e3128c5df83267597f0058d07c70dJames Phillpotts OAuth2Model model = (OAuth2Model) getModel();
bd91193fe2e6ce7e56cf0d1c3c8f1b1d3e0570bcTravis Papp CCDropDownMenu menuRealm = (CCDropDownMenu) getChild(REALM);
7a85e989c5e460208534dcea16759d1a9f7d4967James Phillpotts String realm = getRequestContext().getRequest().getParameter("realm");
7a85e989c5e460208534dcea16759d1a9f7d4967James Phillpotts if (realm != null && !realm.trim().isEmpty()) {
8b6198b1170e3128c5df83267597f0058d07c70dJames Phillpotts final String titleMessage = model.getLocalizedString(TITLE_MESSAGE);
8b6198b1170e3128c5df83267597f0058d07c70dJames Phillpotts ptModel.setPageTitleText(MessageFormat.format(titleMessage, model.getDisplayName()));
8b6198b1170e3128c5df83267597f0058d07c70dJames Phillpotts ptModel.setPageTitleHelpMessage(model.getLocalizedHelpMessage());