protected Map<String, SubType> filterSubTypesFromConfiguration( Map<String, SubType> allowedSubTypes, DocumentModel currentDoc) { UITypesConfiguration uiTypesConfiguration = getConfiguration(currentDoc); if (uiTypesConfiguration != null) { allowedSubTypes = uiTypesConfiguration.filterSubTypes(allowedSubTypes); } return allowedSubTypes; }
protected List<String> getAllowedTypes(DocumentModel doc) { UITypesConfiguration uiTypesConfiguration = doc.getAdapter(UITypesConfiguration.class); if (uiTypesConfiguration == null) { return Collections.emptyList(); } List<String> allowedTypes = new ArrayList<String>(uiTypesConfiguration.getAllowedTypes()); if (allowedTypes.isEmpty()) { allowedTypes = computeAllowedTypes(doc); } return allowedTypes; }