PolicyNormalEditViewBean.java revision 980c471e50c03bf708fca68a475d7c7206787173
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * The contents of this file are subject to the terms
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * of the Common Development and Distribution License
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * (the License). You may not use this file except in
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * compliance with the License.
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * You can obtain a copy of the License at
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * https://opensso.dev.java.net/public/CDDLv1.0.html or
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * See the License for the specific language governing
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * permission and limitations under the License.
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * When distributing Covered Code, include this CDDL
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * Header Notice in each file and include the License file
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * If applicable, add the following below the CDDL Header,
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * with the fields enclosed by brackets [] replaced by
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * your own identifying information:
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * "Portions Copyrighted [year] [name of copyright owner]"
73308f54e60e4cdb893e8b02955497e8f45b5893jeff.schenk * $Id: PolicyNormalEditViewBean.java,v 1.2 2008/06/25 05:43:03 qcheng Exp $
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * Portions Copyrighted 2015 ForgeRock AS.
fb98811412f1a61efdc30b38091bf4708148a806Allan Fosterimport com.iplanet.jato.model.ModelControlException;
fb98811412f1a61efdc30b38091bf4708148a806Allan Fosterimport com.iplanet.jato.view.event.RequestInvocationEvent;
fb98811412f1a61efdc30b38091bf4708148a806Allan Fosterimport com.sun.identity.console.base.model.AMAdminConstants;
fb98811412f1a61efdc30b38091bf4708148a806Allan Fosterimport com.sun.identity.console.base.model.AMConsoleException;
fb98811412f1a61efdc30b38091bf4708148a806Allan Fosterimport com.sun.identity.console.policy.model.CachedPolicy;
6e153e9671eb382c49354ab856404a71477cce58jeff.schenkimport com.sun.identity.console.policy.model.PolicyModel;
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster public static final String DEFAULT_DISPLAY_URL =
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster private static final String PGTITLE_TWO_BTNS = "pgtitleTwoBtns";
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * Creates a policy creation view bean.
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster super("PolicyNormalEdit", DEFAULT_DISPLAY_URL);
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster protected void createPageTitleModel() {
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster getClass().getClassLoader().getResourceAsStream(
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster "com/sun/identity/console/threeBtnsPageTitle.xml"));
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster ptModel.setValue("button3", getBackButtonLabel());
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster ptModel.setPageTitleText("page.title.policy.edit");
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * Handles reset request.
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * @param event Request invocation event
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster public void handleButton2Request(RequestInvocationEvent event) {
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster String cacheID = (String) getPageSessionAttribute(ProfileViewBeanBase.PG_SESSION_POLICY_CACHE_ID);
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster CachedPolicy cachedPolicy = model.getCachedPolicy(cacheID);
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster model.updatePolicyCache(cacheID, cachedPolicy);
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster "PolicyNormalEditViewBean.handleButton2Request", e);
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * Handles create policy request.
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * @param event Request invocation event
throws ModelControlException
if (reconstructPolicy()) {
} catch (AMConsoleException e) {
e.getMessage());
forwardTo();
} catch (AMConsoleException e) {
} catch (AMConsoleException e) {
protected boolean startPageTrail() {
protected boolean isProfilePage() {