Esempio n. 1
0
  /*
  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.
   */
  private Map getAttributeSettings() throws ModelControlException, AMConsoleException {
    Map values = null;
    AMServiceProfileModel model = (AMServiceProfileModel) getModel();

    if (model != null) {
      AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
      values = ps.getAttributeValues(model.getAttributeValues(), false, model);
    }
    return values;
  }
  /**
   * Handles next button request.
   *
   * @param event Request invocation event.
   */
  public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    submitCycle = true;
    String subConfigName = (String) getDisplayFieldValue(ATTR_SUBCONFIG_NAME);
    SubConfigModel model = (SubConfigModel) getModel();

    try {
      AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
      String schemaName =
          (String) getPageSessionAttribute(AMServiceProfile.PG_SESSION_SUB_SCHEMA_NAME);
      Map values = ps.getAttributeValues(model.getAttributeNames(schemaName));
      model.createSubConfig(subConfigName, schemaName, values);
      backToProfileViewBean();
    } catch (AMConsoleException e) {
      setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
      forwardTo();
    }
  }