Search in sources :

Example 1 with DelegationConfig

use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.

the class SubConfigModelImpl method getEditConfigPropertyXML.

/** 
     * Returns property sheet XML for editing sub configuration.
     *
     * @param viewbeanClassName Class name of view bean.
     * @return property sheet XML for editing sub configuration.
     */
public String getEditConfigPropertyXML(String viewbeanClassName) throws AMConsoleException {
    DelegationConfig dConfig = DelegationConfig.getInstance();
    boolean canModify = dConfig.hasPermission("/", null, AMAdminConstants.PERMISSION_MODIFY, getUserSSOToken(), viewbeanClassName);
    try {
        xmlBuilder = new SubConfigPropertyXMLBuilder(serviceName, subConfigMeta.getServiceSchema(), this);
        xmlBuilder.setSupportSubConfig(subConfigMeta.hasGlobalSubSchema());
        xmlBuilder.setViewBeanName("SubConfigEdit");
        if (!canModify) {
            xmlBuilder.setAllAttributeReadOnly(true);
        }
        return xmlBuilder.getXML();
    } catch (SMSException e) {
        throw new AMConsoleException(getErrorString(e));
    } catch (SSOException e) {
        throw new AMConsoleException(getErrorString(e));
    }
}
Also used : SMSException(com.sun.identity.sm.SMSException) SubConfigPropertyXMLBuilder(com.sun.identity.console.property.SubConfigPropertyXMLBuilder) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig) SSOException(com.iplanet.sso.SSOException) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Example 2 with DelegationConfig

use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.

the class SCSAML2SOAPBindingRequestHandlerListEditViewBean method createPropertyModel.

protected void createPropertyModel() {
    DelegationConfig dConfig = DelegationConfig.getInstance();
    boolean canModify = dConfig.hasPermission("/", null, AMAdminConstants.PERMISSION_MODIFY, getRequestContext().getRequest(), getClass().getName());
    String xmlFile = (canModify) ? "com/sun/identity/console/propertySCSAML2SOAPBindingRequestHandlerList.xml" : "com/sun/identity/console/propertySCSAML2SOAPBindingRequestHandlerList_Readonly.xml";
    propertySheetModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream(xmlFile));
    propertySheetModel.clear();
}
Also used : AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Example 3 with DelegationConfig

use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.

the class SCSOAPBindingRequestHandlerListEditViewBean method createPropertyModel.

protected void createPropertyModel() {
    DelegationConfig dConfig = DelegationConfig.getInstance();
    boolean canModify = dConfig.hasPermission("/", null, AMAdminConstants.PERMISSION_MODIFY, getRequestContext().getRequest(), getClass().getName());
    String xmlFile = (canModify) ? "com/sun/identity/console/propertySCSOAPBindingRequestHandlerList.xml" : "com/sun/identity/console/propertySCSOAPBindingRequestHandlerList_Readonly.xml";
    propertySheetModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream(xmlFile));
    propertySheetModel.clear();
}
Also used : AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Example 4 with DelegationConfig

use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.

the class EntityResourceOfferingEditViewBean method createPropertyModel.

protected void createPropertyModel() {
    DelegationConfig dConfig = DelegationConfig.getInstance();
    canModify = dConfig.hasPermission("/", null, AMAdminConstants.PERMISSION_MODIFY, getRequestContext().getRequest(), getClass().getName());
    String xmlFile = (canModify) ? "com/sun/identity/console/propertyEntityResOffering.xml" : "com/sun/identity/console/propertyEntityResOffering_Readonly.xml";
    InputStream is = getClass().getClassLoader().getResourceAsStream(xmlFile);
    String xml = AMAdminUtils.getStringFromInputStream(is);
    propertySheetModel = new AMPropertySheetModel(processPropertiesXML(xml));
    propertySheetModel.clear();
    createSecurityMechIDTable();
}
Also used : InputStream(java.io.InputStream) AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Example 5 with DelegationConfig

use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.

the class UMUserResourceOfferingEditViewBean method createPropertyModel.

protected void createPropertyModel() {
    DelegationConfig dConfig = DelegationConfig.getInstance();
    canModify = dConfig.hasPermission("/", null, AMAdminConstants.PERMISSION_MODIFY, getRequestContext().getRequest(), getClass().getName());
    String xmlFile = (canModify) ? "com/sun/identity/console/propertyUserResOffering.xml" : "com/sun/identity/console/propertyUserResOffering_Readonly.xml";
    InputStream is = getClass().getClassLoader().getResourceAsStream(xmlFile);
    String xml = AMAdminUtils.getStringFromInputStream(is);
    propertySheetModel = new AMPropertySheetModel(processPropertiesXML(xml));
    propertySheetModel.clear();
    createSecurityMechIDTable();
}
Also used : InputStream(java.io.InputStream) AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Aggregations

DelegationConfig (com.sun.identity.console.delegation.model.DelegationConfig)43 AMPropertySheetModel (com.sun.identity.console.base.model.AMPropertySheetModel)32 SSOException (com.iplanet.sso.SSOException)8 SMSException (com.sun.identity.sm.SMSException)8 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)7 PropertyXMLBuilder (com.sun.identity.console.property.PropertyXMLBuilder)4 CCAddRemoveModel (com.sun.web.ui.model.CCAddRemoveModel)4 InputStream (java.io.InputStream)4 ServiceSchema (com.sun.identity.sm.ServiceSchema)3 Set (java.util.Set)3 HashSet (java.util.HashSet)2 HttpServletRequest (javax.servlet.http.HttpServletRequest)2 SAMLPropertyXMLBuilder (com.sun.identity.console.federation.SAMLPropertyXMLBuilder)1 EndUserViewBean (com.sun.identity.console.idm.EndUserViewBean)1 SubConfigPropertyXMLBuilder (com.sun.identity.console.property.SubConfigPropertyXMLBuilder)1 IdRepoException (com.sun.identity.idm.IdRepoException)1 ServiceSchemaManager (com.sun.identity.sm.ServiceSchemaManager)1 List (java.util.List)1