1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 package com.sun.star.wizards.web;
24 
25 import java.util.Hashtable;
26 import java.util.Map;
27 
28 import com.sun.star.wizards.common.IRenderer;
29 
30 /**
31  * @author rpiterman
32  * recieves status calls from the status dialog which
33  * apears when the user clicks "create".
34  * allocates strings from the resources to
35  * display the current task status.
36  * (renders the state to resource strings)
37  */
38 public class ProcessStatusRenderer implements IRenderer, WebWizardConst
39 {
40 
41     Map strings = new Hashtable(12);
42 
ProcessStatusRenderer(WebWizardDialogResources res)43     public ProcessStatusRenderer(WebWizardDialogResources res)
44     {
45         strings.put(TASK_EXPORT_DOCUMENTS, res.resTaskExportDocs);
46         strings.put(TASK_EXPORT_PREPARE, res.resTaskExportPrepare);
47         strings.put(TASK_GENERATE_COPY, res.resTaskGenerateCopy);
48         strings.put(TASK_GENERATE_PREPARE, res.resTaskGeneratePrepare);
49         strings.put(TASK_GENERATE_XSL, res.resTaskGenerateXsl);
50         strings.put(TASK_PREPARE, res.resTaskPrepare);
51         //strings.put(TASK_PUBLISH , res.resTaskPublish );
52         strings.put(LOCAL_PUBLISHER, res.resTaskPublishLocal);
53         strings.put(ZIP_PUBLISHER, res.resTaskPublishZip);
54         strings.put(FTP_PUBLISHER, res.resTaskPublishFTP);
55 
56         strings.put(TASK_PUBLISH_PREPARE, res.resTaskPublishPrepare);
57         strings.put(TASK_FINISH, res.resTaskFinish);
58     }
59 
render(Object object)60     public String render(Object object)
61     {
62         return (String) strings.get(object);
63     }
64 }
65