Search in sources :

Example 76 with CCActionTableModel

use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.

the class AuthPropertiesViewBean method handleDeleteConfigButtonRequest.

/**
     * Handles the delete authentication instance request.
     *
     * @param event Request Invocation Event.
     */
public void handleDeleteConfigButtonRequest(RequestInvocationEvent event) throws ModelControlException {
    CCActionTable table = (CCActionTable) getChild(AUTH_CONFIG_TABLE);
    table.restoreStateData();
    CCActionTableModel tableModel = (CCActionTableModel) propertySheetModel.getModel(AUTH_CONFIG_TABLE);
    Integer[] selected = tableModel.getSelectedRows();
    Set configurations = new HashSet(selected.length * 2);
    for (int i = 0; i < selected.length; i++) {
        tableModel.setRowIndex(selected[i].intValue());
        configurations.add((String) tableModel.getValue(CONFIG_NAME_COLUMN_DATA));
    }
    try {
        AuthConfigurationModel m = (AuthConfigurationModel) getConfigModel();
        String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
        if ((curRealm == null) || (curRealm.length() == 0)) {
            curRealm = AMModelBase.getStartDN(getRequestContext().getRequest());
        }
        m.deleteAuthConfiguration(curRealm, configurations);
        if (selected.length == 1) {
            setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "authentication.config.deleted");
        } else {
            setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "authentication.config.deleted.multiple");
        }
        removePageSessionAttribute(AUTH_CONFIG_TABLE);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    forwardTo();
}
Also used : AuthConfigurationModel(com.sun.identity.console.authentication.model.AuthConfigurationModel) HashSet(java.util.HashSet) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) CCActionTable(com.sun.web.ui.view.table.CCActionTable) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashSet(java.util.HashSet)

Example 77 with CCActionTableModel

use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.

the class FederationViewBean method createEntityTable.

/*
     * Responsible for creating the entity table.
     */
private void createEntityTable() {
    CCActionTableModel tableModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/entityTable.xml"));
    tableModel.setMaxRows(getModel().getPageSize());
    tableModel.setTitleLabel("label.items");
    tableModel.setActionValue("addEntityButton", "entity.new.button");
    tableModel.setActionValue("deleteEntityButton", "entity.delete.button");
    tableModel.setActionValue("importEntityButton", "entity.import.button");
    tableModel.setActionValue("entityNameColumn", "entity.name.column.label");
    tableModel.setActionValue("roleColumn", "entity.role.column.label");
    tableModel.setActionValue("protocolColumn", "entity.protocol.column.label");
    tableModel.setActionValue("locationColumn", "entity.location.column.label");
    tableModel.setActionValue("realmColumn", "entity.realm.column.label");
    propertySheetModel.setModel(ENTITY_TABLE, tableModel);
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel)

Example 78 with CCActionTableModel

use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.

the class IDFFIDPViewBean method createAuthContextsModel.

private void createAuthContextsModel() {
    tblAuthContextsModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblIDFFIDPAuthenticationContext.xml"));
    tblAuthContextsModel.setTitleLabel("label.items");
    tblAuthContextsModel.setActionValue(TBL_COL_CONTEXT_REFERENCE, "idff.idp.authenticationContext.table.name.contextReference.name");
    tblAuthContextsModel.setActionValue(TBL_COL_SUPPORTED, "idff.idp.authenticationContext.table.name.supported.name");
    tblAuthContextsModel.setActionValue(TBL_COL_KEY, "idff.idp.authenticationContext.table.name.key.name");
    tblAuthContextsModel.setActionValue(TBL_COL_VALUE, "idff.idp.authenticationContext.table.name.value.name");
    tblAuthContextsModel.setActionValue(TBL_COL_LEVEL, "idff.idp.authenticationContext.table.name.level.name");
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel)

Example 79 with CCActionTableModel

use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.

the class FSSAMLServiceViewBean method populateTable.

private void populateTable(String name, Set values) {
    CCActionTableModel tmodel = (CCActionTableModel) tabledAttributesModel.get(name);
    tmodel.clearAll();
    if ((values != null) && !values.isEmpty()) {
        if (name.equals(TABLE_TARGET_URLS)) {
            populateListTable(name, tmodel, values, "target");
        } else if (name.equals(TABLE_SITE_ID)) {
            populatePipeSeparatedFormatTable(name, tmodel, values, SAMLConstants.INSTANCEID, "siteIDName");
        }
    }
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel)

Example 80 with CCActionTableModel

use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.

the class DelegationViewBean method createTableModel.

private void createTableModel() {
    tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblDelegation.xml"));
    tblModel.setTitleLabel("label.items");
    tblModel.setActionValue(TBL_COL_NAME, "table.delegation.name.column.name");
}
Also used : CCActionTableModel(com.sun.web.ui.model.CCActionTableModel)

Aggregations

CCActionTableModel (com.sun.web.ui.model.CCActionTableModel)103 CCActionTable (com.sun.web.ui.view.table.CCActionTable)22 OrderedSet (com.sun.identity.shared.datastruct.OrderedSet)18 Iterator (java.util.Iterator)18 List (java.util.List)14 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)13 ArrayList (java.util.ArrayList)12 HashSet (java.util.HashSet)9 Set (java.util.Set)9 SerializedField (com.sun.identity.console.components.view.html.SerializedField)8 OptionList (com.iplanet.jato.view.html.OptionList)6 SMSubConfig (com.sun.identity.console.base.model.SMSubConfig)6 HashMap (java.util.HashMap)5 Map (java.util.Map)5 SCConfigModel (com.sun.identity.console.service.model.SCConfigModel)4 AuthPropertiesModel (com.sun.identity.console.authentication.model.AuthPropertiesModel)3 EntityModel (com.sun.identity.console.federation.model.EntityModel)2 FSAuthDomainsModel (com.sun.identity.console.federation.model.FSAuthDomainsModel)2 FSSAMLServiceModel (com.sun.identity.console.federation.model.FSSAMLServiceModel)2 SMDiscoEntryData (com.sun.identity.console.service.model.SMDiscoEntryData)2