~ubuntu-branches/ubuntu/wily/389-ds-console/wily-proposed

« back to all changes in this revision

Viewing changes to src/com/netscape/admin/dirserv/task/CompleteImport.java

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2012-03-15 19:58:37 UTC
  • Revision ID: package-import@ubuntu.com-20120315195837-296zyft51thld8q7
Tags: upstream-1.2.6
ImportĀ upstreamĀ versionĀ 1.2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** BEGIN COPYRIGHT BLOCK
 
2
 * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
 
3
 * Copyright (C) 2005 Red Hat, Inc.
 
4
 * All rights reserved.
 
5
 * 
 
6
 * This program is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation version 2 of the License.
 
9
 * 
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 * 
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program; if not, write to the Free Software
 
17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 * END COPYRIGHT BLOCK **/
 
19
 
 
20
package com.netscape.admin.dirserv.task;
 
21
import java.lang.*;
 
22
import com.netscape.management.client.*;
 
23
import com.netscape.management.client.TaskObject;
 
24
import com.netscape.management.client.console.ConsoleInfo;
 
25
 
 
26
import com.netscape.admin.dirserv.panel.LDAPAddPanel;
 
27
import com.netscape.admin.dirserv.panel.SimpleDialog;
 
28
import com.netscape.admin.dirserv.IDSModel;
 
29
import com.netscape.admin.dirserv.*;
 
30
import com.netscape.management.client.util.Debug;
 
31
/**
 
32
 *      Netscape Directory Server 4.0 task for setting up keys & certificates
 
33
 *
 
34
 * @author  rweltman
 
35
 * @version %I%, %G%
 
36
 * @date                9/15/97
 
37
 * @see     com.netscape.admin.dirserv.DSAdmin
 
38
 */
 
39
public class CompleteImport extends TaskObject {
 
40
        /**
 
41
         *      Constructor for the KeyCert Directory Task
 
42
         */
 
43
        public CompleteImport() {
 
44
                super();
 
45
                setName(DSUtil._resource.getString("dirtask","Import-title"));
 
46
                setDescription(DSUtil._resource.getString(
 
47
                        "dirtask","Import-description"));
 
48
        }
 
49
 
 
50
        /**
 
51
         * Call the frame work class.
 
52
         *
 
53
         * @param viewInstance The calling page
 
54
         */
 
55
        public boolean run(IPage viewInstance) {
 
56
                databaseImport();
 
57
                return true;
 
58
        }
 
59
 
 
60
        private void databaseImport() {         
 
61
                IDSModel model =
 
62
                        (IDSModel)getConsoleInfo().get( "dsresmodel" );
 
63
                LDAPAddPanel child = new LDAPAddPanel(model);
 
64
                
 
65
                SimpleDialog dlg = new SimpleDialog( model.getFrame(),
 
66
                                                                                         child.getTitle(),
 
67
                                                                                         SimpleDialog.OK |
 
68
                                                                                         SimpleDialog.CANCEL |
 
69
                                                                                         SimpleDialog.HELP,
 
70
                                                                                         child );
 
71
                dlg.setComponent( child );
 
72
                dlg.setOKButtonEnabled( false );
 
73
                dlg.setDefaultButton( SimpleDialog.OK );
 
74
 
 
75
                dlg.packAndShow();
 
76
 
 
77
                dlg = null;             
 
78
    }
 
79
 
 
80
}
 
81