OIM ADF UI - Code Snippet to get Selected Beneficiaries form Cart.

 public static final String CART_ENTITIES_VO = "CartEntitiesVOIterator";
    public static final String ENTITY_KEY = "entityKey";
    public static final String ENTITY_DISP_NAME = "entityDisplayName";


    public HashMap<String, String> getSelectedBeneficiaries() throws Exception{
        final String logp = CN + "::getSelectedBeneficiaries- ";
        LOGGER.debug(logp + "START");

        HashMap<String, String> beneficiaries = new HashMap<String, String>();

        List<Row> rows = this.getAllRowsOfIterator(CART_ENTITIES_VO);

        for (Row row : rows) {
            final String userKey = (String)row.getAttribute(ENTITY_KEY);
            final String userDisplayName =(String)row.getAttribute(ENTITY_DISP_NAME);
            beneficiaries.put(userKey, userDisplayName);
        }
        LOGGER.debug(logp + "END");
        return beneficiaries;
    }

No comments:

Post a Comment