EntityPropertiesBase.java revision 4a2f0f0be43dfd4c1b490cbf3cc48b6ba6084b1c
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * The contents of this file are subject to the terms
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * of the Common Development and Distribution License
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * (the License). You may not use this file except in
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * compliance with the License.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * You can obtain a copy of the License at
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * See the License for the specific language governing
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * permission and limitations under the License.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * When distributing Covered Code, include this CDDL
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Header Notice in each file and include the License file
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * If applicable, add the following below the CDDL Header,
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * with the fields enclosed by brackets [] replaced by
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * your own identifying information:
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * $Id: EntityPropertiesBase.java,v 1.4 2008/06/25 05:49:34 qcheng Exp $
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.iplanet.jato.model.ModelControlException;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.iplanet.jato.view.event.DisplayEvent;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.web.ui.view.pagetitle.CCPageTitle;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.iplanet.jato.view.event.RequestInvocationEvent;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.base.AMPropertySheet;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.base.AMViewBeanBase;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.base.AMViewConfig;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.base.AMPrimaryMastHeadViewBean;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.base.model.AMModel;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.base.model.AMSystemConfig;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.base.model.AMFormatUtils;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.base.model.AMAdminConstants;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.base.model.AMConsoleException;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.base.model.AMPropertySheetModel;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.base.model.AMModelBase;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.federation.model.EntityModel;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterimport com.sun.identity.console.federation.model.EntityModelImpl;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * This is the base for all of the entity propery views. It will build the
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * tab menu based on the configurations (roles) supported by the selected
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * entity type. Extender must implement the following methods:
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * protected abstract String getProfileName();
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * protected abstract void createPropertyModel(String name);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * The value returned from getProfileName() must be the beginning of the name
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * of the class viewbean being invoked. For example, for a SAMLv2 protocol
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * entity, getProfileName() will return "SAMLv2" which will then be converted
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * to SAMLv2GeneralViewBean, SAMLv2General.jsp, etc...
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterpublic abstract class EntityPropertiesBase
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster private static final String PAGE_TITLE = "pgtitle";
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public static final String PROPERTY_ATTRIBUTES = "propertyAttributes";
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster private boolean submitCycle;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster private boolean initialized = false;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public static final String ENTITY_NAME = "entityName";
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public static final String ENTITY_REALM = "entityRealm";
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public static final String ENTITY_LOCATION = "entityLocation";
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster protected void registerChildren() {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster registerChild(PROPERTY_ATTRIBUTES, AMPropertySheet.class);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster view = new AMPropertySheet(this, psModel, name);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster protected void initialize() {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster // get the type of entity selected, and name
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster String name = (String)getPageSessionAttribute(ENTITY_NAME);
protected void createPageTitleModel() {
protected void createTabModel() {
return model;
} catch (AMConsoleException e) {
forwardTo();
throws ModelControlException
forwardTo();
forwardTo();
public void retrieveCommonProperties() {
public boolean isHosted() {
protected abstract void createPropertyModel();