Search in sources :

Example 66 with OrderedSet

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

the class ValidationErrorHandler method getAttributeValuePair.

/**
     * Method to get Values within AttributeValuePair as a java.util.Set
     * If <class>unescape<class> is set to false, xml escaped chars will not
     * be unescaped.
     */
public static Set getAttributeValuePair(Node node, boolean unescape) {
    if (!node.getNodeName().equals(ATTR_VALUE_PAIR_NODE)) {
        return (null);
    }
    Set retVal = new OrderedSet();
    NodeList children = node.getChildNodes();
    for (int i = 0; i < children.getLength(); i++) {
        Node n = children.item(i);
        if (n.getNodeName().equalsIgnoreCase(VALUE_NODE)) {
            retVal.add(getValueOfValueNode(n, unescape));
        }
    }
    return (retVal);
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) HashSet(java.util.HashSet) LinkedHashSet(java.util.LinkedHashSet) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) NodeList(org.w3c.dom.NodeList) Node(org.w3c.dom.Node)

Example 67 with OrderedSet

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

the class AMPropertySheet method getValues.

private static Set getValues(OptionList optList) {
    OrderedSet values = null;
    if ((optList != null) && (optList.size() > 0)) {
        int sz = optList.size();
        values = new OrderedSet();
        for (int i = 0; i < sz; i++) {
            Option opt = optList.get(i);
            values.add(opt.getValue());
        }
    }
    return (values == null) ? Collections.EMPTY_SET : values;
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Option(com.iplanet.jato.view.html.Option)

Example 68 with OrderedSet

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

the class AMViewBeanBase method getValues.

/**
     * Returns a set of string from a option list items.
     *
     * @param optList Option list that contains the items.
     * @return Set of string from a option list items.
     */
public static Set getValues(OptionList optList) {
    Set set = null;
    if ((optList != null) && (optList.size() > 0)) {
        int sz = optList.size();
        set = new OrderedSet();
        for (int i = 0; i < sz; i++) {
            set.add(optList.getValue(i));
        }
    }
    return (set != null) ? set : Collections.EMPTY_SET;
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) HashSet(java.util.HashSet)

Example 69 with OrderedSet

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

the class SCSAML2SOAPBindingViewBean method prePopulateRequestHandlerListTable.

private void prePopulateRequestHandlerListTable(Map attributeValues) {
    Set handlers = null;
    if (attributeValues != null) {
        handlers = new OrderedSet();
        Set set = (Set) attributeValues.get(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
        if ((set != null) && !set.isEmpty()) {
            handlers.addAll(set);
        }
    } else {
        handlers = (Set) removePageSessionAttribute(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
    }
    if (handlers != null) {
        populateRequestHandlerListTable(handlers);
    }
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet)

Example 70 with OrderedSet

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

the class SCSAML2SOAPBindingViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    resetButtonState(TBL_REQUEST_HANDLER_LIST_DELETE_BTN);
    if (!tablePopulated) {
        if (!isSubmitCycle()) {
            AMServiceProfileModel model = (AMServiceProfileModel) getModel();
            if (model != null) {
                Set handlers = new OrderedSet();
                handlers.addAll(model.getAttributeValues(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST));
                populateRequestHandlerListTable(handlers);
            }
        }
    }
    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)

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