Search in sources :

Example 76 with OrderedSet

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

the class SCSOAPBindingRequestHandlerListDupViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    if (dupIndex != -1) {
        Map mapAttrs = (Map) getPageSessionAttribute(SCSOAPBindingViewBean.PROPERTY_ATTRIBUTE);
        OrderedSet set = (OrderedSet) mapAttrs.get(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
        setValues((String) set.get(dupIndex));
    }
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Map(java.util.Map)

Example 77 with OrderedSet

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

the class SCSOAPBindingViewBean method handleTblRequestHandlerListButtonDeleteRequest.

/**
     * Handles remove request handlers request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblRequestHandlerListButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    setSubmitCycle(true);
    CCActionTable table = (CCActionTable) getChild(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
    table.restoreStateData();
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
    Integer[] selected = tblModel.getSelectedRows();
    if ((selected != null) && (selected.length > 0)) {
        OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
        tblValues.removeAll(selected);
        setPageSessionAttribute(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST, tblValues);
        populateRequestHandlerListTable(tblValues);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
        setPageSessionAttribute(PAGE_MODIFIED, "1");
    }
    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 78 with OrderedSet

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

the class SCSOAPBindingViewBean 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(SCSOAPBindingModelImpl.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)

Example 79 with OrderedSet

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

the class SMDiscoveryBootstrapRefOffAddViewBean method handleButton1Request.

protected void handleButton1Request(SMDiscoEntryData smData) {
    SMDiscoveryServiceViewBean vb = (SMDiscoveryServiceViewBean) getViewBean(SMDiscoveryServiceViewBean.class);
    Map attrValues = (Map) getPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE);
    Set resoff = (Set) attrValues.get(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
    try {
        SMDiscoveryServiceData smEntry = ((resoff == null) || resoff.isEmpty()) ? new SMDiscoveryServiceData() : SMDiscoveryServiceData.getEntries(resoff);
        smEntry.addResourceData(smData);
        attrValues.put(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF, (OrderedSet) smEntry.getDiscoveryEntries());
        setPageSessionAttribute(SMDiscoveryServiceViewBean.PAGE_MODIFIED, "1");
        backTrail();
        unlockPageTrailForSwapping();
        passPgSessionMap(vb);
        vb.forwardTo(getRequestContext());
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        forwardTo();
    }
}
Also used : Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) SMDiscoveryServiceData(com.sun.identity.console.service.model.SMDiscoveryServiceData) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) Map(java.util.Map)

Example 80 with OrderedSet

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

the class SCSOAPBindingViewBean method prePopulateRequestHandlerListTable.

private void prePopulateRequestHandlerListTable(Map attributeValues) {
    Set handlers = null;
    if (attributeValues != null) {
        handlers = new OrderedSet();
        Set set = (Set) attributeValues.get(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
        if ((set != null) && !set.isEmpty()) {
            handlers.addAll(set);
        }
    } else {
        handlers = (Set) removePageSessionAttribute(SCSOAPBindingModelImpl.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)

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