File Source: AtomHandler.java

         /* 
    P/P   *  Method: org.apache.roller.weblogger.webservices.atomprotocol.AtomHandler__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  package org.apache.roller.weblogger.webservices.atomprotocol;
    19  
    20  import java.io.InputStream;
    21  import com.sun.syndication.feed.atom.Entry;
    22  import com.sun.syndication.feed.atom.Feed;
    23  
    24  /**
    25   * Interface to be supported by an Atom server, expected lifetime: one request.
    26   * AtomServlet calls this generic interface instead of Roller specific APIs. 
    27   * <p />
    28   * Based on: draft-ietf-atompub-protocol-14.txt
    29   * <p />
    30   * Designed to be Roller independent.
    31   */
    32  public interface AtomHandler
    33  {   
    34      /** Get username of authenticated user */
    35      public String getAuthenticatedUsername();    
    36  
    37      /**
    38       * Return introspection document
    39       */
    40      public AtomService getIntrospection() throws AtomException;
    41      
    42      /**
    43       * Return collection
    44       * @param pathInfo Used to determine which collection and range
    45       */   
    46      public Feed getCollection(String[] pathInfo) throws AtomException;
    47      
    48      /**
    49       * Create a new entry specified by pathInfo and posted entry.
    50       * @param pathInfo Path info portion of URL
    51       */
    52      public Entry postEntry(String[] pathInfo, Entry entry) throws AtomException;
    53  
    54      /**
    55       * Get entry specified by pathInfo.
    56       * @param pathInfo Path info portion of URL
    57       */
    58      public Entry getEntry(String[] pathInfo) throws AtomException;
    59      
    60      /**
    61       * Update entry specified by pathInfo and posted entry.
    62       * @param pathInfo Path info portion of URL
    63       */
    64      public Entry putEntry(String[] pathInfo, Entry entry) throws AtomException;
    65      
    66  
    67      /**
    68       * Delete entry specified by pathInfo.
    69       * @param pathInfo Path info portion of URL
    70       */
    71      public void deleteEntry(String[] pathInfo) throws AtomException;
    72      
    73      /**
    74       * Get media resource specified by pathInfo.
    75       * @param pathInfo Path info portion of URL
    76       */
    77      public AtomMediaResource getMediaResource(String[] pathInfo) throws AtomException;
    78      
    79      /**
    80       * Create a new media-link entry.
    81       * @param pathInfo Path info portion of URL
    82       * @param contentType MIME type of uploaded content
    83       * @param data Binary data representing uploaded content
    84       */
    85      public Entry postMedia(
    86          String[] pathInfo, String title, String slug, String contentType, InputStream is) throws AtomException;
    87  
    88      /**
    89       * Update the media file part of a media-link entry.
    90       * @param pathInfo Path info portion of URL
    91       */
    92      public Entry putMedia(
    93          String[] pathInfo, String contentType, InputStream is) throws AtomException;
    94          
    95      /**
    96       * Return true if specified pathinfo represents URI of introspection doc.
    97       */
    98      public boolean isIntrospectionURI(String [] pathInfo);  
    99   
   100      /**
   101       * Return true if specified pathinfo represents URI of a collection.
   102       */
   103      public boolean isCollectionURI(String [] pathInfo);   
   104       
   105      /**
   106       * Return true if specified pathinfo represents URI of an Atom entry.
   107       */
   108      public boolean isEntryURI(String[] pathInfo);
   109          
   110      /**
   111       * Return true if specified pathinfo represents media-edit URI.
   112       */
   113      public boolean isMediaEditURI(String[] pathInfo);
   114  }
   115  








SofCheck Inspector Build Version : 2.18479
AtomHandler.java 2009-Jan-02 14:24:56
AtomHandler.class 2009-Sep-04 03:12:46