Checkpoint commit for OPENDJ-1288 :
Migrate I18n and logging support to i18n framework and SLF4J
* Migrate from org.opends.message.Message to
org.forgerock.i18n.LocalizableMessage
** Remove several org.opends.messages classes
** Migrate generation of messages classes to use
LocalizableMessage
* Preliminary work for SLF4J usage
** Modify ErrorLogger, DebugLogger, DebugTracer and
publishers classes
** Remove Category class usage for a category string
** Remove DebugLogLevel class usage
** Remove some levels of DebugLogCategory
* Preliminary work to inject "context" to server objects
instead of using static methods of DirectoryServer class
** Add ServerContext interface
** Use ServerContext interface in LoggerConfigManager and
classes used by the manager (logging related features)
* Modify checkstyle to accept longer lines : 120
* Add dependency to i18n-slfj module
11 files deleted
3 files added
1,070 files modified
| | |
| | | </target> |
| | | |
| | | |
| | | <target name="generatemessages" depends="buildtools"> |
| | | <target name="generatemessages" depends="buildtools,resolve"> |
| | | <typedef name="genmsg" |
| | | classname="org.opends.build.tools.GenerateMessageFile" > |
| | | <classpath> |
| | | <fileset dir="${build.dir}/build-tools"> |
| | | <include name="*.jar" /> |
| | | </fileset> |
| | | <fileset dir="${lib.dir}/compile"> |
| | | <include name="i18n-core.jar" /> |
| | | </fileset> |
| | | </classpath> |
| | | </typedef> |
| | | <!-- |
| | |
| | | <fileset dir="${build.dir}/build-tools"> |
| | | <include name="build-tools.jar" /> |
| | | </fileset> |
| | | <fileset dir="${lib.dir}/compile"> |
| | | <include name="i18n-core.jar" /> |
| | | </fileset> |
| | | <pathelement path="${classes.dir}"/> |
| | | </classpath> |
| | | </javac> |
| | |
| | | <include name="**/org/opends/messages/Category.java"/> |
| | | <include name="**/org/opends/messages/QuickSetupMessages.java"/> |
| | | <include name="**/org/opends/server/types/OpenDsException.java"/> |
| | | <classpath> |
| | | <fileset dir="${lib.dir}/compile"> |
| | | <include name="i18n-core.jar" /> |
| | | </fileset> |
| | | </classpath> |
| | | </javac> |
| | | <javac srcdir="${quicksetup.src.dir}" destdir="${quicksetup.classes.dir}"> |
| | | <classpath> |
| | | <fileset dir="${build.dir}/build-tools"> |
| | | <include name="build-tools.jar" /> |
| | | </fileset> |
| | | <fileset dir="${lib.dir}/compile"> |
| | | <include name="i18n-core.jar" /> |
| | | </fileset> |
| | | <pathelement path="${classes.dir}"/> |
| | | </classpath> |
| | | </javac> |
| | |
| | | |
| | | |
| | | |
| | | <target name="buildtools" depends="init" |
| | | <target name="buildtools" depends="init,resolve" |
| | | description="Builds the build tools"> |
| | | |
| | | <mkdir dir="${buildtools.classes.dir}" /> |
| | |
| | | <include name="*.jar" /> |
| | | </fileset> |
| | | |
| | | <fileset dir="${lib.dir}/compile"> |
| | | <include name="i18n-core.jar" /> |
| | | </fileset> |
| | | |
| | | <fileset dir="${emma.dir}"> |
| | | <include name="*.jar" /> |
| | | </fileset> |
| | |
| | | </module> |
| | | |
| | | |
| | | <!-- Ensure that no line exceeds 80 characters in length --> |
| | | <!-- Ensure that no line exceeds 120 characters in length --> |
| | | <module name="LineLength"> |
| | | <property name="max" value="80" /> |
| | | <property name="max" value="120" /> |
| | | </module> |
| | | |
| | | |
| | |
| | | <!DOCTYPE ivy-module [ |
| | | <!ENTITY grizzly.version "2.3.6"> |
| | | <!ENTITY opendj.sdk.version "3.0.0-SNAPSHOT"> |
| | | <!ENTITY i18n.version "1.4.2-SNAPSHOT"> |
| | | <!ENTITY crest.version "2.1.0-SNAPSHOT"> |
| | | <!ENTITY jackson.version "1.9.2"> |
| | | <!ENTITY slf4j.version "1.7.5"> |
| | |
| | | <dependency org="javax.servlet" name="javax.servlet-api" rev="[3.1-b02]" /> |
| | | <dependency org="com.sleepycat" name="je" rev="5.0.97" /> |
| | | <dependency org="org.forgerock.opendj" name="opendj-rest2ldap-servlet" rev="&opendj.sdk.version;" conf="default->master,compile"/> |
| | | <dependency org="org.forgerock.commons" name="i18n-slf4j" rev="&i18n.version;" /> |
| | | <dependency org="org.forgerock.opendj" name="opendj-server2x-adapter" rev="&opendj.sdk.version;"> |
| | | <!-- This is the OpenDJ server module :) --> |
| | | <exclude module="opendj-server"/> |
| | |
| | | # |
| | | class Replace |
| | | |
| | | # Messages map : contains for each message its associated level |
| | | MESSAGES_MAP = {} |
| | | |
| | | # Mapping of opendj2 log levels to opendj3 logging method |
| | | LOG_LEVELS = { |
| | | 'INFO' => 'debug', |
| | | 'MILD_WARN' => 'warn', |
| | | 'SEVERE_WARN' => 'warn', |
| | | 'MILD_ERR' => 'error', |
| | | 'SEVERE_ERR' => 'error', |
| | | 'FATAL_ERR' => 'error', |
| | | 'DEBUG' => 'trace', |
| | | 'NOTICE' => 'info', |
| | | } |
| | | |
| | | # All directories that contains java code |
| | | JAVA_DIRS = ["src/server", "src/quicksetup", "src/ads", "src/guitools", "tests/unit-tests-testng/src"] |
| | | |
| | | # Replacement for Validator |
| | | # Modify 88 files, for a total of 227 replacements - leaves 21 compilation errors |
| | | VALIDATOR = { |
| | | :dirs => JAVA_DIRS, |
| | | :extensions => ["java"], |
| | | :replacements => |
| | | [ |
| | | /import org.opends.server.util.\*;/, |
| | | "import org.opends.server.util.*;\nimport org.forgerock.util.Reject;", |
| | | |
| | | /import static org.opends.server.util.Validator.ensureNotNull;/, |
| | | 'import static org.forgerock.util.Reject.ifNull;', |
| | | |
| | | /import static org.opends.server.util.Validator.ensureTrue;/, |
| | | 'import static org.forgerock.util.Reject.ifFalse;', |
| | | |
| | | /import static org.opends.server.util.Validator.\*;/, |
| | | 'import static org.forgerock.util.Reject.*;', |
| | | |
| | | /import org.opends.server.util.Validator;/, |
| | | 'import org.forgerock.util.Reject;', |
| | | |
| | | /(Validator\.| )ensureNotNull\((.*)$/, |
| | | '\1ifNull(\2', |
| | | |
| | | /(Validator\.| )ensureTrue\((.*)$/, |
| | | '\1ifFalse(\2', |
| | | |
| | | / Validator\./, |
| | | ' Reject.' |
| | | ] |
| | | } |
| | | SNMP_DIR = ["src/snmp/src"] |
| | | DSML_DIR = ["src/dsml/org"] |
| | | |
| | | # Replacement for messages |
| | | # Modify 1052 files, for a total of 2366 replacements - leaves 10274 compilation errors mostly due to generated messages |
| | | MESSAGES = { |
| | | :dirs => JAVA_DIRS, |
| | | :extensions => ["java"], |
| | | :replacements => |
| | | [ |
| | | /import org.opends.messages.Message;/, |
| | | 'import org.forgerock.i18n.LocalizableMessage;', |
| | | :dirs => DSML_DIR, |
| | | :extensions => ["java"], |
| | | :stopwords => ['org/opends/messages'], |
| | | :replacements => |
| | | [ |
| | | /import org.opends.messages.(\bMessage(Builder)?(Descriptor)?\b|\*)(\.Arg..?)?;/, |
| | | 'import org.forgerock.i18n.Localizable\1\4;', |
| | | |
| | | /([ <(])Message([ >)(.]|$)/, |
| | | '\1LocalizableMessage\2', |
| | | /\bMessage\b/, |
| | | 'LocalizableMessage', |
| | | |
| | | /import org.opends.messages.MessageBuilder;/, |
| | | 'import org.forgerock.i18n.LocalizableMessageBuilder;', |
| | | /\bMessageBuilder\b/, |
| | | 'LocalizableMessageBuilder', |
| | | |
| | | /([ <(])MessageBuilder([ >)(.]|$)/, |
| | | '\1LocalizableMessageBuilder\2' |
| | | ] |
| | | } |
| | | /\bMessageDescriptor\b/, |
| | | 'LocalizableMessageDescriptor', |
| | | |
| | | /LocalizableMessage.raw\((\n\s+)?Category.\w+,\s+(\n\s+)?Severity.\w+,\s?/, |
| | | 'LocalizableMessage.raw(', |
| | | |
| | | /msg.getDescriptor().equals\((\w)+\)/, |
| | | "msg.resourceName().equals(\\1.resourceName())\n && msg.ordinal().equals(\\1.ordinal())" |
| | | ] |
| | | } |
| | | |
| | | # Replacement for types |
| | | TYPES = { |
| | |
| | | ] |
| | | } |
| | | |
| | | BYTESTRING_TYPE = { |
| | | :dirs => JAVA_DIRS, |
| | | # Replacement for types |
| | | DN_TYPE = { |
| | | :dirs => JAVA_DIRS + ["src/admin/generated"], |
| | | :extensions => ["java"], |
| | | :replacements => |
| | | [ |
| | | /package org.opends.server.types;/, |
| | | "package org.opends.server.types;\n\n" + |
| | | "import org.forgerock.opendj.ldap.ByteString;\n" + |
| | | "import org.forgerock.opendj.ldap.ByteStringBuilder;\n" + |
| | | "import org.forgerock.opendj.ldap.ByteSequence;\n" + |
| | | "import org.forgerock.opendj.ldap.ByteSequenceReader;", |
| | | /package org.opends.server.types.(\b\w\b);/, |
| | | "package org.opends.server.types.\\1;\n\n" + |
| | | 'import org.forgerock.opendj.ldap.DN;', |
| | | |
| | | /import org.opends.server.types.DN;/, |
| | | 'import org.forgerock.opendj.ldap.DN;', |
| | | |
| | | /import org.opends.server.types.\*;/, |
| | | "import org.opends.server.types.*;\n" + |
| | | "import org.forgerock.opendj.ldap.ByteString;\n" + |
| | | "import org.forgerock.opendj.ldap.ByteStringBuilder;\n" + |
| | | "import org.forgerock.opendj.ldap.ByteSequence;\n" + |
| | | "import org.forgerock.opendj.ldap.ByteSequenceReader;", |
| | | "import org.opends.server.types.*;\nimport org.forgerock.opendj.ldap.DN;", |
| | | |
| | | /import org.opends.server.types.(ByteString|ByteStringBuilder|ByteSequence|ByteSequenceReader);/, |
| | | 'import org.forgerock.opendj.ldap.\1;', |
| | | |
| | | /package org.opends.server.protocols.asn1;/, |
| | | "package org.opends.server.protocols.asn1;\n\n" + |
| | | "import com.forgerock.opendj.util.ByteSequenceOutputStream;", |
| | | |
| | | /import org.opends.server.protocols.asn1.ByteSequenceOutputStream;/, |
| | | "import com.forgerock.opendj.util.ByteSequenceOutputStream;", |
| | | /DN.NULL_DN/, |
| | | "DN.rootDN()" |
| | | |
| | | ] |
| | | } |
| | |
| | | /import org.opends.server.types.DebugLogLevel;\n/, |
| | | '', |
| | | |
| | | /import (static )?org.opends.server.loggers.debug.DebugLogger.*;\n/, |
| | | '', |
| | | #/import (static )?org.opends.server.loggers.debug.DebugLogger.*;\n/, |
| | | #'', |
| | | |
| | | /DebugTracer TRACER = (DebugLogger.)?getTracer\(\)/, |
| | | "Logger debugLogger = LoggerFactory.getLogger({CLASSNAME}.class)", |
| | |
| | | } |
| | | |
| | | # List of replacements to run |
| | | REPLACEMENTS = [ BYTESTRING_TYPE ] |
| | | #REPLACEMENTS = [ VALIDATOR, MESSAGES, TYPES, EXCEPTIONS, LOGGERS, I18N_LOGGERS ] |
| | | REPLACEMENTS = [ MESSAGES ] |
| | | #REPLACEMENTS = [ MESSAGES, TYPES, DN_TYPES, EXCEPTIONS, LOGGERS, I18N_LOGGERS ] |
| | | |
| | | # Run replacements |
| | | |
| | | ################################### Processing methods ######################################## |
| | | |
| | | # Main method : run replacements defined in REPLACEMENTS constant |
| | | def run |
| | | REPLACEMENTS.each { |repl| |
| | | puts "Replacing " + Replace.constants.find{ |name| Replace.const_get(name)==repl }.to_s |
| | |
| | | } |
| | | end |
| | | |
| | | # Process replacements on the provided directories |
| | | def replace_dirs(replacements, dirs, stopwords, extensions) |
| | | count_files = 0 |
| | | count_total = 0 |
| | |
| | | puts "Replaced in #{count_files} files, for a total of #{count_total} replacements" |
| | | end |
| | | |
| | | # Process replacement on the provided file |
| | | def replace_file(file, replacements) |
| | | count = 0 |
| | | File.open(file) { |source| |
| | |
| | | count |
| | | end |
| | | |
| | | # Return java class name from java filename |
| | | def classname(file) |
| | | name = file.gsub(/.*\/(.*).java$/, '\1') |
| | | if name.nil? then '' else name end |
| | | end |
| | | |
| | | # Return all files with provided extensions under the provided directory |
| | | # and all its subdirectories recursively |
| | | def files_under_directory(directory, extensions) |
| | | Dir[directory + '/**/*.{' + extensions.join(",") + '}'] |
| | | end |
| | | |
| | | # Build a map of error messages and error level |
| | | def messages(message_file) |
| | | File.open(message_file).each { |line| |
| | | line = line.chomp |
| | | next if line.size==0 || line[0..0]=="#" || line[0..0]==" " || line[0..0]!=line[0..0].upcase || line[0..5]=="global" |
| | | first, *rest = line.split "_" |
| | | label = rest.join "_" |
| | | level_label = if %w(INFO DEBUG NOTICE).include?(first) then first else first.to_s + "_" + rest[0].to_s end |
| | | level = LOG_LEVELS[level_label] |
| | | puts "level #{level}, line #{line}" |
| | | } |
| | | end |
| | | |
| | | end |
| | | |
| | | # Launch replacement |
| | | # Launch all replacements defined in the REPLACEMENTS constant |
| | | #Replace.new.messages("src/messages/messages/admin.properties") |
| | | Replace.new.run |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package ${PACKAGE}; |
| | | |
| | | import org.opends.messages.MessageDescriptor; |
| | | import static org.opends.messages.Category.*; |
| | | import static org.opends.messages.Severity.*; |
| | | //import org.opends.messages.MessageDescriptor; |
| | | import org.forgerock.i18n.LocalizableMessageDescriptor; |
| | | |
| | | //import static org.opends.messages.Category.*; |
| | | //import static org.opends.messages.Severity.*; |
| | | |
| | | /** |
| | | * This file contains a number of constants that are used throughout the |
| | | * Directory Server source. It was dynamically generated as part of the |
| | | * Directory Server build process and should not be edited directly. |
| | | */ |
| | | @org.opends.server.types.PublicAPI( |
| | | stability=org.opends.server.types.StabilityLevel.PRIVATE, |
| | | mayInstantiate=false, |
| | | mayExtend=false, |
| | | mayInvoke=true) |
| | | public final class ${CLASS_NAME} { |
| | | |
| | | /** Base property for resource bundle containing messages */ |
| | | private static final String BASE = "messages/${BASE}"; |
| | | //private static final String BASE = "messages/${BASE}"; |
| | | |
| | | // The name of the resource bundle. |
| | | private static final String RESOURCE = "messages.${BASE}"; |
| | | |
| | | private static ClassLoader webstartClassLoader; |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2013 ForgeRock AS |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.admin.ads; |
| | |
| | | import javax.naming.ldap.LdapContext; |
| | | |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.Constants; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.schema.SchemaConstants; |
| | |
| | | } |
| | | catch (ADSContextException adce) |
| | | { |
| | | Message msg = ERR_ADS_MERGE.get( |
| | | LocalizableMessage msg = ERR_ADS_MERGE.get( |
| | | ConnectionUtils.getHostPort(getDirContext()), |
| | | ConnectionUtils.getHostPort(adsCtx.getDirContext()), |
| | | adce.getMessageObject()); |
| | |
| | | } |
| | | if (!notDefinedAdmins.isEmpty()) |
| | | { |
| | | Message msg = ERR_ADS_ADMINISTRATOR_MERGE.get( |
| | | LocalizableMessage msg = ERR_ADS_ADMINISTRATOR_MERGE.get( |
| | | ConnectionUtils.getHostPort(adsCtx.getDirContext()), |
| | | ConnectionUtils.getHostPort(getDirContext()), |
| | | Utils.getStringFromCollection(notDefinedAdmins, |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.admin.ads; |
| | | |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | |
| | |
| | | * @param msg the message describing the error. |
| | | * @param x the throwable that generated this exception. |
| | | */ |
| | | public ADSContextException(ErrorType error, Message msg, Throwable x) |
| | | public ADSContextException(ErrorType error, LocalizableMessage msg, Throwable x) |
| | | { |
| | | super(msg); |
| | | this.error = error; |
| | |
| | | return toString; |
| | | } |
| | | |
| | | private static Message getMessage(ErrorType error, Throwable x) |
| | | private static LocalizableMessage getMessage(ErrorType error, Throwable x) |
| | | { |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | if (x != null) |
| | | { |
| | | if (x instanceof OpenDsException) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.admin.ads; |
| | | |
| | |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.opends.admin.ads.util.PreferredConnection; |
| | | import org.opends.admin.ads.util.ServerLoader; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.util.Utils; |
| | | |
| | | /** |
| | |
| | | * |
| | | * @return a set of error messages encountered in the TopologyCache. |
| | | */ |
| | | public Set<Message> getErrorMessages() |
| | | public Set<LocalizableMessage> getErrorMessages() |
| | | { |
| | | Set<TopologyCacheException> exceptions = |
| | | new HashSet<TopologyCacheException>(); |
| | | Set<ServerDescriptor> theServers = getServers(); |
| | | Set<Message> exceptionMsgs = new LinkedHashSet<Message>(); |
| | | Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<LocalizableMessage>(); |
| | | for (ServerDescriptor server : theServers) |
| | | { |
| | | TopologyCacheException e = server.getLastException(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2012 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.build.tools; |
| | | |
| | | import org.apache.tools.ant.Task; |
| | | import org.apache.tools.ant.BuildException; |
| | | import org.apache.tools.ant.Project; |
| | | import org.forgerock.i18n.LocalizableMessageDescriptor; |
| | | |
| | | import static org.opends.build.tools.Utilities.*; |
| | | import org.opends.messages.Category; |
| | | import org.opends.messages.Severity; |
| | | import org.opends.messages.MessageDescriptor; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | |
| | | KEY_FORM_MSG = new StringBuilder() |
| | | .append(".\n\nOpenDJ message property keys must be of the form\n\n") |
| | | .append("\t\'[CATEGORY]_[SEVERITY]_[DESCRIPTION]_[ORDINAL]\'\n\n") |
| | | .append("where\n\n") |
| | | .append("CATEGORY is one of ") |
| | | .append(EnumSet.allOf(Category.class)) |
| | | .append("\n\nSEVERITY is one of ") |
| | | .append(Severity.getPropertyKeyFormSet().toString()) |
| | | //.append("where\n\n") |
| | | //.append("CATEGORY is one of ...") |
| | | //.append(EnumSet.allOf(Category.class)) |
| | | //.append("\n\nSEVERITY is one of ") |
| | | //.append(Severity.getPropertyKeyFormSet().toString()) |
| | | .append("\n\nDESCRIPTION is a descriptive string composed ") |
| | | .append("of uppercase character, digits and underscores ") |
| | | .append("describing the purpose of the message ") |
| | |
| | | public String getDescriptorClassDeclaration() { |
| | | StringBuilder sb = new StringBuilder(); |
| | | if (useGenericMessageTypeClass()) { |
| | | sb.append(getShortClassName(MessageDescriptor.class)); |
| | | sb.append("."); |
| | | sb.append(MessageDescriptor.DESCRIPTOR_CLASS_BASE_NAME); |
| | | sb.append("N"); |
| | | sb.append(getShortClassName(LocalizableMessageDescriptor.class)); |
| | | sb.append(".ArgN"); |
| | | } else { |
| | | sb.append(getShortClassName(MessageDescriptor.class)); |
| | | sb.append("."); |
| | | sb.append(MessageDescriptor.DESCRIPTOR_CLASS_BASE_NAME); |
| | | sb.append(getShortClassName(LocalizableMessageDescriptor.class)); |
| | | sb.append(".Arg"); |
| | | sb.append(classTypes.size()); |
| | | sb.append(getClassTypeVariables()); |
| | | } |
| | |
| | | sb.append(","); |
| | | } |
| | | } |
| | | sb.append(", "); |
| | | //sb.append(", "); |
| | | } |
| | | sb.append("getClassLoader()"); |
| | | //sb.append("getClassLoader()"); |
| | | sb.append(");"); |
| | | return sb.toString(); |
| | | } |
| | |
| | | * @return boolean indicating |
| | | */ |
| | | private boolean useGenericMessageTypeClass() { |
| | | if (specifiers.size() > MessageDescriptor.DESCRIPTOR_MAX_ARG_HANDLER) { |
| | | if (specifiers.size() > 9) { |
| | | return true; |
| | | } else if (specifiers != null) { |
| | | for (FormatSpecifier s : specifiers) { |
| | |
| | | globalOrdinal = new Integer(go); |
| | | } |
| | | |
| | | // Determine the value of the global category/mask if set |
| | | Integer globalMask = null; |
| | | Category globalCategory = null; |
| | | String gms = properties.getProperty(GLOBAL_CATEGORY_MASK); |
| | | if (gms != null) { |
| | | globalMask = Integer.parseInt(gms); |
| | | Integer.parseInt(gms); |
| | | globalCategory = Category.USER_DEFINED; |
| | | } else { |
| | | String gcs = properties.getProperty(GLOBAL_CATEGORY); |
| | |
| | | messageRefEntries.add(entry); |
| | | } |
| | | } else { |
| | | // old: (BASE,"MILD_ERR_ADD_CANNOT_ADD_ROOT_DSE_230",CORE,MILD_ERROR,230, getClassLoader()) |
| | | // new: CoreMessages.class, RESOURCE, "ERR_ACCTUSABLEREQ_CONTROL_BAD_OID", -1 |
| | | String className = getMessageDescriptorClassName(); |
| | | message.setConstructorArguments( |
| | | "BASE", |
| | | quote(key.toString()), |
| | | globalMask != null ? globalMask.toString() : c.name(), |
| | | s.name(), |
| | | globalOrdinal != null ? |
| | | className + ".class", "RESOURCE", |
| | | quote(key.toString()), globalOrdinal != null ? |
| | | globalOrdinal.toString() : |
| | | key.getOrdinal().toString() |
| | | ); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012 ForgeRock AS. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.dsml.protocol; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import org.opends.server.protocols.ldap.AbandonRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.LDAPMessage; |
| | |
| | | } catch (NumberFormatException nfe) |
| | | { |
| | | throw new LDAPException(LDAPResultCode.UNWILLING_TO_PERFORM, |
| | | Message.raw(nfe.getMessage())); |
| | | LocalizableMessage.raw(nfe.getMessage())); |
| | | } |
| | | |
| | | // Create and send an LDAP request to the server. |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.ldap.AddRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.AddResponseProtocolOp; |
| | |
| | | |
| | | AddResponseProtocolOp addOp = responseMessage.getAddResponseProtocolOp(); |
| | | int resultCode = addOp.getResultCode(); |
| | | Message errorMessage = addOp.getErrorMessage(); |
| | | LocalizableMessage errorMessage = addOp.getErrorMessage(); |
| | | |
| | | // Set the result code and error message for the DSML response. |
| | | addResponse.setErrorMessage( |
| | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.ldap.CompareRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.CompareResponseProtocolOp; |
| | |
| | | CompareResponseProtocolOp compareOp = |
| | | responseMessage.getCompareResponseProtocolOp(); |
| | | int resultCode = compareOp.getResultCode(); |
| | | Message errorMessage = compareOp.getErrorMessage(); |
| | | LocalizableMessage errorMessage = compareOp.getErrorMessage(); |
| | | |
| | | // Set the response code and error message for the DSML response. |
| | | compareResponse.setErrorMessage( |
| | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.ldap.DeleteRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.DeleteResponseProtocolOp; |
| | |
| | | DeleteResponseProtocolOp delOp = |
| | | responseMessage.getDeleteResponseProtocolOp(); |
| | | int resultCode = delOp.getResultCode(); |
| | | Message errorMessage = delOp.getErrorMessage(); |
| | | LocalizableMessage errorMessage = delOp.getErrorMessage(); |
| | | |
| | | // Set the result code and error message for the DSML response. |
| | | delResponse.setErrorMessage( |
| | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.ldap.ExtendedRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.ExtendedResponseProtocolOp; |
| | |
| | | ExtendedResponseProtocolOp extendedOp = |
| | | responseMessage.getExtendedResponseProtocolOp(); |
| | | int resultCode = extendedOp.getResultCode(); |
| | | Message errorMessage = extendedOp.getErrorMessage(); |
| | | LocalizableMessage errorMessage = extendedOp.getErrorMessage(); |
| | | |
| | | // Set the result code and error message for the DSML response. |
| | | extendedResponse.setResponseName(extendedOp.getOID()); |
| | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.tools.LDAPConnection; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.ldap.LDAPMessage; |
| | |
| | | ModifyDNResponseProtocolOp modDNOp = |
| | | responseMessage.getModifyDNResponseProtocolOp(); |
| | | int resultCode = modDNOp.getResultCode(); |
| | | Message errorMessage = modDNOp.getErrorMessage(); |
| | | LocalizableMessage errorMessage = modDNOp.getErrorMessage(); |
| | | |
| | | modDNResponse.setErrorMessage( |
| | | errorMessage != null ? errorMessage.toString() : null); |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.ldap.LDAPAttribute; |
| | | import org.opends.server.protocols.ldap.LDAPMessage; |
| | |
| | | ModifyResponseProtocolOp modOp = |
| | | responseMessage.getModifyResponseProtocolOp(); |
| | | int resultCode = modOp.getResultCode(); |
| | | Message errorMessage = modOp.getErrorMessage(); |
| | | LocalizableMessage errorMessage = modOp.getErrorMessage(); |
| | | |
| | | // Set the result code and error message for the DSML response. |
| | | modResponse.setErrorMessage( |
| | |
| | | |
| | | import javax.xml.bind.JAXBElement; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.ldap.LDAPAttribute; |
| | | import org.opends.server.protocols.ldap.LDAPConstants; |
| | |
| | | if(sf.getInitial() == null && subAnyElements.isEmpty() |
| | | && sf.getFinal()==null) |
| | | { |
| | | Message message = ERR_LDAP_FILTER_DECODE_NULL.get(); |
| | | LocalizableMessage message = ERR_LDAP_FILTER_DECODE_NULL.get(); |
| | | throw new LDAPException(LDAPResultCode.PROTOCOL_ERROR, message); |
| | | } |
| | | return LDAPFilter.createSubstringFilter(sf.getName(), |
| | |
| | | do |
| | | { |
| | | int resultCode = 0; |
| | | Message errorMessage = null; |
| | | LocalizableMessage errorMessage = null; |
| | | LDAPMessage responseMessage = connection.getLDAPReader().readMessage(); |
| | | if(responseMessage == null) |
| | | { |
| | |
| | | // the server , we have a reason to believe that the server doesn't |
| | | // want to handle this request. Let us return unavailable error |
| | | // code to the client to cover possible cases. |
| | | Message message = ERR_UNEXPECTED_CONNECTION_CLOSURE.get(); |
| | | LocalizableMessage message = ERR_UNEXPECTED_CONNECTION_CLOSURE.get(); |
| | | LDAPResult result = objFactory.createLDAPResult(); |
| | | ResultCode code = ResultCodeFactory.create(objFactory, |
| | | LDAPResultCode.UNAVAILABLE); |
| | |
| | | import javax.xml.validation.Schema; |
| | | import javax.xml.validation.SchemaFactory; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.controls.ProxiedAuthV2Control; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | |
| | | getResultCode()) |
| | | { |
| | | default: |
| | | Message m = INFO_RESULT_AUTHORIZATION_DENIED.get(); |
| | | LocalizableMessage m = INFO_RESULT_AUTHORIZATION_DENIED.get(); |
| | | throw new LDAPConnectionException(m, CLIENT_SIDE_CONNECT_ERROR, |
| | | null); |
| | | case LDAPResultCode.SUCCESS: |
| | |
| | | } |
| | | catch (LDAPException le) |
| | | { |
| | | Message m = INFO_RESULT_CLIENT_SIDE_ENCODING_ERROR.get(); |
| | | LocalizableMessage m = INFO_RESULT_CLIENT_SIDE_ENCODING_ERROR.get(); |
| | | throw new LDAPConnectionException(m, CLIENT_SIDE_CONNECT_ERROR, null, le); |
| | | } |
| | | catch (ASN1Exception ae) |
| | | { |
| | | Message m = INFO_RESULT_CLIENT_SIDE_ENCODING_ERROR.get(); |
| | | LocalizableMessage m = INFO_RESULT_CLIENT_SIDE_ENCODING_ERROR.get(); |
| | | throw new LDAPConnectionException(m, CLIENT_SIDE_CONNECT_ERROR, null, |
| | | ae); |
| | | } |
| | | catch (IOException ie) |
| | | { |
| | | Message m = INFO_RESULT_CLIENT_SIDE_ENCODING_ERROR.get(); |
| | | LocalizableMessage m = INFO_RESULT_CLIENT_SIDE_ENCODING_ERROR.get(); |
| | | throw new LDAPConnectionException(m, CLIENT_SIDE_CONNECT_ERROR, null, ie); |
| | | } |
| | | } |
| | |
| | | batchResponses.add( |
| | | createErrorResponse( |
| | | new LDAPException(LDAPResultCode.CLIENT_SIDE_CONNECT_ERROR, |
| | | Message.raw( |
| | | LocalizableMessage.raw( |
| | | "Invalid SSL or TLS configuration to connect to LDAP server.")))); |
| | | } |
| | | connOptions.setSSLConnectionFactory(sslConnectionFactory); |
| | |
| | | batchResponses.add( |
| | | createErrorResponse( |
| | | new LDAPException(LDAPResultCode.INVALID_CREDENTIALS, |
| | | Message.raw(ex.getMessage())))); |
| | | LocalizableMessage.raw(ex.getMessage())))); |
| | | break; |
| | | } |
| | | } |
| | |
| | | batchResponses.add( |
| | | createErrorResponse( |
| | | new LDAPException(LDAPResultCode.INVALID_CREDENTIALS, |
| | | Message.raw("Invalid configured credentials.")))); |
| | | LocalizableMessage.raw("Invalid configured credentials.")))); |
| | | } |
| | | } |
| | | else |
| | |
| | | batchResponses.add( |
| | | createErrorResponse( |
| | | new LDAPException(LDAPResultCode.INVALID_CREDENTIALS, |
| | | Message.raw("Unable to retrieve credentials.")))); |
| | | LocalizableMessage.raw("Unable to retrieve credentials.")))); |
| | | } |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel; |
| | |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.AdminToolMessages; |
| | | import org.opends.quicksetup.Installation; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.ui.UIFactory; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.util.DynamicConstants; |
| | |
| | | "INFO_CONTROL_PANEL_TITLE", |
| | | AdminToolMessages.INFO_CONTROL_PANEL_TITLE.get( |
| | | DynamicConstants.PRODUCT_NAME), |
| | | Message.class).toString(); |
| | | LocalizableMessage.class).toString(); |
| | | dlg.setTitle(title); |
| | | dlg.setContentPane(controlCenterPane); |
| | | dlg.pack(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel; |
| | |
| | | import java.util.LinkedHashSet; |
| | | |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.Constants; |
| | | import org.opends.quicksetup.UserData; |
| | | import org.opends.quicksetup.util.Utils; |
| | |
| | | * @param msg the usage message. |
| | | */ |
| | | public ControlPanelArgumentParser(String mainClassName, |
| | | Message msg) |
| | | LocalizableMessage msg) |
| | | { |
| | | super(mainClassName, msg, false); |
| | | } |
| | |
| | | @Override() |
| | | public void parseArguments(String[] args) throws ArgumentException |
| | | { |
| | | LinkedHashSet<Message> errorMessages = new LinkedHashSet<Message>(); |
| | | LinkedHashSet<LocalizableMessage> errorMessages = new LinkedHashSet<LocalizableMessage>(); |
| | | try |
| | | { |
| | | super.parseArguments(args); |
| | |
| | | |
| | | if (bindPasswordArg.isPresent() && bindPasswordFileArg.isPresent()) |
| | | { |
| | | Message message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | LocalizableMessage message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | bindPasswordArg.getLongIdentifier(), |
| | | bindPasswordFileArg.getLongIdentifier()); |
| | | errorMessages.add(message); |
| | |
| | | |
| | | if (errorMessages.size() > 0) |
| | | { |
| | | Message message = ERR_CANNOT_INITIALIZE_ARGS.get( |
| | | LocalizableMessage message = ERR_CANNOT_INITIALIZE_ARGS.get( |
| | | Utils.getMessageFromCollection(errorMessages, |
| | | Constants.LINE_SEPARATOR)); |
| | | throw new ArgumentException(message); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel; |
| | |
| | | |
| | | import org.opends.guitools.controlpanel.util.ControlPanelLog; |
| | | import org.opends.messages.AdminToolMessages; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.ui.UIFactory; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.types.InitializationException; |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | Message message = ERR_ERROR_PARSING_ARGS.get(ae.getMessage()); |
| | | LocalizableMessage message = ERR_ERROR_PARSING_ARGS.get(ae.getMessage()); |
| | | System.err.println(message); |
| | | System.out.println(Message.raw(argParser.getUsage())); |
| | | System.out.println(LocalizableMessage.raw(argParser.getUsage())); |
| | | |
| | | System.exit(ErrorReturnCode.ERROR_PARSING_ARGS.getReturnCode()); |
| | | } |
| | |
| | | private static void initLookAndFeel() throws Throwable |
| | | { |
| | | // Setup MacOSX native menu bar before AWT is loaded. |
| | | Message title = Utils.getCustomizedObject("INFO_CONTROL_PANEL_TITLE", |
| | | LocalizableMessage title = Utils.getCustomizedObject("INFO_CONTROL_PANEL_TITLE", |
| | | AdminToolMessages.INFO_CONTROL_PANEL_TITLE.get( |
| | | DynamicConstants.PRODUCT_NAME), Message.class); |
| | | DynamicConstants.PRODUCT_NAME), LocalizableMessage.class); |
| | | Utils.setMacOSXMenuBar(title); |
| | | UIFactory.initializeLookAndFeel(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.browser; |
| | | |
| | | import javax.naming.NamingException; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The exception that is launched when we exceed the maximum number of hops |
| | |
| | | * Constructor of the exception. |
| | | * @param message the message associated with the exception. |
| | | */ |
| | | public ReferralLimitExceededException(Message message) |
| | | public ReferralLimitExceededException(LocalizableMessage message) |
| | | { |
| | | super(message.toString()); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | |
| | | import java.util.TreeSet; |
| | | |
| | | import org.opends.messages.AdminToolMessages; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Table Model used to store information about indexes. It is used basically |
| | |
| | | * @return the message to be displayed in the cell if an index must be |
| | | * rebuilt. |
| | | */ |
| | | protected Message getRebuildRequiredString(AbstractIndexDescriptor index) |
| | | protected LocalizableMessage getRebuildRequiredString(AbstractIndexDescriptor index) |
| | | { |
| | | if (info.mustReindex(index)) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | | |
| | | import org.opends.guitools.controlpanel.ui.StatusGenericPanel; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The class that is used by the different action buttons on the left side of |
| | |
| | | */ |
| | | public class Action |
| | | { |
| | | private Message name; |
| | | private LocalizableMessage name; |
| | | |
| | | private Class<? extends StatusGenericPanel> associatedPanel; |
| | | |
| | |
| | | * Returns the name of the action. |
| | | * @return the name of the action. |
| | | */ |
| | | public Message getName() |
| | | public LocalizableMessage getName() |
| | | { |
| | | return name; |
| | | } |
| | |
| | | * Sets the name of the action. |
| | | * @param name the name of the action. |
| | | */ |
| | | public void setName(Message name) |
| | | public void setName(LocalizableMessage name) |
| | | { |
| | | this.name = name; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2013 ForgeRock, AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | |
| | | import java.util.TreeSet; |
| | | |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The table model used to display all the base DNs. |
| | |
| | | */ |
| | | private String getStringForReplState(BaseDNDescriptor rep) |
| | | { |
| | | Message s; |
| | | LocalizableMessage s; |
| | | if (rep.getType() == BaseDNDescriptor.Type.REPLICATED) |
| | | { |
| | | s = INFO_BASEDN_REPLICATED_LABEL.get(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.monitors.TraditionalWorkQueueMonitor; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | |
| | | /** |
| | | * Start Date. |
| | | */ |
| | | START_DATE(Message.EMPTY, ServerConstants.ATTR_START_TIME), |
| | | START_DATE(LocalizableMessage.EMPTY, ServerConstants.ATTR_START_TIME), |
| | | /** |
| | | * Current Date. |
| | | */ |
| | | CURRENT_DATE(Message.EMPTY, ServerConstants.ATTR_CURRENT_TIME), |
| | | CURRENT_DATE(LocalizableMessage.EMPTY, ServerConstants.ATTR_CURRENT_TIME), |
| | | /** |
| | | * Current Connections. |
| | | */ |
| | | CURRENT_CONNECTIONS(Message.EMPTY, ServerConstants.ATTR_CURRENT_CONNS), |
| | | CURRENT_CONNECTIONS(LocalizableMessage.EMPTY, ServerConstants.ATTR_CURRENT_CONNS), |
| | | /** |
| | | * Maximum Connections. |
| | | */ |
| | | MAX_CONNECTIONS(Message.EMPTY, ServerConstants.ATTR_MAX_CONNS), |
| | | MAX_CONNECTIONS(LocalizableMessage.EMPTY, ServerConstants.ATTR_MAX_CONNS), |
| | | /** |
| | | * Total Connections. |
| | | */ |
| | | TOTAL_CONNECTIONS(Message.EMPTY, ServerConstants.ATTR_TOTAL_CONNS), |
| | | TOTAL_CONNECTIONS(LocalizableMessage.EMPTY, ServerConstants.ATTR_TOTAL_CONNS), |
| | | /** |
| | | * Average Request Backlog. |
| | | */ |
| | |
| | | } |
| | | } |
| | | |
| | | private Message msg; |
| | | private LocalizableMessage msg; |
| | | private String attributeName; |
| | | private boolean isAborted; |
| | | private boolean isNumeric; |
| | |
| | | private boolean canHaveAverage; |
| | | private boolean isTime; |
| | | |
| | | private BasicMonitoringAttributes(Message msg, String attributeName) |
| | | private BasicMonitoringAttributes(LocalizableMessage msg, String attributeName) |
| | | { |
| | | this.msg = msg; |
| | | this.attributeName = attributeName; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getMessage() |
| | | public LocalizableMessage getMessage() |
| | | { |
| | | return msg; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | /** |
| | |
| | | * Constructor. |
| | | * @param msg the message describing why the entry cannot be renamed. |
| | | */ |
| | | public CannotRenameException(Message msg) |
| | | public CannotRenameException(LocalizableMessage msg) |
| | | { |
| | | super(msg); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | | |
| | | import java.util.ArrayList; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Class containing the different actions for a given category. For instance |
| | |
| | | */ |
| | | public class Category |
| | | { |
| | | private Message name; |
| | | private LocalizableMessage name; |
| | | private ArrayList<Action> actions = new ArrayList<Action>(); |
| | | |
| | | /** |
| | | * Returns the name of the category. |
| | | * @return the name of the category. |
| | | */ |
| | | public Message getName() |
| | | public LocalizableMessage getName() |
| | | { |
| | | return name; |
| | | } |
| | |
| | | * Sets the name of the category. |
| | | * @param name the name of the category. |
| | | */ |
| | | public void setName(Message name) |
| | | public void setName(LocalizableMessage name) |
| | | { |
| | | this.name = name; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | |
| | | import java.util.List; |
| | | |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | /** |
| | |
| | | public class CheckEntrySyntaxException extends OpenDsException |
| | | { |
| | | private static final long serialVersionUID = 8145911071581212822L; |
| | | private List<Message> errors; |
| | | private List<LocalizableMessage> errors; |
| | | /** |
| | | * Constructor of the exception. |
| | | * @param errors the list of error description that were found. |
| | | */ |
| | | public CheckEntrySyntaxException(List<Message> errors) |
| | | public CheckEntrySyntaxException(List<LocalizableMessage> errors) |
| | | { |
| | | super(getMessage(errors)); |
| | | this.errors = Collections.unmodifiableList(errors); |
| | |
| | | * Returns the list of errors that were encountered. |
| | | * @return the list of errors that were encountered. |
| | | */ |
| | | public List<Message> getErrors() |
| | | public List<LocalizableMessage> getErrors() |
| | | { |
| | | return errors; |
| | | } |
| | |
| | | * @param errors the list of errors. |
| | | * @return a single message using the provided messages. |
| | | */ |
| | | private static Message getMessage(List<Message> errors) |
| | | private static LocalizableMessage getMessage(List<LocalizableMessage> errors) |
| | | { |
| | | ArrayList<String> s = new ArrayList<String>(); |
| | | for (Message error : errors) |
| | | for (LocalizableMessage error : errors) |
| | | { |
| | | s.add(error.toString()); |
| | | } |
| | | return Message.raw(Utilities.getStringFromCollection(s, "<br>")); |
| | | return LocalizableMessage.raw(Utilities.getStringFromCollection(s, "<br>")); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | /** |
| | |
| | | * Constructor for the exception. |
| | | * @param msg the localized message to be used. |
| | | */ |
| | | public ConfigReadException(Message msg) |
| | | public ConfigReadException(LocalizableMessage msg) |
| | | { |
| | | super(msg); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | | |
| | |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.meta.AdministrationConnectorCfgDefn; |
| | | |
| | | /** |
| | |
| | | */ |
| | | OTHER(INFO_CTRL_PANEL_CONN_HANDLER_OTHER.get()); |
| | | |
| | | private Message displayMessage; |
| | | private LocalizableMessage displayMessage; |
| | | |
| | | private Protocol(Message displayMessage) |
| | | private Protocol(LocalizableMessage displayMessage) |
| | | { |
| | | this.displayMessage = displayMessage; |
| | | } |
| | | |
| | | /** |
| | | * Returns the display Message to be used for the protocol. |
| | | * @return the display Message to be used for the protocol. |
| | | * Returns the display LocalizableMessage to be used for the protocol. |
| | | * @return the display LocalizableMessage to be used for the protocol. |
| | | */ |
| | | public Message getDisplayMessage() |
| | | public LocalizableMessage getDisplayMessage() |
| | | { |
| | | return displayMessage; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | | |
| | |
| | | |
| | | import org.opends.guitools.controlpanel.datamodel.ConnectionHandlerDescriptor. |
| | | Protocol; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The table model used to display the monitoring information of connection |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getNameHeader() |
| | | protected LocalizableMessage getNameHeader() |
| | | { |
| | | return INFO_CTRL_PANEL_CONNECTION_HANDLER_HEADER.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | | |
| | |
| | | import java.util.TreeSet; |
| | | |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The abstract table model used to display all the network groups. |
| | |
| | | new ArrayList<BackendDescriptor>(); |
| | | |
| | | private String[] columnNames = {}; |
| | | private Message NO_VALUE_SET = INFO_CTRL_PANEL_NO_MONITORING_VALUE.get(); |
| | | private Message NOT_IMPLEMENTED = INFO_CTRL_PANEL_NOT_IMPLEMENTED.get(); |
| | | private LocalizableMessage NO_VALUE_SET = INFO_CTRL_PANEL_NO_MONITORING_VALUE.get(); |
| | | private LocalizableMessage NOT_IMPLEMENTED = INFO_CTRL_PANEL_NOT_IMPLEMENTED.get(); |
| | | |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.meta.LocalDBIndexCfgDefn.IndexType; |
| | | |
| | | /** |
| | |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (IndexType type : index.getTypes()) |
| | | { |
| | | Message v; |
| | | LocalizableMessage v; |
| | | switch (type) |
| | | { |
| | | case SUBSTRING: |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * An interface defining the different methods required by the UI components |
| | |
| | | * localized name of the operation associated with the attribute). |
| | | * @return the message associated with the attribute. |
| | | */ |
| | | public Message getMessage(); |
| | | public LocalizableMessage getMessage(); |
| | | |
| | | /** |
| | | * Returns the name of the attribute. |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | | |
| | |
| | | import java.util.TreeSet; |
| | | |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The abstract table model used to display all the network groups. |
| | |
| | | private long runningTime; |
| | | |
| | | private String[] columnNames = {}; |
| | | private Message NO_VALUE_SET = INFO_CTRL_PANEL_NO_MONITORING_VALUE.get(); |
| | | private Message NOT_IMPLEMENTED = INFO_CTRL_PANEL_NOT_IMPLEMENTED.get(); |
| | | private LocalizableMessage NO_VALUE_SET = INFO_CTRL_PANEL_NO_MONITORING_VALUE.get(); |
| | | private LocalizableMessage NOT_IMPLEMENTED = INFO_CTRL_PANEL_NOT_IMPLEMENTED.get(); |
| | | |
| | | |
| | | /** |
| | |
| | | * Returns the header to be used for the name of the object. |
| | | * @return the header to be used for the name of the object. |
| | | */ |
| | | protected abstract Message getNameHeader(); |
| | | protected abstract LocalizableMessage getNameHeader(); |
| | | |
| | | /** |
| | | * Sets the operations displayed by this table model. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | |
| | | |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.util.ServerConstants; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | |
| | | * @param msg the header message value (with no HTML formatting). |
| | | * @return the header wrapped with the default line width. |
| | | */ |
| | | protected String getHeader(Message msg) |
| | | protected String getHeader(LocalizableMessage msg) |
| | | { |
| | | return getHeader(msg, 15); |
| | | } |
| | |
| | | * @param wrap the maximum line width before wrapping. |
| | | * @return the header wrapped with the specified line width. |
| | | */ |
| | | protected String getHeader(Message msg, int wrap) |
| | | protected String getHeader(LocalizableMessage msg, int wrap) |
| | | { |
| | | String text = msg.toString(); |
| | | String wrappedText = StaticUtils.wrapText(text, wrap); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | | |
| | |
| | | |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.tools.tasks.TaskEntry; |
| | |
| | | private Set<TaskEntry> data = new HashSet<TaskEntry>(); |
| | | private ArrayList<TaskEntry> dataSourceArray = new ArrayList<TaskEntry>(); |
| | | |
| | | LinkedHashSet<Message> displayedAttributes = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<Message> defaultAttributes = new LinkedHashSet<Message>(); |
| | | LinkedHashSet<LocalizableMessage> displayedAttributes = new LinkedHashSet<LocalizableMessage>(); |
| | | final LinkedHashSet<LocalizableMessage> defaultAttributes = new LinkedHashSet<LocalizableMessage>(); |
| | | { |
| | | defaultAttributes.add(INFO_TASKINFO_FIELD_ID.get()); |
| | | defaultAttributes.add(INFO_TASKINFO_FIELD_TYPE.get()); |
| | | defaultAttributes.add(INFO_TASKINFO_FIELD_STATUS.get()); |
| | | defaultAttributes.add(INFO_CTRL_PANEL_TASK_CANCELABLE.get()); |
| | | } |
| | | LinkedHashSet<Message> allAttributes = new LinkedHashSet<Message>(); |
| | | LinkedHashSet<LocalizableMessage> allAttributes = new LinkedHashSet<LocalizableMessage>(); |
| | | { |
| | | allAttributes.addAll(defaultAttributes); |
| | | allAttributes.add(INFO_TASKINFO_FIELD_SCHEDULED_START.get()); |
| | |
| | | * Sets the operations displayed by this table model. |
| | | * @param attributes the attributes displayed by this table model. |
| | | */ |
| | | public void setAttributes(LinkedHashSet<Message> attributes) |
| | | public void setAttributes(LinkedHashSet<LocalizableMessage> attributes) |
| | | { |
| | | if (!allAttributes.containsAll(attributes)) |
| | | { |
| | |
| | | int columnCount = attributes.size(); |
| | | columnNames = new String[columnCount]; |
| | | int i = 0; |
| | | for (Message attribute : attributes) |
| | | for (LocalizableMessage attribute : attributes) |
| | | { |
| | | columnNames[i] = getHeader(attribute, 15); |
| | | i++; |
| | |
| | | */ |
| | | public Class<?> getColumnClass(int column) |
| | | { |
| | | return Message.class; |
| | | return LocalizableMessage.class; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public Object getValueAt(int row, int column) |
| | | { |
| | | Message value; |
| | | LocalizableMessage value; |
| | | column = getFixedOrderColumn(column); |
| | | TaskEntry taskEntry = get(row); |
| | | switch (column) |
| | | { |
| | | case 0: |
| | | value = Message.raw(taskEntry.getId()); |
| | | value = LocalizableMessage.raw(taskEntry.getId()); |
| | | break; |
| | | case 1: |
| | | value = taskEntry.getType(); |
| | |
| | | value = taskEntry.getScheduleTab(); |
| | | } else { |
| | | value = taskEntry.getScheduledStartTime(); |
| | | if (value == null || value.equals(Message.EMPTY)) |
| | | if (value == null || value.equals(LocalizableMessage.EMPTY)) |
| | | { |
| | | value = INFO_TASKINFO_IMMEDIATE_EXECUTION.get(); |
| | | } |
| | |
| | | * Returns the set of attributes ordered. |
| | | * @return the set of attributes ordered. |
| | | */ |
| | | public LinkedHashSet<Message> getDisplayedAttributes() |
| | | public LinkedHashSet<LocalizableMessage> getDisplayedAttributes() |
| | | { |
| | | return displayedAttributes; |
| | | } |
| | |
| | | * Returns the set of attributes ordered. |
| | | * @return the set of attributes ordered. |
| | | */ |
| | | public LinkedHashSet<Message> getAllAttributes() |
| | | public LinkedHashSet<LocalizableMessage> getAllAttributes() |
| | | { |
| | | return allAttributes; |
| | | } |
| | |
| | | { |
| | | int fixedOrderColumn = 0; |
| | | int i=0; |
| | | Message colMsg = null; |
| | | for (Message msg : displayedAttributes) |
| | | LocalizableMessage colMsg = null; |
| | | for (LocalizableMessage msg : displayedAttributes) |
| | | { |
| | | if (i == column) |
| | | { |
| | |
| | | } |
| | | i++; |
| | | } |
| | | for (Message msg : allAttributes) |
| | | for (LocalizableMessage msg : allAttributes) |
| | | { |
| | | if (msg.equals(colMsg)) |
| | | { |
| | |
| | | return fixedOrderColumn; |
| | | } |
| | | |
| | | private Message getValue(List<String> values, Message valueIfEmpty) |
| | | private LocalizableMessage getValue(List<String> values, LocalizableMessage valueIfEmpty) |
| | | { |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | if (values.isEmpty()) |
| | | { |
| | | msg = valueIfEmpty; |
| | |
| | | String s = Utils.getStringFromCollection(values, "<br>"); |
| | | if (values.size() > 1) |
| | | { |
| | | msg = Message.raw( |
| | | msg = LocalizableMessage.raw( |
| | | "<html>"+Utilities.applyFont(s, ColorAndFontConstants.tableFont)); |
| | | } |
| | | else |
| | | { |
| | | msg = Message.raw(s); |
| | | msg = LocalizableMessage.raw(s); |
| | | } |
| | | } |
| | | return msg; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.task; |
| | |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.AdminToolMessages; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return |
| | | AdminToolMessages.INFO_CTRL_PANEL_ADD_TO_GROUP_TASK_DESCRIPTION.get(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (!isServerRunning()) |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.task; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.tools.ManageTasks; |
| | | import org.opends.server.tools.tasks.TaskEntry; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_CANCEL_TASK_DESCRIPTION.get(); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (!isServerRunning()) |
| | |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.guitools.controlpanel.util.ConfigReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.client.ManagementContext; |
| | | import org.opends.server.admin.client.ldap.JNDIDirContextAdaptor; |
| | | import org.opends.server.admin.client.ldap.LDAPManagementContext; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | StringBuilder sb = new StringBuilder(); |
| | | |
| | |
| | | Utilities.getStringFromCollection(ids, ", "))); |
| | | } |
| | | } |
| | | return Message.raw(sb.toString()); |
| | | return LocalizableMessage.raw(sb.toString()); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.ui.nodes.BrowserNodeInfo; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.schema.SchemaConstants; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_DELETE_ENTRY_TASK_DESCRIPTION.get(); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (!isServerRunning()) |
| | |
| | | equivalentCommandWithoutControlPrinted = true; |
| | | } |
| | | getProgressDialog().setSummary( |
| | | Message.raw( |
| | | LocalizableMessage.raw( |
| | | Utilities.applyFont( |
| | | INFO_CTRL_PANEL_DELETING_ENTRY_SUMMARY.get( |
| | | lastDn.toString()).toString(), |
| | |
| | | equivalentCommandWithControlPrinted = true; |
| | | } |
| | | getProgressDialog().setSummary( |
| | | Message.raw( |
| | | LocalizableMessage.raw( |
| | | Utilities.applyFont( |
| | | INFO_CTRL_PANEL_DELETING_ENTRY_SUMMARY.get( |
| | | lastDn.toString()).toString(), |
| | |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.guitools.controlpanel.util.ConfigReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.client.ManagementContext; |
| | | import org.opends.server.admin.client.ldap.JNDIDirContextAdaptor; |
| | | import org.opends.server.admin.client.ldap.LDAPManagementContext; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | if (backendSet.size() == 1) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.guitools.controlpanel.task; |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.Attributes; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_DELETE_SCHEMA_ELEMENT_TASK_DESCRIPTION.get(); |
| | | } |
| | |
| | | String attrValue = getSchemaFileAttributeValue(element); |
| | | if (!isServerRunning()) |
| | | { |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | if (element instanceof AttributeType) |
| | | { |
| | | msg = INFO_CTRL_PANEL_EQUIVALENT_CMD_TO_DELETE_ATTRIBUTE_OFFLINE.get( |
| | |
| | | String equiv = getEquivalentCommandLine(getCommandLinePath("ldapmodify"), |
| | | args); |
| | | |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | if (element instanceof AttributeType) |
| | | { |
| | | msg = INFO_CTRL_PANEL_EQUIVALENT_CMD_TO_DELETE_ATTRIBUTE_ONLINE.get( |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.task; |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.OpenDsException; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_MODIFY_ATTRIBUTE_TASK_DESCRIPTION.get( |
| | | oldAttribute.getNameOrOID()); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && |
| | |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.AdminToolMessages; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.*; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_MODIFY_ENTRY_TASK_DESCRIPTION.get(oldEntry.getDN()); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (!isServerRunning()) |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.task; |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.OpenDsException; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_MODIFY_OBJECTCLASS_TASK_DESCRIPTION.get( |
| | | oldObjectClass.getNameOrOID()); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && |
| | |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.ui.nodes.BrowserNodeInfo; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DN; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_ENTRY_TASK_DESCRIPTION.get(dn.toString()); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (!isServerRunning()) |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.task; |
| | |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.core.DirectoryServer; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | if (attrsToAdd.size() == 1 && ocsToAdd.isEmpty()) |
| | | { |
| | |
| | | args); |
| | | |
| | | StringBuilder sb = new StringBuilder(); |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | if (element instanceof AttributeType) |
| | | { |
| | | msg = INFO_CTRL_PANEL_EQUIVALENT_CMD_TO_ADD_ATTRIBUTE_ONLINE.get( |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.task; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | /** |
| | |
| | | * Creates an exception with a message. |
| | | * @param msg the message. |
| | | */ |
| | | public OfflineUpdateException(Message msg) |
| | | public OfflineUpdateException(LocalizableMessage msg) |
| | | { |
| | | super(msg); |
| | | } |
| | |
| | | * @param msg the message. |
| | | * @param rootCause the root cause. |
| | | */ |
| | | public OfflineUpdateException(Message msg, Throwable rootCause) |
| | | public OfflineUpdateException(LocalizableMessage msg, Throwable rootCause) |
| | | { |
| | | super(msg, rootCause); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.task; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | /** |
| | |
| | | * Creates an exception with a message. |
| | | * @param msg the message. |
| | | */ |
| | | public OnlineUpdateException(Message msg) |
| | | public OnlineUpdateException(LocalizableMessage msg) |
| | | { |
| | | super(msg); |
| | | } |
| | |
| | | * @param msg the message. |
| | | * @param rootCause the root cause. |
| | | */ |
| | | public OnlineUpdateException(Message msg, Throwable rootCause) |
| | | public OnlineUpdateException(LocalizableMessage msg, Throwable rootCause) |
| | | { |
| | | super(msg, rootCause); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012 ForgeRock AS |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.task; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.VLVIndexDescriptor; |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.tools.RebuildIndex; |
| | | |
| | | /** |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | if (baseDNs.size() == 1) |
| | | { |
| | |
| | | */ |
| | | @Override |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.tools.LDAPPasswordModify; |
| | | import org.opends.server.types.DN; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_RESET_USER_PASSWORD_TASK_DESCRIPTION.get( |
| | | node.getDN()); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (!isServerRunning()) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.task; |
| | |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The task called when we want to restart the server. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_RESTART_SERVER_TASK_DESCRIPTION.get(); |
| | | } |
| | |
| | | String cmdLine = getStopCommandLineName(); |
| | | printEquivalentCommandLine(cmdLine, getCommandLineArguments(), |
| | | INFO_CTRL_PANEL_EQUIVALENT_CMD_TO_STOP_SERVER.get()); |
| | | dlg.setSummary(Message.raw( |
| | | dlg.setSummary(LocalizableMessage.raw( |
| | | Utilities.applyFont( |
| | | INFO_CTRL_PANEL_STOPPING_SERVER_SUMMARY.get().toString(), |
| | | ColorAndFontConstants.defaultFont))); |
| | |
| | | printEquivalentCommandLine(cmdLine, getStartCommandLineArguments(), |
| | | INFO_CTRL_PANEL_EQUIVALENT_CMD_TO_START_SERVER.get()); |
| | | |
| | | dlg.setSummary(Message.raw( |
| | | dlg.setSummary(LocalizableMessage.raw( |
| | | Utilities.applyFont( |
| | | INFO_CTRL_PANEL_STARTING_SERVER_SUMMARY.get().toString(), |
| | | ColorAndFontConstants.defaultFont))); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.task; |
| | |
| | | |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The task called when we want to start the server. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_START_SERVER_TASK_DESCRIPTION.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.task; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * An abstract class used to re-factor some code between the start, stop and |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.task; |
| | |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.ui.ProgressDialog; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The task called when we want to start the server. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_STOP_SERVER_TASK_DESCRIPTION.get(); |
| | | } |
| | |
| | | import org.opends.guitools.controlpanel.util.ConfigReader; |
| | | import org.opends.guitools.controlpanel.util.ProcessReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.Installation; |
| | | import org.opends.quicksetup.UserData; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | |
| | | * quit and there are tasks running. |
| | | * @return the description of the task. |
| | | */ |
| | | public abstract Message getTaskDescription(); |
| | | public abstract LocalizableMessage getTaskDescription(); |
| | | |
| | | /** |
| | | * Adds a configuration element created listener. |
| | |
| | | * launched in paralel with this task and <CODE>false</CODE> otherwise. |
| | | */ |
| | | public abstract boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons); |
| | | Collection<LocalizableMessage> incompatibilityReasons); |
| | | |
| | | /** |
| | | * Execute the task. This method is synchronous. |
| | |
| | | * @param msg the message associated with the command line. |
| | | */ |
| | | protected void printEquivalentCommandLine(String cmdName, List<String> args, |
| | | Message msg) |
| | | LocalizableMessage msg) |
| | | { |
| | | getProgressDialog().appendProgressHtml(Utilities.applyFont(msg+"<br><b>"+ |
| | | getEquivalentCommandLine(cmdName, args)+"</b><br><br>", |
| | |
| | | * @param taskToBeLaunched the task that we are trying to launch. |
| | | * @return the incompatible message between two tasks. |
| | | */ |
| | | protected Message getIncompatibilityMessage(Task taskRunning, |
| | | protected LocalizableMessage getIncompatibilityMessage(Task taskRunning, |
| | | Task taskToBeLaunched) |
| | | { |
| | | return INFO_CTRL_PANEL_INCOMPATIBLE_TASKS.get( |
| | |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.ui.renderer.CustomListCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.quicksetup.UserDataCertificateException; |
| | | import org.opends.quicksetup.ui.CertificateDialog; |
| | | import org.opends.quicksetup.util.UIKeyStore; |
| | |
| | | /** |
| | | * LDAP filter message. |
| | | */ |
| | | protected static final Message LDAP_FILTER = |
| | | protected static final LocalizableMessage LDAP_FILTER = |
| | | INFO_CTRL_PANEL_LDAP_FILTER.get(); |
| | | |
| | | /** |
| | | * User filter message. |
| | | */ |
| | | protected static final Message USER_FILTER = |
| | | protected static final LocalizableMessage USER_FILTER = |
| | | INFO_CTRL_PANEL_USERS_FILTER.get(); |
| | | |
| | | /** |
| | | * Group filter message. |
| | | */ |
| | | protected static final Message GROUP_FILTER = |
| | | protected static final LocalizableMessage GROUP_FILTER = |
| | | INFO_CTRL_PANEL_GROUPS_FILTER.get(); |
| | | |
| | | private final Message OTHER_BASE_DN = |
| | | private final LocalizableMessage OTHER_BASE_DN = |
| | | INFO_CTRL_PANEL_OTHER_BASE_DN.get(); |
| | | |
| | | private ArrayList<DN> otherBaseDns = new ArrayList<DN>(); |
| | |
| | | gbc.gridy = 0; |
| | | gbc.gridwidth = 7; |
| | | addErrorPane(gbc); |
| | | Message title = INFO_CTRL_PANEL_SERVER_NOT_RUNNING_SUMMARY.get(); |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessage title = INFO_CTRL_PANEL_SERVER_NOT_RUNNING_SUMMARY.get(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(INFO_CTRL_PANEL_SERVER_NOT_RUNNING_DETAILS.get()); |
| | | mb.append("<br><br>"); |
| | | mb.append(getStartServerHTML()); |
| | | Message details = mb.toMessage(); |
| | | LocalizableMessage details = mb.toMessage(); |
| | | updateErrorPane(errorPane, title, ColorAndFontConstants.errorTitleFont, |
| | | details, |
| | | ColorAndFontConstants.defaultFont); |
| | |
| | | */ |
| | | protected void applyButtonClicked() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | setPrimaryValid(lFilter); |
| | | String s = getBaseDN(); |
| | | boolean displayAll = false; |
| | |
| | | { |
| | | boolean displayNodes = false; |
| | | boolean displayErrorPane = false; |
| | | Message errorTitle = Message.EMPTY; |
| | | Message errorDetails = Message.EMPTY; |
| | | LocalizableMessage errorTitle = LocalizableMessage.EMPTY; |
| | | LocalizableMessage errorDetails = LocalizableMessage.EMPTY; |
| | | ServerDescriptor.ServerStatus status = desc.getStatus(); |
| | | if (status == ServerDescriptor.ServerStatus.STARTED) |
| | | { |
| | | if (!desc.isAuthenticated()) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append( |
| | | INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_TO_BROWSE_SUMMARY.get()); |
| | | mb.append("<br><br>"+getAuthenticateHTML()); |
| | |
| | | } |
| | | else if (status == ServerDescriptor.ServerStatus.NOT_CONNECTED_TO_REMOTE) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_DETAILS.get( |
| | | desc.getHostname())); |
| | | mb.append("<br><br>"+getAuthenticateHTML()); |
| | |
| | | else |
| | | { |
| | | errorTitle = INFO_CTRL_PANEL_SERVER_NOT_RUNNING_SUMMARY.get(); |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append( |
| | | INFO_CTRL_PANEL_AUTHENTICATION_SERVER_MUST_RUN_TO_BROWSE_SUMMARY.get()); |
| | | mb.append("<br><br>"); |
| | |
| | | |
| | | final boolean fDisplayNodes = displayNodes; |
| | | final boolean fDisplayErrorPane = displayErrorPane; |
| | | final Message fErrorTitle = errorTitle; |
| | | final Message fErrorDetails = errorDetails; |
| | | final LocalizableMessage fErrorTitle = errorTitle; |
| | | final LocalizableMessage fErrorDetails = errorDetails; |
| | | SwingUtilities.invokeLater(new Runnable() |
| | | { |
| | | /** |
| | |
| | | { |
| | | dn = ALL_BASE_DNS; |
| | | } |
| | | // The following is never true. OTHER_BASE_DN is a Message |
| | | // The following is never true. OTHER_BASE_DN is a LocalizableMessage |
| | | // Comment out buggy code |
| | | // else if (OTHER_BASE_DN.equals(dn)) |
| | | // { |
| | |
| | | */ |
| | | class CustomComboBoxCellRenderer extends CustomListCellRenderer |
| | | { |
| | | private Message ALL_BASE_DNS_STRING = INFO_CTRL_PANEL_ALL_BASE_DNS.get(); |
| | | private LocalizableMessage ALL_BASE_DNS_STRING = INFO_CTRL_PANEL_ALL_BASE_DNS.get(); |
| | | /** |
| | | * The constructor. |
| | | * @param combo the combo box to be rendered. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.ui.components.TitlePanel; |
| | | import org.opends.guitools.controlpanel.ui.renderer.CustomListCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.meta.LocalDBIndexCfgDefn; |
| | | import org.opends.server.admin.std.meta.LocalDBIndexCfgDefn.IndexType; |
| | | import org.opends.server.types.AttributeType; |
| | |
| | | /** |
| | | * Title panel. |
| | | */ |
| | | protected TitlePanel titlePanel = new TitlePanel(Message.EMPTY, |
| | | Message.EMPTY); |
| | | protected TitlePanel titlePanel = new TitlePanel(LocalizableMessage.EMPTY, |
| | | LocalizableMessage.EMPTY); |
| | | /** |
| | | * Attributes combo box. |
| | | */ |
| | |
| | | protected JPanel typesPanel = new JPanel(new GridBagLayout()); |
| | | |
| | | /** |
| | | * Message to be displayed to indicate that an index is not configurable. |
| | | * LocalizableMessage to be displayed to indicate that an index is not configurable. |
| | | */ |
| | | protected Message NON_CONFIGURABLE_INDEX = |
| | | protected LocalizableMessage NON_CONFIGURABLE_INDEX = |
| | | INFO_CTRL_PANEL_NON_CONFIGURABLE_INDEX_LABEL.get(); |
| | | |
| | | /** |
| | | * Message to be displayed to indicate that an index has been modified. |
| | | * LocalizableMessage to be displayed to indicate that an index has been modified. |
| | | */ |
| | | protected Message INDEX_MODIFIED = INFO_CTRL_PANEL_INDEX_MODIFIED_LABEL.get(); |
| | | protected LocalizableMessage INDEX_MODIFIED = INFO_CTRL_PANEL_INDEX_MODIFIED_LABEL.get(); |
| | | |
| | | /** |
| | | * Array of checkboxes. |
| | |
| | | /** |
| | | * Custom attributes message. |
| | | */ |
| | | protected Message CUSTOM_ATTRIBUTES = |
| | | protected LocalizableMessage CUSTOM_ATTRIBUTES = |
| | | INFO_CTRL_PANEL_CUSTOM_ATTRIBUTES_LABEL.get(); |
| | | /** |
| | | * Standard attributes message. |
| | | */ |
| | | protected Message STANDARD_ATTRIBUTES = |
| | | protected LocalizableMessage STANDARD_ATTRIBUTES = |
| | | INFO_CTRL_PANEL_STANDARD_ATTRIBUTES_LABEL.get(); |
| | | |
| | | /** |
| | |
| | | * @return a list of error message with the problems encountered in the data |
| | | * provided by the user. |
| | | */ |
| | | protected List<Message> getErrors() |
| | | protected List<LocalizableMessage> getErrors() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | setPrimaryValid(lEntryLimit); |
| | | setPrimaryValid(lType); |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.util.LDIFException; |
| | |
| | | * Returns the title for the progress dialog. |
| | | * @return the title for the progress dialog. |
| | | */ |
| | | protected abstract Message getProgressDialogTitle(); |
| | | protected abstract LocalizableMessage getProgressDialogTitle(); |
| | | /** |
| | | * Returns the LDIF representation of the new entry. |
| | | * @return the LDIF representation of the new entry. |
| | |
| | | * Updates the list of errors by checking the syntax of the entry. |
| | | * @param errors the list of errors that must be updated. |
| | | */ |
| | | protected abstract void checkSyntax(ArrayList<Message> errors); |
| | | protected abstract void checkSyntax(ArrayList<LocalizableMessage> errors); |
| | | |
| | | /** |
| | | * Returns <CODE>true</CODE> if the syntax of the entry must be checked in |
| | |
| | | */ |
| | | public void okClicked() |
| | | { |
| | | final ArrayList<Message> errors = new ArrayList<Message>(); |
| | | final ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | |
| | | if (checkSyntaxBackground()) |
| | | { |
| | |
| | | * task. |
| | | * @param errors the list of errors. |
| | | */ |
| | | private void handleErrorsAndLaunchTask(ArrayList<Message> errors) |
| | | private void handleErrorsAndLaunchTask(ArrayList<LocalizableMessage> errors) |
| | | { |
| | | Entry entry = null; |
| | | if (errors.size() == 0) |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.VLVSortOrderRenderer; |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.DefinedDefaultBehaviorProvider; |
| | | import org.opends.server.admin.std.meta.LocalDBVLVIndexCfgDefn; |
| | | import org.opends.server.admin.std.meta.LocalDBIndexCfgDefn.IndexType; |
| | |
| | | /** |
| | | * Title panel. |
| | | */ |
| | | protected TitlePanel titlePanel = new TitlePanel(Message.EMPTY, |
| | | Message.EMPTY); |
| | | protected TitlePanel titlePanel = new TitlePanel(LocalizableMessage.EMPTY, |
| | | LocalizableMessage.EMPTY); |
| | | /** |
| | | * Name label. |
| | | */ |
| | |
| | | /** |
| | | * Other base DN message. |
| | | */ |
| | | protected final Message OTHER_BASE_DN = |
| | | protected final LocalizableMessage OTHER_BASE_DN = |
| | | INFO_CTRL_PANEL_VLV_OTHER_BASE_DN_LABEL.get(); |
| | | /** |
| | | * Ascending message. |
| | | */ |
| | | protected final Message ASCENDING = |
| | | protected final LocalizableMessage ASCENDING = |
| | | INFO_CTRL_PANEL_VLV_ASCENDING_LABEL.get(); |
| | | /** |
| | | * Descending message. |
| | | */ |
| | | protected final Message DESCENDING = |
| | | protected final LocalizableMessage DESCENDING = |
| | | INFO_CTRL_PANEL_VLV_DESCENDING_LABEL.get(); |
| | | |
| | | /** |
| | | * Custom attributes message. |
| | | */ |
| | | protected Message CUSTOM_ATTRIBUTES = |
| | | protected LocalizableMessage CUSTOM_ATTRIBUTES = |
| | | INFO_CTRL_PANEL_CUSTOM_ATTRIBUTES_LABEL.get(); |
| | | |
| | | /** |
| | | * Standard attributes message. |
| | | */ |
| | | protected Message STANDARD_ATTRIBUTES = |
| | | protected LocalizableMessage STANDARD_ATTRIBUTES = |
| | | INFO_CTRL_PANEL_STANDARD_ATTRIBUTES_LABEL.get(); |
| | | |
| | | /** |
| | |
| | | try |
| | | { |
| | | LDAPFilter ldapFilter = LDAPFilter.decode(f); |
| | | ArrayList<Message> msgs = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> msgs = new ArrayList<LocalizableMessage>(); |
| | | updateIndexRequiredMessages(ldapFilter, msgs); |
| | | if (!msgs.isEmpty()) |
| | | { |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (Message msg : msgs) |
| | | for (LocalizableMessage msg : msgs) |
| | | { |
| | | sb.append("<br>-"+msg); |
| | | } |
| | |
| | | * @param msgs the list of messages to be updated. |
| | | */ |
| | | private void updateIndexRequiredMessages(RawFilter filter, |
| | | Collection<Message> msgs) |
| | | Collection<LocalizableMessage> msgs) |
| | | { |
| | | switch (filter.getFilterType()) |
| | | { |
| | |
| | | IndexType.ORDERING, IndexType.ORDERING, IndexType.PRESENCE, |
| | | IndexType.APPROXIMATE, null |
| | | }; |
| | | Message[] indexTypeNames = {INFO_CTRL_PANEL_VLV_INDEX_EQUALITY_TYPE.get(), |
| | | LocalizableMessage[] indexTypeNames = {INFO_CTRL_PANEL_VLV_INDEX_EQUALITY_TYPE.get(), |
| | | INFO_CTRL_PANEL_VLV_INDEX_SUBSTRING_TYPE.get(), |
| | | INFO_CTRL_PANEL_VLV_INDEX_ORDERING_TYPE.get(), |
| | | INFO_CTRL_PANEL_VLV_INDEX_ORDERING_TYPE.get(), |
| | |
| | | } |
| | | else |
| | | { |
| | | Message type = indexTypeNames[i]; |
| | | LocalizableMessage type = indexTypeNames[i]; |
| | | if (type != null) |
| | | { |
| | | msgs.add(INFO_CTRL_PANEL_MUST_DEFINE_INDEX_TYPE.get( |
| | |
| | | * @param checkName whether the name of the VLV index must be checked or not. |
| | | * @return a list containing the error messages found. |
| | | */ |
| | | protected List<Message> checkErrors(boolean checkName) |
| | | protected List<LocalizableMessage> checkErrors(boolean checkName) |
| | | { |
| | | for (JLabel l : labels) |
| | | { |
| | |
| | | |
| | | BackendDescriptor backend = getBackend(); |
| | | |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | if (checkName) |
| | | { |
| | | String n = name.getText(); |
| | |
| | | import org.opends.guitools.controlpanel.ui.nodes.DndBrowserNodes; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.OpenDsException; |
| | | import org.opends.server.util.ServerConstants; |
| | |
| | | */ |
| | | public void okClicked() |
| | | { |
| | | final ArrayList<Message> errors = new ArrayList<Message>(); |
| | | final ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | BackgroundTask<Void> worker = new BackgroundTask<Void>() |
| | | { |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_ADD_TO_GROUP_TITLE.get(); |
| | | } |
| | |
| | | INFO_CTRL_PANEL_ADD_TO_GROUP_ENTRIES_LABEL.get()); |
| | | add(l, gbc); |
| | | gbc.insets.top = 5; |
| | | entries = Utilities.createNonEditableTextArea(Message.EMPTY, 6, 40); |
| | | entries = Utilities.createNonEditableTextArea(LocalizableMessage.EMPTY, 6, 40); |
| | | scrollEntries = Utilities.createScrollPane(entries); |
| | | gbc.weighty = 0.1; |
| | | gbc.fill = GridBagConstraints.BOTH; |
| | |
| | | add(lGroups, gbc); |
| | | gbc.insets.top = 5; |
| | | gbc.gridwidth = 1; |
| | | groups = Utilities.createTextArea(Message.EMPTY, 8, 40); |
| | | groups = Utilities.createTextArea(LocalizableMessage.EMPTY, 8, 40); |
| | | JScrollPane scrollGroups = Utilities.createScrollPane(groups); |
| | | gbc.weightx = 1.0; |
| | | gbc.weighty = 1.0; |
| | |
| | | } |
| | | } |
| | | |
| | | private void updateErrors(List<Message> errors) |
| | | private void updateErrors(List<LocalizableMessage> errors) |
| | | { |
| | | SwingUtilities.invokeLater(new Runnable() |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private void handleErrorsAndLaunchTask(ArrayList<Message> errors) |
| | | private void handleErrorsAndLaunchTask(ArrayList<LocalizableMessage> errors) |
| | | { |
| | | if (errors.size() == 0) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.components.TitlePanel; |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.Schema; |
| | |
| | | public class AttributeSyntaxPanel extends SchemaElementPanel |
| | | { |
| | | private static final long serialVersionUID = -2426247742251904863L; |
| | | private TitlePanel titlePanel = new TitlePanel(Message.EMPTY, |
| | | Message.EMPTY); |
| | | private TitlePanel titlePanel = new TitlePanel(LocalizableMessage.EMPTY, |
| | | LocalizableMessage.EMPTY); |
| | | private JLabel name = Utilities.createDefaultLabel(); |
| | | private JLabel oid = Utilities.createDefaultLabel(); |
| | | private JLabel description = Utilities.createDefaultLabel(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_ATTRIBUTE_SYNTAX_TITLE.get(); |
| | | } |
| | |
| | | gbc.insets.bottom = 0; |
| | | gbc.insets.top = 8; |
| | | |
| | | Message[] labels = {INFO_CTRL_PANEL_ATTRIBUTE_SYNTAX_NAME.get(), |
| | | LocalizableMessage[] labels = {INFO_CTRL_PANEL_ATTRIBUTE_SYNTAX_NAME.get(), |
| | | INFO_CTRL_PANEL_ATTRIBUTE_SYNTAX_OID.get(), |
| | | INFO_CTRL_PANEL_ATTRIBUTE_SYNTAX_DESCRIPTION.get()}; |
| | | JLabel[] values = {name, oid, description}; |
| | |
| | | { |
| | | n = NOT_APPLICABLE.toString(); |
| | | } |
| | | titlePanel.setDetails(Message.raw(n)); |
| | | titlePanel.setDetails(LocalizableMessage.raw(n)); |
| | | name.setText(n); |
| | | oid.setText(syntax.getOID()); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.IndexTableModel; |
| | | import org.opends.messages.AdminToolMessages; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Panel displaying a table containing the indexes of a backend. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return AdminToolMessages.INFO_CTRL_PANEL_BACKEND_INDEXES_TITLE.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.VLVIndexTableModel; |
| | | import org.opends.messages.AdminToolMessages; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Panel displaying a table containing the VLV indexes of a backend. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return AdminToolMessages.INFO_CTRL_PANEL_BACKEND_VLV_INDEXES_TITLE.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.BackupTableCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.BackupInfo; |
| | | import org.opends.server.types.OpenDsException; |
| | |
| | | * The refreshing list message, displayed when the list of backups is |
| | | * refreshed. |
| | | */ |
| | | protected final Message REFRESHING_LIST = |
| | | protected final LocalizableMessage REFRESHING_LIST = |
| | | INFO_CTRL_PANEL_REFRESHING_LIST_SUMMARY.get(); |
| | | |
| | | /** |
| | | * The message informing that no backups where found. |
| | | */ |
| | | protected final Message NO_BACKUPS_FOUND = |
| | | protected final LocalizableMessage NO_BACKUPS_FOUND = |
| | | INFO_CTRL_PANEL_NO_BACKUPS_FOUND.get(); |
| | | |
| | | /** |
| | |
| | | if (t instanceof OpenDsException) |
| | | { |
| | | OpenDsException e = (OpenDsException)t; |
| | | if (e.getMessageObject().getDescriptor().equals( |
| | | if (StaticUtils.hasDescriptor(e.getMessageObject(), |
| | | ERR_BACKUPDIRECTORY_NO_DESCRIPTOR_FILE)) |
| | | { |
| | | displayError = false; |
| | |
| | | } |
| | | if (displayError) |
| | | { |
| | | Message details = ERR_RESTOREDB_CANNOT_READ_BACKUP_DIRECTORY.get( |
| | | LocalizableMessage details = ERR_RESTOREDB_CANNOT_READ_BACKUP_DIRECTORY.get( |
| | | parentDirectory.getText(), StaticUtils.getExceptionMessage(t)); |
| | | |
| | | updateErrorPane(errorPane, |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.components.ScheduleSummaryPanel; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.tools.BackUpDB; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.BackupInfo; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_BACKUP_TITLE.get(); |
| | | } |
| | |
| | | setPrimaryValid(lBackupOptions); |
| | | backupIDInitialized = false; |
| | | |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | |
| | | if (!allBackends.isSelected()) |
| | | { |
| | |
| | | } |
| | | if (errors.isEmpty()) |
| | | { |
| | | Message initMsg; |
| | | LocalizableMessage initMsg; |
| | | if (allBackends.isSelected()) |
| | | { |
| | | initMsg = INFO_CTRL_PANEL_RUN_BACKUP_ALL_BACKENDS.get(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_BACKUP_TASK_DESCRIPTION.get( |
| | | Utilities.getStringFromCollection(backendSet, ", "), dir); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_OTHER_BASE_DN_TITLE.get(); |
| | | } |
| | |
| | | public void okClicked() |
| | | { |
| | | setPrimaryValid(dnLabel); |
| | | LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | |
| | | if ("".equals(dn.getText().trim())) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.Schema; |
| | | |
| | | /** |
| | |
| | | private void refresh(final boolean closeAndUpdateValue, |
| | | final boolean updateImage) |
| | | { |
| | | final ArrayList<Message> errors = new ArrayList<Message>(); |
| | | final ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | |
| | | setPrimaryValid(useFile); |
| | | setPrimaryValid(useBase64); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_EDIT_BINARY_ATTRIBUTE_TITLE.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.Schema; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_VIEW_BINARY_ATTRIBUTE_TITLE.get(); |
| | | } |
| | |
| | | import org.opends.guitools.controlpanel.ui.nodes.DndBrowserNodes; |
| | | import org.opends.guitools.controlpanel.util.LDAPEntryReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ObjectClass; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_MANAGE_ENTRIES_TITLE.get(); |
| | | } |
| | |
| | | |
| | | private void deleteClicked() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | TreePath[] paths = treePane.getTree().getSelectionPaths(); |
| | | |
| | | if ((paths != null) && (paths.length > 0)) |
| | |
| | | INFO_CTRL_PANEL_VIEW_MENU.get(), |
| | | INFO_CTRL_PANEL_VIEW_MENU_DESCRIPTION.get()); |
| | | menu.setMnemonic(KeyEvent.VK_V); |
| | | Message[] labels = { |
| | | LocalizableMessage[] labels = { |
| | | INFO_CTRL_PANEL_SIMPLIFIED_VIEW_MENU.get(), |
| | | INFO_CTRL_PANEL_ATTRIBUTE_VIEW_MENU.get(), |
| | | INFO_CTRL_PANEL_LDIF_VIEW_MENU.get() |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.TreeCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.guitools.controlpanel.util.ViewPositions; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | /** |
| | | * The pane that is displayed when the user clicks on 'General Monitoring'. |
| | |
| | | |
| | | private boolean ignoreSelectionEvents; |
| | | |
| | | private Message NO_ELEMENT_SELECTED = |
| | | private LocalizableMessage NO_ELEMENT_SELECTED = |
| | | INFO_CTRL_PANEL_GENERAL_MONITORING_NO_ITEM_SELECTED.get(); |
| | | private Message MULTIPLE_ITEMS_SELECTED = |
| | | private LocalizableMessage MULTIPLE_ITEMS_SELECTED = |
| | | INFO_CTRL_PANEL_MULTIPLE_ITEMS_SELECTED_LABEL.get(); |
| | | |
| | | /** |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_GENERAL_MONITORING_TITLE.get(); |
| | | } |
| | |
| | | } |
| | | |
| | | boolean displayErrorPane = false; |
| | | Message errorTitle = Message.EMPTY; |
| | | Message errorDetails = Message.EMPTY; |
| | | LocalizableMessage errorTitle = LocalizableMessage.EMPTY; |
| | | LocalizableMessage errorDetails = LocalizableMessage.EMPTY; |
| | | ServerDescriptor.ServerStatus status = server.getStatus(); |
| | | if (status == ServerDescriptor.ServerStatus.STARTED) |
| | | { |
| | | if (!server.isAuthenticated()) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append( |
| | | INFO_CTRL_PANEL_AUTH_REQUIRED_TO_BROWSE_MONITORING_SUMMARY. |
| | | get()); |
| | |
| | | } |
| | | else if (status == ServerDescriptor.ServerStatus.NOT_CONNECTED_TO_REMOTE) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_DETAILS.get( |
| | | server.getHostname())); |
| | | mb.append("<br><br>"+getAuthenticateHTML()); |
| | |
| | | else |
| | | { |
| | | errorTitle = INFO_CTRL_PANEL_SERVER_NOT_RUNNING_SUMMARY.get(); |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append( |
| | | INFO_CTRL_PANEL_SERVER_MUST_RUN_TO_BROWSE_MONITORING_SUMMARY. |
| | | get()); |
| | |
| | | displayErrorPane = true; |
| | | } |
| | | final boolean fDisplayErrorPane = displayErrorPane; |
| | | final Message fErrorTitle = errorTitle; |
| | | final Message fErrorDetails = errorDetails; |
| | | final LocalizableMessage fErrorTitle = errorTitle; |
| | | final LocalizableMessage fErrorDetails = errorDetails; |
| | | SwingUtilities.invokeLater(new Runnable() |
| | | { |
| | | /** |
| | |
| | | true); |
| | | } |
| | | |
| | | Message[] messages = getNodeMessages(); |
| | | LocalizableMessage[] messages = getNodeMessages(); |
| | | NodeType[] identifiers = getNodeTypes(); |
| | | for (int i=0; i < messages.length; i++) |
| | | { |
| | |
| | | NodeType.ENTRY_CACHES, |
| | | NodeType.DB_ENVIRONMENT |
| | | }; |
| | | Message[] ocPaths = { |
| | | LocalizableMessage[] ocPaths = { |
| | | INFO_CTRL_PANEL_GENERAL_MONITORING_ROOT_TREE_NODE.get(), |
| | | INFO_CTRL_PANEL_SYSTEM_INFORMATION_TREE_NODE.get(), |
| | | INFO_CTRL_PANEL_JVM_MEMORY_USAGE_TREE_NODE.get(), |
| | |
| | | * Returns the labels of the nodes to be displayed. |
| | | * @return the labels of the nodes to be displayed. |
| | | */ |
| | | protected Message[] getNodeMessages() |
| | | protected LocalizableMessage[] getNodeMessages() |
| | | { |
| | | return new Message[] { |
| | | return new LocalizableMessage[] { |
| | | INFO_CTRL_PANEL_SYSTEM_INFORMATION.get(), |
| | | INFO_CTRL_PANEL_JAVA_INFORMATION.get(), |
| | | INFO_CTRL_PANEL_WORK_QUEUE.get(), |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.TreeCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.guitools.controlpanel.util.ViewPositions; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The pane that is displayed when the user clicks on 'Browse Indexes'. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_MANAGE_INDEXES_TITLE.get(); |
| | | } |
| | |
| | | |
| | | private void deleteClicked() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | TreePath[] paths = treePane.getTree().getSelectionPaths(); |
| | | ArrayList<AbstractIndexDescriptor> indexesToDelete = |
| | | new ArrayList<AbstractIndexDescriptor>(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.guitools.controlpanel.util.ViewPositions; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.types.AttributeType; |
| | |
| | | |
| | | private CommonSchemaElements lastCreatedElement; |
| | | |
| | | private final Message NAME = INFO_CTRL_PANEL_SCHEMA_ELEMENT_NAME.get(); |
| | | private final Message TYPE = INFO_CTRL_PANEL_SCHEMA_ELEMENT_TYPE.get(); |
| | | private final Message PARENT_CLASS = INFO_CTRL_PANEL_PARENT_CLASS.get(); |
| | | private final Message CHILD_CLASS = INFO_CTRL_PANEL_CHILD_CLASS.get(); |
| | | private final Message REQUIRED_ATTRIBUTES = |
| | | private final LocalizableMessage NAME = INFO_CTRL_PANEL_SCHEMA_ELEMENT_NAME.get(); |
| | | private final LocalizableMessage TYPE = INFO_CTRL_PANEL_SCHEMA_ELEMENT_TYPE.get(); |
| | | private final LocalizableMessage PARENT_CLASS = INFO_CTRL_PANEL_PARENT_CLASS.get(); |
| | | private final LocalizableMessage CHILD_CLASS = INFO_CTRL_PANEL_CHILD_CLASS.get(); |
| | | private final LocalizableMessage REQUIRED_ATTRIBUTES = |
| | | INFO_CTRL_PANEL_REQUIRED_ATTRIBUTES.get(); |
| | | private final Message OPTIONAL_ATTRIBUTES = |
| | | private final LocalizableMessage OPTIONAL_ATTRIBUTES = |
| | | INFO_CTRL_PANEL_OPTIONAL_ATTRIBUTES.get(); |
| | | |
| | | private CategoryTreeNode attributes = |
| | |
| | | |
| | | private boolean ignoreSelectionEvents; |
| | | |
| | | private Message NO_SCHEMA_ITEM_SELECTED = |
| | | private LocalizableMessage NO_SCHEMA_ITEM_SELECTED = |
| | | INFO_CTRL_PANEL_NO_SCHEMA_ITEM_SELECTED.get(); |
| | | private Message CATEGORY_ITEM_SELECTED = |
| | | private LocalizableMessage CATEGORY_ITEM_SELECTED = |
| | | INFO_CTRL_PANEL_CATEGORY_ITEM_SELECTED.get(); |
| | | private Message MULTIPLE_ITEMS_SELECTED = |
| | | private LocalizableMessage MULTIPLE_ITEMS_SELECTED = |
| | | INFO_CTRL_PANEL_MULTIPLE_SCHEMA_ITEMS_SELECTED.get(); |
| | | |
| | | /** |
| | |
| | | |
| | | filterAttribute = Utilities.createComboBox(); |
| | | filterAttribute.setModel( |
| | | new DefaultComboBoxModel(new Message[]{ |
| | | new DefaultComboBoxModel(new LocalizableMessage[]{ |
| | | NAME, |
| | | TYPE, |
| | | PARENT_CLASS, |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_MANAGE_SCHEMA_TITLE.get(); |
| | | } |
| | |
| | | |
| | | private void deleteClicked() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | TreePath[] paths = treePane.getTree().getSelectionPaths(); |
| | | ArrayList<ObjectClass> ocsToDelete = new ArrayList<ObjectClass>(); |
| | | ArrayList<AttributeType> attrsToDelete = new ArrayList<AttributeType>(); |
| | |
| | | } |
| | | if (errors.isEmpty()) |
| | | { |
| | | Message confirmationMessage = |
| | | LocalizableMessage confirmationMessage = |
| | | getConfirmationMessage(ocsToDelete, attrsToDelete, schema); |
| | | |
| | | LinkedHashSet<AttributeType> orderedAttributes = |
| | |
| | | LinkedHashSet<ObjectClass> orderedObjectClasses = |
| | | getOrderedObjectClassesToDelete(ocsToDelete); |
| | | |
| | | Message title; |
| | | LocalizableMessage title; |
| | | if (orderedAttributes.isEmpty()) |
| | | { |
| | | title = INFO_CTRL_PANEL_DELETE_OBJECTCLASSES_TITLE.get(); |
| | |
| | | return new LinkedHashSet<AttributeType>(lOrderedAttributes); |
| | | } |
| | | |
| | | private Message getConfirmationMessage( |
| | | private LocalizableMessage getConfirmationMessage( |
| | | Collection<ObjectClass> ocsToDelete, |
| | | Collection<AttributeType> attrsToDelete, |
| | | Schema schema) |
| | |
| | | } |
| | | } |
| | | |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | if (!childClasses.isEmpty()) |
| | | { |
| | | TreeSet<String> childNames = new TreeSet<String>(); |
| | |
| | | { |
| | | allNames.add(attrToDelete.getNameOrOID()); |
| | | } |
| | | Message confirmationMessage = |
| | | LocalizableMessage confirmationMessage = |
| | | INFO_CTRL_PANEL_CONFIRMATION_DELETE_SCHEMA_ELEMENTS_MSG.get( |
| | | Utilities.getStringFromCollection(allNames, ", ")); |
| | | mb.append(confirmationMessage); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The panel that displays a configuration attribute definition. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_CONFIGURATION_ATTRIBUTE_TITLE.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The panel that displays a configuration objectclass definition. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_CONFIGURATION_OBJECTCLASS_TITLE.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Dialog used to inform the user that there are unsaved changes in a panel. |
| | |
| | | * @param title the title of the message. |
| | | * @param details the details of the message. |
| | | */ |
| | | public void setMessage(Message title, Message details) |
| | | public void setMessage(LocalizableMessage title, LocalizableMessage details) |
| | | { |
| | | panel.updateConfirmationPane(panel.errorPane, title, |
| | | ColorAndFontConstants.errorTitleFont, details, |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_CONFIRM_INITIALIZE_TITLE.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | |
| | | NoLeftInsetCategoryComboBoxRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.guitools.controlpanel.util.ViewPositions; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | /** |
| | | * Class that displays the monitoring information of connection handlers. |
| | |
| | | allowedChOperations.add(BasicMonitoringAttributes.UNBIND_REQUESTS); |
| | | } |
| | | |
| | | private Message ALL_CONNECTION_HANDLERS = |
| | | private LocalizableMessage ALL_CONNECTION_HANDLERS = |
| | | INFO_CTRL_PANEL_ALL_CONNECTION_HANDLERS.get(); |
| | | |
| | | /** |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_CONNECTION_HANDLER_MONITORING_TITLE.get(); |
| | | } |
| | |
| | | (DefaultComboBoxModel)connectionHandlers.getModel()); |
| | | |
| | | boolean displayErrorPane = false; |
| | | Message errorTitle = Message.EMPTY; |
| | | Message errorDetails = Message.EMPTY; |
| | | LocalizableMessage errorTitle = LocalizableMessage.EMPTY; |
| | | LocalizableMessage errorDetails = LocalizableMessage.EMPTY; |
| | | ServerDescriptor.ServerStatus status = server.getStatus(); |
| | | if (status == ServerDescriptor.ServerStatus.STARTED) |
| | | { |
| | | if (!server.isAuthenticated()) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append( |
| | | INFO_CTRL_PANEL_AUTH_REQUIRED_TO_SEE_TRAFFIC_MONITORING_SUMMARY. |
| | | get()); |
| | |
| | | } |
| | | else if (status == ServerDescriptor.ServerStatus.NOT_CONNECTED_TO_REMOTE) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_DETAILS.get( |
| | | server.getHostname())); |
| | | mb.append("<br><br>"+getAuthenticateHTML()); |
| | |
| | | else |
| | | { |
| | | errorTitle = INFO_CTRL_PANEL_SERVER_NOT_RUNNING_SUMMARY.get(); |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append( |
| | | INFO_CTRL_PANEL_SERVER_MUST_RUN_TO_SEE_TRAFFIC_MONITORING_SUMMARY. |
| | | get()); |
| | |
| | | displayErrorPane = true; |
| | | } |
| | | final boolean fDisplayErrorPane = displayErrorPane; |
| | | final Message fErrorTitle = errorTitle; |
| | | final Message fErrorDetails = errorDetails; |
| | | final LocalizableMessage fErrorTitle = errorTitle; |
| | | final LocalizableMessage fErrorDetails = errorDetails; |
| | | SwingUtilities.invokeLater(new Runnable() |
| | | { |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.event.ConfigChangeListener; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The main panel of the control panel. It contains a split pane. On the left |
| | |
| | | private static final long serialVersionUID = -8939025523701408656L; |
| | | private StatusPanel statusPane; |
| | | private JLabel lAuthenticatedAs = |
| | | Utilities.createInlineHelpLabel(Message.EMPTY); |
| | | Utilities.createInlineHelpLabel(LocalizableMessage.EMPTY); |
| | | |
| | | /** |
| | | * Constructor. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | SchemaElementComboBoxCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | |
| | | private String attrName; |
| | | private ScrollPaneBorderListener scrollListener; |
| | | |
| | | private TitlePanel titlePanel = new TitlePanel(Message.EMPTY, |
| | | Message.EMPTY); |
| | | private TitlePanel titlePanel = new TitlePanel(LocalizableMessage.EMPTY, |
| | | LocalizableMessage.EMPTY); |
| | | private JLabel lName = Utilities.createPrimaryLabel( |
| | | INFO_CTRL_PANEL_ATTRIBUTE_NAME_LABEL.get()); |
| | | private JLabel lSuperior = Utilities.createPrimaryLabel( |
| | |
| | | |
| | | private Set<String> lastAliases = new LinkedHashSet<String>(); |
| | | |
| | | private Message NO_PARENT = INFO_CTRL_PANEL_NO_PARENT_FOR_ATTRIBUTE.get(); |
| | | private Message NO_MATCHING_RULE = |
| | | private LocalizableMessage NO_PARENT = INFO_CTRL_PANEL_NO_PARENT_FOR_ATTRIBUTE.get(); |
| | | private LocalizableMessage NO_MATCHING_RULE = |
| | | INFO_CTRL_PANEL_NO_MATCHING_RULE_FOR_ATTRIBUTE.get(); |
| | | |
| | | private Schema schema; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_CUSTOM_ATTRIBUTE_TITLE.get(); |
| | | } |
| | |
| | | */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | saveChanges(false, errors); |
| | | } |
| | | }); |
| | |
| | | |
| | | JComboBox[] comboBoxes = {parent, syntax, approximate, |
| | | equality, ordering, substring}; |
| | | Message[] defaultValues = {NO_PARENT, Message.EMPTY, NO_MATCHING_RULE, |
| | | LocalizableMessage[] defaultValues = {NO_PARENT, LocalizableMessage.EMPTY, NO_MATCHING_RULE, |
| | | NO_MATCHING_RULE, NO_MATCHING_RULE, NO_MATCHING_RULE |
| | | }; |
| | | SchemaElementComboBoxCellRenderer renderer = new |
| | |
| | | }; |
| | | syntax.addItemListener(itemListener); |
| | | |
| | | Message[] msgs = new Message[] { |
| | | LocalizableMessage[] msgs = new LocalizableMessage[] { |
| | | INFO_CTRL_PANEL_REQUIRED_BY_LABEL.get(), |
| | | INFO_CTRL_PANEL_ALLOWED_BY_LABEL.get() |
| | | }; |
| | |
| | | result = unsavedChangesDlg.getResult(); |
| | | if (result == UnsavedChangesDialog.Result.SAVE) |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | saveChanges(true, errors); |
| | | if (!errors.isEmpty()) |
| | | { |
| | |
| | | { |
| | | n = ""; |
| | | } |
| | | titlePanel.setDetails(Message.raw(n)); |
| | | titlePanel.setDetails(LocalizableMessage.raw(n)); |
| | | name.setText(n); |
| | | |
| | | oid.setText(attr.getOID()); |
| | |
| | | |
| | | private void deleteAttribute() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | Schema schema = getInfo().getServerDescriptor().getSchema(); |
| | | ProgressDialog dlg = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | |
| | | } |
| | | if (errors.isEmpty()) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | |
| | | if (!childAttributes.isEmpty()) |
| | | { |
| | |
| | | Utilities.getStringFromCollection(dependentClasses, ", "))); |
| | | mb.append("<br>"); |
| | | } |
| | | Message confirmationMessage = |
| | | LocalizableMessage confirmationMessage = |
| | | INFO_CTRL_PANEL_CONFIRMATION_DELETE_ATTRIBUTE_DETAILS.get( |
| | | attribute.getNameOrOID()); |
| | | mb.append(confirmationMessage); |
| | |
| | | } |
| | | } |
| | | |
| | | private void saveChanges(boolean modal, ArrayList<Message> errors) |
| | | private void saveChanges(boolean modal, ArrayList<LocalizableMessage> errors) |
| | | { |
| | | // Check if the aliases or the name have changed |
| | | for (JLabel label : labels) |
| | |
| | | setPrimaryValid(label); |
| | | } |
| | | String n = getAttributeName(); |
| | | MessageBuilder err = new MessageBuilder(); |
| | | LocalizableMessageBuilder err = new LocalizableMessageBuilder(); |
| | | if (n.length() == 0) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_ATTRIBUTE_NAME_REQUIRED.get()); |
| | |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_INVALID_ATTRIBUTE_NAME.get(err.toString())); |
| | | setPrimaryInvalid(lName); |
| | | err = new MessageBuilder(); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | | else |
| | | { |
| | | Message elementType = NewAttributePanel.getSchemaElementType(n, schema); |
| | | LocalizableMessage elementType = NewAttributePanel.getSchemaElementType(n, schema); |
| | | if (elementType != null) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_ATTRIBUTE_NAME_ALREADY_IN_USE.get(n, |
| | |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OID_NOT_VALID.get(err.toString())); |
| | | setPrimaryInvalid(lOID); |
| | | err = new MessageBuilder(); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | | else |
| | | { |
| | | Message elementType = NewAttributePanel.getSchemaElementType(n, schema); |
| | | LocalizableMessage elementType = NewAttributePanel.getSchemaElementType(n, schema); |
| | | if (elementType != null) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OID_ALREADY_IN_USE.get(n, |
| | |
| | | } |
| | | if (notPreviouslyDefined) |
| | | { |
| | | Message elementType = |
| | | LocalizableMessage elementType = |
| | | NewAttributePanel.getSchemaElementType(alias, schema); |
| | | if (elementType != null) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer. |
| | | SchemaElementComboBoxCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.ObjectClassType; |
| | |
| | | private String ocName; |
| | | private ScrollPaneBorderListener scrollListener; |
| | | |
| | | private TitlePanel titlePanel = new TitlePanel(Message.EMPTY, Message.EMPTY); |
| | | private TitlePanel titlePanel = new TitlePanel(LocalizableMessage.EMPTY, LocalizableMessage.EMPTY); |
| | | private JLabel lName = Utilities.createPrimaryLabel( |
| | | INFO_CTRL_PANEL_OBJECTCLASS_NAME_LABEL.get()); |
| | | private JLabel lSuperior = Utilities.createPrimaryLabel( |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_CUSTOM_OBJECTCLASS_TITLE.get(); |
| | | } |
| | |
| | | */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | saveChanges(false, errors); |
| | | } |
| | | }); |
| | |
| | | { |
| | | n = NOT_APPLICABLE.toString(); |
| | | } |
| | | titlePanel.setDetails(Message.raw(n)); |
| | | titlePanel.setDetails(LocalizableMessage.raw(n)); |
| | | name.setText(n); |
| | | |
| | | SortableListModel<AttributeType> modelRequired = |
| | |
| | | result = unsavedChangesDlg.getResult(); |
| | | if (result == UnsavedChangesDialog.Result.SAVE) |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | saveChanges(true, errors); |
| | | if (!errors.isEmpty()) |
| | | { |
| | |
| | | |
| | | private void deleteObjectclass() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | ProgressDialog dlg = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), |
| | |
| | | } |
| | | if (errors.size() == 0) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | |
| | | if (!childClasses.isEmpty()) |
| | | { |
| | |
| | | Utilities.getStringFromCollection(childClasses, ", "))); |
| | | mb.append("<br>"); |
| | | } |
| | | Message confirmationMessage = |
| | | LocalizableMessage confirmationMessage = |
| | | INFO_CTRL_PANEL_CONFIRMATION_DELETE_OBJECTCLASS_DETAILS.get( |
| | | ocName); |
| | | mb.append(confirmationMessage); |
| | |
| | | } |
| | | } |
| | | |
| | | private void saveChanges(boolean modal, ArrayList<Message> errors) |
| | | private void saveChanges(boolean modal, ArrayList<LocalizableMessage> errors) |
| | | { |
| | | for (JLabel label : labels) |
| | | { |
| | | setPrimaryValid(label); |
| | | } |
| | | String n = getObjectClassName(); |
| | | MessageBuilder err = new MessageBuilder(); |
| | | LocalizableMessageBuilder err = new LocalizableMessageBuilder(); |
| | | if (n.length() == 0) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OBJECTCLASS_NAME_REQUIRED.get()); |
| | |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_INVALID_OBJECTCLASS_NAME.get(err.toString())); |
| | | setPrimaryInvalid(lName); |
| | | err = new MessageBuilder(); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | | else |
| | | { |
| | | Message elementType = NewAttributePanel.getSchemaElementType(n, schema); |
| | | LocalizableMessage elementType = NewAttributePanel.getSchemaElementType(n, schema); |
| | | if (elementType != null) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OBJECTCLASS_NAME_ALREADY_IN_USE.get(n, |
| | |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OID_NOT_VALID.get(err.toString())); |
| | | setPrimaryInvalid(lOID); |
| | | err = new MessageBuilder(); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | | else |
| | | { |
| | | Message elementType = NewAttributePanel.getSchemaElementType(n, schema); |
| | | LocalizableMessage elementType = NewAttributePanel.getSchemaElementType(n, schema); |
| | | if (elementType != null) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OID_ALREADY_IN_USE.get(n, |
| | |
| | | } |
| | | if (notPreviouslyDefined) |
| | | { |
| | | Message elementType = |
| | | LocalizableMessage elementType = |
| | | NewAttributePanel.getSchemaElementType(alias, schema); |
| | | if (elementType != null) |
| | | { |
| | |
| | | |
| | | |
| | | private void validateSuperiority(ObjectClass superior, |
| | | ArrayList<Message> errors) |
| | | ArrayList<LocalizableMessage> errors) |
| | | { |
| | | if(superior.getNameOrOID().equalsIgnoreCase(objectClass.getNameOrOID())) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.task.DeleteBaseDNAndBackendTask; |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | /** |
| | | * The panel displayed when the user clicks on 'Delete Backend...' in the |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_DELETE_BACKEND_TITLE.get(); |
| | | } |
| | |
| | | * Returns the no backend found label. |
| | | * @return the no backend found label. |
| | | */ |
| | | protected Message getNoElementsFoundLabel() |
| | | protected LocalizableMessage getNoElementsFoundLabel() |
| | | { |
| | | return INFO_CTRL_PANEL_NO_BACKENDS_FOUND_LABEL.get(); |
| | | } |
| | |
| | | * Returns the list label. |
| | | * @return the list label. |
| | | */ |
| | | protected Message getListLabel() |
| | | protected LocalizableMessage getListLabel() |
| | | { |
| | | return INFO_CTRL_PANEL_SELECT_BACKENDS_TO_DELETE.get(); |
| | | } |
| | |
| | | */ |
| | | public void okClicked() |
| | | { |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | ProgressDialog progressDialog = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), getTitle(), getInfo()); |
| | |
| | | } |
| | | if (errors.isEmpty()) |
| | | { |
| | | Message confirmationMessage = getConfirmationMessage(backendsToDelete); |
| | | LocalizableMessage confirmationMessage = getConfirmationMessage(backendsToDelete); |
| | | if (displayConfirmationDialog( |
| | | INFO_CTRL_PANEL_CONFIRMATION_REQUIRED_SUMMARY.get(), |
| | | confirmationMessage)) |
| | |
| | | } |
| | | } |
| | | |
| | | private Message getConfirmationMessage( |
| | | private LocalizableMessage getConfirmationMessage( |
| | | Collection<BackendDescriptor> backendsToDelete) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(INFO_CTRL_PANEL_CONFIRMATION_DELETE_BACKENDS_DETAILS.get()); |
| | | for (BackendDescriptor backend : backendsToDelete) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.ui.renderer.CustomListCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.types.DN; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_DELETE_BASE_DN_TITLE.get(); |
| | | } |
| | |
| | | * Returns the no backend found label. |
| | | * @return the no backend found label. |
| | | */ |
| | | protected Message getNoElementsFoundLabel() |
| | | protected LocalizableMessage getNoElementsFoundLabel() |
| | | { |
| | | return INFO_CTRL_PANEL_NO_BASE_DNS_FOUND_LABEL.get(); |
| | | } |
| | |
| | | * Returns the list label. |
| | | * @return the list label. |
| | | */ |
| | | protected Message getListLabel() |
| | | protected LocalizableMessage getListLabel() |
| | | { |
| | | return INFO_CTRL_PANEL_SELECT_BASE_DNS_TO_DELETE.get(); |
| | | } |
| | |
| | | */ |
| | | public void okClicked() |
| | | { |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | ProgressDialog progressDialog = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), getTitle(), getInfo()); |
| | |
| | | } |
| | | if (errors.isEmpty()) |
| | | { |
| | | Message confirmationMessage = getConfirmationMessage(baseDNsToDelete); |
| | | LocalizableMessage confirmationMessage = getConfirmationMessage(baseDNsToDelete); |
| | | if (displayConfirmationDialog( |
| | | INFO_CTRL_PANEL_CONFIRMATION_REQUIRED_SUMMARY.get(), |
| | | confirmationMessage)) |
| | |
| | | } |
| | | } |
| | | |
| | | private Message getConfirmationMessage( |
| | | private LocalizableMessage getConfirmationMessage( |
| | | Collection<BaseDNDescriptor> baseDNsToDelete) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | Map<String, Set<BaseDNDescriptor>> hmBackends = |
| | | new HashMap<String, Set<BaseDNDescriptor>>(); |
| | | for (BaseDNDescriptor baseDN : baseDNsToDelete) |
| | |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.LDAPEntryReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getProgressDialogTitle() |
| | | protected LocalizableMessage getProgressDialogTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_DUPLICATE_ENTRY_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_DUPLICATE_ENTRY_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected void checkSyntax(ArrayList<Message> errors) |
| | | protected void checkSyntax(ArrayList<LocalizableMessage> errors) |
| | | { |
| | | int origSize = errors.size(); |
| | | String name = this.name.getText().trim(); |
| | |
| | | { |
| | | if (throwable != null) |
| | | { |
| | | Message title = INFO_CTRL_PANEL_ERROR_SEARCHING_ENTRY_TITLE.get(); |
| | | Message details = |
| | | LocalizableMessage title = INFO_CTRL_PANEL_ERROR_SEARCHING_ENTRY_TITLE.get(); |
| | | LocalizableMessage details = |
| | | ERR_CTRL_PANEL_ERROR_SEARCHING_ENTRY.get(node.getDN(), |
| | | throwable.toString()); |
| | | displayErrorMessage(title, details); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | /** |
| | | * Class used to display an collection of error messages. |
| | |
| | | public class ErrorPanel extends StatusGenericPanel |
| | | { |
| | | private static final long serialVersionUID = -4494826284037288552L; |
| | | private Message title; |
| | | private LocalizableMessage title; |
| | | /** |
| | | * Constructor. |
| | | * @param title the title to be displayed in the dialog. |
| | | * @param errors the collection of errors to be displayed. |
| | | */ |
| | | public ErrorPanel(Message title, Collection<Message> errors) |
| | | public ErrorPanel(LocalizableMessage title, Collection<LocalizableMessage> errors) |
| | | { |
| | | super(); |
| | | this.title = title; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return title; |
| | | } |
| | | |
| | | private void createLayout(Collection<Message> errors) |
| | | private void createLayout(Collection<LocalizableMessage> errors) |
| | | { |
| | | GridBagConstraints gbc = new GridBagConstraints(); |
| | | addErrorPane(gbc); |
| | | |
| | | errorPane.setVisible(true); |
| | | |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | for (Message error : errors) |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | for (LocalizableMessage error : errors) |
| | | { |
| | | if (mb.length() > 0) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.browser.BasicNodeError; |
| | | import org.opends.guitools.controlpanel.browser.ReferralLimitExceededException; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.types.LDAPURL; |
| | | import org.opends.server.types.OpenDsException; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_ERROR_SEARCHING_ENTRY_TITLE.get(); |
| | | } |
| | |
| | | */ |
| | | public void setError(String dn, Throwable t) |
| | | { |
| | | Message title = INFO_CTRL_PANEL_ERROR_SEARCHING_ENTRY_TITLE.get(); |
| | | Message details; |
| | | LocalizableMessage title = INFO_CTRL_PANEL_ERROR_SEARCHING_ENTRY_TITLE.get(); |
| | | LocalizableMessage details; |
| | | if (t instanceof OpenDsException) |
| | | { |
| | | details = ERR_CTRL_PANEL_ERROR_SEARCHING_ENTRY.get(dn, |
| | |
| | | public void setReferralError(String dn, String[] referrals, |
| | | BasicNodeError error) |
| | | { |
| | | Message title = INFO_CTRL_PANEL_ERROR_RESOLVING_REFERRAL_TITLE.get(); |
| | | MessageBuilder details = new MessageBuilder(); |
| | | LocalizableMessage title = INFO_CTRL_PANEL_ERROR_RESOLVING_REFERRAL_TITLE.get(); |
| | | LocalizableMessageBuilder details = new LocalizableMessageBuilder(); |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (String ref: referrals) |
| | | { |
| | |
| | | if (ex instanceof NamingException) |
| | | { |
| | | Object arg = error.getArg(); |
| | | Message msg = null; |
| | | LocalizableMessage msg = null; |
| | | if (arg != null) |
| | | { |
| | | // Maybe is the LDAPURL |
| | |
| | | String hostPort = url.getHost()+":"+url.getPort(); |
| | | if (ex instanceof ReferralLimitExceededException) |
| | | { |
| | | msg = Message.raw(ex.getLocalizedMessage()); |
| | | msg = LocalizableMessage.raw(ex.getLocalizedMessage()); |
| | | } |
| | | else if (ex instanceof NameNotFoundException) |
| | | { |
| | |
| | | { |
| | | if (ex instanceof ReferralLimitExceededException) |
| | | { |
| | | msg = Message.raw(ex.getLocalizedMessage()); |
| | | msg = LocalizableMessage.raw(ex.getLocalizedMessage()); |
| | | } |
| | | else if (ex instanceof NameNotFoundException) |
| | | { |
| | |
| | | { |
| | | if (ex instanceof ReferralLimitExceededException) |
| | | { |
| | | msg = Message.raw(ex.getLocalizedMessage()); |
| | | msg = LocalizableMessage.raw(ex.getLocalizedMessage()); |
| | | } |
| | | else |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.ui.components.ScheduleSummaryPanel; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.tools.ExportLDIF; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_EXPORT_LDIF_TITLE.get(); |
| | | } |
| | |
| | | setPrimaryValid(lBackend); |
| | | setPrimaryValid(lFile); |
| | | setPrimaryValid(lExportOptions); |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | |
| | | String backendName = (String)backends.getSelectedItem(); |
| | | if (backendName == null) |
| | |
| | | String cols = wrapColumn.getText(); |
| | | int minValue = 1; |
| | | int maxValue = 1000; |
| | | Message errMsg = ERR_CTRL_PANEL_INVALID_WRAP_COLUMN.get(minValue, |
| | | LocalizableMessage errMsg = ERR_CTRL_PANEL_INVALID_WRAP_COLUMN.get(minValue, |
| | | maxValue); |
| | | int size1 = errors.size(); |
| | | checkIntValue(errors, cols, minValue, maxValue, errMsg); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_EXPORT_TASK_DESCRIPTION.get( |
| | | backendSet.iterator().next(), fileName); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | |
| | | import javax.swing.border.EmptyBorder; |
| | | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Abstract class used to refactor some code among the panels that display the |
| | |
| | | /** |
| | | * The message to express that the value was not found. |
| | | */ |
| | | protected static Message NO_VALUE_SET = |
| | | protected static LocalizableMessage NO_VALUE_SET = |
| | | INFO_CTRL_PANEL_NO_MONITORING_VALUE.get(); |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return Message.EMPTY; |
| | | return LocalizableMessage.EMPTY; |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | /** |
| | |
| | | * @param msg the message. |
| | | * |
| | | */ |
| | | public void displayMessage(Message msg) |
| | | public void displayMessage(LocalizableMessage msg) |
| | | { |
| | | noEntryPanel.setMessage(msg); |
| | | ((CardLayout)mainPanel.getLayout()).show(mainPanel, getTitle(noEntryPanel)); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return Message.EMPTY; |
| | | return LocalizableMessage.EMPTY; |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.ui.UIFactory; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.tools.ImportLDIF; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_IMPORT_LDIF_TITLE.get(); |
| | | } |
| | |
| | | setPrimaryValid(lRejectsFile); |
| | | setPrimaryValid(lSkipsFile); |
| | | setPrimaryValid(lThreads); |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | |
| | | String backendName = (String)backends.getSelectedItem(); |
| | | if (backendName == null) |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_IMPORT_TASK_DESCRIPTION.get(fileName, |
| | | backendSet.iterator().next()); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | |
| | | for (DN baseDN : replicatedBaseDNs) |
| | | { |
| | | Message msg = INFO_PROGRESS_INITIALIZING_SUFFIX.get(baseDN.toString(), |
| | | LocalizableMessage msg = INFO_PROGRESS_INITIALIZING_SUFFIX.get(baseDN.toString(), |
| | | ConnectionUtils.getHostPort(getInfo().getDirContext())); |
| | | getProgressDialog().appendProgressHtml(Utilities.applyFont( |
| | | msg.toString()+"<br>", ColorAndFontConstants.progressFont)); |
| | |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.ui.components.BasicExpander; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.protocols.ldap.LDAPFilter; |
| | | import org.opends.server.types.DN; |
| | |
| | | gbc.gridx = 1; |
| | | gbc.weightx = 1.0; |
| | | gbc.insets.left = 10; |
| | | dnsToInclude = Utilities.createTextArea(Message.EMPTY, 5, 25); |
| | | dnsToInclude = Utilities.createTextArea(LocalizableMessage.EMPTY, 5, 25); |
| | | final JScrollPane scrollDns = Utilities.createScrollPane(dnsToInclude); |
| | | panel.add(scrollDns, gbc); |
| | | lDnsToInclude.setLabelFor(dnsToInclude); |
| | |
| | | gbc.gridx = 1; |
| | | gbc.weightx = 1.0; |
| | | gbc.insets.left = 10; |
| | | dnsToExclude = Utilities.createTextArea(Message.EMPTY, 5, 0); |
| | | dnsToExclude = Utilities.createTextArea(LocalizableMessage.EMPTY, 5, 0); |
| | | final JScrollPane scrollDns = Utilities.createScrollPane(dnsToExclude); |
| | | lDnsToExclude.setLabelFor(dnsToExclude); |
| | | panel.add(scrollDns, gbc); |
| | |
| | | * @param backendName the name of the backend where the operation associated |
| | | * with the panel applies (used to generate the error messages). |
| | | */ |
| | | protected void updateIncludeExclude(Collection<Message> errors, |
| | | protected void updateIncludeExclude(Collection<LocalizableMessage> errors, |
| | | String backendName) |
| | | { |
| | | updateErrors(lDnsToInclude, dnsToInclude, lAttributesToInclude, |
| | |
| | | |
| | | private void updateErrors(JLabel lDns, JTextComponent dns, JLabel lAttributes, |
| | | JTextComponent attributes, JLabel lFilter, JTextComponent filter, |
| | | Collection<Message> errors, String backendName) |
| | | Collection<LocalizableMessage> errors, String backendName) |
| | | { |
| | | setPrimaryValid(lDns); |
| | | setPrimaryValid(lAttributes); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.VLVIndexDescriptor; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.event.IndexSelectionListener; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The panel on the right of the 'Manage Indexes' panel. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_INDEX_BROWSER_RIGHT_PANEL_TITLE.get(); |
| | | } |
| | |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.util.ConfigReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.client.ManagementContext; |
| | | import org.opends.server.admin.client.ldap.JNDIDirContextAdaptor; |
| | | import org.opends.server.admin.client.ldap.LDAPManagementContext; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_INDEX_PANEL_TITLE.get(); |
| | | } |
| | |
| | | |
| | | private void deleteIndex() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | ProgressDialog dlg = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), |
| | |
| | | return; |
| | | } |
| | | |
| | | List<Message> errors = getErrors(); |
| | | List<LocalizableMessage> errors = getErrors(); |
| | | |
| | | if (errors.isEmpty()) |
| | | { |
| | |
| | | setPrimaryValid(lType); |
| | | name.setText(index.getName()); |
| | | backendName.setText(index.getBackend().getBackendID()); |
| | | titlePanel.setDetails(Message.raw(index.getName())); |
| | | titlePanel.setDetails(LocalizableMessage.raw(index.getName())); |
| | | entryLimit.setText(String.valueOf(index.getEntryLimit())); |
| | | approximate.setSelected(false); |
| | | equality.setSelected(false); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_MODIFY_INDEX_TASK_DESCRIPTION.get(attributeName, |
| | | backendName); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.LDAPEntryTableCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.Installation; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.tools.JavaPropertiesTool; |
| | |
| | | |
| | | private boolean previousLocal = true; |
| | | |
| | | private Message READING_JAVA_SETTINGS = |
| | | private LocalizableMessage READING_JAVA_SETTINGS = |
| | | INFO_CTRL_PANEL_READING_JAVA_SETTINGS_SUMMARY.get(); |
| | | |
| | | JComponent[] comps; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_JAVA_PROPERTIES_TITLE.get(); |
| | | } |
| | |
| | | |
| | | lJavaHome = Utilities.createPrimaryLabel( |
| | | INFO_CTRL_PANEL_JAVA_HOME_LABEL.get()); |
| | | useOpenDSJavaHome = Utilities.createRadioButton(Message.EMPTY); |
| | | useOpenDSJavaHome = Utilities.createRadioButton(LocalizableMessage.EMPTY); |
| | | useOpenDSJavaHome.setOpaque(false); |
| | | useOpenDSJavaHome.getAccessibleContext().setAccessibleName( |
| | | INFO_CTRL_PANEL_USE_OPENDS_JAVA_HOME.get().toString()+" "+ |
| | |
| | | gbc.weightx = 0.0; |
| | | gbc.insets.top = 10; |
| | | gbc.gridwidth = 1; |
| | | useSpecifiedJavaHome = Utilities.createRadioButton(Message.EMPTY); |
| | | useSpecifiedJavaHome = Utilities.createRadioButton(LocalizableMessage.EMPTY); |
| | | useSpecifiedJavaHome.setOpaque(false); |
| | | useSpecifiedJavaHome.getAccessibleContext().setAccessibleName( |
| | | INFO_CTRL_PANEL_USE_SPECIFIED_OPENDS_JAVA_HOME.get().toString() + |
| | |
| | | |
| | | lJavaArgs = Utilities.createPrimaryLabel( |
| | | INFO_CTRL_PANEL_JAVA_ARGUMENTS_LABEL.get()); |
| | | useSpecifiedJavaArgs = Utilities.createRadioButton(Message.EMPTY); |
| | | useSpecifiedJavaArgs = Utilities.createRadioButton(LocalizableMessage.EMPTY); |
| | | useSpecifiedJavaArgs.getAccessibleContext().setAccessibleName( |
| | | INFO_CTRL_PANEL_USE_OPENDS_JAVA_ARGS.get().toString() + |
| | | " "+INFO_CTRL_PANEL_USE_OPENDS_JAVA_ARGS_HELP.get()); |
| | | useSpecifiedJavaArgs.setOpaque(false); |
| | | useOpenDSJavaArgs = Utilities.createRadioButton(Message.EMPTY); |
| | | useOpenDSJavaArgs = Utilities.createRadioButton(LocalizableMessage.EMPTY); |
| | | useOpenDSJavaArgs.setOpaque(false); |
| | | lJavaArgs.setLabelFor(useOpenDSJavaArgs); |
| | | gbc.gridx = 0; |
| | |
| | | { |
| | | arg = t.toString(); |
| | | } |
| | | Message title = |
| | | LocalizableMessage title = |
| | | ERR_CTRL_PANEL_ERR_READING_JAVA_SETTINGS_SUMMARY.get(); |
| | | Message details = |
| | | LocalizableMessage details = |
| | | ERR_CTRL_PANEL_READING_JAVA_SETTINGS_DETAILS.get(arg); |
| | | updateErrorPane(errorPane, title, |
| | | ColorAndFontConstants.errorTitleFont, details, |
| | |
| | | { |
| | | editor.stopCellEditing(); |
| | | |
| | | final ArrayList<Message> javaHomeErrors = new ArrayList<Message>(); |
| | | final ArrayList<LocalizableMessage> javaHomeErrors = new ArrayList<LocalizableMessage>(); |
| | | String f = javaHome.getText().trim(); |
| | | if (f.length() > 0) |
| | | { |
| | |
| | | disableComponents(); |
| | | lInitContents.setText( |
| | | INFO_CTRL_PANEL_CHECKING_JAVA_OPTIONS_SUMMARY.get().toString()); |
| | | BackgroundTask<List<Message>> worker = |
| | | new BackgroundTask<List<Message>>() |
| | | BackgroundTask<List<LocalizableMessage>> worker = |
| | | new BackgroundTask<List<LocalizableMessage>>() |
| | | { |
| | | private boolean isConfirmation = false; |
| | | @Override |
| | | public List<Message> processBackgroundTask() throws Throwable |
| | | public List<LocalizableMessage> processBackgroundTask() throws Throwable |
| | | { |
| | | String[] jvms; |
| | | String userJVM = javaHome.getText(); |
| | | ArrayList<Message> errorMessages = new ArrayList<Message>(); |
| | | ArrayList<Message> confirmationMessages = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errorMessages = new ArrayList<LocalizableMessage>(); |
| | | ArrayList<LocalizableMessage> confirmationMessages = new ArrayList<LocalizableMessage>(); |
| | | String defaultJVM = System.getenv(SetupUtils.OPENDJ_JAVA_HOME); |
| | | if (defaultJVM == null) |
| | | { |
| | |
| | | if (notWorkingArgs.size() > 0) |
| | | { |
| | | File javaFile = getJavaFile(new File(jvm)); |
| | | Message confirmationMessage; |
| | | LocalizableMessage confirmationMessage; |
| | | if (useSpecifiedJavaArgs.isSelected()) |
| | | { |
| | | confirmationMessage = |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void backgroundTaskCompleted(List<Message> returnValue, |
| | | public void backgroundTaskCompleted(List<LocalizableMessage> returnValue, |
| | | Throwable t) |
| | | { |
| | | if (t == null) |
| | |
| | | { |
| | | arg = t.toString(); |
| | | } |
| | | Message title = |
| | | LocalizableMessage title = |
| | | ERR_CTRL_PANEL_ERROR_CHECKING_JAVA_SETTINGS_SUMMARY.get(); |
| | | Message details = |
| | | LocalizableMessage details = |
| | | ERR_CTRL_PANEL_ERROR_CHECKING_JAVA_SETTINGS_DETAILS.get(arg); |
| | | updateErrorPane(errorPane, title, |
| | | ColorAndFontConstants.errorTitleFont, details, |
| | |
| | | else |
| | | { |
| | | ArrayList<String> s = new ArrayList<String>(); |
| | | for (Message msg : javaHomeErrors) |
| | | for (LocalizableMessage msg : javaHomeErrors) |
| | | { |
| | | s.add(msg.toString()); |
| | | } |
| | | ArrayList<Message> msgs = new ArrayList<Message>(); |
| | | Message msg = ERR_CTRL_PANEL_GENERIC_ERROR_FALLBACK_JAVAHOME.get( |
| | | ArrayList<LocalizableMessage> msgs = new ArrayList<LocalizableMessage>(); |
| | | LocalizableMessage msg = ERR_CTRL_PANEL_GENERIC_ERROR_FALLBACK_JAVAHOME.get( |
| | | f, Utilities.getStringFromCollection(s, "<br>-")); |
| | | msgs.add(msg); |
| | | displayErrorDialog(msgs); |
| | |
| | | |
| | | private void launchTask() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | ProgressDialog dlg = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_UPDATE_JAVA_SETTINGS_TASK_DESCRIPTION.get(); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (!isServerRunning()) |
| | |
| | | import org.opends.guitools.controlpanel.task.ModifyEntryTask; |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.Constants; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.types.DN; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_EDIT_LDAP_ENTRY_TITLE.get(); |
| | | } |
| | |
| | | private void saveChanges(boolean modal) |
| | | { |
| | | newTask = null; |
| | | final ArrayList<Message> errors = new ArrayList<Message>(); |
| | | final ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | // Check that the entry is correct. |
| | | try |
| | | { |
| | |
| | | |
| | | private void deleteEntry() |
| | | { |
| | | final ArrayList<Message> errors = new ArrayList<Message>(); |
| | | final ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | // Check that the entry is correct. |
| | | // Rely in numsubordinates and hassubordinates |
| | | boolean isLeaf = !BrowserController.getHasSubOrdinates(searchResult); |
| | | |
| | | if (treePath != null) |
| | | { |
| | | Message title = isLeaf ? INFO_CTRL_PANEL_DELETING_ENTRY_TITLE.get() : |
| | | LocalizableMessage title = isLeaf ? INFO_CTRL_PANEL_DELETING_ENTRY_TITLE.get() : |
| | | INFO_CTRL_PANEL_DELETING_SUBTREE_TITLE.get(); |
| | | ProgressDialog dlg = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | |
| | | } |
| | | if (errors.size() == 0) |
| | | { |
| | | Message confirmationMessage = |
| | | LocalizableMessage confirmationMessage = |
| | | isLeaf ? INFO_CTRL_PANEL_DELETE_ENTRY_CONFIRMATION_DETAILS.get( |
| | | searchResult.getDN()) : |
| | | INFO_CTRL_PANEL_DELETE_SUBTREE_CONFIRMATION_DETAILS.get( |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * A basic panel that contains a browser. It is used in general in panels that |
| | |
| | | */ |
| | | public class LDAPEntrySelectionPanel extends AbstractBrowseEntriesPanel |
| | | { |
| | | private Message title; |
| | | private LocalizableMessage title; |
| | | private Filter f; |
| | | |
| | | private String[] dns; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return title; |
| | | } |
| | |
| | | * Sets the title that will be displayed in the dialog containing this panel. |
| | | * @param title the title. |
| | | */ |
| | | public void setTitle(Message title) |
| | | public void setTitle(LocalizableMessage title) |
| | | { |
| | | this.title = title; |
| | | Window w = Utilities.getParentDialog(this); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012 ForgeRock AS |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.CustomSearchResult; |
| | | import org.opends.guitools.controlpanel.task.OfflineUpdateException; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.OpenDsException; |
| | |
| | | gbc.gridy ++; |
| | | gbc.insets.top = 10; |
| | | |
| | | editableAttributes = Utilities.createTextArea(Message.EMPTY, 20, 30); |
| | | editableAttributes = Utilities.createTextArea(LocalizableMessage.EMPTY, 20, 30); |
| | | editableAttributes.getDocument().addDocumentListener(new DocumentListener() |
| | | { |
| | | @Override |
| | |
| | | gbc.gridy ++; |
| | | add(lReadOnly, gbc); |
| | | gbc.insets.top = 5; |
| | | readOnlyAttributes = Utilities.createNonEditableTextArea(Message.EMPTY, 10, |
| | | readOnlyAttributes = Utilities.createNonEditableTextArea(LocalizableMessage.EMPTY, 10, |
| | | 30); |
| | | gbc.weightx = 1.0; |
| | | gbc.weighty = 0.4; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.task.OnlineUpdateException; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.Installation; |
| | | import org.opends.quicksetup.UserData; |
| | | import org.opends.quicksetup.UserDataCertificateException; |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.OpenDsException; |
| | | import org.opends.server.util.DynamicConstants; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | /** |
| | | * The panel that appears when the user is asked to provide authentication. |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_LOCAL_OR_REMOTE_PANEL_TITLE.get(); |
| | | } |
| | |
| | | setPrimaryValid(portLabel); |
| | | setPrimaryValid(dnLabel); |
| | | setPrimaryValid(pwdLabel); |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | |
| | | boolean dnInvalid = false; |
| | | boolean pwdInvalid = false; |
| | |
| | | } |
| | | else |
| | | { |
| | | Message msg = Utils.getThrowableMsg( |
| | | LocalizableMessage msg = Utils.getThrowableMsg( |
| | | INFO_ERROR_CONNECTING_TO_LOCAL.get(), throwable); |
| | | errors.add(msg); |
| | | } |
| | |
| | | else |
| | | { |
| | | ArrayList<String> stringErrors = new ArrayList<String>(); |
| | | for (Message err : errors) |
| | | for (LocalizableMessage err : errors) |
| | | { |
| | | stringErrors.add(err.toString()); |
| | | } |
| | |
| | | |
| | | private void checkVersion(InitialLdapContext ctx) throws OpenDsException |
| | | { |
| | | Message msg = null; |
| | | LocalizableMessage msg = null; |
| | | try |
| | | { |
| | | /* |
| | |
| | | OpenDsException oe = (OpenDsException)t; |
| | | if (oe.getMessageObject() != null) |
| | | { |
| | | if (oe.getMessageObject().getDescriptor().equals |
| | | (ERR_INCOMPATIBLE_VERSION_IN_REMOTE_SERVER) || |
| | | oe.getMessageObject().getDescriptor().equals |
| | | (ERR_VERSION_IN_REMOTE_SERVER_NOT_FOUND) || |
| | | oe.getMessageObject().getDescriptor().equals |
| | | (ERR_NOT_SAME_PRODUCT_IN_REMOTE_SERVER_NOT_FOUND)) |
| | | LocalizableMessage msg = oe.getMessageObject(); |
| | | if (StaticUtils.hasDescriptor(msg, ERR_INCOMPATIBLE_VERSION_IN_REMOTE_SERVER) || |
| | | StaticUtils.hasDescriptor(msg, ERR_VERSION_IN_REMOTE_SERVER_NOT_FOUND) || |
| | | StaticUtils.hasDescriptor(msg, ERR_NOT_SAME_PRODUCT_IN_REMOTE_SERVER_NOT_FOUND)) |
| | | { |
| | | isVersionException = true; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.UserDataCertificateException; |
| | | import org.opends.quicksetup.ui.CertificateDialog; |
| | | import org.opends.quicksetup.util.UIKeyStore; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_LOGIN_PANEL_TITLE.get(); |
| | | } |
| | |
| | | { |
| | | setPrimaryValid(dnLabel); |
| | | setPrimaryValid(pwdLabel); |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | |
| | | boolean dnInvalid = false; |
| | | boolean pwdInvalid = false; |
| | |
| | | } |
| | | else |
| | | { |
| | | Message msg = Utils.getThrowableMsg( |
| | | LocalizableMessage msg = Utils.getThrowableMsg( |
| | | INFO_ERROR_CONNECTING_TO_LOCAL.get(), throwable); |
| | | errors.add(msg); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.components.ActionButton; |
| | | import org.opends.guitools.controlpanel.ui.components.CategoryPanel; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The panel on the left side of the main Control Center dialog. It contains |
| | |
| | | protected ArrayList<Category> createCategories() |
| | | { |
| | | ArrayList<Category> categories = new ArrayList<Category>(); |
| | | Message[][] labels; |
| | | LocalizableMessage[][] labels; |
| | | if (Utilities.isWindows()) |
| | | { |
| | | labels = new Message[][] { |
| | | labels = new LocalizableMessage[][] { |
| | | { |
| | | INFO_CTRL_PANEL_CATEGORY_DIRECTORY_DATA.get(), |
| | | INFO_CTRL_PANEL_ACTION_MANAGE_ENTRIES.get(), |
| | |
| | | } |
| | | else |
| | | { |
| | | labels = new Message[][] { |
| | | labels = new LocalizableMessage[][] { |
| | | { |
| | | INFO_CTRL_PANEL_CATEGORY_DIRECTORY_DATA.get(), |
| | | INFO_CTRL_PANEL_ACTION_MANAGE_ENTRIES.get(), |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return null; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The menu bar that appears on the main panel. |
| | |
| | | if (runningTasks.size() > 0) |
| | | { |
| | | String allTasks = Utilities.getStringFromCollection(runningTasks, "<br>"); |
| | | Message title = INFO_CTRL_PANEL_CONFIRMATION_REQUIRED_SUMMARY.get(); |
| | | Message msg = |
| | | LocalizableMessage title = INFO_CTRL_PANEL_CONFIRMATION_REQUIRED_SUMMARY.get(); |
| | | LocalizableMessage msg = |
| | | INFO_CTRL_PANEL_RUNNING_TASKS_CONFIRMATION_DETAILS.get(allTasks); |
| | | confirmed = Utilities.displayConfirmationDialog( |
| | | Utilities.getParentDialog(this), title, msg); |
| | |
| | | if (runningTasks.size() > 0) |
| | | { |
| | | String allTasks = Utilities.getStringFromCollection(runningTasks, "<br>"); |
| | | Message title = INFO_CTRL_PANEL_CONFIRMATION_REQUIRED_SUMMARY.get(); |
| | | Message msg = |
| | | LocalizableMessage title = INFO_CTRL_PANEL_CONFIRMATION_REQUIRED_SUMMARY.get(); |
| | | LocalizableMessage msg = |
| | | INFO_CTRL_PANEL_RUNNING_TASKS_CHANGE_SERVER_CONFIRMATION_DETAILS.get( |
| | | allTasks); |
| | | confirmed = Utilities.displayConfirmationDialog( |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.TaskCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.ConfigFromFile; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.tools.tasks.TaskEntry; |
| | |
| | | |
| | | private ManageTasksMenuBar menuBar; |
| | | |
| | | private MonitoringAttributesViewPanel<Message> operationViewPanel; |
| | | private MonitoringAttributesViewPanel<LocalizableMessage> operationViewPanel; |
| | | private GenericDialog operationViewDlg; |
| | | |
| | | private JPanel detailsPanel; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_TASK_TO_SCHEDULE_LIST_TITLE.get(); |
| | | } |
| | |
| | | logsLabel.setFont(ColorAndFontConstants.titleFont); |
| | | add(logsLabel, gbc); |
| | | |
| | | logs = Utilities.createNonEditableTextArea(Message.EMPTY, 5, 50); |
| | | logs = Utilities.createNonEditableTextArea(LocalizableMessage.EMPTY, 5, 50); |
| | | logs.setFont(ColorAndFontConstants.defaultFont); |
| | | gbc.fill = GridBagConstraints.BOTH; |
| | | gbc.weightx = 1.0; |
| | |
| | | else |
| | | { |
| | | TaskEntry taskEntry = tasks.iterator().next(); |
| | | Map<Message,List<String>> taskSpecificAttrs = |
| | | Map<LocalizableMessage,List<String>> taskSpecificAttrs = |
| | | taskEntry.getTaskSpecificAttributeValuePairs(); |
| | | List<Message> lastLogMessages = taskEntry.getLogMessages(); |
| | | List<LocalizableMessage> lastLogMessages = taskEntry.getLogMessages(); |
| | | if (!lastLogMessages.isEmpty()) |
| | | { |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (Message msg : lastLogMessages) |
| | | for (LocalizableMessage msg : lastLogMessages) |
| | | { |
| | | if (sb.length() != 0) |
| | | { |
| | |
| | | gbc.fill = GridBagConstraints.NONE; |
| | | gbc.anchor = GridBagConstraints.NORTHWEST; |
| | | gbc.insets.top = 10; |
| | | for (Message label : taskSpecificAttrs.keySet()) |
| | | for (LocalizableMessage label : taskSpecificAttrs.keySet()) |
| | | { |
| | | List<String> values = taskSpecificAttrs.get(label); |
| | | gbc.gridx = 0; |
| | |
| | | "Completion Time", |
| | | "Dependency ID", |
| | | "Failed Dependency Action", |
| | | "Log Message. Should be pretty long"+ |
| | | "Log Message. Should be pretty long"+ |
| | | "Log Message. Should be pretty long"+ |
| | | "Log Message. Should be pretty long"+ |
| | | "Log Message. Should be pretty long", |
| | | "Log LocalizableMessage. Should be pretty long"+ |
| | | "Log LocalizableMessage. Should be pretty long"+ |
| | | "Log LocalizableMessage. Should be pretty long"+ |
| | | "Log LocalizableMessage. Should be pretty long"+ |
| | | "Log LocalizableMessage. Should be pretty long", |
| | | "Notify On Error", |
| | | "Notify On Completion", |
| | | "Recurring Task Schedule" |
| | |
| | | "Completion Time", |
| | | "Dependency ID", |
| | | "Failed Dependency Action", |
| | | "Log Message. Should be pretty long\n"+ |
| | | "Log Message. Should be pretty long\n"+ |
| | | "Log Message. Should be pretty long\n"+ |
| | | "Log Message. Should be pretty long\n"+ |
| | | "Log Message. Should be pretty long\n", |
| | | "Log LocalizableMessage. Should be pretty long\n"+ |
| | | "Log LocalizableMessage. Should be pretty long\n"+ |
| | | "Log LocalizableMessage. Should be pretty long\n"+ |
| | | "Log LocalizableMessage. Should be pretty long\n"+ |
| | | "Log LocalizableMessage. Should be pretty long\n", |
| | | "Notify On Error", |
| | | "Notify On Completion", |
| | | "Recurring Task Schedule" |
| | |
| | | |
| | | private void cancelTaskClicked() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | ProgressDialog dlg = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), |
| | |
| | | operationViewDlg.setVisible(true); |
| | | if (!operationViewPanel.isCanceled()) |
| | | { |
| | | LinkedHashSet<Message> displayedAttributes = |
| | | LinkedHashSet<LocalizableMessage> displayedAttributes = |
| | | operationViewPanel.getAttributes(); |
| | | setAttributesToDisplay(displayedAttributes); |
| | | updateTableSizes(); |
| | |
| | | Utilities.updateScrollMode(tableScroll, taskTable); |
| | | } |
| | | |
| | | private void setAttributesToDisplay(LinkedHashSet<Message> attributes) |
| | | private void setAttributesToDisplay(LinkedHashSet<LocalizableMessage> attributes) |
| | | { |
| | | Set<String> selectedIds = getSelectedIds(); |
| | | tableModel.setAttributes(attributes); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.components.TitlePanel; |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | |
| | | public class MatchingRulePanel extends SchemaElementPanel |
| | | { |
| | | private static final long serialVersionUID = 2440493955626646008L; |
| | | private TitlePanel titlePanel = new TitlePanel(Message.EMPTY, |
| | | Message.EMPTY); |
| | | private TitlePanel titlePanel = new TitlePanel(LocalizableMessage.EMPTY, |
| | | LocalizableMessage.EMPTY); |
| | | private JLabel name = Utilities.createDefaultLabel(); |
| | | private JLabel oid = Utilities.createDefaultLabel(); |
| | | private JLabel description = Utilities.createDefaultLabel(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_MATCHING_RULE_PANEL_TITLE.get(); |
| | | } |
| | |
| | | |
| | | gbc.insets.bottom = 0; |
| | | gbc.insets.top = 8; |
| | | Message[] labels = { |
| | | LocalizableMessage[] labels = { |
| | | INFO_CTRL_PANEL_MATCHING_RULE_NAME.get(), |
| | | INFO_CTRL_PANEL_MATCHING_RULE_OID.get(), |
| | | INFO_CTRL_PANEL_MATCHING_RULE_DESCRIPTION.get(), |
| | |
| | | { |
| | | n = NOT_APPLICABLE.toString(); |
| | | } |
| | | titlePanel.setDetails(Message.raw(n)); |
| | | titlePanel.setDetails(LocalizableMessage.raw(n)); |
| | | name.setText(n); |
| | | oid.setText(matchingRule.getOID()); |
| | | AttributeSyntax<?> s = null; |
| | |
| | | * @param matchingRule the matching rule. |
| | | * @return the message for the type of the provided matching rule. |
| | | */ |
| | | static Message getTypeValue(MatchingRule matchingRule) |
| | | static LocalizableMessage getTypeValue(MatchingRule matchingRule) |
| | | { |
| | | Message text; |
| | | LocalizableMessage text; |
| | | if (matchingRule instanceof EqualityMatchingRule) |
| | | { |
| | | text = INFO_CTRL_PANEL_INDEX_EQUALITY.get(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.event.ScrollPaneBorderListener; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates an instance of this panel that uses Message as |
| | | * Creates an instance of this panel that uses LocalizableMessage as |
| | | * attributes. |
| | | * @param attributes the list of possible attributes. |
| | | * @return an instance of this panel that uses Message as attributes. |
| | | * @return an instance of this panel that uses LocalizableMessage as attributes. |
| | | */ |
| | | public static MonitoringAttributesViewPanel<Message> |
| | | createMessageInstance(LinkedHashSet<Message> attributes) |
| | | public static MonitoringAttributesViewPanel<LocalizableMessage> |
| | | createMessageInstance(LinkedHashSet<LocalizableMessage> attributes) |
| | | { |
| | | return new MonitoringAttributesViewPanel<Message>(attributes); |
| | | return new MonitoringAttributesViewPanel<LocalizableMessage>(attributes); |
| | | } |
| | | |
| | | /** |
| | |
| | | int i = 0; |
| | | for (T attribute : monitoringAttributes) |
| | | { |
| | | Message m = getMessage(attribute); |
| | | LocalizableMessage m = getMessage(attribute); |
| | | checkboxes[i] = Utilities.createCheckBox(m); |
| | | i++; |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_ATTRIBUTE_VIEW_OPTIONS_TITLE.get(); |
| | | } |
| | |
| | | } |
| | | if (selectedAttributes.isEmpty()) |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | errors.add(INFO_CTRL_PANEL_NO_OPERATION_SELECTED.get()); |
| | | super.displayErrorDialog(errors); |
| | | } |
| | |
| | | * @param operation the operation. |
| | | * @return the message for the provided operation. |
| | | */ |
| | | protected Message getMessage(T operation) |
| | | protected LocalizableMessage getMessage(T operation) |
| | | { |
| | | Message m; |
| | | LocalizableMessage m; |
| | | if (operation instanceof MonitoringAttributes) |
| | | { |
| | | m = ((MonitoringAttributes)operation).getMessage(); |
| | | } |
| | | else if (operation instanceof Message) |
| | | else if (operation instanceof LocalizableMessage) |
| | | { |
| | | m = (Message)operation; |
| | | m = (LocalizableMessage)operation; |
| | | } |
| | | else |
| | | { |
| | | m = Message.raw(operation.toString()); |
| | | m = LocalizableMessage.raw(operation.toString()); |
| | | } |
| | | return m; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | org.opends.guitools.controlpanel.ui.renderer.SchemaElementComboBoxCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.EqualityMatchingRule; |
| | |
| | | |
| | | private Component relativeComponent; |
| | | |
| | | private Message NO_PARENT = INFO_CTRL_PANEL_NO_PARENT_FOR_ATTRIBUTE.get(); |
| | | private Message NO_MATCHING_RULE = |
| | | private LocalizableMessage NO_PARENT = INFO_CTRL_PANEL_NO_PARENT_FOR_ATTRIBUTE.get(); |
| | | private LocalizableMessage NO_MATCHING_RULE = |
| | | INFO_CTRL_PANEL_NO_MATCHING_RULE_FOR_ATTRIBUTE.get(); |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_ATTRIBUTE_PANEL_TITLE.get(); |
| | | } |
| | |
| | | */ |
| | | public void okClicked() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | for (JLabel label : labels) |
| | | { |
| | | setPrimaryValid(label); |
| | | } |
| | | String n = getAttributeName(); |
| | | MessageBuilder err = new MessageBuilder(); |
| | | LocalizableMessageBuilder err = new LocalizableMessageBuilder(); |
| | | if (n.length() == 0) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_ATTRIBUTE_NAME_REQUIRED.get()); |
| | |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_INVALID_ATTRIBUTE_NAME.get(err.toString())); |
| | | setPrimaryInvalid(lName); |
| | | err = new MessageBuilder(); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | | else |
| | | { |
| | | Message elementType = getSchemaElementType(n, schema); |
| | | LocalizableMessage elementType = getSchemaElementType(n, schema); |
| | | if (elementType != null) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_ATTRIBUTE_NAME_ALREADY_IN_USE.get(n, |
| | |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OID_NOT_VALID.get(err.toString())); |
| | | setPrimaryInvalid(lOID); |
| | | err = new MessageBuilder(); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | | else |
| | | { |
| | | Message elementType = getSchemaElementType(n, schema); |
| | | LocalizableMessage elementType = getSchemaElementType(n, schema); |
| | | if (elementType != null) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OID_ALREADY_IN_USE.get(n, |
| | |
| | | } |
| | | else |
| | | { |
| | | Message elementType = getSchemaElementType(alias, schema); |
| | | LocalizableMessage elementType = getSchemaElementType(alias, schema); |
| | | if (elementType != null) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_ALIAS_ALREADY_IN_USE.get(n, |
| | |
| | | * @param schema the schema. |
| | | * @return the message representing the schema element type. |
| | | */ |
| | | static Message getSchemaElementType(String name, Schema schema) |
| | | static LocalizableMessage getSchemaElementType(String name, Schema schema) |
| | | { |
| | | if (schema.getAttributeType(name.toLowerCase()) != null) |
| | | { |
| | |
| | | |
| | | JComboBox[] comboBoxes = {parent, syntax, approximate, |
| | | equality, ordering, substring}; |
| | | Message[] defaultValues = {NO_PARENT, Message.EMPTY, NO_MATCHING_RULE, |
| | | LocalizableMessage[] defaultValues = {NO_PARENT, LocalizableMessage.EMPTY, NO_MATCHING_RULE, |
| | | NO_MATCHING_RULE, NO_MATCHING_RULE, NO_MATCHING_RULE |
| | | }; |
| | | SchemaElementComboBoxCellRenderer renderer = new |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.CustomListCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.ConfigReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.Installation; |
| | | import org.opends.quicksetup.installer.InstallerHelper; |
| | | import org.opends.quicksetup.util.Utils; |
| | |
| | | |
| | | private DocumentListener documentListener; |
| | | |
| | | private final Message NEW_BACKEND = INFO_CTRL_PANEL_NEW_BACKEND_LABEL.get(); |
| | | private final LocalizableMessage NEW_BACKEND = INFO_CTRL_PANEL_NEW_BACKEND_LABEL.get(); |
| | | |
| | | /** |
| | | * The default constructor. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_BASE_DN_TITLE.get(); |
| | | } |
| | |
| | | setPrimaryValid(lDirectoryData); |
| | | setSecondaryValid(lPath); |
| | | setSecondaryValid(lNumberOfEntries); |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | |
| | | ServerDescriptor desc = getInfo().getServerDescriptor(); |
| | | |
| | |
| | | String nEntries = numberOfEntries.getText(); |
| | | int minValue = 1; |
| | | int maxValue = isLocal() ? 20000 : 1000; |
| | | Message errMsg = ERR_NUMBER_OF_ENTRIES_INVALID.get(minValue, maxValue); |
| | | LocalizableMessage errMsg = ERR_NUMBER_OF_ENTRIES_INVALID.get(minValue, maxValue); |
| | | checkIntValue(errors, nEntries, minValue, maxValue, errMsg); |
| | | } |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_BASE_DN_TASK_DESCRIPTION.get(newBaseDN, |
| | | backendSet.iterator().next()); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | */ |
| | | public void run() |
| | | { |
| | | Message msg = INFO_CTRL_PANEL_CREATING_BACKEND_PROGRESS.get( |
| | | LocalizableMessage msg = INFO_CTRL_PANEL_CREATING_BACKEND_PROGRESS.get( |
| | | getBackendName(), newBaseDN); |
| | | getProgressDialog().appendProgressHtml( |
| | | Utilities.getProgressWithPoints(msg, |
| | |
| | | */ |
| | | public void run() |
| | | { |
| | | Message msg = INFO_CTRL_PANEL_CREATING_BASE_DN_PROGRESS.get( |
| | | LocalizableMessage msg = INFO_CTRL_PANEL_CREATING_BASE_DN_PROGRESS.get( |
| | | newBaseDN, getBackendName()); |
| | | getProgressDialog().appendProgressHtml( |
| | | Utilities.getProgressWithPoints(msg, |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import javax.swing.JTextField; |
| | | |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The panel to create a domain. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_NEW_DOMAIN_PANEL_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getProgressDialogTitle() |
| | | protected LocalizableMessage getProgressDialogTitle() |
| | | { |
| | | return INFO_CTRL_NEW_DOMAIN_PANEL_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected void checkSyntax(ArrayList<Message> errors) |
| | | protected void checkSyntax(ArrayList<LocalizableMessage> errors) |
| | | { |
| | | for (JLabel label : labels) |
| | | { |
| | |
| | | } |
| | | |
| | | JTextField[] requiredFields = {name}; |
| | | Message[] msgs = {ERR_CTRL_PANEL_NAME_OF_DOMAIN_REQUIRED.get()}; |
| | | LocalizableMessage[] msgs = {ERR_CTRL_PANEL_NAME_OF_DOMAIN_REQUIRED.get()}; |
| | | for (int i=0; i<requiredFields.length; i++) |
| | | { |
| | | String v = requiredFields[i].getText().trim(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.browser.BrowserController; |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.util.LDIFException; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getProgressDialogTitle() |
| | | protected LocalizableMessage getProgressDialogTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_ENTRY_FROM_LDIF_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_ENTRY_FROM_LDIF_TITLE.get(); |
| | | } |
| | |
| | | lSyntaxCorrect.setIcon(Utilities.createImageIcon( |
| | | "org/opends/quicksetup/images/info_small.gif")); |
| | | |
| | | ldif = Utilities.createTextArea(Message.EMPTY, 20, 50); |
| | | ldif = Utilities.createTextArea(LocalizableMessage.EMPTY, 20, 50); |
| | | ldif.getDocument().addDocumentListener(new DocumentListener() |
| | | { |
| | | /** |
| | |
| | | */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | checkSyntax(errors); |
| | | if (errors.size() > 0) |
| | | { |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected void checkSyntax(ArrayList<Message> errors) |
| | | protected void checkSyntax(ArrayList<LocalizableMessage> errors) |
| | | { |
| | | try |
| | | { |
| | |
| | | import org.opends.guitools.controlpanel.ui.nodes.BrowserNodeInfo; |
| | | import org.opends.guitools.controlpanel.ui.nodes.DndBrowserNodes; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.LDAPURL; |
| | | import org.opends.server.types.OpenDsException; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_GROUP_PANEL_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getProgressDialogTitle() |
| | | protected LocalizableMessage getProgressDialogTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_GROUP_PANEL_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected void checkSyntax(ArrayList<Message> errors) |
| | | protected void checkSyntax(ArrayList<LocalizableMessage> errors) |
| | | { |
| | | Runnable runnable = new Runnable() |
| | | { |
| | |
| | | } |
| | | |
| | | JTextField[] requiredFields = {name}; |
| | | Message[] msgs = {ERR_CTRL_PANEL_NAME_OF_GROUP_REQUIRED.get()}; |
| | | LocalizableMessage[] msgs = {ERR_CTRL_PANEL_NAME_OF_GROUP_REQUIRED.get()}; |
| | | for (int i=0; i<requiredFields.length; i++) |
| | | { |
| | | String v = requiredFields[i].getText().trim(); |
| | |
| | | private void createLayout() |
| | | { |
| | | GridBagConstraints gbc = new GridBagConstraints(); |
| | | Message[] ls = { |
| | | LocalizableMessage[] ls = { |
| | | INFO_CTRL_PANEL_NEW_GROUP_NAME_LABEL.get(), |
| | | INFO_CTRL_PANEL_NEW_GROUP_DESCRIPTION_LABEL.get(), |
| | | INFO_CTRL_PANEL_NEW_GROUP_MEMBERS_LABEL.get(), |
| | | INFO_CTRL_PANEL_NEW_GROUP_ENTRY_DN_LABEL.get() |
| | | }; |
| | | int i = 0; |
| | | for (Message l : ls) |
| | | for (LocalizableMessage l : ls) |
| | | { |
| | | labels[i].setText(l.toString()); |
| | | i++; |
| | |
| | | INFO_CTRL_PANEL_GROUP_MEMBER_DNS_LABEL.get()); |
| | | gbc.insets.left = 30; |
| | | add(lMemberDNs, gbc); |
| | | staticMembers = Utilities.createTextArea(Message.EMPTY, 8, 40); |
| | | staticMembers = Utilities.createTextArea(LocalizableMessage.EMPTY, 8, 40); |
| | | JScrollPane scroll = Utilities.createScrollPane(staticMembers); |
| | | gbc.weighty = 1.0; |
| | | gbc.fill = GridBagConstraints.BOTH; |
| | |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.util.ConfigReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.meta.LocalDBIndexCfgDefn.IndexType; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.Attribute; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_INDEX_TITLE.get(); |
| | | } |
| | |
| | | setPrimaryValid(lAttribute); |
| | | setPrimaryValid(lEntryLimit); |
| | | setPrimaryValid(lType); |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | String attrName = getAttributeName(); |
| | | if (attrName == null) |
| | | { |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_INDEX_TASK_DESCRIPTION.get( |
| | | attributeName, backendName.getText()); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import |
| | | org.opends.guitools.controlpanel.ui.renderer.SchemaElementComboBoxCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ObjectClass; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_OBJECTCLASS_PANEL_TITLE.get(); |
| | | } |
| | |
| | | */ |
| | | public void okClicked() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | for (JLabel label : labels) |
| | | { |
| | | setPrimaryValid(label); |
| | | } |
| | | String n = getObjectClassName(); |
| | | MessageBuilder err = new MessageBuilder(); |
| | | LocalizableMessageBuilder err = new LocalizableMessageBuilder(); |
| | | if (n.length() == 0) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OBJECTCLASS_NAME_REQUIRED.get()); |
| | |
| | | else if (!StaticUtils.isValidSchemaElement(n, 0, n.length(), err)) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_INVALID_OBJECTCLASS_NAME.get(err.toString())); |
| | | err = new MessageBuilder(); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | | else |
| | | { |
| | | Message elementType = NewAttributePanel.getSchemaElementType(n, schema); |
| | | LocalizableMessage elementType = NewAttributePanel.getSchemaElementType(n, schema); |
| | | if (elementType != null) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OBJECTCLASS_NAME_ALREADY_IN_USE.get(n, |
| | |
| | | if (!StaticUtils.isValidSchemaElement(n, 0, n.length(), err)) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OID_NOT_VALID.get(err.toString())); |
| | | err = new MessageBuilder(); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | | else |
| | | { |
| | | Message elementType = NewAttributePanel.getSchemaElementType(n, schema); |
| | | LocalizableMessage elementType = NewAttributePanel.getSchemaElementType(n, schema); |
| | | if (elementType != null) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OID_ALREADY_IN_USE.get(n, |
| | |
| | | } |
| | | else |
| | | { |
| | | Message elementType = NewAttributePanel.getSchemaElementType( |
| | | LocalizableMessage elementType = NewAttributePanel.getSchemaElementType( |
| | | alias, schema); |
| | | if (elementType != null) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | /* |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.browser.BrowserController; |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The panel used to create a new organization. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_NEW_ORGANIZATION_PANEL_TITLE.get(); |
| | | } |
| | |
| | | * Returns the title of the progress dialog. |
| | | * @return the title of the progress dialog. |
| | | */ |
| | | protected Message getProgressDialogTitle() |
| | | protected LocalizableMessage getProgressDialogTitle() |
| | | { |
| | | return INFO_CTRL_NEW_ORGANIZATION_PANEL_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected void checkSyntax(ArrayList<Message> errors) |
| | | protected void checkSyntax(ArrayList<LocalizableMessage> errors) |
| | | { |
| | | for (JLabel label : labels) |
| | | { |
| | |
| | | } |
| | | |
| | | JTextField[] requiredFields = {name}; |
| | | Message[] msgs = {ERR_CTRL_PANEL_NAME_OF_ORGANIZATION_REQUIRED.get()}; |
| | | LocalizableMessage[] msgs = {ERR_CTRL_PANEL_NAME_OF_ORGANIZATION_REQUIRED.get()}; |
| | | for (int i=0; i<requiredFields.length; i++) |
| | | { |
| | | String v = requiredFields[i].getText().trim(); |
| | |
| | | private void createLayout() |
| | | { |
| | | GridBagConstraints gbc = new GridBagConstraints(); |
| | | Message[] ls = { |
| | | LocalizableMessage[] ls = { |
| | | INFO_CTRL_PANEL_NEW_ORGANIZATION_NAME_LABEL.get(), |
| | | INFO_CTRL_PANEL_NEW_ORGANIZATION_DESCRIPTION_LABEL.get(), |
| | | INFO_CTRL_PANEL_NEW_ORGANIZATION_ENTRY_DN_LABEL.get()}; |
| | | int i = 0; |
| | | for (Message l : ls) |
| | | for (LocalizableMessage l : ls) |
| | | { |
| | | labels[i].setText(l.toString()); |
| | | i++; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.browser.BrowserController; |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_OU_PANEL_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getProgressDialogTitle() |
| | | protected LocalizableMessage getProgressDialogTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_OU_PANEL_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected void checkSyntax(ArrayList<Message> errors) |
| | | protected void checkSyntax(ArrayList<LocalizableMessage> errors) |
| | | { |
| | | for (JLabel label : labels) |
| | | { |
| | |
| | | } |
| | | |
| | | JTextField[] requiredFields = {name}; |
| | | Message[] msgs = {ERR_CTRL_PANEL_NAME_OF_OU_REQUIRED.get()}; |
| | | LocalizableMessage[] msgs = {ERR_CTRL_PANEL_NAME_OF_OU_REQUIRED.get()}; |
| | | for (int i=0; i<requiredFields.length; i++) |
| | | { |
| | | String v = requiredFields[i].getText().trim(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.browser.BrowserController; |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_USER_PANEL_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getProgressDialogTitle() |
| | | protected LocalizableMessage getProgressDialogTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_USER_PANEL_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected void checkSyntax(ArrayList<Message> errors) |
| | | protected void checkSyntax(ArrayList<LocalizableMessage> errors) |
| | | { |
| | | for (JLabel label : labels) |
| | | { |
| | |
| | | } |
| | | |
| | | JTextField[] requiredFields = {lastName, commonName}; |
| | | Message[] msgs = {ERR_CTRL_PANEL_USER_LAST_NAME_REQUIRED.get(), |
| | | LocalizableMessage[] msgs = {ERR_CTRL_PANEL_USER_LAST_NAME_REQUIRED.get(), |
| | | ERR_CTRL_PANEL_USER_COMMON_NAME_REQUIRED.get() |
| | | }; |
| | | for (int i=0; i<requiredFields.length; i++) |
| | |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.util.ConfigReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.client.ManagementContext; |
| | | import org.opends.server.admin.client.ldap.JNDIDirContextAdaptor; |
| | | import org.opends.server.admin.client.ldap.LDAPManagementContext; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_VLV_INDEX_TITLE.get(); |
| | | } |
| | |
| | | */ |
| | | public void okClicked() |
| | | { |
| | | List<Message> errors = checkErrors(true); |
| | | List<LocalizableMessage> errors = checkErrors(true); |
| | | if (errors.isEmpty()) |
| | | { |
| | | ProgressDialog dlg = new ProgressDialog( |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_VLV_INDEX_TASK_DESCRIPTION.get( |
| | | indexName, backendID); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import javax.swing.JPanel; |
| | | |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * A simple panel containing a message. |
| | |
| | | public class NoItemSelectedPanel extends JPanel |
| | | { |
| | | private JLabel l; |
| | | private Message msg; |
| | | private LocalizableMessage msg; |
| | | private static final long serialVersionUID = -8288525745479095426L; |
| | | |
| | | /** |
| | |
| | | * Sets the message to be displayed. |
| | | * @param text the message to be displayed. |
| | | */ |
| | | public void setMessage(Message text) |
| | | public void setMessage(LocalizableMessage text) |
| | | { |
| | | msg = text; |
| | | l.setText(text.toString()); |
| | |
| | | * Returns the displayed message. |
| | | * @return the displayed message. |
| | | */ |
| | | public Message getMessage() |
| | | public LocalizableMessage getMessage() |
| | | { |
| | | return msg; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.ui.components.AddRemovePanel; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.ObjectClassType; |
| | | import org.opends.server.types.Schema; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_EDIT_OBJECTCLASS_TITLE.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.components.BasicExpander; |
| | | import org.opends.guitools.controlpanel.util.ApplicationPrintStream; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The dialog that is used to display progress in a task. |
| | |
| | | * @param info the control panel information. |
| | | */ |
| | | public ProgressDialog(JFrame parentFrame, Component relativeTo, |
| | | Message title, ControlPanelInfo info) |
| | | LocalizableMessage title, ControlPanelInfo info) |
| | | { |
| | | super(parentFrame, getPanel(info)); |
| | | Utilities.centerGoldenMean(this, relativeTo); |
| | |
| | | * dialog. |
| | | * @param text the text to be displayed. |
| | | */ |
| | | public void setSummary(Message text) |
| | | public void setSummary(LocalizableMessage text) |
| | | { |
| | | progressPanel.setSummary(text); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return null; |
| | | } |
| | |
| | | * dialog. |
| | | * @param msg the text to be displayed. |
| | | */ |
| | | public void setSummary(Message msg) |
| | | public void setSummary(LocalizableMessage msg) |
| | | { |
| | | errorPane.setText(msg.toString()); |
| | | |
| | | if (!details.isSelected() && isVisible()) |
| | | { |
| | | Message wrappedText = Utilities.wrapHTML(msg, 70); |
| | | LocalizableMessage wrappedText = Utilities.wrapHTML(msg, 70); |
| | | JEditorPane pane = new JEditorPane(); |
| | | pane.setContentType("text/html"); |
| | | pane.setText(wrappedText.toString()); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.IndexCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.guitools.controlpanel.util.ViewPositions; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The panel that appears when the user wants to rebuild indexes. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_REBUILD_INDEXES_TITLE.get(); |
| | | } |
| | |
| | | setPrimaryValid(lBaseDN); |
| | | setSecondaryValid(addRemove.getSelectedLabel()); |
| | | |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | |
| | | String baseDN = getSelectedBaseDN(); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | |
| | | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The panel that displays the refresh options of the control panel. Basically |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_REFRESH_PANEL_TITLE.get(); |
| | | } |
| | |
| | | isCanceled = true; |
| | | |
| | | setPrimaryValid(lPeriod); |
| | | LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | long t = -1; |
| | | try |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Panel that appears when the user wants to change the password of a user. |
| | |
| | | */ |
| | | public void okClicked() |
| | | { |
| | | final ArrayList<Message> errors = new ArrayList<Message>(); |
| | | final ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | |
| | | setPrimaryValid(lPassword); |
| | | setPrimaryValid(lConfirmPassword); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_RESET_USER_PASSWORD_TITLE.get(); |
| | | } |
| | |
| | | gbc.weighty = 0.0; |
| | | gbc.fill = GridBagConstraints.HORIZONTAL; |
| | | |
| | | Message[] strings = |
| | | LocalizableMessage[] strings = |
| | | { |
| | | INFO_CTRL_PANEL_RESET_USER_PASSWORD_DN_LABEL.get(), |
| | | INFO_CTRL_PANEL_RESET_USER_PASSWORD_NAME_LABEL.get(), |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.tools.RestoreDB; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_RESTORE_PANEL_TITLE.get(); |
| | | } |
| | |
| | | */ |
| | | protected void verifyBackupClicked() |
| | | { |
| | | LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | // Launch the task in another progress dialog. |
| | | ProgressDialog dlg = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | |
| | | setPrimaryValid(lAvailableBackups); |
| | | setPrimaryValid(lBackupID); |
| | | |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | |
| | | BackupDescriptor backup = getSelectedBackup(); |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | if (verify) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; |
| | | import org.opends.guitools.controlpanel.util.ConfigFromDirContext; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The panel displaying the root monitor panel. |
| | |
| | | |
| | | gbc.insets.bottom = 0; |
| | | gbc.insets.top = 10; |
| | | Message[] labels = { |
| | | LocalizableMessage[] labels = { |
| | | INFO_CTRL_PANEL_OPEN_CONNECTIONS_LABEL.get(), |
| | | INFO_CTRL_PANEL_MAX_CONNECTIONS_LABEL.get(), |
| | | INFO_CTRL_PANEL_TOTAL_CONNECTIONS_LABEL.get(), |
| | |
| | | upSeconds %= 3600; |
| | | long upMinutes = (upSeconds / 60); |
| | | upSeconds %= 60; |
| | | Message upTimeStr = |
| | | LocalizableMessage upTimeStr = |
| | | INFO_MONITOR_UPTIME.get(upDays, upHours, upMinutes, upSeconds); |
| | | |
| | | upTime.setText(upTimeStr.toString()); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | ConfigurationElementCreatedListener; |
| | | import org.opends.guitools.controlpanel.event.SchemaElementSelectionListener; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.types.AttributeType; |
| | |
| | | * @param msg the message. |
| | | * |
| | | */ |
| | | public void displayMessage(Message msg) |
| | | public void displayMessage(LocalizableMessage msg) |
| | | { |
| | | schemaElementPanel = null; |
| | | noEntryPanel.setMessage(msg); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_SCHEMA_BROWSER_RIGHT_PANEL_TITLE.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer. |
| | | SchemaElementComboBoxCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.Schema; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_SUPERIOR_OBJECTCLASSES_TITLE.get(); |
| | | } |
| | |
| | | import org.opends.guitools.controlpanel.ui.nodes.BrowserNodeInfo; |
| | | import org.opends.guitools.controlpanel.ui.nodes.DndBrowserNodes; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.schema.SchemaConstants; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.Base64; |
| | |
| | | |
| | | // Map containing as key the attribute name and as value a localizable |
| | | // message. |
| | | static Map<String, Message> hmFriendlyAttrNames = |
| | | new HashMap<String, Message>(); |
| | | static Map<String, LocalizableMessage> hmFriendlyAttrNames = |
| | | new HashMap<String, LocalizableMessage>(); |
| | | // Map containing as key an object class and as value the preferred naming |
| | | // attribute for the objectclass. |
| | | static Map<String, String> hmNameAttrNames = new HashMap<String, String>(); |
| | |
| | | hmOrdereredAttrNames.put("domain", new String[]{"dc", "description"}); |
| | | }; |
| | | |
| | | private Message NAME = INFO_CTRL_PANEL_NAME_LABEL.get(); |
| | | private LocalizableMessage NAME = INFO_CTRL_PANEL_NAME_LABEL.get(); |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | |
| | | private JLabel getLabelForAttribute(String attrName, CustomSearchResult sr) |
| | | { |
| | | MessageBuilder l = new MessageBuilder(); |
| | | LocalizableMessageBuilder l = new LocalizableMessageBuilder(); |
| | | int index = attrName.indexOf(";"); |
| | | String basicAttrName; |
| | | String subType; |
| | |
| | | } |
| | | else |
| | | { |
| | | Message friendly = hmFriendlyAttrNames.get(basicAttrName.toLowerCase()); |
| | | LocalizableMessage friendly = hmFriendlyAttrNames.get(basicAttrName.toLowerCase()); |
| | | if (friendly == null) |
| | | { |
| | | l.append(attrName); |
| | |
| | | { |
| | | panel.add( |
| | | Utilities.createDefaultLabel( |
| | | Message.raw(Utilities.OBFUSCATED_VALUE)), gbc); |
| | | LocalizableMessage.raw(Utilities.OBFUSCATED_VALUE)), gbc); |
| | | } |
| | | else if (!isBinary) |
| | | { |
| | |
| | | if (values.size() > 15) |
| | | { |
| | | ta = Utilities.createNonEditableTextArea( |
| | | Message.raw(Utilities.getStringFromCollection(sValues, "\n")), |
| | | LocalizableMessage.raw(Utilities.getStringFromCollection(sValues, "\n")), |
| | | 15, 20); |
| | | toAdd = Utilities.createScrollPane(ta); |
| | | } |
| | | else |
| | | { |
| | | ta = Utilities.createNonEditableTextArea( |
| | | Message.raw(Utilities.getStringFromCollection(sValues, "\n")), |
| | | LocalizableMessage.raw(Utilities.getStringFromCollection(sValues, "\n")), |
| | | values.size(), 20); |
| | | toAdd = ta; |
| | | } |
| | |
| | | if (values.size() > 15) |
| | | { |
| | | ta = Utilities.createTextArea( |
| | | Message.raw(Utilities.getStringFromCollection(sValues, "\n")), |
| | | LocalizableMessage.raw(Utilities.getStringFromCollection(sValues, "\n")), |
| | | 15, 20); |
| | | toAdd = Utilities.createScrollPane(ta); |
| | | } |
| | | else |
| | | { |
| | | ta = Utilities.createTextAreaWithBorder( |
| | | Message.raw(Utilities.getStringFromCollection(sValues, "\n")), |
| | | LocalizableMessage.raw(Utilities.getStringFromCollection(sValues, "\n")), |
| | | values.size(), 20); |
| | | toAdd = ta; |
| | | } |
| | |
| | | { |
| | | Entry entry = null; |
| | | |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | |
| | | try |
| | | { |
| | |
| | | { |
| | | setPrimaryInvalid(hmLabels.get(attrName)); |
| | | setPrimaryInvalid(hmLabels.get(getConfirmPasswordKey(attrName))); |
| | | Message msg = ERR_CTRL_PANEL_PASSWORD_DO_NOT_MATCH.get(); |
| | | LocalizableMessage msg = ERR_CTRL_PANEL_PASSWORD_DO_NOT_MATCH.get(); |
| | | if (!errors.contains(msg)) |
| | | { |
| | | errors.add(msg); |
| | |
| | | |
| | | private void addBrowseClicked(String attrName, JTextComponent textComponent) |
| | | { |
| | | Message previousTitle = null; |
| | | LocalizableMessage previousTitle = null; |
| | | LDAPEntrySelectionPanel.Filter previousFilter = null; |
| | | Message title; |
| | | LocalizableMessage title; |
| | | LDAPEntrySelectionPanel.Filter filter; |
| | | if (browseEntriesDlg == null) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.components.TitlePanel; |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.ObjectClass; |
| | |
| | | public class StandardAttributePanel extends SchemaElementPanel |
| | | { |
| | | private static final long serialVersionUID = -7922968631524763675L; |
| | | private TitlePanel titlePanel = new TitlePanel(Message.EMPTY, |
| | | Message.EMPTY); |
| | | private TitlePanel titlePanel = new TitlePanel(LocalizableMessage.EMPTY, |
| | | LocalizableMessage.EMPTY); |
| | | private JLabel name = Utilities.createDefaultLabel(); |
| | | private JLabel parent = Utilities.createDefaultLabel(); |
| | | private JLabel oid = Utilities.createDefaultLabel(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_STANDARD_ATTRIBUTE_TITLE.get(); |
| | | } |
| | |
| | | gbc.gridwidth = 1; |
| | | gbc.fill = GridBagConstraints.HORIZONTAL; |
| | | |
| | | Message[] labels = { |
| | | LocalizableMessage[] labels = { |
| | | INFO_CTRL_PANEL_ATTRIBUTE_NAME_LABEL.get(), |
| | | INFO_CTRL_PANEL_ATTRIBUTE_PARENT_LABEL.get(), |
| | | INFO_CTRL_PANEL_ATTRIBUTE_OID_LABEL.get(), |
| | |
| | | c.add(values[i], gbc); |
| | | gbc.gridy ++; |
| | | } |
| | | labels = new Message[] { |
| | | labels = new LocalizableMessage[] { |
| | | INFO_CTRL_PANEL_REQUIRED_BY_LABEL.get(), |
| | | INFO_CTRL_PANEL_ALLOWED_BY_LABEL.get() |
| | | }; |
| | |
| | | { |
| | | n = NOT_APPLICABLE.toString(); |
| | | } |
| | | titlePanel.setDetails(Message.raw(n)); |
| | | titlePanel.setDetails(LocalizableMessage.raw(n)); |
| | | name.setText(n); |
| | | AttributeType superior = attr.getSuperiorType(); |
| | | if (superior == null) |
| | |
| | | * @return the message describing the attribute type (operational, single |
| | | * valued, etc.). |
| | | */ |
| | | static Message getTypeValue(AttributeType attr) |
| | | static LocalizableMessage getTypeValue(AttributeType attr) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | Boolean[] props = {attr.isOperational(), attr.isSingleValue(), |
| | | attr.isNoUserModification(), attr.isCollective(), |
| | | attr.isObsolete()}; |
| | | Message[][] values = { |
| | | LocalizableMessage[][] values = { |
| | | {INFO_CTRL_PANEL_ATTRIBUTE_OPERATIONAL_LABEL.get(), null}, |
| | | {INFO_CTRL_PANEL_ATTRIBUTE_SINGLE_VALUED_LABEL.get(), |
| | | INFO_CTRL_PANEL_ATTRIBUTE_MULTI_VALUED_LABEL.get()}, |
| | |
| | | int i = 0; |
| | | for (Boolean prop : props) |
| | | { |
| | | Message value = prop ? values[i][0] : values[i][1]; |
| | | LocalizableMessage value = prop ? values[i][0] : values[i][1]; |
| | | if (value != null) |
| | | { |
| | | if (mb.length() > 0) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.components.TitlePanel; |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.CommonSchemaElements; |
| | | import org.opends.server.types.ObjectClass; |
| | |
| | | public class StandardObjectClassPanel extends SchemaElementPanel |
| | | { |
| | | private static final long serialVersionUID = 5561268287795223026L; |
| | | private TitlePanel titlePanel = new TitlePanel(Message.EMPTY, Message.EMPTY); |
| | | private TitlePanel titlePanel = new TitlePanel(LocalizableMessage.EMPTY, LocalizableMessage.EMPTY); |
| | | |
| | | private JLabel lParent; |
| | | |
| | |
| | | private JList requiredAttributes = new JList(new DefaultListModel()); |
| | | private JList optionalAttributes = new JList(new DefaultListModel()); |
| | | |
| | | private static Message ABSTRACT_VALUE = |
| | | private static LocalizableMessage ABSTRACT_VALUE = |
| | | INFO_CTRL_PANEL_OBJECTCLASS_ABSTRACT_LABEL.get(); |
| | | private static Message STRUCTURAL_VALUE = |
| | | private static LocalizableMessage STRUCTURAL_VALUE = |
| | | INFO_CTRL_PANEL_OBJECTCLASS_STRUCTURAL_LABEL.get(); |
| | | private static Message AUXILIARY_VALUE = |
| | | private static LocalizableMessage AUXILIARY_VALUE = |
| | | INFO_CTRL_PANEL_OBJECTCLASS_AUXILIARY_LABEL.get(); |
| | | private static Message OBSOLETE_VALUE = |
| | | private static LocalizableMessage OBSOLETE_VALUE = |
| | | INFO_CTRL_PANEL_OBJECTCLASS_OBSOLETE_LABEL.get(); |
| | | |
| | | private Map<String, AttributeType> hmAttrs = |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_STANDARD_OBJECTCLASS_TITLE.get(); |
| | | } |
| | |
| | | requiredAttributes.setVisibleRowCount(5); |
| | | optionalAttributes.setVisibleRowCount(9); |
| | | |
| | | Message[] labels = { |
| | | LocalizableMessage[] labels = { |
| | | INFO_CTRL_PANEL_OBJECTCLASS_NAME_LABEL.get(), |
| | | INFO_CTRL_PANEL_OBJECTCLASS_PARENT_LABEL.get(), |
| | | INFO_CTRL_PANEL_OBJECTCLASS_OID_LABEL.get(), |
| | |
| | | c.add(values[i], gbc); |
| | | gbc.gridy ++; |
| | | } |
| | | labels = new Message[] { |
| | | labels = new LocalizableMessage[] { |
| | | INFO_CTRL_PANEL_REQUIRED_ATTRIBUTES_LABEL.get(), |
| | | INFO_CTRL_PANEL_OPTIONAL_ATTRIBUTES_LABEL.get() |
| | | }; |
| | |
| | | * @param element the schema element. |
| | | * @return the message describing the schema element origin (file, RFC, etc.). |
| | | */ |
| | | static Message getOrigin(CommonSchemaElements element) |
| | | static LocalizableMessage getOrigin(CommonSchemaElements element) |
| | | { |
| | | MessageBuilder returnValue = new MessageBuilder(); |
| | | LocalizableMessageBuilder returnValue = new LocalizableMessageBuilder(); |
| | | String fileName = element.getSchemaFile(); |
| | | String xOrigin = Utilities.getOrigin(element); |
| | | if (xOrigin != null) |
| | |
| | | { |
| | | n = NOT_APPLICABLE.toString(); |
| | | } |
| | | titlePanel.setDetails(Message.raw(n)); |
| | | titlePanel.setDetails(LocalizableMessage.raw(n)); |
| | | name.setText(n); |
| | | parent.setText(getSuperiorText(oc)); |
| | | oid.setText(oc.getOID()); |
| | |
| | | * @return the message describing the object class type (structural, obsolete, |
| | | * etc.) of the provided object class. |
| | | */ |
| | | static Message getTypeValue(ObjectClass oc) |
| | | static LocalizableMessage getTypeValue(ObjectClass oc) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | switch (oc.getObjectClassType()) |
| | | { |
| | | case ABSTRACT: |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.opends.messages.MessageDescriptor; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessageDescriptor; |
| | | import org.opends.quicksetup.ui.CustomHTMLEditorKit; |
| | | import org.opends.server.schema.SchemaConstants; |
| | | import org.opends.server.types.ObjectClass; |
| | |
| | | /** |
| | | * The not applicable message. |
| | | */ |
| | | protected final static Message NOT_APPLICABLE = |
| | | protected final static LocalizableMessage NOT_APPLICABLE = |
| | | INFO_NOT_APPLICABLE_LABEL.get(); |
| | | |
| | | private Message AUTHENTICATE = INFO_AUTHENTICATE_BUTTON_LABEL.get(); |
| | | private Message START = INFO_START_BUTTON_LABEL.get(); |
| | | private LocalizableMessage AUTHENTICATE = INFO_AUTHENTICATE_BUTTON_LABEL.get(); |
| | | private LocalizableMessage START = INFO_START_BUTTON_LABEL.get(); |
| | | |
| | | private ControlPanelInfo info; |
| | | |
| | |
| | | * Returns the title that will be used as title of the dialog. |
| | | * @return the title that will be used as title of the dialog. |
| | | */ |
| | | public abstract Message getTitle(); |
| | | public abstract LocalizableMessage getTitle(); |
| | | |
| | | /** |
| | | * Returns the buttons that the dialog where this panel is contained should |
| | |
| | | * Displays a dialog with the provided list of error messages. |
| | | * @param errors the error messages. |
| | | */ |
| | | protected void displayErrorDialog(Collection<Message> errors) |
| | | protected void displayErrorDialog(Collection<LocalizableMessage> errors) |
| | | { |
| | | Utilities.displayErrorDialog(Utilities.getParentDialog(this), errors); |
| | | } |
| | |
| | | * @return <CODE>true</CODE> if the user confirms and <CODE>false</CODE> |
| | | * otherwise. |
| | | */ |
| | | protected boolean displayConfirmationDialog(Message title, Message msg) |
| | | protected boolean displayConfirmationDialog(LocalizableMessage title, LocalizableMessage msg) |
| | | { |
| | | return Utilities.displayConfirmationDialog(Utilities.getParentDialog(this), |
| | | title, msg); |
| | |
| | | |
| | | RebuildIndexTask newTask = new RebuildIndexTask(getInfo(), |
| | | progressDialog, baseDNs, indexes); |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | for (Task task : getInfo().getTasks()) |
| | | { |
| | | task.canLaunch(newTask, errors); |
| | |
| | | * provided and the server is running. |
| | | */ |
| | | protected void updateErrorPaneAndOKButtonIfAuthRequired(ServerDescriptor desc, |
| | | Message details) |
| | | LocalizableMessage details) |
| | | { |
| | | if (authenticationRequired(desc)) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(details); |
| | | mb.append("<br><br>"+getAuthenticateHTML()); |
| | | Message title = INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_SUMMARY.get(); |
| | | LocalizableMessage title = INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_SUMMARY.get(); |
| | | updateErrorPane(errorPane, title, ColorAndFontConstants.errorTitleFont, |
| | | mb.toMessage(), ColorAndFontConstants.defaultFont); |
| | | SwingUtilities.invokeLater(new Runnable() |
| | |
| | | * provided and the server is running. |
| | | */ |
| | | protected void updateErrorPaneIfAuthRequired(ServerDescriptor desc, |
| | | Message details) |
| | | LocalizableMessage details) |
| | | { |
| | | if (authenticationRequired(desc)) |
| | | { |
| | | Message title = INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_SUMMARY.get(); |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessage title = INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_SUMMARY.get(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(details); |
| | | mb.append("<br><br>"+getAuthenticateHTML()); |
| | | updateErrorPane(errorPane, title, ColorAndFontConstants.errorTitleFont, |
| | |
| | | * been provided and the server is running. |
| | | */ |
| | | protected void updateErrorPaneIfServerRunningAndAuthRequired( |
| | | ServerDescriptor desc, Message detailsServerNotRunning, |
| | | Message authRequired) |
| | | ServerDescriptor desc, LocalizableMessage detailsServerNotRunning, |
| | | LocalizableMessage authRequired) |
| | | { |
| | | ServerDescriptor.ServerStatus status = desc.getStatus(); |
| | | if ((status != ServerDescriptor.ServerStatus.STARTED) && |
| | | (status != ServerDescriptor.ServerStatus.NOT_CONNECTED_TO_REMOTE)) |
| | | { |
| | | Message title = INFO_CTRL_PANEL_SERVER_NOT_RUNNING_SUMMARY.get(); |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessage title = INFO_CTRL_PANEL_SERVER_NOT_RUNNING_SUMMARY.get(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(detailsServerNotRunning); |
| | | mb.append("<br><br>"+getStartServerHTML()); |
| | | updateErrorPane(errorPane, title, ColorAndFontConstants.errorTitleFont, |
| | |
| | | } |
| | | else if (authenticationRequired(desc)) |
| | | { |
| | | Message title = INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_SUMMARY.get(); |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessage title = INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_SUMMARY.get(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(authRequired); |
| | | mb.append("<br><br>"+getAuthenticateHTML()); |
| | | updateErrorPane(errorPane, title, ColorAndFontConstants.errorTitleFont, |
| | |
| | | * Displays a message and hides the main panel. |
| | | * @param msg the message to be displayed. |
| | | */ |
| | | protected void displayMessage(Message msg) |
| | | protected void displayMessage(LocalizableMessage msg) |
| | | { |
| | | message.setText(Utilities.applyFont(msg.toString(), |
| | | ColorAndFontConstants.defaultFont)); |
| | |
| | | * @param title the title of the message to be displayed. |
| | | * @param msg the message to be displayed. |
| | | */ |
| | | protected void displayErrorMessage(Message title, Message msg) |
| | | protected void displayErrorMessage(LocalizableMessage title, LocalizableMessage msg) |
| | | { |
| | | updateErrorPane(message, title, ColorAndFontConstants.errorTitleFont, |
| | | msg, ColorAndFontConstants.defaultFont); |
| | |
| | | * @param details the details message. |
| | | * @param detailsFont the font to be used for the details. |
| | | */ |
| | | protected void updateErrorPane(JEditorPane pane, Message title, |
| | | Font titleFont, Message details, Font detailsFont) |
| | | protected void updateErrorPane(JEditorPane pane, LocalizableMessage title, |
| | | Font titleFont, LocalizableMessage details, Font detailsFont) |
| | | { |
| | | updatePane(pane, title, titleFont, details, detailsFont, PanelType.ERROR); |
| | | } |
| | |
| | | * @param details the details message. |
| | | * @param detailsFont the font to be used for the details. |
| | | */ |
| | | protected void updateWarningPane(JEditorPane pane, Message title, |
| | | Font titleFont, Message details, Font detailsFont) |
| | | protected void updateWarningPane(JEditorPane pane, LocalizableMessage title, |
| | | Font titleFont, LocalizableMessage details, Font detailsFont) |
| | | { |
| | | updatePane(pane, title, titleFont, details, detailsFont, PanelType.WARNING); |
| | | } |
| | |
| | | * @param details the details message. |
| | | * @param detailsFont the font to be used for the details. |
| | | */ |
| | | protected void updateConfirmationPane(JEditorPane pane, Message title, |
| | | Font titleFont, Message details, Font detailsFont) |
| | | protected void updateConfirmationPane(JEditorPane pane, LocalizableMessage title, |
| | | Font titleFont, LocalizableMessage details, Font detailsFont) |
| | | { |
| | | updatePane(pane, title, titleFont, details, detailsFont, |
| | | PanelType.CONFIRMATION); |
| | |
| | | * @param detailsFont the font to be used for the details. |
| | | * @param type the type of panel. |
| | | */ |
| | | private void updatePane(final JEditorPane pane, Message title, |
| | | Font titleFont, Message details, Font detailsFont, PanelType type) |
| | | private void updatePane(final JEditorPane pane, LocalizableMessage title, |
| | | Font titleFont, LocalizableMessage details, Font detailsFont, PanelType type) |
| | | { |
| | | String text; |
| | | switch (type) |
| | |
| | | } |
| | | if (!text.equals(lastDisplayedError)) |
| | | { |
| | | Message wrappedTitle = Utilities.wrapHTML(title, 80); |
| | | Message wrappedDetails = Utilities.wrapHTML(details, 90); |
| | | LocalizableMessage wrappedTitle = Utilities.wrapHTML(title, 80); |
| | | LocalizableMessage wrappedDetails = Utilities.wrapHTML(details, 90); |
| | | |
| | | JEditorPane wrappedPane = Utilities.makeHtmlPane(null, pane.getFont()); |
| | | String wrappedText; |
| | |
| | | * error code). |
| | | * @param dialog the progress dialog. |
| | | */ |
| | | protected void launchOperation(final Task task, Message initialSummary, |
| | | final Message successSummary, final Message successDetail, |
| | | final Message errorSummary, |
| | | final Message errorDetail, |
| | | final MessageDescriptor.Arg1<Number> errorDetailCode, |
| | | protected void launchOperation(final Task task, LocalizableMessage initialSummary, |
| | | final LocalizableMessage successSummary, final LocalizableMessage successDetail, |
| | | final LocalizableMessage errorSummary, |
| | | final LocalizableMessage errorDetail, |
| | | final LocalizableMessageDescriptor.Arg1<Number> errorDetailCode, |
| | | final ProgressDialog dialog) |
| | | { |
| | | launchOperation(task, initialSummary, successSummary, successDetail, |
| | |
| | | * @param resetLogs whether the contents of the progress dialog should be |
| | | * reset or not. |
| | | */ |
| | | protected void launchOperation(final Task task, Message initialSummary, |
| | | final Message successSummary, final Message successDetail, |
| | | final Message errorSummary, |
| | | final Message errorDetail, |
| | | final MessageDescriptor.Arg1<Number> errorDetailCode, |
| | | protected void launchOperation(final Task task, LocalizableMessage initialSummary, |
| | | final LocalizableMessage successSummary, final LocalizableMessage successDetail, |
| | | final LocalizableMessage errorSummary, |
| | | final LocalizableMessage errorDetail, |
| | | final LocalizableMessageDescriptor.Arg1<Number> errorDetailCode, |
| | | final ProgressDialog dialog, boolean resetLogs) |
| | | { |
| | | launchOperation(task, initialSummary, successSummary, successDetail, |
| | |
| | | * reset or not. |
| | | * @param info the ControlPanelInfo. |
| | | */ |
| | | public static void launchOperation(final Task task, Message initialSummary, |
| | | final Message successSummary, final Message successDetail, |
| | | final Message errorSummary, |
| | | final Message errorDetail, |
| | | final MessageDescriptor.Arg1<Number> errorDetailCode, |
| | | public static void launchOperation(final Task task, LocalizableMessage initialSummary, |
| | | final LocalizableMessage successSummary, final LocalizableMessage successDetail, |
| | | final LocalizableMessage errorSummary, |
| | | final LocalizableMessage errorDetail, |
| | | final LocalizableMessageDescriptor.Arg1<Number> errorDetailCode, |
| | | final ProgressDialog dialog, boolean resetLogs, |
| | | final ControlPanelInfo info) |
| | | { |
| | |
| | | ColorAndFontConstants.progressFont)); |
| | | } |
| | | dialog.setEnabledClose(false); |
| | | dialog.setSummary(Message.raw( |
| | | dialog.setSummary(LocalizableMessage.raw( |
| | | Utilities.applyFont(initialSummary.toString(), |
| | | ColorAndFontConstants.defaultFont))); |
| | | dialog.getProgressBar().setVisible(true); |
| | |
| | | sThrowable = t.toString(); |
| | | } |
| | | } |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(errorDetailCode.get(task.getReturnCode())); |
| | | mb.append( |
| | | " "+INFO_CTRL_PANEL_DETAILS_THROWABLE.get(sThrowable)); |
| | |
| | | } |
| | | else if (errorDetail != null) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(errorDetail); |
| | | mb.append( |
| | | " "+INFO_CTRL_PANEL_DETAILS_THROWABLE.get(t.toString())); |
| | |
| | | } |
| | | if (summaryMsg != null) |
| | | { |
| | | dialog.setSummary(Message.raw(summaryMsg)); |
| | | dialog.setSummary(LocalizableMessage.raw(summaryMsg)); |
| | | } |
| | | dialog.setEnabledClose(true); |
| | | dialog.getProgressBar().setVisible(false); |
| | |
| | | * @param errMsg the error message to use to update the error list if the |
| | | * provided value is not valid. |
| | | */ |
| | | protected void checkIntValue(Collection<Message> errors, String stringValue, |
| | | int minValue, int maxValue, Message errMsg) |
| | | protected void checkIntValue(Collection<LocalizableMessage> errors, String stringValue, |
| | | int minValue, int maxValue, LocalizableMessage errMsg) |
| | | { |
| | | try |
| | | { |
| | |
| | | */ |
| | | protected void startServer() |
| | | { |
| | | LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | ProgressDialog progressDialog = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), |
| | |
| | | */ |
| | | protected void stopServer() |
| | | { |
| | | LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | ProgressDialog progressDialog = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), |
| | |
| | | */ |
| | | protected void restartServer() |
| | | { |
| | | LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | ProgressDialog progressDialog = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), |
| | |
| | | * @return the label to be used in panels (with ':') based on the definition |
| | | * of the monitoring attribute. |
| | | */ |
| | | protected static Message getLabel(MonitoringAttributes attr) |
| | | protected static LocalizableMessage getLabel(MonitoringAttributes attr) |
| | | { |
| | | return INFO_CTRL_PANEL_OPERATION_NAME_AS_LABEL.get( |
| | | attr.getMessage().toString()); |
| | |
| | | * @param label the label to be marked as invalid if errors where encountered. |
| | | */ |
| | | protected void addScheduleErrors(ScheduleType schedule, |
| | | Collection<Message> errors, JLabel label) |
| | | Collection<LocalizableMessage> errors, JLabel label) |
| | | { |
| | | if (!isServerRunning()) |
| | | { |
| | |
| | | * @param errors the list of error messages. |
| | | */ |
| | | protected void checkCompatibleSuperiors(Set<ObjectClass> objectClassSuperiors, |
| | | ObjectClassType objectClassType, List<Message> errors) |
| | | ObjectClassType objectClassType, List<LocalizableMessage> errors) |
| | | { |
| | | SortedSet<String> notCompatibleClasses = |
| | | new TreeSet<String>(new LowerCaseComparator()); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.CustomCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.guitools.controlpanel.util.ViewPositions; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_STATUS_PANEL_TITLE.get(); |
| | | } |
| | |
| | | if (!desc.isAuthenticated()) |
| | | { |
| | | errorPaneVisible = true; |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append( |
| | | INFO_CTRL_PANEL_AUTH_REQUIRED_TO_BROWSE_MONITORING_SUMMARY. |
| | | get()); |
| | | mb.append("<br><br>"+getAuthenticateHTML()); |
| | | Message title = |
| | | LocalizableMessage title = |
| | | INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_SUMMARY.get(); |
| | | updateErrorPane(errorPane, title, |
| | | ColorAndFontConstants.errorTitleFont, |
| | |
| | | ServerDescriptor.ServerStatus.NOT_CONNECTED_TO_REMOTE) |
| | | { |
| | | errorPaneVisible = true; |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_DETAILS.get( |
| | | desc.getHostname())); |
| | | mb.append("<br><br>"+getAuthenticateHTML()); |
| | | Message title = |
| | | LocalizableMessage title = |
| | | INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_SUMMARY.get(); |
| | | updateErrorPane(errorPane, title, |
| | | ColorAndFontConstants.errorTitleFont, |
| | |
| | | } |
| | | else |
| | | { |
| | | ArrayList<Message> msgs = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> msgs = new ArrayList<LocalizableMessage>(); |
| | | for (OpenDsException oe : exceptions) |
| | | { |
| | | msgs.add(oe.getMessageObject()); |
| | | } |
| | | Message title = ERR_CTRL_PANEL_ERROR_READING_CONFIGURATION_SUMMARY.get(); |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | for (Message error : msgs) |
| | | LocalizableMessage title = ERR_CTRL_PANEL_ERROR_READING_CONFIGURATION_SUMMARY.get(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | for (LocalizableMessage error : msgs) |
| | | { |
| | | if (mb.length() > 0) |
| | | { |
| | |
| | | l = Utilities.createPrimaryLabel( |
| | | INFO_CTRL_PANEL_OPEN_CONNECTIONS_LABEL.get()); |
| | | auxPanel.add(l, gbc); |
| | | currentConnections = new SelectableLabelWithHelpIcon(Message.EMPTY, null); |
| | | currentConnections = new SelectableLabelWithHelpIcon(LocalizableMessage.EMPTY, null); |
| | | |
| | | gbc.gridwidth = GridBagConstraints.REMAINDER; |
| | | gbc.insets.left = 5; |
| | |
| | | ColorAndFontConstants.defaultFont); |
| | | opendsVersion = Utilities.makeHtmlPane("", |
| | | ColorAndFontConstants.defaultFont); |
| | | javaVersion = new SelectableLabelWithHelpIcon(Message.EMPTY, null); |
| | | javaVersion = new SelectableLabelWithHelpIcon(LocalizableMessage.EMPTY, null); |
| | | adminConnector = Utilities.makeHtmlPane("", |
| | | ColorAndFontConstants.defaultFont); |
| | | |
| | |
| | | |
| | | private String getStatusLabel(ServerDescriptor desc) |
| | | { |
| | | Message status; |
| | | LocalizableMessage status; |
| | | switch (desc.getStatus()) |
| | | { |
| | | case STARTED: |
| | |
| | | return status.toString(); |
| | | } |
| | | |
| | | private void setTitleBorder(JPanel p, Message title) |
| | | private void setTitleBorder(JPanel p, LocalizableMessage title) |
| | | { |
| | | p.setBorder(Utilities.makeTitledBorder(title)); |
| | | p.getAccessibleContext().setAccessibleName(title.toString()); |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.AttributeCellEditor; |
| | | import org.opends.guitools.controlpanel.ui.renderer.LDAPEntryTableCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.LDIFReader; |
| | | import org.opends.server.util.ServerConstants; |
| | |
| | | new TreeSet<AttributeValuePair>(this); |
| | | Set<String> requiredAttrs = new HashSet<String>(); |
| | | private final String[] COLUMN_NAMES = new String[] { |
| | | getHeader(Message.raw("Attribute"), 40), |
| | | getHeader(Message.raw("Value", 40))}; |
| | | getHeader(LocalizableMessage.raw("Attribute"), 40), |
| | | getHeader(LocalizableMessage.raw("Value", 40))}; |
| | | private int sortColumn = 0; |
| | | private boolean sortAscending = true; |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer. |
| | | NoLeftInsetCategoryComboBoxRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.backends.task.RecurringTask; |
| | | |
| | | /** |
| | |
| | | private Component monthlyPanel; |
| | | private Component cronPanel; |
| | | |
| | | private Message LAUNCH_NOW = INFO_CTRL_PANEL_LAUNCH_NOW.get(); |
| | | private Message LAUNCH_LATER = INFO_CTRL_PANEL_LAUNCH_LATER.get(); |
| | | private Message LAUNCH_DAILY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_DAILY.get(); |
| | | private Message LAUNCH_WEEKLY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_WEEKLY.get(); |
| | | private Message LAUNCH_MONTHLY = |
| | | private LocalizableMessage LAUNCH_NOW = INFO_CTRL_PANEL_LAUNCH_NOW.get(); |
| | | private LocalizableMessage LAUNCH_LATER = INFO_CTRL_PANEL_LAUNCH_LATER.get(); |
| | | private LocalizableMessage LAUNCH_DAILY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_DAILY.get(); |
| | | private LocalizableMessage LAUNCH_WEEKLY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_WEEKLY.get(); |
| | | private LocalizableMessage LAUNCH_MONTHLY = |
| | | INFO_CTRL_PANEL_TASK_TO_SCHEDULE_MONTHLY.get(); |
| | | private Message CRON = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_CRON.get(); |
| | | private LocalizableMessage CRON = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_CRON.get(); |
| | | |
| | | private ScheduleType schedule; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_TASK_TO_SCHEDULE_TITLE.get(taskName); |
| | | } |
| | |
| | | public void okClicked() |
| | | { |
| | | schedule = null; |
| | | ArrayList<Message> errorMessages = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errorMessages = new ArrayList<LocalizableMessage>(); |
| | | |
| | | updateErrorMessages(errorMessages); |
| | | |
| | |
| | | * collection of messages with the errors that have been found. |
| | | * @param errorMessages the collection of messages to be updated. |
| | | */ |
| | | private void updateErrorMessages(Collection<Message> errorMessages) |
| | | private void updateErrorMessages(Collection<LocalizableMessage> errorMessages) |
| | | { |
| | | Object type = |
| | | ((CategorizedComboBoxElement)scheduleType.getSelectedItem()).getValue(); |
| | |
| | | * The associated labels are also updated. |
| | | * @param errorMessages the collection of messages to be updated. |
| | | */ |
| | | private void updateLaunchLaterErrorMessages(Collection<Message> errorMessages) |
| | | private void updateLaunchLaterErrorMessages(Collection<LocalizableMessage> errorMessages) |
| | | { |
| | | setPrimaryValid(lTime); |
| | | setPrimaryValid(lDay); |
| | |
| | | * The associated labels are also updated. |
| | | * @param errorMessages the collection of messages to be updated. |
| | | */ |
| | | private void updateLaunchDailyErrorMessages(Collection<Message> errorMessages) |
| | | private void updateLaunchDailyErrorMessages(Collection<LocalizableMessage> errorMessages) |
| | | { |
| | | setPrimaryValid(lDailyTime); |
| | | |
| | |
| | | * @param errorMessages the collection of messages to be updated. |
| | | */ |
| | | private void updateLaunchWeeklyErrorMessages( |
| | | Collection<Message> errorMessages) |
| | | Collection<LocalizableMessage> errorMessages) |
| | | { |
| | | setPrimaryValid(lWeeklyTime); |
| | | setPrimaryValid(lWeeklyDays); |
| | |
| | | * @param errorMessages the collection of messages to be updated. |
| | | */ |
| | | private void updateLaunchMonthlyErrorMessages( |
| | | Collection<Message> errorMessages) |
| | | Collection<LocalizableMessage> errorMessages) |
| | | { |
| | | setPrimaryValid(lMonthlyTime); |
| | | setPrimaryValid(lMonthlyDays); |
| | |
| | | * The associated labels are also updated. |
| | | * @param errorMessages the collection of messages to be updated. |
| | | */ |
| | | private void updateCronErrorMessages(Collection<Message> errorMessages) |
| | | private void updateCronErrorMessages(Collection<LocalizableMessage> errorMessages) |
| | | { |
| | | setPrimaryValid(lCronMinute); |
| | | setPrimaryValid(lCronHour); |
| | |
| | | * @param errorMessages the collection of messages to be updated. |
| | | */ |
| | | private void updateCronErrorMessages(String value, JLabel label, |
| | | Message errorIfEmpty, Message contentError, int minValue, int maxValue, |
| | | Collection<Message> errorMessages) |
| | | LocalizableMessage errorIfEmpty, LocalizableMessage contentError, int minValue, int maxValue, |
| | | Collection<LocalizableMessage> errorMessages) |
| | | { |
| | | if (value.length() == 0) |
| | | { |
| | |
| | | * with the encountered problems. |
| | | */ |
| | | private void checkTime(JTextField time, JLabel lTime, int[] h, int[] m, |
| | | Collection<Message> errorMessages) |
| | | Collection<LocalizableMessage> errorMessages) |
| | | { |
| | | String sTime = time.getText().trim(); |
| | | int index = sTime.indexOf(':'); |
| | |
| | | DefaultComboBoxModel model = new DefaultComboBoxModel(); |
| | | month.setModel(model); |
| | | |
| | | Message[] monthMessages = |
| | | LocalizableMessage[] monthMessages = |
| | | { |
| | | INFO_CTRL_PANEL_JANUARY.get(), |
| | | INFO_CTRL_PANEL_FEBRUARY.get(), |
| | |
| | | INFO_CTRL_PANEL_NOVEMBER.get(), |
| | | INFO_CTRL_PANEL_DECEMBER.get(), |
| | | }; |
| | | for (Message msg : monthMessages) |
| | | for (LocalizableMessage msg : monthMessages) |
| | | { |
| | | model.addElement(msg.toString()); |
| | | } |
| | |
| | | |
| | | JLabel[] labels = {lTime, lDay, lMonth, lYear}; |
| | | JComponent[] comps = {time, day, month, year}; |
| | | Message[] inlineHelp = |
| | | LocalizableMessage[] inlineHelp = |
| | | { |
| | | INFO_CTRL_PANEL_TASK_TO_SCHEDULE_TIME_TOOLTIP.get(), |
| | | null, |
| | |
| | | gbc.gridwidth = 1; |
| | | for (int i=0 ; i<monthDays.length; i++) |
| | | { |
| | | monthDays[i] = Utilities.createCheckBox(Message.raw(String.valueOf(i+1))); |
| | | monthDays[i] = Utilities.createCheckBox(LocalizableMessage.raw(String.valueOf(i+1))); |
| | | monthDays[i].setFont(ColorAndFontConstants.inlineHelpFont); |
| | | int x = i % 7; |
| | | if (x == 0 && i != 0) |
| | |
| | | lCronMonth}; |
| | | Component[] comps = {cronMinute, cronHour, cronWeekDay, cronMonthDay, |
| | | cronMonth}; |
| | | Message[] help = |
| | | LocalizableMessage[] help = |
| | | { |
| | | INFO_CTRL_PANEL_CRON_MINUTE_HELP.get(), |
| | | INFO_CTRL_PANEL_CRON_HOUR_HELP.get(), |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Dialog used to inform the user that there are unsaved changes in a panel. |
| | |
| | | * @param title the title of the message. |
| | | * @param details the details of the message. |
| | | */ |
| | | public void setMessage(Message title, Message details) |
| | | public void setMessage(LocalizableMessage title, LocalizableMessage details) |
| | | { |
| | | panel.updateConfirmationPane(panel.errorPane, title, |
| | | ColorAndFontConstants.errorTitleFont, details, |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_UNSAVED_CHANGES_DIALOG_TITLE.get(); |
| | | } |
| | |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.util.ConfigReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.client.ManagementContext; |
| | | import org.opends.server.admin.client.ldap.JNDIDirContextAdaptor; |
| | | import org.opends.server.admin.client.ldap.LDAPManagementContext; |
| | |
| | | |
| | | private boolean ignoreCheckSave; |
| | | |
| | | private Message INDEX_MODIFIED = |
| | | private LocalizableMessage INDEX_MODIFIED = |
| | | INFO_CTRL_PANEL_INDEX_MODIFIED_MESSAGE.get(); |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_VLV_INDEX_PANEL_TITLE.get(); |
| | | } |
| | |
| | | |
| | | private void deleteIndex() |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | ProgressDialog dlg = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), |
| | |
| | | { |
| | | return; |
| | | } |
| | | List<Message> errors = checkErrors(false); |
| | | List<LocalizableMessage> errors = checkErrors(false); |
| | | |
| | | if (errors.isEmpty()) |
| | | { |
| | |
| | | { |
| | | ignoreCheckSave = true; |
| | | readOnlyName.setText(index.getName()); |
| | | titlePanel.setDetails(Message.raw(index.getName())); |
| | | titlePanel.setDetails(LocalizableMessage.raw(index.getName())); |
| | | if (index.getBackend() != null) |
| | | { |
| | | updateBaseDNCombo(index.getBackend()); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_MODIFY_VLV_INDEX_TASK_DESCRIPTION.get( |
| | | indexName, backendID); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.IndexComboBoxCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.guitools.controlpanel.util.ViewPositions; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The panel that appears when the user wants to verify an index. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_VERIFY_INDEXES_PANEL_TITLE.get(); |
| | | } |
| | |
| | | setSecondaryValid(addRemove.getSelectedLabel()); |
| | | setSecondaryValid(lIndex); |
| | | |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | |
| | | String baseDN = getSelectedBaseDN(); |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_VERIFY_INDEX_TASK_DESCRIPTION.get(baseDN); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | import org.opends.guitools.controlpanel.event.LDAPEntryChangedListener; |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.replication.plugin.EntryHistorical; |
| | | import org.opends.server.schema.SchemaConstants; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_EDIT_LDAP_ENTRY_TITLE.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.tools.ConfigureWindowsService; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_WINDOWS_SERVICE_TITLE.get(); |
| | | } |
| | |
| | | |
| | | private void updateWindowsService() |
| | | { |
| | | LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | ProgressDialog progressDialog = new ProgressDialog( |
| | | Utilities.createFrame(), Utilities.getParentDialog(this), getTitle(), |
| | | getInfo()); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTaskDescription() |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | if (enableService) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.Action; |
| | | import org.opends.guitools.controlpanel.datamodel.Category; |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * A basic extension of a button that changes its rendering so that the looks |
| | |
| | | { |
| | | //Calculate border based on category settings |
| | | Category cat = new Category(); |
| | | cat.setName(Message.EMPTY); |
| | | cat.setName(LocalizableMessage.EMPTY); |
| | | CategoryButton b = new CategoryButton(cat); |
| | | int n = b.getIconTextGap() + b.getIcon().getIconWidth() + |
| | | b.getBorder().getBorderInsets(b).left; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui.components; |
| | |
| | | import org.opends.guitools.controlpanel.browser.IconPool; |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * A component that acts as a checkbox but uses some customized buttons to |
| | |
| | | * Constructor of the BasicExpander. |
| | | * @param text the text to be displayed in the label of the BasicExpander. |
| | | */ |
| | | public BasicExpander(Message text) |
| | | public BasicExpander(LocalizableMessage text) |
| | | { |
| | | super(text.toString()); |
| | | setHorizontalTextPosition(SwingConstants.TRAILING); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui.components; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.BinaryValue; |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * A simple panel used in the LDAP entry viewers to display a binary value. |
| | |
| | | gbc.fill = GridBagConstraints.HORIZONTAL; |
| | | gbc.gridx = 0; |
| | | gbc.gridy = 0; |
| | | iconButton = Utilities.createButton(Message.EMPTY); |
| | | iconButton = Utilities.createButton(LocalizableMessage.EMPTY); |
| | | label = Utilities.createDefaultLabel( |
| | | INFO_CTRL_PANEL_NO_VALUE_SPECIFIED.get()); |
| | | add(iconButton); |
| | |
| | | * @param isImage whether the array of bytes represents an image or not. |
| | | * @return the message describing the provided array of bytes. |
| | | */ |
| | | public Message getString(byte[] value, boolean isImage) |
| | | public LocalizableMessage getString(byte[] value, boolean isImage) |
| | | { |
| | | if (value == null) |
| | | { |
| | |
| | | } |
| | | else if (isImage) |
| | | { |
| | | return Message.EMPTY; |
| | | return LocalizableMessage.EMPTY; |
| | | } |
| | | else |
| | | { |
| | |
| | | * a viewer). |
| | | * @param text the text of the button. |
| | | */ |
| | | public void setEditButtonText(Message text) |
| | | public void setEditButtonText(LocalizableMessage text) |
| | | { |
| | | editButton.setText(text.toString()); |
| | | } |
| | |
| | | * @param isImage whether the binary value represents an image or not. |
| | | * @return the message describing the provided binary value. |
| | | */ |
| | | public Message getMessage(BinaryValue value, boolean isImage) |
| | | public LocalizableMessage getMessage(BinaryValue value, boolean isImage) |
| | | { |
| | | Message returnValue; |
| | | LocalizableMessage returnValue; |
| | | if (value == null) |
| | | { |
| | | returnValue = INFO_CTRL_PANEL_NO_VALUE_SPECIFIED.get(); |
| | | } |
| | | else if (isImage) |
| | | { |
| | | returnValue = Message.EMPTY; |
| | | returnValue = LocalizableMessage.EMPTY; |
| | | } |
| | | else if (value.getType() == BinaryValue.Type.BASE64_STRING) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui.components; |
| | |
| | | import javax.swing.JButton; |
| | | import javax.swing.KeyStroke; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * This is a simple extension of the JButton class used to be able to invoke |
| | |
| | | * The constructor of the cell editor button. |
| | | * @param label the label of the button. |
| | | */ |
| | | public CellEditorButton(Message label) |
| | | public CellEditorButton(LocalizableMessage label) |
| | | { |
| | | super(label.toString()); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui.components; |
| | |
| | | |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * A panel containing a label an a help icon. A customized tool tip is used, |
| | |
| | | * @param text the text of the panel. |
| | | * @param tooltipIcon the tool tip of the help icon. |
| | | */ |
| | | public LabelWithHelpIcon(Message text, Message tooltipIcon) |
| | | public LabelWithHelpIcon(LocalizableMessage text, LocalizableMessage tooltipIcon) |
| | | { |
| | | super(new GridBagLayout()); |
| | | setOpaque(false); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui.components; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.ObjectClassValue; |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | /** |
| | | * A simple panel used in the LDAP entry viewers to display the object class |
| | |
| | | * @param value the object class value. |
| | | * @return the message describing the provided object class value. |
| | | */ |
| | | public Message getMessage(ObjectClassValue value) |
| | | public LocalizableMessage getMessage(ObjectClassValue value) |
| | | { |
| | | MessageBuilder sb = new MessageBuilder(); |
| | | LocalizableMessageBuilder sb = new LocalizableMessageBuilder(); |
| | | if (value != null) |
| | | { |
| | | Set<String> aux = new TreeSet<String>(); |
| | |
| | | } |
| | | if (sb.length() > 0) |
| | | { |
| | | return Message.raw("<html>"+Utilities.applyFont(sb.toString(), |
| | | return LocalizableMessage.raw("<html>"+Utilities.applyFont(sb.toString(), |
| | | ColorAndFontConstants.defaultFont)); |
| | | } |
| | | else |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui.components; |
| | |
| | | |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * A panel containing a label an a help icon. A customized tool tip is used, |
| | |
| | | * @param text the text of the panel. |
| | | * @param tooltipIcon the tool tip of the help icon. |
| | | */ |
| | | public SelectableLabelWithHelpIcon(Message text, Message tooltipIcon) |
| | | public SelectableLabelWithHelpIcon(LocalizableMessage text, LocalizableMessage tooltipIcon) |
| | | { |
| | | super(new GridBagLayout()); |
| | | setOpaque(false); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui.components; |
| | |
| | | import javax.swing.JPanel; |
| | | |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | /** |
| | | * This is a panel containing two labels with different fonts. It is used |
| | |
| | | private JLabel lTitle; |
| | | private JLabel lDetails; |
| | | |
| | | private Message title; |
| | | private Message details; |
| | | private LocalizableMessage title; |
| | | private LocalizableMessage details; |
| | | |
| | | /** |
| | | * Constructor of the panel. |
| | | * @param title the title of the panel. |
| | | * @param details the details of the panel. |
| | | */ |
| | | public TitlePanel(Message title, Message details) |
| | | public TitlePanel(LocalizableMessage title, LocalizableMessage details) |
| | | { |
| | | super(new GridBagLayout()); |
| | | setOpaque(false); |
| | | GridBagConstraints gbc = new GridBagConstraints(); |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(title); |
| | | mb.append(" - "); |
| | | lTitle = Utilities.createTitleLabel(mb.toMessage()); |
| | |
| | | * Sets the title of this panel. |
| | | * @param title the title of this panel. |
| | | */ |
| | | public void setTitle(Message title) |
| | | public void setTitle(LocalizableMessage title) |
| | | { |
| | | lTitle.setText(title+" - "); |
| | | this.title = title; |
| | |
| | | * Sets the details of this panel. |
| | | * @param details the details of this panel. |
| | | */ |
| | | public void setDetails(Message details) |
| | | public void setDetails(LocalizableMessage details) |
| | | { |
| | | lDetails.setText(details.toString()); |
| | | this.details = details; |
| | |
| | | * Returns the title of this panel. |
| | | * @return the title of this panel. |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return title; |
| | | } |
| | |
| | | * Returns the details of this panel. |
| | | * @return the details of this panel. |
| | | */ |
| | | public Message getDetails() |
| | | public LocalizableMessage getDetails() |
| | | { |
| | | return details; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui.components; |
| | |
| | | import org.opends.guitools.controlpanel.ui.GenericDialog; |
| | | import org.opends.guitools.controlpanel.ui.StatusGenericPanel; |
| | | import org.opends.guitools.controlpanel.ui.renderer.TreeCellRenderer; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * A basic panel containing a CustomTree. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return null; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui.nodes; |
| | | |
| | | import javax.swing.tree.DefaultMutableTreeNode; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The tree node that is used to represent a category. It is used for instance |
| | |
| | | * Constructor. |
| | | * @param name the name of the node (the one that be used to display). |
| | | */ |
| | | public CategoryTreeNode(Message name) |
| | | public CategoryTreeNode(LocalizableMessage name) |
| | | { |
| | | super(name); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui.renderer; |
| | |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.ui.components.LabelWithHelpIcon; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Class used to render the tables. |
| | |
| | | */ |
| | | public CustomCellRenderer() |
| | | { |
| | | super(Message.EMPTY, null); |
| | | super(LocalizableMessage.EMPTY, null); |
| | | setHelpIconVisible(false); |
| | | setFont(ColorAndFontConstants.tableFont); |
| | | setOpaque(true); |
| | |
| | | import java.util.HashSet; |
| | | import java.util.Set; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.Configuration; |
| | | import org.opends.server.api.ConfigHandler; |
| | | import org.opends.server.config.ConfigEntry; |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | Message message = ERR_CONFIG_FILE_CANNOT_OPEN_FOR_READ.get( |
| | | LocalizableMessage message = ERR_CONFIG_FILE_CANNOT_OPEN_FOR_READ.get( |
| | | f.getAbsolutePath(), String.valueOf(t)); |
| | | throw new InitializationException(message, t); |
| | | } |
| | | |
| | | if (! f.exists()) |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_FILE_DOES_NOT_EXIST.get(f.getAbsolutePath()); |
| | | throw new InitializationException(message); |
| | | } |
| | |
| | | entry = reader.readEntry(checkSchema); |
| | | if (entry == null) |
| | | { |
| | | Message message = ERR_CONFIG_FILE_EMPTY.get(f.getAbsolutePath()); |
| | | LocalizableMessage message = ERR_CONFIG_FILE_EMPTY.get(f.getAbsolutePath()); |
| | | throw new InitializationException(message); |
| | | } |
| | | configRootEntry = new ConfigEntry(entry, null); |
| | |
| | | { |
| | | if (parentDN == null) |
| | | { |
| | | Message message = ERR_CONFIG_FILE_UNKNOWN_PARENT.get( |
| | | LocalizableMessage message = ERR_CONFIG_FILE_UNKNOWN_PARENT.get( |
| | | entryDN.toString(), |
| | | reader.getLastEntryLineNumber(), |
| | | f.getAbsolutePath()); |
| | |
| | | } |
| | | else |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_FILE_NO_PARENT.get(entryDN.toString(), |
| | | reader.getLastEntryLineNumber(), |
| | | f.getAbsolutePath(), parentDN.toString()); |
| | |
| | | } |
| | | catch (LDIFException le) |
| | | { |
| | | Message message = ERR_CONFIG_FILE_INVALID_LDIF_ENTRY.get( |
| | | LocalizableMessage message = ERR_CONFIG_FILE_INVALID_LDIF_ENTRY.get( |
| | | le.getLineNumber(), f.getAbsolutePath(), |
| | | String.valueOf(le)); |
| | | throw new InitializationException(message, le); |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | Message message = ERR_CONFIG_FILE_READ_ERROR.get(f.getAbsolutePath(), |
| | | LocalizableMessage message = ERR_CONFIG_FILE_READ_ERROR.get(f.getAbsolutePath(), |
| | | String.valueOf(t)); |
| | | throw new InitializationException(message, t); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.util; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.MatchingRule; |
| | |
| | | File schemaDir = new File(schemaDirPath); |
| | | if (schemaDirPath == null || !schemaDir.exists()) |
| | | { |
| | | Message message = ERR_CONFIG_SCHEMA_NO_SCHEMA_DIR.get(schemaDirPath); |
| | | LocalizableMessage message = ERR_CONFIG_SCHEMA_NO_SCHEMA_DIR.get(schemaDirPath); |
| | | throw new InitializationException(message); |
| | | } |
| | | else if (!schemaDir.isDirectory()) |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_SCHEMA_DIR_NOT_DIRECTORY.get(schemaDirPath); |
| | | throw new InitializationException(message); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_SCHEMA_CANNOT_LIST_FILES |
| | | .get(schemaDirPath, e.getMessage()); |
| | | throw new InitializationException(message, e); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.util; |
| | | |
| | |
| | | SelectableLabelWithHelpIcon; |
| | | import org.opends.guitools.controlpanel.ui.renderer. |
| | | AccessibleTableHeaderRenderer; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.Installation; |
| | | import org.opends.quicksetup.ui.UIFactory; |
| | | import org.opends.quicksetup.util.Utils; |
| | |
| | | private static ImageIcon requiredIcon; |
| | | |
| | | |
| | | private static Message NO_VALUE_SET = |
| | | private static LocalizableMessage NO_VALUE_SET = |
| | | INFO_CTRL_PANEL_NO_MONITORING_VALUE.get(); |
| | | private static Message NOT_IMPLEMENTED = |
| | | private static LocalizableMessage NOT_IMPLEMENTED = |
| | | INFO_CTRL_PANEL_NOT_IMPLEMENTED.get(); |
| | | |
| | | /** |
| | |
| | | * @param errors the set of error messages that the dialog must display. |
| | | */ |
| | | public static void displayErrorDialog(Component parentComponent, |
| | | Collection<Message> errors) |
| | | Collection<LocalizableMessage> errors) |
| | | { |
| | | /* |
| | | ErrorPanel panel = new ErrorPanel("Error", errors); |
| | |
| | | dlg.setVisible(true); |
| | | */ |
| | | ArrayList<String> stringErrors = new ArrayList<String>(); |
| | | for (Message err : errors) |
| | | for (LocalizableMessage err : errors) |
| | | { |
| | | stringErrors.add(err.toString()); |
| | | } |
| | |
| | | * |
| | | */ |
| | | public static boolean displayConfirmationDialog(Component parentComponent, |
| | | Message title, Message msg) |
| | | LocalizableMessage title, LocalizableMessage msg) |
| | | { |
| | | String plainText = msg.toString().replaceAll("<br>", ServerConstants.EOL); |
| | | String wrappedText = StaticUtils.wrapText(plainText, 70); |
| | |
| | | * @param msg the message to be displayed. |
| | | */ |
| | | public static void displayWarningDialog(Component parentComponent, |
| | | Message title, Message msg) |
| | | LocalizableMessage title, LocalizableMessage msg) |
| | | { |
| | | String plainText = msg.toString().replaceAll("<br>", ServerConstants.EOL); |
| | | String wrappedText = StaticUtils.wrapText(plainText, 70); |
| | |
| | | * @param msg the message to be displayed in the titled border. |
| | | * @return the created titled border. |
| | | */ |
| | | public static Border makeTitledBorder(Message msg) |
| | | public static Border makeTitledBorder(LocalizableMessage msg) |
| | | { |
| | | TitledBorder border = new TitledBorder(new EtchedBorder(), |
| | | " "+msg+" "); |
| | |
| | | * @param text the message to be displayed by the button. |
| | | * @return the created button. |
| | | */ |
| | | public static JButton createButton(Message text) |
| | | public static JButton createButton(LocalizableMessage text) |
| | | { |
| | | JButton button = new JButton(text.toString()); |
| | | button.setOpaque(false); |
| | |
| | | * @param text the message to be displayed by the radio button. |
| | | * @return the created radio button. |
| | | */ |
| | | public static JRadioButton createRadioButton(Message text) |
| | | public static JRadioButton createRadioButton(LocalizableMessage text) |
| | | { |
| | | JRadioButton button = new JRadioButton(text.toString()); |
| | | button.setOpaque(false); |
| | |
| | | * @param text the message to be displayed by the check box. |
| | | * @return the created check box. |
| | | */ |
| | | public static JCheckBox createCheckBox(Message text) |
| | | public static JCheckBox createCheckBox(LocalizableMessage text) |
| | | { |
| | | JCheckBox cb = new JCheckBox(text.toString()); |
| | | cb.setOpaque(false); |
| | |
| | | * @param msg the text. |
| | | * @return a menu item with the provided text. |
| | | */ |
| | | public static JMenuItem createMenuItem(Message msg) |
| | | public static JMenuItem createMenuItem(LocalizableMessage msg) |
| | | { |
| | | return new JMenuItem(msg.toString()); |
| | | } |
| | |
| | | * @param description the accessible description. |
| | | * @return a menu with the provided text. |
| | | */ |
| | | public static JMenu createMenu(Message msg, Message description) |
| | | public static JMenu createMenu(LocalizableMessage msg, LocalizableMessage description) |
| | | { |
| | | JMenu menu = new JMenu(msg.toString()); |
| | | menu.getAccessibleContext().setAccessibleDescription( |
| | |
| | | */ |
| | | public static JLabel createPrimaryLabel() |
| | | { |
| | | return createPrimaryLabel(Message.EMPTY); |
| | | return createPrimaryLabel(LocalizableMessage.EMPTY); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param text the message to be displayed by the label. |
| | | * @return the label of type 'primary' (with bigger font than usual). |
| | | */ |
| | | public static JLabel createPrimaryLabel(Message text) |
| | | public static JLabel createPrimaryLabel(LocalizableMessage text) |
| | | { |
| | | JLabel label = new JLabel(text.toString()); |
| | | label.setFont(ColorAndFontConstants.primaryFont); |
| | |
| | | * @param text the message to be displayed by the label. |
| | | * @return the label of type 'inline help' (with smaller font). |
| | | */ |
| | | public static JLabel createInlineHelpLabel(Message text) |
| | | public static JLabel createInlineHelpLabel(LocalizableMessage text) |
| | | { |
| | | JLabel label = new JLabel(text.toString()); |
| | | label.setFont(ColorAndFontConstants.inlineHelpFont); |
| | |
| | | * @param text the message to be displayed by the label. |
| | | * @return the label of type 'title' (with bigger font). |
| | | */ |
| | | public static JLabel createTitleLabel(Message text) |
| | | public static JLabel createTitleLabel(LocalizableMessage text) |
| | | { |
| | | JLabel label = new JLabel(text.toString()); |
| | | label.setFont(ColorAndFontConstants.titleFont); |
| | |
| | | */ |
| | | public static JLabel createDefaultLabel() |
| | | { |
| | | return createDefaultLabel(Message.EMPTY); |
| | | return createDefaultLabel(LocalizableMessage.EMPTY); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param text the message to be displayed by the label. |
| | | * @return the label (with default font). |
| | | */ |
| | | public static JLabel createDefaultLabel(Message text) |
| | | public static JLabel createDefaultLabel(LocalizableMessage text) |
| | | { |
| | | JLabel label = new JLabel(text.toString()); |
| | | label.setFont(ColorAndFontConstants.defaultFont); |
| | |
| | | * @param cols the columns of the text area. |
| | | * @return a text area with borders similar to the ones of a text field. |
| | | */ |
| | | public static JTextArea createTextAreaWithBorder(Message text, int rows, |
| | | public static JTextArea createTextAreaWithBorder(LocalizableMessage text, int rows, |
| | | int cols) |
| | | { |
| | | JTextArea ta = createTextArea(text, rows, cols); |
| | |
| | | * @param cols the columns of the text area. |
| | | * @return a non-editable text area. |
| | | */ |
| | | public static JTextArea createNonEditableTextArea(Message text, int rows, |
| | | public static JTextArea createNonEditableTextArea(LocalizableMessage text, int rows, |
| | | int cols) |
| | | { |
| | | JTextArea ta = createTextArea(text, rows, cols); |
| | |
| | | * @param cols the columns of the text area. |
| | | * @return a text area. |
| | | */ |
| | | public static JTextArea createTextArea(Message text, int rows, |
| | | public static JTextArea createTextArea(LocalizableMessage text, int rows, |
| | | int cols) |
| | | { |
| | | JTextArea ta = new JTextArea(text.toString(), rows, cols); |
| | |
| | | * specifying the maximum height of the image. |
| | | */ |
| | | public static ImageIcon createImageIcon(byte[] bytes, int maxHeight, |
| | | Message description, boolean useFast) |
| | | LocalizableMessage description, boolean useFast) |
| | | { |
| | | ImageIcon icon = new ImageIcon(bytes, description.toString()); |
| | | if ((maxHeight > icon.getIconHeight()) || (icon.getIconHeight() <= 0)) |
| | |
| | | * @param nCols the number of columns. |
| | | * @return the wrapped message. |
| | | */ |
| | | public static Message wrapHTML(Message msg, int nCols) |
| | | public static LocalizableMessage wrapHTML(LocalizableMessage msg, int nCols) |
| | | { |
| | | String s = msg.toString(); |
| | | StringBuilder sb = new StringBuilder(); |
| | |
| | | { |
| | | sb.append(lastLine); |
| | | } |
| | | return Message.raw(sb.toString()); |
| | | return LocalizableMessage.raw(sb.toString()); |
| | | } |
| | | |
| | | private static boolean isLineBreakTag(String tag) |
| | |
| | | * @return the HTML representation of a message to which some points have |
| | | * been appended. |
| | | */ |
| | | public static String getProgressWithPoints(Message plainText, |
| | | public static String getProgressWithPoints(LocalizableMessage plainText, |
| | | Font progressFont) |
| | | { |
| | | return applyFont(plainText.toString(), progressFont)+ |
| | |
| | | * @param detailsFont the font to be used for the details. |
| | | * @return the HTML representation of an error for the given text. |
| | | */ |
| | | public static String getFormattedError(Message title, Font titleFont, |
| | | Message details, Font detailsFont) |
| | | public static String getFormattedError(LocalizableMessage title, Font titleFont, |
| | | LocalizableMessage details, Font detailsFont) |
| | | { |
| | | StringBuilder buf = new StringBuilder(); |
| | | buf.append(UIFactory.getIconHtml(UIFactory.IconType.ERROR_LARGE)) |
| | |
| | | * @param detailsFont the font to be used for the details. |
| | | * @return the HTML representation of a success for the given text. |
| | | */ |
| | | public static String getFormattedSuccess(Message title, Font titleFont, |
| | | Message details, Font detailsFont) |
| | | public static String getFormattedSuccess(LocalizableMessage title, Font titleFont, |
| | | LocalizableMessage details, Font detailsFont) |
| | | { |
| | | StringBuilder buf = new StringBuilder(); |
| | | buf.append(UIFactory.getIconHtml(UIFactory.IconType.INFORMATION_LARGE)) |
| | |
| | | * @param detailsFont the font to be used for the details. |
| | | * @return the HTML representation of a confirmation for the given text. |
| | | */ |
| | | public static String getFormattedConfirmation(Message title, Font titleFont, |
| | | Message details, Font detailsFont) |
| | | public static String getFormattedConfirmation(LocalizableMessage title, Font titleFont, |
| | | LocalizableMessage details, Font detailsFont) |
| | | { |
| | | StringBuilder buf = new StringBuilder(); |
| | | buf.append(UIFactory.getIconHtml(UIFactory.IconType.WARNING_LARGE)) |
| | |
| | | * @param detailsFont the font to be used for the details. |
| | | * @return the HTML representation of a success for the given text. |
| | | */ |
| | | public static String getFormattedWarning(Message title, Font titleFont, |
| | | Message details, Font detailsFont) |
| | | public static String getFormattedWarning(LocalizableMessage title, Font titleFont, |
| | | LocalizableMessage details, Font detailsFont) |
| | | { |
| | | StringBuilder buf = new StringBuilder(); |
| | | buf.append(UIFactory.getIconHtml(UIFactory.IconType.WARNING_LARGE)) |
| | |
| | | * @param l the label to be updated. |
| | | * @param text the text to be set on the label. |
| | | */ |
| | | public static void setWarningLabel(JLabel l, Message text) |
| | | public static void setWarningLabel(JLabel l, LocalizableMessage text) |
| | | { |
| | | l.setText(text.toString()); |
| | | if (warningIcon == null) |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.uninstaller; |
| | |
| | | import org.opends.admin.ads.util.ApplicationTrustManager; |
| | | import org.opends.guitools.controlpanel.datamodel.ConnectionProtocolPolicy; |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | |
| | | /* |
| | | * Step 2: check that the provided parameters are compatible. |
| | | */ |
| | | MessageBuilder buf = new MessageBuilder(); |
| | | LocalizableMessageBuilder buf = new LocalizableMessageBuilder(); |
| | | int v = args.validateGlobalOptions(buf); |
| | | if (v != DsFrameworkCliReturnCode.SUCCESSFUL_NOP.getReturnCode()) |
| | | { |
| | |
| | | "Error retrieving a valid LDAP URL in conf file."); |
| | | if (!parser.isInteractive()) |
| | | { |
| | | Message msg = ERR_COULD_NOT_FIND_VALID_LDAPURL.get(); |
| | | LocalizableMessage msg = ERR_COULD_NOT_FIND_VALID_LDAPURL.get(); |
| | | throw new ApplicationException(ReturnCode.APPLICATION_ERROR, msg, |
| | | null); |
| | | } |
| | |
| | | final int REMOVE_ALL = 1; |
| | | final int SPECIFY_TO_REMOVE = 2; |
| | | int[] indexes = {REMOVE_ALL, SPECIFY_TO_REMOVE}; |
| | | Message[] msgs = new Message[] { |
| | | LocalizableMessage[] msgs = new LocalizableMessage[] { |
| | | INFO_CLI_UNINSTALL_REMOVE_ALL.get(), |
| | | INFO_CLI_UNINSTALL_SPECIFY_WHAT_REMOVE.get() |
| | | }; |
| | |
| | | |
| | | builder.addQuitOption(); |
| | | |
| | | builder.setDefault(Message.raw(String.valueOf(REMOVE_ALL)), |
| | | builder.setDefault(LocalizableMessage.raw(String.valueOf(REMOVE_ALL)), |
| | | MenuResult.success(REMOVE_ALL)); |
| | | |
| | | builder.setMaxTries(CONFIRMATION_MAX_TRIES); |
| | |
| | | { |
| | | println(); |
| | | // Ask for confirmation for the different items |
| | | msgs = new Message [] { |
| | | msgs = new LocalizableMessage [] { |
| | | INFO_CLI_UNINSTALL_CONFIRM_LIBRARIES_BINARIES.get(), |
| | | INFO_CLI_UNINSTALL_CONFIRM_DATABASES.get(), |
| | | INFO_CLI_UNINSTALL_CONFIRM_LOGS.get(), |
| | |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Error retrieving a valid Administration Connector URL in conf file."); |
| | | Message msg = ERR_COULD_NOT_FIND_VALID_LDAPURL.get(); |
| | | LocalizableMessage msg = ERR_COULD_NOT_FIND_VALID_LDAPURL.get(); |
| | | throw new ApplicationException(ReturnCode.APPLICATION_ERROR, msg, |
| | | null); |
| | | } |
| | |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Error retrieving a valid Administration Connector URL in conf file."); |
| | | Message msg = ERR_COULD_NOT_FIND_VALID_LDAPURL.get(); |
| | | LocalizableMessage msg = ERR_COULD_NOT_FIND_VALID_LDAPURL.get(); |
| | | throw new ApplicationException(ReturnCode.APPLICATION_ERROR, msg, |
| | | null); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getSummary(ProgressStep step) |
| | | public LocalizableMessage getSummary(ProgressStep step) |
| | | { |
| | | return null; |
| | | } |
| | |
| | | |
| | | boolean exceptionOccurred = true; |
| | | |
| | | Message exceptionMsg = null; |
| | | LocalizableMessage exceptionMsg = null; |
| | | |
| | | LOG.log(Level.INFO, "Updating user data with remote servers."); |
| | | |
| | |
| | | exceptions.add(e); |
| | | } |
| | | } |
| | | Set<Message> exceptionMsgs = new LinkedHashSet<Message>(); |
| | | Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<LocalizableMessage>(); |
| | | /* Check the exceptions and see if we throw them or not. */ |
| | | for (TopologyCacheException e : exceptions) |
| | | { |
| | |
| | | { |
| | | if (parser.isForceOnError()) |
| | | { |
| | | Message msg = Utils.getMessageFromCollection(exceptionMsgs, |
| | | LocalizableMessage msg = Utils.getMessageFromCollection(exceptionMsgs, |
| | | Constants.LINE_SEPARATOR); |
| | | println(); |
| | | printErrorMessage(msg); |
| | |
| | | } |
| | | else |
| | | { |
| | | Message msg = |
| | | LocalizableMessage msg = |
| | | ERR_UNINSTALL_ERROR_UPDATING_REMOTE_NO_FORCE.get( |
| | | "--"+ |
| | | parser.getSecureArgsList().adminUidArg.getLongIdentifier(), |
| | |
| | | forceNonInteractive = false; |
| | | } |
| | | |
| | | private void printErrorMessage(Message msg) |
| | | private void printErrorMessage(LocalizableMessage msg) |
| | | { |
| | | super.println(msg); |
| | | LOG.log(Level.WARNING, msg.toString()); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.uninstaller; |
| | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import static org.opends.messages.ToolMessages.ERR_ERROR_PARSING_ARGS; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.messages.ToolMessages; |
| | | |
| | | import java.io.File; |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | Message message = ERR_ERROR_PARSING_ARGS.get(ae.getMessage()); |
| | | LocalizableMessage message = ERR_ERROR_PARSING_ARGS.get(ae.getMessage()); |
| | | System.err.println(message); |
| | | System.err.println(); |
| | | System.err.println(argParser.getUsage()); |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | ToolMessages.ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()); |
| | | System.err.println(org.opends.server.util.StaticUtils.wrapText(message, |
| | | Utils.getCommandLineMaxLineWidth())); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getFrameTitle() { |
| | | Message title = Utils.getCustomizedObject("INFO_FRAME_UNINSTALL_TITLE", |
| | | protected LocalizableMessage getFrameTitle() { |
| | | LocalizableMessage title = Utils.getCustomizedObject("INFO_FRAME_UNINSTALL_TITLE", |
| | | INFO_FRAME_UNINSTALL_TITLE.get( |
| | | DynamicConstants.PRODUCT_NAME), Message.class); |
| | | DynamicConstants.PRODUCT_NAME), LocalizableMessage.class); |
| | | return title; |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.uninstaller; |
| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.tools.ConfigureWindowsService; |
| | | import org.opends.server.tools.ToolConstants; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | |
| | | private HashMap<ProgressStep, Integer> hmRatio = |
| | | new HashMap<ProgressStep, Integer>(); |
| | | |
| | | private HashMap<ProgressStep, Message> hmSummary = |
| | | new HashMap<ProgressStep, Message>(); |
| | | private HashMap<ProgressStep, LocalizableMessage> hmSummary = |
| | | new HashMap<ProgressStep, LocalizableMessage>(); |
| | | |
| | | private ApplicationException ue; |
| | | |
| | |
| | | |
| | | private LoginDialog loginDialog; |
| | | private ProgressDialog startProgressDlg; |
| | | private MessageBuilder startProgressDetails = new MessageBuilder(); |
| | | private LocalizableMessageBuilder startProgressDetails = new LocalizableMessageBuilder(); |
| | | private UninstallData conf; |
| | | /** |
| | | * Default constructor. |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getFrameTitle() { |
| | | Message title = Utils.getCustomizedObject("INFO_FRAME_UNINSTALL_TITLE", |
| | | public LocalizableMessage getFrameTitle() { |
| | | LocalizableMessage title = Utils.getCustomizedObject("INFO_FRAME_UNINSTALL_TITLE", |
| | | INFO_FRAME_UNINSTALL_TITLE.get( |
| | | DynamicConstants.PRODUCT_NAME), Message.class); |
| | | DynamicConstants.PRODUCT_NAME), LocalizableMessage.class); |
| | | return title; |
| | | } |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getCloseButtonToolTip() { |
| | | public LocalizableMessage getCloseButtonToolTip() { |
| | | return INFO_CLOSE_BUTTON_UNINSTALL_TOOLTIP.get(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getFinishButtonToolTip() { |
| | | public LocalizableMessage getFinishButtonToolTip() { |
| | | return INFO_FINISH_BUTTON_UNINSTALL_TOOLTIP.get(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getFinishButtonLabel() { |
| | | public LocalizableMessage getFinishButtonLabel() { |
| | | return INFO_FINISH_BUTTON_UNINSTALL_LABEL.get(); |
| | | } |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public void notifyListeners(Integer ratio, Message currentPhaseSummary, |
| | | final Message newLogDetail) |
| | | public void notifyListeners(Integer ratio, LocalizableMessage currentPhaseSummary, |
| | | final LocalizableMessage newLogDetail) |
| | | { |
| | | if (runStarted) |
| | | { |
| | |
| | | if (throwable != null) { |
| | | if (throwable instanceof UserDataException) |
| | | { |
| | | qs.displayError(Message.raw(throwable.getLocalizedMessage()), |
| | | qs.displayError(LocalizableMessage.raw(throwable.getLocalizedMessage()), |
| | | INFO_ERROR_TITLE.get()); |
| | | } |
| | | else |
| | | { |
| | | LOG.log(Level.WARNING, "Error processing task: "+throwable, |
| | | throwable); |
| | | qs.displayError(Message.raw(throwable.toString()), |
| | | qs.displayError(LocalizableMessage.raw(throwable.toString()), |
| | | INFO_ERROR_TITLE.get()); |
| | | } |
| | | } else { |
| | |
| | | getFormattedSummary( |
| | | INFO_SUMMARY_DELETING_INSTALLATION_FILES.get())); |
| | | |
| | | Message successMsg; |
| | | LocalizableMessage successMsg; |
| | | Installation installation = getInstallation(); |
| | | String libPath = getPath(installation.getLibrariesDirectory()); |
| | | String resourcesPath = getPath(installation.getResourcesDirectory()); |
| | |
| | | hmSummary.put(UninstallProgressStep.FINISHED_SUCCESSFULLY, |
| | | getFormattedSuccess(successMsg)); |
| | | |
| | | Message nonCriticalMsg; |
| | | LocalizableMessage nonCriticalMsg; |
| | | if (!isCli()) |
| | | { |
| | | nonCriticalMsg = |
| | |
| | | if (ae.getType() == ReturnCode.FILE_SYSTEM_ACCESS_ERROR) |
| | | { |
| | | errorDeletingOccurred = true; |
| | | Message msg = getFormattedWarning(ae.getMessageObject()); |
| | | LocalizableMessage msg = getFormattedWarning(ae.getMessageObject()); |
| | | notifyListeners(msg); |
| | | } |
| | | else |
| | |
| | | if (ae.getType() == ReturnCode.FILE_SYSTEM_ACCESS_ERROR) |
| | | { |
| | | errorDeletingOccurred = true; |
| | | Message msg = getFormattedWarning(ae.getMessageObject()); |
| | | LocalizableMessage msg = getFormattedWarning(ae.getMessageObject()); |
| | | notifyListeners(msg); |
| | | } |
| | | else |
| | |
| | | if (ae.getType() == ReturnCode.FILE_SYSTEM_ACCESS_ERROR) |
| | | { |
| | | errorDeletingOccurred = true; |
| | | Message msg = getFormattedWarning(ae.getMessageObject()); |
| | | LocalizableMessage msg = getFormattedWarning(ae.getMessageObject()); |
| | | notifyListeners(msg); |
| | | } |
| | | else |
| | |
| | | status = UninstallProgressStep.FINISHED_SUCCESSFULLY; |
| | | } |
| | | if (isCli()) { |
| | | notifyListeners(new MessageBuilder(getLineBreak()) |
| | | notifyListeners(new LocalizableMessageBuilder(getLineBreak()) |
| | | .append(getLineBreak()).append(getSummary(status)) |
| | | .toMessage()); |
| | | } else { |
| | |
| | | LOG.log(Level.SEVERE, "Error: "+ex, ex); |
| | | ue = ex; |
| | | status = UninstallProgressStep.FINISHED_WITH_ERROR; |
| | | Message msg = getFormattedError(ex, true); |
| | | LocalizableMessage msg = getFormattedError(ex, true); |
| | | notifyListeners(msg); |
| | | } |
| | | catch (Throwable t) { |
| | |
| | | ReturnCode.BUG, |
| | | getThrowableMsg(INFO_BUG_MSG.get(), t), t); |
| | | status = UninstallProgressStep.FINISHED_WITH_ERROR; |
| | | Message msg = getFormattedError(ue, true); |
| | | LocalizableMessage msg = getFormattedError(ue, true); |
| | | notifyListeners(msg); |
| | | } |
| | | if (!isCli()) { |
| | |
| | | * @return an formatted representation of the summary for the specified |
| | | * UninstallProgressStep. |
| | | */ |
| | | public Message getSummary(ProgressStep step) { |
| | | public LocalizableMessage getSummary(ProgressStep step) { |
| | | return hmSummary.get(step); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | if (!delete) { |
| | | Message errMsg; |
| | | LocalizableMessage errMsg; |
| | | if (isFile) { |
| | | errMsg = INFO_ERROR_DELETING_FILE.get(file.getAbsolutePath()); |
| | | } else { |
| | |
| | | INFO_PROGRESS_DISABLING_WINDOWS_SERVICE.get())); |
| | | int code = ConfigureWindowsService.disableService(System.out, System.err); |
| | | |
| | | Message errorMessage = INFO_ERROR_DISABLING_WINDOWS_SERVICE.get( |
| | | LocalizableMessage errorMessage = INFO_ERROR_DISABLING_WINDOWS_SERVICE.get( |
| | | getInstallationPath()); |
| | | |
| | | switch (code) { |
| | |
| | | */ |
| | | private boolean startServer(JFrame frame) |
| | | { |
| | | startProgressDetails = new MessageBuilder(); |
| | | startProgressDetails = new LocalizableMessageBuilder(); |
| | | startProgressDlg = new ProgressDialog(frame); |
| | | startProgressDlg.setSummary( |
| | | getFormattedSummary(INFO_SUMMARY_STARTING.get())); |
| | | startProgressDlg.setDetails(Message.EMPTY); |
| | | startProgressDlg.setDetails(LocalizableMessage.EMPTY); |
| | | startProgressDlg.setCloseButtonEnabled(false); |
| | | final Boolean[] returnValue = new Boolean[] {Boolean.FALSE}; |
| | | Thread t = new Thread(new Runnable() |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | Message msg = getFormattedError(t, true); |
| | | LocalizableMessage msg = getFormattedError(t, true); |
| | | notifyListeners(msg); |
| | | } |
| | | } |
| | |
| | | exceptions.add(e); |
| | | } |
| | | } |
| | | Set<Message> exceptionMsgs = new LinkedHashSet<Message>(); |
| | | Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<LocalizableMessage>(); |
| | | /* Check the exceptions and see if we throw them or not. */ |
| | | for (TopologyCacheException e : exceptions) |
| | | { |
| | |
| | | switch (e.getType()) |
| | | { |
| | | case NOT_GLOBAL_ADMINISTRATOR: |
| | | Message errorMsg = INFO_NOT_GLOBAL_ADMINISTRATOR_PROVIDED.get(); |
| | | LocalizableMessage errorMsg = INFO_NOT_GLOBAL_ADMINISTRATOR_PROVIDED.get(); |
| | | qs.displayError(errorMsg, INFO_ERROR_TITLE.get()); |
| | | stopProcessing = true; |
| | | break; |
| | |
| | | } |
| | | if (!stopProcessing && (exceptionMsgs.size() > 0)) |
| | | { |
| | | Message confirmationMsg = |
| | | LocalizableMessage confirmationMsg = |
| | | ERR_UNINSTALL_READING_REGISTERED_SERVERS_CONFIRM_UPDATE_REMOTE.get( |
| | | getMessageFromCollection(exceptionMsgs, "\n").toString()); |
| | | stopProcessing = !qs.displayConfirmation(confirmationMsg, |
| | |
| | | |
| | | if (!getUninstallUserData().isForceOnError()) |
| | | { |
| | | Message msg = |
| | | LocalizableMessage msg = |
| | | ERR_UNINSTALL_ERROR_UPDATING_REMOTE_NO_FORCE.get( |
| | | "--"+ |
| | | parser.getSecureArgsList().adminUidArg.getLongIdentifier(), |
| | |
| | | } |
| | | else |
| | | { |
| | | Message html = getFormattedError(ae, true); |
| | | LocalizableMessage html = getFormattedError(ae, true); |
| | | notifyListeners(html); |
| | | } |
| | | } |
| | |
| | | LOG.log(Level.WARNING, |
| | | "Error removing references in replication server on "+ |
| | | serverDisplay+": "+t, t); |
| | | Message errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | LocalizableMessage errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | serverDisplay, t.toString()); |
| | | throw new ApplicationException( |
| | | ReturnCode.CONFIGURATION_ERROR, errorMessage, |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.uninstaller; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashSet; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.quicksetup.UserData; |
| | | import org.opends.server.admin.client.cli.SecureConnectionCliArgs; |
| | | import org.opends.server.admin.client.cli.SecureConnectionCliParser; |
| | |
| | | * should be treated in a case-sensitive manner. |
| | | */ |
| | | public UninstallerArgumentParser(String mainClassName, |
| | | Message toolDescription, boolean longArgumentsCaseSensitive) |
| | | LocalizableMessage toolDescription, boolean longArgumentsCaseSensitive) |
| | | { |
| | | super(mainClassName, toolDescription, longArgumentsCaseSensitive); |
| | | } |
| | |
| | | /** |
| | | * Indication if provided global options are validate. |
| | | * |
| | | * @param buf the MessageBuilder to write the error messages. |
| | | * @param buf the LocalizableMessageBuilder to write the error messages. |
| | | * @return return code. |
| | | */ |
| | | public int validateGlobalOptions(MessageBuilder buf) |
| | | public int validateGlobalOptions(LocalizableMessageBuilder buf) |
| | | { |
| | | int returnValue; |
| | | if (!noPromptArg.isPresent() && forceOnErrorArg.isPresent()) |
| | | { |
| | | Message message = ERR_UNINSTALL_FORCE_REQUIRES_NO_PROMPT.get( |
| | | LocalizableMessage message = ERR_UNINSTALL_FORCE_REQUIRES_NO_PROMPT.get( |
| | | "--"+forceOnErrorArg.getLongIdentifier(), |
| | | "--"+noPromptArg.getLongIdentifier()); |
| | | if (buf.length() > 0) |
| | |
| | | { |
| | | if (removeArgs[i].isPresent()) |
| | | { |
| | | Message message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | LocalizableMessage message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | removeAllArg.getLongIdentifier(), |
| | | removeArgs[i].getLongIdentifier()); |
| | | if (buf.length() > 0) |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.uninstaller.ui; |
| | |
| | | import java.util.logging.Logger; |
| | | import java.io.IOException; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | |
| | | /** |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CONFIRM_UNINSTALL_PANEL_TITLE.get(); |
| | | } |
| | |
| | | FieldName.REMOVE_LDIFS, |
| | | }; |
| | | |
| | | Message[] labels = { |
| | | LocalizableMessage[] labels = { |
| | | INFO_REMOVE_LIBRARIES_AND_TOOLS_LABEL.get(), |
| | | INFO_REMOVE_DATABASES_LABEL.get(), |
| | | INFO_REMOVE_LOGS_LABEL.get(), |
| | |
| | | INFO_REMOVE_LDIFS_LABEL.get() |
| | | }; |
| | | |
| | | Message[] tooltips = { |
| | | LocalizableMessage[] tooltips = { |
| | | INFO_REMOVE_LIBRARIES_AND_TOOLS_TOOLTIP.get(), |
| | | INFO_REMOVE_DATABASES_TOOLTIP.get(), |
| | | INFO_REMOVE_LOGS_TOOLTIP.get(), |
| | |
| | | gbc.gridwidth = GridBagConstraints.REMAINDER; |
| | | gbc.insets.left = UIFactory.LEFT_INSET_SECONDARY_FIELD; |
| | | p.add(UIFactory.makeJLabel(UIFactory.IconType.NO_ICON, |
| | | Message.raw(Utils.getInstallPathFromClasspath()), |
| | | LocalizableMessage.raw(Utils.getInstallPathFromClasspath()), |
| | | UIFactory.TextStyle.INSTRUCTIONS), |
| | | gbc); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | return INFO_CONFIRM_UNINSTALL_PANEL_INSTRUCTIONS.get(); |
| | | } |
| | |
| | | } |
| | | |
| | | private JPanel createOutsidePathPanel(JCheckBox cb, Set<String> paths, |
| | | Message msg) |
| | | LocalizableMessage msg) |
| | | { |
| | | JPanel panel = new JPanel(new GridBagLayout()); |
| | | panel.setOpaque(false); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.uninstaller.ui; |
| | |
| | | import org.opends.quicksetup.util.UIKeyStore; |
| | | import org.opends.quicksetup.util.Utils; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | |
| | | gbc.fill = GridBagConstraints.BOTH; |
| | | gbc.gridwidth = GridBagConstraints.REMAINDER; |
| | | gbc.insets.left = 0; |
| | | Message msg = INFO_UNINSTALL_LOGIN_DIALOG_MSG.get(); |
| | | LocalizableMessage msg = INFO_UNINSTALL_LOGIN_DIALOG_MSG.get(); |
| | | |
| | | JTextComponent textPane = |
| | | UIFactory.makeHtmlPane(msg, UIFactory.INSTRUCTIONS_FONT); |
| | |
| | | gbc.insets.left = UIFactory.LEFT_INSET_PRIMARY_FIELD; |
| | | gbc.gridwidth = GridBagConstraints.REMAINDER; |
| | | tfHostName = UIFactory.makeJTextField( |
| | | Message.raw(UserData.getDefaultHostName()), |
| | | LocalizableMessage.raw(UserData.getDefaultHostName()), |
| | | INFO_UNINSTALL_LOGIN_HOST_NAME_TOOLTIP.get(), |
| | | UIFactory.HOST_FIELD_SIZE, UIFactory.TextStyle.TEXTFIELD); |
| | | p2.add(tfHostName, gbc); |
| | |
| | | gbc.weightx = 1.0; |
| | | gbc.insets.left = UIFactory.LEFT_INSET_PRIMARY_FIELD; |
| | | gbc.gridwidth = GridBagConstraints.REMAINDER; |
| | | tfUid = UIFactory.makeJTextField(Message.raw(Constants.GLOBAL_ADMIN_UID), |
| | | tfUid = UIFactory.makeJTextField(LocalizableMessage.raw(Constants.GLOBAL_ADMIN_UID), |
| | | INFO_UNINSTALL_LOGIN_UID_TOOLTIP.get(), |
| | | UIFactory.DN_FIELD_SIZE, UIFactory.TextStyle.TEXTFIELD); |
| | | p2.add(tfUid, gbc); |
| | |
| | | } |
| | | else |
| | | { |
| | | Message msg = Utils.getThrowableMsg( |
| | | LocalizableMessage msg = Utils.getThrowableMsg( |
| | | INFO_ERROR_CONNECTING_TO_LOCAL.get(), throwable); |
| | | displayError(msg, INFO_ERROR_TITLE.get()); |
| | | } |
| | |
| | | boolean pwdInvalid = false; |
| | | |
| | | String uid = tfUid.getText(); |
| | | ArrayList<Message> possibleCauses = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> possibleCauses = new ArrayList<LocalizableMessage>(); |
| | | if ("".equals(uid.trim())) |
| | | { |
| | | uidInvalid = true; |
| | |
| | | } |
| | | if (possibleCauses.size() > 0) |
| | | { |
| | | // Message with causes |
| | | // LocalizableMessage with causes |
| | | displayError( |
| | | ERR_CANNOT_CONNECT_TO_LOGIN_WITH_CAUSE.get( |
| | | Utils.getMessageFromCollection(possibleCauses, "\n")), |
| | |
| | | * @param title |
| | | * the title for the dialog. |
| | | */ |
| | | private void displayError(Message msg, Message title) |
| | | private void displayError(LocalizableMessage msg, LocalizableMessage title) |
| | | { |
| | | Utilities.displayError(parent, msg, title); |
| | | toFront(); |
| | |
| | | * @param title |
| | | * the title for the dialog. |
| | | */ |
| | | private void displayInformationMessage(Message msg, Message title) |
| | | private void displayInformationMessage(LocalizableMessage msg, LocalizableMessage title) |
| | | { |
| | | Utilities.displayInformationMessage(parent, msg, title); |
| | | toFront(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012-2013 ForgeRock AS. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | import org.opends.admin.ads.ADSContext; |
| | | import org.opends.admin.ads.ServerDescriptor; |
| | |
| | | * @param newLogDetail the new log messages that we have for the |
| | | * installation in formatted form. |
| | | */ |
| | | public void notifyListeners(Integer ratio, Message currentPhaseSummary, |
| | | Message newLogDetail) |
| | | public void notifyListeners(Integer ratio, LocalizableMessage currentPhaseSummary, |
| | | LocalizableMessage newLogDetail) |
| | | { |
| | | if (notifyListeners) |
| | | { |
| | |
| | | * @param newLogDetail the localized additional log message. |
| | | */ |
| | | public void notifyListenersWithPoints(Integer ratio, |
| | | Message newLogDetail) { |
| | | LocalizableMessage newLogDetail) { |
| | | notifyListeners(ratio, getSummary(getCurrentProgressStep()), |
| | | formatter.getFormattedWithPoints(newLogDetail)); |
| | | } |
| | |
| | | * representation |
| | | * @return the formatted representation of an error for the given text. |
| | | */ |
| | | protected Message getFormattedSummary(Message text) |
| | | protected LocalizableMessage getFormattedSummary(LocalizableMessage text) |
| | | { |
| | | return formatter.getFormattedSummary(text); |
| | | } |
| | |
| | | * representation |
| | | * @return the formatted representation of an error for the given text. |
| | | */ |
| | | protected Message getFormattedError(Message text) |
| | | protected LocalizableMessage getFormattedError(LocalizableMessage text) |
| | | { |
| | | return formatter.getFormattedError(text, false); |
| | | } |
| | |
| | | * representation |
| | | * @return the formatted representation of an warning for the given text. |
| | | */ |
| | | public Message getFormattedWarning(Message text) |
| | | public LocalizableMessage getFormattedWarning(LocalizableMessage text) |
| | | { |
| | | return formatter.getFormattedWarning(text, false); |
| | | } |
| | |
| | | * @return the formatted representation of an success message for the given |
| | | * text. |
| | | */ |
| | | protected Message getFormattedSuccess(Message text) |
| | | protected LocalizableMessage getFormattedSuccess(LocalizableMessage text) |
| | | { |
| | | return formatter.getFormattedSuccess(text); |
| | | } |
| | |
| | | * @return the formatted representation of a log error message for the given |
| | | * text. |
| | | */ |
| | | public Message getFormattedLogError(Message text) |
| | | public LocalizableMessage getFormattedLogError(LocalizableMessage text) |
| | | { |
| | | return formatter.getFormattedLogError(text); |
| | | } |
| | |
| | | * representation |
| | | * @return the formatted representation of a log message for the given text. |
| | | */ |
| | | public Message getFormattedLog(Message text) |
| | | public LocalizableMessage getFormattedLog(LocalizableMessage text) |
| | | { |
| | | return formatter.getFormattedLog(text); |
| | | } |
| | |
| | | * Returns the formatted representation of the 'Done' text string. |
| | | * @return the formatted representation of the 'Done' text string. |
| | | */ |
| | | public Message getFormattedDone() |
| | | public LocalizableMessage getFormattedDone() |
| | | { |
| | | return Message.raw(formatter.getFormattedDone()); |
| | | return LocalizableMessage.raw(formatter.getFormattedDone()); |
| | | } |
| | | |
| | | /** |
| | |
| | | * with a line break at the end. |
| | | * @return the formatted representation of the 'Done' text string. |
| | | */ |
| | | public Message getFormattedDoneWithLineBreak() { |
| | | return new MessageBuilder(formatter.getFormattedDone()) |
| | | public LocalizableMessage getFormattedDoneWithLineBreak() { |
| | | return new LocalizableMessageBuilder(formatter.getFormattedDone()) |
| | | .append(formatter.getLineBreak()).toMessage(); |
| | | } |
| | | |
| | |
| | | * @param text the String to which add points. |
| | | * @return the formatted representation of the '.....' text string. |
| | | */ |
| | | public Message getFormattedWithPoints(Message text) |
| | | public LocalizableMessage getFormattedWithPoints(LocalizableMessage text) |
| | | { |
| | | return formatter.getFormattedWithPoints(text); |
| | | } |
| | |
| | | * @return the formatted representation of a progress message for the given |
| | | * text. |
| | | */ |
| | | public Message getFormattedProgress(Message text) |
| | | public LocalizableMessage getFormattedProgress(LocalizableMessage text) |
| | | { |
| | | return formatter.getFormattedProgress(text); |
| | | } |
| | |
| | | * @return the formatted representation of a progress message for the given |
| | | * text. |
| | | */ |
| | | public Message getFormattedProgressWithLineBreak(Message text) |
| | | public LocalizableMessage getFormattedProgressWithLineBreak(LocalizableMessage text) |
| | | { |
| | | return new MessageBuilder(formatter.getFormattedProgress(text)) |
| | | return new LocalizableMessageBuilder(formatter.getFormattedProgress(text)) |
| | | .append(getLineBreak()).toMessage(); |
| | | } |
| | | |
| | |
| | | * @return the formatted representation of an error message for the given |
| | | * exception. |
| | | */ |
| | | protected Message getFormattedError(Throwable t, boolean applyMargin) |
| | | protected LocalizableMessage getFormattedError(Throwable t, boolean applyMargin) |
| | | { |
| | | return formatter.getFormattedError(t, applyMargin); |
| | | } |
| | |
| | | * Returns the line break formatted. |
| | | * @return the line break formatted. |
| | | */ |
| | | public Message getLineBreak() |
| | | public LocalizableMessage getLineBreak() |
| | | { |
| | | return formatter.getLineBreak(); |
| | | } |
| | |
| | | * Returns the task separator formatted. |
| | | * @return the task separator formatted. |
| | | */ |
| | | protected Message getTaskSeparator() |
| | | protected LocalizableMessage getTaskSeparator() |
| | | { |
| | | return formatter.getTaskSeparator(); |
| | | } |
| | |
| | | * notify the ProgressUpdateListeners of this fact. |
| | | * @param newLogDetail the new log detail. |
| | | */ |
| | | public void notifyListeners(Message newLogDetail) |
| | | public void notifyListeners(LocalizableMessage newLogDetail) |
| | | { |
| | | Integer ratio = getRatio(getCurrentProgressStep()); |
| | | Message currentPhaseSummary = getSummary(getCurrentProgressStep()); |
| | | LocalizableMessage currentPhaseSummary = getSummary(getCurrentProgressStep()); |
| | | notifyListeners(ratio, currentPhaseSummary, newLogDetail); |
| | | } |
| | | |
| | |
| | | * @param step ProgressStop for which a summary is needed |
| | | * @return String representing the summary |
| | | */ |
| | | public abstract Message getSummary(ProgressStep step); |
| | | public abstract LocalizableMessage getSummary(ProgressStep step); |
| | | |
| | | /** |
| | | * Sets the current install status for this application. |
| | |
| | | * @param e the exception we want to obtain the representation from. |
| | | * @return a localized representation of a TopologyCacheException object. |
| | | */ |
| | | protected Message getMessage(TopologyCacheException e) |
| | | protected LocalizableMessage getMessage(TopologyCacheException e) |
| | | { |
| | | return Utils.getMessage(e); |
| | | } |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | if (Utils.isCertificateException(ne)) |
| | | { |
| | | msg = INFO_ERROR_READING_CONFIG_LDAP_CERTIFICATE_SERVER.get( |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message formatString(String s) { |
| | | return getFormattedLogError(Message.raw(s)); |
| | | protected LocalizableMessage formatString(String s) { |
| | | return getFormattedLogError(LocalizableMessage.raw(s)); |
| | | } |
| | | |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message formatString(String s) { |
| | | return getFormattedLog(Message.raw(s)); |
| | | protected LocalizableMessage formatString(String s) { |
| | | return getFormattedLog(LocalizableMessage.raw(s)); |
| | | } |
| | | |
| | | } |
| | |
| | | * @param string to format |
| | | * @return formatted message |
| | | */ |
| | | abstract protected Message formatString(String string); |
| | | abstract protected LocalizableMessage formatString(String string); |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | @Override |
| | | public void println(String msg) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | if (isFirstLine) |
| | | { |
| | | mb.append(formatString(msg)); |
| | |
| | | */ |
| | | public void start() |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(formatter.getSpace()); |
| | | for (int i=0; i< 5; i++) |
| | | { |
| | | mb.append(formatter.getFormattedPoint()); |
| | | } |
| | | Integer ratio = getRatio(getCurrentProgressStep()); |
| | | Message currentPhaseSummary = getSummary(getCurrentProgressStep()); |
| | | LocalizableMessage currentPhaseSummary = getSummary(getCurrentProgressStep()); |
| | | listenerDelegate.notifyListeners(getCurrentProgressStep(), |
| | | ratio, currentPhaseSummary, mb.toMessage()); |
| | | t = new Thread(this); |
| | |
| | | { |
| | | Thread.sleep(3000); |
| | | Integer ratio = getRatio(getCurrentProgressStep()); |
| | | Message currentPhaseSummary = getSummary(getCurrentProgressStep()); |
| | | LocalizableMessage currentPhaseSummary = getSummary(getCurrentProgressStep()); |
| | | listenerDelegate.notifyListeners(getCurrentProgressStep(), |
| | | ratio, currentPhaseSummary, formatter.getFormattedPoint()); |
| | | } |
| | |
| | | pointAdderStopped = true; |
| | | |
| | | Integer ratio = getRatio(getCurrentProgressStep()); |
| | | Message currentPhaseSummary = getSummary(getCurrentProgressStep()); |
| | | LocalizableMessage currentPhaseSummary = getSummary(getCurrentProgressStep()); |
| | | listenerDelegate.notifyListeners(getCurrentProgressStep(), |
| | | ratio, currentPhaseSummary, formatter.getSpace()); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | |
| | | * @param e Exception cause |
| | | * @return ApplicationException with Type property being FILE_SYSTEM_ERROR |
| | | */ |
| | | public static ApplicationException createFileSystemException(Message msg, |
| | | public static ApplicationException createFileSystemException(LocalizableMessage msg, |
| | | Exception e) |
| | | { |
| | | return new ApplicationException(ReturnCode.FILE_SYSTEM_ACCESS_ERROR, |
| | |
| | | * @param rootCause |
| | | * the root cause of this exception. |
| | | */ |
| | | public ApplicationException(ReturnCode type, Message localizedMsg, |
| | | public ApplicationException(ReturnCode type, LocalizableMessage localizedMsg, |
| | | Throwable rootCause) |
| | | { |
| | | super(localizedMsg, rootCause); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012-2013 ForgeRock AS. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Object confirm(Message summary, Message details, |
| | | Message title, MessageType type, Message[] options, |
| | | Message def) { |
| | | public Object confirm(LocalizableMessage summary, LocalizableMessage details, |
| | | LocalizableMessage title, MessageType type, LocalizableMessage[] options, |
| | | LocalizableMessage def) { |
| | | return confirm(summary, details, null, title, type, options, def, null); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Object confirm(Message summary, Message details, Message fineDetails, |
| | | Message title, MessageType type, Message[] options, |
| | | Message def, Message viewDetailsOption) { |
| | | public Object confirm(LocalizableMessage summary, LocalizableMessage details, LocalizableMessage fineDetails, |
| | | LocalizableMessage title, MessageType type, LocalizableMessage[] options, |
| | | LocalizableMessage def, LocalizableMessage viewDetailsOption) { |
| | | MenuBuilder<Integer> builder = new MenuBuilder<Integer>(this); |
| | | |
| | | MessageBuilder b = new MessageBuilder(); |
| | | LocalizableMessageBuilder b = new LocalizableMessageBuilder(); |
| | | b.append(summary); |
| | | b.append(Constants.LINE_SEPARATOR); |
| | | b.append(details); |
| | |
| | | } |
| | | |
| | | if (fineDetails != null) { |
| | | Message detailsPrompt = viewDetailsOption; |
| | | LocalizableMessage detailsPrompt = viewDetailsOption; |
| | | if (detailsPrompt == null) |
| | | { |
| | | detailsPrompt = INFO_CLI_VIEW_DETAILS.get(); |
| | |
| | | MenuResult.success(options.length + 1)); |
| | | } |
| | | |
| | | builder.setDefault(Message.raw(String.valueOf(defInt)), |
| | | builder.setDefault(LocalizableMessage.raw(String.valueOf(defInt)), |
| | | MenuResult.success(defInt)); |
| | | |
| | | Menu<Integer> menu = builder.toMenu(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2012-2013 ForgeRock AS. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import java.io.File; |
| | |
| | | |
| | | private boolean canOverwriteCurrentInstall; |
| | | |
| | | private Message installationMsg; |
| | | private LocalizableMessage installationMsg; |
| | | |
| | | /** |
| | | * The constructor of a CurrentInstallStatus object. |
| | |
| | | } else |
| | | { |
| | | Installation installation = Installation.getLocal(); |
| | | ArrayList<Message> msgs = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> msgs = new ArrayList<LocalizableMessage>(); |
| | | |
| | | if (installation.getStatus().isServerRunning()) |
| | | { |
| | |
| | | } |
| | | else if (isInstalled) |
| | | { |
| | | MessageBuilder buf = new MessageBuilder(); |
| | | LocalizableMessageBuilder buf = new LocalizableMessageBuilder(); |
| | | if (Utils.isCli()) |
| | | { |
| | | buf = new MessageBuilder(); |
| | | for (Message msg : msgs) |
| | | buf = new LocalizableMessageBuilder(); |
| | | for (LocalizableMessage msg : msgs) |
| | | { |
| | | buf.append(Constants.LINE_SEPARATOR); |
| | | buf.append("- ").append(msg); |
| | |
| | | else |
| | | { |
| | | buf.append("<ul>"); |
| | | for (Message msg : msgs) |
| | | for (LocalizableMessage msg : msgs) |
| | | { |
| | | buf.append("\n<li>"); |
| | | buf.append(msg); |
| | |
| | | * |
| | | * @return an String in HTML format describing the status of the installation. |
| | | */ |
| | | public Message getInstallationMsg() |
| | | public LocalizableMessage getInstallationMsg() |
| | | { |
| | | return installationMsg; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.quicksetup; |
| | | |
| | |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.util.SetupUtils; |
| | | |
| | |
| | | static public void validateRootDirectory(File rootDirectory) |
| | | throws IllegalArgumentException |
| | | { |
| | | Message failureReason = null; |
| | | LocalizableMessage failureReason = null; |
| | | if (rootDirectory == null) |
| | | { |
| | | failureReason = INFO_ERROR_INSTALL_ROOT_DIR_NULL.get(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.quicksetup; |
| | | |
| | |
| | | import java.awt.Font; |
| | | import java.util.ArrayList; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.ui.UIFactory; |
| | | import org.opends.quicksetup.util.Utils; |
| | | |
| | |
| | | * @param font the font to be used. |
| | | * @return the message representing a java arguments object. |
| | | */ |
| | | public static Message getMessageForJLabel(JavaArguments javaArguments, |
| | | public static LocalizableMessage getMessageForJLabel(JavaArguments javaArguments, |
| | | JavaArguments defaultJavaArguments, Font font) |
| | | { |
| | | Message msg = getMessage(javaArguments, defaultJavaArguments); |
| | | LocalizableMessage msg = getMessage(javaArguments, defaultJavaArguments); |
| | | String s = msg.toString(); |
| | | if (s.contains("<br>")) |
| | | { |
| | | msg = Message.raw("<html>"+UIFactory.applyFontToHtml(s, font)); |
| | | msg = LocalizableMessage.raw("<html>"+UIFactory.applyFontToHtml(s, font)); |
| | | } |
| | | return msg; |
| | | } |
| | |
| | | * @param defaultJavaArguments the default values for the java arguments. |
| | | * @return the message representing a java arguments object. |
| | | */ |
| | | public static Message getMessage(JavaArguments javaArguments, |
| | | public static LocalizableMessage getMessage(JavaArguments javaArguments, |
| | | JavaArguments defaultJavaArguments) |
| | | { |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | if (javaArguments.equals(defaultJavaArguments)) |
| | | { |
| | | msg = INFO_DEFAULT_JAVA_ARGUMENTS.get(); |
| | | } |
| | | else |
| | | { |
| | | ArrayList<Message> lines = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> lines = new ArrayList<LocalizableMessage>(); |
| | | if (javaArguments.getInitialMemory() != -1) |
| | | { |
| | | lines.add(INFO_INITIAL_MEMORY.get(javaArguments.getInitialMemory())); |
| | |
| | | else |
| | | { |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (Message line : lines) |
| | | for (LocalizableMessage line : lines) |
| | | { |
| | | if (sb.length() > 0) |
| | | { |
| | |
| | | } |
| | | sb.append(line); |
| | | } |
| | | msg = Message.raw(sb.toString()); |
| | | msg = LocalizableMessage.raw(sb.toString()); |
| | | } |
| | | } |
| | | return msg; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.util.args.ArgumentParser; |
| | | |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | |
| | | * in some operating systems. |
| | | * @return internationalized String representing the frame title |
| | | */ |
| | | abstract protected Message getFrameTitle(); |
| | | abstract protected LocalizableMessage getFrameTitle(); |
| | | |
| | | /** |
| | | * Launches the command line based uninstall. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * This class is used to describe the current state of the installation. |
| | |
| | | |
| | | private Integer progressBarRatio; |
| | | |
| | | private Message progressBarMsg; |
| | | private LocalizableMessage progressBarMsg; |
| | | |
| | | private Message detailsMsg; |
| | | private LocalizableMessage detailsMsg; |
| | | |
| | | /** |
| | | * Constructor for the ProgressDescriptor. |
| | |
| | | * @param detailsMsg the logs. |
| | | */ |
| | | public ProgressDescriptor(ProgressStep step, |
| | | Integer progressBarRatio, Message progressBarMsg, Message detailsMsg) |
| | | Integer progressBarRatio, LocalizableMessage progressBarMsg, LocalizableMessage detailsMsg) |
| | | { |
| | | this.step = step; |
| | | this.progressBarRatio = progressBarRatio; |
| | |
| | | * Returns the details message (the log message) of the install. |
| | | * @return the details message (the log message) of the install. |
| | | */ |
| | | public Message getDetailsMsg() |
| | | public LocalizableMessage getDetailsMsg() |
| | | { |
| | | return detailsMsg; |
| | | } |
| | |
| | | * Returns the progress bar message. |
| | | * @return the progress bar message. |
| | | */ |
| | | public Message getProgressBarMsg() |
| | | public LocalizableMessage getProgressBarMsg() |
| | | { |
| | | return progressBarMsg; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import org.opends.quicksetup.event.ProgressUpdateListener; |
| | | import org.opends.quicksetup.event.ProgressUpdateEvent; |
| | |
| | | * @param newLogDetail the new log messages that we have for the |
| | | */ |
| | | public void notifyListeners(ProgressStep current, Integer ratio, |
| | | Message currentPhaseSummary, |
| | | Message newLogDetail) { |
| | | LocalizableMessage currentPhaseSummary, |
| | | LocalizableMessage newLogDetail) { |
| | | ProgressUpdateEvent ev = |
| | | new ProgressUpdateEvent(current, ratio, |
| | | currentPhaseSummary, newLogDetail); |
| | |
| | | * Notify listeners about a change in log detail. |
| | | * @param msg log detail |
| | | */ |
| | | protected void notifyListeners(Message msg) { |
| | | protected void notifyListeners(LocalizableMessage msg) { |
| | | notifyListeners(null, null, null, msg); |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | |
| | | import org.opends.quicksetup.event.ProgressUpdateEvent; |
| | | import org.opends.server.util.StaticUtils; |
| | | import org.opends.server.util.cli.CLIException; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Class used by Launcher to start a CLI application. |
| | |
| | | cliApp.addProgressUpdateListener( |
| | | new ProgressUpdateListener() { |
| | | public void progressUpdate(ProgressUpdateEvent ev) { |
| | | Message newLogs = ev.getNewLogs(); |
| | | LocalizableMessage newLogs = ev.getNewLogs(); |
| | | if (newLogs != null) { |
| | | System.out.print( |
| | | StaticUtils.wrapText( |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | /** |
| | |
| | | */ |
| | | FINISHED(INFO_FINISHED_STEP.get()); |
| | | |
| | | private Message msg; |
| | | private LocalizableMessage msg; |
| | | |
| | | /** |
| | | * Creates a step. |
| | | * @param msg the message key used to access a message catalog to |
| | | * retreive this step's display name |
| | | */ |
| | | Step(Message msg) { |
| | | Step(LocalizableMessage msg) { |
| | | this.msg = msg; |
| | | } |
| | | |
| | |
| | | * @return String message key used to access a message catalog to |
| | | * retreive this step's display name |
| | | */ |
| | | public Message getDisplayMessage() { |
| | | public LocalizableMessage getDisplayMessage() { |
| | | return msg; |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.security.cert.X509Certificate; |
| | | |
| | |
| | | * @param authType the authentication type. |
| | | * @param type the type of the exception. |
| | | */ |
| | | public UserDataCertificateException(WizardStep step, Message message, |
| | | public UserDataCertificateException(WizardStep step, LocalizableMessage message, |
| | | Throwable t, String host, int port, X509Certificate[] chain, |
| | | String authType, Type type) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * This exception is used when there is an confirmation to be asked |
| | |
| | | * @param step the step in the wizard where the exception occurred. |
| | | * @param message the localized message describing the error. |
| | | */ |
| | | public UserDataConfirmationException(WizardStep step, Message message) |
| | | public UserDataConfirmationException(WizardStep step, LocalizableMessage message) |
| | | { |
| | | super(step, message); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | /** |
| | |
| | | * @param step the step in the wizard where the exception occurred. |
| | | * @param message the localized message describing the error. |
| | | */ |
| | | public UserDataException(WizardStep step, Message message) |
| | | public UserDataException(WizardStep step, LocalizableMessage message) |
| | | { |
| | | super(message); |
| | | this.step = step; |
| | |
| | | * @param message the localized message describing the error. |
| | | * @param t the Exception that generated this exception. |
| | | */ |
| | | public UserDataException(WizardStep step, Message message, Throwable t) |
| | | public UserDataException(WizardStep step, LocalizableMessage message, Throwable t) |
| | | { |
| | | super(message, t); |
| | | this.step = step; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return Object that is the same value as the user selection from the |
| | | * <code>options</code> parameter. |
| | | */ |
| | | Object confirm(Message summary, Message detail, |
| | | Message title, MessageType type, |
| | | Message[] options, Message def); |
| | | Object confirm(LocalizableMessage summary, LocalizableMessage detail, |
| | | LocalizableMessage title, MessageType type, |
| | | LocalizableMessage[] options, LocalizableMessage def); |
| | | |
| | | /** |
| | | * Present a list of choices to the user and wait for them to select one |
| | |
| | | * @return Object that is the same value as the user selection from the |
| | | * <code>options</code> parameter. |
| | | */ |
| | | Object confirm(Message summary, Message detail, Message fineDetails, |
| | | Message title, MessageType type, Message[] options, |
| | | Message def, Message viewDetailsOption); |
| | | Object confirm(LocalizableMessage summary, LocalizableMessage detail, LocalizableMessage fineDetails, |
| | | LocalizableMessage title, MessageType type, LocalizableMessage[] options, |
| | | LocalizableMessage def, LocalizableMessage viewDetailsOption); |
| | | |
| | | /** |
| | | * Creates a list appropriate for the presentation implementation. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Step in a QuickSetup wizard application. |
| | |
| | | * @return String message key for accessing this step's display name |
| | | * in a message bundle |
| | | */ |
| | | Message getDisplayMessage(); |
| | | LocalizableMessage getDisplayMessage(); |
| | | |
| | | /** |
| | | * Indicates that when this step is displayed the application will |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.event; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Inteface for applications that advertise status to interested |
| | |
| | | * form |
| | | * @param newLogDetail new log messages in formatted form |
| | | */ |
| | | void notifyListeners(Integer ratio, Message currentPhaseSummary, |
| | | Message newLogDetail); |
| | | void notifyListeners(Integer ratio, LocalizableMessage currentPhaseSummary, |
| | | LocalizableMessage newLogDetail); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.event; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.ProgressStep; |
| | | |
| | | /** |
| | |
| | | |
| | | private Integer progressRatio; |
| | | |
| | | private Message currentPhaseSummary; |
| | | private LocalizableMessage currentPhaseSummary; |
| | | |
| | | private Message newLogs; |
| | | private LocalizableMessage newLogs; |
| | | |
| | | /** |
| | | * Constructor of the ProgressUpdateEvent. |
| | |
| | | * @param newLogs the new log messages that we have for the installation. |
| | | */ |
| | | public ProgressUpdateEvent(ProgressStep step, |
| | | Integer progressRatio, Message currentPhaseSummary, Message newLogs) |
| | | Integer progressRatio, LocalizableMessage currentPhaseSummary, LocalizableMessage newLogs) |
| | | { |
| | | this.step = step; |
| | | this.progressRatio = progressRatio; |
| | |
| | | * status. |
| | | * @return the localized message summary describing the progress status. |
| | | */ |
| | | public Message getCurrentPhaseSummary() |
| | | public LocalizableMessage getCurrentPhaseSummary() |
| | | { |
| | | return currentPhaseSummary; |
| | | } |
| | |
| | | * Gets the new logs for the install progress. |
| | | * @return the new logs for the current install progress. |
| | | */ |
| | | public Message getNewLogs() |
| | | public LocalizableMessage getNewLogs() |
| | | { |
| | | return newLogs; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.quicksetup.installer; |
| | | |
| | |
| | | import org.opends.admin.ads.util.ApplicationTrustManager; |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.opends.admin.ads.util.PreferredConnection; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.quicksetup.*; |
| | | import org.opends.quicksetup.event.ButtonActionListener; |
| | | import org.opends.quicksetup.event.ButtonEvent; |
| | |
| | | } |
| | | catch (IncompatibleVersionException ijv) |
| | | { |
| | | MessageBuilder sb = new MessageBuilder(); |
| | | LocalizableMessageBuilder sb = new LocalizableMessageBuilder(); |
| | | sb.append(Utils.breakHtmlString( |
| | | Utils.getHtml(ijv.getMessageObject().toString()), |
| | | Constants.MAX_CHARS_PER_LINE_IN_DIALOG)); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getCloseButtonToolTip() { |
| | | public LocalizableMessage getCloseButtonToolTip() { |
| | | return INFO_CLOSE_BUTTON_INSTALL_TOOLTIP.get(); |
| | | } |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getQuitButtonToolTip() { |
| | | public LocalizableMessage getQuitButtonToolTip() { |
| | | return INFO_QUIT_BUTTON_INSTALL_TOOLTIP.get(); |
| | | } |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getFinishButtonToolTip() { |
| | | public LocalizableMessage getFinishButtonToolTip() { |
| | | return INFO_FINISH_BUTTON_INSTALL_TOOLTIP.get(); |
| | | } |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getFrameTitle() { |
| | | public LocalizableMessage getFrameTitle() { |
| | | return Utils.getCustomizedObject("INFO_FRAME_INSTALL_TITLE", |
| | | INFO_FRAME_INSTALL_TITLE.get(DynamicConstants.PRODUCT_NAME), |
| | | Message.class); |
| | | LocalizableMessage.class); |
| | | } |
| | | |
| | | /** Indicates the current progress step. */ |
| | |
| | | } |
| | | catch (IOException ioe) |
| | | { |
| | | Message failedMsg = getThrowableMsg( |
| | | LocalizableMessage failedMsg = getThrowableMsg( |
| | | INFO_ERROR_CREATING_TEMP_FILE.get(), ioe); |
| | | throw new ApplicationException( |
| | | ReturnCode.FILE_SYSTEM_ACCESS_ERROR, |
| | |
| | | private void importLDIF() throws ApplicationException { |
| | | LinkedList<String> ldifPaths = |
| | | getUserData().getNewSuffixOptions().getLDIFPaths(); |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | if (ldifPaths.size() > 1) |
| | | { |
| | | if (isVerbose()) |
| | |
| | | if (lastImportProgress != null) |
| | | { |
| | | notifyListeners( |
| | | getFormattedProgress(Message.raw(lastImportProgress))); |
| | | getFormattedProgress(LocalizableMessage.raw(lastImportProgress))); |
| | | notifyListeners(getLineBreak()); |
| | | } |
| | | } |
| | |
| | | else |
| | | { |
| | | notifyListeners( |
| | | getFormattedProgress(Message.raw(lastImportProgress))); |
| | | getFormattedProgress(LocalizableMessage.raw(lastImportProgress))); |
| | | notifyListeners(getLineBreak()); |
| | | } |
| | | } |
| | |
| | | private void importAutomaticallyGenerated() throws ApplicationException { |
| | | File templatePath = createTemplateFile(); |
| | | int nEntries = getUserData().getNewSuffixOptions().getNumberEntries(); |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | if (isVerbose() || (nEntries > THRESHOLD_AUTOMATIC_DATA_VERBOSE)) |
| | | { |
| | | mb.append(getFormattedProgress( |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | Message failedMsg = getThrowableMsg( |
| | | LocalizableMessage failedMsg = getThrowableMsg( |
| | | INFO_ERROR_CONNECTING_TO_LOCAL.get(), ne); |
| | | throw new ApplicationException( |
| | | ReturnCode.CONFIGURATION_ERROR, failedMsg, ne); |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | Message failedMsg = getThrowableMsg( |
| | | LocalizableMessage failedMsg = getThrowableMsg( |
| | | INFO_ERROR_CONNECTING_TO_LOCAL.get(), ne); |
| | | throw new ApplicationException( |
| | | ReturnCode.CONFIGURATION_ERROR, failedMsg, ne); |
| | |
| | | * @param isCli a boolean to indicate if the install is using CLI or GUI |
| | | */ |
| | | protected void initSummaryMap( |
| | | Map<ProgressStep, Message> hmSummary, |
| | | Map<ProgressStep, LocalizableMessage> hmSummary, |
| | | boolean isCli) |
| | | { |
| | | hmSummary.put(InstallProgressStep.NOT_STARTED, |
| | |
| | | } |
| | | String formattedPath = Utils.addWordBreaks( |
| | | formatter.getFormattedText( |
| | | Message.raw(getPath(new File(getInstancePath())))).toString(), |
| | | LocalizableMessage.raw(getPath(new File(getInstancePath())))).toString(), |
| | | 60, 5); |
| | | Message successMessage = Utils.getCustomizedObject( |
| | | LocalizableMessage successMessage = Utils.getCustomizedObject( |
| | | "INFO_SUMMARY_INSTALL_FINISHED_SUCCESSFULLY", |
| | | INFO_SUMMARY_INSTALL_FINISHED_SUCCESSFULLY.get( |
| | | DynamicConstants.PRODUCT_NAME, |
| | |
| | | INFO_GENERAL_SERVER_STOPPED.get(), |
| | | DynamicConstants.DOC_QUICK_REFERENCE_GUIDE, |
| | | DynamicConstants.PRODUCT_NAME, |
| | | cmd), Message.class); |
| | | cmd), LocalizableMessage.class); |
| | | hmSummary.put(InstallProgressStep.FINISHED_SUCCESSFULLY, |
| | | getFormattedSuccess(successMessage)); |
| | | hmSummary.put(InstallProgressStep.FINISHED_CANCELED, |
| | |
| | | * @param isCli a boolean to indicate if the install is using CLI or GUI |
| | | */ |
| | | protected void updateSummaryWithServerState( |
| | | Map<ProgressStep, Message> hmSummary, Boolean isCli) |
| | | Map<ProgressStep, LocalizableMessage> hmSummary, Boolean isCli) |
| | | { |
| | | Installation installation = getInstallation(); |
| | | String cmd = getPath(installation.getControlPanelCommandFile()); |
| | |
| | | UIFactory.applyFontToHtml(cmd, UIFactory.INSTRUCTIONS_MONOSPACE_FONT), |
| | | 60, 5); |
| | | } |
| | | Message status; |
| | | LocalizableMessage status; |
| | | if (installation.getStatus().isServerRunning()) |
| | | { |
| | | status = INFO_GENERAL_SERVER_STARTED.get(); |
| | |
| | | } |
| | | String formattedPath = Utils.addWordBreaks( |
| | | formatter.getFormattedText( |
| | | Message.raw(getPath(new File(getInstancePath())))).toString(), |
| | | LocalizableMessage.raw(getPath(new File(getInstancePath())))).toString(), |
| | | 60, 5); |
| | | Message successMessage = Utils.getCustomizedObject( |
| | | LocalizableMessage successMessage = Utils.getCustomizedObject( |
| | | "INFO_SUMMARY_INSTALL_FINISHED_SUCCESSFULLY", |
| | | INFO_SUMMARY_INSTALL_FINISHED_SUCCESSFULLY.get( |
| | | DynamicConstants.PRODUCT_NAME, |
| | |
| | | status, |
| | | DynamicConstants.DOC_QUICK_REFERENCE_GUIDE, |
| | | DynamicConstants.PRODUCT_NAME, |
| | | cmd), Message.class); |
| | | cmd), LocalizableMessage.class); |
| | | hmSummary.put(InstallProgressStep.FINISHED_SUCCESSFULLY, |
| | | getFormattedSuccess(successMessage)); |
| | | hmSummary.put(InstallProgressStep.FINISHED_WITH_ERROR, |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | Message failedMsg = |
| | | LocalizableMessage failedMsg = |
| | | getThrowableMsg(INFO_ERROR_CONNECTING_TO_LOCAL.get(), t); |
| | | StaticUtils.close(ctx); |
| | | throw new ApplicationException( |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | if (Utils.isCertificateException(ne)) |
| | | { |
| | | msg = INFO_ERROR_READING_CONFIG_LDAP_CERTIFICATE_SERVER.get( |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | if (Utils.isCertificateException(ne)) |
| | | { |
| | | msg = INFO_ERROR_READING_CONFIG_LDAP_CERTIFICATE_SERVER.get( |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | if (isRemoteServer) |
| | | { |
| | | msg = Utils.getMessageForException(ne, getHostDisplay(auth)); |
| | |
| | | private void updateUserDataForServerSettingsPanel(QuickSetup qs) |
| | | throws UserDataException |
| | | { |
| | | List<Message> errorMsgs = new ArrayList<Message>(); |
| | | Message confirmationMsg = null; |
| | | List<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | LocalizableMessage confirmationMsg = null; |
| | | |
| | | if (isWebStart()) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private Message getCannotBindErrorMessage(int port) |
| | | private LocalizableMessage getCannotBindErrorMessage(int port) |
| | | { |
| | | if (isPriviledgedPort(port)) |
| | | { |
| | |
| | | Integer replicationPort = -1; |
| | | boolean secureReplication = false; |
| | | Integer port = null; |
| | | List<Message> errorMsgs = new ArrayList<Message>(); |
| | | List<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | |
| | | DataReplicationOptions.Type type = (DataReplicationOptions.Type) |
| | | qs.getFieldValue(FieldName.REPLICATION_OPTIONS); |
| | |
| | | } |
| | | } |
| | | |
| | | private int checkReplicationPort(QuickSetup qs, List<Message> errorMsgs) |
| | | private int checkReplicationPort(QuickSetup qs, List<LocalizableMessage> errorMsgs) |
| | | { |
| | | int replicationPort = -1; |
| | | String sPort = qs.getFieldStringValue(FieldName.REPLICATION_PORT); |
| | |
| | | } |
| | | |
| | | private void checkRemoteHostPortDnAndPwd(String host, String sPort, String dn, |
| | | String pwd, QuickSetup qs, List<Message> errorMsgs) |
| | | String pwd, QuickSetup qs, List<LocalizableMessage> errorMsgs) |
| | | { |
| | | // Check host |
| | | if ((host == null) || (host.length() == 0)) |
| | |
| | | } |
| | | |
| | | private void updateUserDataWithADS(String host, int port, String dn, |
| | | String pwd, QuickSetup qs, List<Message> errorMsgs, |
| | | String pwd, QuickSetup qs, List<LocalizableMessage> errorMsgs, |
| | | boolean[] hasGlobalAdministrators, |
| | | String[] effectiveDn) throws UserDataException |
| | | { |
| | |
| | | hasGlobalAdministrators[0] = administrators.size() > 0; |
| | | Set<TopologyCacheException> exceptions = |
| | | updateUserDataWithSuffixesInADS(adsContext, trustManager); |
| | | Set<Message> exceptionMsgs = new LinkedHashSet<Message>(); |
| | | Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<LocalizableMessage>(); |
| | | /* Check the exceptions and see if we throw them or not. */ |
| | | for (TopologyCacheException e : exceptions) |
| | | { |
| | | switch (e.getType()) |
| | | { |
| | | case NOT_GLOBAL_ADMINISTRATOR: |
| | | Message errorMsg = INFO_NOT_GLOBAL_ADMINISTRATOR_PROVIDED.get(); |
| | | LocalizableMessage errorMsg = INFO_NOT_GLOBAL_ADMINISTRATOR_PROVIDED.get(); |
| | | throw new UserDataException(Step.REPLICATION_OPTIONS, errorMsg); |
| | | case GENERIC_CREATING_CONNECTION: |
| | | if ((e.getCause() != null) && |
| | |
| | | } |
| | | if (exceptionMsgs.size() > 0) |
| | | { |
| | | Message confirmationMsg = |
| | | LocalizableMessage confirmationMsg = |
| | | INFO_ERROR_READING_REGISTERED_SERVERS_CONFIRM.get( |
| | | getMessageFromCollection(exceptionMsgs, "\n")); |
| | | throw new UserDataConfirmationException(Step.REPLICATION_OPTIONS, |
| | |
| | | private void updateUserDataForCreateAdministratorPanel(QuickSetup qs) |
| | | throws UserDataException |
| | | { |
| | | List<Message> errorMsgs = new ArrayList<Message>(); |
| | | List<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | |
| | | // Check the Global Administrator UID |
| | | String uid = qs.getFieldStringValue(FieldName.GLOBAL_ADMINISTRATOR_UID); |
| | |
| | | private void updateUserDataForSuffixesOptionsPanel(QuickSetup qs) |
| | | throws UserDataException |
| | | { |
| | | List<Message> errorMsgs = new ArrayList<Message>(); |
| | | List<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | if (qs.getFieldValue(FieldName.SUFFIXES_TO_REPLICATE_OPTIONS) == |
| | | SuffixesToReplicateOptions.Type.REPLICATE_WITH_EXISTING_SUFFIXES) |
| | | { |
| | |
| | | private void updateUserDataForRemoteReplicationPorts(QuickSetup qs) |
| | | throws UserDataException |
| | | { |
| | | List<Message> errorMsgs = new ArrayList<Message>(); |
| | | List<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | Map<ServerDescriptor, AuthenticationData> servers = |
| | | getUserData().getRemoteWithNoReplicationPort(); |
| | | Map<?, ?> hm = |
| | |
| | | private void updateUserDataForNewSuffixOptionsPanel(QuickSetup qs) |
| | | throws UserDataException |
| | | { |
| | | List<Message> errorMsgs = new ArrayList<Message>(); |
| | | List<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | |
| | | NewSuffixOptions dataOptions = null; |
| | | |
| | |
| | | "ds-task-log-message", |
| | | "ds-task-state" |
| | | }); |
| | | Message lastDisplayedMsg = null; |
| | | LocalizableMessage lastDisplayedMsg = null; |
| | | String lastLogMsg = null; |
| | | long lastTimeMsgDisplayed = -1; |
| | | long lastTimeMsgLogged = -1; |
| | |
| | | } |
| | | // Get the number of entries that have been handled and |
| | | // a percentage... |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | String sProcessed = getFirstValue(sr, |
| | | "ds-task-processed-entry-count"); |
| | | String sUnprocessed = getFirstValue(sr, |
| | |
| | | if (helper.isDone(state) || helper.isStoppedByError(state)) |
| | | { |
| | | isOver = true; |
| | | Message errorMsg; |
| | | LocalizableMessage errorMsg; |
| | | LOG.log(Level.INFO, "Last task entry: "+sr); |
| | | if (displayProgress && (msg != null) && !msg.equals(lastDisplayedMsg)) |
| | | { |
| | |
| | | if (helper.isDone(state) || helper.isStoppedByError(state)) |
| | | { |
| | | isOver = true; |
| | | Message errorMsg; |
| | | LocalizableMessage errorMsg; |
| | | if (lastLogMsg == null) |
| | | { |
| | | errorMsg = INFO_ERROR_DURING_INITIALIZATION_NO_LOG.get( |
| | |
| | | import org.opends.messages.CoreMessages; |
| | | import org.opends.messages.JebMessages; |
| | | import org.opends.messages.ReplicationMessages; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import org.opends.server.tools.ConfigureDS; |
| | |
| | | public void processLine(String line) |
| | | { |
| | | LOG.log(Level.WARNING, "import-ldif error log: "+line); |
| | | application.notifyListeners(Message.raw(line)); |
| | | application.notifyListeners(LocalizableMessage.raw(line)); |
| | | application.notifyListeners(application.getLineBreak()); |
| | | } |
| | | }; |
| | |
| | | public void processLine(String line) |
| | | { |
| | | LOG.log(Level.INFO, "import-ldif out log: "+line); |
| | | application.notifyListeners(Message.raw(line)); |
| | | application.notifyListeners(LocalizableMessage.raw(line)); |
| | | application.notifyListeners(application.getLineBreak()); |
| | | } |
| | | }; |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the Message ID that corresponds to a successfully started server. |
| | | * @return the Message ID that corresponds to a successfully started server. |
| | | * Returns the LocalizableMessage ID that corresponds to a successfully started server. |
| | | * @return the LocalizableMessage ID that corresponds to a successfully started server. |
| | | */ |
| | | public String getStartedId() |
| | | { |
| | | return String.valueOf(CoreMessages.NOTE_DIRECTORY_SERVER_STARTED.getId()); |
| | | return String.valueOf(CoreMessages.NOTE_DIRECTORY_SERVER_STARTED.ordinal()); |
| | | } |
| | | |
| | | /** |
| | |
| | | public void enableWindowsService() throws ApplicationException { |
| | | int code = ConfigureWindowsService.enableService(System.out, System.err); |
| | | |
| | | Message errorMessage = INFO_ERROR_ENABLING_WINDOWS_SERVICE.get(); |
| | | LocalizableMessage errorMessage = INFO_ERROR_ENABLING_WINDOWS_SERVICE.get(); |
| | | |
| | | switch (code) { |
| | | case |
| | |
| | | ldifFile.deleteOnExit(); |
| | | } catch (IOException ioe) |
| | | { |
| | | Message failedMsg = |
| | | LocalizableMessage failedMsg = |
| | | getThrowableMsg(INFO_ERROR_CREATING_TEMP_FILE.get(), ioe); |
| | | throw new ApplicationException( |
| | | ReturnCode.FILE_SYSTEM_ACCESS_ERROR, |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | Message errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | LocalizableMessage errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | serverDisplay, t.toString()); |
| | | throw new ApplicationException( |
| | | ReturnCode.CONFIGURATION_ERROR, errorMessage, |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | Message errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | LocalizableMessage errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | serverDisplay, t.toString()); |
| | | throw new ApplicationException( |
| | | ReturnCode.CONFIGURATION_ERROR, errorMessage, |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | Message errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | LocalizableMessage errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | serverDisplay, t.toString()); |
| | | throw new ApplicationException( |
| | | ReturnCode.CONFIGURATION_ERROR, errorMessage, |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | Message errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | LocalizableMessage errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | serverDisplay, t.toString()); |
| | | throw new ApplicationException( |
| | | ReturnCode.CONFIGURATION_ERROR, errorMessage, |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | Message errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | LocalizableMessage errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | serverDisplay, t.toString()); |
| | | throw new ApplicationException( |
| | | ReturnCode.CONFIGURATION_ERROR, errorMessage, |
| | |
| | | public boolean isPeersNotFoundError(String logMsg) |
| | | { |
| | | return logMsg.contains("=" + ReplicationMessages. |
| | | ERR_NO_REACHABLE_PEER_IN_THE_DOMAIN.getId()); |
| | | ERR_NO_REACHABLE_PEER_IN_THE_DOMAIN.ordinal()); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (msg != null) |
| | | { |
| | | if ((msg.contains("msgID=" + JebMessages |
| | | .NOTE_JEB_IMPORT_FINAL_STATUS.getId())) || |
| | | .NOTE_JEB_IMPORT_FINAL_STATUS.ordinal())) || |
| | | (msg.contains("msgID=" + JebMessages |
| | | .NOTE_JEB_IMPORT_PROGRESS_REPORT.getId()))) |
| | | .NOTE_JEB_IMPORT_PROGRESS_REPORT.ordinal()))) |
| | | { |
| | | int index = msg.indexOf("msg="); |
| | | if (index != -1) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | /** |
| | |
| | | * The constructor for the exception. |
| | | * @param message the localized message. |
| | | */ |
| | | public PeerNotFoundException(Message message) |
| | | public PeerNotFoundException(LocalizableMessage message) |
| | | { |
| | | super(message); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer; |
| | |
| | | import org.opends.quicksetup.installer.offline.OfflineInstaller; |
| | | import org.opends.quicksetup.util.IncompatibleVersionException; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.tools.InstallDS; |
| | | import org.opends.server.tools.InstallDSArgumentParser; |
| | | import org.opends.server.util.DynamicConstants; |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | Message message = ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()); |
| | | LocalizableMessage message = ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()); |
| | | System.out.println(message); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | Message message = ERR_ERROR_PARSING_ARGS.get(ae.getMessage()); |
| | | LocalizableMessage message = ERR_ERROR_PARSING_ARGS.get(ae.getMessage()); |
| | | System.err.println(message); |
| | | System.err.println(); |
| | | System.err.println(argParser.getUsage()); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getFrameTitle() { |
| | | protected LocalizableMessage getFrameTitle() { |
| | | return Utils.getCustomizedObject("INFO_FRAME_INSTALL_TITLE", |
| | | INFO_FRAME_INSTALL_TITLE.get(DynamicConstants.PRODUCT_NAME), |
| | | Message.class); |
| | | LocalizableMessage.class); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.offline; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | |
| | |
| | | new HashMap<ProgressStep, Integer>(); |
| | | |
| | | /* This map contains the summary associated with each step */ |
| | | private final Map<ProgressStep, Message> hmSummary = |
| | | new HashMap<ProgressStep, Message>(); |
| | | private final Map<ProgressStep, LocalizableMessage> hmSummary = |
| | | new HashMap<ProgressStep, LocalizableMessage>(); |
| | | |
| | | private ApplicationException runError; |
| | | |
| | |
| | | notifyListeners(getLineBreak()); |
| | | updateSummaryWithServerState(hmSummary, true); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR); |
| | | Message html = getFormattedError(ex, true); |
| | | LocalizableMessage html = getFormattedError(ex, true); |
| | | notifyListeners(html); |
| | | LOG.log(Level.SEVERE, "Error installing.", ex); |
| | | notifyListeners(getLineBreak()); |
| | |
| | | ApplicationException ex = new ApplicationException( |
| | | ReturnCode.BUG, |
| | | Utils.getThrowableMsg(INFO_BUG_MSG.get(), t), t); |
| | | Message msg = getFormattedError(ex, true); |
| | | LocalizableMessage msg = getFormattedError(ex, true); |
| | | notifyListeners(msg); |
| | | LOG.log(Level.SEVERE, "Error installing.", t); |
| | | notifyListeners(getLineBreak()); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getSummary(ProgressStep status) |
| | | public LocalizableMessage getSummary(ProgressStep status) |
| | | { |
| | | return hmSummary.get(status); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import java.awt.Component; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | return INFO_DATA_OPTIONS_PANEL_INSTRUCTIONS.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_DATA_OPTIONS_PANEL_TITLE.get(); |
| | | } |
| | |
| | | { |
| | | public void changedUpdate(DocumentEvent ev) |
| | | { |
| | | Message newLabel = INFO_CREATE_BASE_ENTRY_LABEL.get( |
| | | LocalizableMessage newLabel = INFO_CREATE_BASE_ENTRY_LABEL.get( |
| | | (String) getFieldValue(FieldName.DIRECTORY_BASE_DN)); |
| | | JRadioButton rb = |
| | | getRadioButton(NewSuffixOptions.Type.CREATE_BASE_ENTRY); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import java.awt.Component; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | return INFO_DATA_REPLICATION_OPTIONS_PANEL_INSTRUCTIONS.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_DATA_REPLICATION_OPTIONS_PANEL_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTextForIcon(UIFactory.IconType iconType) |
| | | protected LocalizableMessage getTextForIcon(UIFactory.IconType iconType) |
| | | { |
| | | Message text; |
| | | LocalizableMessage text; |
| | | if ((iconType == UIFactory.IconType.WAIT) && |
| | | rbReplicated.isSelected() && cbTopologyExists.isSelected()) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import java.awt.Component; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | return INFO_GLOBAL_ADMINISTRATOR_PANEL_INSTRUCTIONS.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_GLOBAL_ADMINISTRATOR_PANEL_TITLE.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import java.awt.Component; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_LICENSE_PANEL_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | return null; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import org.opends.admin.ads.ServerDescriptor; |
| | |
| | | private JLabel warningLabel; |
| | | |
| | | private JComboBox viewCombo; |
| | | private final Message DISPLAY_TEXT = INFO_REVIEW_DISPLAY_TEXT.get(); |
| | | private final Message DISPLAY_EQUIVALENT_COMMAND = |
| | | private final LocalizableMessage DISPLAY_TEXT = INFO_REVIEW_DISPLAY_TEXT.get(); |
| | | private final LocalizableMessage DISPLAY_EQUIVALENT_COMMAND = |
| | | INFO_REVIEW_DISPLAY_EQUIVALENT_COMMAND.get(); |
| | | |
| | | private JComponent cardLayoutPanel; |
| | |
| | | { |
| | | JPanel instructionsPanel = new JPanel(new GridBagLayout()); |
| | | instructionsPanel.setOpaque(false); |
| | | Message instructions = getInstructions(); |
| | | LocalizableMessage instructions = getInstructions(); |
| | | JLabel l = new JLabel(instructions.toString()); |
| | | l.setFont(UIFactory.INSTRUCTIONS_FONT); |
| | | |
| | | Message[] values = { |
| | | LocalizableMessage[] values = { |
| | | DISPLAY_TEXT, |
| | | DISPLAY_EQUIVALENT_COMMAND |
| | | }; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | return INFO_REVIEW_PANEL_INSTRUCTIONS.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_REVIEW_PANEL_TITLE.get(); |
| | | } |
| | |
| | | */ |
| | | private String getReplicationPortString(UserData userInstallData) |
| | | { |
| | | MessageBuilder buf = new MessageBuilder(); |
| | | LocalizableMessageBuilder buf = new LocalizableMessageBuilder(); |
| | | |
| | | DataReplicationOptions repl = |
| | | userInstallData.getReplicationOptions(); |
| | |
| | | .getReplicationPort()); |
| | | } |
| | | buf.append(s); |
| | | TreeSet<Message> remoteServerLines = new TreeSet<Message>(); |
| | | TreeSet<LocalizableMessage> remoteServerLines = new TreeSet<LocalizableMessage>(); |
| | | for (ServerDescriptor server : remotePorts.keySet()) |
| | | { |
| | | String serverDisplay; |
| | |
| | | remoteServerLines.add(INFO_REMOTE_SERVER_REPLICATION_PORT.get(s, |
| | | serverDisplay)); |
| | | } |
| | | for (Message line : remoteServerLines) |
| | | for (LocalizableMessage line : remoteServerLines) |
| | | { |
| | | buf.append("\n").append(line); |
| | | } |
| | |
| | | INFO_INSTALL_STOP_SERVER_EQUIVALENT_COMMAND_LINE.get())); |
| | | sb.append(formatter.getLineBreak()); |
| | | sb.append(Constants.HTML_BOLD_OPEN) |
| | | .append(formatter.getFormattedProgress(Message.raw(cmd))) |
| | | .append(formatter.getFormattedProgress(LocalizableMessage.raw(cmd))) |
| | | .append(Constants.HTML_BOLD_CLOSE); |
| | | } |
| | | equivalentCommandPane.setText(sb.toString()); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import org.opends.server.util.DynamicConstants; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_WELCOME_PANEL_TITLE.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | /* |
| | | * We can use org.opends.server.util.DynamicConstants without problems as it |
| | |
| | | DynamicConstants.SHORT_NAME, |
| | | DynamicConstants.DOC_REFERENCE_WIKI, |
| | | DynamicConstants.SHORT_NAME), |
| | | Message.class); |
| | | LocalizableMessage.class); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | |
| | | import org.opends.quicksetup.util.BackgroundTask; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.util.SetupUtils; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | |
| | | |
| | | private boolean isCanceled = true; |
| | | |
| | | private Message message; |
| | | private LocalizableMessage message; |
| | | |
| | | private JavaArguments javaArguments; |
| | | |
| | |
| | | * @throws IllegalArgumentException if options is null. |
| | | */ |
| | | public JavaArgumentsDialog(JFrame parent, JavaArguments javaArguments, |
| | | Message title, Message message) |
| | | LocalizableMessage title, LocalizableMessage message) |
| | | throws IllegalArgumentException |
| | | { |
| | | super(parent); |
| | |
| | | gbc.gridwidth = 3; |
| | | gbc.gridx = 0; |
| | | gbc.gridy = 0; |
| | | Message title = INFO_JAVA_RUNTIME_SETTINGS_TITLE.get(); |
| | | LocalizableMessage title = INFO_JAVA_RUNTIME_SETTINGS_TITLE.get(); |
| | | JLabel l = |
| | | UIFactory.makeJLabel(UIFactory.IconType.NO_ICON, title, |
| | | UIFactory.TextStyle.TITLE); |
| | |
| | | INFO_INITIAL_MEMORY_LABEL.get(), |
| | | UIFactory.TextStyle.PRIMARY_FIELD_VALID); |
| | | lInitialMemory.setOpaque(false); |
| | | tfInitialMemory = UIFactory.makeJTextField(Message.EMPTY, |
| | | tfInitialMemory = UIFactory.makeJTextField(LocalizableMessage.EMPTY, |
| | | INFO_INITIAL_MEMORY_TOOLTIP.get(), 10, UIFactory.TextStyle.TEXTFIELD); |
| | | lInitialMemory.setLabelFor(tfInitialMemory); |
| | | |
| | |
| | | INFO_MAX_MEMORY_LABEL.get(), |
| | | UIFactory.TextStyle.PRIMARY_FIELD_VALID); |
| | | lMaxMemory.setOpaque(false); |
| | | tfMaxMemory = UIFactory.makeJTextField(Message.EMPTY, |
| | | tfMaxMemory = UIFactory.makeJTextField(LocalizableMessage.EMPTY, |
| | | INFO_MAX_MEMORY_TOOLTIP.get(), 10, UIFactory.TextStyle.TEXTFIELD); |
| | | lMaxMemory.setLabelFor(tfMaxMemory); |
| | | |
| | |
| | | INFO_OTHER_JAVA_ARGUMENTS_LABEL.get(), |
| | | UIFactory.TextStyle.PRIMARY_FIELD_VALID); |
| | | lOtherArguments.setOpaque(false); |
| | | tfOtherArguments = UIFactory.makeJTextField(Message.EMPTY, |
| | | tfOtherArguments = UIFactory.makeJTextField(LocalizableMessage.EMPTY, |
| | | INFO_OTHER_JAVA_ARGUMENTS_TOOLTIP.get(), 30, |
| | | UIFactory.TextStyle.TEXTFIELD); |
| | | lOtherArguments.setLabelFor(tfOtherArguments); |
| | |
| | | */ |
| | | private void okClicked() |
| | | { |
| | | BackgroundTask<ArrayList<Message>> worker = |
| | | new BackgroundTask<ArrayList<Message>>() |
| | | BackgroundTask<ArrayList<LocalizableMessage>> worker = |
| | | new BackgroundTask<ArrayList<LocalizableMessage>>() |
| | | { |
| | | @Override |
| | | public ArrayList<Message> processBackgroundTask() |
| | | public ArrayList<LocalizableMessage> processBackgroundTask() |
| | | { |
| | | setValidLater(lInitialMemory, true); |
| | | setValidLater(lMaxMemory, true); |
| | | setValidLater(lOtherArguments, true); |
| | | int initialMemory = -1; |
| | | int maxMemory = -1; |
| | | ArrayList<Message> errorMsgs = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | try |
| | | { |
| | | String sInitialMemory = tfInitialMemory.getText().trim(); |
| | |
| | | if (errorMsgs.isEmpty()) |
| | | { |
| | | // Try the options together, often there are interdependencies. |
| | | ArrayList<Message> allErrors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> allErrors = new ArrayList<LocalizableMessage>(); |
| | | checkAllArgumentsTogether(initialMemory, maxMemory, allErrors); |
| | | |
| | | if (!allErrors.isEmpty()) |
| | | { |
| | | ArrayList<Message> memoryErrors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> memoryErrors = new ArrayList<LocalizableMessage>(); |
| | | checkMemoryArguments(initialMemory, maxMemory, memoryErrors); |
| | | ArrayList<Message> otherErrors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> otherErrors = new ArrayList<LocalizableMessage>(); |
| | | checkOtherArguments(otherErrors); |
| | | |
| | | if (!memoryErrors.isEmpty()) |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void backgroundTaskCompleted(ArrayList<Message> returnValue, |
| | | public void backgroundTaskCompleted(ArrayList<LocalizableMessage> returnValue, |
| | | Throwable throwable) |
| | | { |
| | | setCheckingVisible(false); |
| | |
| | | * @param title |
| | | * the title for the dialog. |
| | | */ |
| | | private void displayError(Message msg, Message title) |
| | | private void displayError(LocalizableMessage msg, LocalizableMessage title) |
| | | { |
| | | Utilities.displayError(this, msg, title); |
| | | toFront(); |
| | |
| | | * @return <CODE>true</CODE> if the user accepts the message displayed in the |
| | | * dialog and <CODE>false</CODE> otherwise. |
| | | */ |
| | | private boolean displayConfirmationDialog(Message msg, Message title) |
| | | private boolean displayConfirmationDialog(LocalizableMessage msg, LocalizableMessage title) |
| | | { |
| | | toFront(); |
| | | return Utilities.displayConfirmation(this, msg, title); |
| | |
| | | javaArgs.setAdditionalArguments(new String[]{"" , "-client", "-XX"}); |
| | | // UIFactory.initialize(); |
| | | JavaArgumentsDialog dlg = new JavaArgumentsDialog(new JFrame(), javaArgs, |
| | | Message.raw("my title"), |
| | | Message.raw("Set the java arguments for the test command-line.")); |
| | | LocalizableMessage.raw("my title"), |
| | | LocalizableMessage.raw("Set the java arguments for the test command-line.")); |
| | | dlg.pack(); |
| | | dlg.setVisible(true); |
| | | } catch (Exception ex) |
| | |
| | | private final static String INSTALL_PATH = |
| | | Utils.getInstallPathFromClasspath(); |
| | | |
| | | private void checkOptions(String options, Collection<Message> errorMsgs, |
| | | JLabel l, Message errorMsg) |
| | | private void checkOptions(String options, Collection<LocalizableMessage> errorMsgs, |
| | | JLabel l, LocalizableMessage errorMsg) |
| | | { |
| | | checkOptions(options, errorMsgs, new JLabel[]{l}, errorMsg); |
| | | } |
| | | |
| | | private void checkOptions(String options, Collection<Message> errorMsgs, |
| | | JLabel[] ls, Message errorMsg) |
| | | private void checkOptions(String options, Collection<LocalizableMessage> errorMsgs, |
| | | JLabel[] ls, LocalizableMessage errorMsg) |
| | | { |
| | | if (!Utils.isWebStart()) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private Message getMemoryErrorMessage(Message msg, int memValue) |
| | | private LocalizableMessage getMemoryErrorMessage(LocalizableMessage msg, int memValue) |
| | | { |
| | | // 2048 MB is acceptable max heap size on 32Bit OS |
| | | if (memValue < 2048) |
| | |
| | | } |
| | | else |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(msg); |
| | | mb.append(" "); |
| | | mb.append(ERR_MEMORY_32_BIT_LIMIT.get()); |
| | |
| | | } |
| | | |
| | | private void checkMemoryArguments(int initialMemory, int maxMemory, |
| | | Collection<Message> errorMsgs) |
| | | Collection<LocalizableMessage> errorMsgs) |
| | | { |
| | | setValidLater(lInitialMemory, true); |
| | | setValidLater(lMaxMemory, true); |
| | |
| | | { |
| | | if (maxMemory != -1) |
| | | { |
| | | Message msg = getMemoryErrorMessage(ERR_MEMORY_VALUE_EXTENDED.get( |
| | | LocalizableMessage msg = getMemoryErrorMessage(ERR_MEMORY_VALUE_EXTENDED.get( |
| | | JavaArguments.getInitialMemoryGenericArgument(), |
| | | JavaArguments.getMaxMemoryGenericArgument()), maxMemory); |
| | | String sMemory = |
| | |
| | | } |
| | | else |
| | | { |
| | | Message msg = getMemoryErrorMessage( |
| | | LocalizableMessage msg = getMemoryErrorMessage( |
| | | ERR_INITIAL_MEMORY_VALUE_EXTENDED.get( |
| | | JavaArguments.getInitialMemoryGenericArgument()), |
| | | initialMemory); |
| | |
| | | } |
| | | else if (maxMemory != -1) |
| | | { |
| | | Message msg = getMemoryErrorMessage( |
| | | LocalizableMessage msg = getMemoryErrorMessage( |
| | | ERR_MAX_MEMORY_VALUE_EXTENDED.get( |
| | | JavaArguments.getInitialMemoryGenericArgument()), maxMemory); |
| | | checkOptions(JavaArguments.getMaxMemoryArgument(maxMemory), |
| | |
| | | } |
| | | |
| | | private void checkAllArgumentsTogether(int initialMemory, int maxMemory, |
| | | Collection<Message> errorMsgs) |
| | | Collection<LocalizableMessage> errorMsgs) |
| | | { |
| | | setValidLater(lInitialMemory, true); |
| | | setValidLater(lMaxMemory, true); |
| | |
| | | } |
| | | } |
| | | |
| | | private void checkOtherArguments(Collection<Message> errorMsgs) |
| | | private void checkOtherArguments(Collection<LocalizableMessage> errorMsgs) |
| | | { |
| | | setValidLater(lOtherArguments, true); |
| | | ArrayList<JLabel> ls = new ArrayList<JLabel>(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import java.awt.Component; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | return INFO_REMOTE_REPLICATION_PORT_INSTRUCTIONS.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_REMOTE_REPLICATION_PORT_TITLE.get(); |
| | | } |
| | |
| | | serverDisplay = server.getHostPort(true); |
| | | } |
| | | LabelFieldDescriptor desc = new LabelFieldDescriptor( |
| | | Message.raw(serverDisplay), |
| | | LocalizableMessage.raw(serverDisplay), |
| | | INFO_REPLICATION_PORT_TOOLTIP.get(), |
| | | LabelFieldDescriptor.FieldType.TEXTFIELD, |
| | | LabelFieldDescriptor.LabelType.PRIMARY, |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.quicksetup.installer.ui; |
| | | |
| | |
| | | |
| | | import org.opends.admin.ads.ReplicaDescriptor; |
| | | import org.opends.admin.ads.SuffixDescriptor; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.JavaArguments; |
| | | import org.opends.quicksetup.UserData; |
| | | import org.opends.quicksetup.installer.DataReplicationOptions; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | return INFO_JAVA_RUNTIME_OPTIONS_PANEL_INSTRUCTIONS.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_JAVA_RUNTIME_OPTIONS_PANEL_TITLE.get(); |
| | | } |
| | |
| | | |
| | | private void createComponents() |
| | | { |
| | | warning = UIFactory.makeHtmlPane(Message.EMPTY, |
| | | warning = UIFactory.makeHtmlPane(LocalizableMessage.EMPTY, |
| | | UIFactory.INSTRUCTIONS_FONT); |
| | | warning.setOpaque(false); |
| | | |
| | | lServer = UIFactory.makeJLabel(UIFactory.IconType.NO_ICON, |
| | | Message.EMPTY, UIFactory.TextStyle.SECONDARY_FIELD_VALID); |
| | | LocalizableMessage.EMPTY, UIFactory.TextStyle.SECONDARY_FIELD_VALID); |
| | | bServer = UIFactory.makeJButton(INFO_JAVA_RUNTIME_CHANGE_LABEL.get(), |
| | | INFO_JAVA_RUNTIME_CHANGE_SERVER_TOOLTIP.get()); |
| | | bServer.addActionListener(new ActionListener() |
| | |
| | | }); |
| | | |
| | | lImport = UIFactory.makeJLabel(UIFactory.IconType.NO_ICON, |
| | | Message.EMPTY, UIFactory.TextStyle.SECONDARY_FIELD_VALID); |
| | | LocalizableMessage.EMPTY, UIFactory.TextStyle.SECONDARY_FIELD_VALID); |
| | | bImport = UIFactory.makeJButton(INFO_JAVA_RUNTIME_CHANGE_LABEL.get(), |
| | | INFO_JAVA_RUNTIME_CHANGE_IMPORT_TOOLTIP.get()); |
| | | bImport.addActionListener(new ActionListener() |
| | |
| | | |
| | | private void updateWarningMessage(UserData uData) |
| | | { |
| | | Message msg = null; |
| | | LocalizableMessage msg = null; |
| | | |
| | | DataReplicationOptions repl = uData.getReplicationOptions(); |
| | | SuffixesToReplicateOptions suf = uData.getSuffixesToReplicateOptions(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | |
| | | */ |
| | | |
| | |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.util.CertificateManager; |
| | | import org.opends.server.util.StaticUtils; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | |
| | | gbc.weightx = 0.0; |
| | | gbc.gridwidth = GridBagConstraints.RELATIVE; |
| | | |
| | | Message title = INFO_SECURITY_OPTIONS_TITLE.get(); |
| | | LocalizableMessage title = INFO_SECURITY_OPTIONS_TITLE.get(); |
| | | JLabel l = |
| | | UIFactory.makeJLabel(UIFactory.IconType.NO_ICON, title, |
| | | UIFactory.TextStyle.TITLE); |
| | |
| | | */ |
| | | private Component createInstructionsPane() |
| | | { |
| | | Message instructions = INFO_SECURITY_OPTIONS_INSTRUCTIONS.get(); |
| | | LocalizableMessage instructions = INFO_SECURITY_OPTIONS_INSTRUCTIONS.get(); |
| | | |
| | | JTextComponent instructionsPane = |
| | | UIFactory.makeHtmlPane(instructions, UIFactory.INSTRUCTIONS_FONT); |
| | |
| | | { |
| | | sPort = String.valueOf(port); |
| | | } |
| | | tfPort = UIFactory.makeJTextField(Message.raw(sPort), |
| | | tfPort = UIFactory.makeJTextField(LocalizableMessage.raw(sPort), |
| | | INFO_SSL_PORT_TEXTFIELD_TOOLTIP.get(), UIFactory.PORT_FIELD_SIZE, |
| | | UIFactory.TextStyle.TEXTFIELD); |
| | | cbEnableStartTLS = UIFactory.makeJCheckBox(INFO_ENABLE_STARTTLS_LABEL.get(), |
| | |
| | | INFO_KEYSTORE_PATH_LABEL.get(), |
| | | UIFactory.TextStyle.SECONDARY_FIELD_VALID); |
| | | lKeystorePath.setOpaque(false); |
| | | tfKeystorePath = UIFactory.makeJTextField(Message.EMPTY, |
| | | tfKeystorePath = UIFactory.makeJTextField(LocalizableMessage.EMPTY, |
| | | INFO_KEYSTORE_PATH_TOOLTIP.get(), |
| | | UIFactory.HOST_FIELD_SIZE, UIFactory.TextStyle.TEXTFIELD); |
| | | lKeystorePath.setLabelFor(tfKeystorePath); |
| | |
| | | INFO_KEYSTORE_PWD_LABEL.get(), |
| | | UIFactory.TextStyle.SECONDARY_FIELD_VALID); |
| | | lKeystorePwd.setOpaque(false); |
| | | tfKeystorePwd = UIFactory.makeJPasswordField(Message.EMPTY, |
| | | tfKeystorePwd = UIFactory.makeJPasswordField(LocalizableMessage.EMPTY, |
| | | INFO_KEYSTORE_PWD_TOOLTIP.get(), |
| | | UIFactory.PASSWORD_FIELD_SIZE, UIFactory.TextStyle.PASSWORD_FIELD); |
| | | lKeystorePwd.setLabelFor(tfKeystorePwd); |
| | |
| | | */ |
| | | private void okClicked() |
| | | { |
| | | BackgroundTask<ArrayList<Message>> worker = |
| | | new BackgroundTask<ArrayList<Message>>() |
| | | BackgroundTask<ArrayList<LocalizableMessage>> worker = |
| | | new BackgroundTask<ArrayList<LocalizableMessage>>() |
| | | { |
| | | @Override |
| | | public ArrayList<Message> processBackgroundTask() |
| | | public ArrayList<LocalizableMessage> processBackgroundTask() |
| | | { |
| | | ArrayList<Message> errorMsgs = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | |
| | | errorMsgs.addAll(checkPort()); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void backgroundTaskCompleted(ArrayList<Message> returnValue, |
| | | public void backgroundTaskCompleted(ArrayList<LocalizableMessage> returnValue, |
| | | Throwable throwable) |
| | | { |
| | | if (throwable != null) |
| | |
| | | * @param title |
| | | * the title for the dialog. |
| | | */ |
| | | private void displayError(Message msg, Message title) |
| | | private void displayError(LocalizableMessage msg, LocalizableMessage title) |
| | | { |
| | | Utilities.displayError(this, msg, title); |
| | | toFront(); |
| | |
| | | * @return the port help message that we display when we cannot use the |
| | | * default port (636). |
| | | */ |
| | | private Message getPortHelpMessage() |
| | | private LocalizableMessage getPortHelpMessage() |
| | | { |
| | | Message s = Message.EMPTY; |
| | | LocalizableMessage s = LocalizableMessage.EMPTY; |
| | | if (securityOptions.getSslPort() != DEFAULT_PORT) |
| | | { |
| | | s = INFO_CANNOT_USE_DEFAULT_SECURE_PORT.get(); |
| | |
| | | * Checks the port. |
| | | * @return the error messages found while checking the port. |
| | | */ |
| | | private ArrayList<Message> checkPort() |
| | | private ArrayList<LocalizableMessage> checkPort() |
| | | { |
| | | ArrayList<Message> errorMsgs = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | |
| | | if (cbEnableSSL.isSelected()) |
| | | { |
| | |
| | | * @return the error messages found while checking existing keystore |
| | | * parameters. |
| | | */ |
| | | private ArrayList<Message> checkKeystore() |
| | | private ArrayList<LocalizableMessage> checkKeystore() |
| | | { |
| | | ArrayList<Message> errorMsgs = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | |
| | | boolean pathValid = true; |
| | | boolean pwdValid = true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | |
| | | import org.opends.quicksetup.event.MinimumSizeComponentListener; |
| | | import org.opends.quicksetup.ui.UIFactory; |
| | | import org.opends.quicksetup.ui.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | /** |
| | |
| | | gbc.gridwidth = GridBagConstraints.REMAINDER; |
| | | gbc.insets.left = UIFactory.LEFT_INSET_SECONDARY_FIELD; |
| | | gbc.fill = GridBagConstraints.BOTH; |
| | | Message msg = INFO_SELECT_ALIAS_MSG.get(); |
| | | LocalizableMessage msg = INFO_SELECT_ALIAS_MSG.get(); |
| | | JTextComponent tf = UIFactory.makeHtmlPane(msg, |
| | | UIFactory.INSTRUCTIONS_FONT); |
| | | tf.setOpaque(false); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | |
| | | import org.opends.quicksetup.UserData; |
| | | |
| | | import org.opends.server.util.CertificateManager; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | /** |
| | |
| | | gbc.weightx = 0.0; |
| | | gbc.insets.left = UIFactory.LEFT_INSET_SECONDARY_FIELD; |
| | | auxPanel.add(UIFactory.makeJLabel(UIFactory.IconType.NO_ICON, |
| | | Message.raw(File.separator), UIFactory.TextStyle.TEXTFIELD), gbc); |
| | | LocalizableMessage.raw(File.separator), UIFactory.TextStyle.TEXTFIELD), gbc); |
| | | |
| | | gbc.gridwidth = GridBagConstraints.REMAINDER; |
| | | gbc.weightx = 0.3; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | if (Utils.isWebStart()) |
| | | { |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_SERVER_SETTINGS_PANEL_TITLE.get(); |
| | | } |
| | |
| | | else |
| | | { |
| | | lSecurity = UIFactory.makeJLabel(UIFactory.IconType.NO_ICON, |
| | | Message.raw(defaultValue), |
| | | LocalizableMessage.raw(defaultValue), |
| | | UIFactory.TextStyle.SECONDARY_FIELD_VALID); |
| | | } |
| | | |
| | |
| | | * @return the port help message that we display when we cannot use the |
| | | * default admin connector port (4444). |
| | | */ |
| | | private Message getAdminConnectorPortHelpMessage() |
| | | private LocalizableMessage getAdminConnectorPortHelpMessage() |
| | | { |
| | | Message s = Message.EMPTY; |
| | | LocalizableMessage s = LocalizableMessage.EMPTY; |
| | | if (defaultUserData.getAdminConnectorPort() != 4444) |
| | | { |
| | | s = INFO_CANNOT_USE_DEFAULT_ADMIN_CONNECTOR_PORT.get(); |
| | |
| | | * @return the port help message that we display when we cannot use the |
| | | * default port (389). |
| | | */ |
| | | private Message getPortHelpMessage() |
| | | private LocalizableMessage getPortHelpMessage() |
| | | { |
| | | Message s = Message.EMPTY; |
| | | LocalizableMessage s = LocalizableMessage.EMPTY; |
| | | if (defaultUserData.getServerPort() != 389) |
| | | { |
| | | s = INFO_CANNOT_USE_DEFAULT_PORT.get(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | |
| | | import org.opends.quicksetup.ui.UIFactory; |
| | | import org.opends.quicksetup.util.Utils; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | return INFO_SUFFIXES_TO_REPLICATE_PANEL_INSTRUCTIONS.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_SUFFIXES_TO_REPLICATE_PANEL_TITLE.get(); |
| | | } |
| | |
| | | hmCheckBoxes.clear(); |
| | | for (SuffixDescriptor suffix : orderedSuffixes) |
| | | { |
| | | JCheckBox cb = UIFactory.makeJCheckBox(Message.raw(suffix.getDN()), |
| | | JCheckBox cb = UIFactory.makeJCheckBox(LocalizableMessage.raw(suffix.getDN()), |
| | | INFO_SUFFIXES_TO_REPLICATE_DN_TOOLTIP.get(), |
| | | UIFactory.TextStyle.SECONDARY_FIELD_VALID); |
| | | cb.setOpaque(false); |
| | |
| | | gbc.weightx = 1.0; |
| | | gbc.gridwidth = GridBagConstraints.REMAINDER; |
| | | JEditorPane l = UIFactory.makeTextPane( |
| | | Message.raw(getSuffixString(suffix)), |
| | | LocalizableMessage.raw(getSuffixString(suffix)), |
| | | UIFactory.TextStyle.SECONDARY_FIELD_VALID); |
| | | l.setOpaque(false); |
| | | |
| | | /* Use a prototype label to get the additional insets */ |
| | | JEditorPane proto = UIFactory.makeTextPane( |
| | | Message.raw(suffix.getDN()), |
| | | LocalizableMessage.raw(suffix.getDN()), |
| | | UIFactory.TextStyle.SECONDARY_FIELD_VALID); |
| | | |
| | | gbc.insets.top += Math.abs(cb.getPreferredSize().height - |
| | |
| | | |
| | | private String getSuffixString(SuffixDescriptor desc) |
| | | { |
| | | TreeSet<Message> replicaDisplays = new TreeSet<Message>(); |
| | | TreeSet<LocalizableMessage> replicaDisplays = new TreeSet<LocalizableMessage>(); |
| | | for (ReplicaDescriptor rep: desc.getReplicas()) |
| | | { |
| | | replicaDisplays.add(getReplicaDisplay(rep)); |
| | | } |
| | | MessageBuilder buf = new MessageBuilder(); |
| | | for (Message display: replicaDisplays) |
| | | LocalizableMessageBuilder buf = new LocalizableMessageBuilder(); |
| | | for (LocalizableMessage display: replicaDisplays) |
| | | { |
| | | if (buf.length() > 0) |
| | | { |
| | |
| | | return buf.toString(); |
| | | } |
| | | |
| | | private Message getReplicaDisplay(ReplicaDescriptor replica) |
| | | private LocalizableMessage getReplicaDisplay(ReplicaDescriptor replica) |
| | | { |
| | | Message display; |
| | | LocalizableMessage display; |
| | | |
| | | ServerDescriptor server = replica.getServer(); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.webstart; |
| | |
| | | import org.opends.quicksetup.util.FileManager; |
| | | import org.opends.server.util.SetupUtils; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | /** |
| | |
| | | private final Map<ProgressStep, Integer> hmRatio = |
| | | new HashMap<ProgressStep, Integer>(); |
| | | |
| | | private final Map<ProgressStep, Message> hmSummary = |
| | | new HashMap<ProgressStep, Message>(); |
| | | private final Map<ProgressStep, LocalizableMessage> hmSummary = |
| | | new HashMap<ProgressStep, LocalizableMessage>(); |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(WebStartInstaller.class.getName()); |
| | |
| | | notifyListeners(getLineBreak()); |
| | | updateSummaryWithServerState(hmSummary, false); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR); |
| | | Message html = getFormattedError(ex, true); |
| | | LocalizableMessage html = getFormattedError(ex, true); |
| | | notifyListeners(html); |
| | | LOG.log(Level.SEVERE, "Error installing.", ex); |
| | | notifyListeners(getLineBreak()); |
| | |
| | | ApplicationException ex = new ApplicationException( |
| | | ReturnCode.BUG, |
| | | Utils.getThrowableMsg(INFO_BUG_MSG.get(), t), t); |
| | | Message msg = getFormattedError(ex, true); |
| | | LocalizableMessage msg = getFormattedError(ex, true); |
| | | notifyListeners(msg); |
| | | LOG.log(Level.SEVERE, "Error installing.", t); |
| | | notifyListeners(getLineBreak()); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getSummary(ProgressStep status) |
| | | public LocalizableMessage getSummary(ProgressStep status) |
| | | { |
| | | Message summary; |
| | | LocalizableMessage summary; |
| | | if (InstallProgressStep.DOWNLOADING.equals(status)) { |
| | | summary = loader.getSummary(); |
| | | } else { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import org.opends.quicksetup.ButtonName; |
| | |
| | | * @param buttonName the ButtonName. |
| | | * @return a new button with the specified parameters. |
| | | */ |
| | | private JButton createButton(Message label, Message tooltip, |
| | | private JButton createButton(LocalizableMessage label, LocalizableMessage tooltip, |
| | | ButtonName buttonName) |
| | | { |
| | | JButton b = UIFactory.makeJButton(label, tooltip); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | import org.opends.quicksetup.UserDataCertificateException; |
| | | import org.opends.quicksetup.event.MinimumSizeComponentListener; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | /** |
| | |
| | | gbc.weightx = 0.0; |
| | | gbc.gridwidth = GridBagConstraints.RELATIVE; |
| | | |
| | | Message title = INFO_CERTIFICATE_TITLE.get(); |
| | | LocalizableMessage title = INFO_CERTIFICATE_TITLE.get(); |
| | | JLabel l = |
| | | UIFactory.makeJLabel(UIFactory.IconType.NO_ICON, title, |
| | | UIFactory.TextStyle.TITLE); |
| | |
| | | */ |
| | | private Component createTextPane() |
| | | { |
| | | Message text; |
| | | LocalizableMessage text; |
| | | if (ce.getType() == UserDataCertificateException.Type.NOT_TRUSTED) |
| | | { |
| | | text = INFO_CERTIFICATE_NOT_TRUSTED_TEXT.get( |
| | |
| | | p.add(explanationPane, gbc); |
| | | if ((ce.getChain() != null) && (ce.getChain().length > 0)) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(text); |
| | | mb.append(INFO_CERTIFICATE_SHOW_DETAILS_TEXT.get()); |
| | | explanationWithShowDetails = UIFactory.applyFontToHtml( |
| | | mb.toString(), UIFactory.INSTRUCTIONS_FONT); |
| | | MessageBuilder mb2 = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb2 = new LocalizableMessageBuilder(); |
| | | mb2.append(text); |
| | | mb2.append(INFO_CERTIFICATE_HIDE_DETAILS_TEXT.get()); |
| | | explanationWithHideDetails = UIFactory.applyFontToHtml( |
| | |
| | | final JPanel cardPanel = new JPanel(cl); |
| | | final Map<String, JPanel> hmPanels = new HashMap<String, JPanel>(); |
| | | |
| | | Message[] labels = |
| | | LocalizableMessage[] labels = |
| | | { |
| | | INFO_CERTIFICATE_SUBJECT_LABEL.get(), |
| | | INFO_CERTIFICATE_ISSUED_BY_LABEL.get(), |
| | |
| | | |
| | | private JComponent createSubjectComponent(X509Certificate cert) |
| | | { |
| | | Message dn = Message.raw(cert.getSubjectX500Principal().getName()); |
| | | LocalizableMessage dn = LocalizableMessage.raw(cert.getSubjectX500Principal().getName()); |
| | | return makeValueLabel(dn); |
| | | } |
| | | |
| | | private JComponent createIssuedByComponent(X509Certificate cert) |
| | | { |
| | | Message dn = Message.raw(cert.getIssuerX500Principal().getName()); |
| | | LocalizableMessage dn = LocalizableMessage.raw(cert.getIssuerX500Principal().getName()); |
| | | return makeValueLabel(dn); |
| | | } |
| | | |
| | |
| | | Date date = cert.getNotBefore(); |
| | | DateFormat df = DateFormat.getDateTimeInstance(DateFormat.SHORT, |
| | | DateFormat.SHORT); |
| | | Message value = Message.raw(df.format(date)); |
| | | LocalizableMessage value = LocalizableMessage.raw(df.format(date)); |
| | | long t1 = System.currentTimeMillis(); |
| | | long t2 = date.getTime(); |
| | | boolean isNotValidYet = t1 < t2; |
| | |
| | | Date date = cert.getNotAfter(); |
| | | DateFormat df = DateFormat.getDateTimeInstance(DateFormat.SHORT, |
| | | DateFormat.SHORT); |
| | | Message value = Message.raw(df.format(date)); |
| | | LocalizableMessage value = LocalizableMessage.raw(df.format(date)); |
| | | long t1 = System.currentTimeMillis(); |
| | | long t2 = date.getTime(); |
| | | boolean isExpired = t1 > t2; |
| | |
| | | |
| | | private JComponent createTypeComponent(X509Certificate cert) |
| | | { |
| | | Message type = Message.raw(cert.getType()); |
| | | LocalizableMessage type = LocalizableMessage.raw(cert.getType()); |
| | | return makeValueLabel(type); |
| | | } |
| | | |
| | | private JComponent createSerialNumberComponent(X509Certificate cert) |
| | | { |
| | | Message serialNumber = Message.raw(String.valueOf(cert.getSerialNumber())); |
| | | LocalizableMessage serialNumber = LocalizableMessage.raw(String.valueOf(cert.getSerialNumber())); |
| | | return makeValueLabel(serialNumber); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Returns the Message representation of the SHA1 fingerprint. |
| | | * Returns the LocalizableMessage representation of the SHA1 fingerprint. |
| | | * @param cert the certificate object. |
| | | * @return the Message representation of the SHA1 fingerprint. |
| | | * @return the LocalizableMessage representation of the SHA1 fingerprint. |
| | | */ |
| | | public static Message getSHA1FingerPrint(X509Certificate cert) |
| | | public static LocalizableMessage getSHA1FingerPrint(X509Certificate cert) |
| | | { |
| | | Message msg = null; |
| | | LocalizableMessage msg = null; |
| | | try { |
| | | MessageDigest md = MessageDigest.getInstance("SHA1"); |
| | | |
| | |
| | | } |
| | | sb.append(Integer.toHexString(((int) b[i]) & 0xFF)); |
| | | } |
| | | msg = Message.raw(sb); |
| | | msg = LocalizableMessage.raw(sb); |
| | | } |
| | | catch (NoSuchAlgorithmException nsae) { |
| | | LOG.log(Level.WARNING, "SHA1 algorithm not supported: "+nsae, nsae); |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the Message representation of the MD5 fingerprint. |
| | | * Returns the LocalizableMessage representation of the MD5 fingerprint. |
| | | * @param cert the certificate object. |
| | | * @return the Message representation of the MD5 fingerprint. |
| | | * @return the LocalizableMessage representation of the MD5 fingerprint. |
| | | */ |
| | | public static Message getMD5FingerPrint(X509Certificate cert) |
| | | public static LocalizableMessage getMD5FingerPrint(X509Certificate cert) |
| | | { |
| | | Message msg = null; |
| | | LocalizableMessage msg = null; |
| | | try { |
| | | MessageDigest md = MessageDigest.getInstance("MD5"); |
| | | |
| | |
| | | } |
| | | sb.append(Integer.toHexString(((int) b[i]) & 0xFF)); |
| | | } |
| | | msg = Message.raw(sb); |
| | | msg = LocalizableMessage.raw(sb); |
| | | } |
| | | catch (NoSuchAlgorithmException nsae) { |
| | | LOG.log(Level.WARNING, "MD5 algorithm not supported: "+nsae, nsae); |
| | |
| | | UIFactory.TextStyle.SECONDARY_FIELD_VALID); |
| | | } |
| | | |
| | | private JLabel makeValueLabel(Message value) |
| | | private JLabel makeValueLabel(LocalizableMessage value) |
| | | { |
| | | if (value == null) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_FINISHED_PANEL_TITLE.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012-2013 ForgeRock AS. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | import org.opends.quicksetup.UserDataException; |
| | | import org.opends.quicksetup.WizardStep; |
| | | import org.opends.quicksetup.webstart.WebStartDownloader; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import javax.swing.*; |
| | |
| | | * in some operating systems. |
| | | * @return internationalized String representing the frame title |
| | | */ |
| | | abstract public Message getFrameTitle(); |
| | | abstract public LocalizableMessage getFrameTitle(); |
| | | |
| | | /** |
| | | * Returns the initial wizard step. |
| | |
| | | * Returns the tab formatted. |
| | | * @return the tab formatted. |
| | | */ |
| | | protected Message getTab() |
| | | protected LocalizableMessage getTab() |
| | | { |
| | | return formatter.getTab(); |
| | | } |
| | |
| | | * Gets the key for the close button's tool tip text. |
| | | * @return String key of the text in the resource bundle |
| | | */ |
| | | public Message getCloseButtonToolTip() { |
| | | public LocalizableMessage getCloseButtonToolTip() { |
| | | return INFO_CLOSE_BUTTON_TOOLTIP.get(); |
| | | } |
| | | |
| | |
| | | * Gets the key for the quit button's tool tip text. |
| | | * @return String key of the text in the resource bundle |
| | | */ |
| | | public Message getQuitButtonToolTip() { |
| | | public LocalizableMessage getQuitButtonToolTip() { |
| | | return INFO_QUIT_BUTTON_INSTALL_TOOLTIP.get(); |
| | | } |
| | | |
| | |
| | | * Gets the key for the finish button's tool tip text. |
| | | * @return String key of the text in the resource bundle |
| | | */ |
| | | public Message getFinishButtonToolTip() { |
| | | public LocalizableMessage getFinishButtonToolTip() { |
| | | return INFO_FINISH_BUTTON_TOOLTIP.get(); |
| | | } |
| | | |
| | |
| | | * Gets the key for the finish button's label. |
| | | * @return String key of the text in the resource bundle |
| | | */ |
| | | public Message getFinishButtonLabel() { |
| | | public LocalizableMessage getFinishButtonLabel() { |
| | | return INFO_FINISH_BUTTON_LABEL.get(); |
| | | } |
| | | |
| | |
| | | { |
| | | lastPercentage = perc; |
| | | int ratio = (perc * maxRatio) / 100; |
| | | Message summary; |
| | | LocalizableMessage summary; |
| | | switch (downloadStatus) |
| | | { |
| | | case VALIDATING: |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * This is a commodity class used to couple a label and a text component with |
| | |
| | | |
| | | public class LabelFieldDescriptor |
| | | { |
| | | private Message label; |
| | | private LocalizableMessage label; |
| | | |
| | | private Message tooltip; |
| | | private LocalizableMessage tooltip; |
| | | |
| | | private FieldType type; |
| | | |
| | |
| | | * @param labelType the type of label. |
| | | * @param size the size of the field. |
| | | */ |
| | | public LabelFieldDescriptor(Message label, Message tooltip, FieldType type, |
| | | public LabelFieldDescriptor(LocalizableMessage label, LocalizableMessage tooltip, FieldType type, |
| | | LabelType labelType, int size) |
| | | { |
| | | this.label = label; |
| | |
| | | * Returns the String displayed by the label. |
| | | * @return the String displayed by the label. |
| | | */ |
| | | public Message getLabel() |
| | | public LocalizableMessage getLabel() |
| | | { |
| | | return label; |
| | | } |
| | |
| | | * Returns the tooltip used in the field. |
| | | * @return the tooltip used in the field. |
| | | */ |
| | | public Message getTooltip() |
| | | public LocalizableMessage getTooltip() |
| | | { |
| | | return tooltip; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import java.awt.Dimension; |
| | |
| | | |
| | | private JEditorPane detailsTextArea; |
| | | |
| | | private Message lastText; |
| | | private LocalizableMessage lastText; |
| | | |
| | | private JFrame parent; |
| | | |
| | | private JButton closeButton; |
| | | |
| | | private Message panelTitle = INFO_PROGRESS_TITLE.get(); |
| | | private LocalizableMessage panelTitle = INFO_PROGRESS_TITLE.get(); |
| | | |
| | | private ProgressMessageFormatter formatter = |
| | | new HtmlProgressMessageFormatter(); |
| | |
| | | * Returns the title of the panel. |
| | | * @return the title of the panel |
| | | */ |
| | | public Message getPanelTitle() |
| | | public LocalizableMessage getPanelTitle() |
| | | { |
| | | return panelTitle; |
| | | } |
| | |
| | | * Sets the text in the summary label. The text can be in HTML format. |
| | | * @param text the text to be set. |
| | | */ |
| | | public void setSummary(Message text) |
| | | public void setSummary(LocalizableMessage text) |
| | | { |
| | | if (text != null) { |
| | | progressBarLabel.setText(text.toString()); |
| | |
| | | * Sets the text in the details text pane. The text can be in HTML format. |
| | | * @param text the text to be set. |
| | | */ |
| | | public void setDetails(Message text) |
| | | public void setDetails(LocalizableMessage text) |
| | | { |
| | | if (text != null) { |
| | | detailsTextArea.setText(text.toString()); |
| | |
| | | gbc.weightx = 0.0; |
| | | gbc.gridwidth = GridBagConstraints.RELATIVE; |
| | | |
| | | Message title = getPanelTitle(); |
| | | LocalizableMessage title = getPanelTitle(); |
| | | |
| | | JLabel l = |
| | | UIFactory.makeJLabel(UIFactory.IconType.NO_ICON, title, |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | import org.opends.quicksetup.ProgressStep; |
| | | import org.opends.quicksetup.event.ButtonEvent; |
| | | import org.opends.quicksetup.ProgressDescriptor; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | /** |
| | |
| | | |
| | | private JEditorPane detailsTextArea; |
| | | |
| | | private Message lastText; |
| | | private LocalizableMessage lastText; |
| | | |
| | | private Component lastFocusComponent; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | return null; |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_PROGRESS_PANEL_TITLE.get(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | import org.opends.server.util.SetupUtils; |
| | | |
| | | import static org.opends.quicksetup.util.Utils.*; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import javax.swing.*; |
| | |
| | | |
| | | private QuickSetupDialog dialog; |
| | | |
| | | private MessageBuilder progressDetails = new MessageBuilder(); |
| | | private LocalizableMessageBuilder progressDetails = new LocalizableMessageBuilder(); |
| | | |
| | | private ProgressDescriptor lastDescriptor; |
| | | |
| | |
| | | |
| | | if (throwable != null) |
| | | { |
| | | displayError(Message.raw(throwable.getMessage()), |
| | | displayError(LocalizableMessage.raw(throwable.getMessage()), |
| | | INFO_ERROR_TITLE.get()); |
| | | } |
| | | } |
| | |
| | | * @param title |
| | | * the title for the dialog. |
| | | */ |
| | | public void displayError(Message msg, Message title) |
| | | public void displayError(LocalizableMessage msg, LocalizableMessage title) |
| | | { |
| | | if (isCli()) { |
| | | System.err.println(msg); |
| | |
| | | * @return <CODE>true</CODE> if the user confirms the message, or |
| | | * <CODE>false</CODE> if not. |
| | | */ |
| | | public boolean displayConfirmation(Message msg, Message title) |
| | | public boolean displayConfirmation(LocalizableMessage msg, LocalizableMessage title) |
| | | { |
| | | return getDialog().displayConfirmation(msg, title); |
| | | } |
| | |
| | | private ProgressDescriptor createProgressDescriptor(ProgressUpdateEvent ev) |
| | | { |
| | | ProgressStep status = ev.getProgressStep(); |
| | | Message newProgressLabel = ev.getCurrentPhaseSummary(); |
| | | Message additionalDetails = ev.getNewLogs(); |
| | | LocalizableMessage newProgressLabel = ev.getCurrentPhaseSummary(); |
| | | LocalizableMessage additionalDetails = ev.getNewLogs(); |
| | | Integer ratio = ev.getProgressRatio(); |
| | | |
| | | if (additionalDetails != null) |
| | |
| | | } |
| | | /* |
| | | Note: progressDetails might have a certain number of characters that |
| | | break Message Formatter (for instance percentages). When fix for |
| | | break LocalizableMessage Formatter (for instance percentages). When fix for |
| | | issue 2142 was committed it broke this code. So here |
| | | we use Message.raw instead of calling directly progressDetails.toMessage |
| | | we use LocalizableMessage.raw instead of calling directly progressDetails.toMessage |
| | | */ |
| | | return new ProgressDescriptor(status, ratio, newProgressLabel, |
| | | Message.raw(progressDetails.toString())); |
| | | LocalizableMessage.raw(progressDetails.toString())); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | import org.opends.quicksetup.event.ButtonEvent; |
| | | import org.opends.quicksetup.event.MinimumSizeComponentListener; |
| | | import org.opends.quicksetup.ProgressDescriptor; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | /** |
| | | * This class represents the dialog used by quicksetup applications. |
| | | * |
| | |
| | | * @param title |
| | | * the title for the dialog. |
| | | */ |
| | | public void displayError(Message msg, Message title) |
| | | public void displayError(LocalizableMessage msg, LocalizableMessage title) |
| | | { |
| | | Utilities.displayError(getFrame(), msg, title); |
| | | } |
| | |
| | | * @return <CODE>true</CODE> if the user confirms the message, or |
| | | * <CODE>false</CODE> if not. |
| | | */ |
| | | public boolean displayConfirmation(Message msg, Message title) |
| | | public boolean displayConfirmation(LocalizableMessage msg, LocalizableMessage title) |
| | | { |
| | | return Utilities.displayConfirmation(getFrame(), msg, title); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | import javax.swing.JPanel; |
| | | import javax.swing.text.JTextComponent; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.ButtonName; |
| | | import org.opends.quicksetup.CurrentInstallStatus; |
| | | import org.opends.quicksetup.event.ButtonActionListener; |
| | |
| | | * @param msg the error message to display formatted in HTML. |
| | | */ |
| | | public QuickSetupErrorPanel(GuiApplication application, |
| | | Message msg) |
| | | LocalizableMessage msg) |
| | | { |
| | | super(application); |
| | | JPanel p1 = new JPanel(new GridBagLayout()); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | import org.opends.quicksetup.util.ProgressMessageFormatter; |
| | | import org.opends.quicksetup.util.URLWorker; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | /** |
| | |
| | | * @return the text to be displayed in the progress label for a give icon |
| | | * type. |
| | | */ |
| | | protected Message getTextForIcon(UIFactory.IconType iconType) |
| | | protected LocalizableMessage getTextForIcon(UIFactory.IconType iconType) |
| | | { |
| | | Message text; |
| | | LocalizableMessage text; |
| | | if (iconType == UIFactory.IconType.WAIT) |
| | | { |
| | | text = INFO_GENERAL_CHECKING_DATA.get(); |
| | | } |
| | | else |
| | | { |
| | | text = Message.EMPTY; |
| | | text = LocalizableMessage.EMPTY; |
| | | } |
| | | return text; |
| | | } |
| | |
| | | * Returns the title of this panel. |
| | | * @return the title of this panel. |
| | | */ |
| | | protected abstract Message getTitle(); |
| | | protected abstract LocalizableMessage getTitle(); |
| | | |
| | | /** |
| | | * Returns the instruction of this panel. |
| | | * @return the instruction of this panel. |
| | | */ |
| | | protected abstract Message getInstructions(); |
| | | protected abstract LocalizableMessage getInstructions(); |
| | | |
| | | /** |
| | | * Commodity method that adds a vertical glue at the bottom of a given panel. |
| | |
| | | private Component createTitlePanel() |
| | | { |
| | | Component titlePanel = null; |
| | | Message title = getTitle(); |
| | | LocalizableMessage title = getTitle(); |
| | | if (title != null) |
| | | { |
| | | JPanel p = new JPanel(new GridBagLayout()); |
| | |
| | | protected Component createInstructionsPanel() |
| | | { |
| | | Component instructionsPanel = null; |
| | | Message instructions = getInstructions(); |
| | | LocalizableMessage instructions = getInstructions(); |
| | | if (instructions != null) |
| | | { |
| | | JEditorPane p = |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | |
| | | import org.opends.quicksetup.UserData; |
| | | import org.opends.quicksetup.WizardStep; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * This class displays the different steps of the wizard. It appears on the |
| | |
| | | gbc.fill = GridBagConstraints.HORIZONTAL; |
| | | gbc.anchor = GridBagConstraints.WEST; |
| | | |
| | | HashMap<WizardStep, Message> hmText = new HashMap<WizardStep, Message>(); |
| | | HashMap<WizardStep, LocalizableMessage> hmText = new HashMap<WizardStep, LocalizableMessage>(); |
| | | LinkedHashSet<WizardStep> orderedSteps = app.getOrderedSteps(); |
| | | boolean first = true; |
| | | for (WizardStep s : orderedSteps) |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import javax.swing.*; |
| | | import javax.swing.border.Border; |
| | |
| | | * @param tooltip the tooltip of the button. |
| | | * @return a JButton with the given label and tooltip. |
| | | */ |
| | | public static JButton makeJButton(Message label, Message tooltip) |
| | | public static JButton makeJButton(LocalizableMessage label, LocalizableMessage tooltip) |
| | | { |
| | | JButton b = new JButton(); |
| | | |
| | |
| | | * @param style the text style. |
| | | * @return a JLabel with the given icon, text and text style. |
| | | */ |
| | | public static JLabel makeJLabel(IconType iconName, Message text, |
| | | public static JLabel makeJLabel(IconType iconName, LocalizableMessage text, |
| | | TextStyle style) |
| | | { |
| | | JLabel l = new JLabel(); |
| | |
| | | |
| | | ImageIcon icon = getImageIcon(iconName); |
| | | l.setIcon(icon); |
| | | Message tooltip = getIconTooltip(iconName); |
| | | LocalizableMessage tooltip = getIconTooltip(iconName); |
| | | |
| | | if (tooltip != null) |
| | | { |
| | |
| | | case TEXTFIELD: |
| | | |
| | | field = |
| | | makeJTextField(Message.raw(defaultValue), desc.getTooltip(), desc |
| | | makeJTextField(LocalizableMessage.raw(defaultValue), desc.getTooltip(), desc |
| | | .getSize(), TextStyle.TEXTFIELD); |
| | | break; |
| | | |
| | | case PASSWORD: |
| | | |
| | | field = |
| | | makeJPasswordField(Message.raw(defaultValue), desc.getTooltip(), desc |
| | | makeJPasswordField(LocalizableMessage.raw(defaultValue), desc.getTooltip(), desc |
| | | .getSize(), TextStyle.PASSWORD_FIELD); |
| | | break; |
| | | |
| | | case READ_ONLY: |
| | | |
| | | field = |
| | | makeTextPane(Message.raw(defaultValue), TextStyle.READ_ONLY); |
| | | makeTextPane(LocalizableMessage.raw(defaultValue), TextStyle.READ_ONLY); |
| | | break; |
| | | |
| | | default: |
| | |
| | | * @return a JTextField with the given icon, tooltip text, size and text |
| | | * style. |
| | | */ |
| | | public static JTextField makeJTextField(Message text, Message tooltip, |
| | | public static JTextField makeJTextField(LocalizableMessage text, LocalizableMessage tooltip, |
| | | int size, TextStyle style) |
| | | { |
| | | JTextField f = new JTextField(); |
| | |
| | | * @return a JPasswordField with the given icon, tooltip text, size and text |
| | | * style. |
| | | */ |
| | | public static JPasswordField makeJPasswordField(Message text, Message tooltip, |
| | | public static JPasswordField makeJPasswordField(LocalizableMessage text, LocalizableMessage tooltip, |
| | | int size, TextStyle style) |
| | | { |
| | | JPasswordField f = new JPasswordField(); |
| | |
| | | * @return a JRadioButton with the given text, tooltip text and text |
| | | * style. |
| | | */ |
| | | public static JRadioButton makeJRadioButton(Message text, Message tooltip, |
| | | public static JRadioButton makeJRadioButton(LocalizableMessage text, LocalizableMessage tooltip, |
| | | TextStyle style) |
| | | { |
| | | JRadioButton rb = new JRadioButton(); |
| | |
| | | * @return a JCheckBox with the given text, tooltip text and text |
| | | * style. |
| | | */ |
| | | public static JCheckBox makeJCheckBox(Message text, Message tooltip, |
| | | public static JCheckBox makeJCheckBox(LocalizableMessage text, LocalizableMessage tooltip, |
| | | TextStyle style) |
| | | { |
| | | JCheckBox cb = new JCheckBox(); |
| | |
| | | String url = |
| | | String.valueOf(UIFactory.class.getClassLoader().getResource( |
| | | getIconPath(iconType))); |
| | | Message description = getIconDescription(iconType); |
| | | Message title = getIconTooltip(iconType); |
| | | LocalizableMessage description = getIconDescription(iconType); |
| | | LocalizableMessage title = getIconTooltip(iconType); |
| | | return "<img src=\"" + url + "\" alt=\"" + description + |
| | | "\" align=\"middle\" title=\"" + title + "\" >"; |
| | | } |
| | |
| | | if ((icon == null) && (iconType != IconType.NO_ICON)) |
| | | { |
| | | String path = getIconPath(iconType); |
| | | Message description = getIconDescription(iconType); |
| | | LocalizableMessage description = getIconDescription(iconType); |
| | | try |
| | | { |
| | | Image im = |
| | |
| | | * @return a read only JEditorPane containing the provided text with the |
| | | * provided font. |
| | | */ |
| | | public static JEditorPane makeHtmlPane(Message text, Font font) |
| | | public static JEditorPane makeHtmlPane(LocalizableMessage text, Font font) |
| | | { |
| | | return makeHtmlPane(text, null, font); |
| | | } |
| | |
| | | * @return a read only JEditorPane containing the provided text with the |
| | | * provided font. |
| | | */ |
| | | public static JEditorPane makeHtmlPane(Message text, HTMLEditorKit ek, |
| | | public static JEditorPane makeHtmlPane(LocalizableMessage text, HTMLEditorKit ek, |
| | | Font font) |
| | | { |
| | | JEditorPane pane = new JEditorPane(); |
| | |
| | | * @return a read only JEditorPane containing the provided text with the |
| | | * provided TextStyle. |
| | | */ |
| | | public static JEditorPane makeTextPane(Message text, TextStyle style) |
| | | public static JEditorPane makeTextPane(LocalizableMessage text, TextStyle style) |
| | | { |
| | | String s = text != null ? String.valueOf(text) : null; |
| | | JEditorPane pane = new JEditorPane("text/plain", s); |
| | |
| | | * @param size the new size of the field. |
| | | * @param textStyle the new TextStyle of the field. |
| | | */ |
| | | private static void updateTextFieldComponent(JTextField field, Message text, |
| | | Message tooltip, int size, TextStyle textStyle) |
| | | private static void updateTextFieldComponent(JTextField field, LocalizableMessage text, |
| | | LocalizableMessage tooltip, int size, TextStyle textStyle) |
| | | { |
| | | field.setColumns(size); |
| | | if (text != null) |
| | |
| | | } |
| | | } |
| | | |
| | | private static Color getColor(Message l) |
| | | private static Color getColor(LocalizableMessage l) |
| | | { |
| | | String s = String.valueOf(l); |
| | | String[] colors = s.split(","); |
| | |
| | | */ |
| | | private static String getIconPath(IconType iconType) |
| | | { |
| | | Message key; |
| | | LocalizableMessage key; |
| | | switch (iconType) |
| | | { |
| | | case CURRENT_STEP: |
| | |
| | | * @param iconType the IconType for which we want to get the description. |
| | | * @return the icon description for the given IconType. |
| | | */ |
| | | private static Message getIconDescription(IconType iconType) |
| | | private static LocalizableMessage getIconDescription(IconType iconType) |
| | | { |
| | | Message description; |
| | | LocalizableMessage description; |
| | | switch (iconType) |
| | | { |
| | | case CURRENT_STEP: |
| | |
| | | * @param iconType the IconType for which we want to get the tooltip text. |
| | | * @return the icon tooltip text for the given IconType. |
| | | */ |
| | | private static Message getIconTooltip(IconType iconType) |
| | | private static LocalizableMessage getIconTooltip(IconType iconType) |
| | | { |
| | | if (iconType == null) { |
| | | iconType = IconType.NO_ICON; |
| | | } |
| | | Message tooltip; |
| | | LocalizableMessage tooltip; |
| | | switch (iconType) |
| | | { |
| | | case CURRENT_STEP: |
| | |
| | | boolean isSelected, |
| | | boolean cellHasFocus) |
| | | { |
| | | JLabel l = makeJLabel(IconType.NO_ICON, Message.fromObject(value), |
| | | textStyle); |
| | | JLabel l = |
| | | makeJLabel(IconType.NO_ICON, LocalizableMessage.raw(value |
| | | .toString()), textStyle); |
| | | l.setBorder(new EmptyBorder(TOP_INSET_SECONDARY_FIELD, 0, 0, 0)); |
| | | return l; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import org.opends.quicksetup.util.Utils; |
| | | |
| | |
| | | * @return <CODE>true</CODE> if the user confirms the message, or |
| | | * <CODE>false</CODE> if not. |
| | | */ |
| | | public static boolean displayConfirmation(Component parent, Message msg, |
| | | Message title) |
| | | public static boolean displayConfirmation(Component parent, LocalizableMessage msg, |
| | | LocalizableMessage title) |
| | | { |
| | | return JOptionPane.YES_OPTION == JOptionPane.showOptionDialog( |
| | | parent, wrapMsg(String.valueOf(msg), 100), String.valueOf(title), |
| | |
| | | * @param title |
| | | * the title for the dialog. |
| | | */ |
| | | public static void displayError(Component parent, Message msg, Message title) |
| | | public static void displayError(Component parent, LocalizableMessage msg, LocalizableMessage title) |
| | | { |
| | | JOptionPane.showMessageDialog(parent, |
| | | wrapMsg(String.valueOf(msg), 100), |
| | |
| | | * @param title |
| | | * the title for the dialog. |
| | | */ |
| | | public static void displayInformationMessage(JFrame parent, Message msg, |
| | | Message title) |
| | | public static void displayInformationMessage(JFrame parent, LocalizableMessage msg, |
| | | LocalizableMessage title) |
| | | { |
| | | JOptionPane.showMessageDialog(parent, |
| | | wrapMsg(String.valueOf(msg), 100), String.valueOf(title), |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | |
| | | import org.opends.quicksetup.event.MinimumSizeComponentListener; |
| | | import org.opends.quicksetup.util.WebBrowserException; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | /** |
| | |
| | | Insets pInsets = UIFactory.getCurrentStepPanelInsets(); |
| | | gbc.insets.left = 0; |
| | | gbc.fill = GridBagConstraints.BOTH; |
| | | Message msg = INFO_ERROR_BROWSER_DISPLAY_MSG.get(url); |
| | | LocalizableMessage msg = INFO_ERROR_BROWSER_DISPLAY_MSG.get(url); |
| | | JTextComponent tf = |
| | | UIFactory.makeHtmlPane(msg, |
| | | UIFactory.ERROR_DIALOG_FONT); |
| | |
| | | WebBrowserErrorDialog dlg = |
| | | new WebBrowserErrorDialog(new JFrame(), |
| | | new WebBrowserException("http://opendj.org", |
| | | Message.raw("toto"), null)); |
| | | LocalizableMessage.raw("toto"), null)); |
| | | dlg.packAndShow(); |
| | | } catch (Exception ex) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2012-2013 ForgeRock AS. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import org.opends.quicksetup.*; |
| | |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | Message errMsg = INFO_ERROR_COPYING_FILE.get( |
| | | LocalizableMessage errMsg = INFO_ERROR_COPYING_FILE.get( |
| | | objectFile.getAbsolutePath(), |
| | | destination.getAbsolutePath()); |
| | | throw new ApplicationException( |
| | |
| | | } |
| | | } |
| | | } else { |
| | | Message errMsg = INFO_ERROR_COPYING_FILE.get( |
| | | LocalizableMessage errMsg = INFO_ERROR_COPYING_FILE.get( |
| | | objectFile.getAbsolutePath(), |
| | | destination.getAbsolutePath()); |
| | | throw new ApplicationException( |
| | |
| | | } |
| | | |
| | | if (!delete) { |
| | | Message errMsg; |
| | | LocalizableMessage errMsg; |
| | | if (isFile) { |
| | | errMsg = INFO_ERROR_DELETING_FILE.get(file.getAbsolutePath()); |
| | | } else { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | |
| | | import org.opends.quicksetup.Constants; |
| | | |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | /** |
| | | * This is an implementation of the ProgressMessageFormatter class that |
| | |
| | | static private final Logger LOG = |
| | | Logger.getLogger(HtmlProgressMessageFormatter.class.getName()); |
| | | |
| | | private Message doneHtml; |
| | | private Message errorHtml; |
| | | private LocalizableMessage doneHtml; |
| | | private LocalizableMessage errorHtml; |
| | | |
| | | /** |
| | | * The constant used to separate parameters in an URL. |
| | |
| | | /** |
| | | * The space in HTML. |
| | | */ |
| | | private static final Message SPACE = Message.raw(" "); |
| | | private static final LocalizableMessage SPACE = LocalizableMessage.raw(" "); |
| | | |
| | | /** |
| | | * The line break. |
| | | * The extra char is necessary because of bug: |
| | | * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4988885 |
| | | */ |
| | | private static final Message LINE_BREAK= |
| | | Message.raw(" "+Constants.HTML_LINE_BREAK); |
| | | private static final LocalizableMessage LINE_BREAK= |
| | | LocalizableMessage.raw(" "+Constants.HTML_LINE_BREAK); |
| | | |
| | | private static final Message TAB = new MessageBuilder(SPACE) |
| | | private static final LocalizableMessage TAB = new LocalizableMessageBuilder(SPACE) |
| | | .append(SPACE) |
| | | .append(SPACE) |
| | | .append(SPACE) |
| | |
| | | * representation |
| | | * @return the HTML representation for the given text. |
| | | */ |
| | | public Message getFormattedText(Message text) |
| | | public LocalizableMessage getFormattedText(LocalizableMessage text) |
| | | { |
| | | return Message.raw(Utils.getHtml(String.valueOf(text))); |
| | | return LocalizableMessage.raw(Utils.getHtml(String.valueOf(text))); |
| | | } |
| | | |
| | | /** |
| | |
| | | * representation |
| | | * @return the HTML representation of the summary for the given text. |
| | | */ |
| | | public Message getFormattedSummary(Message text) |
| | | public LocalizableMessage getFormattedSummary(LocalizableMessage text) |
| | | { |
| | | return new MessageBuilder("<html>") |
| | | return new LocalizableMessageBuilder("<html>") |
| | | .append(UIFactory.applyFontToHtml( |
| | | String.valueOf(text), UIFactory.PROGRESS_FONT)) |
| | | .toMessage(); |
| | |
| | | * resulting HTML. |
| | | * @return the HTML representation of an error for the given text. |
| | | */ |
| | | public Message getFormattedError(Message text, boolean applyMargin) |
| | | public LocalizableMessage getFormattedError(LocalizableMessage text, boolean applyMargin) |
| | | { |
| | | String html; |
| | | if (!Utils.containsHtml(String.valueOf(text))) { |
| | |
| | | UIFactory.applyMargin(result, |
| | | UIFactory.TOP_INSET_ERROR_MESSAGE, 0, 0, 0); |
| | | } |
| | | return Message.raw(result); |
| | | return LocalizableMessage.raw(result); |
| | | } |
| | | |
| | | /** |
| | |
| | | * resulting HTML. |
| | | * @return the HTML representation of a warning for the given text. |
| | | */ |
| | | public Message getFormattedWarning(Message text, boolean applyMargin) |
| | | public LocalizableMessage getFormattedWarning(LocalizableMessage text, boolean applyMargin) |
| | | { |
| | | String html; |
| | | if (!Utils.containsHtml(String.valueOf(text))) { |
| | |
| | | UIFactory.applyMargin(result, |
| | | UIFactory.TOP_INSET_ERROR_MESSAGE, 0, 0, 0); |
| | | } |
| | | return Message.raw(result); |
| | | return LocalizableMessage.raw(result); |
| | | } |
| | | |
| | | /** |
| | |
| | | * representation |
| | | * @return the HTML representation of a success message for the given text. |
| | | */ |
| | | public Message getFormattedSuccess(Message text) |
| | | public LocalizableMessage getFormattedSuccess(LocalizableMessage text) |
| | | { |
| | | // Note: the text we get already is in HTML form |
| | | String html = |
| | |
| | | + SPACE + UIFactory.applyFontToHtml(String.valueOf(text), |
| | | UIFactory.PROGRESS_FONT); |
| | | |
| | | return Message.raw(UIFactory.applySuccessfulBackgroundToHtml(html)); |
| | | return LocalizableMessage.raw(UIFactory.applySuccessfulBackgroundToHtml(html)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return the HTML representation of a log error message for the given |
| | | * text. |
| | | */ |
| | | public Message getFormattedLogError(Message text) |
| | | public LocalizableMessage getFormattedLogError(LocalizableMessage text) |
| | | { |
| | | String html = Utils.getHtml(String.valueOf(text)); |
| | | return Message.raw(UIFactory.applyFontToHtml(html, |
| | | return LocalizableMessage.raw(UIFactory.applyFontToHtml(html, |
| | | UIFactory.PROGRESS_LOG_ERROR_FONT)); |
| | | } |
| | | |
| | |
| | | * representation |
| | | * @return the HTML representation of a log message for the given text. |
| | | */ |
| | | public Message getFormattedLog(Message text) |
| | | public LocalizableMessage getFormattedLog(LocalizableMessage text) |
| | | { |
| | | String html = Utils.getHtml(String.valueOf(text)); |
| | | return Message.raw(UIFactory.applyFontToHtml(html, |
| | | return LocalizableMessage.raw(UIFactory.applyFontToHtml(html, |
| | | UIFactory.PROGRESS_LOG_FONT)); |
| | | } |
| | | |
| | |
| | | * Returns the HTML representation of the 'Done' text string. |
| | | * @return the HTML representation of the 'Done' text string. |
| | | */ |
| | | public Message getFormattedDone() |
| | | public LocalizableMessage getFormattedDone() |
| | | { |
| | | if (doneHtml == null) |
| | | { |
| | | String html = Utils.getHtml(INFO_PROGRESS_DONE.get().toString()); |
| | | doneHtml = Message.raw(UIFactory.applyFontToHtml(html, |
| | | doneHtml = LocalizableMessage.raw(UIFactory.applyFontToHtml(html, |
| | | UIFactory.PROGRESS_DONE_FONT)); |
| | | } |
| | | return Message.raw(doneHtml); |
| | | return LocalizableMessage.raw(doneHtml); |
| | | } |
| | | |
| | | /** |
| | | * Returns the HTML representation of the 'Error' text string. |
| | | * @return the HTML representation of the 'Error' text string. |
| | | */ |
| | | public Message getFormattedError() { |
| | | public LocalizableMessage getFormattedError() { |
| | | if (errorHtml == null) |
| | | { |
| | | String html = Utils.getHtml(INFO_PROGRESS_ERROR.get().toString()); |
| | | errorHtml = Message.raw(UIFactory.applyFontToHtml(html, |
| | | errorHtml = LocalizableMessage.raw(UIFactory.applyFontToHtml(html, |
| | | UIFactory.PROGRESS_ERROR_FONT)); |
| | | } |
| | | return Message.raw(errorHtml); |
| | | return LocalizableMessage.raw(errorHtml); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param text the String to which add points. |
| | | * @return the HTML representation of the '.....' text string. |
| | | */ |
| | | public Message getFormattedWithPoints(Message text) |
| | | public LocalizableMessage getFormattedWithPoints(LocalizableMessage text) |
| | | { |
| | | String html = Utils.getHtml(String.valueOf(text)); |
| | | String points = SPACE + |
| | | Utils.getHtml(INFO_PROGRESS_POINTS.get().toString()) + SPACE; |
| | | |
| | | MessageBuilder buf = new MessageBuilder(); |
| | | LocalizableMessageBuilder buf = new LocalizableMessageBuilder(); |
| | | buf.append(UIFactory.applyFontToHtml(html, UIFactory.PROGRESS_FONT)) |
| | | .append( |
| | | UIFactory.applyFontToHtml(points, UIFactory.PROGRESS_POINTS_FONT)); |
| | |
| | | * Returns the formatted representation of a point. |
| | | * @return the formatted representation of the '.' text string. |
| | | */ |
| | | public Message getFormattedPoint() |
| | | public LocalizableMessage getFormattedPoint() |
| | | { |
| | | return Message.raw(UIFactory.applyFontToHtml(".", |
| | | return LocalizableMessage.raw(UIFactory.applyFontToHtml(".", |
| | | UIFactory.PROGRESS_POINTS_FONT)); |
| | | } |
| | | |
| | |
| | | * Returns the formatted representation of a space. |
| | | * @return the formatted representation of the ' ' text string. |
| | | */ |
| | | public Message getSpace() |
| | | public LocalizableMessage getSpace() |
| | | { |
| | | return Message.raw(SPACE); |
| | | return LocalizableMessage.raw(SPACE); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return the formatted representation of a progress message for the given |
| | | * text. |
| | | */ |
| | | public Message getFormattedProgress(Message text) |
| | | public LocalizableMessage getFormattedProgress(LocalizableMessage text) |
| | | { |
| | | return Message.raw(UIFactory.applyFontToHtml( |
| | | return LocalizableMessage.raw(UIFactory.applyFontToHtml( |
| | | Utils.getHtml(String.valueOf(text)), |
| | | UIFactory.PROGRESS_FONT)); |
| | | } |
| | |
| | | * @return the HTML representation of an error message for the given |
| | | * exception. |
| | | */ |
| | | public Message getFormattedError(Throwable t, boolean applyMargin) |
| | | public LocalizableMessage getFormattedError(Throwable t, boolean applyMargin) |
| | | { |
| | | String openDiv = "<div style=\"margin-left:5px; margin-top:10px\">"; |
| | | String hideText = |
| | |
| | | { |
| | | result = UIFactory.applyErrorBackgroundToHtml(html); |
| | | } |
| | | return Message.raw(result); |
| | | return LocalizableMessage.raw(result); |
| | | } |
| | | |
| | | /** |
| | | * Returns the line break in HTML. |
| | | * @return the line break in HTML. |
| | | */ |
| | | public Message getLineBreak() |
| | | public LocalizableMessage getLineBreak() |
| | | { |
| | | return LINE_BREAK; |
| | | } |
| | |
| | | * Returns the tab in HTML. |
| | | * @return the tab in HTML. |
| | | */ |
| | | public Message getTab() |
| | | public LocalizableMessage getTab() |
| | | { |
| | | return TAB; |
| | | } |
| | |
| | | * Returns the task separator in HTML. |
| | | * @return the task separator in HTML. |
| | | */ |
| | | public Message getTaskSeparator() |
| | | public LocalizableMessage getTaskSeparator() |
| | | { |
| | | return Message.raw(UIFactory.HTML_SEPARATOR); |
| | | return LocalizableMessage.raw(UIFactory.HTML_SEPARATOR); |
| | | } |
| | | |
| | | /** |
| | |
| | | * url. |
| | | * @return the log HTML representation after the user has clicked on a url. |
| | | */ |
| | | public Message getFormattedAfterUrlClick(String url, Message lastText) |
| | | public LocalizableMessage getFormattedAfterUrlClick(String url, LocalizableMessage lastText) |
| | | { |
| | | String urlText = getErrorWithStackHtml(url, false); |
| | | String newUrlText = getErrorWithStackHtml(url, true); |
| | |
| | | lastTextStr.substring(0, index) + newUrlText |
| | | + lastTextStr.substring(index + urlText.length()); |
| | | } |
| | | return Message.raw(lastTextStr); |
| | | return LocalizableMessage.raw(lastTextStr); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.quicksetup.util; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | /** |
| | |
| | | * @param msg the error message. |
| | | * @param rootCause the root cause. |
| | | */ |
| | | public IncompatibleVersionException(Message msg, Throwable rootCause) |
| | | public IncompatibleVersionException(LocalizableMessage msg, Throwable rootCause) |
| | | { |
| | | super(msg, rootCause); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | |
| | | import org.opends.quicksetup.Constants; |
| | |
| | | public class PlainTextProgressMessageFormatter |
| | | implements ProgressMessageFormatter |
| | | { |
| | | private Message doneText; |
| | | private Message errorText; |
| | | private LocalizableMessage doneText; |
| | | private LocalizableMessage errorText; |
| | | |
| | | /** |
| | | * The space in plain text. |
| | |
| | | * representation |
| | | * @return the text representation for the given text. |
| | | */ |
| | | public Message getFormattedText(Message text) |
| | | public LocalizableMessage getFormattedText(LocalizableMessage text) |
| | | { |
| | | return text; |
| | | } |
| | |
| | | * representation |
| | | * @return the text representation of the summary for the given text. |
| | | */ |
| | | public Message getFormattedSummary(Message text) |
| | | public LocalizableMessage getFormattedSummary(LocalizableMessage text) |
| | | { |
| | | return text; |
| | | } |
| | |
| | | * resulting formatted text. |
| | | * @return the plain text representation of an error for the given text. |
| | | */ |
| | | public Message getFormattedError(Message text, boolean applyMargin) |
| | | public LocalizableMessage getFormattedError(LocalizableMessage text, boolean applyMargin) |
| | | { |
| | | Message result; |
| | | LocalizableMessage result; |
| | | if (applyMargin) |
| | | { |
| | | result = new MessageBuilder().append(Constants.LINE_SEPARATOR) |
| | | result = new LocalizableMessageBuilder().append(Constants.LINE_SEPARATOR) |
| | | .append(text).toMessage(); |
| | | } else |
| | | { |
| | |
| | | * resulting formatted text. |
| | | * @return the plain text representation of a warning for the given text. |
| | | */ |
| | | public Message getFormattedWarning(Message text, boolean applyMargin) |
| | | public LocalizableMessage getFormattedWarning(LocalizableMessage text, boolean applyMargin) |
| | | { |
| | | Message result; |
| | | LocalizableMessage result; |
| | | if (applyMargin) |
| | | { |
| | | result = new MessageBuilder(Constants.LINE_SEPARATOR) |
| | | result = new LocalizableMessageBuilder(Constants.LINE_SEPARATOR) |
| | | .append(text).toMessage(); |
| | | } else |
| | | { |
| | |
| | | * @return the plain text representation of a success message for the given |
| | | * text. |
| | | */ |
| | | public Message getFormattedSuccess(Message text) |
| | | public LocalizableMessage getFormattedSuccess(LocalizableMessage text) |
| | | { |
| | | return text; |
| | | } |
| | |
| | | * @return the plain text representation of a log error message for the given |
| | | * text. |
| | | */ |
| | | public Message getFormattedLogError(Message text) |
| | | public LocalizableMessage getFormattedLogError(LocalizableMessage text) |
| | | { |
| | | return text; |
| | | } |
| | |
| | | * representation |
| | | * @return the plain text representation of a log message for the given text. |
| | | */ |
| | | public Message getFormattedLog(Message text) |
| | | public LocalizableMessage getFormattedLog(LocalizableMessage text) |
| | | { |
| | | return text; |
| | | } |
| | |
| | | * Returns the plain text representation of the 'Done' text string. |
| | | * @return the plain text representation of the 'Done' text string. |
| | | */ |
| | | public Message getFormattedDone() |
| | | public LocalizableMessage getFormattedDone() |
| | | { |
| | | if (doneText == null) |
| | | { |
| | |
| | | * Returns the plain text representation of the 'Error' text string. |
| | | * @return the plain text representation of the 'Error' text string. |
| | | */ |
| | | public Message getFormattedError() |
| | | public LocalizableMessage getFormattedError() |
| | | { |
| | | if (errorText == null) |
| | | { |
| | |
| | | * @param text the String to which add points. |
| | | * @return the plain text representation of the '.....' text string. |
| | | */ |
| | | public Message getFormattedWithPoints(Message text) |
| | | public LocalizableMessage getFormattedWithPoints(LocalizableMessage text) |
| | | { |
| | | return new MessageBuilder(text).append(SPACE) |
| | | return new LocalizableMessageBuilder(text).append(SPACE) |
| | | .append(INFO_PROGRESS_POINTS.get()).append(SPACE).toMessage(); |
| | | } |
| | | |
| | |
| | | * Returns the formatted representation of a point. |
| | | * @return the formatted representation of the '.' text string. |
| | | */ |
| | | public Message getFormattedPoint() |
| | | public LocalizableMessage getFormattedPoint() |
| | | { |
| | | return Message.raw("."); |
| | | return LocalizableMessage.raw("."); |
| | | } |
| | | |
| | | /** |
| | | * Returns the formatted representation of a space. |
| | | * @return the formatted representation of the ' ' text string. |
| | | */ |
| | | public Message getSpace() |
| | | public LocalizableMessage getSpace() |
| | | { |
| | | return Message.raw(SPACE); |
| | | return LocalizableMessage.raw(SPACE); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return the formatted representation of a progress message for the given |
| | | * text. |
| | | */ |
| | | public Message getFormattedProgress(Message text) |
| | | public LocalizableMessage getFormattedProgress(LocalizableMessage text) |
| | | { |
| | | return text; |
| | | } |
| | |
| | | * @return the plain text representation of an error message for the given |
| | | * exception. |
| | | */ |
| | | public Message getFormattedError(Throwable t, boolean applyMargin) |
| | | public LocalizableMessage getFormattedError(Throwable t, boolean applyMargin) |
| | | { |
| | | String msg = t.getMessage(); |
| | | if (msg == null) |
| | |
| | | { |
| | | result = msg; |
| | | } |
| | | return Message.raw(result); |
| | | return LocalizableMessage.raw(result); |
| | | } |
| | | |
| | | /** |
| | | * Returns the line break in plain text. |
| | | * @return the line break in plain text. |
| | | */ |
| | | public Message getLineBreak() |
| | | public LocalizableMessage getLineBreak() |
| | | { |
| | | return Message.raw(Constants.LINE_SEPARATOR); |
| | | return LocalizableMessage.raw(Constants.LINE_SEPARATOR); |
| | | } |
| | | |
| | | /** |
| | | * Returns the tab in plain text. |
| | | * @return the tab in plain text. |
| | | */ |
| | | public Message getTab() |
| | | public LocalizableMessage getTab() |
| | | { |
| | | return Message.raw(" "); |
| | | return LocalizableMessage.raw(" "); |
| | | } |
| | | |
| | | /** |
| | | * Returns the task separator in plain text. |
| | | * @return the task separator in plain text. |
| | | */ |
| | | public Message getTaskSeparator() |
| | | public LocalizableMessage getTaskSeparator() |
| | | { |
| | | return Message.raw( |
| | | return LocalizableMessage.raw( |
| | | Constants.LINE_SEPARATOR+ |
| | | "-----------------------------------------------------------------"+ |
| | | Constants.LINE_SEPARATOR+Constants.LINE_SEPARATOR); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getFormattedAfterUrlClick(String url, Message lastText) |
| | | public LocalizableMessage getFormattedAfterUrlClick(String url, LocalizableMessage lastText) |
| | | { |
| | | throw new IllegalStateException( |
| | | "PlainTextProgressMessageFormatter.getFormattedAfterUrlClick must not "+ |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * This interface has been created in order to share the same formatting code |
| | |
| | | * representation |
| | | * @return the formatted representation for the given text. |
| | | */ |
| | | public Message getFormattedText(Message text); |
| | | public LocalizableMessage getFormattedText(LocalizableMessage text); |
| | | |
| | | /** |
| | | * Returns the formatted representation of the text that is the summary of the |
| | |
| | | * representation |
| | | * @return the formatted representation of a summary for the given text. |
| | | */ |
| | | public Message getFormattedSummary(Message text); |
| | | public LocalizableMessage getFormattedSummary(LocalizableMessage text); |
| | | |
| | | /** |
| | | * Returns the formatted representation of an error for a given text. |
| | |
| | | * resulting formatted text. |
| | | * @return the formatted representation of an error for the given text. |
| | | */ |
| | | public Message getFormattedError(Message text, boolean applyMargin); |
| | | public LocalizableMessage getFormattedError(LocalizableMessage text, boolean applyMargin); |
| | | |
| | | /** |
| | | * Returns the formatted representation of a warning for a given text. |
| | |
| | | * resulting formatted text. |
| | | * @return the formatted representation of a warning for the given text. |
| | | */ |
| | | public Message getFormattedWarning(Message text, boolean applyMargin); |
| | | public LocalizableMessage getFormattedWarning(LocalizableMessage text, boolean applyMargin); |
| | | |
| | | /** |
| | | * Returns the formatted representation of a success message for a given text. |
| | |
| | | * @return the formatted representation of a success message for the given |
| | | * text. |
| | | */ |
| | | public Message getFormattedSuccess(Message text); |
| | | public LocalizableMessage getFormattedSuccess(LocalizableMessage text); |
| | | |
| | | /** |
| | | * Returns the formatted representation of a log error message for a given |
| | |
| | | * @return the formatted representation of a log error message for the given |
| | | * text. |
| | | */ |
| | | public Message getFormattedLogError(Message text); |
| | | public LocalizableMessage getFormattedLogError(LocalizableMessage text); |
| | | |
| | | /** |
| | | * Returns the formatted representation of a log message for a given text. |
| | |
| | | * representation |
| | | * @return the formatted representation of a log message for the given text. |
| | | */ |
| | | public Message getFormattedLog(Message text); |
| | | public LocalizableMessage getFormattedLog(LocalizableMessage text); |
| | | |
| | | /** |
| | | * Returns the formatted representation of the 'Done' text string. |
| | | * @return the formatted representation of the 'Done' text string. |
| | | */ |
| | | public Message getFormattedDone(); |
| | | public LocalizableMessage getFormattedDone(); |
| | | |
| | | /** |
| | | * Returns the formatted representation of the 'Error' text string. |
| | | * @return the formatted representation of the 'Error' text string. |
| | | */ |
| | | public Message getFormattedError(); |
| | | public LocalizableMessage getFormattedError(); |
| | | |
| | | /** |
| | | * Returns the formatted representation of the argument text to which we add |
| | |
| | | * @param text the String to which add points. |
| | | * @return the formatted representation of the '.....' text string. |
| | | */ |
| | | public Message getFormattedWithPoints(Message text); |
| | | public LocalizableMessage getFormattedWithPoints(LocalizableMessage text); |
| | | |
| | | |
| | | /** |
| | | * Returns the formatted representation of a point. |
| | | * @return the formatted representation of the '.' text string. |
| | | */ |
| | | public Message getFormattedPoint(); |
| | | public LocalizableMessage getFormattedPoint(); |
| | | |
| | | /** |
| | | * Returns the formatted representation of a space. |
| | | * @return the formatted representation of the ' ' text string. |
| | | */ |
| | | public Message getSpace(); |
| | | public LocalizableMessage getSpace(); |
| | | |
| | | /** |
| | | * Returns the formatted representation of a progress message for a given |
| | |
| | | * @return the formatted representation of a progress message for the given |
| | | * text. |
| | | */ |
| | | public Message getFormattedProgress(Message text); |
| | | public LocalizableMessage getFormattedProgress(LocalizableMessage text); |
| | | |
| | | /** |
| | | * Returns the formatted representation of an error message for a given |
| | |
| | | * @return the formatted representation of an error message for the given |
| | | * exception. |
| | | */ |
| | | public Message getFormattedError(Throwable t, boolean applyMargin); |
| | | public LocalizableMessage getFormattedError(Throwable t, boolean applyMargin); |
| | | |
| | | /** |
| | | * Returns the line break formatted. |
| | | * @return the line break formatted. |
| | | */ |
| | | public Message getLineBreak(); |
| | | public LocalizableMessage getLineBreak(); |
| | | |
| | | /** |
| | | * Returns the tab formatted. |
| | | * @return the tab formatted. |
| | | */ |
| | | public Message getTab(); |
| | | public LocalizableMessage getTab(); |
| | | |
| | | /** |
| | | * Returns the task separator formatted. |
| | | * @return the task separator formatted. |
| | | */ |
| | | public Message getTaskSeparator(); |
| | | public LocalizableMessage getTaskSeparator(); |
| | | |
| | | /** |
| | | * Returns the log formatted representation after the user has clicked on a |
| | |
| | | * @return the formatted progress log representation after the user has |
| | | * clicked on a url. |
| | | */ |
| | | public Message getFormattedAfterUrlClick(String url, Message lastText); |
| | | public LocalizableMessage getFormattedAfterUrlClick(String url, LocalizableMessage lastText); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | | |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import org.opends.quicksetup.*; |
| | |
| | | |
| | | try { |
| | | if (application != null) { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(application.getFormattedProgress( |
| | | INFO_PROGRESS_STOPPING.get())); |
| | | mb.append(application.getLineBreak()); |
| | |
| | | |
| | | if (!stopped) { |
| | | if (application != null) { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(application.getFormattedLog( |
| | | INFO_PROGRESS_SERVER_WAITING_TO_STOP.get())); |
| | | mb.append(application.getLineBreak()); |
| | |
| | | |
| | | if (returnValue == clientSideError) { |
| | | if (application != null) { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(application.getLineBreak()); |
| | | mb.append(application.getFormattedLog( |
| | | INFO_PROGRESS_SERVER_ALREADY_STOPPED.get())); |
| | |
| | | |
| | | try { |
| | | if (application != null) { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(application.getFormattedProgress( |
| | | INFO_PROGRESS_STARTING.get())); |
| | | mb.append(application.getLineBreak()); |
| | |
| | | */ |
| | | public StopReader(final BufferedReader reader, |
| | | final boolean isError) { |
| | | final Message errorTag = |
| | | final LocalizableMessage errorTag = |
| | | isError ? |
| | | INFO_ERROR_READING_ERROROUTPUT.get() : |
| | | INFO_ERROR_READING_OUTPUT.get(); |
| | |
| | | String line = reader.readLine(); |
| | | while (line != null) { |
| | | if (application != null) { |
| | | MessageBuilder buf = new MessageBuilder(); |
| | | LocalizableMessageBuilder buf = new LocalizableMessageBuilder(); |
| | | if (!isFirstLine) { |
| | | buf.append(application.getProgressMessageFormatter(). |
| | | getLineBreak()); |
| | | } |
| | | if (isError) { |
| | | buf.append(application.getFormattedLogError( |
| | | Message.raw(line))); |
| | | LocalizableMessage.raw(line))); |
| | | } else { |
| | | buf.append(application.getFormattedLog( |
| | | Message.raw(line))); |
| | | LocalizableMessage.raw(line))); |
| | | } |
| | | application.notifyListeners(buf.toMessage()); |
| | | isFirstLine = false; |
| | |
| | | } |
| | | } catch (Throwable t) { |
| | | if (application != null) { |
| | | Message errorMsg = getThrowableMsg(errorTag, t); |
| | | LocalizableMessage errorMsg = getThrowableMsg(errorTag, t); |
| | | application.notifyListeners(errorMsg); |
| | | } |
| | | LOG.log(Level.INFO, "error reading server messages",t); |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the Message ID indicating that the server has started. |
| | | * @return the Message ID indicating that the server has started. |
| | | * Returns the LocalizableMessage ID indicating that the server has started. |
| | | * @return the LocalizableMessage ID indicating that the server has started. |
| | | */ |
| | | private String getStartedId() |
| | | { |
| | |
| | | public StartReader(final BufferedReader reader, final String startedId, |
| | | final boolean isError) |
| | | { |
| | | final Message errorTag = |
| | | final LocalizableMessage errorTag = |
| | | isError ? |
| | | INFO_ERROR_READING_ERROROUTPUT.get() : |
| | | INFO_ERROR_READING_OUTPUT.get(); |
| | |
| | | while (line != null) |
| | | { |
| | | if (application != null) { |
| | | MessageBuilder buf = new MessageBuilder(); |
| | | LocalizableMessageBuilder buf = new LocalizableMessageBuilder(); |
| | | if (!isFirstLine) |
| | | { |
| | | buf.append(application.getProgressMessageFormatter(). |
| | |
| | | if (isError) |
| | | { |
| | | buf.append(application.getFormattedLogError( |
| | | Message.raw(line))); |
| | | LocalizableMessage.raw(line))); |
| | | } else |
| | | { |
| | | buf.append(application.getFormattedLog( |
| | | Message.raw(line))); |
| | | LocalizableMessage.raw(line))); |
| | | } |
| | | application.notifyListeners(buf.toMessage()); |
| | | isFirstLine = false; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import javax.swing.JFrame; |
| | | |
| | |
| | | } catch (Throwable t) |
| | | { |
| | | // TODO: i18n |
| | | throw new WebBrowserException(url, Message.raw("Bug: throwable"), t); |
| | | throw new WebBrowserException(url, LocalizableMessage.raw("Bug: throwable"), t); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.quicksetup.util; |
| | | |
| | |
| | | import org.opends.admin.ads.SuffixDescriptor; |
| | | import org.opends.admin.ads.TopologyCacheException; |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.opends.messages.MessageDescriptor; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessageDescriptor; |
| | | import org.opends.quicksetup.*; |
| | | import org.opends.quicksetup.installer.AuthenticationData; |
| | | import org.opends.quicksetup.installer.DataReplicationOptions; |
| | |
| | | } |
| | | |
| | | /** |
| | | * This is a helper method that gets a Message representation of the elements |
| | | * in the Collection of Messages. The Message will display the different |
| | | * This is a helper method that gets a LocalizableMessage representation of the elements |
| | | * in the Collection of Messages. The LocalizableMessage will display the different |
| | | * elements separated by the separator String. |
| | | * |
| | | * @param col |
| | |
| | | * @return the message representation for the collection; |
| | | * null if <code>col</code> is null |
| | | */ |
| | | public static Message getMessageFromCollection(Collection<Message> col, |
| | | public static LocalizableMessage getMessageFromCollection(Collection<LocalizableMessage> col, |
| | | String separator) { |
| | | Message message = null; |
| | | LocalizableMessage message = null; |
| | | if (col != null) { |
| | | MessageBuilder mb = null; |
| | | for (Message m : col) { |
| | | LocalizableMessageBuilder mb = null; |
| | | for (LocalizableMessage m : col) { |
| | | if (mb == null) { |
| | | mb = new MessageBuilder(m); |
| | | mb = new LocalizableMessageBuilder(m); |
| | | } else { |
| | | mb.append(separator).append(m); |
| | | } |
| | | } |
| | | if (mb == null) mb = new MessageBuilder(); |
| | | if (mb == null) mb = new LocalizableMessageBuilder(); |
| | | message = mb.toMessage(); |
| | | } |
| | | return message; |
| | |
| | | * |
| | | * @return a localized message for a given properties key and throwable. |
| | | */ |
| | | public static Message getThrowableMsg(Message message, Throwable t) |
| | | public static LocalizableMessage getThrowableMsg(LocalizableMessage message, Throwable t) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(message); |
| | | MessageDescriptor.Arg1<CharSequence> tag; |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(message); |
| | | LocalizableMessageDescriptor.Arg1<CharSequence> tag; |
| | | if (isOutOfMemory(t)) |
| | | { |
| | | tag = INFO_EXCEPTION_OUT_OF_MEMORY_DETAILS; |
| | |
| | | * @param te the exception. |
| | | * @return a localized representation of the provide TopologyCacheException. |
| | | */ |
| | | public static Message getMessage(TopologyCacheException te) |
| | | public static LocalizableMessage getMessage(TopologyCacheException te) |
| | | { |
| | | MessageBuilder buf = new MessageBuilder(); |
| | | LocalizableMessageBuilder buf = new LocalizableMessageBuilder(); |
| | | |
| | | String ldapUrl = te.getLdapUrl(); |
| | | if (ldapUrl != null) |
| | |
| | | * contacting when the NamingException occurred. |
| | | * @return a message object for the given NamingException. |
| | | */ |
| | | public static Message getMessageForException(NamingException ne, |
| | | public static LocalizableMessage getMessageForException(NamingException ne, |
| | | String hostPort) |
| | | { |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | String arg; |
| | | if (ne.getLocalizedMessage() != null) |
| | | { |
| | |
| | | * @param ne the NamingException. |
| | | * @return a message object for the given NamingException. |
| | | */ |
| | | public static Message getMessageForException(NamingException ne) |
| | | public static LocalizableMessage getMessageForException(NamingException ne) |
| | | { |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | if (Utils.isCertificateException(ne)) |
| | | { |
| | | msg = INFO_ERROR_READING_CONFIG_LDAP_CERTIFICATE.get(ne.toString(true)); |
| | |
| | | * @param appName |
| | | * application name to display in the menu bar and the dock. |
| | | */ |
| | | public static void setMacOSXMenuBar(Message appName) |
| | | public static void setMacOSXMenuBar(LocalizableMessage appName) |
| | | { |
| | | System.setProperty("apple.laf.useScreenMenuBar", "true"); |
| | | System.setProperty("com.apple.mrj.application.apple.menu.about.name", |
| | |
| | | */ |
| | | public static String getDataDisplayString(UserData userInstallData) |
| | | { |
| | | Message msg; |
| | | LocalizableMessage msg; |
| | | |
| | | DataReplicationOptions repl = |
| | | userInstallData.getReplicationOptions(); |
| | |
| | | |
| | | if (createSuffix) |
| | | { |
| | | Message arg2; |
| | | LocalizableMessage arg2; |
| | | |
| | | NewSuffixOptions options = userInstallData.getNewSuffixOptions(); |
| | | |
| | |
| | | { |
| | | buf.append("\n"); |
| | | } |
| | | Message certMsg; |
| | | LocalizableMessage certMsg; |
| | | switch (ops.getCertificateType()) |
| | | { |
| | | case SELF_SIGNED_CERTIFICATE: |
| | |
| | | ProgressMessageFormatter formatter) |
| | | { |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(formatter.getFormattedProgress(Message.raw(cmd.get(0)))); |
| | | builder.append(formatter.getFormattedProgress(LocalizableMessage.raw(cmd.get(0)))); |
| | | int initialIndex = 1; |
| | | StringBuilder sbSeparator = new StringBuilder(); |
| | | sbSeparator.append(formatter.getSpace()); |
| | |
| | | if (s.startsWith("-")) |
| | | { |
| | | builder.append(lineSeparator); |
| | | builder.append(formatter.getFormattedProgress(Message.raw(s))); |
| | | builder.append(formatter.getFormattedProgress(LocalizableMessage.raw(s))); |
| | | } |
| | | else |
| | | { |
| | | builder.append(formatter.getSpace()); |
| | | builder.append(formatter.getFormattedProgress(Message.raw( |
| | | builder.append(formatter.getFormattedProgress(LocalizableMessage.raw( |
| | | escapeCommandLineValue(s)))); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | | |
| | | import org.opends.server.types.OpenDsException; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * This class is the exception that we get when we try to launch the user web |
| | |
| | | * @param msg the error message. |
| | | * @param rootCause the root cause. |
| | | */ |
| | | public WebBrowserException(String url, Message msg, Throwable rootCause) |
| | | public WebBrowserException(String url, LocalizableMessage msg, Throwable rootCause) |
| | | { |
| | | super(msg, rootCause); |
| | | this.url = url; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.io.IOException; |
| | | import java.lang.reflect.InvocationTargetException; |
| | |
| | | if (browser == null) |
| | | { |
| | | throw new WebBrowserException(url, // TODO: i18n |
| | | Message.raw("Could not find web browser"), |
| | | LocalizableMessage.raw("Could not find web browser"), |
| | | null); |
| | | } else |
| | | { |
| | |
| | | } catch (ClassNotFoundException cnfe) |
| | | { |
| | | throw new WebBrowserException(url, // TODO: i18n |
| | | Message.raw("Class Not Found Exception"), cnfe); |
| | | LocalizableMessage.raw("Class Not Found Exception"), cnfe); |
| | | } catch (IOException ioe) |
| | | { |
| | | throw new WebBrowserException(url, // TODO: i18n |
| | | Message.raw("IO Exception"), ioe); |
| | | LocalizableMessage.raw("IO Exception"), ioe); |
| | | } catch (InterruptedException ie) |
| | | { |
| | | throw new WebBrowserException(url, // TODO: i18n |
| | | Message.raw("Interrupted Exception"), ie); |
| | | LocalizableMessage.raw("Interrupted Exception"), ie); |
| | | } catch (NoSuchMethodException nsme) |
| | | { |
| | | throw new WebBrowserException(url, // TODO: i18n |
| | | Message.raw("No Such Method Exception"), nsme); |
| | | LocalizableMessage.raw("No Such Method Exception"), nsme); |
| | | } catch (InvocationTargetException ite) |
| | | { |
| | | throw new WebBrowserException(url, // TODO: i18n |
| | | Message.raw("Invocation Target Exception"), ite); |
| | | LocalizableMessage.raw("Invocation Target Exception"), ite); |
| | | } catch (IllegalAccessException iae) |
| | | { |
| | | throw new WebBrowserException(url, // TODO: i18n |
| | | Message.raw("Illegal Access Exception"), iae); |
| | | LocalizableMessage.raw("Illegal Access Exception"), iae); |
| | | } |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import org.opends.quicksetup.ApplicationException; |
| | |
| | | ratioBeforeCompleted, ratioWhenCompleted, permissions); |
| | | |
| | | } catch (IOException ioe) { |
| | | Message errorMsg = |
| | | LocalizableMessage errorMsg = |
| | | Utils.getThrowableMsg( |
| | | INFO_ERROR_COPYING.get(entry.getName()), ioe); |
| | | |
| | |
| | | } |
| | | |
| | | } catch (IOException ioe) { |
| | | Message errorMsg = |
| | | LocalizableMessage errorMsg = |
| | | Utils.getThrowableMsg( |
| | | INFO_ERROR_ZIP_STREAM.get(zipFileName), ioe); |
| | | throw new ApplicationException( |
| | |
| | | throws IOException |
| | | { |
| | | if (application != null) { |
| | | Message progressSummary = |
| | | LocalizableMessage progressSummary = |
| | | INFO_PROGRESS_EXTRACTING.get(Utils.getPath(destination)); |
| | | if (application.isVerbose()) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.webstart; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.io.IOException; |
| | | import java.net.MalformedURLException; |
| | |
| | | |
| | | private Status status = Status.DOWNLOADING; |
| | | |
| | | private Message summary = null; |
| | | private LocalizableMessage summary = null; |
| | | |
| | | /** |
| | | * This enumeration contains the different Status on which |
| | |
| | | * Gets a summary message of the downloader's current progress. |
| | | * @return String for showing the user progress |
| | | */ |
| | | public Message getSummary() { |
| | | public LocalizableMessage getSummary() { |
| | | return this.summary; |
| | | } |
| | | |
| | |
| | | * Sets a summary message of the downloader's current progress. |
| | | * @param summary String for showing the user progress |
| | | */ |
| | | public void setSummary(Message summary) { |
| | | public void setSummary(LocalizableMessage summary) { |
| | | this.summary = summary; |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | import java.util.Set; |
| | | |
| | | import java.util.Vector; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.DefinitionDecodingException.Reason; |
| | | |
| | | |
| | |
| | | * If this managed object definition is the |
| | | * {@link TopCfgDefn}. |
| | | */ |
| | | public final Message getDescription() throws UnsupportedOperationException { |
| | | public final LocalizableMessage getDescription() throws UnsupportedOperationException { |
| | | return getDescription(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * If this managed object definition is the |
| | | * {@link TopCfgDefn}. |
| | | */ |
| | | public final Message getDescription(Locale locale) |
| | | public final LocalizableMessage getDescription(Locale locale) |
| | | throws UnsupportedOperationException { |
| | | try { |
| | | return ManagedObjectDefinitionI18NResource.getInstance() |
| | |
| | | * If this managed object definition is the |
| | | * {@link TopCfgDefn}. |
| | | */ |
| | | public final Message getSynopsis() throws UnsupportedOperationException { |
| | | public final LocalizableMessage getSynopsis() throws UnsupportedOperationException { |
| | | return getSynopsis(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * If this managed object definition is the |
| | | * {@link TopCfgDefn}. |
| | | */ |
| | | public final Message getSynopsis(Locale locale) |
| | | public final LocalizableMessage getSynopsis(Locale locale) |
| | | throws UnsupportedOperationException { |
| | | return ManagedObjectDefinitionI18NResource.getInstance() |
| | | .getMessage(this, "synopsis", locale); |
| | |
| | | * If this managed object definition is the |
| | | * {@link TopCfgDefn}. |
| | | */ |
| | | public final Message getUserFriendlyName() |
| | | public final LocalizableMessage getUserFriendlyName() |
| | | throws UnsupportedOperationException { |
| | | return getUserFriendlyName(Locale.getDefault()); |
| | | } |
| | |
| | | * If this managed object definition is the |
| | | * {@link TopCfgDefn}. |
| | | */ |
| | | public final Message getUserFriendlyName(Locale locale) |
| | | public final LocalizableMessage getUserFriendlyName(Locale locale) |
| | | throws UnsupportedOperationException { |
| | | // TODO: have admin framework getMessage return a Message |
| | | return Message.raw(ManagedObjectDefinitionI18NResource.getInstance() |
| | | // TODO: have admin framework getMessage return a LocalizableMessage |
| | | return LocalizableMessage.raw(ManagedObjectDefinitionI18NResource.getInstance() |
| | | .getMessage(this, "user-friendly-name", locale)); |
| | | } |
| | | |
| | |
| | | * If this managed object definition is the |
| | | * {@link TopCfgDefn}. |
| | | */ |
| | | public final Message getUserFriendlyPluralName() |
| | | public final LocalizableMessage getUserFriendlyPluralName() |
| | | throws UnsupportedOperationException { |
| | | return getUserFriendlyPluralName(Locale.getDefault()); |
| | | } |
| | |
| | | * If this managed object definition is the |
| | | * {@link TopCfgDefn}. |
| | | */ |
| | | public final Message getUserFriendlyPluralName(Locale locale) |
| | | public final LocalizableMessage getUserFriendlyPluralName(Locale locale) |
| | | throws UnsupportedOperationException { |
| | | return ManagedObjectDefinitionI18NResource.getInstance() |
| | | .getMessage(this, "user-friendly-plural-name", locale); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | | |
| | | |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | |
| | | * @param cause |
| | | * The cause. |
| | | */ |
| | | protected AdminException(Message message, Throwable cause) { |
| | | protected AdminException(LocalizableMessage message, Throwable cause) { |
| | | super(message, cause); |
| | | } |
| | | |
| | |
| | | * @param message |
| | | * The message. |
| | | */ |
| | | protected AdminException(Message message) { |
| | | protected AdminException(LocalizableMessage message) { |
| | | super(message); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.messages.AdminMessages.*; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileWriter; |
| | | import java.io.PrintWriter; |
| | |
| | | import java.util.List; |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | |
| | | import javax.naming.ldap.Rdn; |
| | | |
| | | import org.forgerock.opendj.ldap.AddressMask; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.admin.server.ServerManagementContext; |
| | | import org.opends.server.admin.std.meta.LDAPConnectionHandlerCfgDefn. |
| | |
| | | */ |
| | | public boolean isConfigurationChangeAcceptable( |
| | | AdministrationConnectorCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | LDAPConnectionHandlerCfg cfg = new FakeLDAPConnectionHandlerCfg( |
| | | configuration); |
| | |
| | | AdministrationConnectorCfg configuration) |
| | | { |
| | | return new ConfigChangeResult(ResultCode.SUCCESS, true, |
| | | new ArrayList<Message>()); |
| | | new ArrayList<LocalizableMessage>()); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | err += pinFilePath + " "; |
| | | } |
| | | Message message = ERR_ADMIN_CERTIFICATE_GENERATION_MISSING_FILES |
| | | LocalizableMessage message = ERR_ADMIN_CERTIFICATE_GENERATION_MISSING_FILES |
| | | .get(err); |
| | | logError(message); |
| | | throw new InitializationException(message); |
| | |
| | | new FilePermission(0600))) |
| | | { |
| | | // Log a warning that the permissions were not set. |
| | | Message message = WARN_ADMIN_SET_PERMISSIONS_FAILED |
| | | LocalizableMessage message = WARN_ADMIN_SET_PERMISSIONS_FAILED |
| | | .get(pinFilePath); |
| | | ErrorLogger.logError(message); |
| | | } |
| | |
| | | catch (DirectoryException e) |
| | | { |
| | | // Log a warning that the permissions were not set. |
| | | Message message = WARN_ADMIN_SET_PERMISSIONS_FAILED.get(pinFilePath); |
| | | LocalizableMessage message = WARN_ADMIN_SET_PERMISSIONS_FAILED.get(pinFilePath); |
| | | ErrorLogger.logError(message); |
| | | } |
| | | } |
| | |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | Message message = ERR_ADMIN_CERTIFICATE_GENERATION.get(e.getMessage()); |
| | | LocalizableMessage message = ERR_ADMIN_CERTIFICATE_GENERATION.get(e.getMessage()); |
| | | logError(message); |
| | | throw new InitializationException(message); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * default locale, or <code>null</code> if there is no |
| | | * synopsis defined. |
| | | */ |
| | | public final Message getSynopsis() { |
| | | public final LocalizableMessage getSynopsis() { |
| | | return getSynopsis(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * specified locale, or <code>null</code> if there is no |
| | | * synopsis defined. |
| | | */ |
| | | public final Message getSynopsis(Locale locale) { |
| | | public final LocalizableMessage getSynopsis(Locale locale) { |
| | | ManagedObjectDefinitionI18NResource resource = |
| | | ManagedObjectDefinitionI18NResource.getInstance(); |
| | | String property = "property." + propertyName |
| | |
| | | import java.util.MissingResourceException; |
| | | import java.util.SortedSet; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.client.AuthorizationException; |
| | | import org.opends.server.admin.client.ClientConstraintHandler; |
| | | import org.opends.server.admin.client.CommunicationException; |
| | |
| | | |
| | | // The error message which should be returned if an attempt is |
| | | // made to disable the referenced component. |
| | | private final Message message; |
| | | private final LocalizableMessage message; |
| | | |
| | | // The path of the referenced component. |
| | | private final ManagedObjectPath<C, S> path; |
| | |
| | | |
| | | // Creates a new referential integrity delete listener. |
| | | private ReferentialIntegrityChangeListener(ManagedObjectPath<C, S> path, |
| | | Message message) { |
| | | LocalizableMessage message) { |
| | | this.path = path; |
| | | this.message = message; |
| | | } |
| | |
| | | */ |
| | | public boolean isConfigurationChangeAcceptable( |
| | | ServerManagedObject<? extends S> mo, |
| | | List<Message> unacceptableReasons) { |
| | | List<LocalizableMessage> unacceptableReasons) { |
| | | // Always prevent the referenced component from being |
| | | // disabled. |
| | | try { |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | Message message = ERR_REFINT_UNABLE_TO_EVALUATE_TARGET_CONDITION.get(mo |
| | | LocalizableMessage message = ERR_REFINT_UNABLE_TO_EVALUATE_TARGET_CONDITION.get(mo |
| | | .getManagedObjectDefinition().getUserFriendlyName(), String |
| | | .valueOf(mo.getDN()), StaticUtils.getExceptionMessage(e)); |
| | | ErrorLogger.logError(message); |
| | |
| | | |
| | | // The error message which should be returned if an attempt is |
| | | // made to delete the referenced component. |
| | | private final Message message; |
| | | private final LocalizableMessage message; |
| | | |
| | | |
| | | |
| | | // Creates a new referential integrity delete listener. |
| | | private ReferentialIntegrityDeleteListener(DN dn, Message message) { |
| | | private ReferentialIntegrityDeleteListener(DN dn, LocalizableMessage message) { |
| | | this.dn = dn; |
| | | this.message = message; |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean isConfigurationDeleteAcceptable(S configuration, |
| | | List<Message> unacceptableReasons) { |
| | | List<LocalizableMessage> unacceptableReasons) { |
| | | if (configuration.dn().equals(dn)) { |
| | | // Always prevent deletion of the referenced component. |
| | | unacceptableReasons.add(message); |
| | |
| | | */ |
| | | @Override |
| | | public boolean isUsable(ServerManagedObject<?> managedObject, |
| | | Collection<Message> unacceptableReasons) throws ConfigException { |
| | | Collection<LocalizableMessage> unacceptableReasons) throws ConfigException { |
| | | SortedSet<String> names = managedObject |
| | | .getPropertyValues(AggregationPropertyDefinition.this); |
| | | ServerManagementContext context = ServerManagementContext.getInstance(); |
| | | Message thisUFN = managedObject.getManagedObjectDefinition() |
| | | LocalizableMessage thisUFN = managedObject.getManagedObjectDefinition() |
| | | .getUserFriendlyName(); |
| | | String thisDN = managedObject.getDN().toString(); |
| | | Message thatUFN = getRelationDefinition().getUserFriendlyName(); |
| | | LocalizableMessage thatUFN = getRelationDefinition().getUserFriendlyName(); |
| | | |
| | | boolean isUsable = true; |
| | | boolean needsEnabling = targetNeedsEnablingCondition |
| | |
| | | String thatDN = path.toDN().toString(); |
| | | |
| | | if (!context.managedObjectExists(path)) { |
| | | Message msg = ERR_SERVER_REFINT_DANGLING_REFERENCE.get(name, |
| | | LocalizableMessage msg = ERR_SERVER_REFINT_DANGLING_REFERENCE.get(name, |
| | | getName(), thisUFN, thisDN, thatUFN, thatDN); |
| | | unacceptableReasons.add(msg); |
| | | isUsable = false; |
| | |
| | | // required. |
| | | ServerManagedObject<? extends S> ref = context.getManagedObject(path); |
| | | if (!targetIsEnabledCondition.evaluate(ref)) { |
| | | Message msg = ERR_SERVER_REFINT_TARGET_DISABLED.get(name, |
| | | LocalizableMessage msg = ERR_SERVER_REFINT_TARGET_DISABLED.get(name, |
| | | getName(), thisUFN, thisDN, thatUFN, thatDN); |
| | | unacceptableReasons.add(msg); |
| | | isUsable = false; |
| | |
| | | |
| | | // Add change and delete listeners against all referenced |
| | | // components. |
| | | Message thisUFN = managedObject.getManagedObjectDefinition() |
| | | LocalizableMessage thisUFN = managedObject.getManagedObjectDefinition() |
| | | .getUserFriendlyName(); |
| | | String thisDN = managedObject.getDN().toString(); |
| | | Message thatUFN = getRelationDefinition().getUserFriendlyName(); |
| | | LocalizableMessage thatUFN = getRelationDefinition().getUserFriendlyName(); |
| | | |
| | | // Referenced managed objects will only need a change listener |
| | | // if they have can be disabled. |
| | |
| | | String thatDN = dn.toString(); |
| | | |
| | | // Register the delete listener. |
| | | Message msg = ERR_SERVER_REFINT_CANNOT_DELETE.get(thatUFN, thatDN, |
| | | LocalizableMessage msg = ERR_SERVER_REFINT_CANNOT_DELETE.get(thatUFN, thatDN, |
| | | getName(), thisUFN, thisDN); |
| | | ReferentialIntegrityDeleteListener dl = |
| | | new ReferentialIntegrityDeleteListener(dn, msg); |
| | |
| | | */ |
| | | @Override |
| | | public boolean isAddAcceptable(ManagementContext context, |
| | | ManagedObject<?> managedObject, Collection<Message> unacceptableReasons) |
| | | ManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons) |
| | | throws AuthorizationException, CommunicationException { |
| | | // If all of this managed object's "enabled" properties are true |
| | | // then any referenced managed objects must also be enabled. |
| | |
| | | // Check the referenced managed objects exist and, if required, |
| | | // are enabled. |
| | | boolean isAcceptable = true; |
| | | Message ufn = getRelationDefinition().getUserFriendlyName(); |
| | | LocalizableMessage ufn = getRelationDefinition().getUserFriendlyName(); |
| | | for (String name : managedObject |
| | | .getPropertyValues(AggregationPropertyDefinition.this)) { |
| | | // Retrieve the referenced managed object and make sure it |
| | |
| | | try { |
| | | ref = context.getManagedObject(path); |
| | | } catch (DefinitionDecodingException e) { |
| | | Message msg = ERR_CLIENT_REFINT_TARGET_INVALID.get(ufn, name, |
| | | LocalizableMessage msg = ERR_CLIENT_REFINT_TARGET_INVALID.get(ufn, name, |
| | | getName(), e.getMessageObject()); |
| | | unacceptableReasons.add(msg); |
| | | isAcceptable = false; |
| | | continue; |
| | | } catch (ManagedObjectDecodingException e) { |
| | | Message msg = ERR_CLIENT_REFINT_TARGET_INVALID.get(ufn, name, |
| | | LocalizableMessage msg = ERR_CLIENT_REFINT_TARGET_INVALID.get(ufn, name, |
| | | getName(), e.getMessageObject()); |
| | | unacceptableReasons.add(msg); |
| | | isAcceptable = false; |
| | | continue; |
| | | } catch (ManagedObjectNotFoundException e) { |
| | | Message msg = ERR_CLIENT_REFINT_TARGET_DANGLING_REFERENCE.get(ufn, |
| | | LocalizableMessage msg = ERR_CLIENT_REFINT_TARGET_DANGLING_REFERENCE.get(ufn, |
| | | name, getName()); |
| | | unacceptableReasons.add(msg); |
| | | isAcceptable = false; |
| | |
| | | // Make sure the reference managed object is enabled. |
| | | if (needsEnabling) { |
| | | if (!targetIsEnabledCondition.evaluate(context, ref)) { |
| | | Message msg = ERR_CLIENT_REFINT_TARGET_DISABLED.get(ufn, name, |
| | | LocalizableMessage msg = ERR_CLIENT_REFINT_TARGET_DISABLED.get(ufn, name, |
| | | getName()); |
| | | unacceptableReasons.add(msg); |
| | | isAcceptable = false; |
| | |
| | | */ |
| | | @Override |
| | | public boolean isModifyAcceptable(ManagementContext context, |
| | | ManagedObject<?> managedObject, Collection<Message> unacceptableReasons) |
| | | ManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons) |
| | | throws AuthorizationException, CommunicationException { |
| | | // The same constraint applies as for adds. |
| | | return isAddAcceptable(context, managedObject, unacceptableReasons); |
| | |
| | | */ |
| | | @Override |
| | | public boolean isDeleteAcceptable(ManagementContext context, |
| | | ManagedObjectPath<?, ?> path, Collection<Message> unacceptableReasons) |
| | | ManagedObjectPath<?, ?> path, Collection<LocalizableMessage> unacceptableReasons) |
| | | throws AuthorizationException, CommunicationException { |
| | | // Any references to the deleted managed object should cause a |
| | | // constraint violation. |
| | |
| | | getManagedObjectDefinition(), path.getName())) { |
| | | String name = mo.getManagedObjectPath().getName(); |
| | | if (name == null) { |
| | | Message msg = ERR_CLIENT_REFINT_CANNOT_DELETE_WITHOUT_NAME.get( |
| | | LocalizableMessage msg = ERR_CLIENT_REFINT_CANNOT_DELETE_WITHOUT_NAME.get( |
| | | getName(), mo.getManagedObjectDefinition().getUserFriendlyName(), |
| | | getManagedObjectDefinition().getUserFriendlyName()); |
| | | unacceptableReasons.add(msg); |
| | | } else { |
| | | Message msg = ERR_CLIENT_REFINT_CANNOT_DELETE_WITH_NAME.get( |
| | | LocalizableMessage msg = ERR_CLIENT_REFINT_CANNOT_DELETE_WITH_NAME.get( |
| | | getName(), mo.getManagedObjectDefinition().getUserFriendlyName(), |
| | | name, getManagedObjectDefinition().getUserFriendlyName()); |
| | | unacceptableReasons.add(msg); |
| | |
| | | */ |
| | | @Override |
| | | public boolean isModifyAcceptable(ManagementContext context, |
| | | ManagedObject<?> managedObject, Collection<Message> unacceptableReasons) |
| | | ManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons) |
| | | throws AuthorizationException, CommunicationException { |
| | | // If the modified managed object is disabled and there are some |
| | | // active references then refuse the change. |
| | |
| | | if (targetNeedsEnablingCondition.evaluate(context, mo)) { |
| | | String name = mo.getManagedObjectPath().getName(); |
| | | if (name == null) { |
| | | Message msg = ERR_CLIENT_REFINT_CANNOT_DISABLE_WITHOUT_NAME.get( |
| | | LocalizableMessage msg = ERR_CLIENT_REFINT_CANNOT_DISABLE_WITHOUT_NAME.get( |
| | | managedObject.getManagedObjectDefinition() |
| | | .getUserFriendlyName(), getName(), mo |
| | | .getManagedObjectDefinition().getUserFriendlyName()); |
| | | unacceptableReasons.add(msg); |
| | | } else { |
| | | Message msg = ERR_CLIENT_REFINT_CANNOT_DISABLE_WITH_NAME.get( |
| | | LocalizableMessage msg = ERR_CLIENT_REFINT_CANNOT_DISABLE_WITH_NAME.get( |
| | | managedObject.getManagedObjectDefinition() |
| | | .getUserFriendlyName(), getName(), mo |
| | | .getManagedObjectDefinition().getUserFriendlyName(), name); |
| | |
| | | * aggregation property definition in the default locale, or |
| | | * <code>null</code> if there is no constraint synopsis. |
| | | */ |
| | | public final Message getSourceConstraintSynopsis() { |
| | | public final LocalizableMessage getSourceConstraintSynopsis() { |
| | | return getSourceConstraintSynopsis(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * or <code>null</code> if there is no constraint |
| | | * synopsis. |
| | | */ |
| | | public final Message getSourceConstraintSynopsis(Locale locale) { |
| | | public final LocalizableMessage getSourceConstraintSynopsis(Locale locale) { |
| | | ManagedObjectDefinitionI18NResource resource = |
| | | ManagedObjectDefinitionI18NResource.getInstance(); |
| | | String property = "property." + getName() |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.util.Locale; |
| | | |
| | |
| | | * @return Returns the synopsis of this alias default behavior in |
| | | * the default locale. |
| | | */ |
| | | public final Message getSynopsis() { |
| | | public final LocalizableMessage getSynopsis() { |
| | | return getSynopsis(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * @return Returns the synopsis of this alias default behavior in |
| | | * the specified locale. |
| | | */ |
| | | public final Message getSynopsis(Locale locale) { |
| | | public final LocalizableMessage getSynopsis(Locale locale) { |
| | | ManagedObjectDefinitionI18NResource resource = |
| | | ManagedObjectDefinitionI18NResource.getInstance(); |
| | | String property = "property." + propertyName |
| | |
| | | import java.util.jar.JarFile; |
| | | import java.util.jar.Manifest; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.meta.RootCfgDefn; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | Message message = ERR_ADMIN_CANNOT_OPEN_JAR_FILE. |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_OPEN_JAR_FILE. |
| | | get(extension.getName(), extension.getParent(), |
| | | stackTraceToSingleLineString(e)); |
| | | throw new InitializationException(message); |
| | |
| | | if (!extensionsPath.exists()) { |
| | | // The extensions directory does not exist. This is not a |
| | | // critical problem. |
| | | Message message = ERR_ADMIN_NO_EXTENSIONS_DIR.get( |
| | | LocalizableMessage message = ERR_ADMIN_NO_EXTENSIONS_DIR.get( |
| | | String.valueOf(extensionsPath)); |
| | | logError(message); |
| | | return; |
| | |
| | | if (!extensionsPath.isDirectory()) { |
| | | // The extensions directory is not a directory. This is more |
| | | // critical. |
| | | Message message = |
| | | LocalizableMessage message = |
| | | ERR_ADMIN_EXTENSIONS_DIR_NOT_DIRECTORY.get( |
| | | String.valueOf(extensionsPath)); |
| | | throw new InitializationException(message); |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | Message message = ERR_ADMIN_EXTENSIONS_CANNOT_LIST_FILES.get( |
| | | LocalizableMessage message = ERR_ADMIN_EXTENSIONS_CANNOT_LIST_FILES.get( |
| | | String.valueOf(extensionsPath), stackTraceToSingleLineString(e)); |
| | | throw new InitializationException(message, e); |
| | | } |
| | |
| | | + CORE_MANIFEST); |
| | | |
| | | if (is == null) { |
| | | Message message = ERR_ADMIN_CANNOT_FIND_CORE_MANIFEST.get(CORE_MANIFEST); |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_FIND_CORE_MANIFEST.get(CORE_MANIFEST); |
| | | throw new InitializationException(message); |
| | | } |
| | | |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | Message message = ERR_CLASS_LOADER_CANNOT_LOAD_CORE.get(CORE_MANIFEST, |
| | | LocalizableMessage message = ERR_CLASS_LOADER_CANNOT_LOAD_CORE.get(CORE_MANIFEST, |
| | | stackTraceToSingleLineString(e)); |
| | | throw new InitializationException(message); |
| | | } |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | Message message = ERR_ADMIN_CANNOT_READ_EXTENSION_MANIFEST.get( |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_READ_EXTENSION_MANIFEST.get( |
| | | EXTENSION_MANIFEST, jarFile.getName(), |
| | | stackTraceToSingleLineString(e)); |
| | | throw new InitializationException(message); |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | Message message = ERR_CLASS_LOADER_CANNOT_LOAD_EXTENSION.get(jarFile |
| | | LocalizableMessage message = ERR_CLASS_LOADER_CANNOT_LOAD_EXTENSION.get(jarFile |
| | | .getName(), EXTENSION_MANIFEST, stackTraceToSingleLineString(e)); |
| | | throw new InitializationException(message); |
| | | } |
| | |
| | | try { |
| | | className = reader.readLine(); |
| | | } catch (IOException e) { |
| | | Message msg = ERR_CLASS_LOADER_CANNOT_READ_MANIFEST_FILE.get(String |
| | | LocalizableMessage msg = ERR_CLASS_LOADER_CANNOT_READ_MANIFEST_FILE.get(String |
| | | .valueOf(e.getMessage())); |
| | | throw new InitializationException(msg, e); |
| | | } |
| | |
| | | try { |
| | | theClass = Class.forName(className, true, loader); |
| | | } catch (Exception e) { |
| | | Message msg = ERR_CLASS_LOADER_CANNOT_LOAD_CLASS.get(className, String |
| | | LocalizableMessage msg = ERR_CLASS_LOADER_CANNOT_LOAD_CLASS.get(className, String |
| | | .valueOf(e.getMessage())); |
| | | throw new InitializationException(msg, e); |
| | | } |
| | |
| | | try { |
| | | method = theClass.getMethod("getInstance"); |
| | | } catch (Exception e) { |
| | | Message msg = ERR_CLASS_LOADER_CANNOT_FIND_GET_INSTANCE_METHOD.get( |
| | | LocalizableMessage msg = ERR_CLASS_LOADER_CANNOT_FIND_GET_INSTANCE_METHOD.get( |
| | | className, String.valueOf(e.getMessage())); |
| | | throw new InitializationException(msg, e); |
| | | } |
| | |
| | | try { |
| | | d = (AbstractManagedObjectDefinition<?, ?>) method.invoke(null); |
| | | } catch (Exception e) { |
| | | Message msg = ERR_CLASS_LOADER_CANNOT_INVOKE_GET_INSTANCE_METHOD.get( |
| | | LocalizableMessage msg = ERR_CLASS_LOADER_CANNOT_INVOKE_GET_INSTANCE_METHOD.get( |
| | | className, String.valueOf(e.getMessage())); |
| | | throw new InitializationException(msg, e); |
| | | } |
| | |
| | | try { |
| | | d.initialize(); |
| | | } catch (Exception e) { |
| | | Message msg = ERR_CLASS_LOADER_CANNOT_INITIALIZE_DEFN.get(d.getName(), |
| | | LocalizableMessage msg = ERR_CLASS_LOADER_CANNOT_INITIALIZE_DEFN.get(d.getName(), |
| | | d.getClass().getName(), String.valueOf(e.getMessage())); |
| | | throw new InitializationException(msg, e); |
| | | } |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | Message message = ERR_ADMIN_CANNOT_OPEN_JAR_FILE.get( |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_OPEN_JAR_FILE.get( |
| | | jar.getName(), jar.getParent(), stackTraceToSingleLineString(e)); |
| | | throw new InitializationException(message); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | | |
| | | |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * @param message |
| | | * The message. |
| | | */ |
| | | protected DecodingException(Message message) { |
| | | protected DecodingException(LocalizableMessage message) { |
| | | super(message); |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | // Create the message. |
| | | private static Message createMessage(AbstractManagedObjectDefinition<?, ?> d, |
| | | private static LocalizableMessage createMessage(AbstractManagedObjectDefinition<?, ?> d, |
| | | Reason reason) { |
| | | Message ufn = d.getUserFriendlyName(); |
| | | LocalizableMessage ufn = d.getUserFriendlyName(); |
| | | switch (reason) { |
| | | case NO_TYPE_INFORMATION: |
| | | return ERR_DECODING_EXCEPTION_NO_TYPE_INFO.get(ufn); |
| | |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * of this enumeration property definition in the default |
| | | * locale. |
| | | */ |
| | | public final Message getValueSynopsis(E value) { |
| | | public final LocalizableMessage getValueSynopsis(E value) { |
| | | return getValueSynopsis(Locale.getDefault(), value); |
| | | } |
| | | |
| | |
| | | * of this enumeration property definition in the specified |
| | | * locale. |
| | | */ |
| | | public final Message getValueSynopsis(Locale locale, E value) { |
| | | public final LocalizableMessage getValueSynopsis(Locale locale, E value) { |
| | | ManagedObjectDefinitionI18NResource resource = |
| | | ManagedObjectDefinitionI18NResource.getInstance(); |
| | | String property = "property." + getName() |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | |
| | | import java.util.Collections; |
| | | import java.util.Locale; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.client.AuthorizationException; |
| | | import org.opends.server.admin.client.ClientConstraintHandler; |
| | | import org.opends.server.admin.client.CommunicationException; |
| | |
| | | */ |
| | | @Override |
| | | public boolean isAddAcceptable(ManagementContext context, |
| | | ManagedObject<?> managedObject, Collection<Message> unacceptableReasons) |
| | | ManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons) |
| | | throws AuthorizationException, CommunicationException { |
| | | if (!condition.evaluate(context, managedObject)) { |
| | | unacceptableReasons.add(getSynopsis()); |
| | |
| | | */ |
| | | @Override |
| | | public boolean isModifyAcceptable(ManagementContext context, |
| | | ManagedObject<?> managedObject, Collection<Message> unacceptableReasons) |
| | | ManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons) |
| | | throws AuthorizationException, CommunicationException { |
| | | if (!condition.evaluate(context, managedObject)) { |
| | | unacceptableReasons.add(getSynopsis()); |
| | |
| | | */ |
| | | @Override |
| | | public boolean isUsable(ServerManagedObject<?> managedObject, |
| | | Collection<Message> unacceptableReasons) throws ConfigException { |
| | | Collection<LocalizableMessage> unacceptableReasons) throws ConfigException { |
| | | if (!condition.evaluate(managedObject)) { |
| | | unacceptableReasons.add(getSynopsis()); |
| | | return false; |
| | |
| | | * @return Returns the synopsis of this constraint in the default |
| | | * locale. |
| | | */ |
| | | public final Message getSynopsis() { |
| | | public final LocalizableMessage getSynopsis() { |
| | | return getSynopsis(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * @return Returns the synopsis of this constraint in the specified |
| | | * locale. |
| | | */ |
| | | public final Message getSynopsis(Locale locale) { |
| | | public final LocalizableMessage getSynopsis(Locale locale) { |
| | | ManagedObjectDefinitionI18NResource resource = |
| | | ManagedObjectDefinitionI18NResource.getInstance(); |
| | | String property = "constraint." + id + ".synopsis"; |
| | |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * @return Returns the user friendly plural name of this relation |
| | | * definition in the default locale. |
| | | */ |
| | | public Message getUserFriendlyPluralName() { |
| | | public LocalizableMessage getUserFriendlyPluralName() { |
| | | return getUserFriendlyPluralName(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * @return Returns the user friendly plural name of this relation |
| | | * definition in the specified locale. |
| | | */ |
| | | public Message getUserFriendlyPluralName(Locale locale) { |
| | | public LocalizableMessage getUserFriendlyPluralName(Locale locale) { |
| | | String property = "relation." + getName() + ".user-friendly-plural-name"; |
| | | return ManagedObjectDefinitionI18NResource.getInstance().getMessage( |
| | | getParentDefinition(), property, locale); |
| | |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * definition in the default locale, or <code>null</code> |
| | | * if there is no unit synopsis. |
| | | */ |
| | | public Message getUnitSynopsis() { |
| | | public LocalizableMessage getUnitSynopsis() { |
| | | return getUnitSynopsis(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * definition in the specified locale, or <code>null</code> |
| | | * if there is no unit synopsis. |
| | | */ |
| | | public Message getUnitSynopsis(Locale locale) { |
| | | public LocalizableMessage getUnitSynopsis(Locale locale) { |
| | | ManagedObjectDefinitionI18NResource resource = |
| | | ManagedObjectDefinitionI18NResource.getInstance(); |
| | | String property = "property." + getName() + ".syntax.integer.unit-synopsis"; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * If the provided managed object definition was the |
| | | * {@link TopCfgDefn}. |
| | | */ |
| | | public Message getMessage(AbstractManagedObjectDefinition<?, ?> d, String key) |
| | | public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key) |
| | | throws MissingResourceException, UnsupportedOperationException { |
| | | return getMessage(d, key, Locale.getDefault(), (String[]) null); |
| | | } |
| | |
| | | * If the provided managed object definition was the |
| | | * {@link TopCfgDefn}. |
| | | */ |
| | | public Message getMessage(AbstractManagedObjectDefinition<?, ?> d, |
| | | public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, |
| | | String key, Locale locale) throws MissingResourceException, |
| | | UnsupportedOperationException { |
| | | return getMessage(d, key, locale, (String[]) null); |
| | |
| | | * If the provided managed object definition was the |
| | | * {@link TopCfgDefn}. |
| | | */ |
| | | public Message getMessage(AbstractManagedObjectDefinition<?, ?> d, |
| | | public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, |
| | | String key, Locale locale, String... args) |
| | | throws MissingResourceException, UnsupportedOperationException { |
| | | ResourceBundle resource = getResourceBundle(d, locale); |
| | | |
| | | // TODO: use message framework directly |
| | | if (args == null) { |
| | | return Message.raw(resource.getString(key)); |
| | | return LocalizableMessage.raw(resource.getString(key)); |
| | | } else { |
| | | MessageFormat mf = new MessageFormat(resource.getString(key)); |
| | | return Message.raw(mf.format(args)); |
| | | return LocalizableMessage.raw(mf.format(args)); |
| | | } |
| | | } |
| | | |
| | |
| | | * If the provided managed object definition was the |
| | | * {@link TopCfgDefn}. |
| | | */ |
| | | public Message getMessage(AbstractManagedObjectDefinition<?, ?> d, |
| | | public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, |
| | | String key, String... args) throws MissingResourceException, |
| | | UnsupportedOperationException { |
| | | return getMessage(d, key, Locale.getDefault(), args); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | | |
| | | |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * @param cause |
| | | * The cause. |
| | | */ |
| | | protected OperationsException(Message message, Throwable cause) { |
| | | protected OperationsException(LocalizableMessage message, Throwable cause) { |
| | | super(message, cause); |
| | | } |
| | | |
| | |
| | | * @param message |
| | | * The message. |
| | | */ |
| | | protected OperationsException(Message message) { |
| | | protected OperationsException(LocalizableMessage message) { |
| | | super(message); |
| | | } |
| | | } |
| | |
| | | import java.util.MissingResourceException; |
| | | import java.util.Set; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * the default locale, or <code>null</code> if there is no |
| | | * description. |
| | | */ |
| | | public final Message getDescription() { |
| | | public final LocalizableMessage getDescription() { |
| | | return getDescription(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * the specified locale, or <code>null</code> if there is |
| | | * no description. |
| | | */ |
| | | public final Message getDescription(Locale locale) { |
| | | public final LocalizableMessage getDescription(Locale locale) { |
| | | ManagedObjectDefinitionI18NResource resource = |
| | | ManagedObjectDefinitionI18NResource.getInstance(); |
| | | String property = "property." + propertyName + ".description"; |
| | |
| | | * @return Returns the synopsis of this property definition in the |
| | | * default locale. |
| | | */ |
| | | public final Message getSynopsis() { |
| | | public final LocalizableMessage getSynopsis() { |
| | | return getSynopsis(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * @return Returns the synopsis of this property definition in the |
| | | * specified locale. |
| | | */ |
| | | public final Message getSynopsis(Locale locale) { |
| | | public final LocalizableMessage getSynopsis(Locale locale) { |
| | | ManagedObjectDefinitionI18NResource resource = |
| | | ManagedObjectDefinitionI18NResource.getInstance(); |
| | | String property = "property." + propertyName + ".synopsis"; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | |
| | | import java.text.NumberFormat; |
| | |
| | | * Underlying implementation. |
| | | */ |
| | | private class MyPropertyDefinitionVisitor extends |
| | | PropertyDefinitionVisitor<Message, Void> { |
| | | PropertyDefinitionVisitor<LocalizableMessage, Void> { |
| | | |
| | | // Flag indicating whether detailed syntax information will be |
| | | // generated. |
| | |
| | | */ |
| | | @Override |
| | | public <C extends ConfigurationClient, S extends Configuration> |
| | | Message visitAggregation(AggregationPropertyDefinition<C, S> d, Void p) { |
| | | return Message.raw("NAME"); |
| | | LocalizableMessage visitAggregation(AggregationPropertyDefinition<C, S> d, Void p) { |
| | | return LocalizableMessage.raw("NAME"); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message visitAttributeType(AttributeTypePropertyDefinition d, |
| | | public LocalizableMessage visitAttributeType(AttributeTypePropertyDefinition d, |
| | | Void p) { |
| | | return Message.raw("OID"); |
| | | return LocalizableMessage.raw("OID"); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message visitACI(ACIPropertyDefinition d, |
| | | public LocalizableMessage visitACI(ACIPropertyDefinition d, |
| | | Void p) { |
| | | return Message.raw("ACI"); |
| | | return LocalizableMessage.raw("ACI"); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message visitBoolean(BooleanPropertyDefinition d, Void p) { |
| | | public LocalizableMessage visitBoolean(BooleanPropertyDefinition d, Void p) { |
| | | if (isDetailed) { |
| | | return Message.raw("false | true"); |
| | | return LocalizableMessage.raw("false | true"); |
| | | } else { |
| | | return Message.raw("BOOLEAN"); |
| | | return LocalizableMessage.raw("BOOLEAN"); |
| | | } |
| | | } |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message visitClass(ClassPropertyDefinition d, Void p) { |
| | | public LocalizableMessage visitClass(ClassPropertyDefinition d, Void p) { |
| | | if (isDetailed && !d.getInstanceOfInterface().isEmpty()) { |
| | | return Message.raw("CLASS <= " + d.getInstanceOfInterface().get(0)); |
| | | return LocalizableMessage.raw("CLASS <= " + d.getInstanceOfInterface().get(0)); |
| | | } else { |
| | | return Message.raw("CLASS"); |
| | | return LocalizableMessage.raw("CLASS"); |
| | | } |
| | | } |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message visitDN(DNPropertyDefinition d, Void p) { |
| | | public LocalizableMessage visitDN(DNPropertyDefinition d, Void p) { |
| | | if (isDetailed && d.getBaseDN() != null) { |
| | | return Message.raw("DN <= " + d.getBaseDN()); |
| | | return LocalizableMessage.raw("DN <= " + d.getBaseDN()); |
| | | } else { |
| | | return Message.raw("DN"); |
| | | return LocalizableMessage.raw("DN"); |
| | | } |
| | | } |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message visitDuration(DurationPropertyDefinition d, Void p) { |
| | | MessageBuilder builder = new MessageBuilder(); |
| | | public LocalizableMessage visitDuration(DurationPropertyDefinition d, Void p) { |
| | | LocalizableMessageBuilder builder = new LocalizableMessageBuilder(); |
| | | DurationUnit unit = d.getBaseUnit(); |
| | | |
| | | if (isDetailed && d.getLowerLimit() > 0) { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public <E extends Enum<E>> Message visitEnum(EnumPropertyDefinition<E> d, |
| | | public <E extends Enum<E>> LocalizableMessage visitEnum(EnumPropertyDefinition<E> d, |
| | | Void p) { |
| | | if (!isDetailed) { |
| | | // Use the last word in the property name. |
| | | String name = d.getName(); |
| | | int i = name.lastIndexOf('-'); |
| | | if (i == -1 || i == (name.length() - 1)) { |
| | | return Message.raw(name.toUpperCase()); |
| | | return LocalizableMessage.raw(name.toUpperCase()); |
| | | } else { |
| | | return Message.raw(name.substring(i + 1).toUpperCase()); |
| | | return LocalizableMessage.raw(name.substring(i + 1).toUpperCase()); |
| | | } |
| | | } else { |
| | | Set<String> values = new TreeSet<String>(); |
| | |
| | | } |
| | | |
| | | boolean isFirst = true; |
| | | MessageBuilder builder = new MessageBuilder(); |
| | | LocalizableMessageBuilder builder = new LocalizableMessageBuilder(); |
| | | for (String s : values) { |
| | | if (!isFirst) { |
| | | builder.append(" | "); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message visitInteger(IntegerPropertyDefinition d, Void p) { |
| | | MessageBuilder builder = new MessageBuilder(); |
| | | public LocalizableMessage visitInteger(IntegerPropertyDefinition d, Void p) { |
| | | LocalizableMessageBuilder builder = new LocalizableMessageBuilder(); |
| | | |
| | | if (isDetailed) { |
| | | builder.append(String.valueOf(d.getLowerLimit())); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message visitIPAddress(IPAddressPropertyDefinition d, Void p) { |
| | | return Message.raw("HOST_NAME"); |
| | | public LocalizableMessage visitIPAddress(IPAddressPropertyDefinition d, Void p) { |
| | | return LocalizableMessage.raw("HOST_NAME"); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message visitIPAddressMask(IPAddressMaskPropertyDefinition d, |
| | | public LocalizableMessage visitIPAddressMask(IPAddressMaskPropertyDefinition d, |
| | | Void p) { |
| | | return Message.raw("IP_ADDRESS_MASK"); |
| | | return LocalizableMessage.raw("IP_ADDRESS_MASK"); |
| | | } |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message visitSize(SizePropertyDefinition d, Void p) { |
| | | MessageBuilder builder = new MessageBuilder(); |
| | | public LocalizableMessage visitSize(SizePropertyDefinition d, Void p) { |
| | | LocalizableMessageBuilder builder = new LocalizableMessageBuilder(); |
| | | |
| | | if (isDetailed && d.getLowerLimit() > 0) { |
| | | SizeUnit unit = SizeUnit.getBestFitUnitExact(d.getLowerLimit()); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message visitString(StringPropertyDefinition d, Void p) { |
| | | public LocalizableMessage visitString(StringPropertyDefinition d, Void p) { |
| | | if (d.getPattern() != null) { |
| | | if (isDetailed) { |
| | | MessageBuilder builder = new MessageBuilder(); |
| | | LocalizableMessageBuilder builder = new LocalizableMessageBuilder(); |
| | | builder.append(d.getPatternUsage()); |
| | | builder.append(" - "); |
| | | builder.append(d.getPatternSynopsis()); |
| | | final LocalizableMessage synopsis = d.getPatternSynopsis(); |
| | | if (synopsis != null) |
| | | { |
| | | builder.append(synopsis); |
| | | } |
| | | return builder.toMessage(); |
| | | } else { |
| | | return Message.raw(d.getPatternUsage()); |
| | | return LocalizableMessage.raw(d.getPatternUsage()); |
| | | } |
| | | } else { |
| | | return Message.raw("STRING"); |
| | | return LocalizableMessage.raw("STRING"); |
| | | } |
| | | } |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public <T> Message visitUnknown(PropertyDefinition<T> d, Void p) |
| | | public <T> LocalizableMessage visitUnknown(PropertyDefinition<T> d, Void p) |
| | | throws PropertyException { |
| | | return Message.raw("?"); |
| | | return LocalizableMessage.raw("?"); |
| | | } |
| | | } |
| | | |
| | |
| | | * @return Returns the usage information for the provided property |
| | | * definition. |
| | | */ |
| | | public Message getUsage(PropertyDefinition<?> pd) { |
| | | public LocalizableMessage getUsage(PropertyDefinition<?> pd) { |
| | | return pd.accept(pimpl, null); |
| | | }; |
| | | |
| | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | // Create the message. |
| | | private static Message createMessage(PropertyDefinition<?> pd, Object value) |
| | | private static LocalizableMessage createMessage(PropertyDefinition<?> pd, Object value) |
| | | { |
| | | PropertyDefinitionUsageBuilder builder = new PropertyDefinitionUsageBuilder( |
| | | true); |
| | |
| | | |
| | | |
| | | |
| | | // Message that explains the problem. |
| | | private final Message message; |
| | | // LocalizableMessage that explains the problem. |
| | | private final LocalizableMessage message; |
| | | |
| | | /* |
| | | * The property definition associated with the property that caused the |
| | |
| | | |
| | | |
| | | |
| | | private PropertyException(PropertyDefinition<?> pd, Message message) |
| | | private PropertyException(PropertyDefinition<?> pd, LocalizableMessage message) |
| | | { |
| | | super(message.toString()); |
| | | this.message = message; |
| | |
| | | |
| | | |
| | | |
| | | private PropertyException(PropertyDefinition<?> pd, Message message, |
| | | private PropertyException(PropertyDefinition<?> pd, LocalizableMessage message, |
| | | Throwable cause) |
| | | { |
| | | super(message.toString(), cause); |
| | |
| | | * @return Returns the message describing the problem that occurred (never |
| | | * <code>null</code>). |
| | | */ |
| | | public Message getMessageObject() |
| | | public LocalizableMessage getMessageObject() |
| | | { |
| | | return message; |
| | | } |
| | |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * the default locale, or <code>null</code> if there is no |
| | | * description. |
| | | */ |
| | | public final Message getDescription() { |
| | | public final LocalizableMessage getDescription() { |
| | | return getDescription(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * the specified locale, or <code>null</code> if there is |
| | | * no description. |
| | | */ |
| | | public final Message getDescription(Locale locale) { |
| | | public final LocalizableMessage getDescription(Locale locale) { |
| | | try { |
| | | String property = "relation." + common.name + ".description"; |
| | | return ManagedObjectDefinitionI18NResource.getInstance().getMessage( |
| | |
| | | * @return Returns the synopsis of this relation definition in the |
| | | * default locale. |
| | | */ |
| | | public final Message getSynopsis() { |
| | | public final LocalizableMessage getSynopsis() { |
| | | return getSynopsis(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * @return Returns the synopsis of this relation definition in the |
| | | * specified locale. |
| | | */ |
| | | public final Message getSynopsis(Locale locale) { |
| | | public final LocalizableMessage getSynopsis(Locale locale) { |
| | | String property = "relation." + common.name + ".synopsis"; |
| | | return ManagedObjectDefinitionI18NResource.getInstance().getMessage( |
| | | getParentDefinition(), property, locale); |
| | |
| | | * @return Returns the user friendly name of this relation |
| | | * definition in the default locale. |
| | | */ |
| | | public final Message getUserFriendlyName() { |
| | | public final LocalizableMessage getUserFriendlyName() { |
| | | return getUserFriendlyName(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * @return Returns the user friendly name of this relation |
| | | * definition in the specified locale. |
| | | */ |
| | | public final Message getUserFriendlyName(Locale locale) { |
| | | public final LocalizableMessage getUserFriendlyName(Locale locale) { |
| | | String property = "relation." + common.name + ".user-friendly-name"; |
| | | return ManagedObjectDefinitionI18NResource.getInstance().getMessage( |
| | | getParentDefinition(), property, locale); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * @return Returns the user friendly plural name of this relation |
| | | * definition in the default locale. |
| | | */ |
| | | public Message getUserFriendlyPluralName() |
| | | public LocalizableMessage getUserFriendlyPluralName() |
| | | { |
| | | return getUserFriendlyPluralName(Locale.getDefault()); |
| | | } |
| | |
| | | * @return Returns the user friendly plural name of this relation |
| | | * definition in the specified locale. |
| | | */ |
| | | public Message getUserFriendlyPluralName(Locale locale) |
| | | public LocalizableMessage getUserFriendlyPluralName(Locale locale) |
| | | { |
| | | String property = |
| | | "relation." + getName() + ".user-friendly-plural-name"; |
| | |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * there is no pattern matching defined for this string |
| | | * property definition). |
| | | */ |
| | | public Message getPatternSynopsis() { |
| | | public LocalizableMessage getPatternSynopsis() { |
| | | return getPatternSynopsis(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * there is no pattern matching defined for this string |
| | | * property definition). |
| | | */ |
| | | public Message getPatternSynopsis(Locale locale) { |
| | | public LocalizableMessage getPatternSynopsis(Locale locale) { |
| | | ManagedObjectDefinitionI18NResource resource = |
| | | ManagedObjectDefinitionI18NResource.getInstance(); |
| | | String property = "property." + getName() |
| | |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * @return Returns the synopsis of this tag in the default locale. |
| | | */ |
| | | public final Message getSynopsis() { |
| | | public final LocalizableMessage getSynopsis() { |
| | | return getSynopsis(Locale.getDefault()); |
| | | } |
| | | |
| | |
| | | * The locale. |
| | | * @return Returns the synopsis of this tag in the specified locale. |
| | | */ |
| | | public final Message getSynopsis(Locale locale) { |
| | | public final LocalizableMessage getSynopsis(Locale locale) { |
| | | ManagedObjectDefinitionI18NResource resource = |
| | | ManagedObjectDefinitionI18NResource.getInstance(); |
| | | String property = "tag." + name + ".synopsis"; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client; |
| | | |
| | | |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import org.opends.server.admin.AdminException; |
| | | |
| | |
| | | * @param cause |
| | | * The cause. |
| | | */ |
| | | protected AdminClientException(Message message, Throwable cause) { |
| | | protected AdminClientException(LocalizableMessage message, Throwable cause) { |
| | | super(message, cause); |
| | | } |
| | | |
| | |
| | | * @param message |
| | | * The message. |
| | | */ |
| | | protected AdminClientException(Message message) { |
| | | protected AdminClientException(LocalizableMessage message) { |
| | | super(message); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client; |
| | | |
| | | |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * @param cause |
| | | * The cause. |
| | | */ |
| | | protected AdminSecurityException(Message message, Throwable cause) { |
| | | protected AdminSecurityException(LocalizableMessage message, Throwable cause) { |
| | | super(message, cause); |
| | | } |
| | | |
| | |
| | | * @param message |
| | | * The message. |
| | | */ |
| | | protected AdminSecurityException(Message message) { |
| | | protected AdminSecurityException(LocalizableMessage message) { |
| | | super(message); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client; |
| | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * @param cause |
| | | * The cause. |
| | | */ |
| | | public AuthenticationException(Message message, Throwable cause) { |
| | | public AuthenticationException(LocalizableMessage message, Throwable cause) { |
| | | super(message, cause); |
| | | } |
| | | |
| | |
| | | * @param message |
| | | * The message. |
| | | */ |
| | | public AuthenticationException(Message message) { |
| | | public AuthenticationException(LocalizableMessage message) { |
| | | super(message); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client; |
| | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * @param cause |
| | | * The cause. |
| | | */ |
| | | public AuthenticationNotSupportedException(Message message, Throwable cause) { |
| | | public AuthenticationNotSupportedException(LocalizableMessage message, Throwable cause) { |
| | | super(message, cause); |
| | | } |
| | | |
| | |
| | | * @param message |
| | | * The message. |
| | | */ |
| | | public AuthenticationNotSupportedException(Message message) { |
| | | public AuthenticationNotSupportedException(LocalizableMessage message) { |
| | | super(message); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client; |
| | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * @param cause |
| | | * The cause. |
| | | */ |
| | | public AuthorizationException(Message message, Throwable cause) { |
| | | public AuthorizationException(LocalizableMessage message, Throwable cause) { |
| | | super(message, cause); |
| | | } |
| | | |
| | |
| | | * @param message |
| | | * The message. |
| | | */ |
| | | public AuthorizationException(Message message) { |
| | | public AuthorizationException(LocalizableMessage message) { |
| | | super(message); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client; |
| | | |
| | |
| | | |
| | | import java.util.Collection; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.ManagedObjectPath; |
| | | |
| | | |
| | |
| | | * from being evaluated. |
| | | */ |
| | | public boolean isAddAcceptable(ManagementContext context, |
| | | ManagedObject<?> managedObject, Collection<Message> unacceptableReasons) |
| | | ManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons) |
| | | throws AuthorizationException, CommunicationException { |
| | | return true; |
| | | } |
| | |
| | | * from being evaluated. |
| | | */ |
| | | public boolean isModifyAcceptable(ManagementContext context, |
| | | ManagedObject<?> managedObject, Collection<Message> unacceptableReasons) |
| | | ManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons) |
| | | throws AuthorizationException, CommunicationException { |
| | | return true; |
| | | } |
| | |
| | | * from being evaluated. |
| | | */ |
| | | public boolean isDeleteAcceptable(ManagementContext context, |
| | | ManagedObjectPath<?, ?> path, Collection<Message> unacceptableReasons) |
| | | ManagedObjectPath<?, ?> path, Collection<LocalizableMessage> unacceptableReasons) |
| | | throws AuthorizationException, CommunicationException { |
| | | return true; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client; |
| | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * @param cause |
| | | * The cause. |
| | | */ |
| | | public CommunicationException(Message message, Throwable cause) { |
| | | public CommunicationException(LocalizableMessage message, Throwable cause) { |
| | | super(message, cause); |
| | | } |
| | | |
| | |
| | | * @param message |
| | | * The message. |
| | | */ |
| | | public CommunicationException(Message message) { |
| | | public CommunicationException(LocalizableMessage message) { |
| | | super(message); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client; |
| | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.OperationsException; |
| | | |
| | | |
| | |
| | | * @param cause |
| | | * The cause. |
| | | */ |
| | | public ConcurrentModificationException(Message message, Throwable cause) { |
| | | public ConcurrentModificationException(LocalizableMessage message, Throwable cause) { |
| | | super(message, cause); |
| | | } |
| | | |
| | |
| | | * @param message |
| | | * The message. |
| | | */ |
| | | public ConcurrentModificationException(Message message) { |
| | | public ConcurrentModificationException(LocalizableMessage message) { |
| | | super(message); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client; |
| | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.PropertyException; |
| | | import org.opends.server.admin.OperationsException; |
| | | import org.opends.server.admin.PropertyDefinition; |
| | |
| | | |
| | | |
| | | // Create the message |
| | | private static Message createMessage(String illegalName, |
| | | private static LocalizableMessage createMessage(String illegalName, |
| | | PropertyDefinition<?> namingPropertyDefinition) { |
| | | if (illegalName.length() == 0) { |
| | | return ERR_ILLEGAL_MANAGED_OBJECT_NAME_EXCEPTION_EMPTY.get(); |
| | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | |
| | | |
| | | |
| | | // Create the message. |
| | | private static Message createMessage(ManagedObject<?> partialManagedObject, |
| | | private static LocalizableMessage createMessage(ManagedObject<?> partialManagedObject, |
| | | Collection<PropertyException> causes) { |
| | | Reject.ifNull(causes); |
| | | Reject.ifFalse(!causes.isEmpty()); |
| | |
| | | return ERR_MANAGED_OBJECT_DECODING_EXCEPTION_SINGLE.get(d |
| | | .getUserFriendlyName(), causes.iterator().next().getMessageObject()); |
| | | } else { |
| | | MessageBuilder builder = new MessageBuilder(); |
| | | LocalizableMessageBuilder builder = new LocalizableMessageBuilder(); |
| | | |
| | | boolean isFirst = true; |
| | | for (PropertyException cause : causes) { |
| | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.admin.OperationsException; |
| | | import org.opends.server.admin.PropertyException; |
| | | import org.forgerock.util.Reject; |
| | |
| | | |
| | | |
| | | // Create the message. |
| | | private static Message createMessage(Collection<PropertyException> causes) |
| | | private static LocalizableMessage createMessage(Collection<PropertyException> causes) |
| | | { |
| | | Reject.ifNull(causes); |
| | | Reject.ifFalse(!causes.isEmpty()); |
| | |
| | | return ERR_MISSING_MANDATORY_PROPERTIES_EXCEPTION_SINGLE.get(causes |
| | | .iterator().next().getPropertyDefinition().getName()); |
| | | } else { |
| | | MessageBuilder builder = new MessageBuilder(); |
| | | LocalizableMessageBuilder builder = new LocalizableMessageBuilder(); |
| | | |
| | | boolean isFirst = true; |
| | | for (PropertyException cause : causes) { |
| | |
| | | |
| | | // The user friendly name of the component that caused this |
| | | // exception. |
| | | private final Message ufn; |
| | | private final LocalizableMessage ufn; |
| | | |
| | | |
| | | |
| | |
| | | * Indicates whether the exception occurred during managed |
| | | * object creation. |
| | | */ |
| | | public MissingMandatoryPropertiesException(Message ufn, |
| | | public MissingMandatoryPropertiesException(LocalizableMessage ufn, |
| | | Collection<PropertyException> causes, boolean isCreate) { |
| | | super(createMessage(causes)); |
| | | |
| | |
| | | * @return Returns the user friendly name of the component that |
| | | * caused this exception. |
| | | */ |
| | | public Message getUserFriendlyName() { |
| | | public LocalizableMessage getUserFriendlyName() { |
| | | return ufn; |
| | | } |
| | | |
| | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.util.Reject; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | // Gets the default message. |
| | | private static Message getDefaultMessage(Collection<Message> messages) { |
| | | private static LocalizableMessage getDefaultMessage(Collection<LocalizableMessage> messages) { |
| | | Reject.ifNull(messages); |
| | | Reject.ifFalse(!messages.isEmpty()); |
| | | |
| | |
| | | |
| | | |
| | | // Merge the messages into a single message. |
| | | private static Message getSingleMessage(Collection<Message> messages) { |
| | | private static LocalizableMessage getSingleMessage(Collection<LocalizableMessage> messages) { |
| | | if (messages.size() == 1) { |
| | | return messages.iterator().next(); |
| | | } else { |
| | | MessageBuilder builder = new MessageBuilder(); |
| | | LocalizableMessageBuilder builder = new LocalizableMessageBuilder(); |
| | | |
| | | boolean isFirst = true; |
| | | for (Message m : messages) { |
| | | for (LocalizableMessage m : messages) { |
| | | if (!isFirst) { |
| | | builder.append("; "); |
| | | } |
| | |
| | | } |
| | | |
| | | // The messages describing the constraint violations that occurred. |
| | | private final Collection<Message> messages; |
| | | private final Collection<LocalizableMessage> messages; |
| | | |
| | | // The type of operation that caused this exception. |
| | | private final OperationType type; |
| | | |
| | | // The user friendly name of the component that caused this |
| | | // exception. |
| | | private final Message ufn; |
| | | private final LocalizableMessage ufn; |
| | | |
| | | |
| | | |
| | |
| | | * The user friendly name of the component that caused this |
| | | * exception. |
| | | */ |
| | | public OperationRejectedException(OperationType type, Message ufn) { |
| | | public OperationRejectedException(OperationType type, LocalizableMessage ufn) { |
| | | this(type, ufn, ERR_OPERATION_REJECTED_DEFAULT.get()); |
| | | } |
| | | |
| | |
| | | * occurred (must be non-<code>null</code> and |
| | | * non-empty). |
| | | */ |
| | | public OperationRejectedException(OperationType type, Message ufn, |
| | | Collection<Message> messages) { |
| | | public OperationRejectedException(OperationType type, LocalizableMessage ufn, |
| | | Collection<LocalizableMessage> messages) { |
| | | super(getDefaultMessage(messages)); |
| | | |
| | | this.messages = new ArrayList<Message>(messages); |
| | | this.messages = new ArrayList<LocalizableMessage>(messages); |
| | | this.type = type; |
| | | this.ufn = ufn; |
| | | } |
| | |
| | | * The message describing the constraint violation that |
| | | * occurred. |
| | | */ |
| | | public OperationRejectedException(OperationType type, Message ufn, |
| | | Message message) { |
| | | public OperationRejectedException(OperationType type, LocalizableMessage ufn, |
| | | LocalizableMessage message) { |
| | | this(type, ufn, Collections.singleton(message)); |
| | | } |
| | | |
| | |
| | | * @return Returns an unmodifiable collection view of the messages |
| | | * describing the constraint violations that occurred. |
| | | */ |
| | | public Collection<Message> getMessages() { |
| | | public Collection<LocalizableMessage> getMessages() { |
| | | return Collections.unmodifiableCollection(messages); |
| | | } |
| | | |
| | |
| | | * @return Returns a single message listing all the messages |
| | | * combined into a single list separated by semi-colons. |
| | | */ |
| | | public Message getMessagesAsSingleMessage() { |
| | | public LocalizableMessage getMessagesAsSingleMessage() { |
| | | return getSingleMessage(messages); |
| | | } |
| | | |
| | |
| | | * @return Returns the user friendly name of the component that |
| | | * caused this exception. |
| | | */ |
| | | public Message getUserFriendlyName() { |
| | | public LocalizableMessage getUserFriendlyName() { |
| | | return ufn; |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.cli; |
| | | |
| | |
| | | import org.opends.admin.ads.ADSContextException; |
| | | import org.opends.admin.ads.ADSContext.AdministratorProperty; |
| | | import org.opends.admin.ads.ADSContextException.ErrorType; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.tools.dsconfig.ArgumentExceptionFactory; |
| | | import org.opends.server.types.Privilege; |
| | | import org.opends.server.util.args.Argument; |
| | |
| | | public class DsFrameworkCliGlobalAdmin implements DsFrameworkCliSubCommandGroup |
| | | { |
| | | // Strings used in property help. |
| | | private final static Message DESCRIPTION_OPTIONS_TITLE = |
| | | private final static LocalizableMessage DESCRIPTION_OPTIONS_TITLE = |
| | | INFO_DSCFG_HELP_DESCRIPTION_OPTION.get(); |
| | | |
| | | private final static Message DESCRIPTION_OPTIONS_READ = |
| | | private final static LocalizableMessage DESCRIPTION_OPTIONS_READ = |
| | | INFO_DSCFG_HELP_DESCRIPTION_READ.get(); |
| | | |
| | | private final static Message DESCRIPTION_OPTIONS_WRITE = |
| | | private final static LocalizableMessage DESCRIPTION_OPTIONS_WRITE = |
| | | INFO_DSCFG_HELP_DESCRIPTION_WRITE.get(); |
| | | |
| | | private final static Message DESCRIPTION_OPTIONS_MANDATORY = |
| | | private final static LocalizableMessage DESCRIPTION_OPTIONS_MANDATORY = |
| | | INFO_DSCFG_HELP_DESCRIPTION_MANDATORY.get(); |
| | | |
| | | private final static Message DESCRIPTION_OPTIONS_SINGLE = |
| | | private final static LocalizableMessage DESCRIPTION_OPTIONS_SINGLE = |
| | | INFO_DSCFG_HELP_DESCRIPTION_SINGLE_VALUED.get(); |
| | | |
| | | /** |
| | |
| | | AdministratorProperty prop = AdministratorProperty.UID; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, |
| | | attName, false, false, true, Message.raw(""), null, null, null); |
| | | attName, false, false, true, LocalizableMessage.raw(""), null, null, null); |
| | | userAdminProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | AdministratorProperty prop = AdministratorProperty.PASSWORD; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, |
| | | attName, false, false, true, Message.raw(""), null, null, null); |
| | | attName, false, false, true, LocalizableMessage.raw(""), null, null, null); |
| | | userAdminProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | AdministratorProperty prop = AdministratorProperty.DESCRIPTION; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, |
| | | attName, false, false, true, Message.raw(""), null, null, null); |
| | | attName, false, false, true, LocalizableMessage.raw(""), null, null, null); |
| | | userAdminProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | AdministratorProperty prop = AdministratorProperty.ADMINISTRATOR_DN; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, |
| | | attName, false, false, true, Message.raw(""), null, null, null); |
| | | attName, false, false, true, LocalizableMessage.raw(""), null, null, null); |
| | | userAdminProperties.put(prop, arg); |
| | | readonlyadminUserProperties.add(prop); |
| | | } |
| | |
| | | AdministratorProperty prop = AdministratorProperty.PRIVILEGE; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, |
| | | attName, true, true, true, Message.raw(""), "root", null, null); |
| | | attName, true, true, true, LocalizableMessage.raw(""), "root", null, null); |
| | | userAdminProperties.put(prop, arg); |
| | | } |
| | | } |
| | |
| | | .getAdminUserPropFromName(propertyName); |
| | | if (adminUserProperty == null) |
| | | { |
| | | Message message = ERR_CLI_ERROR_PROPERTY_UNRECOGNIZED.get(propertyName); |
| | | LocalizableMessage message = ERR_CLI_ERROR_PROPERTY_UNRECOGNIZED.get(propertyName); |
| | | throw new ArgumentException(message); |
| | | } |
| | | |
| | | // Check that propName is not hidden. |
| | | if (userAdminProperties.get(adminUserProperty).isHidden()) |
| | | { |
| | | Message message = ERR_CLI_ERROR_PROPERTY_UNRECOGNIZED.get(propertyName); |
| | | LocalizableMessage message = ERR_CLI_ERROR_PROPERTY_UNRECOGNIZED.get(propertyName); |
| | | throw new ArgumentException(message); |
| | | } |
| | | |
| | | // Check the property Syntax. |
| | | MessageBuilder invalidReason = new MessageBuilder(); |
| | | LocalizableMessageBuilder invalidReason = new LocalizableMessageBuilder(); |
| | | Argument arg = userAdminProperties.get(adminUserProperty) ; |
| | | if ( ! arg.valueIsAcceptable(value, invalidReason)) |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | ERR_CLI_ERROR_INVALID_PROPERTY_VALUE.get(propertyName, value); |
| | | throw new ArgumentException(message); |
| | | } |
| | |
| | | } |
| | | if (Privilege.privilegeForName(valueToCheck) == null) |
| | | { |
| | | Message message = ERR_CLI_ERROR_INVALID_PROPERTY_VALUE.get( |
| | | LocalizableMessage message = ERR_CLI_ERROR_INVALID_PROPERTY_VALUE.get( |
| | | AdministratorProperty.PRIVILEGE.getAttributeName(), |
| | | valueToCheck); |
| | | throw new ArgumentException(message); |
| | |
| | | // but not yet is the map. Check if we have a default value. |
| | | if (arg.getDefaultValue() == null) |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | ERR_CLI_ERROR_MISSING_PROPERTY.get(s.getAttributeName()); |
| | | throw new ArgumentException(message); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.cli; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.io.OutputStream; |
| | | import java.io.PrintStream; |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.NullOutputStream; |
| | | import org.opends.server.util.BuildVersion; |
| | | import org.opends.server.util.StaticUtils; |
| | | import org.opends.server.util.args.ArgumentException; |
| | | |
| | | import static org.opends.server.admin.client.cli.DsFrameworkCliReturnCode.*; |
| | |
| | | import static org.opends.messages.DSConfigMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | DsFrameworkCliParser argParser ; |
| | | try |
| | | { |
| | | Message toolDescription = INFO_ADMIN_TOOL_DESCRIPTION.get(); |
| | | LocalizableMessage toolDescription = INFO_ADMIN_TOOL_DESCRIPTION.get(); |
| | | argParser = new DsFrameworkCliParser(CLASS_NAME, |
| | | toolDescription, false); |
| | | argParser.initializeParser(out); |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | Message message = ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()); |
| | | LocalizableMessage message = ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()); |
| | | |
| | | err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | return CANNOT_INITIALIZE_ARGS.getReturnCode(); |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | Message message = ERR_ERROR_PARSING_ARGS.get(ae.getMessage()); |
| | | LocalizableMessage message = ERR_ERROR_PARSING_ARGS.get(ae.getMessage()); |
| | | |
| | | err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | err.println(argParser.getUsage()); |
| | |
| | | |
| | | if (argParser.getSubCommand() == null) |
| | | { |
| | | Message message = ERR_ERROR_PARSING_ARGS.get( |
| | | LocalizableMessage message = ERR_ERROR_PARSING_ARGS.get( |
| | | ERR_DSCFG_ERROR_MISSING_SUBCOMMAND.get()); |
| | | err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | err.println(); |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | Message message = ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()); |
| | | LocalizableMessage message = ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()); |
| | | |
| | | err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | return CANNOT_INITIALIZE_ARGS.getReturnCode(); |
| | | } |
| | | |
| | | Message msg = returnCode.getMessage(); |
| | | LocalizableMessage msg = returnCode.getMessage(); |
| | | if ( (returnCode == SUCCESSFUL) |
| | | || |
| | | (returnCode == SUCCESSFUL_NOP)) |
| | |
| | | } |
| | | } |
| | | else |
| | | if (msg != null && |
| | | msg.getDescriptor().getId() != ERR_ADMIN_NO_MESSAGE.getId()) |
| | | if (msg != null && StaticUtils.hasDescriptor(msg, ERR_ADMIN_NO_MESSAGE)) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(INFO_ADMIN_ERROR.get()); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(INFO_ADMIN_ERROR.get()); |
| | | mb.append(msg); |
| | | err.println(wrapText(mb.toString(), MAX_LINE_WIDTH)); |
| | | if (argParser.isVerbose() && (adsException != null)) |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.cli; |
| | | |
| | |
| | | |
| | | import org.opends.admin.ads.ADSContextException; |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.util.args.ArgumentException; |
| | | import org.opends.server.util.args.BooleanArgument; |
| | | import org.opends.server.util.args.SubCommand; |
| | |
| | | * Indicates whether subcommand and long argument names |
| | | * should be treated in a case-sensitive manner. |
| | | */ |
| | | public DsFrameworkCliParser(String mainClassName, Message toolDescription, |
| | | public DsFrameworkCliParser(String mainClassName, LocalizableMessage toolDescription, |
| | | boolean longArgumentsCaseSensitive) |
| | | { |
| | | super(mainClassName, toolDescription, longArgumentsCaseSensitive); |
| | |
| | | } |
| | | catch (NamingException e) |
| | | { |
| | | Message message = ERR_ADMIN_CANNOT_CONNECT_TO_ADS.get(host); |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_CONNECT_TO_ADS.get(host); |
| | | try |
| | | { |
| | | err.write(wrapText(message, MAX_LINE_WIDTH).getBytes()); |
| | |
| | | } |
| | | catch (NamingException e) |
| | | { |
| | | Message message = ERR_ADMIN_CANNOT_CONNECT_TO_ADS.get(host); |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_CONNECT_TO_ADS.get(host); |
| | | try |
| | | { |
| | | err.write(wrapText(message, MAX_LINE_WIDTH).getBytes()); |
| | |
| | | } |
| | | catch (NamingException e) |
| | | { |
| | | Message message = ERR_ADMIN_CANNOT_CONNECT_TO_ADS.get(host); |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_CONNECT_TO_ADS.get(host); |
| | | try |
| | | { |
| | | err.write(wrapText(message, MAX_LINE_WIDTH).getBytes()); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.cli; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | |
| | |
| | | private final int returnCode; |
| | | |
| | | // The message id to be used of the value. |
| | | private final Message message; |
| | | private final LocalizableMessage message; |
| | | |
| | | // Private constructor. |
| | | private DsFrameworkCliReturnCode(int returnCode, Message message) |
| | | private DsFrameworkCliReturnCode(int returnCode, LocalizableMessage message) |
| | | { |
| | | this.returnCode = returnCode; |
| | | this.message = message; |
| | |
| | | * |
| | | * @return The corresponding message. |
| | | */ |
| | | public Message getMessage() |
| | | public LocalizableMessage getMessage() |
| | | { |
| | | return message; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.cli; |
| | | |
| | |
| | | import org.opends.admin.ads.ADSContextException; |
| | | import org.opends.admin.ads.ADSContext.ServerProperty; |
| | | import org.opends.admin.ads.ADSContextException.ErrorType; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.tools.dsconfig.ArgumentExceptionFactory; |
| | | import org.opends.server.util.args.Argument; |
| | | import org.opends.server.util.args.ArgumentException; |
| | |
| | | public class DsFrameworkCliServer implements DsFrameworkCliSubCommandGroup |
| | | { |
| | | // Strings used in property help. |
| | | private final static Message DESCRIPTION_OPTIONS_TITLE = |
| | | private final static LocalizableMessage DESCRIPTION_OPTIONS_TITLE = |
| | | INFO_DSCFG_HELP_DESCRIPTION_OPTION.get(); |
| | | |
| | | private final static Message DESCRIPTION_OPTIONS_READ = |
| | | private final static LocalizableMessage DESCRIPTION_OPTIONS_READ = |
| | | INFO_DSCFG_HELP_DESCRIPTION_READ.get(); |
| | | |
| | | private final static Message DESCRIPTION_OPTIONS_WRITE = |
| | | private final static LocalizableMessage DESCRIPTION_OPTIONS_WRITE = |
| | | INFO_DSCFG_HELP_DESCRIPTION_WRITE.get(); |
| | | |
| | | private final static Message DESCRIPTION_OPTIONS_MANDATORY = |
| | | private final static LocalizableMessage DESCRIPTION_OPTIONS_MANDATORY = |
| | | INFO_DSCFG_HELP_DESCRIPTION_MANDATORY.get(); |
| | | |
| | | private final static Message DESCRIPTION_OPTIONS_SINGLE = |
| | | private final static LocalizableMessage DESCRIPTION_OPTIONS_SINGLE = |
| | | INFO_DSCFG_HELP_DESCRIPTION_SINGLE_VALUED.get(); |
| | | |
| | | /** |
| | |
| | | ServerProperty prop = ServerProperty.ID; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, |
| | | prop.getAttributeName(), false, false, true, Message.raw(""), null, |
| | | prop.getAttributeName(), false, false, true, LocalizableMessage.raw(""), null, |
| | | null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | |
| | | String attName = prop.getAttributeName(); |
| | | readonlyServerProperties.add(prop); |
| | | StringArgument arg = new StringArgument(attName, null, attName, true, |
| | | false, true, Message.raw(""), "localhost", null, null); |
| | | false, true, LocalizableMessage.raw(""), "localhost", null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.LDAP_PORT; |
| | | String attName = prop.getAttributeName(); |
| | | IntegerArgument arg = new IntegerArgument(attName, null, attName, true, |
| | | true, true, Message.raw(attName), 389, null, null); |
| | | true, true, LocalizableMessage.raw(attName), 389, null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.JMX_PORT; |
| | | String attName = prop.getAttributeName(); |
| | | IntegerArgument arg = new IntegerArgument(attName, null, attName, |
| | | false, true, Message.raw(attName), null); |
| | | false, true, LocalizableMessage.raw(attName), null); |
| | | arg.setMultiValued(true); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | |
| | | ServerProperty prop = ServerProperty.JMXS_PORT; |
| | | String attName = prop.getAttributeName(); |
| | | IntegerArgument arg = new IntegerArgument(attName, null, attName, |
| | | false, true, Message.raw(attName), null); |
| | | false, true, LocalizableMessage.raw(attName), null); |
| | | arg.setMultiValued(true); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | |
| | | ServerProperty prop = ServerProperty.LDAPS_PORT; |
| | | String attName = prop.getAttributeName(); |
| | | IntegerArgument arg = new IntegerArgument(attName, null, attName, |
| | | false, true, Message.raw(attName), null); |
| | | false, true, LocalizableMessage.raw(attName), null); |
| | | arg.setMultiValued(true); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | |
| | | ServerProperty prop = ServerProperty.CERTIFICATE; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, attName, false, |
| | | false, true, Message.raw(attName), null, null, null); |
| | | false, true, LocalizableMessage.raw(attName), null, null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.INSTANCE_PATH; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, attName, false, |
| | | false, true, Message.raw(attName), null, null, null); |
| | | false, true, LocalizableMessage.raw(attName), null, null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.DESCRIPTION; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, attName, false, |
| | | false, true, Message.raw(attName), null, null, null); |
| | | false, true, LocalizableMessage.raw(attName), null, null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.HOST_OS; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, attName, false, |
| | | false, true, Message.raw(attName), null, null, null); |
| | | false, true, LocalizableMessage.raw(attName), null, null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.LOCATION; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, attName, false, |
| | | false, true, Message.raw(attName), null, null, null); |
| | | false, true, LocalizableMessage.raw(attName), null, null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.GROUPS; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, attName, false, |
| | | true, true, Message.raw(attName), null, null, null); |
| | | true, true, LocalizableMessage.raw(attName), null, null, null); |
| | | arg.setHidden(true); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | |
| | | ServerProperty prop = ServerProperty.INSTANCE_KEY_ID; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, prop |
| | | .getAttributeName(), false, false, true, Message.raw(""), null, null, |
| | | .getAttributeName(), false, false, true, LocalizableMessage.raw(""), null, null, |
| | | null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | |
| | | ServerProperty prop = ServerProperty.INSTANCE_PUBLIC_KEY_CERTIFICATE; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, prop |
| | | .getAttributeName(), false, false, true, Message.raw(""), null, null, |
| | | .getAttributeName(), false, false, true, LocalizableMessage.raw(""), null, null, |
| | | null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | |
| | | .getServerPropFromName(propertyName); |
| | | if (serverProperty == null) |
| | | { |
| | | Message message = ERR_CLI_ERROR_PROPERTY_UNRECOGNIZED.get(propertyName); |
| | | LocalizableMessage message = ERR_CLI_ERROR_PROPERTY_UNRECOGNIZED.get(propertyName); |
| | | throw new ArgumentException(message); |
| | | } |
| | | |
| | | // Check that propName is not hidden. |
| | | if (serverProperties.get(serverProperty).isHidden()) |
| | | { |
| | | Message message = ERR_CLI_ERROR_PROPERTY_UNRECOGNIZED.get(propertyName); |
| | | LocalizableMessage message = ERR_CLI_ERROR_PROPERTY_UNRECOGNIZED.get(propertyName); |
| | | throw new ArgumentException(message); |
| | | } |
| | | |
| | | // Check the property Syntax. |
| | | MessageBuilder invalidReason = new MessageBuilder(); |
| | | LocalizableMessageBuilder invalidReason = new LocalizableMessageBuilder(); |
| | | Argument arg = serverProperties.get(serverProperty) ; |
| | | if ( ! arg.valueIsAcceptable(value, invalidReason)) |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | ERR_CLI_ERROR_INVALID_PROPERTY_VALUE.get(propertyName, value); |
| | | throw new ArgumentException(message); |
| | | } |
| | |
| | | // but not yet is the map. Check if we have a default value. |
| | | if (arg.getDefaultValue() == null) |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | ERR_CLI_ERROR_MISSING_PROPERTY.get(s.getAttributeName()); |
| | | throw new ArgumentException(message); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client.cli; |
| | |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import static org.opends.server.tools.ToolConstants.*; |
| | | import static org.opends.server.util.ServerConstants.MAX_LINE_WIDTH; |
| | | import static org.opends.server.util.StaticUtils.wrapText; |
| | |
| | | // read the password from the stdin. |
| | | try |
| | | { |
| | | out.write(INFO_LDAPAUTH_PASSWORD_PROMPT.get(dn).getBytes()); |
| | | out.write(INFO_LDAPAUTH_PASSWORD_PROMPT.get(dn).toString().getBytes()); |
| | | out.flush(); |
| | | char[] pwChars = PasswordReader.readPassword(); |
| | | bindPasswordValue = new String(pwChars); |
| | |
| | | argList.add(hostNameArg); |
| | | |
| | | |
| | | Message portDescription = INFO_DESCRIPTION_PORT.get(); |
| | | LocalizableMessage portDescription = INFO_DESCRIPTION_PORT.get(); |
| | | if (alwaysSSL) { |
| | | portDescription = INFO_DESCRIPTION_ADMIN_PORT.get(); |
| | | } |
| | |
| | | /** |
| | | * Indication if provided global options are validate. |
| | | * |
| | | * @param buf the MessageBuilder to write the error messages. |
| | | * @param buf the LocalizableMessageBuilder to write the error messages. |
| | | * @return return code. |
| | | */ |
| | | public int validateGlobalOptions(MessageBuilder buf) |
| | | public int validateGlobalOptions(LocalizableMessageBuilder buf) |
| | | { |
| | | ArrayList<Message> errors = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | | // Couldn't have at the same time bindPassword and bindPasswordFile |
| | | if (bindPasswordArg.isPresent() && bindPasswordFileArg.isPresent()) { |
| | | Message message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | LocalizableMessage message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | bindPasswordArg.getLongIdentifier(), |
| | | bindPasswordFileArg.getLongIdentifier()); |
| | | errors.add(message); |
| | |
| | | // Couldn't have at the same time trustAll and |
| | | // trustStore related arg |
| | | if (trustAllArg.isPresent() && trustStorePathArg.isPresent()) { |
| | | Message message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | LocalizableMessage message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | trustAllArg.getLongIdentifier(), |
| | | trustStorePathArg.getLongIdentifier()); |
| | | errors.add(message); |
| | | } |
| | | if (trustAllArg.isPresent() && trustStorePasswordArg.isPresent()) { |
| | | Message message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | LocalizableMessage message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | trustAllArg.getLongIdentifier(), |
| | | trustStorePasswordArg.getLongIdentifier()); |
| | | errors.add(message); |
| | | } |
| | | if (trustAllArg.isPresent() && trustStorePasswordFileArg.isPresent()) { |
| | | Message message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | LocalizableMessage message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | trustAllArg.getLongIdentifier(), |
| | | trustStorePasswordFileArg.getLongIdentifier()); |
| | | errors.add(message); |
| | |
| | | // trustStorePasswordFileArg |
| | | if (trustStorePasswordArg.isPresent() |
| | | && trustStorePasswordFileArg.isPresent()) { |
| | | Message message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | LocalizableMessage message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | trustStorePasswordArg.getLongIdentifier(), |
| | | trustStorePasswordFileArg.getLongIdentifier()); |
| | | errors.add(message); |
| | |
| | | String value = trustStorePathArg.getValue(); |
| | | if (!canRead(trustStorePathArg.getValue())) |
| | | { |
| | | Message message = ERR_CANNOT_READ_TRUSTSTORE.get( |
| | | LocalizableMessage message = ERR_CANNOT_READ_TRUSTSTORE.get( |
| | | value); |
| | | errors.add(message); |
| | | } |
| | |
| | | String value = keyStorePathArg.getValue(); |
| | | if (!canRead(trustStorePathArg.getValue())) |
| | | { |
| | | Message message = ERR_CANNOT_READ_KEYSTORE.get( |
| | | LocalizableMessage message = ERR_CANNOT_READ_KEYSTORE.get( |
| | | value); |
| | | errors.add(message); |
| | | } |
| | |
| | | // useSSLArg |
| | | if (useStartTLSArg.isPresent() |
| | | && useSSLArg.isPresent()) { |
| | | Message message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | LocalizableMessage message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | useStartTLSArg |
| | | .getLongIdentifier(), useSSLArg.getLongIdentifier()); |
| | | errors.add(message); |
| | | } |
| | | if (errors.size() > 0) |
| | | { |
| | | for (Message error : errors) |
| | | for (LocalizableMessage error : errors) |
| | | { |
| | | if (buf.length() > 0) |
| | | { |
| | |
| | | */ |
| | | public int validateGlobalOptions(PrintStream err) |
| | | { |
| | | MessageBuilder buf = new MessageBuilder(); |
| | | LocalizableMessageBuilder buf = new LocalizableMessageBuilder(); |
| | | int returnValue = validateGlobalOptions(buf); |
| | | if (buf.length() > 0) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client.cli; |
| | |
| | | import javax.net.ssl.KeyManager; |
| | | |
| | | import org.opends.admin.ads.util.ApplicationTrustManager; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.util.PasswordReader; |
| | |
| | | * should be treated in a case-sensitive manner. |
| | | */ |
| | | protected SecureConnectionCliParser(String mainClassName, |
| | | Message toolDescription, boolean longArgumentsCaseSensitive) |
| | | LocalizableMessage toolDescription, boolean longArgumentsCaseSensitive) |
| | | { |
| | | super(mainClassName, toolDescription, longArgumentsCaseSensitive); |
| | | } |
| | |
| | | // read the password from the stdin. |
| | | try |
| | | { |
| | | out.write(INFO_LDAPAUTH_PASSWORD_PROMPT.get(dn).getBytes()); |
| | | out.write(INFO_LDAPAUTH_PASSWORD_PROMPT.get(dn).toString().getBytes()); |
| | | out.flush(); |
| | | char[] pwChars = PasswordReader.readPassword(); |
| | | bindPasswordValue = new String(pwChars); |
| | |
| | | /** |
| | | * Indication if provided global options are validate. |
| | | * |
| | | * @param buf the MessageBuilder to write the error messages. |
| | | * @param buf the LocalizableMessageBuilder to write the error messages. |
| | | * @return return code. |
| | | */ |
| | | public int validateGlobalOptions(MessageBuilder buf) |
| | | public int validateGlobalOptions(LocalizableMessageBuilder buf) |
| | | { |
| | | int ret = secureArgsList.validateGlobalOptions(buf) ; |
| | | |
| | |
| | | if (noPropertiesFileArg.isPresent() |
| | | && propertiesFileArg.isPresent()) |
| | | { |
| | | Message message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | LocalizableMessage message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | noPropertiesFileArg.getLongIdentifier(), propertiesFileArg |
| | | .getLongIdentifier()); |
| | | if (buf.length() > 0) |
| | |
| | | */ |
| | | public int validateGlobalOptions(PrintStream err) |
| | | { |
| | | MessageBuilder buf = new MessageBuilder(); |
| | | LocalizableMessageBuilder buf = new LocalizableMessageBuilder(); |
| | | int returnValue = validateGlobalOptions(buf); |
| | | if (buf.length() > 0) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock, AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.admin.client.ldap; |
| | | |
| | |
| | | import javax.naming.directory.Attributes; |
| | | import javax.naming.ldap.LdapName; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.AbstractManagedObjectDefinition; |
| | | import org.opends.server.admin.AggregationPropertyDefinition; |
| | | import org.opends.server.admin.Configuration; |
| | |
| | | throw new OperationRejectedException(OperationType.DELETE, d |
| | | .getUserFriendlyName()); |
| | | } else { |
| | | Message m = Message.raw("%s", e.getMessage()); |
| | | LocalizableMessage m = LocalizableMessage.raw("%s", e.getMessage()); |
| | | throw new OperationRejectedException(OperationType.DELETE, d |
| | | .getUserFriendlyName(), m); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client.ldap; |
| | |
| | | import javax.naming.ldap.LdapName; |
| | | import javax.naming.ldap.Rdn; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.AggregationPropertyDefinition; |
| | | import org.opends.server.admin.Configuration; |
| | | import org.opends.server.admin.ConfigurationClient; |
| | |
| | | throw new OperationRejectedException(OperationType.CREATE, d |
| | | .getUserFriendlyName()); |
| | | } else { |
| | | Message m = Message.raw("%s", e.getMessage()); |
| | | LocalizableMessage m = LocalizableMessage.raw("%s", e.getMessage()); |
| | | throw new OperationRejectedException(OperationType.CREATE, d |
| | | .getUserFriendlyName(), m); |
| | | } |
| | |
| | | throw new OperationRejectedException(OperationType.CREATE, d |
| | | .getUserFriendlyName()); |
| | | } else { |
| | | Message m = Message.raw("%s", e.getMessage()); |
| | | LocalizableMessage m = LocalizableMessage.raw("%s", e.getMessage()); |
| | | throw new OperationRejectedException(OperationType.CREATE, d |
| | | .getUserFriendlyName(), m); |
| | | } |
| | |
| | | throw new OperationRejectedException(OperationType.MODIFY, d |
| | | .getUserFriendlyName()); |
| | | } else { |
| | | Message m = Message.raw("%s", e.getMessage()); |
| | | LocalizableMessage m = LocalizableMessage.raw("%s", e.getMessage()); |
| | | throw new OperationRejectedException(OperationType.MODIFY, d |
| | | .getUserFriendlyName(), m); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.spi; |
| | | |
| | |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.AbstractManagedObjectDefinition; |
| | | import org.opends.server.admin.Configuration; |
| | | import org.opends.server.admin.ConfigurationClient; |
| | |
| | | } |
| | | |
| | | // Now enforce any constraints. |
| | | List<Message> messages = new LinkedList<Message>(); |
| | | List<LocalizableMessage> messages = new LinkedList<LocalizableMessage>(); |
| | | boolean isAcceptable = true; |
| | | ManagementContext context = getDriver().getManagementContext(); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client.spi; |
| | |
| | | import java.util.List; |
| | | import java.util.SortedSet; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider; |
| | | import org.opends.server.admin.AbstractManagedObjectDefinition; |
| | | import org.opends.server.admin.AliasDefaultBehaviorProvider; |
| | |
| | | // The targeted managed object is guaranteed to exist, so enforce |
| | | // any constraints. |
| | | AbstractManagedObjectDefinition<?, ?> d = path.getManagedObjectDefinition(); |
| | | List<Message> messages = new LinkedList<Message>(); |
| | | List<LocalizableMessage> messages = new LinkedList<LocalizableMessage>(); |
| | | boolean isAcceptable = true; |
| | | |
| | | for (Constraint constraint : d.getAllConstraints()) { |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.doc; |
| | | |
| | |
| | | import java.util.Properties; |
| | | import java.util.TreeMap; |
| | | import java.util.TreeSet; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.ACIPropertyDefinition; |
| | | import org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider; |
| | | import org.opends.server.admin.AbstractManagedObjectDefinition; |
| | |
| | | |
| | | String action = "None"; |
| | | if (prop.getAdministratorAction() != null) { |
| | | Message synopsis = prop.getAdministratorAction().getSynopsis(); |
| | | LocalizableMessage synopsis = prop.getAdministratorAction().getSynopsis(); |
| | | Type actionType = prop.getAdministratorAction().getType(); |
| | | String actionStr = ""; |
| | | if (actionType == Type.COMPONENT_RESTART) { |
| | |
| | | return "<br>\n"; |
| | | } |
| | | |
| | | private void paragraph(Message description) { |
| | | private void paragraph(LocalizableMessage description) { |
| | | if (description != null) { |
| | | paragraph(description.toString()); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | |
| | |
| | | |
| | | import java.util.Collection; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | |
| | | |
| | |
| | | * @param unacceptableReason |
| | | * The single message to which messages should be appended. |
| | | */ |
| | | protected final void generateUnacceptableReason(Collection<Message> reasons, |
| | | MessageBuilder unacceptableReason) { |
| | | protected final void generateUnacceptableReason(Collection<LocalizableMessage> reasons, |
| | | LocalizableMessageBuilder unacceptableReason) { |
| | | boolean isFirst = true; |
| | | for (Message reason : reasons) { |
| | | for (LocalizableMessage reason : reasons) { |
| | | if (isFirst) { |
| | | isFirst = false; |
| | | } else { |
| | |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.admin.Configuration; |
| | | import org.opends.server.admin.Constraint; |
| | | import org.opends.server.admin.DecodingException; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean configAddIsAcceptable(ConfigEntry configEntry, |
| | | MessageBuilder unacceptableReason) { |
| | | LocalizableMessageBuilder unacceptableReason) { |
| | | DN dn = configEntry.getDN(); |
| | | AttributeValue av = dn.rdn().getAttributeValue(0); |
| | | String name = av.getValue().toString().trim(); |
| | |
| | | } |
| | | |
| | | // Let the add listener decide. |
| | | List<Message> reasons = new LinkedList<Message>(); |
| | | List<LocalizableMessage> reasons = new LinkedList<LocalizableMessage>(); |
| | | if (listener.isConfigurationAddAcceptable(cachedManagedObject, reasons)) { |
| | | return true; |
| | | } else { |
| | |
| | | import java.util.Set; |
| | | |
| | | import org.opends.messages.AdminMessages; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider; |
| | | import org.opends.server.admin.AbstractManagedObjectDefinition; |
| | | import org.opends.server.admin.AliasDefaultBehaviorProvider; |
| | |
| | | |
| | | |
| | | public boolean configChangeIsAcceptable(ConfigEntry configEntry, |
| | | MessageBuilder unacceptableReason) { |
| | | LocalizableMessageBuilder unacceptableReason) { |
| | | ConfigEntry dependentConfigEntry = getConfigEntry(dn); |
| | | if (dependentConfigEntry != null) { |
| | | return ConfigChangeListenerAdaptor.this.configChangeIsAcceptable( |
| | |
| | | |
| | | |
| | | public boolean configDeleteIsAcceptable(ConfigEntry configEntry, |
| | | MessageBuilder unacceptableReason) { |
| | | LocalizableMessageBuilder unacceptableReason) { |
| | | // Always acceptable. |
| | | return true; |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean configChangeIsAcceptable(ConfigEntry configEntry, |
| | | MessageBuilder unacceptableReason) { |
| | | LocalizableMessageBuilder unacceptableReason) { |
| | | return configChangeIsAcceptable(configEntry, unacceptableReason, |
| | | configEntry); |
| | | } |
| | |
| | | * does not. |
| | | */ |
| | | public boolean configChangeIsAcceptable(ConfigEntry configEntry, |
| | | MessageBuilder unacceptableReason, ConfigEntry newConfigEntry) { |
| | | LocalizableMessageBuilder unacceptableReason, ConfigEntry newConfigEntry) { |
| | | try { |
| | | ServerManagementContext context = ServerManagementContext.getInstance(); |
| | | cachedManagedObject = context.decode(path, configEntry, newConfigEntry); |
| | |
| | | } |
| | | |
| | | // Let the change listener decide. |
| | | List<Message> reasons = new LinkedList<Message>(); |
| | | List<LocalizableMessage> reasons = new LinkedList<LocalizableMessage>(); |
| | | if (listener.isConfigurationChangeAcceptable(cachedManagedObject,reasons)) { |
| | | return true; |
| | | } else { |
| | |
| | | if (configEntry != null) { |
| | | return configEntry; |
| | | } else { |
| | | Message message = AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST |
| | | LocalizableMessage message = AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST |
| | | .get(String.valueOf(dn)); |
| | | ErrorLogger.logError(message); |
| | | } |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | Message message = AdminMessages.ERR_ADMIN_CANNOT_GET_MANAGED_OBJECT.get( |
| | | LocalizableMessage message = AdminMessages.ERR_ADMIN_CANNOT_GET_MANAGED_OBJECT.get( |
| | | String.valueOf(dn), StaticUtils.getExceptionMessage(e)); |
| | | ErrorLogger.logError(message); |
| | | } |
| | |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.admin.Configuration; |
| | | import org.opends.server.admin.Constraint; |
| | | import org.opends.server.admin.DecodingException; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean configDeleteIsAcceptable(ConfigEntry configEntry, |
| | | MessageBuilder unacceptableReason) { |
| | | LocalizableMessageBuilder unacceptableReason) { |
| | | DN dn = configEntry.getDN(); |
| | | AttributeValue av = dn.rdn().getAttributeValue(0); |
| | | String name = av.getValue().toString().trim(); |
| | |
| | | return false; |
| | | } |
| | | |
| | | List<Message> reasons = new LinkedList<Message>(); |
| | | List<LocalizableMessage> reasons = new LinkedList<LocalizableMessage>(); |
| | | |
| | | // Enforce any constraints. |
| | | boolean isDeleteAllowed = true; |
| | |
| | | isDeleteAllowed = false; |
| | | } |
| | | } catch (ConfigException e) { |
| | | Message message = ERR_SERVER_CONSTRAINT_EXCEPTION.get(e |
| | | LocalizableMessage message = ERR_SERVER_CONSTRAINT_EXCEPTION.get(e |
| | | .getMessageObject()); |
| | | reasons.add(message); |
| | | isDeleteAllowed = false; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public ConfigException createDecodingExceptionAdaptor(DN dn, |
| | | DefinitionDecodingException e) { |
| | | Message message = AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM. |
| | | LocalizableMessage message = AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM. |
| | | get(String.valueOf(dn), stackTraceToSingleLineString(e)); |
| | | return new ConfigException(message, e); |
| | | } |
| | |
| | | public ConfigException createDecodingExceptionAdaptor( |
| | | ServerManagedObjectDecodingException e) { |
| | | DN dn = e.getPartialManagedObject().getDN(); |
| | | Message message = |
| | | LocalizableMessage message = |
| | | AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM.get( |
| | | String.valueOf(dn), |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | public ConfigException createDecodingExceptionAdaptor( |
| | | ConstraintViolationException e) { |
| | | DN dn = e.getManagedObject().getDN(); |
| | | Message message = AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM |
| | | LocalizableMessage message = AdminMessages.ERR_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM |
| | | .get(String.valueOf(dn), stackTraceToSingleLineString(e)); |
| | | return new ConfigException(message, e); |
| | | } |
| | |
| | | |
| | | public ConfigException createClassLoadingExceptionAdaptor(DN dn, |
| | | String className, Exception e) { |
| | | Message message = AdminMessages.ERR_ADMIN_CANNOT_INSTANTIATE_CLASS. |
| | | LocalizableMessage message = AdminMessages.ERR_ADMIN_CANNOT_INSTANTIATE_CLASS. |
| | | get(String.valueOf(className), String.valueOf(dn), |
| | | stackTraceToSingleLineString(e)); |
| | | return new ConfigException(message, e); |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * acceptable, or <code>false</code> if it is not. |
| | | */ |
| | | public boolean isConfigurationAddAcceptable(T configuration, |
| | | List<Message> unacceptableReasons); |
| | | List<LocalizableMessage> unacceptableReasons); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * acceptable, or <code>false</code> if it is not. |
| | | */ |
| | | public boolean isConfigurationChangeAcceptable(T configuration, |
| | | List<Message> unacceptableReasons); |
| | | List<LocalizableMessage> unacceptableReasons); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * acceptable, or <code>false</code> if it is not. |
| | | */ |
| | | public boolean isConfigurationDeleteAcceptable(T configuration, |
| | | List<Message> unacceptableReasons); |
| | | List<LocalizableMessage> unacceptableReasons); |
| | | |
| | | |
| | | |
| | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.admin.DecodingException; |
| | | import org.forgerock.util.Reject; |
| | | |
| | |
| | | |
| | | |
| | | // Gets the default message. |
| | | private static Message getDefaultMessage(Collection<Message> messages) { |
| | | private static LocalizableMessage getDefaultMessage(Collection<LocalizableMessage> messages) { |
| | | Reject.ifNull(messages); |
| | | Reject.ifFalse(!messages.isEmpty()); |
| | | |
| | |
| | | |
| | | |
| | | // Merge the messages into a single message. |
| | | private static Message getSingleMessage(Collection<Message> messages) { |
| | | private static LocalizableMessage getSingleMessage(Collection<LocalizableMessage> messages) { |
| | | if (messages.size() == 1) { |
| | | return messages.iterator().next(); |
| | | } else { |
| | | MessageBuilder builder = new MessageBuilder(); |
| | | LocalizableMessageBuilder builder = new LocalizableMessageBuilder(); |
| | | |
| | | boolean isFirst = true; |
| | | for (Message m : messages) { |
| | | for (LocalizableMessage m : messages) { |
| | | if (!isFirst) { |
| | | builder.append("; "); |
| | | } |
| | |
| | | } |
| | | |
| | | // The messages describing the constraint violations that occurred. |
| | | private final Collection<Message> messages; |
| | | private final Collection<LocalizableMessage> messages; |
| | | |
| | | |
| | | |
| | |
| | | * non-empty). |
| | | */ |
| | | public ConstraintViolationException(ServerManagedObject<?> managedObject, |
| | | Collection<Message> messages) { |
| | | Collection<LocalizableMessage> messages) { |
| | | super(getDefaultMessage(messages)); |
| | | |
| | | this.managedObject = managedObject; |
| | | this.messages = new ArrayList<Message>(messages); |
| | | this.messages = new ArrayList<LocalizableMessage>(messages); |
| | | } |
| | | |
| | | |
| | |
| | | * occurred. |
| | | */ |
| | | public ConstraintViolationException(ServerManagedObject<?> managedObject, |
| | | Message message) { |
| | | LocalizableMessage message) { |
| | | this(managedObject, Collections.singleton(message)); |
| | | } |
| | | |
| | |
| | | * @return Returns an unmodifiable collection view of the messages |
| | | * describing the constraint violations that occurred. |
| | | */ |
| | | public Collection<Message> getMessages() { |
| | | public Collection<LocalizableMessage> getMessages() { |
| | | return Collections.unmodifiableCollection(messages); |
| | | } |
| | | |
| | |
| | | * @return Returns a single message listing all the messages |
| | | * combined into a single list separated by semi-colons. |
| | | */ |
| | | public Message getMessagesAsSingleMessage() { |
| | | public LocalizableMessage getMessagesAsSingleMessage() { |
| | | return getSingleMessage(messages); |
| | | } |
| | | |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | |
| | | /** |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean configAddIsAcceptable(ConfigEntry configEntry, |
| | | MessageBuilder unacceptableReason) { |
| | | LocalizableMessageBuilder unacceptableReason) { |
| | | // Always acceptable. |
| | | return true; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | |
| | |
| | | |
| | | import java.util.Collection; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.config.ConfigException; |
| | | |
| | | |
| | |
| | | * from being evaluated. |
| | | */ |
| | | public boolean isDeleteAllowed(ServerManagedObject<?> managedObject, |
| | | Collection<Message> unacceptableReasons) throws ConfigException { |
| | | Collection<LocalizableMessage> unacceptableReasons) throws ConfigException { |
| | | return true; |
| | | } |
| | | |
| | |
| | | * from being evaluated. |
| | | */ |
| | | public boolean isUsable(ServerManagedObject<?> managedObject, |
| | | Collection<Message> unacceptableReasons) throws ConfigException { |
| | | Collection<LocalizableMessage> unacceptableReasons) throws ConfigException { |
| | | return true; |
| | | } |
| | | |
| | |
| | | import java.util.Set; |
| | | import java.util.SortedSet; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.Configuration; |
| | | import org.opends.server.admin.Constraint; |
| | | import org.opends.server.admin.InstantiableRelationDefinition; |
| | |
| | | void ensureIsUsable() throws ConstraintViolationException { |
| | | // Enforce any constraints. |
| | | boolean isUsable = true; |
| | | List<Message> reasons = new LinkedList<Message>(); |
| | | List<LocalizableMessage> reasons = new LinkedList<LocalizableMessage>(); |
| | | for (Constraint constraint : definition.getAllConstraints()) { |
| | | for (ServerConstraintHandler handler : constraint |
| | | .getServerConstraintHandlers()) { |
| | |
| | | isUsable = false; |
| | | } |
| | | } catch (ConfigException e) { |
| | | Message message = ERR_SERVER_CONSTRAINT_EXCEPTION.get(e |
| | | LocalizableMessage message = ERR_SERVER_CONSTRAINT_EXCEPTION.get(e |
| | | .getMessageObject()); |
| | | reasons.add(message); |
| | | isUsable = false; |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | Message message = ERR_ADMIN_CANNOT_GET_LISTENER_BASE.get( |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_GET_LISTENER_BASE.get( |
| | | String.valueOf(dn), stackTraceToSingleLineString(e)); |
| | | throw new ConfigException(message, e); |
| | | } |
| | |
| | | } |
| | | |
| | | // No parent entry could be found. |
| | | Message message = ERR_ADMIN_UNABLE_TO_REGISTER_LISTENER |
| | | LocalizableMessage message = ERR_ADMIN_UNABLE_TO_REGISTER_LISTENER |
| | | .get(String.valueOf(baseDN)); |
| | | throw new ConfigException(message); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | |
| | | |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * acceptable, or <code>false</code> if it is not. |
| | | */ |
| | | public boolean isConfigurationAddAcceptable( |
| | | ServerManagedObject<? extends T> mo, List<Message> unacceptableReasons); |
| | | ServerManagedObject<? extends T> mo, List<LocalizableMessage> unacceptableReasons); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.Configuration; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean isConfigurationAddAcceptable( |
| | | ServerManagedObject<? extends T> mo, List<Message> unacceptableReasons) { |
| | | ServerManagedObject<? extends T> mo, List<LocalizableMessage> unacceptableReasons) { |
| | | return listener.isConfigurationAddAcceptable(mo.getConfiguration(), |
| | | unacceptableReasons); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | |
| | | |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * acceptable, or <code>false</code> if it is not. |
| | | */ |
| | | public boolean isConfigurationChangeAcceptable( |
| | | ServerManagedObject<? extends T> mo, List<Message> unacceptableReasons); |
| | | ServerManagedObject<? extends T> mo, List<LocalizableMessage> unacceptableReasons); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.Configuration; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean isConfigurationChangeAcceptable( |
| | | ServerManagedObject<? extends T> mo, List<Message> unacceptableReasons) { |
| | | ServerManagedObject<? extends T> mo, List<LocalizableMessage> unacceptableReasons) { |
| | | return listener.isConfigurationChangeAcceptable(mo.getConfiguration(), |
| | | unacceptableReasons); |
| | | } |
| | |
| | | import java.util.Collections; |
| | | import java.util.LinkedList; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.admin.DecodingException; |
| | | import org.opends.server.admin.ManagedObjectDefinition; |
| | | import org.opends.server.admin.PropertyException; |
| | |
| | | |
| | | |
| | | // Create the message. |
| | | private static Message createMessage( |
| | | private static LocalizableMessage createMessage( |
| | | ServerManagedObject<?> partialManagedObject, |
| | | Collection<PropertyException> causes) { |
| | | Reject.ifNull(causes); |
| | |
| | | return ERR_MANAGED_OBJECT_DECODING_EXCEPTION_SINGLE.get(d |
| | | .getUserFriendlyName(), causes.iterator().next().getMessageObject()); |
| | | } else { |
| | | MessageBuilder builder = new MessageBuilder(); |
| | | LocalizableMessageBuilder builder = new LocalizableMessageBuilder(); |
| | | |
| | | boolean isFirst = true; |
| | | for (PropertyException cause : causes) { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | |
| | | |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * acceptable, or <code>false</code> if it is not. |
| | | */ |
| | | public boolean isConfigurationDeleteAcceptable( |
| | | ServerManagedObject<? extends T> mo, List<Message> unacceptableReasons); |
| | | ServerManagedObject<? extends T> mo, List<LocalizableMessage> unacceptableReasons); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.Configuration; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean isConfigurationDeleteAcceptable( |
| | | ServerManagedObject<? extends T> mo, List<Message> unacceptableReasons) { |
| | | ServerManagedObject<? extends T> mo, List<LocalizableMessage> unacceptableReasons) { |
| | | return listener.isConfigurationDeleteAcceptable(mo.getConfiguration(), |
| | | unacceptableReasons); |
| | | } |
| | |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.AbsoluteInheritedDefaultBehaviorProvider; |
| | | import org.opends.server.admin.AbstractManagedObjectDefinition; |
| | | import org.opends.server.admin.AggregationPropertyDefinition; |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | Message message = ERR_ADMIN_CANNOT_GET_MANAGED_OBJECT.get( |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_GET_MANAGED_OBJECT.get( |
| | | String.valueOf(dn), stackTraceToSingleLineString(e)); |
| | | throw new ConfigException(message, e); |
| | | } |
| | |
| | | // The configuration handler is free to return null indicating |
| | | // that the entry does not exist. |
| | | if (configEntry == null) { |
| | | Message message = ERR_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST |
| | | LocalizableMessage message = ERR_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST |
| | | .get(String.valueOf(dn)); |
| | | throw new ConfigException(message); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.AccessControlHandlerCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.*; |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | AccessControlHandlerCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by access control handler |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2011-2013 ForgeRock AS. |
| | | * Portions Copyright 2011-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.AccessLogPublisherCfg; |
| | | import org.opends.server.core.*; |
| | | import org.opends.server.types.*; |
| | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isConfigurationAcceptable(T configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by access log publisher |
| | |
| | | * information about the disconnect. |
| | | */ |
| | | public void logDisconnect(ClientConnection clientConnection, |
| | | DisconnectReason disconnectReason, Message message) |
| | | DisconnectReason disconnectReason, LocalizableMessage message) |
| | | { |
| | | // Do nothing |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server. |
| | | AccountStatusNotificationHandlerCfg; |
| | | import org.opends.server.config.ConfigException; |
| | |
| | | public boolean isConfigurationAcceptable( |
| | | AccountStatusNotificationHandlerCfg |
| | | configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by account status |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | AlertHandlerCfg configuration, |
| | | List<Message> unacceptableReasons); |
| | | List<LocalizableMessage> unacceptableReasons); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public void sendAlertNotification(AlertGenerator generator, |
| | | String alertType, |
| | | Message alertMessage); |
| | | LocalizableMessage alertMessage); |
| | | } |
| | | |
| | |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | AttributeSyntaxCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by attribute syntax |
| | |
| | | * with this syntax, or {@code false} if not. |
| | | */ |
| | | public abstract boolean valueIsAcceptable(ByteSequence value, |
| | | MessageBuilder invalidReason); |
| | | LocalizableMessageBuilder invalidReason); |
| | | |
| | | |
| | | |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2011 ForgeRock AS. |
| | | * Portions Copyright 2011-2014 ForgeRock AS. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.TimeThread; |
| | | |
| | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = DebugLogger.getTracer(); |
| | | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLocalizedLogger(AuthenticationPolicy.class); |
| | | |
| | | /** |
| | | * Returns the authentication policy for the user provided user. The following |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | logger.trace(e.getMessage(), e); |
| | | |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.trace("Could not parse password policy subentry " |
| | | + "DN %s for user %s", v.getValue(), |
| | | userDNString, e); |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugError("Could not parse password policy subentry " |
| | | + "DN %s for user %s: %s", v.getValue().toString(), |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | | Message message = ERR_PWPSTATE_CANNOT_DECODE_SUBENTRY_VALUE_AS_DN |
| | | .get(v.getValue().toString(), userDNString, e.getMessage()); |
| | | if (useDefaultOnError) |
| | | { |
| | | logError(message); |
| | | logger.error(ERR_PWPSTATE_CANNOT_DECODE_SUBENTRY_VALUE_AS_DN, |
| | | v.getValue().toString(), userDNString, e.getMessage()); |
| | | return DirectoryServer.getDefaultPasswordPolicy(); |
| | | } |
| | | else |
| | | { |
| | | LocalizableMessage message = ERR_PWPSTATE_CANNOT_DECODE_SUBENTRY_VALUE_AS_DN |
| | | .get(v.getValue().toString(), userDNString, e.getMessage()); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, message, |
| | | e); |
| | | } |
| | |
| | | .getAuthenticationPolicy(subentryDN); |
| | | if (policy == null) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugError("Password policy subentry %s for user %s " |
| | | logger.trace("Password policy subentry %s for user %s " |
| | | + "is not defined in the Directory Server.", |
| | | String.valueOf(subentryDN), userDNString); |
| | | } |
| | | subentryDN, userDNString); |
| | | |
| | | Message message = ERR_PWPSTATE_NO_SUCH_POLICY.get(userDNString, |
| | | LocalizableMessage message = ERR_PWPSTATE_NO_SUCH_POLICY.get(userDNString, |
| | | String.valueOf(subentryDN)); |
| | | if (useDefaultOnError) |
| | | { |
| | | logError(message); |
| | | //logger.error(message); |
| | | return DirectoryServer.getDefaultPasswordPolicy(); |
| | | } |
| | | else |
| | |
| | | } |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("Using password policy subentry %s for user %s.", |
| | | String.valueOf(subentryDN), userDNString); |
| | | } |
| | | logger.trace("Using password policy subentry %s for user %s.", |
| | | subentryDN, userDNString); |
| | | |
| | | return policy; |
| | | } |
| | |
| | | { |
| | | // This shouldn't happen but if it does debug log |
| | | // this problem and fall back to default policy. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugError("Found unknown password policy subentry " |
| | | + "DN %s for user %s", subentry.getDN().toString(), |
| | | logger.trace("Found unknown password policy subentry " |
| | | + "DN %s for user %s", subentry.getDN(), |
| | | userDNString); |
| | | } |
| | | break; |
| | | } |
| | | return policy; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugError("Could not parse password policy subentry " |
| | | + "DN %s for user %s: %s", subentry.getDN().toString(), |
| | | if (logger.isTraceEnabled()) { |
| | | logger.trace("Could not parse password policy subentry " |
| | | + "DN %s for user %s: %s", subentry.getDN(), |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | // No authentication policy found, so use the global default. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("Using the default password policy for user %s", |
| | | logger.trace("Using the default password policy for user %s", |
| | | userDNString); |
| | | } |
| | | |
| | | return DirectoryServer.getDefaultPasswordPolicy(); |
| | | } |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2011 ForgeRock AS. |
| | | * Portions Copyright 2011-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.api; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.AuthenticationPolicyCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.types.InitializationException; |
| | |
| | | * configuration is acceptable, or <code>false</code> if it is not. |
| | | */ |
| | | boolean isConfigurationAcceptable(T configuration, |
| | | List<Message> unacceptableReasons); |
| | | List<LocalizableMessage> unacceptableReasons); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.schema.GeneralizedTimeSyntax; |
| | |
| | | attributeType.getNameOrOID(), entry.getName().toString()); |
| | | } |
| | | |
| | | final Message message = ERR_PWPSTATE_CANNOT_DECODE_BOOLEAN |
| | | final LocalizableMessage message = ERR_PWPSTATE_CANNOT_DECODE_BOOLEAN |
| | | .get(valueString, attributeType.getNameOrOID(), entry.getName() |
| | | .toString()); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | |
| | | stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | | final Message message = ERR_PWPSTATE_CANNOT_DECODE_GENERALIZED_TIME |
| | | final LocalizableMessage message = ERR_PWPSTATE_CANNOT_DECODE_GENERALIZED_TIME |
| | | .get(v.getValue().toString(), attributeType.getNameOrOID(), entry |
| | | .getName().toString(), String.valueOf(e)); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | Configuration configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by backend implementations |
| | |
| | | { |
| | | if (subBaseDNs.length > 1) |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | ERR_BACKEND_CANNOT_REMOVE_MULTIBASE_SUB_SUFFIX. |
| | | get(String.valueOf(subSuffixDN), |
| | | String.valueOf(parentDN)); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | CertificateMapperCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by certificate mapper |
| | |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.plugin.PluginResult; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.PersistentSearch; |
| | |
| | | mustEvaluateNetworkGroup = true; |
| | | if (debugEnabled()) |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | INFO_CHANGE_NETWORK_GROUP.get( |
| | | getConnectionID(), |
| | | "null", |
| | |
| | | */ |
| | | public abstract void disconnect(DisconnectReason disconnectReason, |
| | | boolean sendNotification, |
| | | Message message); |
| | | LocalizableMessage message); |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | DN authDN = authenticationInfo.getAuthenticationDN(); |
| | | |
| | | Message message = INFO_CLIENTCONNECTION_AUDIT_HASPRIVILEGE |
| | | LocalizableMessage message = INFO_CLIENTCONNECTION_AUDIT_HASPRIVILEGE |
| | | .get(getConnectionID(), -1L, |
| | | String.valueOf(authDN), |
| | | privilege.getName(), result); |
| | |
| | | { |
| | | DN authDN = authenticationInfo.getAuthenticationDN(); |
| | | |
| | | Message message = |
| | | LocalizableMessage message = |
| | | INFO_CLIENTCONNECTION_AUDIT_HASPRIVILEGE.get( |
| | | getConnectionID(), |
| | | operation.getOperationID(), |
| | |
| | | { |
| | | DN authDN = authenticationInfo.getAuthenticationDN(); |
| | | |
| | | Message message = |
| | | LocalizableMessage message = |
| | | INFO_CLIENTCONNECTION_AUDIT_HASPRIVILEGES.get( |
| | | getConnectionID(), -1L, |
| | | String.valueOf(authDN), |
| | |
| | | { |
| | | DN authDN = authenticationInfo.getAuthenticationDN(); |
| | | |
| | | Message message = INFO_CLIENTCONNECTION_AUDIT_HASPRIVILEGES |
| | | LocalizableMessage message = INFO_CLIENTCONNECTION_AUDIT_HASPRIVILEGES |
| | | .get( |
| | | getConnectionID(), |
| | | operation.getOperationID(), |
| | |
| | | if (this.networkGroup != networkGroup) { |
| | | if (debugEnabled()) |
| | | { |
| | | Message message = |
| | | LocalizableMessage message = |
| | | INFO_CHANGE_NETWORK_GROUP.get( |
| | | getConnectionID(), |
| | | this.networkGroup.getID(), |
| | |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeBuilder; |
| | |
| | | Entry<AttributeType, Set<String>> ad = adDecodeMap.get(id); |
| | | if (ad == null) |
| | | { |
| | | final Message message = ERR_COMPRESSEDSCHEMA_UNRECOGNIZED_AD_TOKEN |
| | | final LocalizableMessage message = ERR_COMPRESSEDSCHEMA_UNRECOGNIZED_AD_TOKEN |
| | | .get(String.valueOf(id)); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | |
| | | } |
| | | else |
| | | { |
| | | final Message message = ERR_COMPRESSEDSCHEMA_UNKNOWN_OC_TOKEN.get(String |
| | | final LocalizableMessage message = ERR_COMPRESSEDSCHEMA_UNKNOWN_OC_TOKEN.get(String |
| | | .valueOf(id)); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | |
| | | /** |
| | |
| | | * not. |
| | | */ |
| | | public boolean configAddIsAcceptable(ConfigEntry configEntry, |
| | | MessageBuilder unacceptableReason); |
| | | LocalizableMessageBuilder unacceptableReason); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | |
| | | /** |
| | |
| | | * not. |
| | | */ |
| | | public boolean configChangeIsAcceptable(ConfigEntry configEntry, |
| | | MessageBuilder unacceptableReason); |
| | | LocalizableMessageBuilder unacceptableReason); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | |
| | | /** |
| | |
| | | * the configuration, or {@code false} if not. |
| | | */ |
| | | public boolean configDeleteIsAcceptable(ConfigEntry configEntry, |
| | | MessageBuilder unacceptableReason); |
| | | LocalizableMessageBuilder unacceptableReason); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012-2013 ForgeRock AS. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.ConnectionHandlerCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.monitors.ConnectionHandlerMonitor; |
| | |
| | | * finalized. |
| | | */ |
| | | public abstract void finalizeConnectionHandler( |
| | | Message finalizeReason); |
| | | LocalizableMessage finalizeReason); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | ConnectionHandlerCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by connection handler |
| | |
| | | int cpus = Runtime.getRuntime().availableProcessors(); |
| | | int value = Math.max(2, cpus / 2); |
| | | |
| | | Message message = |
| | | LocalizableMessage message = |
| | | INFO_ERGONOMIC_SIZING_OF_REQUEST_HANDLER_THREADS.get(friendlyName, |
| | | value); |
| | | logError(message); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012-2013 ForgeRock AS. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | import com.sleepycat.je.OperationStatus; |
| | | import com.sleepycat.je.Transaction; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.DebugLogPublisherCfg; |
| | | import org.opends.server.loggers.LogLevel; |
| | | import org.opends.server.loggers.debug.TraceSettings; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isConfigurationAcceptable(T configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by debug log publisher |
| | |
| | | |
| | | |
| | | /** |
| | | * Log a constructor entry. |
| | | * |
| | | * @param level The log level for the message. |
| | | * @param settings The current trace settings in effect. |
| | | * @param signature The constructor signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param args The parameters provided to the |
| | | * constructor. |
| | | * @param stackTrace The stack trace at the time the |
| | | * constructor is executed or null if its |
| | | * not available. |
| | | */ |
| | | public abstract void traceConstructor(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | Object[] args, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Log a non-static method entry. |
| | | * |
| | | * @param level The log level for the message. |
| | | * @param settings The current trace settings in effect. |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param obj The object instance on which the method |
| | | * has been invoked. |
| | | * @param args The parameters provided to the method. |
| | | * @param stackTrace The stack trace at the time the method |
| | | * is executed or null if its not available. |
| | | */ |
| | | public abstract void traceMethodEntry(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | Object obj, |
| | | Object[] args, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Log a static method entry. |
| | | * |
| | | * @param level The log level for the message. |
| | | * @param settings The current trace settings in effect. |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param args The parameters provided to the method. |
| | | * @param stackTrace The stack trace at the time the method |
| | | * is executed or null if its not available. |
| | | */ |
| | | public abstract void traceStaticMethodEntry(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | Object[] args, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Log a method return. |
| | | * |
| | | * @param level The log level for the message. |
| | | * @param settings The current trace settings in effect. |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param ret The return value for the method. |
| | | * @param stackTrace The stack trace at the time the method |
| | | * is returned or null if its not available. |
| | | */ |
| | | public abstract void traceReturn(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | Object ret, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Log an arbitrary event in a method. |
| | | * |
| | | * @param level The log level for the message. |
| | | * @param settings The current trace settings in effect. |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | |
| | | * @param stackTrace The stack trace at the time the message |
| | | * is logged or null if its not available. |
| | | */ |
| | | public abstract void traceMessage(LogLevel level, |
| | | TraceSettings settings, |
| | | public abstract void traceMessage(TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | String msg, |
| | |
| | | |
| | | |
| | | /** |
| | | * Log a thrown exception in a method. |
| | | * |
| | | * @param level The log level for the message. |
| | | * @param settings The current trace settings in effect. |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param ex The exception that was thrown. |
| | | * @param stackTrace The stack trace at the time the exception |
| | | * is thrown or null if its not available. |
| | | */ |
| | | public abstract void traceThrown(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | Throwable ex, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Log a caught exception in a method. |
| | | * |
| | | * @param level The log level for the message. |
| | | * @param settings The current trace settings in effect. |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param msg TODO |
| | | * @param ex The exception that was caught. |
| | | * @param stackTrace The stack trace at the time the exception |
| | | * is caught or null if its not available. |
| | | */ |
| | | public abstract void traceCaught(LogLevel level, |
| | | TraceSettings settings, |
| | | public abstract void traceCaught(TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | Throwable ex, |
| | | StackTraceElement[] stackTrace); |
| | | String msg, |
| | | Throwable ex, StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Log an JE database access in a method. |
| | | * |
| | | * @param level The log level for the message. |
| | | * @param settings The current trace settings in effect. |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | |
| | | * @param stackTrace The stack trace at the time the access |
| | | * occurred or null if its not available. |
| | | */ |
| | | public abstract void traceJEAccess(LogLevel level, |
| | | TraceSettings settings, |
| | | public abstract void traceJEAccess(TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | OperationStatus status, |
| | |
| | | |
| | | |
| | | /** |
| | | * Log raw data in a method. |
| | | * |
| | | * @param level The log level for the message. |
| | | * @param settings The current trace settings in effect. |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param data The data to dump. |
| | | * @param stackTrace The stack trace at the time the data |
| | | * is logged or null if its not available. |
| | | */ |
| | | public abstract void traceData(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | byte[] data, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Log a protocol element in a method. |
| | | * |
| | | * @param level The log level for the message. |
| | | * @param settings The current trace settings in effect. |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | |
| | | * element is logged or null if its not |
| | | * available. |
| | | */ |
| | | public abstract void traceProtocolElement(LogLevel level, |
| | | TraceSettings settings, |
| | | public abstract void traceProtocolElement(TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | String decodedForm, |
| | | StackTraceElement[] stackTrace); |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | Message message = ERR_UNCAUGHT_THREAD_EXCEPTION.get( |
| | | LocalizableMessage message = ERR_UNCAUGHT_THREAD_EXCEPTION.get( |
| | | t.getName(), stackTraceToSingleLineString(e)); |
| | | logError(message); |
| | | DirectoryServer.sendAlertNotification(this, |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | EntryCacheCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by entry cache |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | import org.opends.messages.Category; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.messages.Severity; |
| | | import org.opends.server.admin.std.server.ErrorLogPublisherCfg; |
| | | |
| | |
| | | * The hash map that will be used to define specific log severities |
| | | * for the various categories. |
| | | */ |
| | | protected Map<Category, Set<Severity>> definedSeverities = |
| | | new HashMap<Category, Set<Severity>>(); |
| | | protected Map<String, Set<Severity>> definedSeverities = |
| | | new HashMap<String, Set<Severity>>(); |
| | | |
| | | |
| | | |
| | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isConfigurationAcceptable(T configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by error log publisher |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Writes a message to the error log using the provided information. The |
| | | * message's category and severity information will be used to determine |
| | | * whether to actually log this message. |
| | | * |
| | | * @param message |
| | | * The message to be logged. |
| | | */ |
| | | public void logError(LocalizableMessage message) { |
| | | // TODO : to remove |
| | | } |
| | | |
| | | /** |
| | | * Writes a message to the error log using the provided information. |
| | | * The message's category and severity information will be used to |
| | | * determine whether to actually log this message. |
| | | * <p> |
| | | * The category and severity information are used to determine whether to |
| | | * actually log this message. |
| | | * |
| | | * @param message The message to be logged. |
| | | * @param category |
| | | * The category of the message. |
| | | * @param severity |
| | | * The severity of the message. |
| | | * @param message |
| | | * The message to be logged. |
| | | * @param exception |
| | | * The exception to be logged. |
| | | */ |
| | | public abstract void logError(Message message); |
| | | public abstract void log(String category, Severity severity, |
| | | LocalizableMessage message, Throwable exception); |
| | | |
| | | /** |
| | | * Check if a message should be logged for the provided category and severity. |
| | | * |
| | | * @param category |
| | | * The category of the message. |
| | | * @param severity |
| | | * The severity of the message. |
| | | * @return {@code true} if the message should be logged, {@code false} |
| | | * otherwise |
| | | */ |
| | | public abstract boolean isEnabledFor(String category, Severity severity); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2013 ForgeRock AS |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.ExtendedOperationHandlerCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | ExtendedOperationHandlerCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by extended operation |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.util.List; |
| | | import org.opends.server.admin.std.server.ExtensionCfg; |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | ExtensionCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by extension |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2012 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | GroupImplementationCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by group implementations |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.HTTPAccessLogPublisherCfg; |
| | | import org.opends.server.loggers.HTTPRequestInfo; |
| | | |
| | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isConfigurationAcceptable(T configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by HTTP access log publisher |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | IdentityMapperCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by identity mapper |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | T configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by key manager provider |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2011-2013 ForgeRock AS. |
| | | * Portions Copyright 2011-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | | import java.io.Closeable; |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.LogPublisherCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.ServerContext; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | |
| | | * @param config |
| | | * The publisher configuration that contains the information to use |
| | | * to initialize this publisher. |
| | | * @param serverContext |
| | | * The server context. |
| | | * @throws ConfigException |
| | | * If an unrecoverable problem arises in the process of performing |
| | | * the initialization as a result of the server configuration. |
| | |
| | | * If a problem occurs during initialization that is not related to |
| | | * the server configuration. |
| | | */ |
| | | void initializeLogPublisher(T config) throws ConfigException, |
| | | void initializeLogPublisher(T config, ServerContext serverContext) throws ConfigException, |
| | | InitializationException; |
| | | |
| | | |
| | |
| | | * log publisher, or {@code false} if not. |
| | | */ |
| | | boolean isConfigurationAcceptable(T configuration, |
| | | List<Message> unacceptableReasons); |
| | | List<LocalizableMessage> unacceptableReasons); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | |
| | | import org.opends.server.admin.std.server.MatchingRuleCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | T configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by matching rule |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | MonitorProviderCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by monitor provider |
| | |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | PasswordGeneratorCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by password generator |
| | |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | PasswordStorageSchemeCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by password storage scheme |
| | |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | PasswordValidatorCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by password validator |
| | |
| | | Set<ByteString> currentPasswords, |
| | | Operation operation, |
| | | Entry userEntry, |
| | | MessageBuilder invalidReason); |
| | | LocalizableMessageBuilder invalidReason); |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.api; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.QOSPolicyCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.types.InitializationException; |
| | |
| | | * it is not. |
| | | */ |
| | | boolean isConfigurationAcceptable(T configuration, |
| | | List<Message> unacceptableReasons); |
| | | List<LocalizableMessage> unacceptableReasons); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | SASLMechanismHandlerCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by SASL mechanism handler |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * @param reason The human-readable reason for the shutdown. |
| | | */ |
| | | public void processServerShutdown(Message reason); |
| | | public void processServerShutdown(LocalizableMessage reason); |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | SynchronizationProviderCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by synchronization |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | TrustManagerProviderCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by trust manager provider |
| | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.VirtualAttributeCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.SearchOperation; |
| | |
| | | */ |
| | | public boolean isConfigurationAcceptable( |
| | | VirtualAttributeCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by virtual attribute |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.WorkQueueCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.types.DirectoryException; |
| | |
| | | * @param reason The human-readable reason that the work queue is |
| | | * being shut down. |
| | | */ |
| | | public abstract void finalizeWorkQueue(Message reason); |
| | | public abstract void finalizeWorkQueue(LocalizableMessage reason); |
| | | |
| | | |
| | | |
| | |
| | | int cpus = Runtime.getRuntime().availableProcessors(); |
| | | int value = Math.max(24, cpus * 2); |
| | | |
| | | Message message = INFO_ERGONOMIC_SIZING_OF_WORKER_THREAD_POOL.get(value); |
| | | LocalizableMessage message = INFO_ERGONOMIC_SIZING_OF_WORKER_THREAD_POOL.get(value); |
| | | logError(message); |
| | | |
| | | return value; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api.plugin; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | * for this plugin, or {@code false} if not. |
| | | */ |
| | | public boolean isConfigurationAcceptable(PluginCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // This default implementation does not perform any special |
| | | // validation. It should be overridden by plugin implementations |
| | |
| | | */ |
| | | public PluginResult.Startup doStartup() |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | String.valueOf(pluginDN), PluginType.STARTUP.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | | } |
| | |
| | | * |
| | | * @param reason The human-readable reason for the shutdown. |
| | | */ |
| | | public void doShutdown(Message reason) |
| | | public void doShutdown(LocalizableMessage reason) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | String.valueOf(pluginDN), PluginType.SHUTDOWN.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | | } |
| | |
| | | public PluginResult.PostConnect doPostConnect(ClientConnection |
| | | clientConnection) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | String.valueOf(pluginDN), PluginType.POST_CONNECT.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | | } |
| | |
| | | public PluginResult.PostDisconnect |
| | | doPostDisconnect(ClientConnection clientConnection, |
| | | DisconnectReason disconnectReason, |
| | | Message message) |
| | | LocalizableMessage message) |
| | | { |
| | | Message msg = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage msg = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_DISCONNECT.getName()); |
| | | throw new UnsupportedOperationException(msg.toString()); |
| | |
| | | public PluginResult.ImportLDIF |
| | | doLDIFImport(LDIFImportConfig importConfig, Entry entry) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | String.valueOf(pluginDN), PluginType.LDIF_IMPORT.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | | } |
| | |
| | | */ |
| | | public void doLDIFImportEnd(LDIFImportConfig importConfig) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | String.valueOf(pluginDN), |
| | | PluginType.LDIF_IMPORT_END.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | */ |
| | | public void doLDIFImportBegin(LDIFImportConfig importConfig) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | String.valueOf(pluginDN), |
| | | PluginType.LDIF_IMPORT_BEGIN.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.ImportLDIF |
| | | doLDIFExport(LDIFExportConfig exportConfig, Entry entry) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | String.valueOf(pluginDN), PluginType.LDIF_EXPORT.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | | } |
| | |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseAbandonOperation abandonOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_ABANDON.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationAbandonOperation abandonOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_ABANDON.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseAddOperation addOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | String.valueOf(pluginDN), PluginType.PRE_PARSE_ADD.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | | } |
| | |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationAddOperation addOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_ADD.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationAddOperation addOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_ADD.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseAddOperation addOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_ADD.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public void doPostSynchronization( |
| | | PostSynchronizationAddOperation addOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_SYNCHRONIZATION_ADD.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseBindOperation bindOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_BIND.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationBindOperation bindOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_BIND.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationBindOperation bindOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_BIND.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseBindOperation bindOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_BIND.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseCompareOperation compareOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_COMPARE.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationCompareOperation compareOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_COMPARE.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationCompareOperation compareOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_COMPARE.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseCompareOperation compareOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_COMPARE.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseDeleteOperation deleteOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_DELETE.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationDeleteOperation deleteOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_DELETE.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationDeleteOperation deleteOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_DELETE.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseDeleteOperation deleteOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_DELETE.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public void doPostSynchronization( |
| | | PostSynchronizationDeleteOperation deleteOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_SYNCHRONIZATION_DELETE.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseExtendedOperation extendedOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_EXTENDED.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationExtendedOperation extendedOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_EXTENDED.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | doPostOperation(PostOperationExtendedOperation |
| | | extendedOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_EXTENDED.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseExtendedOperation extendedOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_EXTENDED.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseModifyOperation modifyOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_MODIFY.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationModifyOperation modifyOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_MODIFY.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationModifyOperation modifyOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_MODIFY.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseModifyOperation modifyOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_MODIFY.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public void doPostSynchronization( |
| | | PostSynchronizationModifyOperation modifyOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_SYNCHRONIZATION_MODIFY.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseModifyDNOperation modifyDNOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_MODIFY_DN.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationModifyDNOperation modifyDNOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_MODIFY_DN.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | Entry oldEntry, Entry newEntry, |
| | | List<Modification> modifications) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | String.valueOf(pluginDN), |
| | | PluginType.SUBORDINATE_MODIFY_DN.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | processSubordinateDelete(DeleteOperation |
| | | deleteOperation, Entry entry) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get( |
| | | String.valueOf(pluginDN), |
| | | PluginType.SUBORDINATE_MODIFY_DN.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | doPostOperation(PostOperationModifyDNOperation |
| | | modifyDNOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_MODIFY_DN.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseModifyDNOperation modifyDNOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_MODIFY_DN.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public void doPostSynchronization( |
| | | PostSynchronizationModifyDNOperation modifyDNOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_SYNCHRONIZATION_MODIFY_DN.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseSearchOperation searchOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_SEARCH.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreOperation |
| | | doPreOperation(PreOperationSearchOperation searchOperation) |
| | | throws CanceledOperationException { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_OPERATION_SEARCH.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | processSearchEntry(SearchEntrySearchOperation searchOperation, |
| | | SearchResultEntry searchEntry) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.SEARCH_RESULT_ENTRY.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | searchOperation, |
| | | SearchResultReference searchReference) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.SEARCH_RESULT_REFERENCE.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationSearchOperation searchOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_SEARCH.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostResponse |
| | | doPostResponse(PostResponseSearchOperation searchOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_RESPONSE_SEARCH.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PreParse |
| | | doPreParse(PreParseUnbindOperation unbindOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.PRE_PARSE_UNBIND.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | public PluginResult.PostOperation |
| | | doPostOperation(PostOperationUnbindOperation unbindOperation) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.POST_OPERATION_UNBIND.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | processIntermediateResponse( |
| | | IntermediateResponse intermediateResponse) |
| | | { |
| | | Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | LocalizableMessage message = ERR_PLUGIN_TYPE_NOT_SUPPORTED. |
| | | get(String.valueOf(pluginDN), |
| | | PluginType.INTERMEDIATE_RESPONSE.getName()); |
| | | throw new UnsupportedOperationException(message.toString()); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.api.plugin; |
| | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.PluginCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.types.DN; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public final boolean isConfigurationAcceptable( |
| | | PluginCfg configuration, List<Message> unacceptableReasons) |
| | | PluginCfg configuration, List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | | // Unused. |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.api.plugin; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DisconnectReason; |
| | |
| | | private final boolean continuePluginProcessing; |
| | | |
| | | // An message explaining why startup should stop. |
| | | private final Message errorMessage; |
| | | private final LocalizableMessage errorMessage; |
| | | |
| | | private static Startup DEFAULT_RESULT = |
| | | new Startup(true, true, null); |
| | |
| | | */ |
| | | private Startup(boolean continueProcessing, |
| | | boolean continuePluginProcessing, |
| | | Message errorMessage) |
| | | LocalizableMessage errorMessage) |
| | | { |
| | | this.continueProcessing = continueProcessing; |
| | | this.errorMessage = errorMessage; |
| | |
| | | * |
| | | * @return a new stop processing startup plugin result. |
| | | */ |
| | | public static Startup stopStartup(Message errorMessage) |
| | | public static Startup stopStartup(LocalizableMessage errorMessage) |
| | | { |
| | | return new Startup(false, false, errorMessage); |
| | | } |
| | |
| | | * @return An error message explaining why processing should |
| | | * stop or <code>null</code> if none is provided. |
| | | */ |
| | | public Message getErrorMessage() |
| | | public LocalizableMessage getErrorMessage() |
| | | { |
| | | return errorMessage; |
| | | } |
| | |
| | | private final boolean continuePluginProcessing; |
| | | |
| | | // An message explaining why processing should stop. |
| | | private final Message errorMessage; |
| | | private final LocalizableMessage errorMessage; |
| | | |
| | | // The matched DN for this result. |
| | | private final DN matchedDN; |
| | |
| | | */ |
| | | private PreParse (boolean continueProcessing, |
| | | boolean continuePluginProcessing, |
| | | Message errorMessage, |
| | | LocalizableMessage errorMessage, |
| | | ResultCode resultCode, DN matchedDN, |
| | | List<String> referralURLs) |
| | | { |
| | |
| | | * @return a new stop processing pre parse plugin result. |
| | | */ |
| | | public static PreParse stopProcessing(ResultCode resultCode, |
| | | Message errorMessage, |
| | | LocalizableMessage errorMessage, |
| | | DN matchedDN, |
| | | List<String> referralURLs) |
| | | { |
| | |
| | | * @return a new stop processing pre parse plugin result. |
| | | */ |
| | | public static PreParse stopProcessing(ResultCode resultCode, |
| | | Message errorMessage) |
| | | LocalizableMessage errorMessage) |
| | | { |
| | | return new PreParse(false, false, errorMessage, resultCode, |
| | | null, null); |
| | |
| | | * @return An error message explaining why processing should |
| | | * stop or <code>null</code> if none is provided. |
| | | */ |
| | | public Message getErrorMessage() |
| | | public LocalizableMessage getErrorMessage() |
| | | { |
| | | return errorMessage; |
| | | } |
| | |
| | | private final boolean continuePluginProcessing; |
| | | |
| | | // An message explaining why processing should stop. |
| | | private final Message errorMessage; |
| | | private final LocalizableMessage errorMessage; |
| | | |
| | | // The matched DN for this result. |
| | | private final DN matchedDN; |
| | |
| | | */ |
| | | private PreOperation (boolean continueProcessing, |
| | | boolean continuePluginProcessing, |
| | | Message errorMessage, |
| | | LocalizableMessage errorMessage, |
| | | ResultCode resultCode, DN matchedDN, |
| | | List<String> referralURLs) |
| | | { |
| | |
| | | * @return a new stop processing pre operation plugin result. |
| | | */ |
| | | public static PreOperation stopProcessing( |
| | | ResultCode resultCode, Message errorMessage, DN matchedDN, |
| | | ResultCode resultCode, LocalizableMessage errorMessage, DN matchedDN, |
| | | List<String> referralURLs) |
| | | { |
| | | return new PreOperation(false, false, errorMessage, resultCode, |
| | |
| | | * @return a new stop processing pre operation plugin result. |
| | | */ |
| | | public static PreOperation stopProcessing(ResultCode resultCode, |
| | | Message errorMessage) |
| | | LocalizableMessage errorMessage) |
| | | { |
| | | return new PreOperation(false, false, errorMessage, resultCode, |
| | | null, null); |
| | |
| | | * @return An error message explaining why processing should |
| | | * stop or <code>null</code> if none is provided. |
| | | */ |
| | | public Message getErrorMessage() |
| | | public LocalizableMessage getErrorMessage() |
| | | { |
| | | return errorMessage; |
| | | } |
| | |
| | | private final boolean continueProcessing; |
| | | |
| | | // An message explaining why processing should stop. |
| | | private final Message errorMessage; |
| | | private final LocalizableMessage errorMessage; |
| | | |
| | | // The matched DN for this result. |
| | | private final DN matchedDN; |
| | |
| | | * @param referralURLs The set of referral URLs for this result. |
| | | */ |
| | | private PostOperation(boolean continueProcessing, |
| | | Message errorMessage, |
| | | LocalizableMessage errorMessage, |
| | | ResultCode resultCode, DN matchedDN, |
| | | List<String> referralURLs) |
| | | { |
| | |
| | | * @return a new stop processing post operation plugin result. |
| | | */ |
| | | public static PostOperation stopProcessing( |
| | | ResultCode resultCode, Message errorMessage, DN matchedDN, |
| | | ResultCode resultCode, LocalizableMessage errorMessage, DN matchedDN, |
| | | List<String> referralURLs) |
| | | { |
| | | return new PostOperation(false, errorMessage, resultCode, |
| | |
| | | * @return a new stop processing post operation plugin result. |
| | | */ |
| | | public static PostOperation stopProcessing(ResultCode resultCode, |
| | | Message errorMessage) |
| | | LocalizableMessage errorMessage) |
| | | { |
| | | return new PostOperation(false, errorMessage, resultCode, null, |
| | | null); |
| | |
| | | * @return An error message explaining why processing should |
| | | * stop or <code>null</code> if none is provided. |
| | | */ |
| | | public Message getErrorMessage() |
| | | public LocalizableMessage getErrorMessage() |
| | | { |
| | | return errorMessage; |
| | | } |
| | |
| | | private final boolean continuePluginProcessing; |
| | | |
| | | // An message explaining why processing should stop. |
| | | private final Message errorMessage; |
| | | private final LocalizableMessage errorMessage; |
| | | |
| | | private static ImportLDIF DEFAULT_RESULT = |
| | | new ImportLDIF(true, true, null); |
| | |
| | | */ |
| | | private ImportLDIF(boolean continueProcessing, |
| | | boolean continuePluginProcessing, |
| | | Message errorMessage) |
| | | LocalizableMessage errorMessage) |
| | | { |
| | | this.continueProcessing = continueProcessing; |
| | | this.errorMessage = errorMessage; |
| | |
| | | * |
| | | * @return a new stop processing LDIF import plugin result. |
| | | */ |
| | | public static ImportLDIF stopEntryProcessing(Message errorMessage) |
| | | public static ImportLDIF stopEntryProcessing(LocalizableMessage errorMessage) |
| | | { |
| | | return new ImportLDIF(false, false, errorMessage); |
| | | } |
| | |
| | | * @return An error message explaining why processing should |
| | | * stop or <code>null</code> if none is provided. |
| | | */ |
| | | public Message getErrorMessage() |
| | | public LocalizableMessage getErrorMessage() |
| | | { |
| | | return errorMessage; |
| | | } |
| | |
| | | private final boolean continuePluginProcessing; |
| | | |
| | | // An message explaining why processing should stop. |
| | | private final Message errorMessage; |
| | | private final LocalizableMessage errorMessage; |
| | | |
| | | // The matched DN for this result. |
| | | private final DN matchedDN; |
| | |
| | | */ |
| | | private SubordinateModifyDN(boolean continueProcessing, |
| | | boolean continuePluginProcessing, |
| | | Message errorMessage, |
| | | LocalizableMessage errorMessage, |
| | | ResultCode resultCode, DN matchedDN, |
| | | List<String> referralURLs) |
| | | { |
| | |
| | | * result. |
| | | */ |
| | | public static SubordinateModifyDN stopProcessing( |
| | | ResultCode resultCode, Message errorMessage, DN matchedDN, |
| | | ResultCode resultCode, LocalizableMessage errorMessage, DN matchedDN, |
| | | List<String> referralURLs) |
| | | { |
| | | return new SubordinateModifyDN(false, false, errorMessage, |
| | |
| | | * result. |
| | | */ |
| | | public static SubordinateModifyDN stopProcessing( |
| | | ResultCode resultCode, Message errorMessage) |
| | | ResultCode resultCode, LocalizableMessage errorMessage) |
| | | { |
| | | return new SubordinateModifyDN(false, false, errorMessage, |
| | | resultCode, null, null); |
| | |
| | | * @return An error message explaining why processing should |
| | | * stop or <code>null</code> if none is provided. |
| | | */ |
| | | public Message getErrorMessage() |
| | | public LocalizableMessage getErrorMessage() |
| | | { |
| | | return errorMessage; |
| | | } |
| | |
| | | private final boolean continuePluginProcessing; |
| | | |
| | | // An message explaining why processing should stop. |
| | | private final Message errorMessage; |
| | | private final LocalizableMessage errorMessage; |
| | | |
| | | // The matched DN for this result. |
| | | private final DN matchedDN; |
| | |
| | | */ |
| | | private SubordinateDelete(boolean continueProcessing, |
| | | boolean continuePluginProcessing, |
| | | Message errorMessage, |
| | | LocalizableMessage errorMessage, |
| | | ResultCode resultCode, DN matchedDN, |
| | | List<String> referralURLs) |
| | | { |
| | |
| | | * result. |
| | | */ |
| | | public static SubordinateDelete stopProcessing( |
| | | ResultCode resultCode, Message errorMessage, DN matchedDN, |
| | | ResultCode resultCode, LocalizableMessage errorMessage, DN matchedDN, |
| | | List<String> referralURLs) |
| | | { |
| | | return new SubordinateDelete(false, false, errorMessage, |
| | |
| | | * result. |
| | | */ |
| | | public static SubordinateDelete stopProcessing( |
| | | ResultCode resultCode, Message errorMessage) |
| | | ResultCode resultCode, LocalizableMessage errorMessage) |
| | | { |
| | | return new SubordinateDelete(false, false, errorMessage, |
| | | resultCode, null, null); |
| | |
| | | * @return An error message explaining why processing should |
| | | * stop or <code>null</code> if none is provided. |
| | | */ |
| | | public Message getErrorMessage() |
| | | public LocalizableMessage getErrorMessage() |
| | | { |
| | | return errorMessage; |
| | | } |
| | |
| | | private final boolean sendResponse; |
| | | |
| | | // An message explaining why processing should stop. |
| | | private final Message errorMessage; |
| | | private final LocalizableMessage errorMessage; |
| | | |
| | | // The matched DN for this result. |
| | | private final DN matchedDN; |
| | |
| | | private IntermediateResponse(boolean continueProcessing, |
| | | boolean continuePluginProcessing, |
| | | boolean sendResponse, |
| | | Message errorMessage, |
| | | LocalizableMessage errorMessage, |
| | | ResultCode resultCode, DN matchedDN, |
| | | List<String> referralURLs) |
| | | { |
| | |
| | | */ |
| | | public static IntermediateResponse stopProcessing( |
| | | boolean sendResponse, ResultCode resultCode, |
| | | Message errorMessage, DN matchedDN, List<String> referralURLs) |
| | | LocalizableMessage errorMessage, DN matchedDN, List<String> referralURLs) |
| | | { |
| | | return new IntermediateResponse(false, false, sendResponse, |
| | | errorMessage, resultCode, matchedDN, referralURLs); |
| | |
| | | */ |
| | | public static IntermediateResponse stopProcessing( |
| | | boolean sendResponse, ResultCode resultCode, |
| | | Message errorMessage) |
| | | LocalizableMessage errorMessage) |
| | | { |
| | | return new IntermediateResponse(false, false, sendResponse, |
| | | errorMessage, resultCode, null, null); |
| | |
| | | * @return An error message explaining why processing should |
| | | * stop or <code>null</code> if none is provided. |
| | | */ |
| | | public Message getErrorMessage() |
| | | public LocalizableMessage getErrorMessage() |
| | | { |
| | | return errorMessage; |
| | | } |
| | |
| | | private final boolean continuePluginProcessing; |
| | | |
| | | // An message explaining why processing should stop. |
| | | private final Message errorMessage; |
| | | private final LocalizableMessage errorMessage; |
| | | |
| | | // The disconnect reason that provides the generic cause for the |
| | | // disconnect. |
| | |
| | | */ |
| | | private PostConnect(boolean continueProcessing, |
| | | boolean continuePluginProcessing, |
| | | Message errorMessage, |
| | | LocalizableMessage errorMessage, |
| | | DisconnectReason disconnectReason, |
| | | boolean sendDisconnectNotification) |
| | | { |
| | |
| | | */ |
| | | public static PostConnect disconnectClient( |
| | | DisconnectReason disconnectReason, |
| | | boolean sendDisconnectNotification, Message errorMessage) |
| | | boolean sendDisconnectNotification, LocalizableMessage errorMessage) |
| | | { |
| | | return new PostConnect(false, false, errorMessage, |
| | | disconnectReason, sendDisconnectNotification); |
| | |
| | | * @return An error message explaining why processing should |
| | | * stop or <code>null</code> if none is provided. |
| | | */ |
| | | public Message getErrorMessage() |
| | | public LocalizableMessage getErrorMessage() |
| | | { |
| | | return errorMessage; |
| | | } |
| opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/Aci.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/AciBody.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/AciException.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/AciList.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/AciListenerManager.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/AciTargets.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/AuthMethod.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/BindRule.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/DNS.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/DayOfWeek.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/GroupDN.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/IP.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/ParentInheritance.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/PatternDN.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/PatternIP.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/PatternRDN.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/Permission.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/SSF.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/TargAttrFilterList.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/TargAttrFilters.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/Target.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/TargetAttr.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/TargetFilter.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/TimeOfDay.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/UserAttr.java
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/UserDN.java
opendj3-server-dev/src/server/org/opends/server/backends/BackupBackend.java
opendj3-server-dev/src/server/org/opends/server/backends/LDIFBackend.java
opendj3-server-dev/src/server/org/opends/server/backends/MemoryBackend.java
opendj3-server-dev/src/server/org/opends/server/backends/MonitorBackend.java
opendj3-server-dev/src/server/org/opends/server/backends/NullBackend.java
opendj3-server-dev/src/server/org/opends/server/backends/RootDSEBackend.java
opendj3-server-dev/src/server/org/opends/server/backends/SchemaBackend.java
opendj3-server-dev/src/server/org/opends/server/backends/TrustStoreBackend.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/AttributeIndex.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/BackendImpl.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/BackupManager.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/DN2URI.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryCachePreloader.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryContainer.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryIDSetSorter.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/EnvManager.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/ExportJob.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/ID2Entry.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/IndexQuery.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/IndexQueryFactoryImpl.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/JECompressedSchema.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/JebException.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/RootContainer.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/VLVIndex.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/VerifyJob.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/importLDIF/Importer.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/importLDIF/IndexInputBuffer.java
opendj3-server-dev/src/server/org/opends/server/backends/jeb/importLDIF/Suffix.java
opendj3-server-dev/src/server/org/opends/server/backends/task/FailedDependencyAction.java
opendj3-server-dev/src/server/org/opends/server/backends/task/RecurringTask.java
opendj3-server-dev/src/server/org/opends/server/backends/task/Task.java
opendj3-server-dev/src/server/org/opends/server/backends/task/TaskBackend.java
opendj3-server-dev/src/server/org/opends/server/backends/task/TaskScheduler.java
opendj3-server-dev/src/server/org/opends/server/backends/task/TaskState.java
opendj3-server-dev/src/server/org/opends/server/backends/task/TaskThread.java
opendj3-server-dev/src/server/org/opends/server/config/BooleanConfigAttribute.java
opendj3-server-dev/src/server/org/opends/server/config/ConfigAttribute.java
opendj3-server-dev/src/server/org/opends/server/config/ConfigEntry.java
opendj3-server-dev/src/server/org/opends/server/config/ConfigException.java
opendj3-server-dev/src/server/org/opends/server/config/DNConfigAttribute.java
opendj3-server-dev/src/server/org/opends/server/config/IntegerConfigAttribute.java
opendj3-server-dev/src/server/org/opends/server/config/IntegerWithUnitConfigAttribute.java
opendj3-server-dev/src/server/org/opends/server/config/JMXMBean.java
opendj3-server-dev/src/server/org/opends/server/config/MultiChoiceConfigAttribute.java
opendj3-server-dev/src/server/org/opends/server/config/ReadOnlyConfigAttribute.java
opendj3-server-dev/src/server/org/opends/server/config/StringConfigAttribute.java
opendj3-server-dev/src/server/org/opends/server/controls/AccountUsableRequestControl.java
opendj3-server-dev/src/server/org/opends/server/controls/AccountUsableResponseControl.java
opendj3-server-dev/src/server/org/opends/server/controls/AuthorizationIdentityResponseControl.java
opendj3-server-dev/src/server/org/opends/server/controls/EntryChangeNotificationControl.java
opendj3-server-dev/src/server/org/opends/server/controls/EntryChangelogNotificationControl.java
opendj3-server-dev/src/server/org/opends/server/controls/ExternalChangelogRequestControl.java
opendj3-server-dev/src/server/org/opends/server/controls/GetEffectiveRightsRequestControl.java
opendj3-server-dev/src/server/org/opends/server/controls/LDAPAssertionRequestControl.java
opendj3-server-dev/src/server/org/opends/server/controls/LDAPPostReadRequestControl.java
opendj3-server-dev/src/server/org/opends/server/controls/LDAPPostReadResponseControl.java
opendj3-server-dev/src/server/org/opends/server/controls/LDAPPreReadRequestControl.java
opendj3-server-dev/src/server/org/opends/server/controls/LDAPPreReadResponseControl.java
opendj3-server-dev/src/server/org/opends/server/controls/MatchedValuesControl.java
opendj3-server-dev/src/server/org/opends/server/controls/MatchedValuesFilter.java
opendj3-server-dev/src/server/org/opends/server/controls/PagedResultsControl.java
opendj3-server-dev/src/server/org/opends/server/controls/PasswordExpiredControl.java
opendj3-server-dev/src/server/org/opends/server/controls/PasswordExpiringControl.java
opendj3-server-dev/src/server/org/opends/server/controls/PasswordPolicyErrorType.java
opendj3-server-dev/src/server/org/opends/server/controls/PasswordPolicyRequestControl.java
opendj3-server-dev/src/server/org/opends/server/controls/PasswordPolicyResponseControl.java
opendj3-server-dev/src/server/org/opends/server/controls/PasswordPolicyWarningType.java
opendj3-server-dev/src/server/org/opends/server/controls/PersistentSearchChangeType.java
opendj3-server-dev/src/server/org/opends/server/controls/PersistentSearchControl.java
opendj3-server-dev/src/server/org/opends/server/controls/ProxiedAuthV1Control.java
opendj3-server-dev/src/server/org/opends/server/controls/ProxiedAuthV2Control.java
opendj3-server-dev/src/server/org/opends/server/controls/ServerSideSortRequestControl.java
opendj3-server-dev/src/server/org/opends/server/controls/ServerSideSortResponseControl.java
opendj3-server-dev/src/server/org/opends/server/controls/SubentriesControl.java
opendj3-server-dev/src/server/org/opends/server/controls/SubtreeDeleteControl.java
opendj3-server-dev/src/server/org/opends/server/controls/VLVRequestControl.java
opendj3-server-dev/src/server/org/opends/server/controls/VLVResponseControl.java
opendj3-server-dev/src/server/org/opends/server/core/AbandonOperationBasis.java
opendj3-server-dev/src/server/org/opends/server/core/AccessControlConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/AccountStatusNotificationHandlerConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/AlertHandlerConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/AuthenticatedUsers.java
opendj3-server-dev/src/server/org/opends/server/core/BackendConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/BaseDnRegistry.java
opendj3-server-dev/src/server/org/opends/server/core/BindOperation.java
opendj3-server-dev/src/server/org/opends/server/core/BindOperationBasis.java
opendj3-server-dev/src/server/org/opends/server/core/BindOperationWrapper.java
opendj3-server-dev/src/server/org/opends/server/core/CertificateMapperConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/ConnectionHandlerConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/CoreConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/DefaultCompressedSchema.java
opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java
opendj3-server-dev/src/server/org/opends/server/core/EntryCacheConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/ExtendedOperationConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/ExtensionConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/GroupManager.java
opendj3-server-dev/src/server/org/opends/server/core/IdentityMapperConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/IdleTimeLimitThread.java
opendj3-server-dev/src/server/org/opends/server/core/KeyManagerProviderConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/LogRetentionPolicyConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/LogRotationPolicyConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/LoggerConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/MatchingRuleConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/MonitorConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/OperationWrapper.java
opendj3-server-dev/src/server/org/opends/server/core/PasswordGeneratorConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyFactory.java
opendj3-server-dev/src/server/org/opends/server/core/PasswordPolicyState.java
opendj3-server-dev/src/server/org/opends/server/core/PasswordStorageSchemeConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/PasswordValidatorConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/PluginConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/RootDNConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/RootDseWorkflowTopology.java
opendj3-server-dev/src/server/org/opends/server/core/RootPrivilegeChangeListener.java
opendj3-server-dev/src/server/org/opends/server/core/SASLConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/SchemaConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/SearchOperationBasis.java
opendj3-server-dev/src/server/org/opends/server/core/ServerContext.java
opendj3-server-dev/src/server/org/opends/server/core/SubentryPasswordPolicy.java
opendj3-server-dev/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/TrustManagerProviderConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/VirtualAttributeConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/WorkQueueConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/WorkflowConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/WorkflowImpl.java
opendj3-server-dev/src/server/org/opends/server/core/WorkflowResultCode.java
opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroup.java
opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroupConfigManager.java
opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroupPlugin.java
opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroupStatistics.java
opendj3-server-dev/src/server/org/opends/server/core/networkgroups/RequestFilteringPolicy.java
opendj3-server-dev/src/server/org/opends/server/core/networkgroups/RequestFilteringPolicyFactory.java
opendj3-server-dev/src/server/org/opends/server/core/networkgroups/ResourceLimitsPolicy.java
opendj3-server-dev/src/server/org/opends/server/core/networkgroups/ResourceLimitsPolicyFactory.java
opendj3-server-dev/src/server/org/opends/server/crypto/CryptoManagerImpl.java
opendj3-server-dev/src/server/org/opends/server/crypto/CryptoManagerSync.java
opendj3-server-dev/src/server/org/opends/server/crypto/GetSymmetricKeyExtendedOperation.java
opendj3-server-dev/src/server/org/opends/server/extensions/AESPasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/AttributeValuePasswordValidator.java
opendj3-server-dev/src/server/org/opends/server/extensions/Base64PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/BlowfishPasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/CancelExtendedOperation.java
opendj3-server-dev/src/server/org/opends/server/extensions/CharacterSetPasswordValidator.java
opendj3-server-dev/src/server/org/opends/server/extensions/ClearPasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/CollectiveAttributeSubentriesVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/ConfigFileHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/CryptPasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/DefaultEntryCache.java
opendj3-server-dev/src/server/org/opends/server/extensions/DictionaryPasswordValidator.java
opendj3-server-dev/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/DynamicGroup.java
opendj3-server-dev/src/server/org/opends/server/extensions/DynamicGroupSearchThread.java
opendj3-server-dev/src/server/org/opends/server/extensions/EntityTagVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/EntryCacheCommon.java
opendj3-server-dev/src/server/org/opends/server/extensions/EntryUUIDVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/ErrorLogAccountStatusNotificationHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/ExactMatchIdentityMapper.java
opendj3-server-dev/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/FIFOEntryCache.java
opendj3-server-dev/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/FileSystemEntryCache.java
opendj3-server-dev/src/server/org/opends/server/extensions/FilteredStaticGroupMemberList.java
opendj3-server-dev/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java
opendj3-server-dev/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/GoverningStructureRuleVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/HasSubordinatesVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/JMXAlertHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/LDAPPassThroughAuthenticationPolicyFactory.java
opendj3-server-dev/src/server/org/opends/server/extensions/LengthBasedPasswordValidator.java
opendj3-server-dev/src/server/org/opends/server/extensions/MD5PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/MemberVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/NotificationMessageNotificationMessageTemplateElement.java
opendj3-server-dev/src/server/org/opends/server/extensions/NotificationMessageTemplateElement.java
opendj3-server-dev/src/server/org/opends/server/extensions/NotificationPropertyNotificationMessageTemplateElement.java
opendj3-server-dev/src/server/org/opends/server/extensions/NotificationTypeNotificationMessageTemplateElement.java
opendj3-server-dev/src/server/org/opends/server/extensions/NumSubordinatesVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/PBKDF2PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/ParallelWorkQueue.java
opendj3-server-dev/src/server/org/opends/server/extensions/ParallelWorkerThread.java
opendj3-server-dev/src/server/org/opends/server/extensions/PasswordExpirationTimeVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/PasswordModifyExtendedOperation.java
opendj3-server-dev/src/server/org/opends/server/extensions/PasswordPolicyStateExtendedOperation.java
opendj3-server-dev/src/server/org/opends/server/extensions/PasswordPolicySubentryVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/RC4PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/RandomPasswordGenerator.java
opendj3-server-dev/src/server/org/opends/server/extensions/RegularExpressionIdentityMapper.java
opendj3-server-dev/src/server/org/opends/server/extensions/RepeatedCharactersPasswordValidator.java
opendj3-server-dev/src/server/org/opends/server/extensions/SASLContext.java
opendj3-server-dev/src/server/org/opends/server/extensions/SHA1PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/SMTPAccountStatusNotificationHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/SMTPAlertHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/SaltedMD5PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/SaltedSHA1PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/SaltedSHA256PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/SaltedSHA384PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/SaltedSHA512PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/SimilarityBasedPasswordValidator.java
opendj3-server-dev/src/server/org/opends/server/extensions/SimpleStaticGroupMemberList.java
opendj3-server-dev/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
opendj3-server-dev/src/server/org/opends/server/extensions/StartTLSExtendedOperation.java
opendj3-server-dev/src/server/org/opends/server/extensions/StaticGroup.java
opendj3-server-dev/src/server/org/opends/server/extensions/StructuralObjectClassVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java
opendj3-server-dev/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
opendj3-server-dev/src/server/org/opends/server/extensions/SubjectEqualsDNCertificateMapper.java
opendj3-server-dev/src/server/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/TLSCapableConnection.java
opendj3-server-dev/src/server/org/opends/server/extensions/TextNotificationMessageTemplateElement.java
opendj3-server-dev/src/server/org/opends/server/extensions/TraditionalWorkQueue.java
opendj3-server-dev/src/server/org/opends/server/extensions/TraditionalWorkerThread.java
opendj3-server-dev/src/server/org/opends/server/extensions/TripleDESPasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/UniqueCharactersPasswordValidator.java
opendj3-server-dev/src/server/org/opends/server/extensions/UserAttributeNotificationMessageTemplateElement.java
opendj3-server-dev/src/server/org/opends/server/extensions/UserDNNotificationMessageTemplateElement.java
opendj3-server-dev/src/server/org/opends/server/extensions/UserDefinedVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/VirtualStaticGroup.java
opendj3-server-dev/src/server/org/opends/server/loggers/AbstractLogger.java
opendj3-server-dev/src/server/org/opends/server/loggers/AbstractTextAccessLogPublisher.java
opendj3-server-dev/src/server/org/opends/server/loggers/AccessLogger.java
opendj3-server-dev/src/server/org/opends/server/loggers/AsynchronousTextWriter.java
opendj3-server-dev/src/server/org/opends/server/loggers/ErrorLogger.java
opendj3-server-dev/src/server/org/opends/server/loggers/FileNumberRetentionPolicy.java
opendj3-server-dev/src/server/org/opends/server/loggers/FixedTimeRotationPolicy.java
opendj3-server-dev/src/server/org/opends/server/loggers/FreeDiskSpaceRetentionPolicy.java
opendj3-server-dev/src/server/org/opends/server/loggers/LogPublisherErrorHandler.java
opendj3-server-dev/src/server/org/opends/server/loggers/MultifileTextWriter.java
opendj3-server-dev/src/server/org/opends/server/loggers/OpenDJLoggerAdapter.java
opendj3-server-dev/src/server/org/opends/server/loggers/OpenDJLoggerFactory.java
opendj3-server-dev/src/server/org/opends/server/loggers/ParallelTextWriter.java
opendj3-server-dev/src/server/org/opends/server/loggers/SizeBasedRetentionPolicy.java
opendj3-server-dev/src/server/org/opends/server/loggers/SizeBasedRotationPolicy.java
opendj3-server-dev/src/server/org/opends/server/loggers/TextAccessLogPublisher.java
opendj3-server-dev/src/server/org/opends/server/loggers/TextAuditLogPublisher.java
opendj3-server-dev/src/server/org/opends/server/loggers/TextErrorLogPublisher.java
opendj3-server-dev/src/server/org/opends/server/loggers/TextHTTPAccessLogPublisher.java
opendj3-server-dev/src/server/org/opends/server/loggers/ThreadFilterTextErrorLogPublisher.java
opendj3-server-dev/src/server/org/opends/server/loggers/TimeLimitRotationPolicy.java
opendj3-server-dev/src/server/org/opends/server/loggers/debug/DebugLogger.java
opendj3-server-dev/src/server/org/opends/server/loggers/debug/DebugTracer.java
opendj3-server-dev/src/server/org/opends/server/loggers/debug/TextDebugLogPublisher.java
opendj3-server-dev/src/server/org/opends/server/loggers/debug/TraceSettings.java
opendj3-server-dev/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java
opendj3-server-dev/src/server/org/opends/server/monitors/EntryCacheMonitorProvider.java
opendj3-server-dev/src/server/org/opends/server/plugins/AttributeCleanupPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/ChangeNumberControlPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/EntryUUIDPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/LDAPADListPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/LastModPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/ReferentialIntegrityPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/SambaPasswordPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/SevenBitCleanPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/UniqueAttributePlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/profiler/ProfileViewer.java
opendj3-server-dev/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java
opendj3-server-dev/src/server/org/opends/server/protocols/LDIFConnectionHandler.java
opendj3-server-dev/src/server/org/opends/server/protocols/asn1/ASN1ByteSequenceReader.java
opendj3-server-dev/src/server/org/opends/server/protocols/asn1/ASN1Exception.java
opendj3-server-dev/src/server/org/opends/server/protocols/asn1/ASN1InputStreamReader.java
opendj3-server-dev/src/server/org/opends/server/protocols/asn1/GSERException.java
opendj3-server-dev/src/server/org/opends/server/protocols/asn1/GSERParser.java
opendj3-server-dev/src/server/org/opends/server/protocols/http/CollectClientConnectionsFilter.java
opendj3-server-dev/src/server/org/opends/server/protocols/http/HTTPClientConnection.java
opendj3-server-dev/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java
opendj3-server-dev/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
opendj3-server-dev/src/server/org/opends/server/protocols/internal/InternalConnectionHandler.java
opendj3-server-dev/src/server/org/opends/server/protocols/internal/InternalLDAPOutputStream.java
opendj3-server-dev/src/server/org/opends/server/protocols/jmx/JmxClientConnection.java
opendj3-server-dev/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java
opendj3-server-dev/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/AddResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/BindResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/CompareResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/DeleteResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/ExtendedResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPAttribute.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPFilter.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPMessage.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPReader.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPRequestHandler.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPResultCode.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPStatistics.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/ModifyDNResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/ModifyResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/SearchResultDoneProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/replication/common/ChangelogBaseDNVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/replication/common/FirstChangeNumberVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/replication/common/LastChangeNumberVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/replication/common/LastCookieVirtualProvider.java
opendj3-server-dev/src/server/org/opends/server/replication/common/MultiDomainServerState.java
opendj3-server-dev/src/server/org/opends/server/replication/plugin/EntryHistorical.java
opendj3-server-dev/src/server/org/opends/server/replication/plugin/ExternalChangelogDomain.java
opendj3-server-dev/src/server/org/opends/server/replication/plugin/FractionalLDIFImportPlugin.java
opendj3-server-dev/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
opendj3-server-dev/src/server/org/opends/server/replication/plugin/MultimasterReplication.java
opendj3-server-dev/src/server/org/opends/server/replication/plugin/PersistentServerState.java
opendj3-server-dev/src/server/org/opends/server/replication/plugin/RemotePendingChanges.java
opendj3-server-dev/src/server/org/opends/server/replication/plugin/ReplayThread.java
opendj3-server-dev/src/server/org/opends/server/replication/plugin/ReplicationServerListener.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/EntryMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/ErrorMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/HeartbeatMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/InitializeRequestMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/InitializeTargetMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/ModifyDNMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/ModifyMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/ReplServerStartDSMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/ReplServerStartMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/ReplSessionSecurity.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/ResetGenerationIdMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/StartMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/TopologyMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/UpdateMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/WindowMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/WindowProbeMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/server/DataServerHandler.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ECLServerHandler.java
opendj3-server-dev/src/server/org/opends/server/replication/server/MessageHandler.java
opendj3-server-dev/src/server/org/opends/server/replication/server/MsgQueue.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationBackend.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationDomainMonitor.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServer.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServerHandler.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ServerHandler.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ServerReader.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ServerWriter.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/api/ChangelogException.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/DraftCNDB.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/DraftCNData.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/ReplicationDB.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/ReplicationData.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/ReplicationDbEnv.java
opendj3-server-dev/src/server/org/opends/server/replication/service/ReplicationBroker.java
opendj3-server-dev/src/server/org/opends/server/replication/service/ReplicationDomain.java
opendj3-server-dev/src/server/org/opends/server/schema/AciSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/AttributeTypeSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/AuthPasswordSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/BinarySyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/BitStringEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/BitStringSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/BooleanEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/BooleanSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/CaseExactIA5EqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/CaseExactIA5SubstringMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/CaseIgnoreIA5EqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/CaseIgnoreIA5SubstringMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactAssertionSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/CertificateListSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/CertificatePairSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/CertificateSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/CollationMatchingRuleFactory.java
opendj3-server-dev/src/server/org/opends/server/schema/CountryStringSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/DITContentRuleSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/DeliveryMethodSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/DirectoryStringSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/DistinguishedNameEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/EnhancedGuideSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/FaxNumberSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/FaxSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/GuideSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/IA5StringSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/IntegerEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/IntegerFirstComponentEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/IntegerOrderingMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/IntegerSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/JPEGSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/NameFormSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/NumericStringEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/NumericStringOrderingMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/NumericStringSubstringMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/NumericStringSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/OIDSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/ObjectClassSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/ObjectIdentifierEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/OctetStringSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/OtherMailboxSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/PostalAddressSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/PresentationAddressSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/PrintableStringSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/ProtocolInformationSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/SubstringAssertionSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/SubtreeSpecificationSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/TelephoneNumberSubstringMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/TelephoneNumberSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/TelexNumberSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/TimeBasedMatchingRuleFactory.java
opendj3-server-dev/src/server/org/opends/server/schema/UTCTimeSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/UUIDEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/UUIDOrderingMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/UUIDSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/UniqueMemberEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/UserPasswordSyntax.java
opendj3-server-dev/src/server/org/opends/server/tasks/AddSchemaFileTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/BackupTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/DisconnectClientTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/EnterLockdownModeTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/ExportTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/ImportTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/InitializeTargetTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/InitializeTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/LeaveLockdownModeTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/PurgeConflictsHistoricalTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/RebuildTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/RestartTaskThread.java
opendj3-server-dev/src/server/org/opends/server/tasks/RestoreTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/SetGenerationIdTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/ShutdownTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/ShutdownTaskThread.java
opendj3-server-dev/src/server/org/opends/server/tasks/TaskUtils.java
opendj3-server-dev/src/server/org/opends/server/tools/BackUpDB.java
opendj3-server-dev/src/server/org/opends/server/tools/BackendToolUtils.java
opendj3-server-dev/src/server/org/opends/server/tools/ClientException.java
opendj3-server-dev/src/server/org/opends/server/tools/ConfigureDS.java
opendj3-server-dev/src/server/org/opends/server/tools/ConfigureWindowsService.java
opendj3-server-dev/src/server/org/opends/server/tools/ConsoleDebugLogPublisher.java
opendj3-server-dev/src/server/org/opends/server/tools/CreateRCScript.java
opendj3-server-dev/src/server/org/opends/server/tools/DBTest.java
opendj3-server-dev/src/server/org/opends/server/tools/EncodePassword.java
opendj3-server-dev/src/server/org/opends/server/tools/ExportLDIF.java
opendj3-server-dev/src/server/org/opends/server/tools/ImportLDIF.java
opendj3-server-dev/src/server/org/opends/server/tools/InstallDS.java
opendj3-server-dev/src/server/org/opends/server/tools/InstallDSArgumentParser.java
opendj3-server-dev/src/server/org/opends/server/tools/JavaPropertiesTool.java
opendj3-server-dev/src/server/org/opends/server/tools/JavaPropertiesToolArgumentParser.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPAuthenticationHandler.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPCompare.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPConnection.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPConnectionException.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPDelete.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPModify.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPPasswordModify.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPSearch.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPToolUtils.java
opendj3-server-dev/src/server/org/opends/server/tools/LDIFDiff.java
opendj3-server-dev/src/server/org/opends/server/tools/LDIFModify.java
opendj3-server-dev/src/server/org/opends/server/tools/LDIFSearch.java
opendj3-server-dev/src/server/org/opends/server/tools/ListBackends.java
opendj3-server-dev/src/server/org/opends/server/tools/ManageAccount.java
opendj3-server-dev/src/server/org/opends/server/tools/ManageTasks.java
opendj3-server-dev/src/server/org/opends/server/tools/PromptTrustManager.java
opendj3-server-dev/src/server/org/opends/server/tools/RebuildIndex.java
opendj3-server-dev/src/server/org/opends/server/tools/RestoreDB.java
opendj3-server-dev/src/server/org/opends/server/tools/SSLConnectionException.java
opendj3-server-dev/src/server/org/opends/server/tools/StartWindowsService.java
opendj3-server-dev/src/server/org/opends/server/tools/StopDS.java
opendj3-server-dev/src/server/org/opends/server/tools/StopWindowsService.java
opendj3-server-dev/src/server/org/opends/server/tools/VerifyIndex.java
opendj3-server-dev/src/server/org/opends/server/tools/WaitForFileDelete.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/ArgumentExceptionFactory.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/DSConfig.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/GetPropSubCommandHandler.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/LDAPManagementContextFactory.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/ListSubCommandHandler.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/PropertyValuePrinter.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/SubCommandHandler.java
opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/LocalPurgeHistorical.java
opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/ReplicationCliArgumentParser.java
opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/ReplicationCliException.java
opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/ReplicationCliReturnCode.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/AttributeValueTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/Branch.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/DNTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/FileTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/FirstNameTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/GUIDTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/IfAbsentTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/IfPresentTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/LastNameTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/ListTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/MakeLDIF.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/MakeLDIFException.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/ParentDNTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/PresenceTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/RDNTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/RandomTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/SequentialTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/StaticTextTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/Tag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/Template.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/TemplateFile.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/UnderscoreDNTag.java
opendj3-server-dev/src/server/org/opends/server/tools/makeldif/UnderscoreParentDNTag.java
opendj3-server-dev/src/server/org/opends/server/tools/status/StatusCli.java
opendj3-server-dev/src/server/org/opends/server/tools/tasks/TaskClient.java
opendj3-server-dev/src/server/org/opends/server/tools/tasks/TaskClientException.java
opendj3-server-dev/src/server/org/opends/server/tools/tasks/TaskEntry.java
opendj3-server-dev/src/server/org/opends/server/tools/tasks/TaskScheduleInteraction.java
opendj3-server-dev/src/server/org/opends/server/tools/tasks/TaskTool.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/FileManager.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/FormattedNotificationCallback.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/ProgressNotificationCallback.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/Upgrade.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/UpgradeCli.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/UpgradeContext.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/UpgradeTasks.java
opendj3-server-dev/src/server/org/opends/server/types/AbstractOperation.java
opendj3-server-dev/src/server/org/opends/server/types/AccountStatusNotification.java
opendj3-server-dev/src/server/org/opends/server/types/AttributeValues.java
opendj3-server-dev/src/server/org/opends/server/types/BackupDirectory.java
opendj3-server-dev/src/server/org/opends/server/types/BackupInfo.java
opendj3-server-dev/src/server/org/opends/server/types/CancelRequest.java
opendj3-server-dev/src/server/org/opends/server/types/CancelResult.java
opendj3-server-dev/src/server/org/opends/server/types/CanceledOperationException.java
opendj3-server-dev/src/server/org/opends/server/types/CommonSchemaElements.java
opendj3-server-dev/src/server/org/opends/server/types/ConfigChangeResult.java
opendj3-server-dev/src/server/org/opends/server/types/CryptoManagerException.java
opendj3-server-dev/src/server/org/opends/server/types/DN.java
opendj3-server-dev/src/server/org/opends/server/types/DebugLogCategory.java
opendj3-server-dev/src/server/org/opends/server/types/DirectoryConfig.java
opendj3-server-dev/src/server/org/opends/server/types/DirectoryException.java
opendj3-server-dev/src/server/org/opends/server/types/DisconnectReason.java
opendj3-server-dev/src/server/org/opends/server/types/Entry.java
opendj3-server-dev/src/server/org/opends/server/types/EntryEncodeConfig.java
opendj3-server-dev/src/server/org/opends/server/types/FilePermission.java
opendj3-server-dev/src/server/org/opends/server/types/HostPort.java
opendj3-server-dev/src/server/org/opends/server/types/IdentifiedException.java
opendj3-server-dev/src/server/org/opends/server/types/InitializationException.java
opendj3-server-dev/src/server/org/opends/server/types/LDAPException.java
opendj3-server-dev/src/server/org/opends/server/types/LDAPURL.java
opendj3-server-dev/src/server/org/opends/server/types/LDIFExportConfig.java
opendj3-server-dev/src/server/org/opends/server/types/MembershipException.java
opendj3-server-dev/src/server/org/opends/server/types/NamedCharacterSet.java
opendj3-server-dev/src/server/org/opends/server/types/OpenDsException.java
opendj3-server-dev/src/server/org/opends/server/types/Operation.java
opendj3-server-dev/src/server/org/opends/server/types/RDN.java
opendj3-server-dev/src/server/org/opends/server/types/RawAttribute.java
opendj3-server-dev/src/server/org/opends/server/types/RawFilter.java
opendj3-server-dev/src/server/org/opends/server/types/RawModification.java
opendj3-server-dev/src/server/org/opends/server/types/ResultCode.java
opendj3-server-dev/src/server/org/opends/server/types/Schema.java
opendj3-server-dev/src/server/org/opends/server/types/SearchFilter.java
opendj3-server-dev/src/server/org/opends/server/types/SubEntry.java
opendj3-server-dev/src/server/org/opends/server/types/SubtreeSpecification.java
opendj3-server-dev/src/server/org/opends/server/types/SynchronizationProviderResult.java
opendj3-server-dev/src/server/org/opends/server/types/operation/InProgressOperation.java
opendj3-server-dev/src/server/org/opends/server/types/operation/PluginOperation.java
opendj3-server-dev/src/server/org/opends/server/types/operation/PostOperationBindOperation.java
opendj3-server-dev/src/server/org/opends/server/types/operation/PostOperationOperation.java
opendj3-server-dev/src/server/org/opends/server/types/operation/PostResponseBindOperation.java
opendj3-server-dev/src/server/org/opends/server/types/operation/PostResponseOperation.java
opendj3-server-dev/src/server/org/opends/server/types/operation/PostSynchronizationOperation.java
opendj3-server-dev/src/server/org/opends/server/types/operation/PreOperationBindOperation.java
opendj3-server-dev/src/server/org/opends/server/types/operation/PreOperationOperation.java
opendj3-server-dev/src/server/org/opends/server/types/operation/PreParseBindOperation.java
opendj3-server-dev/src/server/org/opends/server/types/operation/PreParseOperation.java
opendj3-server-dev/src/server/org/opends/server/util/Base64.java
opendj3-server-dev/src/server/org/opends/server/util/CertificateManager.java
opendj3-server-dev/src/server/org/opends/server/util/EMailMessage.java
opendj3-server-dev/src/server/org/opends/server/util/EmbeddedUtils.java
opendj3-server-dev/src/server/org/opends/server/util/ExpirationCheckTrustManager.java
opendj3-server-dev/src/server/org/opends/server/util/LDIFException.java
opendj3-server-dev/src/server/org/opends/server/util/LDIFReader.java
opendj3-server-dev/src/server/org/opends/server/util/LDIFWriter.java
opendj3-server-dev/src/server/org/opends/server/util/Platform.java
opendj3-server-dev/src/server/org/opends/server/util/StaticUtils.java
opendj3-server-dev/src/server/org/opends/server/util/VersionCompatibilityIssue.java
opendj3-server-dev/src/server/org/opends/server/util/args/Argument.java
opendj3-server-dev/src/server/org/opends/server/util/args/ArgumentException.java
opendj3-server-dev/src/server/org/opends/server/util/args/ArgumentGroup.java
opendj3-server-dev/src/server/org/opends/server/util/args/ArgumentParser.java
opendj3-server-dev/src/server/org/opends/server/util/args/BooleanArgument.java
opendj3-server-dev/src/server/org/opends/server/util/args/FileBasedArgument.java
opendj3-server-dev/src/server/org/opends/server/util/args/IntegerArgument.java
opendj3-server-dev/src/server/org/opends/server/util/args/LDAPConnectionArgumentParser.java
opendj3-server-dev/src/server/org/opends/server/util/args/MultiChoiceArgument.java
opendj3-server-dev/src/server/org/opends/server/util/args/StringArgument.java
opendj3-server-dev/src/server/org/opends/server/util/args/SubCommand.java
opendj3-server-dev/src/server/org/opends/server/util/args/SubCommandArgumentParser.java
opendj3-server-dev/src/server/org/opends/server/util/cli/CLIException.java
opendj3-server-dev/src/server/org/opends/server/util/cli/ConsoleApplication.java
opendj3-server-dev/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java
opendj3-server-dev/src/server/org/opends/server/util/cli/MenuBuilder.java
opendj3-server-dev/src/server/org/opends/server/util/cli/PointAdder.java
opendj3-server-dev/src/server/org/opends/server/util/table/TableBuilder.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/WorkflowElementConfigManager.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/externalchangelog/ECLSearchOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendBindOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendCompareOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendDeleteOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyDNOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
opendj3-server-dev/src/snmp/src/org/opends/server/snmp/SNMPClassLoaderProvider.java
opendj3-server-dev/src/snmp/src/org/opends/server/snmp/SNMPConnectionHandler.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/messages/CategoryTest.java (deleted)
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/messages/MessageBuilderTest.java (deleted)
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/messages/MessageDescriptorRegistryTest.java (deleted)
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/messages/MessageTest.java (deleted)
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/messages/MessagesTestCase.java (deleted)
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/messages/PropertiesFilesTest.java (deleted)
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/messages/SeverityTest.java (deleted)
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/DirectoryServerTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/client/cli/CliTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/client/ldap/MockConstraint.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/server/AggregationServerTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/server/ConstraintTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/server/DefaultBehaviorTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/server/ListenerTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/server/MockConstraint.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/api/AlertHandlerTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/api/ConfigChangeListenerTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/api/plugin/DirectoryServerPluginTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/authorization/dseecompat/AciTests.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/JebTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/controls/PersistentSearchControlTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/AbandonOperationTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/AddOperationTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/BindOperationTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/DeleteOperationTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/ModifyOperationTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/TestModifyDNOperation.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/UnbindOperationTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/WorkflowTopologyTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/networkgroups/MockClientConnection.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/networkgroups/NetworkGroupTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/networkgroups/RequestFilteringPolicyTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/core/networkgroups/ResourceLimitsPolicyTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/crypto/CryptoManagerTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/AttributeValuePasswordValidatorTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/CharacterSetPasswordValidatorTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/DictionaryPasswordValidatorTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/DummyAlertHandler.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/EntityTagVirtualAttributeProviderTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/ErrorLogAccountStatusNotificationHandlerTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/JMXAlertHandlerTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/LDAPPassThroughAuthenticationPolicyTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/LengthBasedPasswordValidatorTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/PasswordExpirationTimeVirtualAttributeProviderTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/RegularExpressionIdentityMapperTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/RepeatedCharactersPasswordValidatorTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/SimilarityBasedPasswordValidatorTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/TestPasswordValidator.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/UniqueCharactersPasswordValidatorTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/plugins/DelayPreOpPlugin.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/plugins/DisconnectClientPlugin.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/plugins/InvocationCounterPlugin.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/plugins/ShortCircuitPlugin.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/plugins/UpdatePreOpPlugin.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/protocols/internal/InternalClientConnectionTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/protocols/jmx/JmxConnectTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/protocols/jmx/JmxPrivilegeTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestAddResponseProtocolOp.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestBindResponseProtocolOp.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestCompareResponseProtocolOp.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestDeleteResponseProtocolOp.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestLDAPConnectionHandler.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestLDAPException.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestModifyDNResponseProtocolOp.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestModifyResponseProtocolOp.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/GenerationIdTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/ProtocolWindowTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/ReSyncTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/SchemaReplicationTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/StressTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/UpdateOperationTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/AssuredReplicationPluginTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/FractionalReplicationTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/GroupIdHandshakeTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/ReplicationServerFailoverTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/ReplicationServerLoadBalancingTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/StateMachineTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/TopologyViewTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/protocol/ProtocolCompatibilityTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/protocol/SynchronizationMsgTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/AssuredReplicationServerTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/MonitorTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/service/ComputeBestServerTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/schema/AttributeSyntaxTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/schema/AttributeTypeSyntaxTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/schema/BinaryAttributeSyntaxTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/schema/BitStringSyntaxTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/schema/ConfigurableAttributeSyntaxTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/snmp/SNMPSyncManagerV2AccessTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/tasks/DisconnectClientTaskTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/tasks/DummyTask.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/tasks/LdifFileWriter.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPAuthenticationHandlerTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/tools/UpgradeTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/tools/makeldif/MakeLDIFTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/DirectoryExceptionTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/EntrySchemaCheckingTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/InitializationExceptionTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/types/TestEntry.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/util/EmbeddedUtilsTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/util/TestLDIFReader.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/util/TestLDIFWriter.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/util/args/TestSubCommand.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/util/args/TestSubCommandArgumentParser.java |