001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2008 Sun Microsystems, Inc.
015 */
016package org.opends.server.admin.std.meta;
017
018
019
020import java.util.Collection;
021import java.util.SortedSet;
022import java.util.TreeSet;
023import org.forgerock.opendj.ldap.DN;
024import org.opends.server.admin.AdministratorAction;
025import org.opends.server.admin.AggregationPropertyDefinition;
026import org.opends.server.admin.AliasDefaultBehaviorProvider;
027import org.opends.server.admin.BooleanPropertyDefinition;
028import org.opends.server.admin.ClassPropertyDefinition;
029import org.opends.server.admin.client.AuthorizationException;
030import org.opends.server.admin.client.CommunicationException;
031import org.opends.server.admin.client.ConcurrentModificationException;
032import org.opends.server.admin.client.ManagedObject;
033import org.opends.server.admin.client.MissingMandatoryPropertiesException;
034import org.opends.server.admin.client.OperationRejectedException;
035import org.opends.server.admin.DefaultBehaviorProvider;
036import org.opends.server.admin.DefinedDefaultBehaviorProvider;
037import org.opends.server.admin.DurationPropertyDefinition;
038import org.opends.server.admin.ManagedObjectAlreadyExistsException;
039import org.opends.server.admin.ManagedObjectDefinition;
040import org.opends.server.admin.PropertyOption;
041import org.opends.server.admin.PropertyProvider;
042import org.opends.server.admin.server.ConfigurationChangeListener;
043import org.opends.server.admin.server.ServerManagedObject;
044import org.opends.server.admin.std.client.CsvFileHTTPAccessLogPublisherCfgClient;
045import org.opends.server.admin.std.client.LogRetentionPolicyCfgClient;
046import org.opends.server.admin.std.client.LogRotationPolicyCfgClient;
047import org.opends.server.admin.std.server.CsvFileHTTPAccessLogPublisherCfg;
048import org.opends.server.admin.std.server.HTTPAccessLogPublisherCfg;
049import org.opends.server.admin.std.server.LogPublisherCfg;
050import org.opends.server.admin.std.server.LogRetentionPolicyCfg;
051import org.opends.server.admin.std.server.LogRotationPolicyCfg;
052import org.opends.server.admin.StringPropertyDefinition;
053import org.opends.server.admin.Tag;
054import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
055
056
057
058/**
059 * An interface for querying the Csv File HTTP Access Log Publisher
060 * managed object definition meta information.
061 * <p>
062 * Csv File HTTP Access Log Publishers publish HTTP access messages to
063 * CSV files.
064 */
065public final class CsvFileHTTPAccessLogPublisherCfgDefn extends ManagedObjectDefinition<CsvFileHTTPAccessLogPublisherCfgClient, CsvFileHTTPAccessLogPublisherCfg> {
066
067  // The singleton configuration definition instance.
068  private static final CsvFileHTTPAccessLogPublisherCfgDefn INSTANCE = new CsvFileHTTPAccessLogPublisherCfgDefn();
069
070
071
072  // The "asynchronous" property definition.
073  private static final BooleanPropertyDefinition PD_ASYNCHRONOUS;
074
075
076
077  // The "auto-flush" property definition.
078  private static final BooleanPropertyDefinition PD_AUTO_FLUSH;
079
080
081
082  // The "csv-delimiter-char" property definition.
083  private static final StringPropertyDefinition PD_CSV_DELIMITER_CHAR;
084
085
086
087  // The "csv-eol-symbols" property definition.
088  private static final StringPropertyDefinition PD_CSV_EOL_SYMBOLS;
089
090
091
092  // The "csv-quote-char" property definition.
093  private static final StringPropertyDefinition PD_CSV_QUOTE_CHAR;
094
095
096
097  // The "java-class" property definition.
098  private static final ClassPropertyDefinition PD_JAVA_CLASS;
099
100
101
102  // The "key-store-file" property definition.
103  private static final StringPropertyDefinition PD_KEY_STORE_FILE;
104
105
106
107  // The "key-store-pin-file" property definition.
108  private static final StringPropertyDefinition PD_KEY_STORE_PIN_FILE;
109
110
111
112  // The "log-directory" property definition.
113  private static final StringPropertyDefinition PD_LOG_DIRECTORY;
114
115
116
117  // The "retention-policy" property definition.
118  private static final AggregationPropertyDefinition<LogRetentionPolicyCfgClient, LogRetentionPolicyCfg> PD_RETENTION_POLICY;
119
120
121
122  // The "rotation-policy" property definition.
123  private static final AggregationPropertyDefinition<LogRotationPolicyCfgClient, LogRotationPolicyCfg> PD_ROTATION_POLICY;
124
125
126
127  // The "signature-time-interval" property definition.
128  private static final DurationPropertyDefinition PD_SIGNATURE_TIME_INTERVAL;
129
130
131
132  // The "tamper-evident" property definition.
133  private static final BooleanPropertyDefinition PD_TAMPER_EVIDENT;
134
135
136
137  // Build the "asynchronous" property definition.
138  static {
139      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "asynchronous");
140      builder.setOption(PropertyOption.MANDATORY);
141      builder.setOption(PropertyOption.ADVANCED);
142      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "asynchronous"));
143      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true");
144      builder.setDefaultBehaviorProvider(provider);
145      PD_ASYNCHRONOUS = builder.getInstance();
146      INSTANCE.registerPropertyDefinition(PD_ASYNCHRONOUS);
147  }
148
149
150
151  // Build the "auto-flush" property definition.
152  static {
153      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "auto-flush");
154      builder.setOption(PropertyOption.ADVANCED);
155      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "auto-flush"));
156      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true");
157      builder.setDefaultBehaviorProvider(provider);
158      PD_AUTO_FLUSH = builder.getInstance();
159      INSTANCE.registerPropertyDefinition(PD_AUTO_FLUSH);
160  }
161
162
163
164  // Build the "csv-delimiter-char" property definition.
165  static {
166      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "csv-delimiter-char");
167      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "csv-delimiter-char"));
168      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>(",");
169      builder.setDefaultBehaviorProvider(provider);
170      builder.setPattern(".*", "DELIMITER CHARACTER");
171      PD_CSV_DELIMITER_CHAR = builder.getInstance();
172      INSTANCE.registerPropertyDefinition(PD_CSV_DELIMITER_CHAR);
173  }
174
175
176
177  // Build the "csv-eol-symbols" property definition.
178  static {
179      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "csv-eol-symbols");
180      builder.setOption(PropertyOption.ADVANCED);
181      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "csv-eol-symbols"));
182      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "csv-eol-symbols"));
183      builder.setPattern(".*", "EOL SYMBOLS");
184      PD_CSV_EOL_SYMBOLS = builder.getInstance();
185      INSTANCE.registerPropertyDefinition(PD_CSV_EOL_SYMBOLS);
186  }
187
188
189
190  // Build the "csv-quote-char" property definition.
191  static {
192      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "csv-quote-char");
193      builder.setOption(PropertyOption.ADVANCED);
194      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "csv-quote-char"));
195      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("\"");
196      builder.setDefaultBehaviorProvider(provider);
197      builder.setPattern(".*", "QUOTE CHARACTER");
198      PD_CSV_QUOTE_CHAR = builder.getInstance();
199      INSTANCE.registerPropertyDefinition(PD_CSV_QUOTE_CHAR);
200  }
201
202
203
204  // Build the "java-class" property definition.
205  static {
206      ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class");
207      builder.setOption(PropertyOption.MANDATORY);
208      builder.setOption(PropertyOption.ADVANCED);
209      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "java-class"));
210      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.loggers.CommonAuditHTTPAccessLogPublisher");
211      builder.setDefaultBehaviorProvider(provider);
212      builder.addInstanceOf("org.opends.server.loggers.LogPublisher");
213      PD_JAVA_CLASS = builder.getInstance();
214      INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS);
215  }
216
217
218
219  // Build the "key-store-file" property definition.
220  static {
221      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "key-store-file");
222      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "key-store-file"));
223      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
224      builder.setPattern(".*", "FILE");
225      PD_KEY_STORE_FILE = builder.getInstance();
226      INSTANCE.registerPropertyDefinition(PD_KEY_STORE_FILE);
227  }
228
229
230
231  // Build the "key-store-pin-file" property definition.
232  static {
233      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "key-store-pin-file");
234      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "key-store-pin-file"));
235      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
236      builder.setPattern(".*", "FILE");
237      PD_KEY_STORE_PIN_FILE = builder.getInstance();
238      INSTANCE.registerPropertyDefinition(PD_KEY_STORE_PIN_FILE);
239  }
240
241
242
243  // Build the "log-directory" property definition.
244  static {
245      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "log-directory");
246      builder.setOption(PropertyOption.MANDATORY);
247      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "log-directory"));
248      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("logs");
249      builder.setDefaultBehaviorProvider(provider);
250      builder.setPattern(".*", "DIRECTORY");
251      PD_LOG_DIRECTORY = builder.getInstance();
252      INSTANCE.registerPropertyDefinition(PD_LOG_DIRECTORY);
253  }
254
255
256
257  // Build the "retention-policy" property definition.
258  static {
259      AggregationPropertyDefinition.Builder<LogRetentionPolicyCfgClient, LogRetentionPolicyCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "retention-policy");
260      builder.setOption(PropertyOption.MULTI_VALUED);
261      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "retention-policy"));
262      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "retention-policy"));
263      builder.setParentPath("/");
264      builder.setRelationDefinition("log-retention-policy");
265      PD_RETENTION_POLICY = builder.getInstance();
266      INSTANCE.registerPropertyDefinition(PD_RETENTION_POLICY);
267      INSTANCE.registerConstraint(PD_RETENTION_POLICY.getSourceConstraint());
268  }
269
270
271
272  // Build the "rotation-policy" property definition.
273  static {
274      AggregationPropertyDefinition.Builder<LogRotationPolicyCfgClient, LogRotationPolicyCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "rotation-policy");
275      builder.setOption(PropertyOption.MULTI_VALUED);
276      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "rotation-policy"));
277      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "rotation-policy"));
278      builder.setParentPath("/");
279      builder.setRelationDefinition("log-rotation-policy");
280      PD_ROTATION_POLICY = builder.getInstance();
281      INSTANCE.registerPropertyDefinition(PD_ROTATION_POLICY);
282      INSTANCE.registerConstraint(PD_ROTATION_POLICY.getSourceConstraint());
283  }
284
285
286
287  // Build the "signature-time-interval" property definition.
288  static {
289      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "signature-time-interval");
290      builder.setOption(PropertyOption.ADVANCED);
291      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "signature-time-interval"));
292      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("3s");
293      builder.setDefaultBehaviorProvider(provider);
294      builder.setBaseUnit("ms");
295      builder.setLowerLimit("1");
296      PD_SIGNATURE_TIME_INTERVAL = builder.getInstance();
297      INSTANCE.registerPropertyDefinition(PD_SIGNATURE_TIME_INTERVAL);
298  }
299
300
301
302  // Build the "tamper-evident" property definition.
303  static {
304      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "tamper-evident");
305      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "tamper-evident"));
306      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
307      builder.setDefaultBehaviorProvider(provider);
308      PD_TAMPER_EVIDENT = builder.getInstance();
309      INSTANCE.registerPropertyDefinition(PD_TAMPER_EVIDENT);
310  }
311
312
313
314  // Register the tags associated with this managed object definition.
315  static {
316    INSTANCE.registerTag(Tag.valueOf("logging"));
317  }
318
319
320
321  /**
322   * Get the Csv File HTTP Access Log Publisher configuration
323   * definition singleton.
324   *
325   * @return Returns the Csv File HTTP Access Log Publisher
326   *         configuration definition singleton.
327   */
328  public static CsvFileHTTPAccessLogPublisherCfgDefn getInstance() {
329    return INSTANCE;
330  }
331
332
333
334  /**
335   * Private constructor.
336   */
337  private CsvFileHTTPAccessLogPublisherCfgDefn() {
338    super("csv-file-http-access-log-publisher", HTTPAccessLogPublisherCfgDefn.getInstance());
339  }
340
341
342
343  /**
344   * {@inheritDoc}
345   */
346  public CsvFileHTTPAccessLogPublisherCfgClient createClientConfiguration(
347      ManagedObject<? extends CsvFileHTTPAccessLogPublisherCfgClient> impl) {
348    return new CsvFileHTTPAccessLogPublisherCfgClientImpl(impl);
349  }
350
351
352
353  /**
354   * {@inheritDoc}
355   */
356  public CsvFileHTTPAccessLogPublisherCfg createServerConfiguration(
357      ServerManagedObject<? extends CsvFileHTTPAccessLogPublisherCfg> impl) {
358    return new CsvFileHTTPAccessLogPublisherCfgServerImpl(impl);
359  }
360
361
362
363  /**
364   * {@inheritDoc}
365   */
366  public Class<CsvFileHTTPAccessLogPublisherCfg> getServerConfigurationClass() {
367    return CsvFileHTTPAccessLogPublisherCfg.class;
368  }
369
370
371
372  /**
373   * Get the "asynchronous" property definition.
374   * <p>
375   * Indicates whether the Csv File HTTP Access Log Publisher will
376   * publish records asynchronously.
377   *
378   * @return Returns the "asynchronous" property definition.
379   */
380  public BooleanPropertyDefinition getAsynchronousPropertyDefinition() {
381    return PD_ASYNCHRONOUS;
382  }
383
384
385
386  /**
387   * Get the "auto-flush" property definition.
388   * <p>
389   * Specifies whether to flush the writer after every log record.
390   * <p>
391   * If the asynchronous writes option is used, the writer is flushed
392   * after all the log records in the queue are written.
393   *
394   * @return Returns the "auto-flush" property definition.
395   */
396  public BooleanPropertyDefinition getAutoFlushPropertyDefinition() {
397    return PD_AUTO_FLUSH;
398  }
399
400
401
402  /**
403   * Get the "csv-delimiter-char" property definition.
404   * <p>
405   * The delimiter character to use when writing in CSV format.
406   *
407   * @return Returns the "csv-delimiter-char" property definition.
408   */
409  public StringPropertyDefinition getCsvDelimiterCharPropertyDefinition() {
410    return PD_CSV_DELIMITER_CHAR;
411  }
412
413
414
415  /**
416   * Get the "csv-eol-symbols" property definition.
417   * <p>
418   * The string that marks the end of a line.
419   *
420   * @return Returns the "csv-eol-symbols" property definition.
421   */
422  public StringPropertyDefinition getCsvEolSymbolsPropertyDefinition() {
423    return PD_CSV_EOL_SYMBOLS;
424  }
425
426
427
428  /**
429   * Get the "csv-quote-char" property definition.
430   * <p>
431   * The character to append and prepend to a CSV field when writing
432   * in CSV format.
433   *
434   * @return Returns the "csv-quote-char" property definition.
435   */
436  public StringPropertyDefinition getCsvQuoteCharPropertyDefinition() {
437    return PD_CSV_QUOTE_CHAR;
438  }
439
440
441
442  /**
443   * Get the "enabled" property definition.
444   * <p>
445   * Indicates whether the Csv File HTTP Access Log Publisher is
446   * enabled for use.
447   *
448   * @return Returns the "enabled" property definition.
449   */
450  public BooleanPropertyDefinition getEnabledPropertyDefinition() {
451    return HTTPAccessLogPublisherCfgDefn.getInstance().getEnabledPropertyDefinition();
452  }
453
454
455
456  /**
457   * Get the "java-class" property definition.
458   * <p>
459   * The fully-qualified name of the Java class that provides the Csv
460   * File HTTP Access Log Publisher implementation.
461   *
462   * @return Returns the "java-class" property definition.
463   */
464  public ClassPropertyDefinition getJavaClassPropertyDefinition() {
465    return PD_JAVA_CLASS;
466  }
467
468
469
470  /**
471   * Get the "key-store-file" property definition.
472   * <p>
473   * Specifies the path to the file that contains the private key
474   * information. This may be an absolute path, or a path that is
475   * relative to the OpenDJ instance root.
476   * <p>
477   * Changes to this property will take effect the next time that the
478   * key store is accessed.
479   *
480   * @return Returns the "key-store-file" property definition.
481   */
482  public StringPropertyDefinition getKeyStoreFilePropertyDefinition() {
483    return PD_KEY_STORE_FILE;
484  }
485
486
487
488  /**
489   * Get the "key-store-pin-file" property definition.
490   * <p>
491   * Specifies the path to the text file whose only contents should be
492   * a single line containing the clear-text PIN needed to access the
493   * Csv File HTTP Access Log Publisher .
494   *
495   * @return Returns the "key-store-pin-file" property definition.
496   */
497  public StringPropertyDefinition getKeyStorePinFilePropertyDefinition() {
498    return PD_KEY_STORE_PIN_FILE;
499  }
500
501
502
503  /**
504   * Get the "log-directory" property definition.
505   * <p>
506   * The directory to use for the log files generated by the Csv File
507   * HTTP Access Log Publisher. The path to the directory is relative
508   * to the server root.
509   *
510   * @return Returns the "log-directory" property definition.
511   */
512  public StringPropertyDefinition getLogDirectoryPropertyDefinition() {
513    return PD_LOG_DIRECTORY;
514  }
515
516
517
518  /**
519   * Get the "retention-policy" property definition.
520   * <p>
521   * The retention policy to use for the Csv File HTTP Access Log
522   * Publisher .
523   * <p>
524   * When multiple policies are used, log files are cleaned when any
525   * of the policy's conditions are met.
526   *
527   * @return Returns the "retention-policy" property definition.
528   */
529  public AggregationPropertyDefinition<LogRetentionPolicyCfgClient, LogRetentionPolicyCfg> getRetentionPolicyPropertyDefinition() {
530    return PD_RETENTION_POLICY;
531  }
532
533
534
535  /**
536   * Get the "rotation-policy" property definition.
537   * <p>
538   * The rotation policy to use for the Csv File HTTP Access Log
539   * Publisher .
540   * <p>
541   * When multiple policies are used, rotation will occur if any
542   * policy's conditions are met.
543   *
544   * @return Returns the "rotation-policy" property definition.
545   */
546  public AggregationPropertyDefinition<LogRotationPolicyCfgClient, LogRotationPolicyCfg> getRotationPolicyPropertyDefinition() {
547    return PD_ROTATION_POLICY;
548  }
549
550
551
552  /**
553   * Get the "signature-time-interval" property definition.
554   * <p>
555   * Specifies the interval at which to sign the log file when secure
556   * option is enabled.
557   *
558   * @return Returns the "signature-time-interval" property definition.
559   */
560  public DurationPropertyDefinition getSignatureTimeIntervalPropertyDefinition() {
561    return PD_SIGNATURE_TIME_INTERVAL;
562  }
563
564
565
566  /**
567   * Get the "tamper-evident" property definition.
568   * <p>
569   * Specifies whether the log should be signed in order to detect
570   * tampering.
571   * <p>
572   * Every log record will be signed, making it possible to verify
573   * that the log has not been tampered with. This feature has a
574   * significative impact on performance of the server.
575   *
576   * @return Returns the "tamper-evident" property definition.
577   */
578  public BooleanPropertyDefinition getTamperEvidentPropertyDefinition() {
579    return PD_TAMPER_EVIDENT;
580  }
581
582
583
584  /**
585   * Managed object client implementation.
586   */
587  private static class CsvFileHTTPAccessLogPublisherCfgClientImpl implements
588    CsvFileHTTPAccessLogPublisherCfgClient {
589
590    // Private implementation.
591    private ManagedObject<? extends CsvFileHTTPAccessLogPublisherCfgClient> impl;
592
593
594
595    // Private constructor.
596    private CsvFileHTTPAccessLogPublisherCfgClientImpl(
597        ManagedObject<? extends CsvFileHTTPAccessLogPublisherCfgClient> impl) {
598      this.impl = impl;
599    }
600
601
602
603    /**
604     * {@inheritDoc}
605     */
606    public boolean isAsynchronous() {
607      return impl.getPropertyValue(INSTANCE.getAsynchronousPropertyDefinition());
608    }
609
610
611
612    /**
613     * {@inheritDoc}
614     */
615    public void setAsynchronous(boolean value) {
616      impl.setPropertyValue(INSTANCE.getAsynchronousPropertyDefinition(), value);
617    }
618
619
620
621    /**
622     * {@inheritDoc}
623     */
624    public boolean isAutoFlush() {
625      return impl.getPropertyValue(INSTANCE.getAutoFlushPropertyDefinition());
626    }
627
628
629
630    /**
631     * {@inheritDoc}
632     */
633    public void setAutoFlush(Boolean value) {
634      impl.setPropertyValue(INSTANCE.getAutoFlushPropertyDefinition(), value);
635    }
636
637
638
639    /**
640     * {@inheritDoc}
641     */
642    public String getCsvDelimiterChar() {
643      return impl.getPropertyValue(INSTANCE.getCsvDelimiterCharPropertyDefinition());
644    }
645
646
647
648    /**
649     * {@inheritDoc}
650     */
651    public void setCsvDelimiterChar(String value) {
652      impl.setPropertyValue(INSTANCE.getCsvDelimiterCharPropertyDefinition(), value);
653    }
654
655
656
657    /**
658     * {@inheritDoc}
659     */
660    public String getCsvEolSymbols() {
661      return impl.getPropertyValue(INSTANCE.getCsvEolSymbolsPropertyDefinition());
662    }
663
664
665
666    /**
667     * {@inheritDoc}
668     */
669    public void setCsvEolSymbols(String value) {
670      impl.setPropertyValue(INSTANCE.getCsvEolSymbolsPropertyDefinition(), value);
671    }
672
673
674
675    /**
676     * {@inheritDoc}
677     */
678    public String getCsvQuoteChar() {
679      return impl.getPropertyValue(INSTANCE.getCsvQuoteCharPropertyDefinition());
680    }
681
682
683
684    /**
685     * {@inheritDoc}
686     */
687    public void setCsvQuoteChar(String value) {
688      impl.setPropertyValue(INSTANCE.getCsvQuoteCharPropertyDefinition(), value);
689    }
690
691
692
693    /**
694     * {@inheritDoc}
695     */
696    public Boolean isEnabled() {
697      return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
698    }
699
700
701
702    /**
703     * {@inheritDoc}
704     */
705    public void setEnabled(boolean value) {
706      impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value);
707    }
708
709
710
711    /**
712     * {@inheritDoc}
713     */
714    public String getJavaClass() {
715      return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
716    }
717
718
719
720    /**
721     * {@inheritDoc}
722     */
723    public void setJavaClass(String value) {
724      impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value);
725    }
726
727
728
729    /**
730     * {@inheritDoc}
731     */
732    public String getKeyStoreFile() {
733      return impl.getPropertyValue(INSTANCE.getKeyStoreFilePropertyDefinition());
734    }
735
736
737
738    /**
739     * {@inheritDoc}
740     */
741    public void setKeyStoreFile(String value) {
742      impl.setPropertyValue(INSTANCE.getKeyStoreFilePropertyDefinition(), value);
743    }
744
745
746
747    /**
748     * {@inheritDoc}
749     */
750    public String getKeyStorePinFile() {
751      return impl.getPropertyValue(INSTANCE.getKeyStorePinFilePropertyDefinition());
752    }
753
754
755
756    /**
757     * {@inheritDoc}
758     */
759    public void setKeyStorePinFile(String value) {
760      impl.setPropertyValue(INSTANCE.getKeyStorePinFilePropertyDefinition(), value);
761    }
762
763
764
765    /**
766     * {@inheritDoc}
767     */
768    public String getLogDirectory() {
769      return impl.getPropertyValue(INSTANCE.getLogDirectoryPropertyDefinition());
770    }
771
772
773
774    /**
775     * {@inheritDoc}
776     */
777    public void setLogDirectory(String value) {
778      impl.setPropertyValue(INSTANCE.getLogDirectoryPropertyDefinition(), value);
779    }
780
781
782
783    /**
784     * {@inheritDoc}
785     */
786    public SortedSet<String> getRetentionPolicy() {
787      return impl.getPropertyValues(INSTANCE.getRetentionPolicyPropertyDefinition());
788    }
789
790
791
792    /**
793     * {@inheritDoc}
794     */
795    public void setRetentionPolicy(Collection<String> values) {
796      impl.setPropertyValues(INSTANCE.getRetentionPolicyPropertyDefinition(), values);
797    }
798
799
800
801    /**
802     * {@inheritDoc}
803     */
804    public SortedSet<String> getRotationPolicy() {
805      return impl.getPropertyValues(INSTANCE.getRotationPolicyPropertyDefinition());
806    }
807
808
809
810    /**
811     * {@inheritDoc}
812     */
813    public void setRotationPolicy(Collection<String> values) {
814      impl.setPropertyValues(INSTANCE.getRotationPolicyPropertyDefinition(), values);
815    }
816
817
818
819    /**
820     * {@inheritDoc}
821     */
822    public long getSignatureTimeInterval() {
823      return impl.getPropertyValue(INSTANCE.getSignatureTimeIntervalPropertyDefinition());
824    }
825
826
827
828    /**
829     * {@inheritDoc}
830     */
831    public void setSignatureTimeInterval(Long value) {
832      impl.setPropertyValue(INSTANCE.getSignatureTimeIntervalPropertyDefinition(), value);
833    }
834
835
836
837    /**
838     * {@inheritDoc}
839     */
840    public boolean isTamperEvident() {
841      return impl.getPropertyValue(INSTANCE.getTamperEvidentPropertyDefinition());
842    }
843
844
845
846    /**
847     * {@inheritDoc}
848     */
849    public void setTamperEvident(Boolean value) {
850      impl.setPropertyValue(INSTANCE.getTamperEvidentPropertyDefinition(), value);
851    }
852
853
854
855    /**
856     * {@inheritDoc}
857     */
858    public ManagedObjectDefinition<? extends CsvFileHTTPAccessLogPublisherCfgClient, ? extends CsvFileHTTPAccessLogPublisherCfg> definition() {
859      return INSTANCE;
860    }
861
862
863
864    /**
865     * {@inheritDoc}
866     */
867    public PropertyProvider properties() {
868      return impl;
869    }
870
871
872
873    /**
874     * {@inheritDoc}
875     */
876    public void commit() throws ManagedObjectAlreadyExistsException,
877        MissingMandatoryPropertiesException, ConcurrentModificationException,
878        OperationRejectedException, AuthorizationException,
879        CommunicationException {
880      impl.commit();
881    }
882
883
884
885    /** {@inheritDoc} */
886    public String toString() {
887      return impl.toString();
888    }
889  }
890
891
892
893  /**
894   * Managed object server implementation.
895   */
896  private static class CsvFileHTTPAccessLogPublisherCfgServerImpl implements
897    CsvFileHTTPAccessLogPublisherCfg {
898
899    // Private implementation.
900    private ServerManagedObject<? extends CsvFileHTTPAccessLogPublisherCfg> impl;
901
902    // The value of the "asynchronous" property.
903    private final boolean pAsynchronous;
904
905    // The value of the "auto-flush" property.
906    private final boolean pAutoFlush;
907
908    // The value of the "csv-delimiter-char" property.
909    private final String pCsvDelimiterChar;
910
911    // The value of the "csv-eol-symbols" property.
912    private final String pCsvEolSymbols;
913
914    // The value of the "csv-quote-char" property.
915    private final String pCsvQuoteChar;
916
917    // The value of the "enabled" property.
918    private final boolean pEnabled;
919
920    // The value of the "java-class" property.
921    private final String pJavaClass;
922
923    // The value of the "key-store-file" property.
924    private final String pKeyStoreFile;
925
926    // The value of the "key-store-pin-file" property.
927    private final String pKeyStorePinFile;
928
929    // The value of the "log-directory" property.
930    private final String pLogDirectory;
931
932    // The value of the "retention-policy" property.
933    private final SortedSet<String> pRetentionPolicy;
934
935    // The value of the "rotation-policy" property.
936    private final SortedSet<String> pRotationPolicy;
937
938    // The value of the "signature-time-interval" property.
939    private final long pSignatureTimeInterval;
940
941    // The value of the "tamper-evident" property.
942    private final boolean pTamperEvident;
943
944
945
946    // Private constructor.
947    private CsvFileHTTPAccessLogPublisherCfgServerImpl(ServerManagedObject<? extends CsvFileHTTPAccessLogPublisherCfg> impl) {
948      this.impl = impl;
949      this.pAsynchronous = impl.getPropertyValue(INSTANCE.getAsynchronousPropertyDefinition());
950      this.pAutoFlush = impl.getPropertyValue(INSTANCE.getAutoFlushPropertyDefinition());
951      this.pCsvDelimiterChar = impl.getPropertyValue(INSTANCE.getCsvDelimiterCharPropertyDefinition());
952      this.pCsvEolSymbols = impl.getPropertyValue(INSTANCE.getCsvEolSymbolsPropertyDefinition());
953      this.pCsvQuoteChar = impl.getPropertyValue(INSTANCE.getCsvQuoteCharPropertyDefinition());
954      this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
955      this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
956      this.pKeyStoreFile = impl.getPropertyValue(INSTANCE.getKeyStoreFilePropertyDefinition());
957      this.pKeyStorePinFile = impl.getPropertyValue(INSTANCE.getKeyStorePinFilePropertyDefinition());
958      this.pLogDirectory = impl.getPropertyValue(INSTANCE.getLogDirectoryPropertyDefinition());
959      this.pRetentionPolicy = impl.getPropertyValues(INSTANCE.getRetentionPolicyPropertyDefinition());
960      this.pRotationPolicy = impl.getPropertyValues(INSTANCE.getRotationPolicyPropertyDefinition());
961      this.pSignatureTimeInterval = impl.getPropertyValue(INSTANCE.getSignatureTimeIntervalPropertyDefinition());
962      this.pTamperEvident = impl.getPropertyValue(INSTANCE.getTamperEvidentPropertyDefinition());
963    }
964
965
966
967    /**
968     * {@inheritDoc}
969     */
970    public void addCsvFileHTTPAccessChangeListener(
971        ConfigurationChangeListener<CsvFileHTTPAccessLogPublisherCfg> listener) {
972      impl.registerChangeListener(listener);
973    }
974
975
976
977    /**
978     * {@inheritDoc}
979     */
980    public void removeCsvFileHTTPAccessChangeListener(
981        ConfigurationChangeListener<CsvFileHTTPAccessLogPublisherCfg> listener) {
982      impl.deregisterChangeListener(listener);
983    }
984    /**
985     * {@inheritDoc}
986     */
987    public void addHTTPAccessChangeListener(
988        ConfigurationChangeListener<HTTPAccessLogPublisherCfg> listener) {
989      impl.registerChangeListener(listener);
990    }
991
992
993
994    /**
995     * {@inheritDoc}
996     */
997    public void removeHTTPAccessChangeListener(
998        ConfigurationChangeListener<HTTPAccessLogPublisherCfg> listener) {
999      impl.deregisterChangeListener(listener);
1000    }
1001    /**
1002     * {@inheritDoc}
1003     */
1004    public void addChangeListener(
1005        ConfigurationChangeListener<LogPublisherCfg> listener) {
1006      impl.registerChangeListener(listener);
1007    }
1008
1009
1010
1011    /**
1012     * {@inheritDoc}
1013     */
1014    public void removeChangeListener(
1015        ConfigurationChangeListener<LogPublisherCfg> listener) {
1016      impl.deregisterChangeListener(listener);
1017    }
1018
1019
1020
1021    /**
1022     * {@inheritDoc}
1023     */
1024    public boolean isAsynchronous() {
1025      return pAsynchronous;
1026    }
1027
1028
1029
1030    /**
1031     * {@inheritDoc}
1032     */
1033    public boolean isAutoFlush() {
1034      return pAutoFlush;
1035    }
1036
1037
1038
1039    /**
1040     * {@inheritDoc}
1041     */
1042    public String getCsvDelimiterChar() {
1043      return pCsvDelimiterChar;
1044    }
1045
1046
1047
1048    /**
1049     * {@inheritDoc}
1050     */
1051    public String getCsvEolSymbols() {
1052      return pCsvEolSymbols;
1053    }
1054
1055
1056
1057    /**
1058     * {@inheritDoc}
1059     */
1060    public String getCsvQuoteChar() {
1061      return pCsvQuoteChar;
1062    }
1063
1064
1065
1066    /**
1067     * {@inheritDoc}
1068     */
1069    public boolean isEnabled() {
1070      return pEnabled;
1071    }
1072
1073
1074
1075    /**
1076     * {@inheritDoc}
1077     */
1078    public String getJavaClass() {
1079      return pJavaClass;
1080    }
1081
1082
1083
1084    /**
1085     * {@inheritDoc}
1086     */
1087    public String getKeyStoreFile() {
1088      return pKeyStoreFile;
1089    }
1090
1091
1092
1093    /**
1094     * {@inheritDoc}
1095     */
1096    public String getKeyStorePinFile() {
1097      return pKeyStorePinFile;
1098    }
1099
1100
1101
1102    /**
1103     * {@inheritDoc}
1104     */
1105    public String getLogDirectory() {
1106      return pLogDirectory;
1107    }
1108
1109
1110
1111    /**
1112     * {@inheritDoc}
1113     */
1114    public SortedSet<String> getRetentionPolicy() {
1115      return pRetentionPolicy;
1116    }
1117
1118
1119
1120    /**
1121     * {@inheritDoc}
1122     */
1123    public SortedSet<DN> getRetentionPolicyDNs() {
1124      SortedSet<String> values = getRetentionPolicy();
1125      SortedSet<DN> dnValues = new TreeSet<DN>();
1126      for (String value : values) {
1127        DN dn = INSTANCE.getRetentionPolicyPropertyDefinition().getChildDN(value);
1128        dnValues.add(dn);
1129      }
1130      return dnValues;
1131    }
1132
1133
1134
1135    /**
1136     * {@inheritDoc}
1137     */
1138    public SortedSet<String> getRotationPolicy() {
1139      return pRotationPolicy;
1140    }
1141
1142
1143
1144    /**
1145     * {@inheritDoc}
1146     */
1147    public SortedSet<DN> getRotationPolicyDNs() {
1148      SortedSet<String> values = getRotationPolicy();
1149      SortedSet<DN> dnValues = new TreeSet<DN>();
1150      for (String value : values) {
1151        DN dn = INSTANCE.getRotationPolicyPropertyDefinition().getChildDN(value);
1152        dnValues.add(dn);
1153      }
1154      return dnValues;
1155    }
1156
1157
1158
1159    /**
1160     * {@inheritDoc}
1161     */
1162    public long getSignatureTimeInterval() {
1163      return pSignatureTimeInterval;
1164    }
1165
1166
1167
1168    /**
1169     * {@inheritDoc}
1170     */
1171    public boolean isTamperEvident() {
1172      return pTamperEvident;
1173    }
1174
1175
1176
1177    /**
1178     * {@inheritDoc}
1179     */
1180    public Class<? extends CsvFileHTTPAccessLogPublisherCfg> configurationClass() {
1181      return CsvFileHTTPAccessLogPublisherCfg.class;
1182    }
1183
1184
1185
1186    /**
1187     * {@inheritDoc}
1188     */
1189    public DN dn() {
1190      return impl.getDN();
1191    }
1192
1193
1194
1195    /** {@inheritDoc} */
1196    public String toString() {
1197      return impl.toString();
1198    }
1199  }
1200}