View Javadoc

1   /*
2    * Copyright 2000-2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not 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.
15   */
16  package org.apache.portals.graffito;
17  
18  import java.util.Collection;
19  
20  import org.apache.portals.graffito.exception.ContentManagementException;
21  import org.apache.portals.graffito.model.FileSystemServer;
22  import org.apache.portals.graffito.model.GraffitoServer;
23  import org.apache.portals.graffito.model.Server;
24  import org.apache.portals.graffito.model.WebdavServer;
25  
26  
27  /***
28   * <P>Content Server Interface</P>
29   *
30   * This service maintains server references and their integration into the virtual content tree.
31   * 
32   * In this version, all servers are plugged on the root content tree level.
33   * Later, we plan to "mount" external servers anywhere in the content tree.
34   *
35   * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
36   *
37   * @version $Id: ContentServerService.java,v 1.1 2004/12/22 21:16:12 christophe Exp $
38   *
39   *
40   */
41  
42  public interface ContentServerService
43  {
44      /***
45       * Factory to create a new WEBDAV server reference object
46       *
47       * @return an empty factory created WEBDAV server reference
48       * 
49       * @throws ContentManagementException
50       */
51      public WebdavServer createWebdavServer() throws ContentManagementException;
52  
53      
54      /***
55       * Factory to create a new Graffito server reference object
56       *
57       * @return an empty factory created Graffito server 
58       * @throws ContentManagementException
59       */
60      public GraffitoServer createGraffitoServer() throws ContentManagementException;
61  
62      /***
63       * Factory to create a new File System server reference object
64       *
65       * @return an empty factory created File System server 
66       * @throws ContentManagementException
67       */
68      public FileSystemServer createFileSystemServer() throws ContentManagementException;
69      
70      /***
71       * Adds a new server to engine's persistent store.
72       *
73       * @param server the server to add
74       * 
75       * @throws ContentManagementException
76       */
77      public void addServer(Server server) throws ContentManagementException;
78  
79      /***
80       * Remove a server from the engine's persistent store.
81       * 
82       * This method delete only the server reference (not its associated content tree).
83       *
84       * @param server the server reference to remove.
85       * 
86       * @throws ContentManagementException
87       */
88      public void removeServer(Server server) throws ContentManagementException;
89  
90      /***
91       * Get a server reference from the engine's persistent store.
92       *
93       * @param scope the scope assigned to the server to retrieve.
94       * @return server found or null.
95       * 
96       * @throws ContentManagementException
97       */
98      public Server getServer(String scope) throws ContentManagementException;
99  
100     /***
101      * Update a server reference into the engine's persistent store.
102      *
103      * @param server the server to be updated.
104      * @throws ContentManagementException
105      */
106     public void updateServer(Server server) throws ContentManagementException;
107     
108     /***
109      * Get all server references defined into the engine's persistence store.
110      * 
111      * @return a collection of {@link Server}
112      * 
113      * @throws ContentManagementException
114      */
115     public Collection getAllServers()  throws ContentManagementException;
116 
117 
118 }