View Javadoc

1   /*
2    * Copyright 2004-2006 the Seasar Foundation and the Others.
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, 
13   * either express or implied. See the License for the specific language
14   * governing permissions and limitations under the License.
15   */
16  /*
17   * Created on 2005/08/20
18   *
19   * TODO To change the template for this generated file go to
20   * Window - Preferences - Java - Code Style - Code Templates
21   */
22  package org.seasar.tuigwaa.system;
23  
24  import java.util.List;
25  import java.util.jar.JarInputStream;
26  import java.util.jar.JarOutputStream;
27  
28  import javax.servlet.http.HttpServletRequest;
29  
30  import org.seasar.tuigwaa.security.Action;
31  
32  
33  /***
34   * @author nishioka
35   */
36  public interface SiteService {
37  	
38  	
39  	//load 
40  	public void loadAllSites();
41  
42  	public void loadSite(String siteName);	
43  	
44  	//upload & download
45  	
46  	public void uploadSite(String siteNamem,JarInputStream jar, BackupDto backupDto) throws TgwServiceException;
47  	
48  	public void downloadSite(String siteNamem,JarOutputStream jar, BackupDto backupDto) throws TgwServiceException;
49  	
50  	//site CRUD and more
51  	
52  	public void createSite(SiteConfig siteConfig);
53  
54  	public void deleteSite(String siteName);
55  	
56  	public void editSite(SiteConfig siteConfig);
57  	
58  	public void copySite(String srcSiteName, String destSiteName) throws TgwException;
59  	
60  	//[Start] ---- SiteConfig Utility ----
61  	
62  	public void saveSiteConfig(String siteName);
63  
64  	public List getSiteConfigList();
65  	
66  	public SiteConfig getSiteConfig(String siteName);
67  	
68  	//[Start] ----- Restore & Backup -----
69  	
70  	public void backup(String siteName,BackupDto backupDto) throws TgwServiceException;
71  
72  	public void restore(String siteName, BackupDto backupDto) throws TgwServiceException;
73  	
74  	public void deleteBackup(String siteName, BackupDto backupDto) throws TgwServiceException;
75  
76  	public List getBackupDates(String siteName);
77  
78  	//[Start] ----- Security -----
79  	
80  	public void setSecurity(String siteName, Action action, String roles);
81  
82  	public boolean hasPermission(String siteName, String role, Action action);
83  
84  	public boolean hasPermission(String siteName, HttpServletRequest request, Action action);
85  	
86  	
87  	// [Start] ----- Design -----
88  	public void initSkins();
89  	
90  	public void updatePath(SiteConfig siteConfig, boolean isNeedCleanup) throws TgwServiceException;
91  	
92  }