Search in sources :

Example 31 with OrderedSet

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

the class WSPersonalProfileServiceViewBean method handleTblDSAttributeMapListButtonDeleteRequest.

/**
     * Handles remove LDAP Attribute Mapping request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblDSAttributeMapListButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    setSubmitCycle(true);
    CCActionTable table = (CCActionTable) getChild(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
    table.restoreStateData();
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
    Integer[] selected = tblModel.getSelectedRows();
    if ((selected != null) && (selected.length > 0)) {
        OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
        tblValues.removeAll(selected);
        setPageSessionAttribute(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST, tblValues);
        populateDSAttributeMapListTable(tblValues);
    }
    resetButtonState(TBL_DS_ATTRIBUTE_MAP_LIST_DELETE_BTN);
    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 32 with OrderedSet

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

the class WSAuthNServicesHandlersEditViewBean method getRequestData.

/**
     * Used to extract the mechanism handler data passed in the page session.
     * The mechanism name is needed to construct the breadcrumb trail.
     */
private void getRequestData() {
    int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
    Map mapAttrs = (Map) getPageSessionAttribute(WSAuthNServicesViewBean.PROPERTY_ATTRIBUTE);
    OrderedSet set = (OrderedSet) mapAttrs.get(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
    mechanismEntry = (String) set.get(index);
    WSAuthHandlerEntry entry = new WSAuthHandlerEntry(mechanismEntry);
    mechanismName = entry.strKey;
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) WSAuthHandlerEntry(com.sun.identity.console.webservices.model.WSAuthHandlerEntry) Map(java.util.Map)

Example 33 with OrderedSet

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

the class WSAuthNServicesHandlersEditViewBean method handleButton1Request.

protected void handleButton1Request(Map values) {
    WSAuthNServicesViewBean vb = (WSAuthNServicesViewBean) getViewBean(WSAuthNServicesViewBean.class);
    Map mapAttrs = (Map) getPageSessionAttribute(WSAuthNServicesViewBean.PROPERTY_ATTRIBUTE);
    OrderedSet handlers = (OrderedSet) mapAttrs.get(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
    int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
    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.set(index, e.toString());
    setPageSessionAttribute(WSAuthNServicesViewBean.PAGE_MODIFIED, "1");
    backTrail();
    unlockPageTrailForSwapping();
    passPgSessionMap(vb);
    vb.forwardTo(getRequestContext());
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) WSAuthHandlerEntry(com.sun.identity.console.webservices.model.WSAuthHandlerEntry) Map(java.util.Map)

Example 34 with OrderedSet

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

the class WSAuthNServicesViewBean method handleTblHandlersButtonDeleteRequest.

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

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

the class WSPersonalProfileServiceViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    if (!tablePopulated) {
        if (!isSubmitCycle()) {
            AMServiceProfileModel model = (AMServiceProfileModel) getModel();
            if (model != null) {
                Set supportedContainers = new OrderedSet();
                supportedContainers.addAll(model.getAttributeValues(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS));
                populateSupportedContainersTable(supportedContainers);
                Set dsAttributeMapList = new OrderedSet();
                dsAttributeMapList.addAll(model.getAttributeValues(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST));
                populateDSAttributeMapListTable(dsAttributeMapList);
            }
        }
    }
}
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