Search in sources :

Example 41 with OrderedSet

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

the class SCSAML2SOAPBindingRequestHandlerListAddViewBean method handleButton1Request.

protected void handleButton1Request(Map values) throws AMConsoleException {
    SCSAML2SOAPBindingViewBean vb = (SCSAML2SOAPBindingViewBean) getViewBean(SCSAML2SOAPBindingViewBean.class);
    Map attrValues = (Map) getPageSessionAttribute(SCSAML2SOAPBindingViewBean.PROPERTY_ATTRIBUTE);
    Set handlers = (Set) attrValues.get(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
    if ((handlers == null) || handlers.isEmpty()) {
        handlers = new OrderedSet();
        attrValues.put(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST, (OrderedSet) handlers);
    }
    String val = SAML2SOAPBindingRequestHandler.toString((String) values.get(ATTR_KEY), (String) values.get(ATTR_CLASS));
    if (handlers.contains(val)) {
        throw new AMConsoleException("soapBinding.service.requestHandlerList.already.exist");
    }
    handlers.add(val);
    setPageSessionAttribute(SCSAML2SOAPBindingViewBean.PAGE_MODIFIED, "1");
    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) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) Map(java.util.Map)

Example 42 with OrderedSet

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

the class SCPolicyResourceComparatorAddViewBean method handleButton1Request.

protected void handleButton1Request(PolicyResourceComparator rc) {
    SCPolicyViewBean vb = (SCPolicyViewBean) getViewBean(SCPolicyViewBean.class);
    Map attrValues = (Map) getPageSessionAttribute(SCPolicyViewBean.PROPERTY_ATTRIBUTE);
    Set resourceComparator = (Set) attrValues.get(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR);
    if ((resourceComparator == null) || resourceComparator.isEmpty()) {
        resourceComparator = new OrderedSet();
        attrValues.put(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR, (OrderedSet) resourceComparator);
    }
    resourceComparator.add(rc.toString());
    setPageSessionAttribute(SCPolicyViewBean.PAGE_MODIFIED, "1");
    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 43 with OrderedSet

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

the class SMG11NViewBean method handleTblSupportedCharsetsButtonDeleteRequest.

/**
     * Handles remove supported container request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblSupportedCharsetsButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    setSubmitCycle(true);
    CCActionTable table = (CCActionTable) getChild(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS);
    table.restoreStateData();
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS);
    Integer[] selected = tblModel.getSelectedRows();
    if ((selected != null) && (selected.length > 0)) {
        OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS);
        tblValues.removeAll(selected);
        setPageSessionAttribute(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS, tblValues);
        populateSupportedCharsetsTable(tblValues);
    }
    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)

Example 44 with OrderedSet

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

the class WSPPServiceDSAttributeMapListAddViewBean method handleButton1Request.

protected void handleButton1Request(Map values) {
    WSPersonalProfileServiceViewBean vb = (WSPersonalProfileServiceViewBean) getViewBean(WSPersonalProfileServiceViewBean.class);
    Map attrValues = (Map) getPageSessionAttribute(WSPersonalProfileServiceViewBean.PROPERTY_ATTRIBUTE);
    Set mappings = (Set) attrValues.get(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
    if ((mappings == null) || mappings.isEmpty()) {
        mappings = new OrderedSet();
        attrValues.put(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST, (OrderedSet) mappings);
    }
    mappings.add((String) values.get(ATTR_NAME) + "=" + (String) values.get(ATTR_MAPPING_ATTRIBUTE));
    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 45 with OrderedSet

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

the class WSAuthNServicesHandlersAddViewBean method handleButton1Request.

protected void handleButton1Request(Map values) {
    WSAuthNServicesViewBean vb = (WSAuthNServicesViewBean) getViewBean(WSAuthNServicesViewBean.class);
    Map attrValues = (Map) getPageSessionAttribute(WSAuthNServicesViewBean.PROPERTY_ATTRIBUTE);
    Set handlers = (Set) attrValues.get(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
    if ((handlers == null) || handlers.isEmpty()) {
        handlers = new OrderedSet();
        attrValues.put(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS, (OrderedSet) handlers);
    }
    String key = (String) values.get(ATTR_KEY);
    String val = (String) values.get(ATTR_CLASS);
    WSAuthHandlerEntry e = new WSAuthHandlerEntry(key, val);
    if (handlerExists(handlers, e)) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", "webservices.authentication.service.handlers.duplicates");
        forwardTo(getRequestContext());
        return;
    }
    handlers.add(e.toString());
    setPageSessionAttribute(WSAuthNServicesViewBean.PAGE_MODIFIED, "1");
    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) WSAuthHandlerEntry(com.sun.identity.console.webservices.model.WSAuthHandlerEntry) 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