17 Aug, 2007

6 commits

  • … This biggest issues here is the reversion of the Validator class to use String based messages instead of the message framework as the class is only used internally.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2669 41b1ffd8-f28e-4786-ab96-9950f0a78031
    kenneth_suter
     
  • … ADS and of guitools).
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2668 41b1ffd8-f28e-4786-ab96-9950f0a78031
    jvergara
     
  • The DatabasesTableModel now returns for several values Message objects.  Update the DatabaseTableCellRenderer to take this into account.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2667 41b1ffd8-f28e-4786-ab96-9950f0a78031
    jvergara
     
  • … listener state as it does for the other columns.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2666 41b1ffd8-f28e-4786-ab96-9950f0a78031
    jvergara
     
  • 1. Provide a fix for the CLI part of issue 1894 (consider replication in uninstall).  The command line now proposes to remove references in remote servers of the server that is being uninstalled.
    
    2. Add options to specify to uninstall only some parts of the server as appears in http://bde.central.sun.com/projects/opendsw/cmdline/commandmatrix.html.
    
    3. Fix some bugs in the messages.
    
    4. The fix of 1894 includes some code to display certificates to the user so that they can be viewed and accepted interactively.
    
    5. Separate the uninstall command-line into two different command lines (uninstall-gui and uninstall)  as appears in http://bde.central.sun.com/projects/opendsw/cmdline/commandmatrix.html.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2665 41b1ffd8-f28e-4786-ab96-9950f0a78031
    jvergara
     
  • initialize the proper internal structures so that OpenDS code can be more
    easily used for client-side applications that could benefit from the code but
    don't want or need to be running in the same JVM as the server.
    
    Also, update the DirectoryServer.bootstrapClient() method (which is what
    EmbeddedUtils.initializeForClientUse() uses behind the scenes) can be called
    multiple times on the same server instance without interfering with any
    previous initialization that might have been done.  In short, it will ensure
    that this initialization occurs no more than once during the life of the
    DirectoryServer object instance.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2664 41b1ffd8-f28e-4786-ab96-9950f0a78031
    neil_a_wilson
     

16 Aug, 2007

15 commits


15 Aug, 2007

13 commits

  • 
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2648 41b1ffd8-f28e-4786-ab96-9950f0a78031
    neil_a_wilson
     
  • had previously used {@inheritDoc} but after recent message changes now no
    longer inherits from any parent class and was therefore generating a javadoc
    warning.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2647 41b1ffd8-f28e-4786-ab96-9950f0a78031
    neil_a_wilson
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@2646 41b1ffd8-f28e-4786-ab96-9950f0a78031
    davidely
     
  • …d having locking problems and the reactivity of the Graphical interfaces using this classes improves a lot.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2645 41b1ffd8-f28e-4786-ab96-9950f0a78031
    jvergara
     
  • … reodering the parameters of one of the methods
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2644 41b1ffd8-f28e-4786-ab96-9950f0a78031
    davidely
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@2643 41b1ffd8-f28e-4786-ab96-9950f0a78031
    davidely
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@2642 41b1ffd8-f28e-4786-ab96-9950f0a78031
    kenneth_suter
     
  • …ssues to be resolved before we can declare that we are internationalized but this commit covers the bulk of changes needed at this time.
    
    In general this commit converts any string values that might potentially be shown to an end user (client or administrator) to a new class called Message.  This includes exception messages, error log messages, alert and email text, labels, and CLI output.  Message's main interface includes methods for rendering itself as a string in the default locale using toString() or a specified locale toString(Locale).  In addition to addressing localization, this would allow us to potentially support controls allowing clients to set a preferred locale for server communication or output log messages in different languages.  Message extends CharSequence so it can be used in some places where strings are currently used with not code change (e.g. writing to a buffer) as well as allowing messages to be composed of one another.
    
    In order to create localized messages, instead of adding them to the *Messages.java class, you define them in the corresponding properties files.  In general the property file keys are used to derive the new messages severity, category, and ordinal.  There are directives that can be used in the properties file in order to avoid doing this however.  For instance all the properties files used internally include the 'global.category' directive at the top of the file that instructs the generator to make all the following message belong to a single category.  So for internal messages the property value key will be as follows:
    
       [SEVERITY]_[DESCRIPTION]_[ORDINAL]
    
    See the properties files themselves for more information.
    
    Once your messages are in the properties file you can use the ant target 'generatemessages' to create create MessageDescriptor objects that are referred to in the Java code.  In the code you might think of these objects as replacing the int-valued message IDs.  To create messages you call MessageDescriptor.get() which replaces MessageHandler.getMessage().  It might be helpful then to try to define your messages before referring to them in your code since until you run 'generatemessages' you won't have any Java-code with with to create your message objects.
    
    In order to support non-localizable text in messages (host names, DN's, etc.) Message's can be created from String values by calling Message.raw(String).  In this way it is also possible to circumvent the intention of changing the APIs to use Message objects instead of Strings which is to support writing of localizable messages.  This method is currently used in the code as a crutch for areas of the code that need internationalization (tagged with a 'TODO: i18n' comment).  It might also be used by 3rd party developers that don't intend to localize their products.  However for internal use we should not be using this method to create Messages for text that is locale sensitive.
    
    Additionally this code includes a MessageBuilder that can be used in much the same way that a StringBuilder can be used.  It has a method toMessage() that can be used to generate a message object when needed.  At this time this method just converts the buffer contents to a raw, unlocalizable message so this will need to addressed in the future.
    
    Some other issues:
    
    - While all of the unit tests pass after this commit, there may be issues in the code where we have no or minimal test coverage.  This includes much of the setup and GUI tools packages for which I have not done any testing but will begin after this commit.
    
    - The new message related Java sources are contained in package org.opends.messages and organized in a new module src/module modeled somewhat after the admin module:
    
        src/messages/src (non-generated Java source files)
        src/messages/generated (generated source files)
        src/messages/messages (properties files for messages)
    
    If you run the code from within your IDE you will have to mark all messages/src, messages/generated and messages as source directories.
    
    - To generated the MessageDescriptor files you invoke the 'generatemessages' target.
    
    - If you run the code from within your IDE you will probably ne
    
    - This commit would change the plugin API.  Here are the changes caught by DirectoryServerPluginTestCase:
    
        doShutdown(String)->doShutdown(Message)
    
        doPostDisconnect(PostDisconnectPluginResult,ClientConnection,DisconnectReason,int,String) ->         doPostDisconnect(PostDisconnectPluginResult,ClientConnection,DisconnectReason,Message);
    
    - This commit aligns the entire code-base behind the new Formatter class (printf style formattings like %s) as opposed to the older MessageFormat style (using curly braces for message arguments).  This allows us to provide more type safety for message arguments.  So for instance you can include a %c argument specifier in your format string and the MessageDescriptor will enforce specification of a Character as message creation time.
    
    - Not all of the config framework has not been converted to use Messages.  Perhaps as some point we might have a 'message' syntax for locale-sensitive textural data.  I'm sure Matt will have ideas about this.
    
    - In addition to Message, MessageDescriptor and MessageBuilder, the org.opends.server.message package includes enums for Category and Severity that replace the definitions formerly found in MessageHandler.
    
    - The interface for the ErrorLogger has been simplified to allow logging of messages using a single Message parameter.  The severity and category of the message will be derived from the Message itself instead of specified as arguments when a message is logged.
    
    - I will provide more documentation about this plumbing on the Wiki shortly.
    
    - I will expand on the included tests soon.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2641 41b1ffd8-f28e-4786-ab96-9950f0a78031
    kenneth_suter
     
  • 2. added getTestCaseName function to return a well-formed name
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2640 41b1ffd8-f28e-4786-ab96-9950f0a78031
    arnaud_lacour
     
  • …ForSubstring function call.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2639 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mkeyes
     
  • 
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2638 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mkeyes
     
  • …g xml function, the following commit is made.
    Now there is a default value for expectedResult parameter that allows the old behavior to work until the code can be refactored.
    New calls to this function should include the parameter, expectedResult, with eith a 0 (false or 1 (true) value.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2637 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mkeyes
     
  • …g in runCommand and some clean up in dsconfig.xml
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2636 41b1ffd8-f28e-4786-ab96-9950f0a78031
    al_xipe
     

14 Aug, 2007

6 commits