001/* 002 * Copyright 2008-2024 Ping Identity Corporation 003 * All Rights Reserved. 004 */ 005/* 006 * Copyright 2008-2024 Ping Identity Corporation 007 * 008 * Licensed under the Apache License, Version 2.0 (the "License"); 009 * you may not use this file except in compliance with the License. 010 * You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, software 015 * distributed under the License is distributed on an "AS IS" BASIS, 016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 017 * See the License for the specific language governing permissions and 018 * limitations under the License. 019 */ 020/* 021 * Copyright (C) 2008-2024 Ping Identity Corporation 022 * 023 * This program is free software; you can redistribute it and/or modify 024 * it under the terms of the GNU General Public License (GPLv2 only) 025 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only) 026 * as published by the Free Software Foundation. 027 * 028 * This program is distributed in the hope that it will be useful, 029 * but WITHOUT ANY WARRANTY; without even the implied warranty of 030 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 031 * GNU General Public License for more details. 032 * 033 * You should have received a copy of the GNU General Public License 034 * along with this program; if not, see <http://www.gnu.org/licenses>. 035 */ 036package com.unboundid.ldap.sdk.unboundidds.monitors; 037 038 039 040import java.util.Collections; 041import java.util.LinkedHashMap; 042import java.util.Map; 043 044import com.unboundid.ldap.sdk.Entry; 045import com.unboundid.util.NotMutable; 046import com.unboundid.util.NotNull; 047import com.unboundid.util.Nullable; 048import com.unboundid.util.StaticUtils; 049import com.unboundid.util.ThreadSafety; 050import com.unboundid.util.ThreadSafetyLevel; 051 052import static com.unboundid.ldap.sdk.unboundidds.monitors.MonitorMessages.*; 053 054 055 056/** 057 * This class defines a monitor entry that provides general information about 058 * the Directory Server version. 059 * <BR> 060 * <BLOCKQUOTE> 061 * <B>NOTE:</B> This class, and other classes within the 062 * {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only 063 * supported for use against Ping Identity, UnboundID, and 064 * Nokia/Alcatel-Lucent 8661 server products. These classes provide support 065 * for proprietary functionality or for external specifications that are not 066 * considered stable or mature enough to be guaranteed to work in an 067 * interoperable way with other types of LDAP servers. 068 * </BLOCKQUOTE> 069 * <BR> 070 * Information that it may make available includes: 071 * <UL> 072 * <LI>The full Directory Server version string, which may contain 073 * spaces.</LI> 074 * <LI>The compact Directory Server version string, which will not contain 075 * any spaces and may use a more compact representation than the full 076 * version string.</LI> 077 * <LI>The Directory Server product name.</LI> 078 * <LI>A compact representation of the Directory Server product name.</LI> 079 * <LI>The server major version number.</LI> 080 * <LI>The server minor version number.</LI> 081 * <LI>The server point version number.</LI> 082 * <LI>A version qualifier string which may provide a more descriptive name 083 * for the build of the server.</LI> 084 * <LI>The server build ID string.</LI> 085 * <LI>The server promoted build number.</LI> 086 * <LI>The source control revision number for the source used to build the 087 * server.</LI> 088 * <LI>A list of the bugfix IDs for any special fixes included in the 089 * server.</LI> 090 * </UL> 091 * The server should present at most one version monitor entry. It can be 092 * retrieved using the {@link MonitorManager#getVersionMonitorEntry} method. 093 * This entry provides specific methods for accessing this version information 094 * (e.g., the {@link VersionMonitorEntry#getFullVersion} method can be used to 095 * retrieve the full version string for the server). Alternately, this 096 * information may be accessed using the generic API. See the 097 * {@link MonitorManager} class documentation for an example that demonstrates 098 * the use of the generic API for accessing monitor data. 099 */ 100@NotMutable() 101@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE) 102public final class VersionMonitorEntry 103 extends MonitorEntry 104{ 105 /** 106 * The structural object class used in version monitor entries. 107 */ 108 @NotNull protected static final String VERSION_MONITOR_OC = 109 "ds-version-monitor-entry"; 110 111 112 113 /** 114 * The name of the attribute used to provide the server build ID. 115 */ 116 @NotNull private static final String ATTR_BUILD_ID = "buildID"; 117 118 119 120 /** 121 * The name of the attribute used to provide the server promoted build number. 122 */ 123 @NotNull private static final String ATTR_BUILD_NUMBER = "buildNumber"; 124 125 126 127 /** 128 * The name of the attribute used to provide a compact server version string. 129 */ 130 @NotNull private static final String ATTR_COMPACT_VERSION = "compactVersion"; 131 132 133 134 /** 135 * The name of the attribute used to provide the list of bugfix IDs. 136 */ 137 @NotNull private static final String ATTR_FIX_IDS = "fixIDs"; 138 139 140 141 /** 142 * The name of the attribute used to provide a full server version string. 143 */ 144 @NotNull private static final String ATTR_FULL_VERSION = "fullVersion"; 145 146 147 148 /** 149 * The name of the attribute used to hold the Groovy library version. 150 */ 151 @NotNull private static final String ATTR_GROOVY_VERSION = "groovyVersion"; 152 153 154 155 /** 156 * The name of the attribute used to hold the Berkeley DB JE library version. 157 */ 158 @NotNull private static final String ATTR_JE_VERSION = "jeVersion"; 159 160 161 162 /** 163 * The name of the attribute used to hold the jzlib library version. 164 */ 165 @NotNull private static final String ATTR_JZLIB_VERSION = "jzlibVersion"; 166 167 168 169 /** 170 * The name of the attribute used to hold the LDAP SDK library version. 171 */ 172 @NotNull private static final String ATTR_LDAP_SDK_VERSION = "ldapSDKVersion"; 173 174 175 176 /** 177 * The name of the attribute used to provide the major version number. 178 */ 179 @NotNull private static final String ATTR_MAJOR_VERSION = "majorVersion"; 180 181 182 183 /** 184 * The name of the attribute used to provide the minor version number. 185 */ 186 @NotNull private static final String ATTR_MINOR_VERSION = "minorVersion"; 187 188 189 190 /** 191 * The name of the attribute used to provide the point version number. 192 */ 193 @NotNull private static final String ATTR_POINT_VERSION = "pointVersion"; 194 195 196 197 /** 198 * The name of the attribute used to provide the product name. 199 */ 200 @NotNull private static final String ATTR_PRODUCT_NAME = "productName"; 201 202 203 204 /** 205 * The name of the attribute used to provide the source revision identifier. 206 */ 207 @NotNull private static final String ATTR_REVISION_ID = "revisionID"; 208 209 210 211 /** 212 * The name of the attribute used to provide the source revision number. 213 */ 214 @NotNull private static final String ATTR_REVISION_NUMBER = "revisionNumber"; 215 216 217 218 /** 219 * The name of the attribute used to hold the server SDK library version. 220 */ 221 @NotNull private static final String ATTR_SERVER_SDK_VERSION = 222 "serverSDKVersion"; 223 224 225 226 /** 227 * The name of the attribute used to provide the short product name. 228 */ 229 @NotNull private static final String ATTR_SHORT_NAME = "shortName"; 230 231 232 233 /** 234 * The name of the attribute used to hold the server SNMP4J library version. 235 */ 236 @NotNull private static final String ATTR_SNMP4J_VERSION = "snmp4jVersion"; 237 238 239 240 /** 241 * The name of the attribute used to hold the server SNMP4J agent library 242 * version. 243 */ 244 @NotNull private static final String ATTR_SNMP4J_AGENT_VERSION = 245 "snmp4jAgentVersion"; 246 247 248 249 /** 250 * The name of the attribute used to hold the server SNMP4J AgentX library 251 * version. 252 */ 253 @NotNull private static final String ATTR_SNMP4J_AGENTX_VERSION = 254 "snmp4jAgentXVersion"; 255 256 257 258 /** 259 * The name of the attribute used to provide the server's version qualifier. 260 */ 261 @NotNull private static final String ATTR_VERSION_QUALIFIER = 262 "versionQualifier"; 263 264 265 266 /** 267 * The serial version UID for this serializable class. 268 */ 269 private static final long serialVersionUID = -8501846678698542926L; 270 271 272 273 // The server build number. 274 @Nullable private final Long buildNumber; 275 276 // The server major version number. 277 @Nullable private final Long majorVersion; 278 279 // The server minor version number. 280 @Nullable private final Long minorVersion; 281 282 // The server point version number. 283 @Nullable private final Long pointVersion; 284 285 // The server source revision number. 286 @Nullable private final Long revisionNumber; 287 288 // The server build ID. 289 @Nullable private final String buildID; 290 291 // The compact server version string. 292 @Nullable private final String compactVersion; 293 294 // The list of bugfix IDs. 295 @Nullable private final String fixIDs; 296 297 // The Groovy library version. 298 @Nullable private final String groovyVersion; 299 300 // The full server version string. 301 @Nullable private final String fullVersion; 302 303 // The Berkeley DB JE library version. 304 @Nullable private final String jeVersion; 305 306 // The jzlib library version. 307 @Nullable private final String jzlibVersion; 308 309 // The LDAP SDK library version. 310 @Nullable private final String ldapSDKVersion; 311 312 // The server product name. 313 @Nullable private final String productName; 314 315 // A string that identifies the source revision from which the server was 316 // built. 317 @Nullable private final String revisionID; 318 319 // The server SDK library version. 320 @Nullable private final String serverSDKVersion; 321 322 // The server short product name. 323 @Nullable private final String shortName; 324 325 // The SNMP4J library version. 326 @Nullable private final String snmp4jVersion; 327 328 // The SNMP4J agent library version. 329 @Nullable private final String snmp4jAgentVersion; 330 331 // The SNMP4J AgentX library version. 332 @Nullable private final String snmp4jAgentXVersion; 333 334 // The server version qualifier string. 335 @Nullable private final String versionQualifier; 336 337 338 339 /** 340 * Creates a new version monitor entry from the provided entry. 341 * 342 * @param entry The entry to be parsed as a version monitor entry. It must 343 * not be {@code null}. 344 */ 345 public VersionMonitorEntry(@NotNull final Entry entry) 346 { 347 super(entry); 348 349 buildNumber = getLong(ATTR_BUILD_NUMBER); 350 majorVersion = getLong(ATTR_MAJOR_VERSION); 351 minorVersion = getLong(ATTR_MINOR_VERSION); 352 pointVersion = getLong(ATTR_POINT_VERSION); 353 revisionNumber = getLong(ATTR_REVISION_NUMBER); 354 buildID = getString(ATTR_BUILD_ID); 355 compactVersion = getString(ATTR_COMPACT_VERSION); 356 fixIDs = getString(ATTR_FIX_IDS); 357 groovyVersion = getString(ATTR_GROOVY_VERSION); 358 fullVersion = getString(ATTR_FULL_VERSION); 359 jeVersion = getString(ATTR_JE_VERSION); 360 jzlibVersion = getString(ATTR_JZLIB_VERSION); 361 ldapSDKVersion = getString(ATTR_LDAP_SDK_VERSION); 362 productName = getString(ATTR_PRODUCT_NAME); 363 revisionID = getString(ATTR_REVISION_ID); 364 serverSDKVersion = getString(ATTR_SERVER_SDK_VERSION); 365 shortName = getString(ATTR_SHORT_NAME); 366 snmp4jVersion = getString(ATTR_SNMP4J_VERSION); 367 snmp4jAgentVersion = getString(ATTR_SNMP4J_AGENT_VERSION); 368 snmp4jAgentXVersion = getString(ATTR_SNMP4J_AGENTX_VERSION); 369 versionQualifier = getString(ATTR_VERSION_QUALIFIER); 370 } 371 372 373 374 /** 375 * Retrieves the Directory Server build ID string. 376 * 377 * @return The Directory Server build ID string, or {@code null} if it was 378 * not included in the monitor entry. 379 */ 380 @Nullable() 381 public String getBuildID() 382 { 383 return buildID; 384 } 385 386 387 388 /** 389 * Retrieves the Directory Server promoted build number. 390 * 391 * @return The Directory Server promoted build number, or {@code null} if it 392 * was not included in the monitor entry. 393 */ 394 @Nullable() 395 public Long getBuildNumber() 396 { 397 return buildNumber; 398 } 399 400 401 402 /** 403 * Retrieves a compact representation of the Directory Server version string. 404 * It will not contain any spaces. 405 * 406 * @return A compact representation of the Directory Server version string, 407 * or {@code null} if it was not included in the monitor entry. 408 */ 409 @Nullable() 410 public String getCompactVersion() 411 { 412 return compactVersion; 413 } 414 415 416 417 /** 418 * Retrieves a space-delimited list of the bugfix IDs for special fixes 419 * included in the Directory Server. 420 * 421 * @return A space-delimited list of the bugfix IDs for special fixes 422 * included in the Directory Server, or {@code null} if it was not 423 * included in the monitor entry. 424 */ 425 @Nullable() 426 public String getFixIDs() 427 { 428 return fixIDs; 429 } 430 431 432 433 /** 434 * Retrieves the full Directory Server version string. 435 * 436 * @return The full Directory Server version string, or {@code null} if it 437 * was not included in the monitor entry. 438 */ 439 @Nullable() 440 public String getFullVersion() 441 { 442 return fullVersion; 443 } 444 445 446 447 /** 448 * Retrieves the Groovy library version string. 449 * 450 * @return The Groovy library version string, or {@code null} if it was not 451 * included in the monitor entry. 452 */ 453 @Nullable() 454 public String getGroovyVersion() 455 { 456 return groovyVersion; 457 } 458 459 460 461 /** 462 * Retrieves the Berkeley DB Java Edition library version string. 463 * 464 * @return The Berkeley DB Java Edition library version string, or 465 * {@code null} if it was not included in the monitor entry. 466 */ 467 @Nullable() 468 public String getBerkeleyDBJEVersion() 469 { 470 return jeVersion; 471 } 472 473 474 475 /** 476 * Retrieves the jzlib library version string. 477 * 478 * @return The jzlib library version string, or {@code null} if it was not 479 * included in the monitor entry. 480 */ 481 @Nullable() 482 public String getJZLibVersion() 483 { 484 return jzlibVersion; 485 } 486 487 488 489 /** 490 * Retrieves the UnboundID LDAP SDK for Java library version string. 491 * 492 * @return The UnboundID LDAP SDK for Java library version string, or 493 * {@code null} if it was not included in the monitor entry. 494 */ 495 @Nullable() 496 public String getLDAPSDKVersion() 497 { 498 return ldapSDKVersion; 499 } 500 501 502 503 /** 504 * Retrieves the Directory Server major version number. 505 * 506 * @return The Directory Server major version number, or {@code null} if it 507 * was not included in the monitor entry. 508 */ 509 @Nullable() 510 public Long getMajorVersion() 511 { 512 return majorVersion; 513 } 514 515 516 517 /** 518 * Retrieves the Directory Server minor version number. 519 * 520 * @return The Directory Server minor version number, or {@code null} if it 521 * was not included in the monitor entry. 522 */ 523 @Nullable() 524 public Long getMinorVersion() 525 { 526 return minorVersion; 527 } 528 529 530 531 /** 532 * Retrieves the Directory Server point version number. 533 * 534 * @return The Directory Server point version number, or {@code null} if it 535 * was not included in the monitor entry. 536 */ 537 @Nullable() 538 public Long getPointVersion() 539 { 540 return pointVersion; 541 } 542 543 544 545 /** 546 * Retrieves the Directory Server product name (e.g., "Ping Identity Directory 547 * Server"). 548 * 549 * @return The Directory Server product name, or {@code null} if it was not 550 * included in the monitor entry. 551 */ 552 @Nullable() 553 public String getProductName() 554 { 555 return productName; 556 } 557 558 559 560 /** 561 * Retrieves the source revision number from which the Directory Server was 562 * built. 563 * 564 * @return The source revision number from which the Directory Server was 565 * built, or {@code null} if it was not included in the monitor 566 * entry or if it was not numeric. 567 * 568 * @deprecated Use {@link #getRevisionID} instead, as the version control 569 * system might not use numeric revision identifiers. 570 */ 571 @Deprecated() 572 @Nullable() 573 public Long getRevisionNumber() 574 { 575 return revisionNumber; 576 } 577 578 579 580 /** 581 * Retrieves a string that identifies the source revision from which the 582 * server was built. 583 * 584 * @return A string that identifies the source revision from which the server 585 * was built. 586 */ 587 @Nullable() 588 public String getRevisionID() 589 { 590 return revisionID; 591 } 592 593 594 595 /** 596 * Retrieves the UnboundID Server SDK library version string. 597 * 598 * @return The UnboundID Server SDK library version string, or {@code null} 599 * if it was not included in the monitor entry. 600 */ 601 @Nullable() 602 public String getServerSDKVersion() 603 { 604 return serverSDKVersion; 605 } 606 607 608 609 /** 610 * Retrieves the Directory Server short product name (e.g., 611 * "Ping-Identity-DS"). 612 * 613 * @return The Directory Server short product name, or {@code null} if it was 614 * not included in the monitor entry. 615 */ 616 @Nullable() 617 public String getShortProductName() 618 { 619 return shortName; 620 } 621 622 623 624 /** 625 * Retrieves the SNMP4J library version string. 626 * 627 * @return The SNMP4J library version string, or {@code null} if it was not 628 * included in the monitor entry. 629 */ 630 @Nullable() 631 public String getSNMP4JVersion() 632 { 633 return snmp4jVersion; 634 } 635 636 637 638 /** 639 * Retrieves the SNMP4J agent library version string. 640 * 641 * @return The SNMP4J agent library version string, or {@code null} if it was 642 * not included in the monitor entry. 643 */ 644 @Nullable() 645 public String getSNMP4JAgentVersion() 646 { 647 return snmp4jAgentVersion; 648 } 649 650 651 652 /** 653 * Retrieves the SNMP4J AgentX library version string. 654 * 655 * @return The SNMP4J AgentX library version string, or {@code null} if it 656 * was not included in the monitor entry. 657 */ 658 @Nullable() 659 public String getSNMP4JAgentXVersion() 660 { 661 return snmp4jAgentXVersion; 662 } 663 664 665 666 /** 667 * Retrieves the Directory Server version qualifier string (e.g., "-beta1"). 668 * 669 * @return The Directory Server version qualifier string, or {@code null} if 670 * it was not included in the monitor entry. 671 */ 672 @Nullable() 673 public String getVersionQualifier() 674 { 675 return versionQualifier; 676 } 677 678 679 680 /** 681 * {@inheritDoc} 682 */ 683 @Override() 684 @NotNull() 685 public String getMonitorDisplayName() 686 { 687 return INFO_VERSION_MONITOR_DISPNAME.get(); 688 } 689 690 691 692 /** 693 * {@inheritDoc} 694 */ 695 @Override() 696 @NotNull() 697 public String getMonitorDescription() 698 { 699 return INFO_VERSION_MONITOR_DESC.get(); 700 } 701 702 703 704 /** 705 * {@inheritDoc} 706 */ 707 @Override() 708 @NotNull() 709 public Map<String,MonitorAttribute> getMonitorAttributes() 710 { 711 final LinkedHashMap<String,MonitorAttribute> attrs = 712 new LinkedHashMap<>(StaticUtils.computeMapCapacity(20)); 713 714 if (productName != null) 715 { 716 addMonitorAttribute(attrs, 717 ATTR_PRODUCT_NAME, 718 INFO_VERSION_DISPNAME_PRODUCT_NAME.get(), 719 INFO_VERSION_DESC_PRODUCT_NAME.get(), 720 productName); 721 } 722 723 if (shortName != null) 724 { 725 addMonitorAttribute(attrs, 726 ATTR_SHORT_NAME, 727 INFO_VERSION_DISPNAME_SHORT_NAME.get(), 728 INFO_VERSION_DESC_SHORT_NAME.get(), 729 shortName); 730 } 731 732 if (fullVersion != null) 733 { 734 addMonitorAttribute(attrs, 735 ATTR_FULL_VERSION, 736 INFO_VERSION_DISPNAME_FULL_VERSION.get(), 737 INFO_VERSION_DESC_FULL_VERSION.get(), 738 fullVersion); 739 } 740 741 if (compactVersion != null) 742 { 743 addMonitorAttribute(attrs, 744 ATTR_COMPACT_VERSION, 745 INFO_VERSION_DISPNAME_COMPACT_VERSION.get(), 746 INFO_VERSION_DESC_COMPACT_VERSION.get(), 747 compactVersion); 748 } 749 750 if (buildID != null) 751 { 752 addMonitorAttribute(attrs, 753 ATTR_BUILD_ID, 754 INFO_VERSION_DISPNAME_BUILD_ID.get(), 755 INFO_VERSION_DESC_BUILD_ID.get(), 756 buildID); 757 } 758 759 if (majorVersion != null) 760 { 761 addMonitorAttribute(attrs, 762 ATTR_MAJOR_VERSION, 763 INFO_VERSION_DISPNAME_MAJOR_VERSION.get(), 764 INFO_VERSION_DESC_MAJOR_VERSION.get(), 765 majorVersion); 766 } 767 768 if (minorVersion != null) 769 { 770 addMonitorAttribute(attrs, 771 ATTR_MINOR_VERSION, 772 INFO_VERSION_DISPNAME_MINOR_VERSION.get(), 773 INFO_VERSION_DESC_MINOR_VERSION.get(), 774 minorVersion); 775 } 776 777 if (pointVersion != null) 778 { 779 addMonitorAttribute(attrs, 780 ATTR_POINT_VERSION, 781 INFO_VERSION_DISPNAME_POINT_VERSION.get(), 782 INFO_VERSION_DESC_POINT_VERSION.get(), 783 pointVersion); 784 } 785 786 if (buildNumber != null) 787 { 788 addMonitorAttribute(attrs, 789 ATTR_BUILD_NUMBER, 790 INFO_VERSION_DISPNAME_BUILD_NUMBER.get(), 791 INFO_VERSION_DESC_BUILD_NUMBER.get(), 792 buildNumber); 793 } 794 795 if (versionQualifier != null) 796 { 797 addMonitorAttribute(attrs, 798 ATTR_VERSION_QUALIFIER, 799 INFO_VERSION_DISPNAME_VERSION_QUALIFIER.get(), 800 INFO_VERSION_DESC_VERSION_QUALIFIER.get(), 801 versionQualifier); 802 } 803 804 if (revisionNumber != null) 805 { 806 addMonitorAttribute(attrs, 807 ATTR_REVISION_NUMBER, 808 INFO_VERSION_DISPNAME_REVISION_NUMBER.get(), 809 INFO_VERSION_DESC_REVISION_NUMBER.get(), 810 revisionNumber); 811 } 812 813 if (revisionID != null) 814 { 815 addMonitorAttribute(attrs, 816 ATTR_REVISION_ID, 817 INFO_VERSION_DISPNAME_REVISION_ID.get(), 818 INFO_VERSION_DESC_REVISION_ID.get(), 819 revisionID); 820 } 821 822 if (fixIDs != null) 823 { 824 addMonitorAttribute(attrs, 825 ATTR_FIX_IDS, 826 INFO_VERSION_DISPNAME_FIX_IDS.get(), 827 INFO_VERSION_DESC_FIX_IDS.get(), 828 fixIDs); 829 } 830 831 if (groovyVersion != null) 832 { 833 addMonitorAttribute(attrs, 834 ATTR_GROOVY_VERSION, 835 INFO_VERSION_DISPNAME_GROOVY_VERSION.get(), 836 INFO_VERSION_DESC_GROOVY_VERSION.get(), 837 groovyVersion); 838 } 839 840 if (jeVersion != null) 841 { 842 addMonitorAttribute(attrs, 843 ATTR_JE_VERSION, 844 INFO_VERSION_DISPNAME_JE_VERSION.get(), 845 INFO_VERSION_DESC_JE_VERSION.get(), 846 jeVersion); 847 } 848 849 if (jzlibVersion != null) 850 { 851 addMonitorAttribute(attrs, 852 ATTR_JZLIB_VERSION, 853 INFO_VERSION_DISPNAME_JZLIB_VERSION.get(), 854 INFO_VERSION_DESC_JZLIB_VERSION.get(), 855 jzlibVersion); 856 } 857 858 if (ldapSDKVersion != null) 859 { 860 addMonitorAttribute(attrs, 861 ATTR_LDAP_SDK_VERSION, 862 INFO_VERSION_DISPNAME_LDAP_SDK_VERSION.get(), 863 INFO_VERSION_DESC_LDAP_SDK_VERSION.get(), 864 ldapSDKVersion); 865 } 866 867 if (serverSDKVersion != null) 868 { 869 addMonitorAttribute(attrs, 870 ATTR_SERVER_SDK_VERSION, 871 INFO_VERSION_DISPNAME_SERVER_SDK_VERSION.get(), 872 INFO_VERSION_DESC_SERVER_SDK_VERSION.get(), 873 serverSDKVersion); 874 } 875 876 if (snmp4jVersion != null) 877 { 878 addMonitorAttribute(attrs, 879 ATTR_SNMP4J_VERSION, 880 INFO_VERSION_DISPNAME_SNMP4J_VERSION.get(), 881 INFO_VERSION_DESC_SNMP4J_VERSION.get(), 882 snmp4jVersion); 883 } 884 885 if (snmp4jAgentVersion != null) 886 { 887 addMonitorAttribute(attrs, 888 ATTR_SNMP4J_AGENT_VERSION, 889 INFO_VERSION_DISPNAME_SNMP4J_AGENT_VERSION.get(), 890 INFO_VERSION_DESC_SNMP4J_AGENT_VERSION.get(), 891 snmp4jAgentVersion); 892 } 893 894 if (snmp4jAgentXVersion != null) 895 { 896 addMonitorAttribute(attrs, 897 ATTR_SNMP4J_AGENTX_VERSION, 898 INFO_VERSION_DISPNAME_SNMP4J_AGENTX_VERSION.get(), 899 INFO_VERSION_DESC_SNMP4J_AGENTX_VERSION.get(), 900 snmp4jAgentXVersion); 901 } 902 903 return Collections.unmodifiableMap(attrs); 904 } 905}