/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2010 Sun Microsystems, Inc.
* Portions Copyright 2014-2015 ForgeRock AS
*/
/**
* A generic data structure that contains the data that the user provided to
* schedule a task.
* <br>
* The main difference with {@link TaskScheduleInformation} is that this class
* is completely agnostic of the execution.
*/
public class TaskScheduleUserData
{
private boolean startNow;
/**
* Whether the arguments provided by the user, indicate that the task should
* be executed immediately.
* @return {@code true} if the task must be executed immediately and
* {@code false} otherwise.
*/
public boolean isStartNow()
{
return startNow;
}
/**
* Sets whether the arguments provided by the user, indicate that the task
* should be executed immediately.
* @param startNow {@code true} if the task must be executed immediately and
* {@code false} otherwise.
*/
{
}
/**
* Gets the date at which this task should be scheduled to start.
*
*/
{
return startDate;
}
/**
* Sets the date at which this task should be scheduled to start.
*
*/
{
}
/**
*
* should be scheduled.
*/
{
return recurringDateTime;
}
/**
*
* should be scheduled.
*/
{
this.recurringDateTime = recurringDateTime;
}
/**
* Gets a list of task IDs upon which this task is dependent.
*
* @return list of task IDs
*/
{
return dependencyIds;
}
/**
* Sets the list of task IDs upon which this task is dependent.
*
* @param dependencyIds list of task IDs
*/
{
this.dependencyIds.clear();
}
/**
* Gets the action to take should one of the dependent task fail.
*
* @return action to take
*/
{
return failedDependencyAction;
}
/**
* Sets the action to take should one of the dependent task fail.
*
* @param failedDependencyAction the action to take
*/
public void setFailedDependencyAction(
{
}
/**
* Gets a list of email address to which an email will be sent when this
* task completes.
*
* @return list of email addresses
*/
{
}
/**
* Sets the list of email address to which an email will be sent when this
* task completes.
*
* @param notifyUponCompletionEmailAddresses the list of email addresses
*/
public void setNotifyUponCompletionEmailAddresses(
{
}
/**
* Gets the list of email address to which an email will be sent if this
* task encounters an error during execution.
*
* @return list of email addresses
*/
{
return notifyUponErrorEmailAddresses;
}
/**
* Sets the list of email address to which an email will be sent if this
* task encounters an error during execution.
*
* @param notifyUponErrorEmailAddresses the list of email addresses
*/
public void setNotifyUponErrorEmailAddresses(
{
this.notifyUponErrorEmailAddresses.clear();
}
/**
* An static utility method that can be used to update the object used to
* display the equivalent command-line with the contents of a given
* task schedule object.
* @param commandBuilder the command builder.
* @param taskSchedule the task schedule.
*/
public static void updateCommandBuilderWithTaskSchedule(
{
if (!taskSchedule.isStartNow())
{
{
}
}
{
}
{
{
}
}
{
{
values[i]));
}
}
}
{
try
{
}
catch (ArgumentException e)
{
// This is a bug.
throw new RuntimeException("Unexpected error: "+e, e);
}
{
}
return arg;
}
}