Search in sources :

Example 1 with RealmResourceOfferingViewBean

use of com.sun.identity.console.realm.RealmResourceOfferingViewBean in project OpenAM by OpenRock.

the class SMDiscoveryServiceViewBean method handleRealmOperationRequest.

private void handleRealmOperationRequest(String realm, RequestContext rc) {
    HttpServletRequest req = rc.getRequest();
    String op = req.getParameter("Op");
    if (op.equals(AMAdminConstants.OPERATION_EDIT)) {
        setPageSessionAttribute(PG_SESSION_PAGE_TRAIL_ID, req.getParameter(PG_SESSION_PAGE_TRAIL_ID));
        setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, realm);
        unlockPageTrail();
        RealmResourceOfferingViewBean vb = (RealmResourceOfferingViewBean) getViewBean(RealmResourceOfferingViewBean.class);
        passPgSessionMap(vb);
        vb.forwardTo(rc);
    } else {
        setPageSessionAttribute(PG_SESSION_PAGE_TRAIL_ID, req.getParameter(PG_SESSION_PAGE_TRAIL_ID));
        setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, realm);
        RealmResourceOfferingModel realmModel = new RealmResourceOfferingModelImpl(req, getPageSessionAttributes());
        try {
            realmModel.assignService(realm);
        } catch (AMConsoleException e) {
            debug.error("SMDiscoveryServiceViewBean.handleRealmOperationRequest", e);
        }
        backTrail();
        AMPostViewBean vb = (AMPostViewBean) getViewBean(AMPostViewBean.class);
        passPgSessionMap(vb);
        vb.setTargetViewBeanURL("../realm/Services");
        vb.forwardTo(rc);
    }
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) RealmResourceOfferingViewBean(com.sun.identity.console.realm.RealmResourceOfferingViewBean) RealmResourceOfferingModel(com.sun.identity.console.realm.model.RealmResourceOfferingModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) RealmResourceOfferingModelImpl(com.sun.identity.console.realm.model.RealmResourceOfferingModelImpl) AMPostViewBean(com.sun.identity.console.base.AMPostViewBean)

Aggregations

AMPostViewBean (com.sun.identity.console.base.AMPostViewBean)1 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)1 RealmResourceOfferingViewBean (com.sun.identity.console.realm.RealmResourceOfferingViewBean)1 RealmResourceOfferingModel (com.sun.identity.console.realm.model.RealmResourceOfferingModel)1 RealmResourceOfferingModelImpl (com.sun.identity.console.realm.model.RealmResourceOfferingModelImpl)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1