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
010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 * Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 * Copyright 2008 Sun Microsystems, Inc.
026 */
027
028 package org.opends.server.tools.tasks;
029
030 import org.opends.server.types.RawAttribute;
031 import org.opends.server.backends.task.FailedDependencyAction;
032
033 import java.util.List;
034 import java.util.Date;
035
036 /**
037 * Interface for tools that are capable of scheduling a task remotely
038 * through the task backend.
039 *
040 * @see TaskClient
041 */
042 public interface TaskScheduleInformation {
043
044
045 /**
046 * Adds utility specific attributes to <code>attributes</code> for
047 * population of the entry that is added to the task backend.
048 *
049 * @param attributes that will be added to the task backend
050 */
051 void addTaskAttributes(List<RawAttribute> attributes);
052
053
054 /**
055 * Gets the objectclass used to represent scheduled instances of this
056 * utility in the task backend.
057 *
058 * @return String representation of this utilities objectclass
059 */
060 String getTaskObjectclass();
061
062
063 /**
064 * Gets the Class that implements the utility to execute.
065 *
066 * @return class of the tasks implementation
067 */
068 Class getTaskClass();
069
070
071 /**
072 * Gets the date at which this task should be scheduled to start.
073 *
074 * @return date/time at which the task should be scheduled
075 */
076 Date getStartDateTime();
077
078
079 /**
080 * Gets a list of task IDs upon which this task is dependent.
081 *
082 * @return list of task IDs
083 */
084 List<String> getDependencyIds();
085
086
087 /**
088 * Gets the action to take should one of the dependent task fail.
089 *
090 * @return action to take
091 */
092 FailedDependencyAction getFailedDependencyAction();
093
094
095 /**
096 * Gets a list of email address to which an email will be sent when this
097 * task completes.
098 *
099 * @return list of email addresses
100 */
101 List<String> getNotifyUponCompletionEmailAddresses();
102
103
104 /**
105 * Gets a list of email address to which an email will be sent if this
106 * task encounters an error during execution.
107 *
108 * @return list of email addresses
109 */
110 List<String> getNotifyUponErrorEmailAddresses();
111
112
113 }