EditAuthTypeViewBean.java revision 8344dbc410a240a6a8fb8fdd4a2e9474762c2b65
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: EditAuthTypeViewBean.java,v 1.2 2008/06/25 05:42:45 qcheng Exp $
*
*/
/**
* Portions Copyright 2014 ForgeRock AS
*/
public class EditAuthTypeViewBean
extends AMServiceProfileViewBeanBase
{
private boolean dynamicRequest = false;
/**
* Creates a authentication module edit view bean.
*/
public EditAuthTypeViewBean() {
/*
* The name of the service will return null if the entry no
* longer exists. This can happen if someone is viewing the
* properties of a service, and another person deletes the
* entry. Any request on that page will result in an error
* without a valid service name. To avoid the error we set the
* service name to the default core authentication service.
*/
"The auth instance could not be found. The instance name" +
" has been reset to " + name);
}
}
}
/**
* Checks to see if this is a dynamic validator request, if not execution is passed to the parent.
*
* @param event Request invocation event.
*/
} else {
super.handleDynLinkRequest(event);
}
}
/**
* Retrieve the validators specified for the attribute, invoke their validate methods
* and display the validation messages if any are present.
*
* @param attributeName The name of the attribute for which the validation should be done.
*/
try {
// Store the current attribute values from the UI to render when beginDisplay is called
dynamicRequest = true;
}
}
}
}
}
} else {
}
} catch (AMConsoleException e) {
}
forwardTo();
}
/**
* Converts the Attribute Value map to a checked map.
* @return A checked attribute value map.
*/
if (propertySheetModel != null) {
while (oldIterator.hasNext()) {
}
}
return checkedValueMap;
}
/**
* This will populate the property sheet with attribute values for display. If this is called after
* a dynamic request the values that was present on the UI (which might not have been persisted) will be used.
* @param event The display event.
* @throws ModelControlException
*/
super.beginDisplay(event);
// If this is not a dynamic request the UI is set with persisted values
if (!dynamicRequest) {
}
}
}
}
throws NavigationException {
super.forwardTo(reqContext);
}
protected String getBackButtonLabel() {
return getBackButtonLabel("config.auth.label");
}
/**
* Handles save request.
*
* @param event Request invocation event.
*/
throws ModelControlException
{
/*
* The service name will be null if the entry was deleted by
* another user while the properties were being viewed.
*/
} else {
try {
"message.information", "message.updated");
} catch (AMConsoleException e) {
e.getMessage());
}
}
forwardTo();
}
}
/**
* Handles save request.
*
* @param event Request invocation event.
*/
throws ModelControlException
{
/*
* The service name will be null if the entry was deleted by
* another user while the properties were being viewed.
*/
} else {
super.handleButton2Request(event);
}
}
/**
* Handles reset request.
*
* @param event Request invocation event
*/
}
backTrail();
getViewBean(AuthPropertiesViewBean.class);
}
}
{
}
return values;
}
/*
* Returns the real service name for a given authentication type
*/
AuthPropertiesModel m = getAuthModel();
return m.getServiceName(type);
}
private AuthPropertiesModel getAuthModel() {
authModel = new AuthPropertiesModelImpl(
}
return authModel;
}
protected String getBreadCrumbDisplayName() {
}
protected boolean startPageTrail() {
return false;
}
protected AMModel getModelInternal() {
try {
return new AuthProfileModelImpl(
} catch (AMConsoleException e) {
e.getMessage());
}
return null;
}
}