| | |
| | | if (saslOption.isPresent()) |
| | | { |
| | | String mechanism = null; |
| | | LinkedList<String> options = new LinkedList<String>(); |
| | | LinkedList<String> options = new LinkedList<>(); |
| | | |
| | | for (String s : saslOption.getValues()) |
| | | { |
| | |
| | | ByteString.valueOf(ATTR_TASK_ID + "=" + taskID + "," + |
| | | SCHEDULED_TASK_BASE_RDN + "," + DN_TASK_ROOT); |
| | | |
| | | ArrayList<RawAttribute> attributes = new ArrayList<RawAttribute>(); |
| | | ArrayList<RawAttribute> attributes = new ArrayList<>(); |
| | | |
| | | ArrayList<ByteString> ocValues = new ArrayList<ByteString>(3); |
| | | ArrayList<ByteString> ocValues = new ArrayList<>(3); |
| | | ocValues.add(ByteString.valueOf("top")); |
| | | ocValues.add(ByteString.valueOf("ds-task")); |
| | | ocValues.add(ByteString.valueOf("ds-task-shutdown")); |
| | | attributes.add(new LDAPAttribute(ATTR_OBJECTCLASS, ocValues)); |
| | | |
| | | ArrayList<ByteString> taskIDValues = new ArrayList<ByteString>(1); |
| | | ArrayList<ByteString> taskIDValues = new ArrayList<>(1); |
| | | taskIDValues.add(ByteString.valueOf(taskID)); |
| | | attributes.add(new LDAPAttribute(ATTR_TASK_ID, taskIDValues)); |
| | | |
| | | ArrayList<ByteString> classValues = new ArrayList<ByteString>(1); |
| | | ArrayList<ByteString> classValues = new ArrayList<>(1); |
| | | classValues.add(ByteString.valueOf(ShutdownTask.class.getName())); |
| | | attributes.add(new LDAPAttribute(ATTR_TASK_CLASS, classValues)); |
| | | |
| | | if (restart.isPresent()) |
| | | { |
| | | ArrayList<ByteString> restartValues = |
| | | new ArrayList<ByteString>(1); |
| | | ArrayList<ByteString> restartValues = new ArrayList<>(1); |
| | | restartValues.add(ByteString.valueOf("true")); |
| | | attributes.add(new LDAPAttribute(ATTR_RESTART_SERVER, restartValues)); |
| | | } |
| | | |
| | | if (stopReason.isPresent()) |
| | | { |
| | | ArrayList<ByteString> stopReasonValues = |
| | | new ArrayList<ByteString>(1); |
| | | ArrayList<ByteString> stopReasonValues = new ArrayList<>(1); |
| | | stopReasonValues.add(ByteString.valueOf(stopReason.getValue())); |
| | | attributes.add(new LDAPAttribute(ATTR_SHUTDOWN_MESSAGE, |
| | | stopReasonValues)); |
| | | attributes.add(new LDAPAttribute(ATTR_SHUTDOWN_MESSAGE, stopReasonValues)); |
| | | } |
| | | |
| | | if (stopTime != null) |
| | | { |
| | | ArrayList<ByteString> stopTimeValues = |
| | | new ArrayList<ByteString>(1); |
| | | ArrayList<ByteString> stopTimeValues = new ArrayList<>(1); |
| | | |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_GMT_TIME); |
| | | dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); |
| | |
| | | stopTimeValues)); |
| | | } |
| | | |
| | | ArrayList<Control> controls = new ArrayList<Control>(); |
| | | ArrayList<Control> controls = new ArrayList<>(); |
| | | if (proxyAuthzID.isPresent()) |
| | | { |
| | | Control c = new ProxiedAuthV2Control( |