コード例 #1
0
 public SelectOptionGroup getGroupWikiOptions() throws Exception {
   SelectOptionGroup groupSpaceOptions = new SelectOptionGroup(getLabel("GroupWikis"));
   Collection<Wiki> groupWikis = Utils.getWikisByType(WikiType.GROUP);
   for (Wiki wiki : groupWikis) {
     groupSpaceOptions.addOption(
         new SelectOption(
             wiki.getOwner(),
             PortalConfig.GROUP_TYPE
                 + "/"
                 + Utils.validateWikiOwner(wiki.getType(), wiki.getOwner())));
   }
   return groupSpaceOptions;
 }
コード例 #2
0
 /**
  * convert wiki page info to path string. <br>
  * The format: [wiki type]/[wiki owner]/[page id]
  *
  * @param params
  * @return
  */
 public static String getPath(WikiPageParams params) {
   StringBuilder sb = new StringBuilder();
   if (params.getType() != null) {
     sb.append(params.getType());
   }
   if (params.getOwner() != null) {
     sb.append("/").append(Utils.validateWikiOwner(params.getType(), params.getOwner()));
   }
   if (params.getPageName() != null) {
     sb.append("/").append(params.getPageName());
   }
   return sb.toString();
 }
コード例 #3
0
 private String getDefaultSelectWikiValue() throws Exception {
   WikiPageParams currentParams = org.exoplatform.wiki.commons.Utils.getCurrentWikiPageParams();
   String wikiType = currentParams.getType();
   String owner = currentParams.getOwner();
   return wikiType + "/" + Utils.validateWikiOwner(wikiType, owner);
 }