1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.seasar.tuigwaa.system;
17
18 import java.util.List;
19 import java.util.zip.ZipInputStream;
20 import java.util.zip.ZipOutputStream;
21
22 /***
23 * @author someda
24 */
25 public interface DesignService {
26
27 /***
28 * design template(skin) name indicates the one within site archive
29 */
30 public static final String ARCHIVE_SKIN_NAME = "archive";
31
32 /***
33 * design template(skin) name system provides
34 */
35 public static final String SYSTEM_SKIN_NAME = "basic";
36
37 /***
38 * initialization methos at startup
39 */
40 public void init();
41
42 /***
43 * Returns all skinname available for system
44 */
45 public String[] getAllSkinNames();
46
47 /***
48 * Returns available skinname list for a given site
49 */
50 public String[] getAvailableSkinNames(String siteName);
51
52 /***
53 * Uploads skin zip archive, this for Web-interface
54 */
55 public void uploadSkin(String skinName, ZipInputStream zipInput) throws TgwServiceException;
56
57 /***
58 * Download skin as zip archive, this for Web-interface
59 */
60 public void downloadSkin(String skinName, ZipOutputStream zipOutput) throws TgwServiceException;
61
62 /***
63 * Delete skin under template store (that is, Web-DAV area)
64 */
65 public void deleteSkin(String skinName, List configList) throws TgwServiceException;
66
67 /***
68 * Sync site-local skin files with repository skin files (Web-DAV or backup archive)
69 * @param overwrite if set is true, overwrites site-local data with repository data,
70 * else at first it cleans up site-local directory and then copy repository skins there.
71 */
72 public void sync(SiteConfig siteConfig, boolean overwrite) throws TgwServiceException;
73
74 /***
75 * Validate skin directory
76 */
77 public boolean validate(String skin);
78
79 /***
80 * Save design configuration
81 */
82 public void saveConfig(DesignConfig designConfig) throws TgwServiceException;
83
84 public DesignConfig getDesignConfig(String skinName);
85
86 }