예제 #1
0
 public DocumentModelList getPageWidgets(String docType) {
   DocumentModelList list = new DocumentModelListImpl();
   Directories dirEnum = Directories.fromString("labs_" + docType + "_widgets");
   Map<String, Serializable> filter = new HashMap<String, Serializable>();
   filter.put("obsolete", "0");
   list.addAll(DirectoriesUtils.getDirDocumentModelList(dirEnum, filter));
   return list;
 }
예제 #2
0
 public static List<FontSize> getFontSizes() {
   List<FontSize> list = new ArrayList<FontSize>();
   Directories dir = Directories.FONT_SIZES;
   for (DocumentModel entry : getThemeService().getDirFontSizes()) {
     try {
       list.add(
           new FontSize(
               (String) entry.getPropertyValue(dir.idField()),
               (String) entry.getPropertyValue(dir.labelField())));
     } catch (PropertyException e) {
       LOG.error(e, e);
     } catch (ClientException e) {
       LOG.error(e, e);
     }
   }
   return list;
 }
예제 #3
0
 public List<String> getPageWidgetGroups(String docType) {
   List<String> list = new ArrayList<String>();
   String docTypeTmp = docType;
   if ("sidebar".equals(docTypeTmp)) {
     docTypeTmp = Docs.HTMLPAGE.type();
   }
   Directories dirEnum = Directories.fromString("labs_" + docTypeTmp + "_widgetGroups");
   list.addAll(DirectoriesUtils.getDirMap(dirEnum).values());
   return list;
 }
예제 #4
0
 public List<String> getPageContentViews(String docType) {
   List<String> list = new ArrayList<String>();
   Directories dirEnum = Directories.fromString("labs_" + docType + "_contentviews");
   if (dirEnum == null) {
     list.add(LabsCustomView.PAGE_DEFAULT_VIEW);
   } else {
     Map<String, Serializable> filter = new HashMap<String, Serializable>();
     filter.put("obsolete", "0");
     list.addAll(DirectoriesUtils.getDirMap(dirEnum, filter).values());
   }
   return list;
 }