コード例 #1
0
 /** @deprecated this information is now held by content views */
 @Deprecated
 public String getLayoutForDocument(DocumentModel doc) {
   if (doc != null) {
     String id = doc.getId();
     if (docTolistings.containsKey(id)) {
       return docTolistings.get(id);
     }
     List<String> availableLayouts = getAvailableLayoutsForDocument(doc);
     if (availableLayouts != null && !availableLayouts.isEmpty()) {
       return availableLayouts.get(0);
     }
   }
   return DEFAULT_LISTING_LAYOUT;
 }
コード例 #2
0
 /** @deprecated this information is now held by content views */
 @Deprecated
 public void setLayoutForDocument(DocumentModel doc, String layoutName) {
   if (doc == null) {
     log.error("Cannot set listing layout for null document");
     return;
   }
   String id = doc.getId();
   docTolistings.put(id, layoutName);
 }