Search in sources :

Example 6 with EntityResourceOfferingModel

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

the class EntityResourceOfferingViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    EntityResourceOfferingModel model = (EntityResourceOfferingModel) getModel();
    ptModel.setPageTitleText("title.idm.resource.offering");
    String univId = (String) getPageSessionAttribute(EntityEditViewBean.UNIVERSAL_ID);
    try {
        populateTableModel(model.getEntityDiscoEntry(univId));
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : EntityResourceOfferingModel(com.sun.identity.console.idm.model.EntityResourceOfferingModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Example 7 with EntityResourceOfferingModel

use of com.sun.identity.console.idm.model.EntityResourceOfferingModel 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

EntityResourceOfferingModel (com.sun.identity.console.idm.model.EntityResourceOfferingModel)7 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)5 DiscoveryDataCache (com.sun.identity.console.service.model.DiscoveryDataCache)4 SMDiscoveryServiceData (com.sun.identity.console.service.model.SMDiscoveryServiceData)3 AMPostViewBean (com.sun.identity.console.base.AMPostViewBean)1 EntityResourceOfferingViewBean (com.sun.identity.console.idm.EntityResourceOfferingViewBean)1 EntityResourceOfferingModelImpl (com.sun.identity.console.idm.model.EntityResourceOfferingModelImpl)1 SMDiscoEntryData (com.sun.identity.console.service.model.SMDiscoEntryData)1 CCActionTable (com.sun.web.ui.view.table.CCActionTable)1 Iterator (java.util.Iterator)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1