05 Aug, 2015

1 commit


27 Jul, 2015

1 commit

  • This commit makes all tools consistent in the way that if no arguments are provided on the command line (or only the non prompt argument for interactive tools), tool prints the error and the help reference message on error stream.
    Changes details:
    * ArgumentParser
    ** Create method displayMessageAndUsageReference(), this method is used by tools to print both an error message and the help usage reference message
    ** getHelpUsageReference() has been moved from SubCommandArgumentParser
    
    * DSConfig
    ** displayErrorMessageAndUsageReference() has been moved to ArgumentParser
    
    * CreateRCScript
    ** Moves the server root path check after the argument parsing in order to have a consistent error message if arguments are invalid.
    
    * RebuildIndex
    * VerifyIndex
    ** Removed dead code which printed usage if no args were provided (if so, an argument exception is raised before).
    
    * MakeLDIF
    ** Add a main method for test purpose
    
    * ArgumentParserToolsTestCase
    ** Test that tools are consistent if an invalid argument is provided or if no args are provided.
    
    Tools modified by this commit are the following:
    Server tools
    * Does not print usage anymore
    ** backup
    ** base64 (only if no args are provided)
    ** control-panel
    ** create-rc-script
    ** dbtest
    ** dsjavaproperties
    ** dsreplication
    ** encode-password
    ** export-ldif
    ** import-ldif
    ** ldapcompare
    ** ldapdelete
    ** ldapmodify
    ** ldappasswordmodify
    ** ldapsearch
    ** ldif-diff
    ** ldifmodify
    ** ldifsearch
    ** make-ldif
    ** manage-account
    ** manage-tasks
    ** rebuild-index
    ** restore
    ** setup
    ** start-ds
    ** status
    ** stop-ds
    ** uninstall
    ** upgrade
    ** verify-index
    
    * Usage reference message added
    ** base64 (only if invalid args are provided)
    
    SDK tools
    * Does not print usage anymore
    ** addrate
    ** makeldif
    
    * Usage reference message added
    ** authrate
    ** ldapcompare
    ** ldapmodify
    ** ldappasswordmodify
    ** ldapsearch
    ** ldifdiff
    ** ldifmodify
    ** ldifsearch
    ** modrate
    ** searchrate
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12701 41b1ffd8-f28e-4786-ab96-9950f0a78031
    gaetan
     

08 Jul, 2015

1 commit


11 Jun, 2015

2 commits


10 Jun, 2015

1 commit


08 Jun, 2015

2 commits


18 May, 2015

1 commit


05 May, 2015

1 commit

  • Great thanks to JNR!
    Here is the CR thread link: http://sources.forgerock.org/cru/CR-6839#c74225
    
    * org.forgerock.opendj.config.client.DriverBasedManagementContext
    ** Old ManagementContext abstract class. It represents now a driver based management context.
    ** No other changes in this file
    * org.forgerock.opendj.config.client.ManagementContext
    ** Changed to interface
    * org.forgerock.opendj.config.client.ldap.LDAPManagementContext
    ** Add inner wrapper class which allow close() method overwrite.
    * org.opends.guitools.controlpanel.ui.AbstractIndexPanel
    * org.opends.guitools.controlpanel.ui.AbstractVLVIndexPanel
    * org.opends.guitools.controlpanel.ui.NewBaseDNPanel
    * org.opends.server.tools.BackendCreationHelper
    ** Consequences of this API change + refactoring
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12205 41b1ffd8-f28e-4786-ab96-9950f0a78031
    gaetan
     

27 Apr, 2015

2 commits


20 Apr, 2015

2 commits


16 Apr, 2015

2 commits

  • Fix copyright and code cleanup on r12098 (Thanks to Matt and Jean-Noël for the review)
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12100 41b1ffd8-f28e-4786-ab96-9950f0a78031
    gaetan
     
  • In order to allow config.ldif edition without harcoded ldif lines, we need to have a may to use configuration framework classes in an offline mode.
    * org.forgerock.opendj.config.client.ldap.LDAPManagementContext.java
    ** Add newLDIFManagementContext(...) methods
    
    * org.opends.server.tools.ConfigureDS.java
    ** Update impacted client code
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12098 41b1ffd8-f28e-4786-ab96-9950f0a78031
    gaetan
     

07 Apr, 2015

1 commit


01 Apr, 2015

1 commit


31 Mar, 2015

1 commit


11 Mar, 2015

1 commit

  • This first patch makes it possible to get a full refentry when running 
    OPENDJ_JAVA_ARGS="-Dorg.forgerock.opendj.gendoc=true" <command> -?
    with any command.
    
    This is a subtask of the following issue:
    OPENDJ-386 Move to single reference document
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11890 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     

02 Mar, 2015

1 commit


26 Feb, 2015

1 commit


20 Feb, 2015

3 commits

  • This additional patch adds short descriptions to the tools.
    The descriptions are suitable for use in man page summary lines.
    
    This is a subtask of the following issue:
    OPENDJ-386 Move to single reference document
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11814 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • Exception in thread "main" java.lang.IllegalStateException
    05:13:47 	at java.util.AbstractList$Itr.remove(AbstractList.java:356)
    05:13:47 	at org.forgerock.opendj.config.dsconfig.DSConfig.removeBatchArgs(DSConfig.java:1501)
    05:13:47 	at org.forgerock.opendj.config.dsconfig.DSConfig.handleBatchFile(DSConfig.java:1428)
    05:13:47 	at org.forgerock.opendj.config.dsconfig.DSConfig.run(DSConfig.java:1123)
    05:13:47 	at org.forgerock.opendj.config.dsconfig.DSConfig.main(DSConfig.java:794)
    05:13:47 	at org.forgerock.opendj.config.dsconfig.DSConfig.main(DSConfig.java:762)
    
    
    DSConfig.java:
    In removeBatchArgs(), call Iterator.next() before calling Iterator.remove() a second time.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11809 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Code cleanup
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11808 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

19 Feb, 2015

1 commit

  • In checkForConflictingArguments(), extracted methods throwIfSetAndInteractiveMode() and throwIfConflictingArgsSet() (supersedes now removed conflictingArgs()).
    In handleBatchFile(), simplified the code and extracted methods buildCommandArgs(), toCommandArgs() and removeBatchArguments().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11806 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

18 Feb, 2015

1 commit

  • This patch moves to FreeMarker templates to lay out generated content.
    It also moves English strings to properties files.
    
    It would no doubt be possible to reduce the number of templates for dsconfig
    by appending to the FreeMarker model instead of appending strings.
    
    This patch is part of the work for
    OPENDJ-386 Single reference document, especially for dsconfig.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11788 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     

17 Feb, 2015

4 commits


12 Feb, 2015

1 commit


06 Feb, 2015

3 commits


05 Feb, 2015

1 commit

  • …ough subcommand options
    
    Further improvements after CR-5982.
    
    DSConfig.java:
    In appendUsage(), excluded HelpSubCommandHandler + found a better API to access the correct data (previous data were incorrect).
    
    SubCommandArgumentParser.java:
    Do not unnecessarily create StringBuilders appended to other StringBuilders.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11679 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

03 Feb, 2015

3 commits

  • This is a problem since switching to using the opendj-cli argument classes.
    This happens because the opendj-cli tools check the new "com.forgerock.opendj.ldap.tools.scriptName" property instead of the opends property "org.opends.server.scriptName" that is still set by the server tools.
    Fixed by also checking the legacy opends property.
    Factorized the code from ArgumentParser, SubCommandArgumentParser and DSConfig.
    
    
    ArgumentParser.java:
    Added constant PROPERTY_SCRIPT_NAME_LEGACY.
    Extracted methods getScriptNameOrJava(), getLocalizableScriptName() and getScriptName().
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11668 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • DSConfig.java:
    Used DSCONFIGTOOLNAME constant.
    Extracted method getCommandName() and conflictingArgs().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11667 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • …ough subcommand options
    
    Left code generating the reference documentation in opendj-cli SubCommandArgumentParser, so it can be reused with other tools using SubCommandArgumentParser.
    Created SubCommandUsageHandler interface to allow outputing additional documentation + implemented it in opendj-config DSConfig, this way the code can access all the config classes and generate the reference documentation inline with the command usage.
    
    
    SubCommandArgumentParser.java:
    Added subCommandUsageHandler field + setter.
    In toRefSect2(), used subCommandUsageHandler to output additional documentation.
    
    DSConfig.java:
    Created inner class DSConfigSubCommandUsageHandler + copied code from ConfigGuideGeneration to here.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11666 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

20 Jan, 2015

1 commit

  • Copied the fix for OPENDJ-1656 in r11469.
    
    All tools are working except for dsconfig (which is now in the SDK) where I did not know what to display. For the moment I did this:
    $ ./build/package/OpenDJ-3.0.0_auto/bin/dsconfig --version
    3.0.0-SNAPSHOT
    $
    
    ArgumentParser.java, SubCommandArgumentParser.java:
    Made SubCommandArgumentParser use more ArgumentParser fields.
    Big code cleanup.
    
    
    DSConfig.java:
    Did a hack to display something. Please review.
    
    DirectoryServer.java:
    Changed anonymous class into DirectoryServerVersionHandler inner class.
    
    *.java:
    Set the version handler after creating the argument parser.
    
    ReplicationCliArgumentParser.java:
    Code cleanup.
    
    Base64.java:
    Removed code redundant with the VersionHandler.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11596 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac