Search in sources :

Example 21 with CCAddRemoveModel

use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.

the class SMDiscoveryDescriptionViewBeanBase method populateMechID.

void populateMechID() {
    populateMechID = true;
    CCAddRemoveModel model = new CCAddRemoveModel();
    model.setOrientation(CCAddRemoveModel.VERTICAL);
    model.setListboxHeight(CCAddRemoveModel.DEFAULT_LISTBOX_HEIGHT);
    setMechID(model);
    propertySheetModel.setModel(ATTR_NAME_SECURITY_MECH_ID, model);
}
Also used : CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel)

Example 22 with CCAddRemoveModel

use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.

the class IDFFAffiliateViewBean method handleButton1Request.

/**
     * Handles save
     *
     * @param event Request invocation event
     */
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    retrieveCommonProperties();
    IDFFModel model = (IDFFModel) getModel();
    try {
        // get affiliate members
        CCAddRemove addRemoveList = (CCAddRemove) getChild(model.ATTR_AFFILIATE_MEMBERS);
        addRemoveList.restoreStateData();
        CCAddRemoveModel addRemoveModel = (CCAddRemoveModel) addRemoveList.getModel();
        Set members = new HashSet(getSelectedValues(addRemoveModel));
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        Map orig = model.getAffiliateProfileAttributeValues(realm, entityName);
        Map values = ps.getAttributeValues(orig, false, model);
        model.updateAffiliateProfile(realm, entityName, values, members);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "idff.entityDescriptor.Affiliate.updated");
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        debug.warning("IDFFAffiliateViewBean.handleButton1Request", e);
    }
    forwardTo();
}
Also used : IDFFModel(com.sun.identity.console.federation.model.IDFFModel) CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) Set(java.util.Set) HashSet(java.util.HashSet) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) CCAddRemove(com.sun.web.ui.view.addremove.CCAddRemove) Map(java.util.Map) HashSet(java.util.HashSet)

Example 23 with CCAddRemoveModel

use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.

the class SAMLv2AffiliateViewBean method handleButton1Request.

public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    try {
        SAMLv2Model model = (SAMLv2Model) getModel();
        CCAddRemove addRemoveList = (CCAddRemove) getChild(model.AFFILIATE_MEMBER);
        addRemoveList.restoreStateData();
        CCAddRemoveModel addRemoveModel = (CCAddRemoveModel) addRemoveList.getModel();
        Set members = new HashSet(getSelectedValues(addRemoveModel));
        if (members.isEmpty() || members == null) {
            throw new AMConsoleException(model.getLocalizedString("samlv2.create.provider.missing.affiliation.members"));
        }
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        Map orig = getStandardAffiliationValues();
        Map values = ps.getAttributeValues(orig, false, model);
        model.setStdAffilationValues(realm, entityName, values, members);
        //save for ext will be done once backend api is ready
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "samlv2.affiliation.property.updated");
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    forwardTo();
}
Also used : CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) Set(java.util.Set) HashSet(java.util.HashSet) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model) CCAddRemove(com.sun.web.ui.view.addremove.CCAddRemove) HashMap(java.util.HashMap) Map(java.util.Map) HashSet(java.util.HashSet)

Example 24 with CCAddRemoveModel

use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.

the class IDFFAffiliateViewBean method createPropertyModel.

protected void createPropertyModel() {
    psModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/propertyIDFFAffiliate.xml"));
    psModel.clear();
    if (affiliateMembersModel == null) {
        affiliateMembersModel = new CCAddRemoveModel();
    }
    psModel.setModel("arlistAffiliateMembers", affiliateMembersModel);
}
Also used : CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel)

Example 25 with CCAddRemoveModel

use of com.sun.web.ui.model.CCAddRemoveModel in project OpenAM by OpenRock.

the class SAMLv2AffiliateViewBean method createPropertyModel.

protected void createPropertyModel() {
    SAMLv2Model model = (SAMLv2Model) getModel();
    retrieveCommonProperties();
    psModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/propertySAMLv2Affiliation.xml"));
    psModel.clear();
    if (samladdRemoveModel == null) {
        samladdRemoveModel = new CCAddRemoveModel();
    }
    psModel.setModel(model.AFFILIATE_MEMBER, samladdRemoveModel);
}
Also used : CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model)

Aggregations

CCAddRemoveModel (com.sun.web.ui.model.CCAddRemoveModel)33 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)15 Set (java.util.Set)15 HashSet (java.util.HashSet)14 CCAddRemove (com.sun.web.ui.view.addremove.CCAddRemove)11 Map (java.util.Map)11 AMPropertySheetModel (com.sun.identity.console.base.model.AMPropertySheetModel)9 HashMap (java.util.HashMap)9 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)8 OptionList (com.iplanet.jato.view.html.OptionList)7 TreeSet (java.util.TreeSet)5 DelegationConfig (com.sun.identity.console.delegation.model.DelegationConfig)4 FSAuthDomainsModel (com.sun.identity.console.federation.model.FSAuthDomainsModel)4 EntitiesModel (com.sun.identity.console.idm.model.EntitiesModel)4 CCOrderedListModel (com.sun.identity.console.ui.model.CCOrderedListModel)4 CCEditableListModel (com.sun.web.ui.model.CCEditableListModel)4 ArrayList (java.util.ArrayList)4 Iterator (java.util.Iterator)4 Option (com.iplanet.jato.view.html.Option)3 SAMLv2Model (com.sun.identity.console.federation.model.SAMLv2Model)3