KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > repository > RepositoryService


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005 Fossil E-Commerce, http://www.fossilec.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library 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 GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id: RepositoryService.java 250 2006-04-21 12:20:57Z ofabre $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.repository;
23
24 import java.io.File JavaDoc;
25 import java.net.URI JavaDoc;
26
27 import org.objectweb.petals.PetalsException;
28
29 /**
30  * Platform Component Repository.
31  *
32  * @version $Rev: 250 $ $Date: 2006-04-21 12:20:57Z $
33  * @since Petals 1.0
34  * @author <a HREF="mailto:rmarins@fossilec.com">Rafael Marins</a>
35  */

36 public interface RepositoryService {
37
38     
39     /**
40      * Verifies if the Repository contains a package with the
41      * specified identification. Returns <code>true</code> if that package
42      * exists. Otherwise, returns <code>false</code>.
43      *
44      * @param uuid this is the unique repository's identification for
45      * a given component.
46      * @return <code>boolean</code> contains or not a component with the given
47      * identification.
48      */

49     public boolean containsPackage(String JavaDoc uuid);
50
51     /**
52      *
53      * @param uuid <code>String</code> unique repository package identifier
54      * within the repository.
55      * @param location <code>URI</code> the Zip archive file to add flatten
56      * into the repository.
57      * @return <code>URI</code> installation root of package in the repository.
58      * Must be a valid directory.
59      * @throws PetalsException
60      */

61     public URI JavaDoc addPackage(String JavaDoc uuid, URI JavaDoc location) throws PetalsException;
62     
63     /**
64      *
65      * @param suId <code>String</code> unique SU identifier
66      * within the repository.
67      * @param suZipLocation <code>URI</code> the SU Zip archive file to add flatten
68      * into the repository.
69      * @param saId <code>String</code> unique SA identifier
70      * within the repository where SU add to be flatten
71      * @return <code>URI</code> installation root of su in the repository.
72      * Must be a valid directory.
73      * @throws PetalsException
74      */

75     public URI JavaDoc explodeSUIntoSAInstallFolder(String JavaDoc suId,
76                                     URI JavaDoc suZipLocation,
77                                     String JavaDoc saId) throws PetalsException;
78
79     /**
80      * Delete and clean all package repository related data for the given
81      * identification.
82      *
83      * @param componentId
84      * @return <code>true</code> for sucessful removal. Otherwise,
85      * <code>false</code>.
86      */

87     public boolean removePackage(String JavaDoc componentId);
88
89     /**
90      * Return the root directory of this component
91      * @param componentId
92      * @return
93      */

94     public File JavaDoc getComponentRoot(String JavaDoc componentId);
95     
96     /**
97      * Return the install directory of the component
98      * @param componentId
99      * @return
100      */

101     public File JavaDoc getComponentInstallRoot(String JavaDoc componentId);
102
103     /**
104      * Return the work directory of the component
105      * @param componentId
106      * @return
107      */

108     public File JavaDoc getComponentWorkRoot(String JavaDoc componentId);
109
110 }
111
Popular Tags