Search in sources :

Example 1 with AgentPropertyXMLBuilder

use of com.sun.identity.console.property.AgentPropertyXMLBuilder in project OpenAM by OpenRock.

the class GenericAgentProfileViewBean method createPropertySheetModel.

protected AMPropertySheetModel createPropertySheetModel(String type) {
    String agentType = getAgentType();
    AgentsModel model = (AgentsModel) getModel();
    String tabName = (String) getPageSessionAttribute(PS_TABNAME);
    String choice = (String) getPageSessionAttribute(AgentsViewBean.LOCAL_OR_NOT);
    AgentPropertyXMLBuilder blder = null;
    try {
        if (isLocalConfig(agentType)) {
            blder = new AgentPropertyXMLBuilder(agentType, isGroup, true, tabName, model);
        } else {
            blder = new AgentPropertyXMLBuilder(agentType, isGroup, is2dot2Agent() || isAgentAuthenticator(), tabName, model);
        }
        attributeSchemas = blder.getAttributeSchemas();
        return new AMPropertySheetModel(blder.getXML(inheritedPropertyNames, choice));
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    } catch (SMSException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    } catch (SSOException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    return null;
}
Also used : SMSException(com.sun.identity.sm.SMSException) AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) SSOException(com.iplanet.sso.SSOException) AgentsModel(com.sun.identity.console.agentconfig.model.AgentsModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) AgentPropertyXMLBuilder(com.sun.identity.console.property.AgentPropertyXMLBuilder)

Aggregations

SSOException (com.iplanet.sso.SSOException)1 AgentsModel (com.sun.identity.console.agentconfig.model.AgentsModel)1 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)1 AMPropertySheetModel (com.sun.identity.console.base.model.AMPropertySheetModel)1 AgentPropertyXMLBuilder (com.sun.identity.console.property.AgentPropertyXMLBuilder)1 SMSException (com.sun.identity.sm.SMSException)1