Search in sources :

Example 21 with OrderedSet

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

the class SMDiscoveryBootstrapRefOffEditViewBean method getCurrentServiceData.

protected SMDiscoEntryData getCurrentServiceData() {
    SMDiscoEntryData curData = null;
    int currentIdx = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
    Map mapAttrs = (Map) getPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE);
    OrderedSet set = (OrderedSet) mapAttrs.get(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
    try {
        SMDiscoveryServiceData smEntry = SMDiscoveryServiceData.getEntries(set);
        List resourceData = smEntry.getResourceData();
        curData = (SMDiscoEntryData) resourceData.get(currentIdx);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    return curData;
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData) SMDiscoveryServiceData(com.sun.identity.console.service.model.SMDiscoveryServiceData) List(java.util.List) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map)

Example 22 with OrderedSet

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

the class SMDiscoveryProviderResourceIdMapperEditViewBean method getCurrentServiceData.

protected String getCurrentServiceData() {
    int currentIdx = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
    Map mapAttrs = (Map) getPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE);
    OrderedSet set = (OrderedSet) mapAttrs.get(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
    return (String) set.get(currentIdx);
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Map(java.util.Map)

Example 23 with OrderedSet

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

the class SMDiscoveryProviderResourceIdMapperEditViewBean method handleButton1Request.

protected void handleButton1Request(Map data) throws AMConsoleException {
    SMDiscoveryServiceViewBean vb = (SMDiscoveryServiceViewBean) getViewBean(SMDiscoveryServiceViewBean.class);
    Map mapAttrs = (Map) getPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE);
    OrderedSet mapper = (OrderedSet) mapAttrs.get(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
    int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
    mapper.set(index, AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER_PROVIDER_ID + "=" + (String) data.get(ATTR_PROVIDERID) + "|" + AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER_ID_MAPPER + "=" + (String) data.get(ATTR_IDMAPPER));
    setPageSessionAttribute(SMDiscoveryServiceViewBean.PAGE_MODIFIED, "1");
    backTrail();
    unlockPageTrailForSwapping();
    passPgSessionMap(vb);
    vb.forwardTo(getRequestContext());
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Map(java.util.Map)

Example 24 with OrderedSet

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

the class SMDiscoveryServiceViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    resetButtonState(TBL_BOOTSTRAP_RES_OFF_DELETE_BTN);
    resetButtonState(TBL_PROVIDER_RESOURCEID_MAPPER_DELETE_BTN);
    if (!tablePopulated) {
        if (!isSubmitCycle()) {
            SMDiscoveryServiceModel model = (SMDiscoveryServiceModel) getModel();
            if (model != null) {
                populateProviderResourceIdMapperTable(model.getProviderResourceIdMapper());
                Set resoff = new OrderedSet();
                resoff.addAll(model.getDiscoEntry(false));
                populateBootstrapResOffTable(resoff);
            }
        }
    }
    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) SMDiscoveryServiceModel(com.sun.identity.console.service.model.SMDiscoveryServiceModel)

Example 25 with OrderedSet

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

the class SMDiscoveryServiceViewBean method handleTblProviderResourceIdMapperButtonDeleteRequest.

/**
     * Handles remove provider resource id mapper request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblProviderResourceIdMapperButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    setSubmitCycle(true);
    CCActionTable table = (CCActionTable) getChild(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
    table.restoreStateData();
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
    Integer[] selected = tblModel.getSelectedRows();
    if ((selected != null) && (selected.length > 0)) {
        OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
        tblValues.removeAll(selected);
        populateProviderResourceIdMapperTable(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)

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