KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jaspersoft > jasperserver > api > metadata > common > service > impl > hibernate > HibernateRepositoryService


1 /*
2  * Copyright (C) 2006 JasperSoft http://www.jaspersoft.com
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 WITHOUT ANY WARRANTY; and without the
10  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
15  * or write to:
16  *
17  * Free Software Foundation, Inc.,
18  * 59 Temple Place - Suite 330,
19  * Boston, MA USA 02111-1307
20  */

21
22 package com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate;
23
24 import java.util.List JavaDoc;
25
26 import com.jaspersoft.jasperserver.api.common.domain.ExecutionContext;
27 import com.jaspersoft.jasperserver.api.metadata.common.domain.FileResourceData;
28 import com.jaspersoft.jasperserver.api.metadata.common.domain.Folder;
29 import com.jaspersoft.jasperserver.api.metadata.common.domain.Resource;
30 import com.jaspersoft.jasperserver.api.metadata.common.domain.ResourceLookup;
31 import com.jaspersoft.jasperserver.api.metadata.common.service.JSResourceNotFoundException;
32 import com.jaspersoft.jasperserver.api.metadata.common.service.RepositoryService;
33 import com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.persistent.RepoResource;
34 import com.jaspersoft.jasperserver.api.metadata.view.domain.FilterCriteria;
35
36 /**
37  * @author swood
38  *
39  */

40 public interface HibernateRepositoryService extends RepositoryService {
41     /**
42      *
43      * @param context
44      * @param uri
45      * @return the resource if found or null otherwise
46      */

47     public Resource getResource(ExecutionContext context, String JavaDoc uri);
48
49
50     /**
51      *
52      * @param context
53      * @param uri
54      * @return
55      * @throws JSResourceNotFoundException
56      */

57     public FileResourceData getResourceData(ExecutionContext context, String JavaDoc uri) throws JSResourceNotFoundException;
58
59     
60
61     /**
62      *
63      */

64     public void saveResource(ExecutionContext context, Resource resource);
65     
66
67     public void deleteResource(ExecutionContext context, String JavaDoc uri);
68
69     
70     public void deleteFolder(ExecutionContext context, String JavaDoc uri);
71
72     
73     public void delete(ExecutionContext context, String JavaDoc resourceURIs[], String JavaDoc folderURIs[]);
74     
75     
76     /**
77      * Given filtering criteria, find relevant Resources.
78      *
79      * @param context
80      * @param criteria
81      * @return Array of found Resources
82      */

83     public ResourceLookup[] findResource(ExecutionContext context, FilterCriteria criteria);
84     
85     /*
86      * Return a Resource that does not yet contain content.
87      *
88      * @param context
89      * @param class - class of resource to create
90      * @return Resource
91      */

92     public Resource newResource(ExecutionContext context, Class JavaDoc _class);
93
94     public RepoResource findByURI(Class JavaDoc persistentClass, String JavaDoc uri, boolean required);
95     
96     public RepoResource getRepoResource(Resource resource);
97 }
98
Popular Tags