Search in sources :

Example 81 with AMPropertySheetModel

use of com.sun.identity.console.base.model.AMPropertySheetModel in project OpenAM by OpenRock.

the class SCPolicyResourceComparatorEditViewBean 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/propertySCPolicyResourceComparator.xml" : "com/sun/identity/console/propertySCPolicyResourceComparator_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 82 with AMPropertySheetModel

use of com.sun.identity.console.base.model.AMPropertySheetModel in project OpenAM by OpenRock.

the class ServerEditViewBeanBase method createPropertyModel.

private void createPropertyModel(String serverName) {
    String xml = AMAdminUtils.getStringFromInputStream(getClass().getClassLoader().getResourceAsStream(getPropertyXML()));
    Set uiNames = getAllConfigUINames(xml);
    ServerSiteModel model = (ServerSiteModel) getModel();
    try {
        Map attrValues = model.getServerConfiguration(serverName);
        Map defaultValues = model.getServerDefaults();
        Map textValues = new HashMap();
        for (Iterator i = uiNames.iterator(); i.hasNext(); ) {
            String uiName = (String) i.next();
            String propertyName = getActualPropertyName(uiName);
            if (!attrValues.containsKey(propertyName)) {
                textValues.put(uiName, defaultValues.get(propertyName));
            } else {
                activePropertyNames.add(uiName);
                i.remove();
            }
            allPropertyNames.add(uiName);
        }
        if (!textValues.isEmpty()) {
            xml = textifyXML(xml, uiNames, textValues);
        }
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    // this is because default server configuration does not have
    // parent site.
    xml = removeParentSiteBlob(xml);
    propertySheetModel = new AMPropertySheetModel(xml);
    propertySheetModel.clear();
}
Also used : HashSet(java.util.HashSet) Set(java.util.Set) HashMap(java.util.HashMap) AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) Iterator(java.util.Iterator) ServerSiteModel(com.sun.identity.console.service.model.ServerSiteModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map)

Example 83 with AMPropertySheetModel

use of com.sun.identity.console.base.model.AMPropertySheetModel in project OpenAM by OpenRock.

the class ConfigureGoogleAppsCompleteViewBean method createPropertyModel.

private void createPropertyModel() {
    psModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/propertyConfigureGoogleAppsComplete.xml"));
    psModel.setValue("buttonDownloadCert", "configure.google.apps.complete.certificate.download");
    psModel.clear();
}
Also used : AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel)

Example 84 with AMPropertySheetModel

use of com.sun.identity.console.base.model.AMPropertySheetModel in project OpenAM by OpenRock.

the class ConfigureOAuth2ViewBean method createPropertyModel.

private void createPropertyModel() {
    propertySheetModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/propertyConfigureOAuth2.xml"));
    propertySheetModel.clear();
}
Also used : AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel)

Example 85 with AMPropertySheetModel

use of com.sun.identity.console.base.model.AMPropertySheetModel in project OpenAM by OpenRock.

the class ConfigureSalesForceAppsCompleteViewBean method createPropertyModel.

private void createPropertyModel() {
    psModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/propertyConfigureSalesForceAppsComplete.xml"));
    psModel.setValue("buttonDownloadCert", "configure.salesforce.apps.complete.certificate.download");
    psModel.clear();
}
Also used : AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel)

Aggregations

AMPropertySheetModel (com.sun.identity.console.base.model.AMPropertySheetModel)146 DelegationConfig (com.sun.identity.console.delegation.model.DelegationConfig)32 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)16 CCAddRemoveModel (com.sun.web.ui.model.CCAddRemoveModel)9 InputStream (java.io.InputStream)8 HashSet (java.util.HashSet)7 Set (java.util.Set)7 Iterator (java.util.Iterator)5 HashMap (java.util.HashMap)4 Map (java.util.Map)4 HttpServletRequest (javax.servlet.http.HttpServletRequest)4 CCEditableListModel (com.sun.web.ui.model.CCEditableListModel)3 List (java.util.List)3 ViewBean (com.iplanet.jato.view.ViewBean)2 AgentsModel (com.sun.identity.console.agentconfig.model.AgentsModel)2 AbstractAuditModel (com.sun.identity.console.audit.model.AbstractAuditModel)2 EntitiesModel (com.sun.identity.console.idm.model.EntitiesModel)2 RMRealmModel (com.sun.identity.console.realm.model.RMRealmModel)2 SubConfigModel (com.sun.identity.console.service.model.SubConfigModel)2 CCOrderedListModel (com.sun.identity.console.ui.model.CCOrderedListModel)2