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.model.CmsObject;
21  
22  
23  /***
24   * Cms Index Service. This service can be used to add, remove or update CmsObjects into a index
25   *
26   * 
27   * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
28   * 
29   * @version $Id: ContentIndexService.java,v 1.1 2004/12/22 21:16:12 christophe Exp $
30   */
31  public interface ContentIndexService
32  {
33     
34      /***
35       * Add a CmsObject entry
36       * 
37       * @param cmsObject The CmsObject to add into the index
38       * @return true if the object is correclty added
39       */
40      public boolean add(CmsObject cmsObject);
41  
42      /***
43       * Add a collection of CmsObject entries
44       * 
45       * @param cmsObjects the CmsObject collection to add into the index
46       * @return true if the collection is correctly added
47       */
48      public boolean add(Collection cmsObjects);
49  
50      /***
51       * Remove a CmsObject entry
52       * 
53       * @param cmsObject the CmsObject to remove from the index
54       * @return true if the object is correctly removed
55       */
56      public boolean remove(CmsObject cmsObject);
57  
58      /***
59       * Remove a collection of CmsObject entries
60       * 
61       * @param cmsObjects the CmsObject collection to remove from the index
62       * @return true if the collection is correctly removed
63       */
64      public boolean remove(Collection cmsObjects);
65  
66      /***
67       * Update a CmsObject entry
68       * 
69       * @param cmsObject the CmsObject to update from the index
70       * @return  true if the CmsObject is correctly removed
71       */
72      public boolean update(CmsObject cmsObject);
73  
74      /***
75       * Update a CmsObject entries
76       * 
77       * @param cmsObjects the CmsObject collection to update from the index
78       * @return True if the object is correctly updated in the index
79       */
80      public boolean update(Collection cmsObjects);
81  
82  }