Search in sources :

Example 16 with DiscoveryDataCache

use of com.sun.identity.console.service.model.DiscoveryDataCache in project OpenAM by OpenRock.

the class UMUserResourceOfferingViewBean method handleButton1Request.

/**
     * Handles finish service request.
     *
     * @param event Request invocation event.
     */
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    submitCycle = true;
    UMUserResourceOfferingModel model = (UMUserResourceOfferingModel) getModel();
    String userId = (String) getPageSessionAttribute(EntityEditViewBean.UNIVERSAL_ID);
    DiscoveryDataCache cache = DiscoveryDataCache.getInstance();
    String cacheID = (String) getPageSessionAttribute(UMUserResourceOfferingViewBean.DATA_ID);
    SMDiscoveryServiceData smEntry = cache.getData(model.getUserSSOToken(), cacheID);
    try {
        model.setUserDiscoEntry(userId, smEntry);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    forwardToServicesViewBean();
}
Also used : SMDiscoveryServiceData(com.sun.identity.console.service.model.SMDiscoveryServiceData) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) UMUserResourceOfferingModel(com.sun.identity.console.user.model.UMUserResourceOfferingModel) DiscoveryDataCache(com.sun.identity.console.service.model.DiscoveryDataCache)

Aggregations

DiscoveryDataCache (com.sun.identity.console.service.model.DiscoveryDataCache)16 SMDiscoveryServiceData (com.sun.identity.console.service.model.SMDiscoveryServiceData)13 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)10 SMDiscoEntryData (com.sun.identity.console.service.model.SMDiscoEntryData)6 UMUserResourceOfferingModel (com.sun.identity.console.user.model.UMUserResourceOfferingModel)5 EntityResourceOfferingModel (com.sun.identity.console.idm.model.EntityResourceOfferingModel)4 RealmResourceOfferingModel (com.sun.identity.console.realm.model.RealmResourceOfferingModel)4 Iterator (java.util.Iterator)4 CCActionTable (com.sun.web.ui.view.table.CCActionTable)3 List (java.util.List)3 SMDescriptionData (com.sun.identity.console.service.model.SMDescriptionData)1 ArrayList (java.util.ArrayList)1