Search in sources :

Example 36 with SMDiscoEntryData

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

the class RealmDiscoveryDescriptionEditViewBean method getCurrentData.

protected SMDescriptionData getCurrentData() {
    int currentIdx = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
    SMDiscoEntryData data = (SMDiscoEntryData) getPageSessionAttribute(PG_SESSION_DISCO_ENTRY_DATA);
    return (SMDescriptionData) data.descData.get(currentIdx);
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData) SMDescriptionData(com.sun.identity.console.service.model.SMDescriptionData)

Example 37 with SMDiscoEntryData

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

the class UMUserResourceOfferingViewBeanBase method getValues.

protected SMDiscoEntryData getValues(boolean validated) throws AMConsoleException {
    SMDiscoEntryData smDisco = super.getValues(validated);
    smDisco.resourceIdAttribute = ((String) propertySheetModel.getValue(ATTR_RESOURCE_ID));
    smDisco.resourceIdValue = ((String) propertySheetModel.getValue(ATTR_RESOURCE_ID_VALUE));
    if (validated) {
        if (smDisco.resourceIdValue.length() == 0) {
            throw new AMConsoleException("discovery.service.bootstrapResOff.missing.resourceIdValue.message");
        }
    }
    return smDisco;
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Example 38 with SMDiscoEntryData

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

the class UMUserResourceOfferingViewBeanBase method handleTblSecurityMechIDButtonAddRequest.

public void handleTblSecurityMechIDButtonAddRequest(RequestInvocationEvent event) throws ModelControlException {
    try {
        SMDiscoEntryData smData = getValues(false);
        setPageSessionAttribute(UMUserDiscoveryDescriptionViewBeanBase.PG_SESSION_DISCO_ENTRY_DATA, smData);
        setPageSessionAttribute(UMUserDiscoveryDescriptionViewBeanBase.PG_SESSION_RETURN_VIEW_BEAN_CLASSNAME, getClass().getName());
        UMUserDiscoveryDescriptionAddViewBean vb = (UMUserDiscoveryDescriptionAddViewBean) getViewBean(UMUserDiscoveryDescriptionAddViewBean.class);
        passPgSessionMap(vb);
        vb.forwardTo(getRequestContext());
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        forwardTo();
    }
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Example 39 with SMDiscoEntryData

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

the class UMUserDiscoveryDescriptionAddViewBean method handleButton1Request.

protected void handleButton1Request(SMDescriptionData smData) {
    UMUserResourceOfferingViewBeanBase vb = (UMUserResourceOfferingViewBeanBase) getReturnToViewBean();
    SMDiscoEntryData data = (SMDiscoEntryData) removePageSessionAttribute(PG_SESSION_DISCO_ENTRY_DATA);
    data.descData.add(smData);
    setPageSessionAttribute(UMUserResourceOfferingViewBeanBase.PROPERTY_ATTRIBUTE, data);
    setPageSessionAttribute(UMUserResourceOfferingViewBeanBase.PG_SESSION_MODIFIED, "1");
    passPgSessionMap(vb);
    vb.forwardTo(getRequestContext());
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData)

Example 40 with SMDiscoEntryData

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

the class UMUserResourceOfferingEditViewBean method getCurrentServiceData.

protected SMDiscoEntryData getCurrentServiceData() {
    int currentIdx = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
    DiscoveryDataCache cache = DiscoveryDataCache.getInstance();
    String cacheID = (String) getPageSessionAttribute(UMUserResourceOfferingViewBean.DATA_ID);
    SMDiscoveryServiceData smEntry = cache.getData(getModel().getUserSSOToken(), cacheID);
    List resourceData = smEntry.getResourceData();
    SMDiscoEntryData smDisco = (SMDiscoEntryData) resourceData.get(currentIdx);
    if (getPageSessionAttribute(PGATTR_ORIG_MECH_ID) == null) {
        ArrayList list = new ArrayList();
        for (Iterator i = smDisco.descData.iterator(); i.hasNext(); ) {
            list.add(new SMDescriptionData((SMDescriptionData) i.next()));
        }
        setPageSessionAttribute(PGATTR_ORIG_MECH_ID, list);
    }
    return smDisco;
}
Also used : SMDiscoveryServiceData(com.sun.identity.console.service.model.SMDiscoveryServiceData) SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) List(java.util.List) SMDescriptionData(com.sun.identity.console.service.model.SMDescriptionData) DiscoveryDataCache(com.sun.identity.console.service.model.DiscoveryDataCache)

Aggregations

SMDiscoEntryData (com.sun.identity.console.service.model.SMDiscoEntryData)42 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)10 List (java.util.List)7 DiscoveryDataCache (com.sun.identity.console.service.model.DiscoveryDataCache)6 SMDescriptionData (com.sun.identity.console.service.model.SMDescriptionData)6 SMDiscoveryServiceData (com.sun.identity.console.service.model.SMDiscoveryServiceData)5 Iterator (java.util.Iterator)5 ArrayList (java.util.ArrayList)3 CCActionTableModel (com.sun.web.ui.model.CCActionTableModel)2 OptionList (com.iplanet.jato.view.html.OptionList)1 EntityResourceOfferingModel (com.sun.identity.console.idm.model.EntityResourceOfferingModel)1 RealmResourceOfferingModel (com.sun.identity.console.realm.model.RealmResourceOfferingModel)1 UMUserResourceOfferingModel (com.sun.identity.console.user.model.UMUserResourceOfferingModel)1 OrderedSet (com.sun.identity.shared.datastruct.OrderedSet)1 CCEditableListModel (com.sun.web.ui.model.CCEditableListModel)1 CCEditableList (com.sun.web.ui.view.editablelist.CCEditableList)1 CCSelectableList (com.sun.web.ui.view.html.CCSelectableList)1 CCActionTable (com.sun.web.ui.view.table.CCActionTable)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1