new GroupAvailability(functionality, expression);
new ExpressionGroupAvailability(functionality, expression);
    protected void importFunctionalities(Module module, List children, boolean principalPreserved, boolean considerUUID) {        for (Object element : children) {            Element functionalityElement = (Element) element;            Functionality functionality = null;            UUID uuid = null;                        if (considerUUID) {                uuid = UUID.fromString(functionalityElement.getAttributeValue("uuid"));                functionality  = Functionality.getFunctionality(uuid);            }            if (functionality == null) {                String path = functionalityElement.getAttributeValue("path");                String prefix = functionalityElement.getAttributeValue("prefix");                String parameters = functionalityElement.getAttributeValue("parameters");                                MultiLanguageString name = importMultiLanguageString(functionalityElement.getChild("name"));                MultiLanguageString title = importMultiLanguageString(functionalityElement.getChild("title"));                MultiLanguageString description = importMultiLanguageString(functionalityElement.getChild("description"));                                Boolean relative  = new Boolean(functionalityElement.getAttributeValue("relative"));                Boolean principal = new Boolean(functionalityElement.getAttributeValue("principal"));                Boolean visible   = new Boolean(functionalityElement.getAttributeValue("visible"));                    Integer order = null;                String orderValue = functionalityElement.getAttributeValue("order");                if (orderValue != null) {                    order = new Integer(orderValue);                }                                String type = functionalityElement.getAttributeValue("type");                if (type.equals(Module.class.getName())) {                    Module createdModule;                                        functionality = createdModule = considerUUID ? new Module(uuid, name, prefix) : new Module(name, prefix);                                        Boolean maximized = new Boolean(functionalityElement.getAttributeValue("maximized"));                    createdModule.setMaximized(maximized);                }                else {                    functionality = considerUUID ? new ConcreteFunctionality(uuid, name) : new ConcreteFunctionality(name);                }                    String expression = null;                Element availabilityElement = functionalityElement.getChild("availability");                if (availabilityElement != null) {                    expression = availabilityElement.getTextNormalize();                }                                functionality.setPathAndPrincipal(path, principalPreserved ? principal : false);                functionality.setParameters(parameters);                functionality.setName(name);                functionality.setTitle(title);                functionality.setDescription(description);                functionality.setRelative(relative);                functionality.setVisible(visible);                                if (expression != null) {                    new GroupAvailability(functionality, expression);                }                                functionality.setModule(module);                                if (order != null) {                    functionality.setOrderInModule(order);                }                                logNewFunctionality(functionality);            }                        Element childrenElement = functionalityElement.getChild("children");            if (childrenElement != null && functionality instanceof Module) {                importFunctionalities((Module) functionality, childrenElement.getChildren("functionality"), principalPreserved, considerUUID);            }        }                Module.pack(module);    }