KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openedit > repository > Repository


1 /*
2  * Created on Aug 10, 2003
3  *
4 /*
5 Copyright (c) 2003 eInnovation Inc. All rights reserved
6
7 This library is free software; you can redistribute it and/or modify it under the terms
8 of the GNU Lesser General Public License as published by the Free Software Foundation;
9 either version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU Lesser General Public License for more details.
14 */

15 package org.openedit.repository;
16
17 import java.util.List JavaDoc;
18
19
20
21 /**
22  * This is a generic interface to store web content, e.g HTML, XML, images
23  * or other documents.
24  *
25  * @author Matt Avery, mavery@einnovation.com
26  */

27 public interface Repository
28 {
29     /*
30      * This should never return null, it can return a blank ContentItem though.
31      */

32     ContentItem get( String JavaDoc inPath ) throws RepositoryException;
33     ContentItem getStub( String JavaDoc inPath ) throws RepositoryException;
34     
35     boolean doesExist( String JavaDoc inPath) throws RepositoryException;
36     
37     void put( ContentItem inContent ) throws RepositoryException;
38     
39     void copy( ContentItem inSource, ContentItem inDestination ) throws RepositoryException;
40     
41     void move( ContentItem inSource, ContentItem inDestination ) throws RepositoryException;
42     
43     void remove( ContentItem inPath ) throws RepositoryException;
44     
45     /* Returns a List of ContentItems sorted by version number
46      *
47      */

48     List JavaDoc getVersions( String JavaDoc inPath ) throws RepositoryException;
49     
50     public ContentItem getLastVersion(String JavaDoc inPath) throws RepositoryException;
51
52     List JavaDoc getChildrenNames(String JavaDoc inParent) throws RepositoryException;
53     void deleteOldVersions(String JavaDoc inPath) throws RepositoryException;
54 }
55
Popular Tags