Ejemplo n.º 1
0
 protected Map<String, SubType> filterSubTypesFromConfiguration(
     Map<String, SubType> allowedSubTypes, DocumentModel currentDoc) {
   UITypesConfiguration uiTypesConfiguration = getConfiguration(currentDoc);
   if (uiTypesConfiguration != null) {
     allowedSubTypes = uiTypesConfiguration.filterSubTypes(allowedSubTypes);
   }
   return allowedSubTypes;
 }
Ejemplo n.º 2
0
 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;
 }