Search in sources :

Example 36 with OrderedSet

use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.

the class WSPPServiceSupportedContainerAddViewBean method handleButton1Request.

protected void handleButton1Request(Map values) {
    WSPersonalProfileServiceViewBean vb = (WSPersonalProfileServiceViewBean) getViewBean(WSPersonalProfileServiceViewBean.class);
    Map attrValues = (Map) getPageSessionAttribute(WSPersonalProfileServiceViewBean.PROPERTY_ATTRIBUTE);
    Set containers = (Set) attrValues.get(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS);
    if ((containers == null) || containers.isEmpty()) {
        containers = new OrderedSet();
        attrValues.put(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS, (OrderedSet) containers);
    }
    containers.add(mapToString(values));
    backTrail();
    unlockPageTrailForSwapping();
    passPgSessionMap(vb);
    vb.forwardTo(getRequestContext());
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Map(java.util.Map)

Example 37 with OrderedSet

use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.

the class G11NCharsetAliasAddViewBean method handleButton1Request.

protected void handleButton1Request(Map values) {
    SMG11NViewBean vb = (SMG11NViewBean) getViewBean(SMG11NViewBean.class);
    Map attrValues = (Map) getPageSessionAttribute(SMG11NViewBean.PROPERTY_ATTRIBUTE);
    Set charsets = (Set) attrValues.get(SMG11NModelImpl.ATTRIBUTE_NAME_CHARSET_ALIAS);
    if ((charsets == null) || charsets.isEmpty()) {
        charsets = new OrderedSet();
        attrValues.put(SMG11NModelImpl.ATTRIBUTE_NAME_CHARSET_ALIAS, (OrderedSet) charsets);
    }
    String newCharsetsString = CharsetAliasEntry.toString((String) values.get(ATTR_MIMENAME), (String) values.get(ATTR_JAVANAME));
    if (charsets.contains(newCharsetsString)) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", "globalization.service.CharsetAlias.create.page.existing");
        forwardTo();
    } else {
        charsets.add(CharsetAliasEntry.toString((String) values.get(ATTR_MIMENAME), (String) values.get(ATTR_JAVANAME)));
        setPageSessionAttribute(SMG11NViewBean.PAGE_MODIFIED, "1");
        passPgSessionMap(vb);
        vb.forwardTo(getRequestContext());
    }
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Map(java.util.Map)

Example 38 with OrderedSet

use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.

the class SCPolicyViewBean method handleTblResourceComparatorButtonDeleteRequest.

/**
     * Handles remove resource comparator request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblResourceComparatorButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    submitCycle = true;
    CCActionTable table = (CCActionTable) getChild(TBL_RESOURCE);
    table.restoreStateData();
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(TBL_RESOURCE);
    Integer[] selected = tblModel.getSelectedRows();
    if ((selected != null) && (selected.length > 0)) {
        OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR);
        tblValues.removeAll(selected);
        setPageSessionAttribute(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR, tblValues);
        populateResourceComparatorTable(tblValues);
    }
    try {
        Map values = getAllValues();
        setPageSessionAttribute(PROPERTY_ATTRIBUTE, (HashMap) values);
        setPageSessionAttribute(SCPolicyViewBean.PAGE_MODIFIED, "1");
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    forwardTo();
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) CCActionTable(com.sun.web.ui.view.table.CCActionTable) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map)

Example 39 with OrderedSet

use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.

the class SCPolicyResourceComparatorEditViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    if (populateValues) {
        int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
        Map mapAttrs = (Map) getPageSessionAttribute(SCPolicyViewBean.PROPERTY_ATTRIBUTE);
        OrderedSet set = (OrderedSet) mapAttrs.get(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR);
        setValues((String) set.get(index));
    }
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Map(java.util.Map)

Example 40 with OrderedSet

use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.

the class SCPolicyViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    resetButtonState(TBL_RESOURCE_COMPARATOR_DELETE_BTN);
    if (!tablePopulated && !submitCycle) {
        AMServiceProfileModel model = (AMServiceProfileModel) getModel();
        Set resourceComp = new OrderedSet();
        Map values = model.getAttributeValues();
        resourceComp.addAll((Set) values.get(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR));
        populateResourceComparatorTable(resourceComp);
    }
    if (!isInlineAlertMessageSet()) {
        String flag = (String) getPageSessionAttribute(PAGE_MODIFIED);
        if ((flag != null) && flag.equals("1")) {
            setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
        }
    }
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) AMServiceProfileModel(com.sun.identity.console.base.model.AMServiceProfileModel) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

OrderedSet (com.sun.identity.shared.datastruct.OrderedSet)87 Map (java.util.Map)52 Set (java.util.Set)36 Iterator (java.util.Iterator)20 HashMap (java.util.HashMap)17 HashSet (java.util.HashSet)16 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)13 CCActionTableModel (com.sun.web.ui.model.CCActionTableModel)13 CCActionTable (com.sun.web.ui.view.table.CCActionTable)12 AMServiceProfileModel (com.sun.identity.console.base.model.AMServiceProfileModel)6 CaseInsensitiveHashSet (com.sun.identity.common.CaseInsensitiveHashSet)5 ArrayList (java.util.ArrayList)5 LinkedHashSet (java.util.LinkedHashSet)5 SMDiscoveryServiceData (com.sun.identity.console.service.model.SMDiscoveryServiceData)4 List (java.util.List)4 AuthPropertiesModel (com.sun.identity.console.authentication.model.AuthPropertiesModel)3 WSAuthHandlerEntry (com.sun.identity.console.webservices.model.WSAuthHandlerEntry)3 IdRepo (com.sun.identity.idm.IdRepo)3 Issuer (com.sun.identity.saml2.assertion.Issuer)3 SAML2Exception (com.sun.identity.saml2.common.SAML2Exception)3