Search in sources :

Example 26 with OrderedSet

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

the class SMDiscoveryProviderResourceIdMapperAddViewBean method handleButton1Request.

protected void handleButton1Request(Map data) {
    SMDiscoveryServiceViewBean vb = (SMDiscoveryServiceViewBean) getViewBean(SMDiscoveryServiceViewBean.class);
    Map attrValues = (Map) getPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE);
    Set mapper = (Set) attrValues.get(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
    if (mapper == null) {
        mapper = new OrderedSet();
        attrValues.put(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER, mapper);
    }
    mapper.add(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) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Map(java.util.Map)

Example 27 with OrderedSet

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

the class SMDiscoveryServiceViewBean method handleTblBootstrapResOffButtonDeleteRequest.

/**
     * Handles remove resource offerings request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblBootstrapResOffButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    setSubmitCycle(true);
    CCActionTable table = (CCActionTable) getChild(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
    table.restoreStateData();
    CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
    Integer[] selected = tblModel.getSelectedRows();
    if ((selected != null) && (selected.length > 0)) {
        try {
            OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
            SMDiscoveryServiceData smEntry = SMDiscoveryServiceData.getEntries(tblValues);
            smEntry.deleteDiscoEntries(selected);
            tblValues = (OrderedSet) smEntry.getDiscoveryEntries();
            setPageSessionAttribute(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF, tblValues);
            populateBootstrapResOffTable(tblValues);
        } catch (AMConsoleException e) {
            setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        }
    }
    forwardTo();
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) SMDiscoveryServiceData(com.sun.identity.console.service.model.SMDiscoveryServiceData) CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) CCActionTable(com.sun.web.ui.view.table.CCActionTable) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Example 28 with OrderedSet

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

the class FSSAMLTrustedPartnersViewBeanBase method setValues.

/**
     * Set value of a entry from the cache value in page session.
     *
     * @param idx Index of the entry in the cache Set.
     */
protected void setValues(int idx) {
    Map mapAttrs = (Map) getPageSessionAttribute(FSSAMLServiceViewBean.PROPERTY_ATTRIBUTE);
    OrderedSet set = (OrderedSet) mapAttrs.get(FederationViewBean.TABLE_TRUSTED_PARTNERS);
    setValues(AMPipeDelimitAttrTokenizer.getInstance().tokenizes((String) set.get(idx)));
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) HashMap(java.util.HashMap) Map(java.util.Map)

Example 29 with OrderedSet

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

the class SCPolicyResourceComparatorEditViewBean method handleButton1Request.

protected void handleButton1Request(PolicyResourceComparator rc) {
    SCPolicyViewBean vb = (SCPolicyViewBean) getViewBean(SCPolicyViewBean.class);
    Map mapAttrs = (Map) getPageSessionAttribute(SCPolicyViewBean.PROPERTY_ATTRIBUTE);
    OrderedSet resourceComparators = (OrderedSet) mapAttrs.get(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR);
    int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
    resourceComparators.set(index, rc.toString());
    setPageSessionAttribute(SCPolicyViewBean.PAGE_MODIFIED, "1");
    backTrail();
    unlockPageTrailForSwapping();
    passPgSessionMap(vb);
    vb.forwardTo(getRequestContext());
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Map(java.util.Map)

Example 30 with OrderedSet

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

the class WSAuthNServicesViewBean method beginDisplay.

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