Search in sources :

Example 26 with AMPropertySheet

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

the class FederationViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    setSelectedTabNode(getCurrentRealm());
    String id = (String) getPageSessionAttribute(getTrackingTabIDName());
    setPageSessionAttribute(AMAdminConstants.PREVIOUS_TAB_ID, id);
    resetButtonState("deleteCOTButton");
    resetButtonState("deleteEntityButton");
    resetButtonState("deleteTPButton");
    AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
    populateCOTTable();
    populateEntityTable();
    populateSAMLTable();
    String msg = (String) removePageSessionAttribute(MESSAGE_TEXT);
    if (msg != null) {
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", msg);
    }
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet)

Example 27 with AMPropertySheet

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

the class IDFFGeneralViewBean method populateValue.

private void populateValue(String name) {
    IDFFModel model = (IDFFModel) getModel();
    try {
        Map values = model.getCommonAttributeValues(realm, name);
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        ps.setAttributeValues(values, model);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : IDFFModel(com.sun.identity.console.federation.model.IDFFModel) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) Map(java.util.Map)

Example 28 with AMPropertySheet

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

the class IDFFAffiliateViewBean method populateValue.

private void populateValue(String name) {
    IDFFModel model = (IDFFModel) getModelInternal();
    try {
        Map values = model.getAffiliateProfileAttributeValues(realm, name);
        Set availableEntities = model.getAllEntityDescriptorNames(realm);
        Set affliliatEntities = model.getAllAffiliateEntityDescriptorNames(realm);
        Set affiliateMembers = model.getAllAffiliateMembers(realm, name);
        availableEntities.removeAll(affiliateMembers);
        availableEntities.removeAll(affliliatEntities);
        if (affiliateMembersModel == null) {
            affiliateMembersModel = new CCAddRemoveModel();
        }
        if ((availableEntities != null) && !availableEntities.isEmpty()) {
            affiliateMembersModel.setAvailableOptionList(createOptionList(availableEntities));
        }
        if ((affiliateMembers != null) && !affiliateMembers.isEmpty()) {
            affiliateMembersModel.setSelectedOptionList(createOptionList(affiliateMembers));
        }
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        ps.setAttributeValues(values, model);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : IDFFModel(com.sun.identity.console.federation.model.IDFFModel) Set(java.util.Set) HashSet(java.util.HashSet) CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) Map(java.util.Map)

Example 29 with AMPropertySheet

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

the class IDFFSPViewBean method populateValue.

private void populateValue(String realm, String name) {
    try {
        IDFFModel model = (IDFFModel) getModelInternal();
        Map values = model.getEntitySPDescriptor(realm, name);
        values.putAll(model.getSPEntityConfig(realm, name, location));
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        ps.setAttributeValues(values, model);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : IDFFModel(com.sun.identity.console.federation.model.IDFFModel) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) Map(java.util.Map)

Example 30 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)

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