use of com.sun.identity.console.service.model.PolicyResourceComparator in project OpenAM by OpenRock.
the class SCPolicyResourceComparatorViewBeanBase method handleButton1Request.
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
try {
PolicyResourceComparator rc = getValues();
handleButton1Request(rc);
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
forwardTo();
}
}
use of com.sun.identity.console.service.model.PolicyResourceComparator in project OpenAM by OpenRock.
the class SCPolicyResourceComparatorViewBeanBase method getValues.
private PolicyResourceComparator getValues() throws AMConsoleException {
String serviceType = (String) propertySheetModel.getValue(ATTR_SERVICE_TYPE);
String clazz = (String) propertySheetModel.getValue(ATTR_CLASS);
String delimiter = (String) propertySheetModel.getValue(ATTR_DELIMITER);
String wildcard = (String) propertySheetModel.getValue(ATTR_WILDCARD);
String oneLevelWildcard = (String) propertySheetModel.getValue(ATTR_ONE_LEVEL_WILDCARD);
String caseSensitive = (String) propertySheetModel.getValue(ATTR_CASE_SENSITIVE);
if (serviceType.trim().length() == 0) {
throw new AMConsoleException("policy.service.resource.comparator.missing.service.type.message");
}
PolicyResourceComparator c = new PolicyResourceComparator();
c.setServiceType(serviceType);
c.setClazz(clazz);
c.setDelimiter(delimiter);
c.setWildcard(wildcard);
c.setOneLevelWildcard(oneLevelWildcard);
c.setCaseSensitive(caseSensitive);
return c;
}
use of com.sun.identity.console.service.model.PolicyResourceComparator in project OpenAM by OpenRock.
the class SCPolicyViewBean method populateResourceComparatorTable.
private void populateResourceComparatorTable(Set resourceComp) {
tablePopulated = true;
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(TBL_RESOURCE);
tblModel.clearAll();
boolean firstEntry = true;
int counter = 0;
for (Iterator iter = resourceComp.iterator(); iter.hasNext(); ) {
String c = (String) iter.next();
PolicyResourceComparator comp = new PolicyResourceComparator(c);
if (!firstEntry) {
tblModel.appendRow();
} else {
firstEntry = false;
}
tblModel.setValue(TBL_RESOURCE_COMPARATOR_DATA_NAME, comp.getServiceType());
tblModel.setValue(TBL_RESOURCE_COMPARATOR_HREF_ACTION, Integer.toString(counter));
tblModel.setValue(TBL_RESOURCE_COMPARATOR_LABEL_ACTION, "policy.service.table.resource.comparator.action.edit.label");
counter++;
}
setPageSessionAttribute(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR, (OrderedSet) resourceComp);
}
use of com.sun.identity.console.service.model.PolicyResourceComparator in project OpenAM by OpenRock.
the class SCPolicyResourceComparatorViewBeanBase method setValues.
protected void setValues(String value) {
PolicyResourceComparator rc = new PolicyResourceComparator(value);
propertySheetModel.setValue(ATTR_SERVICE_TYPE, rc.getServiceType());
propertySheetModel.setValue(ATTR_CLASS, rc.getClazz());
propertySheetModel.setValue(ATTR_WILDCARD, rc.getWildcard());
propertySheetModel.setValue(ATTR_DELIMITER, rc.getDelimiter());
propertySheetModel.setValue(ATTR_ONE_LEVEL_WILDCARD, rc.getOneLevelWildcard());
propertySheetModel.setValue(ATTR_CASE_SENSITIVE, rc.getCaseSensitive());
}
Aggregations