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 legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2008 Sun Microsystems, Inc. 025 */ 026package org.forgerock.opendj.server.config.meta; 027 028 029 030import java.util.Collection; 031import java.util.SortedSet; 032import org.forgerock.opendj.config.AdministratorAction; 033import org.forgerock.opendj.config.AttributeTypePropertyDefinition; 034import org.forgerock.opendj.config.BooleanPropertyDefinition; 035import org.forgerock.opendj.config.ClassPropertyDefinition; 036import org.forgerock.opendj.config.client.ConcurrentModificationException; 037import org.forgerock.opendj.config.client.ManagedObject; 038import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException; 039import org.forgerock.opendj.config.client.OperationRejectedException; 040import org.forgerock.opendj.config.DefaultBehaviorProvider; 041import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider; 042import org.forgerock.opendj.config.DNPropertyDefinition; 043import org.forgerock.opendj.config.EnumPropertyDefinition; 044import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException; 045import org.forgerock.opendj.config.ManagedObjectDefinition; 046import org.forgerock.opendj.config.PropertyOption; 047import org.forgerock.opendj.config.PropertyProvider; 048import org.forgerock.opendj.config.server.ConfigurationChangeListener; 049import org.forgerock.opendj.config.server.ServerManagedObject; 050import org.forgerock.opendj.config.StringPropertyDefinition; 051import org.forgerock.opendj.config.Tag; 052import org.forgerock.opendj.ldap.DN; 053import org.forgerock.opendj.ldap.LdapException; 054import org.forgerock.opendj.ldap.schema.AttributeType; 055import org.forgerock.opendj.server.config.client.EntityTagVirtualAttributeCfgClient; 056import org.forgerock.opendj.server.config.meta.VirtualAttributeCfgDefn.ConflictBehavior; 057import org.forgerock.opendj.server.config.meta.VirtualAttributeCfgDefn.Scope; 058import org.forgerock.opendj.server.config.server.EntityTagVirtualAttributeCfg; 059import org.forgerock.opendj.server.config.server.VirtualAttributeCfg; 060 061 062 063/** 064 * An interface for querying the Entity Tag Virtual Attribute managed 065 * object definition meta information. 066 * <p> 067 * The Entity Tag Virtual Attribute ensures that all entries contain 068 * an "entity tag" or "Etag" as defined in section 3.11 of RFC 2616. 069 */ 070public final class EntityTagVirtualAttributeCfgDefn extends ManagedObjectDefinition<EntityTagVirtualAttributeCfgClient, EntityTagVirtualAttributeCfg> { 071 072 // The singleton configuration definition instance. 073 private static final EntityTagVirtualAttributeCfgDefn INSTANCE = new EntityTagVirtualAttributeCfgDefn(); 074 075 076 077 /** 078 * Defines the set of permissable values for the "checksum-algorithm" property. 079 * <p> 080 * The algorithm which should be used for calculating the entity tag 081 * checksum value. 082 */ 083 public static enum ChecksumAlgorithm { 084 085 /** 086 * The Adler-32 checksum algorithm which is almost as reliable as 087 * a CRC-32 but can be computed much faster. 088 */ 089 ADLER_32("adler-32"), 090 091 092 093 /** 094 * The CRC-32 checksum algorithm. 095 */ 096 CRC_32("crc-32"); 097 098 099 100 // String representation of the value. 101 private final String name; 102 103 104 105 // Private constructor. 106 private ChecksumAlgorithm(String name) { this.name = name; } 107 108 109 110 /** 111 * {@inheritDoc} 112 */ 113 public String toString() { return name; } 114 115 } 116 117 118 119 // The "attribute-type" property definition. 120 private static final AttributeTypePropertyDefinition PD_ATTRIBUTE_TYPE; 121 122 123 124 // The "checksum-algorithm" property definition. 125 private static final EnumPropertyDefinition<ChecksumAlgorithm> PD_CHECKSUM_ALGORITHM; 126 127 128 129 // The "conflict-behavior" property definition. 130 private static final EnumPropertyDefinition<ConflictBehavior> PD_CONFLICT_BEHAVIOR; 131 132 133 134 // The "excluded-attribute" property definition. 135 private static final AttributeTypePropertyDefinition PD_EXCLUDED_ATTRIBUTE; 136 137 138 139 // The "java-class" property definition. 140 private static final ClassPropertyDefinition PD_JAVA_CLASS; 141 142 143 144 // Build the "attribute-type" property definition. 145 static { 146 AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(INSTANCE, "attribute-type"); 147 builder.setOption(PropertyOption.MANDATORY); 148 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "attribute-type")); 149 DefaultBehaviorProvider<AttributeType> provider = new DefinedDefaultBehaviorProvider<AttributeType>("etag"); 150 builder.setDefaultBehaviorProvider(provider); 151 PD_ATTRIBUTE_TYPE = builder.getInstance(); 152 INSTANCE.registerPropertyDefinition(PD_ATTRIBUTE_TYPE); 153 } 154 155 156 157 // Build the "checksum-algorithm" property definition. 158 static { 159 EnumPropertyDefinition.Builder<ChecksumAlgorithm> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "checksum-algorithm"); 160 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "checksum-algorithm")); 161 DefaultBehaviorProvider<ChecksumAlgorithm> provider = new DefinedDefaultBehaviorProvider<ChecksumAlgorithm>("adler-32"); 162 builder.setDefaultBehaviorProvider(provider); 163 builder.setEnumClass(ChecksumAlgorithm.class); 164 PD_CHECKSUM_ALGORITHM = builder.getInstance(); 165 INSTANCE.registerPropertyDefinition(PD_CHECKSUM_ALGORITHM); 166 } 167 168 169 170 // Build the "conflict-behavior" property definition. 171 static { 172 EnumPropertyDefinition.Builder<ConflictBehavior> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "conflict-behavior"); 173 builder.setOption(PropertyOption.ADVANCED); 174 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "conflict-behavior")); 175 DefaultBehaviorProvider<ConflictBehavior> provider = new DefinedDefaultBehaviorProvider<ConflictBehavior>("real-overrides-virtual"); 176 builder.setDefaultBehaviorProvider(provider); 177 builder.setEnumClass(ConflictBehavior.class); 178 PD_CONFLICT_BEHAVIOR = builder.getInstance(); 179 INSTANCE.registerPropertyDefinition(PD_CONFLICT_BEHAVIOR); 180 } 181 182 183 184 // Build the "excluded-attribute" property definition. 185 static { 186 AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(INSTANCE, "excluded-attribute"); 187 builder.setOption(PropertyOption.MULTI_VALUED); 188 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "excluded-attribute")); 189 DefaultBehaviorProvider<AttributeType> provider = new DefinedDefaultBehaviorProvider<AttributeType>("ds-sync-hist"); 190 builder.setDefaultBehaviorProvider(provider); 191 PD_EXCLUDED_ATTRIBUTE = builder.getInstance(); 192 INSTANCE.registerPropertyDefinition(PD_EXCLUDED_ATTRIBUTE); 193 } 194 195 196 197 // Build the "java-class" property definition. 198 static { 199 ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class"); 200 builder.setOption(PropertyOption.MANDATORY); 201 builder.setOption(PropertyOption.ADVANCED); 202 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "java-class")); 203 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.extensions.EntityTagVirtualAttributeProvider"); 204 builder.setDefaultBehaviorProvider(provider); 205 builder.addInstanceOf("org.opends.server.api.VirtualAttributeProvider"); 206 PD_JAVA_CLASS = builder.getInstance(); 207 INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS); 208 } 209 210 211 212 // Register the tags associated with this managed object definition. 213 static { 214 INSTANCE.registerTag(Tag.valueOf("core-server")); 215 } 216 217 218 219 /** 220 * Get the Entity Tag Virtual Attribute configuration definition 221 * singleton. 222 * 223 * @return Returns the Entity Tag Virtual Attribute configuration 224 * definition singleton. 225 */ 226 public static EntityTagVirtualAttributeCfgDefn getInstance() { 227 return INSTANCE; 228 } 229 230 231 232 /** 233 * Private constructor. 234 */ 235 private EntityTagVirtualAttributeCfgDefn() { 236 super("entity-tag-virtual-attribute", VirtualAttributeCfgDefn.getInstance()); 237 } 238 239 240 241 /** 242 * {@inheritDoc} 243 */ 244 public EntityTagVirtualAttributeCfgClient createClientConfiguration( 245 ManagedObject<? extends EntityTagVirtualAttributeCfgClient> impl) { 246 return new EntityTagVirtualAttributeCfgClientImpl(impl); 247 } 248 249 250 251 /** 252 * {@inheritDoc} 253 */ 254 public EntityTagVirtualAttributeCfg createServerConfiguration( 255 ServerManagedObject<? extends EntityTagVirtualAttributeCfg> impl) { 256 return new EntityTagVirtualAttributeCfgServerImpl(impl); 257 } 258 259 260 261 /** 262 * {@inheritDoc} 263 */ 264 public Class<EntityTagVirtualAttributeCfg> getServerConfigurationClass() { 265 return EntityTagVirtualAttributeCfg.class; 266 } 267 268 269 270 /** 271 * Get the "attribute-type" property definition. 272 * <p> 273 * Specifies the attribute type for the attribute whose values are 274 * to be dynamically assigned by the virtual attribute. 275 * 276 * @return Returns the "attribute-type" property definition. 277 */ 278 public AttributeTypePropertyDefinition getAttributeTypePropertyDefinition() { 279 return PD_ATTRIBUTE_TYPE; 280 } 281 282 283 284 /** 285 * Get the "base-dn" property definition. 286 * <p> 287 * Specifies the base DNs for the branches containing entries that 288 * are eligible to use this virtual attribute. 289 * <p> 290 * If no values are given, then the server generates virtual 291 * attributes anywhere in the server. 292 * 293 * @return Returns the "base-dn" property definition. 294 */ 295 public DNPropertyDefinition getBaseDNPropertyDefinition() { 296 return VirtualAttributeCfgDefn.getInstance().getBaseDNPropertyDefinition(); 297 } 298 299 300 301 /** 302 * Get the "checksum-algorithm" property definition. 303 * <p> 304 * The algorithm which should be used for calculating the entity tag 305 * checksum value. 306 * 307 * @return Returns the "checksum-algorithm" property definition. 308 */ 309 public EnumPropertyDefinition<ChecksumAlgorithm> getChecksumAlgorithmPropertyDefinition() { 310 return PD_CHECKSUM_ALGORITHM; 311 } 312 313 314 315 /** 316 * Get the "conflict-behavior" property definition. 317 * <p> 318 * Specifies the behavior that the server is to exhibit for entries 319 * that already contain one or more real values for the associated 320 * attribute. 321 * 322 * @return Returns the "conflict-behavior" property definition. 323 */ 324 public EnumPropertyDefinition<ConflictBehavior> getConflictBehaviorPropertyDefinition() { 325 return PD_CONFLICT_BEHAVIOR; 326 } 327 328 329 330 /** 331 * Get the "enabled" property definition. 332 * <p> 333 * Indicates whether the Entity Tag Virtual Attribute is enabled for 334 * use. 335 * 336 * @return Returns the "enabled" property definition. 337 */ 338 public BooleanPropertyDefinition getEnabledPropertyDefinition() { 339 return VirtualAttributeCfgDefn.getInstance().getEnabledPropertyDefinition(); 340 } 341 342 343 344 /** 345 * Get the "excluded-attribute" property definition. 346 * <p> 347 * The list of attributes which should be ignored when calculating 348 * the entity tag checksum value. 349 * <p> 350 * Certain attributes like "ds-sync-hist" may vary between replicas 351 * due to different purging schedules and should not be included in 352 * the checksum. 353 * 354 * @return Returns the "excluded-attribute" property definition. 355 */ 356 public AttributeTypePropertyDefinition getExcludedAttributePropertyDefinition() { 357 return PD_EXCLUDED_ATTRIBUTE; 358 } 359 360 361 362 /** 363 * Get the "filter" property definition. 364 * <p> 365 * Specifies the search filters to be applied against entries to 366 * determine if the virtual attribute is to be generated for those 367 * entries. 368 * <p> 369 * If no values are given, then any entry is eligible to have the 370 * value generated. If one or more filters are specified, then only 371 * entries that match at least one of those filters are allowed to 372 * have the virtual attribute. 373 * 374 * @return Returns the "filter" property definition. 375 */ 376 public StringPropertyDefinition getFilterPropertyDefinition() { 377 return VirtualAttributeCfgDefn.getInstance().getFilterPropertyDefinition(); 378 } 379 380 381 382 /** 383 * Get the "group-dn" property definition. 384 * <p> 385 * Specifies the DNs of the groups whose members can be eligible to 386 * use this virtual attribute. 387 * <p> 388 * If no values are given, then group membership is not taken into 389 * account when generating the virtual attribute. If one or more 390 * group DNs are specified, then only members of those groups are 391 * allowed to have the virtual attribute. 392 * 393 * @return Returns the "group-dn" property definition. 394 */ 395 public DNPropertyDefinition getGroupDNPropertyDefinition() { 396 return VirtualAttributeCfgDefn.getInstance().getGroupDNPropertyDefinition(); 397 } 398 399 400 401 /** 402 * Get the "java-class" property definition. 403 * <p> 404 * Specifies the fully-qualified name of the virtual attribute 405 * provider class that generates the attribute values. 406 * 407 * @return Returns the "java-class" property definition. 408 */ 409 public ClassPropertyDefinition getJavaClassPropertyDefinition() { 410 return PD_JAVA_CLASS; 411 } 412 413 414 415 /** 416 * Get the "scope" property definition. 417 * <p> 418 * Specifies the LDAP scope associated with base DNs for entries 419 * that are eligible to use this virtual attribute. 420 * 421 * @return Returns the "scope" property definition. 422 */ 423 public EnumPropertyDefinition<Scope> getScopePropertyDefinition() { 424 return VirtualAttributeCfgDefn.getInstance().getScopePropertyDefinition(); 425 } 426 427 428 429 /** 430 * Managed object client implementation. 431 */ 432 private static class EntityTagVirtualAttributeCfgClientImpl implements 433 EntityTagVirtualAttributeCfgClient { 434 435 // Private implementation. 436 private ManagedObject<? extends EntityTagVirtualAttributeCfgClient> impl; 437 438 439 440 // Private constructor. 441 private EntityTagVirtualAttributeCfgClientImpl( 442 ManagedObject<? extends EntityTagVirtualAttributeCfgClient> impl) { 443 this.impl = impl; 444 } 445 446 447 448 /** 449 * {@inheritDoc} 450 */ 451 public AttributeType getAttributeType() { 452 return impl.getPropertyValue(INSTANCE.getAttributeTypePropertyDefinition()); 453 } 454 455 456 457 /** 458 * {@inheritDoc} 459 */ 460 public void setAttributeType(AttributeType value) { 461 impl.setPropertyValue(INSTANCE.getAttributeTypePropertyDefinition(), value); 462 } 463 464 465 466 /** 467 * {@inheritDoc} 468 */ 469 public SortedSet<DN> getBaseDN() { 470 return impl.getPropertyValues(INSTANCE.getBaseDNPropertyDefinition()); 471 } 472 473 474 475 /** 476 * {@inheritDoc} 477 */ 478 public void setBaseDN(Collection<DN> values) { 479 impl.setPropertyValues(INSTANCE.getBaseDNPropertyDefinition(), values); 480 } 481 482 483 484 /** 485 * {@inheritDoc} 486 */ 487 public ChecksumAlgorithm getChecksumAlgorithm() { 488 return impl.getPropertyValue(INSTANCE.getChecksumAlgorithmPropertyDefinition()); 489 } 490 491 492 493 /** 494 * {@inheritDoc} 495 */ 496 public void setChecksumAlgorithm(ChecksumAlgorithm value) { 497 impl.setPropertyValue(INSTANCE.getChecksumAlgorithmPropertyDefinition(), value); 498 } 499 500 501 502 /** 503 * {@inheritDoc} 504 */ 505 public ConflictBehavior getConflictBehavior() { 506 return impl.getPropertyValue(INSTANCE.getConflictBehaviorPropertyDefinition()); 507 } 508 509 510 511 /** 512 * {@inheritDoc} 513 */ 514 public void setConflictBehavior(ConflictBehavior value) { 515 impl.setPropertyValue(INSTANCE.getConflictBehaviorPropertyDefinition(), value); 516 } 517 518 519 520 /** 521 * {@inheritDoc} 522 */ 523 public Boolean isEnabled() { 524 return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 525 } 526 527 528 529 /** 530 * {@inheritDoc} 531 */ 532 public void setEnabled(boolean value) { 533 impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value); 534 } 535 536 537 538 /** 539 * {@inheritDoc} 540 */ 541 public SortedSet<AttributeType> getExcludedAttribute() { 542 return impl.getPropertyValues(INSTANCE.getExcludedAttributePropertyDefinition()); 543 } 544 545 546 547 /** 548 * {@inheritDoc} 549 */ 550 public void setExcludedAttribute(Collection<AttributeType> values) { 551 impl.setPropertyValues(INSTANCE.getExcludedAttributePropertyDefinition(), values); 552 } 553 554 555 556 /** 557 * {@inheritDoc} 558 */ 559 public SortedSet<String> getFilter() { 560 return impl.getPropertyValues(INSTANCE.getFilterPropertyDefinition()); 561 } 562 563 564 565 /** 566 * {@inheritDoc} 567 */ 568 public void setFilter(Collection<String> values) { 569 impl.setPropertyValues(INSTANCE.getFilterPropertyDefinition(), values); 570 } 571 572 573 574 /** 575 * {@inheritDoc} 576 */ 577 public SortedSet<DN> getGroupDN() { 578 return impl.getPropertyValues(INSTANCE.getGroupDNPropertyDefinition()); 579 } 580 581 582 583 /** 584 * {@inheritDoc} 585 */ 586 public void setGroupDN(Collection<DN> values) { 587 impl.setPropertyValues(INSTANCE.getGroupDNPropertyDefinition(), values); 588 } 589 590 591 592 /** 593 * {@inheritDoc} 594 */ 595 public String getJavaClass() { 596 return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 597 } 598 599 600 601 /** 602 * {@inheritDoc} 603 */ 604 public void setJavaClass(String value) { 605 impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value); 606 } 607 608 609 610 /** 611 * {@inheritDoc} 612 */ 613 public Scope getScope() { 614 return impl.getPropertyValue(INSTANCE.getScopePropertyDefinition()); 615 } 616 617 618 619 /** 620 * {@inheritDoc} 621 */ 622 public void setScope(Scope value) { 623 impl.setPropertyValue(INSTANCE.getScopePropertyDefinition(), value); 624 } 625 626 627 628 /** 629 * {@inheritDoc} 630 */ 631 public ManagedObjectDefinition<? extends EntityTagVirtualAttributeCfgClient, ? extends EntityTagVirtualAttributeCfg> definition() { 632 return INSTANCE; 633 } 634 635 636 637 /** 638 * {@inheritDoc} 639 */ 640 public PropertyProvider properties() { 641 return impl; 642 } 643 644 645 646 /** 647 * {@inheritDoc} 648 */ 649 public void commit() throws ManagedObjectAlreadyExistsException, 650 MissingMandatoryPropertiesException, ConcurrentModificationException, 651 OperationRejectedException, LdapException { 652 impl.commit(); 653 } 654 655 } 656 657 658 659 /** 660 * Managed object server implementation. 661 */ 662 private static class EntityTagVirtualAttributeCfgServerImpl implements 663 EntityTagVirtualAttributeCfg { 664 665 // Private implementation. 666 private ServerManagedObject<? extends EntityTagVirtualAttributeCfg> impl; 667 668 // The value of the "attribute-type" property. 669 private final AttributeType pAttributeType; 670 671 // The value of the "base-dn" property. 672 private final SortedSet<DN> pBaseDN; 673 674 // The value of the "checksum-algorithm" property. 675 private final ChecksumAlgorithm pChecksumAlgorithm; 676 677 // The value of the "conflict-behavior" property. 678 private final ConflictBehavior pConflictBehavior; 679 680 // The value of the "enabled" property. 681 private final boolean pEnabled; 682 683 // The value of the "excluded-attribute" property. 684 private final SortedSet<AttributeType> pExcludedAttribute; 685 686 // The value of the "filter" property. 687 private final SortedSet<String> pFilter; 688 689 // The value of the "group-dn" property. 690 private final SortedSet<DN> pGroupDN; 691 692 // The value of the "java-class" property. 693 private final String pJavaClass; 694 695 // The value of the "scope" property. 696 private final Scope pScope; 697 698 699 700 // Private constructor. 701 private EntityTagVirtualAttributeCfgServerImpl(ServerManagedObject<? extends EntityTagVirtualAttributeCfg> impl) { 702 this.impl = impl; 703 this.pAttributeType = impl.getPropertyValue(INSTANCE.getAttributeTypePropertyDefinition()); 704 this.pBaseDN = impl.getPropertyValues(INSTANCE.getBaseDNPropertyDefinition()); 705 this.pChecksumAlgorithm = impl.getPropertyValue(INSTANCE.getChecksumAlgorithmPropertyDefinition()); 706 this.pConflictBehavior = impl.getPropertyValue(INSTANCE.getConflictBehaviorPropertyDefinition()); 707 this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 708 this.pExcludedAttribute = impl.getPropertyValues(INSTANCE.getExcludedAttributePropertyDefinition()); 709 this.pFilter = impl.getPropertyValues(INSTANCE.getFilterPropertyDefinition()); 710 this.pGroupDN = impl.getPropertyValues(INSTANCE.getGroupDNPropertyDefinition()); 711 this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 712 this.pScope = impl.getPropertyValue(INSTANCE.getScopePropertyDefinition()); 713 } 714 715 716 717 /** 718 * {@inheritDoc} 719 */ 720 public void addEntityTagChangeListener( 721 ConfigurationChangeListener<EntityTagVirtualAttributeCfg> listener) { 722 impl.registerChangeListener(listener); 723 } 724 725 726 727 /** 728 * {@inheritDoc} 729 */ 730 public void removeEntityTagChangeListener( 731 ConfigurationChangeListener<EntityTagVirtualAttributeCfg> listener) { 732 impl.deregisterChangeListener(listener); 733 } 734 /** 735 * {@inheritDoc} 736 */ 737 public void addChangeListener( 738 ConfigurationChangeListener<VirtualAttributeCfg> listener) { 739 impl.registerChangeListener(listener); 740 } 741 742 743 744 /** 745 * {@inheritDoc} 746 */ 747 public void removeChangeListener( 748 ConfigurationChangeListener<VirtualAttributeCfg> listener) { 749 impl.deregisterChangeListener(listener); 750 } 751 752 753 754 /** 755 * {@inheritDoc} 756 */ 757 public AttributeType getAttributeType() { 758 return pAttributeType; 759 } 760 761 762 763 /** 764 * {@inheritDoc} 765 */ 766 public SortedSet<DN> getBaseDN() { 767 return pBaseDN; 768 } 769 770 771 772 /** 773 * {@inheritDoc} 774 */ 775 public ChecksumAlgorithm getChecksumAlgorithm() { 776 return pChecksumAlgorithm; 777 } 778 779 780 781 /** 782 * {@inheritDoc} 783 */ 784 public ConflictBehavior getConflictBehavior() { 785 return pConflictBehavior; 786 } 787 788 789 790 /** 791 * {@inheritDoc} 792 */ 793 public boolean isEnabled() { 794 return pEnabled; 795 } 796 797 798 799 /** 800 * {@inheritDoc} 801 */ 802 public SortedSet<AttributeType> getExcludedAttribute() { 803 return pExcludedAttribute; 804 } 805 806 807 808 /** 809 * {@inheritDoc} 810 */ 811 public SortedSet<String> getFilter() { 812 return pFilter; 813 } 814 815 816 817 /** 818 * {@inheritDoc} 819 */ 820 public SortedSet<DN> getGroupDN() { 821 return pGroupDN; 822 } 823 824 825 826 /** 827 * {@inheritDoc} 828 */ 829 public String getJavaClass() { 830 return pJavaClass; 831 } 832 833 834 835 /** 836 * {@inheritDoc} 837 */ 838 public Scope getScope() { 839 return pScope; 840 } 841 842 843 844 /** 845 * {@inheritDoc} 846 */ 847 public Class<? extends EntityTagVirtualAttributeCfg> configurationClass() { 848 return EntityTagVirtualAttributeCfg.class; 849 } 850 851 852 853 /** 854 * {@inheritDoc} 855 */ 856 public DN dn() { 857 return impl.getDN(); 858 } 859 860 } 861}