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  package org.seasar.tuigwaa.cms;
17  
18  import java.util.Properties;
19  
20  import org.seasar.tuigwaa.cms.core.Page;
21  import org.seasar.tuigwaa.system.SiteConfig;
22  import org.seasar.tuigwaa.system.TgwException;
23  import org.seasar.tuigwaa.system.TgwSecurityException;
24  import org.seasar.tuigwaa.view.PageComponent;
25  
26  
27  /***
28   * @author nishioka
29   */
30  public interface ContentsService {
31  
32  	public void createSite(SiteConfig siteConfig) throws TgwSecurityException,TgwResourceAlreadyExistsException;
33  
34  	public void deleteSite(String siteName) throws TgwException;
35  	
36  	public void copySite(String srcSiteName, String destSiteName) throws TgwException;
37  
38  	public PageComponent getPageComponent() throws TgwSecurityException,
39  			TgwResourceNotFoundException;
40  
41  	public void savePage(String siteName, String path, String contentType,
42  			Properties props, String content, String editVersion,
43  			String sectionId) throws TgwPageConflictException,
44  			TgwResourceAlreadyExistsException, TgwSecurityException;
45  
46  	public Page getPage(String siteName, String pagePath, int contentType)
47  			throws TgwSecurityException;
48  
49  	public Page convert(String siteName, String pagePath, String contentType,
50  			Object srcContent, int target);
51  
52  	public Page convert(String siteName, String pagePath, String contentType,
53  			Object srcContent, int target, boolean newRequest);
54  
55  	public void createFolder(SiteConfig siteConfig, String folderPath)
56  			throws TgwSecurityException, TgwResourceAlreadyExistsException;
57  
58  	public void backup(String siteName, String backupDirectory)
59  			throws TgwException;
60  
61  	public void restore(String siteName, String backupDirectory)
62  			throws TgwException;
63  	
64  }