001/* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2008-2009 Sun Microsystems, Inc. 025 * Portions Copyright 2014-2015 ForgeRock AS 026 */ 027 028package org.opends.guitools.controlpanel.task; 029 030import static org.opends.messages.AdminToolMessages.*; 031 032import java.util.ArrayList; 033 034import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; 035import org.opends.guitools.controlpanel.ui.ProgressDialog; 036import org.forgerock.i18n.LocalizableMessage; 037 038/** 039 * The task called when we want to start the server. 040 * 041 */ 042public class StartServerTask extends StartStopTask 043{ 044 045 /** 046 * Constructor of the task. 047 * @param info the control panel information. 048 * @param dlg the progress dialog where the task progress will be displayed. 049 */ 050 public StartServerTask(ControlPanelInfo info, ProgressDialog dlg) 051 { 052 super(info, dlg); 053 } 054 055 /** {@inheritDoc} */ 056 public Type getType() 057 { 058 return Type.START_SERVER; 059 } 060 061 /** {@inheritDoc} */ 062 public LocalizableMessage getTaskDescription() 063 { 064 return INFO_CTRL_PANEL_START_SERVER_TASK_DESCRIPTION.get(); 065 } 066 067 /** {@inheritDoc} */ 068 protected String getCommandLinePath() 069 { 070 return getCommandLinePath("start-ds"); 071 } 072 073 /** {@inheritDoc} */ 074 protected ArrayList<String> getCommandLineArguments() 075 { 076 ArrayList<String> args = new ArrayList<>(); 077 args.add("--timeout"); 078 args.add("0"); 079 return args; 080 } 081}