Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-09-15 20:36:16 -0400
committerRyan D. Brooks2010-09-15 20:36:16 -0400
commitb4556476ff9a54a6ea475be9ad17686a03649c4a (patch)
tree3391f2fb90401008050ce6684d60143e6311683d /plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework
parent08eee9aefa627a8d6455e556da0d74b1d3776d4b (diff)
downloadorg.eclipse.osee-b4556476ff9a54a6ea475be9ad17686a03649c4a.tar.gz
org.eclipse.osee-b4556476ff9a54a6ea475be9ad17686a03649c4a.tar.xz
org.eclipse.osee-b4556476ff9a54a6ea475be9ad17686a03649c4a.zip
refactor: Warnings clean-up for framework.core.message.test
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework')
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchOptions.java60
1 files changed, 60 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchOptions.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchOptions.java
new file mode 100644
index 0000000000..008806c58f
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchOptions.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.search.engine;
+
+import java.util.Properties;
+
+/**
+ * @author Roberto E. Escobar
+ */
+public class SearchOptions {
+
+ public enum SearchOptionsEnum {
+ include_deleted,
+ match_word_order,
+ as_xml,
+ find_all_locations,
+ case_sensitive;
+
+ public String asStringOption() {
+ return name().replaceAll("_", " ");
+ }
+ }
+
+ private final Properties properties;
+
+ public SearchOptions() {
+ this.properties = new Properties();
+ }
+
+ public boolean getBoolean(String key) {
+ return new Boolean(getString(key));
+ }
+
+ public String getString(String key) {
+ return this.properties.getProperty(key, "");
+ }
+
+ public void put(String key, String value) {
+ if (value != null && value.length() > 0) {
+ this.properties.put(key, value);
+ }
+ }
+
+ public void put(String key, boolean value) {
+ this.properties.put(key, Boolean.toString(value));
+ }
+
+ @Override
+ public String toString() {
+ return properties.toString();
+ }
+}

Back to the top