View Javadoc

1   /*
2       Copyright (C) 2004 PjEr
3       
4       This program is free software; you can redistribute it and/or modify
5       it under the terms of the GNU General Public License as published by
6       the Free Software Foundation; either version 2 of the License, or
7       (at your option) any later version.
8       
9       This program is distributed in the hope that it will be useful,
10      but WITHOUT ANY WARRANTY; without even the implied warranty of
11      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12      GNU General Public License for more details.
13      
14      You should have received a copy of the GNU General Public License
15      along with this program; if not, write to the Free Software
16      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18  package ca.pjer.cm.api.cmf;
19  
20  import ca.pjer.cm.api.access.*;
21  import ca.pjer.cm.api.store.DuplicateObjectException;
22  import ca.pjer.cm.api.store.ObjectNotFoundException;
23  import ca.pjer.cm.api.store.StoreServiceSystemException;
24  import ca.pjer.cm.api.metadata.MetaDataServiceSystemException;
25  import ca.pjer.cm.api.metadata.MetaDataNotFoundException;
26  import ca.pjer.cm.api.metadata.MetaData;
27  
28  import java.io.Serializable;
29  import java.util.List;
30  
31  /***
32   * Root service for the Content Management Framework.<br />
33   * <br />
34   * $Id: ContentManagementService.java,v 1.2 2004/05/19 03:29:16 pjer Exp $<br />
35   * <br />
36   * $RCSfile: ContentManagementService.java,v $<br />
37   * $Revision: 1.2 $<br />
38   * $Author: pjer $<br />
39   * $Date: 2004/05/19 03:29:16 $<br />
40   */
41  public interface ContentManagementService {
42  
43      AccessToken getAccessToken(AccessCredential accessCredential)
44              throws AccessServiceSystemException, InvalidAccessCredentialException;
45  
46      boolean hasAccess(AccessToken accessToken, Permission permission, Class clazz)
47              throws AccessServiceSystemException, InvalidAccessTokenException, InsufficientRightsException;
48  
49      Object createObject(AccessToken accessToken, Object object)
50              throws AccessServiceSystemException, InvalidAccessTokenException, InsufficientRightsException,
51              StoreServiceSystemException, DuplicateObjectException;
52  
53      Object updateObject(AccessToken accessToken, Object object)
54              throws AccessServiceSystemException, InvalidAccessTokenException, InsufficientRightsException,
55              StoreServiceSystemException, ObjectNotFoundException;
56  
57      Object getObject(AccessToken accessToken, Class clazz, Serializable id)
58              throws AccessServiceSystemException, InvalidAccessTokenException, InsufficientRightsException,
59              StoreServiceSystemException, ObjectNotFoundException;
60  
61      List listObjects(AccessToken accessToken, Class clazz)
62              throws AccessServiceSystemException, InvalidAccessTokenException, InsufficientRightsException,
63              StoreServiceSystemException;
64  
65      List listObjectsFromTemplate(AccessToken accessToken, Object template)
66              throws AccessServiceSystemException, InvalidAccessTokenException, InsufficientRightsException,
67              StoreServiceSystemException;
68  
69      void removeObject(AccessToken accessToken, Object object)
70              throws AccessServiceSystemException, InvalidAccessTokenException, InsufficientRightsException,
71              StoreServiceSystemException, ObjectNotFoundException;
72  
73      MetaData getMetaData(AccessToken accessToken, Class clazz)
74              throws AccessServiceSystemException, InvalidAccessTokenException, InsufficientRightsException,
75              MetaDataServiceSystemException, MetaDataNotFoundException;
76  
77      List listRootMetaData(AccessToken accessToken)
78              throws AccessServiceSystemException, InvalidAccessTokenException, InsufficientRightsException,
79              MetaDataServiceSystemException;
80  
81  }