Search in sources :

Example 6 with DelegationModel

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

the class DelegationPropertiesViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    DelegationModel model = (DelegationModel) getModel();
    if (model != null) {
        if (!submitCycle && hasPrivileges) {
            AMPropertySheet ps = (AMPropertySheet) getChild(DELEGATION_PROPERTIES);
            psModel.clear();
            ps.setAttributeValues(getPrivileges(model), model);
        }
        setPageTitle(model);
    }
    if (!hasPrivileges) {
        disableButton("button1", true);
        disableButton("button2", true);
    }
}
Also used : DelegationModel(com.sun.identity.console.delegation.model.DelegationModel) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet)

Example 7 with DelegationModel

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

the class DelegationViewBean method getSubjects.

private void getSubjects() {
    DelegationModel model = (DelegationModel) getModel();
    String filter = ((String) getDisplayFieldValue(TF_FILTER));
    if ((filter == null) || (filter.length() == 0)) {
        filter = "*";
        setDisplayFieldValue(TF_FILTER, "*");
    } else {
        filter = filter.trim();
    }
    try {
        String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
        populateTableModel(model.getSubjects(curRealm, filter));
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : DelegationModel(com.sun.identity.console.delegation.model.DelegationModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Aggregations

DelegationModel (com.sun.identity.console.delegation.model.DelegationModel)7 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)2 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)2 AMIdentity (com.sun.identity.idm.AMIdentity)2 IdRepoException (com.sun.identity.idm.IdRepoException)2 SSOToken (com.iplanet.sso.SSOToken)1 SerializedField (com.sun.identity.console.components.view.html.SerializedField)1 PrivilegeXMLBuilder (com.sun.identity.console.property.PrivilegeXMLBuilder)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Map (java.util.Map)1 Set (java.util.Set)1