File Source: URLStrategy.java

         /* 
    P/P   *  Method: org.apache.roller.weblogger.business.URLStrategy__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.business;
    20  
    21  import java.util.List;
    22  import java.util.Map;
    23  import org.apache.roller.weblogger.pojos.Weblog;
    24  
    25  
    26  /**
    27   * An interface representing the Roller Planet url strategy.
    28   *
    29   * Implementations of this interface provide methods which can be used to form
    30   * all of the public urls used by Roller Planet.
    31   */
    32  public interface URLStrategy {
    33      
    34      /**
    35       * Get a version of this url strategy meant for use in previewing and set
    36       * it to preview a given theme.
    37       */
    38      public URLStrategy getPreviewURLStrategy(String previewTheme);
    39      
    40      
    41      /**
    42       * Url to login page.
    43       */
    44      public String getLoginURL(boolean absolute);
    45      
    46      
    47      /**
    48       * Url to logout page.
    49       */
    50      public String getLogoutURL(boolean absolute);
    51      
    52      
    53      /**
    54       * Get a url to a UI action in a given namespace, optionally specifying
    55       * a weblogHandle parameter if that is needed by the action.
    56       */
    57      public String getActionURL(String action,
    58                                              String namespace,
    59                                              String weblogHandle,
    60                                              Map<String, String> parameters,
    61                                              boolean absolute);
    62      
    63      
    64      /**
    65       * Get a url to add a new weblog entry.
    66       */
    67      public String getEntryAddURL(String weblogHandle,
    68                                                boolean absolute);
    69      
    70      
    71      /**
    72       * Get a url to edit a specific weblog entry.
    73       */
    74      public String getEntryEditURL(String weblogHandle,
    75                                                 String entryId,
    76                                                 boolean absolute);
    77      
    78      
    79      /**
    80       * Get a url to weblog config page.
    81       */
    82      public String getWeblogConfigURL(String weblogHandle,
    83                                                    boolean absolute);
    84      
    85      public String getXmlrpcURL(boolean absolute);
    86      
    87      public String getAtomProtocolURL(boolean absolute);
    88      
    89      /**
    90       * Get root url for a given weblog.  Optionally for a certain locale.
    91       */
    92      public String getWeblogURL(Weblog weblog,
    93                                              String locale,
    94                                              boolean absolute);
    95      
    96      
    97      /**
    98       * Get url for a single weblog entry on a given weblog.
    99       */
   100      public String getWeblogEntryURL(Weblog weblog,
   101                                                   String locale,
   102                                                   String entryAnchor,
   103                                                   boolean absolute);
   104      
   105      
   106      /**
   107       * Get url for a single weblog entry comments on a given weblog.
   108       */
   109      public String getWeblogCommentsURL(Weblog weblog,
   110                                                      String locale,
   111                                                      String entryAnchor,
   112                                                      boolean absolute);
   113      
   114      
   115      /**
   116       * Get url for a single weblog entry comment on a given weblog.
   117       */
   118      public String getWeblogCommentURL(Weblog weblog,
   119                                                     String locale,
   120                                                     String entryAnchor,
   121                                                     String timeStamp,
   122                                                     boolean absolute);
   123      
   124      
   125      /**
   126       * Get url for a collection of entries on a given weblog.
   127       */
   128      public String getWeblogCollectionURL(Weblog weblog,
   129                                                        String locale,
   130                                                        String category,
   131                                                        String dateString,
   132                                                        List tags,
   133                                                        int pageNum,
   134                                                        boolean absolute);
   135      
   136      
   137      /**
   138       * Get url for a custom page on a given weblog.
   139       */
   140      public String getWeblogPageURL(Weblog weblog,
   141                                                  String locale,
   142                                                  String pageLink,
   143                                                  String entryAnchor,
   144                                                  String category,
   145                                                  String dateString,
   146                                                  List tags,
   147                                                  int pageNum,
   148                                                  boolean absolute);
   149      
   150      
   151      /**
   152       * Get url for a feed on a given weblog.
   153       */
   154      public String getWeblogFeedURL(Weblog weblog,
   155                                                  String locale,
   156                                                  String type,
   157                                                  String format,
   158                                                  String category,
   159                                                  String term,
   160                                                  List tags,
   161                                                  boolean excerpts,
   162                                                  boolean absolute);
   163      
   164      
   165      /**
   166       * Get url to search endpoint on a given weblog.
   167       */
   168      public String getWeblogSearchURL(Weblog weblog,
   169                                                    String locale,
   170                                                    String query,
   171                                                    String category,
   172                                                    int pageNum,
   173                                                    boolean absolute);
   174      
   175      
   176      /**
   177       * Get url to a resource on a given weblog.
   178       */
   179      public String getWeblogResourceURL(Weblog weblog,
   180                                                      String filePath,
   181                                                      boolean absolute);
   182      
   183      
   184      /**
   185       * Get url to rsd file on a given weblog.
   186       */
   187      public String getWeblogRsdURL(Weblog weblog, boolean absolute);
   188      
   189      
   190      /**
   191       * Get url to JSON tags service url, optionally for a given weblog.
   192       */
   193      public String getWeblogTagsJsonURL(Weblog weblog, boolean absolute);
   194      
   195  }








SofCheck Inspector Build Version : 2.18479
URLStrategy.java 2009-Jan-02 14:25:22
URLStrategy.class 2009-Sep-04 03:12:29