STSAddViewBeanBase.java revision 4cc414596f330cc595f62252d964ef97b3795056
/*
* 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 legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at 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]".
*
* Copyright 2014-2015 ForgeRock AS.
*/
/*
* Portions Copyrighted 2015 Nomura Research Institute, Ltd.
*/
/**
* The ViewBean used to create new Rest STS instances. Extends the AMServiceProfileViewBeanBase class as this class
* provides for automatic constitution of propertySheet values based on model state.
*/
public class STSAddViewBeanBase extends AMServiceProfileViewBeanBase {
}
protected void initialize() {
super.initialize();
}
protected void registerChildren() {
super.registerChildren();
}
protected void createPageTitleModel() {
}
protected AMModel getModelInternal() {
try {
} else {
}
} catch (AMConsoleException e) {
throw new IllegalStateException("Exception getting model in STSAddViewBeanBase: " + e.getMessage(), e);
}
}
/**
* Handles save button request. Validates the rest sts configuration state, and invokes the model to publish a
* rest sts instance corresponding to this state.
* @param event Request invocation event
*/
submitCycle = true;
try {
STSInstanceModelResponse validationResponse = model.validateConfigurationState(stsType, configurationState);
if (validationResponse.isSuccessful()) {
try {
STSInstanceModelResponse creationResponse = model.createInstance(stsType, configurationState, currentRealm);
if (creationResponse.isSuccessful()) {
} else {
}
} catch (AMConsoleException e) {
throw new ModelControlException(e);
}
} else {
}
} catch (AMConsoleException e) {
//will be entered if getAttributeSettings throws a AMConsoleException because passwords are mis-matched.
}
forwardTo();
}
/**
* Handles cancel button request.
*
* @param event Request invocation event
*/
try {
} catch (AMConsoleException e) {
}
}
private void forwardToAMViewBean() throws AMConsoleException {
}
/*
Returns a map of all settings, including those not changed from the default values in the model.
AMConsoleException will be thrown if passwords are mis-matched.
*/
}
return values;
}
protected String getBackButtonLabel() {
return "button.back";
}
throw new AMConsoleException("No page session attribute corresponding to " + AMAdminConstants.SAVE_VB_NAME);
}
try {
} catch (ClassNotFoundException e) {
throw new AMConsoleException("Could not find class corresponding to class name "
+ name + ". Exception: " + e);
}
} else {
}
}
}