private String expression;
private GroupDefinitionManagerLocal groupDefinitionManager = LookupUtil.getGroupDefinitionManager();
public EditGroupDefinitionGeneralPropertiesUIBean() {
GroupDefinition groupDefinition = null;
try {
groupDefinition = GroupDefinitionUIBean.lookupGroupDefinition();
} catch (GroupDefinitionException gde) {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR, "Problem looking up group definition: "
+ gde.getMessage());
return;
}
HttpSession session = FacesContextUtility.getRequest().getSession();
String marker = (String) session.getAttribute(TEMPORARY_EDIT_MARKER);
String previousExpression = (String) session.getAttribute(TEMPORARY_EXPRESSION_ATTRIBUTE);
String previousName = (String) session.getAttribute(TEMPORARY_NAME_ATTRIBUTE);
String previousDescription = (String) session.getAttribute(TEMPORARY_DESCRIPTION_ATTRIBUTE);
String previousRecursive = (String) session.getAttribute(TEMPORARY_RECURSIVE_ATTRIBUTE);
String previousInterval = (String) session.getAttribute(TEMPORARY_RECALCULATION_INTERVAL);
if (marker == null) {
this.expression = groupDefinition.getExpression();
this.name = groupDefinition.getName();
this.description = groupDefinition.getDescription();
this.recursive = groupDefinition.isRecursive();
this.recalculationInterval = (int) (groupDefinition.getRecalculationInterval() / 60000L);
} else {
this.expression = previousExpression;
this.name = previousName;
this.description = previousDescription;
this.recursive = previousRecursive.equals("TRUE");