/**
  * Returns the title.
  *
  * @param filename the file name
  * @return the title
  */
 public static String fetchTitle(String filename) {
   String title = filename.trim();
   if (title.length() == 0) {
     title = IdUtils.generateStringId();
   }
   return title;
 }
 @Override
 public String generatePathSegment(DocumentModel doc) throws ClientException {
   return IdUtils.generateId(doc.getTitle(), "-", true, 24);
 }