File Source: URLModel.java

         /* 
    P/P   *  Method: org.apache.roller.weblogger.ui.rendering.model.URLModel$FeedURLS__static_init
          */
     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one or more
     3   *  contributor license agreements.  The ASF licenses this file to You
     4   * under the Apache License, Version 2.0 (the "License"); you may not
     5   * use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.  For additional information regarding
    15   * copyright in this work, please see the NOTICE file in the top level
    16   * directory of this distribution.
    17   */
    18  
    19  package org.apache.roller.weblogger.ui.rendering.model;
    20  
    21  import java.util.Arrays;
    22  import java.util.List;
    23  import java.util.Map;
    24  import org.apache.commons.logging.Log;
    25  import org.apache.commons.logging.LogFactory;
    26  import org.apache.roller.weblogger.WebloggerException;
    27  import org.apache.roller.weblogger.business.URLStrategy;
    28  import org.apache.roller.weblogger.business.WebloggerFactory;
    29  import org.apache.roller.weblogger.business.WeblogManager;
    30  import org.apache.roller.weblogger.config.WebloggerRuntimeConfig;
    31  import org.apache.roller.weblogger.pojos.WeblogEntry;
    32  import org.apache.roller.weblogger.pojos.Weblog;
    33  import org.apache.roller.weblogger.ui.rendering.util.WeblogRequest;
    34  
    35  
    36  /**
    37   * Provides access to URL building functionality.
    38   *
    39   * NOTE: we purposely go against the standard getter/setter bean standard
    40   * for methods that take arguments so that users get a consistent way to
    41   * access those methods in their templates. i.e.
    42   *
    43   * $url.category("foo")
    44   *
    45   * instead of
    46   *
    47   * $url.getCategory("foo")
    48   */
    49  public class URLModel implements Model {
    50      
             /* 
    P/P       *  Method: org.apache.roller.weblogger.ui.rendering.model.URLModel__static_init
              * 
              *  Postconditions:
              *    init'ed(log)
              */
    51      private static Log log = LogFactory.getLog(URLModel.class);
    52      
    53      protected Weblog weblog = null;
    54      protected String locale = null;
    55      
    56      protected URLStrategy urlStrategy = null;
    57      
    58      
             /* 
    P/P       *  Method: void org.apache.roller.weblogger.ui.rendering.model.URLModel()
              * 
              *  Postconditions:
              *    this.locale == null
              *    this.urlStrategy == null
              *    this.weblog == null
              */
    59      public URLModel() {}
    60      
    61      public String getModelName() {
                 /* 
    P/P           *  Method: String getModelName()
                  * 
                  *  Postconditions:
                  *    return_value == &"url"
                  */
    62          return "url";
    63      }
    64      
    65      public void init(Map initData) throws WebloggerException {
    66          
    67          // need a weblog request so that we can know the weblog and locale
                 /* 
    P/P           *  Method: void init(Map)
                  * 
                  *  Preconditions:
                  *    initData != null
                  * 
                  *  Presumptions:
                  *    java.util.Map:get(...)@68 != null
                  *    org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@79 != null
                  * 
                  *  Postconditions:
                  *    init'ed(this.locale)
                  *    init'ed(this.urlStrategy)
                  *    init'ed(this.weblog)
                  * 
                  *  Test Vectors:
                  *    java.util.Map:get(...)@77: Inverse{null}, Addr_Set{null}
                  */
    68          WeblogRequest weblogRequest = (WeblogRequest) initData.get("parsedRequest");
    69          if(weblogRequest == null) {
    70              throw new WebloggerException("Expected 'weblogRequest' init param!");
    71          }
    72          
    73          this.weblog = weblogRequest.getWeblog();
    74          this.locale = weblogRequest.getLocale();
    75          
    76          // look for url strategy
    77          urlStrategy = (URLStrategy) initData.get("urlStrategy");
    78          if(urlStrategy == null) {
    79              urlStrategy = WebloggerFactory.getWeblogger().getUrlStrategy();
    80          }
    81      }
    82      
    83      
    84      /** Relative URL of Roller, e.g. /roller */
    85      public String getSite() {
                 /* 
    P/P           *  Method: String getSite()
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
    86          return WebloggerRuntimeConfig.getRelativeContextURL();
    87      }
    88      
    89      
    90      /** Absolute URL of Roller, e.g. http://localhost:8080/roller */
    91      public String getAbsoluteSite() {
                 /* 
    P/P           *  Method: String getAbsoluteSite()
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
    92          return WebloggerRuntimeConfig.getAbsoluteContextURL();
    93      }
    94      
    95      
    96      /** URL for logging in */  
    97      public String getLogin() {
                 /* 
    P/P           *  Method: String getLogin()
                  * 
                  *  Preconditions:
                  *    this.urlStrategy != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
    98          return urlStrategy.getLoginURL(false);
    99      }
   100      
   101      
   102      /** URL for logging out */
   103      public String getLogout() {
                 /* 
    P/P           *  Method: String getLogout()
                  * 
                  *  Preconditions:
                  *    this.urlStrategy != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   104          return urlStrategy.getLogoutURL(false);
   105      }
   106      
   107      
   108      /** URL for a specific UI action */
   109      public String action(String action, String namespace) {
                 /* 
    P/P           *  Method: String action(String, String)
                  * 
                  *  Preconditions:
                  *    (soft) this.urlStrategy != null
                  *    (soft) this.weblog != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  * 
                  *  Test Vectors:
                  *    namespace: Addr_Set{null}, Inverse{null}
                  *    java.lang.String:equals(...)@111: {0}, {1}
                  *    java.lang.String:equals(...)@113: {0}, {1}
                  *    java.lang.String:equals(...)@115: {0}, {1}
                  */
   110          if(namespace != null) {
   111              if("/roller-ui".equals(namespace)) {
   112                  return urlStrategy.getActionURL(action, namespace, null, null, true);
   113              } else if("/roller-ui/authoring".equals(namespace)) {
   114                  return urlStrategy.getActionURL(action, namespace, weblog.getHandle(), null, true);
   115              } else if("/roller-ui/admin".equals(namespace)) {
   116                  return urlStrategy.getActionURL(action, namespace, null, null, true);
   117              }
   118          }
   119          return null;
   120      }
   121      
   122      
   123      public String getCommentAuthenticator() {
                 /* 
    P/P           *  Method: String getCommentAuthenticator()
                  * 
                  *  Postconditions:
                  *    java.lang.StringBuilder:toString(...)._tainted == 0
                  *    return_value == &java.lang.StringBuilder:toString(...)
                  */
   124          return getSite()+"/CommentAuthenticatorServlet";
   125      }
   126      
   127      
   128      public String themeResource(String theme, String filePath) {
                 /* 
    P/P           *  Method: String themeResource(String, String)
                  * 
                  *  Postconditions:
                  *    java.lang.StringBuilder:toString(...)._tainted == theme._tainted | filePath._tainted
                  *    init'ed(java.lang.StringBuilder:toString(...)._tainted)
                  *    return_value == &java.lang.StringBuilder:toString(...)
                  */
   129          return getSite()+"/themes/"+theme+"/"+filePath;
   130      }
   131          
   132      public String themeResource(String theme, String filePath, boolean absolute) {
                 /* 
    P/P           *  Method: String themeResource(String, String, bool)
                  * 
                  *  Postconditions:
                  *    init'ed(java.lang.StringBuilder:toString(...)._tainted)
                  *    return_value in Addr_Set{&java.lang.StringBuilder:toString(...),&java.lang.StringBuilder:toString(...)}
                  * 
                  *  Test Vectors:
                  *    absolute: {0}, {1}
                  */
   133          if (absolute) {
   134              return getAbsoluteSite()+"/themes/"+theme+"/"+filePath;
   135          }
   136          return themeResource(theme, filePath);
   137      }
   138          
   139      public String getHome() {
                 /* 
    P/P           *  Method: String getHome()
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   140          return urlStrategy.getWeblogCollectionURL(weblog, locale, null, null, null, -1, true);
   141      }
   142      
   143      
   144      public String home(int pageNum) {
                 /* 
    P/P           *  Method: String home(int)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   145          return urlStrategy.getWeblogCollectionURL(weblog, locale, null, null, null, pageNum, true);
   146      }
   147      
   148      
   149      public String home(String customLocale) {
                 /* 
    P/P           *  Method: String home(String)
                  * 
                  *  Preconditions:
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   150          return urlStrategy.getWeblogCollectionURL(weblog, customLocale, null, null, null, -1, true);
   151      }
   152      
   153      
   154      public String home(String customLocale, int pageNum) {
                 /* 
    P/P           *  Method: String home(String, int)
                  * 
                  *  Preconditions:
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   155          return urlStrategy.getWeblogCollectionURL(weblog, customLocale, null, null, null, pageNum, true);
   156      }
   157      
   158      
   159      public String entry(String anchor) {
                 /* 
    P/P           *  Method: String entry(String)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   160          return urlStrategy.getWeblogEntryURL(weblog, locale, anchor, true);
   161      }
   162      
   163      public String comment(String anchor, String timeStamp) {
                 /* 
    P/P           *  Method: String comment(String, String)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   164          return urlStrategy.getWeblogCommentURL(weblog, locale, anchor, timeStamp, true);
   165      }
   166      
   167      
   168      public String comments(String anchor) {
                 /* 
    P/P           *  Method: String comments(String)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   169          return urlStrategy.getWeblogCommentsURL(weblog, locale, anchor, true);
   170      }
   171      
   172      
   173      public String trackback(String anchor) {
                 /* 
    P/P           *  Method: String trackback(String)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   174          return urlStrategy.getWeblogEntryURL(weblog, locale, anchor, true);
   175      }
   176  
   177      
   178      public String date(String dateString) {
                 /* 
    P/P           *  Method: String date(String)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   179          return urlStrategy.getWeblogCollectionURL(weblog, locale, null, dateString, null, -1, true);
   180      }
   181      
   182      
   183      public String date(String dateString, int pageNum) {
                 /* 
    P/P           *  Method: String date(String, int)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   184          return urlStrategy.getWeblogCollectionURL(weblog, locale, null, dateString, null, pageNum, true);
   185      }
   186      
   187      
   188      public String category(String catPath) {
                 /* 
    P/P           *  Method: String category(String)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   189          return urlStrategy.getWeblogCollectionURL(weblog, locale, catPath, null, null, -1, true);
   190      }
   191      
   192      
   193      public String category(String catPath, int pageNum) {
                 /* 
    P/P           *  Method: String category(String, int)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   194          return urlStrategy.getWeblogCollectionURL(weblog, locale, catPath, null, null, pageNum, true);
   195      }
   196      
   197      
   198      public String tag(String tag) {
                 /* 
    P/P           *  Method: String tag(String)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   199          return urlStrategy.getWeblogCollectionURL(weblog, locale, null, null, Arrays.asList(new String[]{tag}) , -1, true);
   200      }
   201      
   202      
   203      public String tag(String tag, int pageNum) {
                 /* 
    P/P           *  Method: String tag(String, int)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   204          return urlStrategy.getWeblogCollectionURL(weblog, locale, null, null, Arrays.asList(new String[]{tag}), pageNum, true);
   205      }    
   206      
   207      
   208      public String tags(List tags) {
                 /* 
    P/P           *  Method: String tags(List)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   209          return urlStrategy.getWeblogCollectionURL(weblog, locale, null, null, tags , -1, true);
   210      }
   211      
   212      
   213      public String tags(List tags, int pageNum) {
                 /* 
    P/P           *  Method: String tags(List, int)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   214          return urlStrategy.getWeblogCollectionURL(weblog, locale, null, null, tags, -1, true);
   215      }
   216      
   217      
   218      public String collection(String dateString, String catPath) {
                 /* 
    P/P           *  Method: String collection(String, String)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   219          return urlStrategy.getWeblogCollectionURL(weblog, locale, catPath, dateString, null, -1, true);
   220      }
   221      
   222      
   223      public String collection(String dateString, String catPath, int pageNum) {
                 /* 
    P/P           *  Method: String collection(String, String, int)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   224          return urlStrategy.getWeblogCollectionURL(weblog, locale, catPath, dateString, null, pageNum, true);
   225      }
   226      
   227      
   228      public String getSearch() {
                 /* 
    P/P           *  Method: String getSearch()
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   229          return urlStrategy.getWeblogSearchURL(weblog, locale, null, null, -1, false);
   230      }
   231      
   232      
   233      public String search(String query, int pageNum) {
                 /* 
    P/P           *  Method: String search(String, int)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   234          return urlStrategy.getWeblogSearchURL(weblog, locale, query, null, pageNum, false);
   235      }
   236      
   237      
   238      public String search(String query, String catPath, int pageNum) {
                 /* 
    P/P           *  Method: String search(String, String, int)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   239          return urlStrategy.getWeblogSearchURL(weblog, locale, query, catPath, pageNum, false);
   240      }
   241      
   242      public String absoluteSearch(String query, String catPath, int pageNum) {
                 /* 
    P/P           *  Method: String absoluteSearch(String, String, int)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   243          return urlStrategy.getWeblogSearchURL(weblog, locale, query, catPath, pageNum, true);
   244      }        
   245      
   246      public String page(String pageLink) {
                 /* 
    P/P           *  Method: String page(String)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   247          return urlStrategy.getWeblogPageURL(weblog, locale, pageLink, null, null, null, null, -1, true);
   248      }
   249      
   250      
   251      public String page(String pageLink, String dateString, String catPath, int pageNum) {
                 /* 
    P/P           *  Method: String page(String, String, String, int)
                  * 
                  *  Preconditions:
                  *    init'ed(this.locale)
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   252          return urlStrategy.getWeblogPageURL(weblog, locale, pageLink, null, catPath, dateString, null, pageNum, true);
   253      }
   254      
   255      
   256      public String resource(String filePath) {
                 /* 
    P/P           *  Method: String resource(String)
                  * 
                  *  Preconditions:
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   257          return urlStrategy.getWeblogResourceURL(weblog, filePath, true);
   258      }
   259      
   260      
   261      public String getRsd() {
                 /* 
    P/P           *  Method: String getRsd()
                  * 
                  *  Preconditions:
                  *    this.urlStrategy != null
                  *    init'ed(this.weblog)
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   262          return urlStrategy.getWeblogRsdURL(weblog, true);
   263      }
   264      
   265      
   266      public FeedURLS getFeed() {
                 /* 
    P/P           *  Method: URLModel$FeedURLS getFeed()
                  * 
                  *  Postconditions:
                  *    return_value == &new URLModel$FeedURLS(getFeed#1)
                  *    new URLModel$FeedURLS(getFeed#1) num objects == 1
                  */
   267          return new FeedURLS();
   268      }
   269      
   270      
   271      /** URL for editing a weblog entry */
   272      public String editEntry(String anchor) {
   273          try {
   274              // need to determine entryId from anchor
                     /* 
    P/P               *  Method: String editEntry(String)
                      * 
                      *  Preconditions:
                      *    (soft) log != null
                      *    (soft) this.urlStrategy != null
                      *    (soft) this.weblog != null
                      * 
                      *  Presumptions:
                      *    org.apache.roller.weblogger.business.Weblogger:getWeblogManager(...)@275 != null
                      *    org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@275 != null
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   275              WeblogManager wmgr = WebloggerFactory.getWeblogger().getWeblogManager();
   276              WeblogEntry entry = wmgr.getWeblogEntryByAnchor(weblog, anchor);
   277              if(entry != null) {
   278                  return urlStrategy.getEntryEditURL(weblog.getHandle(), entry.getId(), false);
   279              }
   280          } catch (WebloggerException ex) {
   281              log.error("Error looking up entry by anchor - "+anchor, ex);
   282          }
   283          return null;
   284      } 
   285      
   286      
   287      /** URL for creating a new weblog entry */
   288      public String getCreateEntry() {
                 /* 
    P/P           *  Method: String getCreateEntry()
                  * 
                  *  Preconditions:
                  *    this.urlStrategy != null
                  *    this.weblog != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   289          return urlStrategy.getEntryAddURL(weblog.getHandle(), false);
   290      }
   291      
   292      
   293      /** URL for editing weblog settings */
   294      public String getEditSettings() {
                 /* 
    P/P           *  Method: String getEditSettings()
                  * 
                  *  Preconditions:
                  *    this.urlStrategy != null
                  *    this.weblog != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   295          return urlStrategy.getWeblogConfigURL(weblog.getHandle(), false);
   296      }
   297      
   298      
   299      ///////  Inner Classes  ///////
   300      
             /* 
    P/P       *  Method: void org.apache.roller.weblogger.ui.rendering.model.URLModel$FeedURLS(URLModel)
              */
   301      public class FeedURLS {
   302          
   303          public EntryFeedURLS getEntries() {
                     /* 
    P/P               *  Method: URLModel$EntryFeedURLS getEntries()
                      * 
                      *  Postconditions:
                      *    return_value == &new URLModel$EntryFeedURLS(getEntries#1)
                      *    new URLModel$EntryFeedURLS(getEntries#1) num objects == 1
                      */
   304              return new EntryFeedURLS();
   305          }
   306          
   307          public CommentFeedURLS getComments() {
                     /* 
    P/P               *  Method: URLModel$CommentFeedURLS getComments()
                      * 
                      *  Postconditions:
                      *    return_value == &new URLModel$CommentFeedURLS(getComments#1)
                      *    new URLModel$CommentFeedURLS(getComments#1) num objects == 1
                      */
   308              return new CommentFeedURLS();
   309          }
   310      }
   311      
             /* 
    P/P       *  Method: void org.apache.roller.weblogger.ui.rendering.model.URLModel$EntryFeedURLS(URLModel)
              */
   312      public class EntryFeedURLS {
   313          
   314          public String getRss() {
                     /* 
    P/P               *  Method: String getRss()
                      * 
                      *  Preconditions:
                      *    init'ed(this.locale)
                      *    this.urlStrategy != null
                      *    init'ed(this.weblog)
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   315              return urlStrategy.getWeblogFeedURL(weblog, locale, "entries", "rss", null, null, null, false, true);
   316          }
   317          
   318          public String rss(String catPath, boolean excerpts) {
                     /* 
    P/P               *  Method: String rss(String, bool)
                      * 
                      *  Preconditions:
                      *    init'ed(this.locale)
                      *    this.urlStrategy != null
                      *    init'ed(this.weblog)
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   319              return urlStrategy.getWeblogFeedURL(weblog, locale, "entries", "rss", catPath, null, null, excerpts, true);
   320          }
   321          
   322          public String rssByTags(List tags, boolean excerpts) {
                     /* 
    P/P               *  Method: String rssByTags(List, bool)
                      * 
                      *  Preconditions:
                      *    init'ed(this.locale)
                      *    this.urlStrategy != null
                      *    init'ed(this.weblog)
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   323              return urlStrategy.getWeblogFeedURL(weblog, locale, "entries", "rss", null, null, tags, excerpts, true);
   324          }
   325          
   326          public String getAtom() {
                     /* 
    P/P               *  Method: String getAtom()
                      * 
                      *  Preconditions:
                      *    init'ed(this.locale)
                      *    this.urlStrategy != null
                      *    init'ed(this.weblog)
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   327              return urlStrategy.getWeblogFeedURL(weblog, locale, "entries", "atom", null, null, null, false, true);
   328          }
   329          
   330          public String atom(String catPath, boolean excerpts) {
                     /* 
    P/P               *  Method: String atom(String, bool)
                      * 
                      *  Preconditions:
                      *    init'ed(this.locale)
                      *    this.urlStrategy != null
                      *    init'ed(this.weblog)
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   331              return urlStrategy.getWeblogFeedURL(weblog, locale, "entries", "atom", catPath, null, null, excerpts, true);
   332          }
   333          
   334          public String search(String term, String catPath) {
                     /* 
    P/P               *  Method: String search(String, String)
                      * 
                      *  Preconditions:
                      *    init'ed(this.locale)
                      *    this.urlStrategy != null
                      *    init'ed(this.weblog)
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   335              return urlStrategy.getWeblogFeedURL(weblog, locale, "entries", "atom", catPath, term, null, false, true);
   336          }        
   337          
   338          public String atomByTags(List tags, boolean excerpts) {
                     /* 
    P/P               *  Method: String atomByTags(List, bool)
                      * 
                      *  Preconditions:
                      *    init'ed(this.locale)
                      *    this.urlStrategy != null
                      *    init'ed(this.weblog)
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   339              return urlStrategy.getWeblogFeedURL(weblog, locale, "entries", "atom", null, null, tags, excerpts, true);
   340          }
   341      }
   342      
             /* 
    P/P       *  Method: void org.apache.roller.weblogger.ui.rendering.model.URLModel$CommentFeedURLS(URLModel)
              */
   343      public class CommentFeedURLS {
   344          
   345          public String getRss() {
                     /* 
    P/P               *  Method: String getRss()
                      * 
                      *  Preconditions:
                      *    init'ed(this.locale)
                      *    this.urlStrategy != null
                      *    init'ed(this.weblog)
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   346              return urlStrategy.getWeblogFeedURL(weblog, locale, "comments", "rss", null, null, null, false, true);
   347          }
   348          
   349          public String rss(String catPath, boolean excerpts) {
                     /* 
    P/P               *  Method: String rss(String, bool)
                      * 
                      *  Preconditions:
                      *    init'ed(this.locale)
                      *    this.urlStrategy != null
                      *    init'ed(this.weblog)
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   350              return urlStrategy.getWeblogFeedURL(weblog, locale, "comments", "rss", catPath, null, null, excerpts, true);
   351          }
   352          
   353          public String getAtom() {
                     /* 
    P/P               *  Method: String getAtom()
                      * 
                      *  Preconditions:
                      *    init'ed(this.locale)
                      *    this.urlStrategy != null
                      *    init'ed(this.weblog)
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   354              return urlStrategy.getWeblogFeedURL(weblog, locale, "comments", "atom", null, null, null, false, true);
   355          }
   356          
   357          public String atom(String catPath, boolean excerpts) {
                     /* 
    P/P               *  Method: String atom(String, bool)
                      * 
                      *  Preconditions:
                      *    init'ed(this.locale)
                      *    this.urlStrategy != null
                      *    init'ed(this.weblog)
                      * 
                      *  Postconditions:
                      *    init'ed(return_value)
                      */
   358              return urlStrategy.getWeblogFeedURL(weblog, locale, "comments", "atom", catPath, null, null, excerpts, true);
   359          }
   360          
   361      }
   362      
   363  }








SofCheck Inspector Build Version : 2.18479
URLModel.java 2009-Jan-02 14:25:10
URLModel.class 2009-Sep-04 03:12:44
URLModel$CommentFeedURLS.class 2009-Sep-04 03:12:44
URLModel$EntryFeedURLS.class 2009-Sep-04 03:12:44
URLModel$FeedURLS.class 2009-Sep-04 03:12:44