Search in sources :

Example 86 with AMPropertySheet

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

the class FSAuthDomainsEditViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    String name = (String) getDisplayFieldValue(FSAuthDomainsModel.TF_NAME);
    setPageSessionAttribute(FSAuthDomainsModel.TF_NAME, name);
    FSAuthDomainsModel model = (FSAuthDomainsModel) getModel();
    try {
        String realm = model.getRealm(name);
        Map values = model.getAttributeValues(realm, name);
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
        ps.setAttributeValues(values, model);
        if (addRemoveModel == null) {
            addRemoveModel = new CCAddRemoveModel();
        }
        Set providers = model.getAllProviderNames(realm);
        List selectedProviders = new ArrayList(model.getTrustedProviderNames(realm, name));
        if ((selectedProviders != null) || (!selectedProviders.isEmpty())) {
            providers.removeAll(selectedProviders);
            Map displayNames = FSAuthDomainsOpViewBeanBase.getProviderDisplayNames(model, selectedProviders);
            addRemoveModel.setSelectedOptionList(createOptionList(replacePipeWithComma(displayNames)));
        }
        Map displayNames = FSAuthDomainsOpViewBeanBase.getProviderDisplayNames(model, providers);
        addRemoveModel.setAvailableOptionList(createOptionList(replacePipeWithComma(displayNames)));
        propertySheetModel.setModel(ADD_REMOVE_PROVIDERS, addRemoveModel);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) HashSet(java.util.HashSet) Set(java.util.Set) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) ArrayList(java.util.ArrayList) FSAuthDomainsModel(com.sun.identity.console.federation.model.FSAuthDomainsModel) ArrayList(java.util.ArrayList) List(java.util.List) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map)

Example 87 with AMPropertySheet

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

the class CreateCOTViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTIES);
    ps.init();
    populateRealmData();
    FSAuthDomainsModel model = (FSAuthDomainsModel) getModel();
    String realm = "/";
    try {
        if (addRemoveModel == null) {
            addRemoveModel = new CCAddRemoveModel();
        }
        Set providers = model.getAllProviderNames(realm);
        Map displayNames = FSAuthDomainsOpViewBeanBase.getProviderDisplayNames(model, providers);
        addRemoveModel.setAvailableOptionList(createOptionList(replacePipeWithComma(displayNames)));
        psModel.setModel(ADD_REMOVE_PROVIDERS, addRemoveModel);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) TreeSet(java.util.TreeSet) HashSet(java.util.HashSet) Set(java.util.Set) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) FSAuthDomainsModel(com.sun.identity.console.federation.model.FSAuthDomainsModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map)

Example 88 with AMPropertySheet

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

the class CreateSAML2MetaDataViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    setPageSessionAttribute("protocol", protocol);
    AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTIES);
    ps.init();
    populateRealmData();
    psModel.setModel(AFFI_MEMBERS, new CCEditableListModel());
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) CCEditableListModel(com.sun.web.ui.model.CCEditableListModel)

Example 89 with AMPropertySheet

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

the class EntityEditViewBean method handleButton1Request.

/**
     * Handles create realm request.
     *
     * @param event Request invocation event
     */
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    submitCycle = true;
    EntitiesModel model = (EntitiesModel) getModel();
    AMPropertySheet prop = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
    String universalId = (String) getPageSessionAttribute(UNIVERSAL_ID);
    try {
        Map oldValues = model.getAttributeValues(universalId, false);
        Map values = prop.getAttributeValues(oldValues, true, model);
        String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
        model.modifyEntity(curRealm, universalId, 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) HashMap(java.util.HashMap) Map(java.util.Map) EntitiesModel(com.sun.identity.console.idm.model.EntitiesModel)

Example 90 with AMPropertySheet

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

the class EntityEditViewBean method setDefaultValues.

protected void setDefaultValues(String type) throws AMConsoleException {
    if (propertySheetModel != null) {
        EntitiesModel model = (EntitiesModel) getModel();
        String universalId = (String) getPageSessionAttribute(UNIVERSAL_ID);
        if (!submitCycle) {
            propertySheetModel.clear();
            try {
                Map attrValues = model.getAttributeValues(universalId, false);
                AMPropertySheet prop = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
                prop.setAttributeValues(attrValues, model);
            } catch (AMConsoleException e) {
                setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
            }
        }
        String[] uuid = { universalId };
        propertySheetModel.setValues(PROPERTY_UUID, uuid, model);
    }
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map) EntitiesModel(com.sun.identity.console.idm.model.EntitiesModel)

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