From ec465f362ea0c7b6e0c0905748bcdfde1b859d0f Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 09 Feb 2007 21:51:09 +0000
Subject: [PATCH] Add an initial set of privilege support to OpenDS. The current privileges are currently defined and implemented: * config-read (allow reading the configuration) * config-write (allow updating the configuration) * ldif-import (allow invoking LDIF import tasks) * ldif-export (allow invoking LDIF export tasks) * backend-backup (allow invoking backup tasks) * backend-restore (allow invoking restore tasks) * server-shutdown (allow invoking server shutdown tasks) * server-restart (allow invoking server restart tasks) * server-restart (allow invoking server restart tasks) * password-reset (allow resetting user passwords) * update-schema (allow updating the server schema) * privilege-change (allow changing the set of privileges for a user)
---
opendj-sdk/opends/src/server/org/opends/server/backends/task/Task.java | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/backends/task/Task.java b/opendj-sdk/opends/src/server/org/opends/server/backends/task/Task.java
index f147227..e465ee4 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/backends/task/Task.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/backends/task/Task.java
@@ -40,6 +40,7 @@
import java.util.concurrent.locks.Lock;
import org.opends.server.core.DirectoryServer;
+import org.opends.server.core.Operation;
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeType;
@@ -114,6 +115,9 @@
// The time that this task was scheduled to start processing.
private long scheduledStartTime;
+ // The operation used to create this task in the server.
+ private Operation operation;
+
// The ID of the recurring task with which this task is associated.
private String recurringTaskID;
@@ -473,6 +477,40 @@
/**
+ * Retrieves the operation used to create this task in the server. Note that
+ * this will only be available when the task is first added to the scheduler,
+ * and it should only be accessed from within the {@code initializeTask}
+ * method (and even that method should not depend on it always being
+ * available, since it will not be available if the server is restarted and
+ * the task needs to be reinitialized).
+ *
+ * @return The operation used to create this task in the server, or
+ * {@code null} if it is not available.
+ */
+ public final Operation getOperation()
+ {
+ assert debugEnter(CLASS_NAME, "getOperation");
+
+ return operation;
+ }
+
+
+
+ /**
+ * Specifies the operation used to create this task in the server.
+ *
+ * @param operation The operation used to create this task in the server.
+ */
+ public final void setOperation(Operation operation)
+ {
+ assert debugEnter(CLASS_NAME, "setOperation", String.valueOf(operation));
+
+ this.operation = operation;
+ }
+
+
+
+ /**
* Retrieves the unique identifier assigned to this task.
*
* @return The unique identifier assigned to this task.
--
Gitblit v1.10.0