Search in sources :

Example 1 with EntityResourceOfferingViewBean

use of com.sun.identity.console.idm.EntityResourceOfferingViewBean in project OpenAM by OpenRock.

the class SMDiscoveryServiceViewBean method handleEntityOperationRequest.

private void handleEntityOperationRequest(String realm, String univId, 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(EntityEditViewBean.UNIVERSAL_ID, univId);
        setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, realm);
        unlockPageTrail();
        EntityResourceOfferingViewBean vb = (EntityResourceOfferingViewBean) getViewBean(EntityResourceOfferingViewBean.class);
        passPgSessionMap(vb);
        vb.forwardTo(rc);
    } else {
        setPageSessionAttribute(PG_SESSION_PAGE_TRAIL_ID, req.getParameter(PG_SESSION_PAGE_TRAIL_ID));
        setPageSessionAttribute(EntityEditViewBean.UNIVERSAL_ID, univId);
        setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, realm);
        setPageSessionAttribute(EntityEditViewBean.ENTITY_TYPE, rc.getRequest().getParameter("type"));
        EntityResourceOfferingModel entityModel = new EntityResourceOfferingModelImpl(req, getPageSessionAttributes());
        try {
            entityModel.assignService(univId);
        } catch (AMConsoleException e) {
            debug.error("SMDiscoveryServiceViewBean.handleEntityOperationRequest", e);
        }
        backTrail();
        AMPostViewBean vb = (AMPostViewBean) getViewBean(AMPostViewBean.class);
        passPgSessionMap(vb);
        vb.setTargetViewBeanURL("../idm/EntityServices");
        vb.forwardTo(rc);
    }
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) EntityResourceOfferingViewBean(com.sun.identity.console.idm.EntityResourceOfferingViewBean) EntityResourceOfferingModel(com.sun.identity.console.idm.model.EntityResourceOfferingModel) EntityResourceOfferingModelImpl(com.sun.identity.console.idm.model.EntityResourceOfferingModelImpl) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) 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 EntityResourceOfferingViewBean (com.sun.identity.console.idm.EntityResourceOfferingViewBean)1 EntityResourceOfferingModel (com.sun.identity.console.idm.model.EntityResourceOfferingModel)1 EntityResourceOfferingModelImpl (com.sun.identity.console.idm.model.EntityResourceOfferingModelImpl)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1