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/10
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.controller;
23  
24  import java.lang.reflect.InvocationTargetException;
25  import java.util.Collection;
26  
27  import javax.servlet.http.HttpServletRequest;
28  import javax.servlet.http.HttpServletResponse;
29  
30  import org.seasar.tuigwaa.controller.config.ModuleConfigMetadata;
31  import org.seasar.tuigwaa.database.function.SearchExeFunction;
32  import org.seasar.tuigwaa.database.function.UpdateExeFunction;
33  import org.seasar.tuigwaa.model.core.TgwEntity;
34  import org.seasar.tuigwaa.plugin.WebAppli;
35  import org.seasar.tuigwaa.security.Action;
36  import org.seasar.tuigwaa.system.SiteConfig;
37  import org.seasar.tuigwaa.system.TgwServiceException;
38  
39  /***
40   * @author nishioka
41   */
42  public interface ControllerService {
43  
44  	// [Start]----- Site create/security -------
45  
46  	public void createSite(SiteConfig siteConfig);
47  
48  	public void deleteSite(String siteName);
49  
50  	public void setActionRoles(String siteName, Action action, String roles);
51  
52  	// Entity Config create/alter/remove ---------
53  
54  	public void addEntityConfig(TgwEntity entity);
55  
56  	public void addEntityConfigs(Collection entities);
57  
58  	public void alterEntityConfig(TgwEntity entity);
59  
60  	public void alterEntityConfigs(Collection entities);
61  
62  	public void removeEntityConfig(String siteName, String entityName);
63  
64  	// Search/Custom Config create --------
65  
66  	public String addSearchConfig(TgwEntity entity, SearchExeFunction function);
67  
68  	public void removeSearchConfig(TgwEntity entity, String name);
69  
70  	public String addCustomFormConfig(TgwEntity entity, UpdateExeFunction function);
71  
72  	public void removeCustomFormConfig(TgwEntity entity, String name);
73  
74  	// utilization --------
75  
76  	public String getSearchActionName(TgwEntity entity,
77  			SearchExeFunction function);
78  
79  	public String getCustomActionName(TgwEntity entity,
80  			UpdateExeFunction function);
81  
82  	public String getSearchFormName(TgwEntity entity, SearchExeFunction function);
83  
84  	public String getCustomFormName(TgwEntity entity, UpdateExeFunction function);
85  
86  	public String getCustomFormName(String siteName, String path);
87  		
88  	public String getMethodName(String siteName, String path);
89  
90  	
91  	// plugin ---------
92  
93  	public void addPluginConfig(String siteName, WebAppli appli);
94  	
95  	public void addPrototypeWebAppli(WebAppli webAppli);
96  
97  	public String proxyAction(String path, Object dto, HttpServletRequest req,
98  			HttpServletResponse res) throws IllegalArgumentException,
99  			IllegalAccessException, InvocationTargetException;
100 	
101 	// skin --------
102 	public void addForwardPath(String siteName, String path, String forwardName, String forwardPath) throws TgwServiceException;
103 	
104 	public void removeForwardPath(String siteName, String path, String forwardName, String forwardPath) throws TgwServiceException;
105 	
106 	public String[] getForwardNames(String siteName, String path);
107 	
108 	public ModuleConfigMetadata getMetadata(String siteName);
109 }