Search in sources :

Example 61 with AMPropertySheet

use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.

the class MAPDeviceProfileViewBean method handleButton1Request.

/**
     * Handles create device request.
     *
     * @param event Request Invocation Event.
     */
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    submitCycle = true;
    AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
    MAPDeviceProfileModel model = (MAPDeviceProfileModel) getModel();
    deviceName = (String) getDisplayFieldValue(TF_DEVICE_NAME);
    Map orig = model.getAttributeValues(deviceName, (String) getDisplayFieldValue(TF_CLASSIFICATION));
    try {
        Map values = ps.getAttributeValues(orig, true, model);
        model.modifyProfile(deviceName, values);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.updated");
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    forwardTo();
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) Map(java.util.Map) MAPDeviceProfileModel(com.sun.identity.console.service.model.MAPDeviceProfileModel)

Example 62 with AMPropertySheet

use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.

the class SCPolicyViewBean method getAllValues.

protected Map getAllValues() 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, false, model);
    }
    return values;
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) HashMap(java.util.HashMap) Map(java.util.Map) AMServiceProfileModel(com.sun.identity.console.base.model.AMServiceProfileModel)

Example 63 with AMPropertySheet

use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.

the class WSAuthNServicesViewBean method prePopulateTable.

private void prePopulateTable() {
    Map attributeValues = (Map) removePageSessionAttribute(PROPERTY_ATTRIBUTE);
    if (attributeValues != null) {
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
        ps.setAttributeValues(attributeValues, getModel());
    }
    prePopulateHandlersTable(attributeValues);
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) HashMap(java.util.HashMap) Map(java.util.Map)

Example 64 with AMPropertySheet

use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.

the class SelectTypeViewBeanBase method createChild.

protected View createChild(String name) {
    View view = null;
    if (name.equals(PGTITLE_TWO_BTNS)) {
        view = new CCPageTitle(this, ptModel, name);
    } else if (name.equals(PROPERTY_ATTRIBUTE)) {
        view = new AMPropertySheet(this, propertySheetModel, name);
    } else if (propertySheetModel.isChildSupported(name)) {
        view = propertySheetModel.createChild(this, name, getModel());
        if (name.equals(getTypeOptionsChildName())) {
            CCRadioButton rb = (CCRadioButton) view;
            rb.setOptions(getTypeOptions());
        }
    } else if (ptModel.isChildSupported(name)) {
        view = ptModel.createChild(this, name);
    } else {
        view = super.createChild(name);
    }
    return view;
}
Also used : CCRadioButton(com.sun.web.ui.view.html.CCRadioButton) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) View(com.iplanet.jato.view.View) CCPageTitle(com.sun.web.ui.view.pagetitle.CCPageTitle)

Example 65 with AMPropertySheet

use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.

the class RealmPropertiesViewBean method handleButton1Request.

/**
     * Handles save button request.
     *
     * @param event Request invocation event
     */
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    submitCycle = true;
    RMRealmModel model = (RMRealmModel) getModel();
    String realm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    AMPropertySheet ps = (AMPropertySheet) getChild(REALM_PROPERTIES);
    try {
        Map orig = model.getAttributeValues(realm);
        Map values = ps.getAttributeValues(orig, true, true, model);
        model.setAttributeValues(realm, values);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.updated");
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    forwardTo();
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) Map(java.util.Map) RMRealmModel(com.sun.identity.console.realm.model.RMRealmModel)

Aggregations

AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)122 Map (java.util.Map)79 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)76 HashMap (java.util.HashMap)37 SAMLv2Model (com.sun.identity.console.federation.model.SAMLv2Model)28 Set (java.util.Set)21 HashSet (java.util.HashSet)15 List (java.util.List)10 View (com.iplanet.jato.view.View)9 IDFFModel (com.sun.identity.console.federation.model.IDFFModel)8 SubConfigModel (com.sun.identity.console.service.model.SubConfigModel)8 CCAddRemoveModel (com.sun.web.ui.model.CCAddRemoveModel)8 ArrayList (java.util.ArrayList)7 Iterator (java.util.Iterator)7 CCPageTitle (com.sun.web.ui.view.pagetitle.CCPageTitle)6 ModelControlException (com.iplanet.jato.model.ModelControlException)5 WSFedPropertiesModel (com.sun.identity.console.federation.model.WSFedPropertiesModel)5 EntitiesModel (com.sun.identity.console.idm.model.EntitiesModel)5 AbstractAuditModel (com.sun.identity.console.audit.model.AbstractAuditModel)4 FSAuthDomainsModel (com.sun.identity.console.federation.model.FSAuthDomainsModel)4