Several minor fixes in command line utilities and with the Monitoring backend
| | |
| | | SEVERE_ERR_JAVAPROPERTIES_WITH_PROPERTIES_FILE_1491=The file properties "%s" \ |
| | | cannot be read. Check that it exists and that you have read rights to it |
| | | SEVERE_ERR_JAVAPROPERTIES_WITH_DESTINATION_FILE_1492=The destination file "%s" \ |
| | | cannot be written. Check that you have right reads to it |
| | | cannot be written. Check that you have write rights to it |
| | | SEVERE_ERR_JAVAPROPERTIES_WRITING_DESTINATION_FILE_1493=The destination file \ |
| | | "%s" cannot be written. Check that you have right reads to it |
| | | INFO_JAVAPROPERTIES_SUCCESSFUL_NON_DEFAULT_1494=The script file %s was \ |
| | |
| | | |
| | | if (!fileProperties.containsKey("default.java-home")) |
| | | { |
| | | otherProperties.put("default.java-home=", javaHome); |
| | | otherProperties.put("default.java-home", javaHome); |
| | | } |
| | | |
| | | writeSetOpenDSJavaHome(installPath, javaHome, args, otherProperties); |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.backends; |
| | | |
| | |
| | | true); |
| | | monitorClasses.put(monitorOC, OC_MONITOR_BRANCH); |
| | | |
| | | HashMap<AttributeType,List<Attribute>> monitorUserAttrs = |
| | | new LinkedHashMap<AttributeType,List<Attribute>>(); |
| | | |
| | | RDN rdn = dn.getRDN(); |
| | | if (rdn != null) |
| | | { |
| | | // Add the RDN values |
| | | for (int i=0; i<rdn.getNumValues(); i++) |
| | | { |
| | | AttributeType attributeType = rdn.getAttributeType(i); |
| | | AttributeValue value = rdn.getAttributeValue(attributeType); |
| | | Attribute attr = Attributes.create(attributeType, value); |
| | | List<Attribute> attrList = new ArrayList<Attribute>(1); |
| | | attrList.add(attr); |
| | | monitorUserAttrs.put(attributeType, attrList); |
| | | } |
| | | } |
| | | |
| | | // Construct and return the entry. |
| | | Entry e = new Entry(dn, monitorClasses, null, null); |
| | | Entry e = new Entry(dn, monitorClasses, monitorUserAttrs, null); |
| | | e.processVirtualAttributes(); |
| | | return e; |
| | | } |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2007-2009 Sun Microsystems, Inc. |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools.dsconfig; |
| | | |
| | |
| | | Message ufn = rd.getUserFriendlyName(); |
| | | |
| | | Message ufpn = null; |
| | | if (rd instanceof InstantiableRelationDefinition) { |
| | | if (rd instanceof InstantiableRelationDefinition<?,?>) { |
| | | InstantiableRelationDefinition<?, ?> ir = |
| | | (InstantiableRelationDefinition<?, ?>) rd; |
| | | ufpn = ir.getUserFriendlyPluralName(); |
| | | } else if (rd instanceof SetRelationDefinition) { |
| | | } else if (rd instanceof SetRelationDefinition<?,?>) { |
| | | SetRelationDefinition<?, ?> sr = |
| | | (SetRelationDefinition<?, ?>) rd; |
| | | ufpn = sr.getUserFriendlyPluralName(); |
| | |
| | | /** |
| | | * Prints the contents of a command builder. This method has been created |
| | | * since SetPropSubCommandHandler calls it. All the logic of DSConfig is on |
| | | * this method. Currently it simply writes the content of the CommandBuilder |
| | | * to the standard output, but if we provide an option to write the content |
| | | * to a file only the implementation of this method must be changed. |
| | | * this method. It writes the content of the CommandBuilder to the standard |
| | | * output, or to a file depending on the options provided by the user. |
| | | * @param commandBuilder the command builder to be printed. |
| | | */ |
| | | void printCommandBuilder(CommandBuilder commandBuilder) |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools.dsconfig; |
| | | |
| | |
| | | { |
| | | if (newValues.containsAll(previousValues)) |
| | | { |
| | | registerAddModification(pd, newValues, previousValues); |
| | | if (newValues.size() <= 1) |
| | | { |
| | | registerSetModification(pd, newValues, previousValues); |
| | | } |
| | | else |
| | | { |
| | | registerAddModification(pd, newValues, previousValues); |
| | | } |
| | | } |
| | | else if (previousValues.containsAll(newValues)) |
| | | { |
| | | registerRemoveModification(pd, newValues, previousValues); |
| | | } |
| | | else |
| | | else if (newValues.size() <= 1) |
| | | { |
| | | registerSetModification(pd, newValues, previousValues); |
| | | } |
| | | else |
| | | { |
| | | // Split into two operations: remove and add |
| | | SortedSet<T> removedValues = new TreeSet<T>(); |
| | | removedValues.addAll(previousValues); |
| | | removedValues.removeAll(newValues); |
| | | |
| | | PropertyEditorModification<T> removeMod = |
| | | PropertyEditorModification.createRemoveModification(pd, |
| | | removedValues, previousValues); |
| | | addModification(removeMod); |
| | | |
| | | SortedSet<T> retainedValues = new TreeSet<T>(); |
| | | retainedValues.addAll(previousValues); |
| | | retainedValues.retainAll(newValues); |
| | | |
| | | SortedSet<T> addedValues = new TreeSet<T>(); |
| | | addedValues.addAll(newValues); |
| | | addedValues.removeAll(retainedValues); |
| | | |
| | | PropertyEditorModification<T> addMod = |
| | | PropertyEditorModification.createAddModification(pd, |
| | | addedValues, retainedValues); |
| | | addModification(addMod); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2007-2009 Sun Microsystems, Inc. |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools.dsconfig; |
| | | |
| | |
| | | |
| | | try { |
| | | for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) { |
| | | if (pd instanceof AggregationPropertyDefinition) { |
| | | if (pd instanceof AggregationPropertyDefinition<?,?>) { |
| | | // Runtime cast is required to workaround a |
| | | // bug in JDK versions prior to 1.5.0_08. |
| | | AggregationPropertyDefinition<?, ?> apd = |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.util.cli; |
| | | |
| | |
| | | String.valueOf(defaultValue)); |
| | | } |
| | | |
| | | return readValidatedInput(prompt, callback); |
| | | return readValidatedInput(prompt, callback, CONFIRMATION_MAX_TRIES); |
| | | } |
| | | |
| | | /** |