Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2011-05-10 19:46:31 -0400
committerRyan D. Brooks2011-05-10 19:46:31 -0400
commit98fa1f7061eb05ab8f6c7bfc0b868ec91862503e (patch)
treeceb6b23ffa7194181f928288db44bbdbc50c8543 /plugins/org.eclipse.osee.framework.resource.management/src
parent05109de7609095a4c3167c4ef33c9258054e2826 (diff)
downloadorg.eclipse.osee-98fa1f7061eb05ab8f6c7bfc0b868ec91862503e.tar.gz
org.eclipse.osee-98fa1f7061eb05ab8f6c7bfc0b868ec91862503e.tar.xz
org.eclipse.osee-98fa1f7061eb05ab8f6c7bfc0b868ec91862503e.zip
refactor[bgz_343296]: Replace Options with PropertyStore
Diffstat (limited to 'plugins/org.eclipse.osee.framework.resource.management/src')
-rw-r--r--plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceListener.java6
-rw-r--r--plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceManager.java5
-rw-r--r--plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceProvider.java5
-rw-r--r--plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/Options.java30
-rw-r--r--plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/internal/ResourceManager.java10
-rw-r--r--plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/util/OptionsProcessor.java4
6 files changed, 17 insertions, 43 deletions
diff --git a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceListener.java b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceListener.java
index 79e65f5ede..0fefb369d2 100644
--- a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceListener.java
+++ b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceListener.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.resource.management;
+import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
+
/**
* @author Roberto E. Escobar
*/
@@ -28,12 +30,12 @@ public interface IResourceListener {
/**
* Event triggered before a resource is saved
*/
- public void onPreSave(IResourceLocator locator, IResource resource, Options options);
+ public void onPreSave(IResourceLocator locator, IResource resource, PropertyStore options);
/**
* Event triggered after a resource is saved
*/
- public void onPostSave(IResourceLocator locator, IResource resource, Options options);
+ public void onPostSave(IResourceLocator locator, IResource resource, PropertyStore options);
/**
* Event triggered before a resource is acquired
diff --git a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceManager.java b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceManager.java
index 72aedaa631..879b95f023 100644
--- a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceManager.java
+++ b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceManager.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.framework.resource.management;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
/**
* @author Roberto E. Escobar
@@ -52,7 +53,7 @@ public interface IResourceManager {
* @param options operation options
* @return the resource
*/
- public IResource acquire(IResourceLocator locator, Options options) throws OseeCoreException;
+ public IResource acquire(IResourceLocator locator, PropertyStore options) throws OseeCoreException;
/**
* Determines if a resource exists for the given locator.
@@ -68,7 +69,7 @@ public interface IResourceManager {
* @param resource to store
* @param options operation options
*/
- public IResourceLocator save(final IResourceLocator locatorHint, final IResource resource, final Options options) throws OseeCoreException;
+ public IResourceLocator save(final IResourceLocator locatorHint, final IResource resource, final PropertyStore options) throws OseeCoreException;
/**
* Delete resource specified by resource locator
diff --git a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceProvider.java b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceProvider.java
index ad95aa2abc..6840716c7b 100644
--- a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceProvider.java
+++ b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/IResourceProvider.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.resource.management;
import java.util.Collection;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
/**
* @author Roberto E. Escobar
@@ -32,7 +33,7 @@ public interface IResourceProvider {
* @param options operation options
* @return the resource
*/
- public IResource acquire(IResourceLocator locator, Options options) throws OseeCoreException;
+ public IResource acquire(IResourceLocator locator, PropertyStore options) throws OseeCoreException;
/**
* Determines if a resource exists for the given locator.
@@ -48,7 +49,7 @@ public interface IResourceProvider {
* @param options operation options
* @param resource the resource to save
*/
- public IResourceLocator save(IResourceLocator locator, IResource resource, Options options) throws OseeCoreException;
+ public IResourceLocator save(IResourceLocator locator, IResource resource, PropertyStore options) throws OseeCoreException;
/**
* Delete resource specified by resource locator
diff --git a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/Options.java b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/Options.java
deleted file mode 100644
index 7a4fef612c..0000000000
--- a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/Options.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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.resource.management;
-
-import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
-
-/**
- * @author Roberto E. Escobar
- */
-public class Options extends PropertyStore {
-
- private static final long serialVersionUID = -8556523292740896103L;
-
- public Options() {
- super();
- }
-
- public void clear() {
- getItems().clear();
- getArrays().clear();
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/internal/ResourceManager.java b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/internal/ResourceManager.java
index ed2c02573f..3e365710bb 100644
--- a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/internal/ResourceManager.java
+++ b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/internal/ResourceManager.java
@@ -14,12 +14,12 @@ import java.util.Collection;
import java.util.concurrent.CopyOnWriteArraySet;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeNotFoundException;
+import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
import org.eclipse.osee.framework.resource.management.IResource;
import org.eclipse.osee.framework.resource.management.IResourceListener;
import org.eclipse.osee.framework.resource.management.IResourceLocator;
import org.eclipse.osee.framework.resource.management.IResourceManager;
import org.eclipse.osee.framework.resource.management.IResourceProvider;
-import org.eclipse.osee.framework.resource.management.Options;
/**
* @author Roberto E. Escobar
@@ -56,13 +56,13 @@ public class ResourceManager implements IResourceManager {
}
}
- private void notifyPreOnSave(final IResourceLocator locator, IResource resource, Options options) {
+ private void notifyPreOnSave(final IResourceLocator locator, IResource resource, PropertyStore options) {
for (IResourceListener listener : listeners) {
listener.onPreSave(locator, resource, options);
}
}
- private void notifyPostOnSave(IResourceLocator locator, final IResource resource, Options options) {
+ private void notifyPostOnSave(IResourceLocator locator, final IResource resource, PropertyStore options) {
for (IResourceListener listener : listeners) {
listener.onPostSave(locator, resource, options);
}
@@ -106,7 +106,7 @@ public class ResourceManager implements IResourceManager {
}
@Override
- public IResource acquire(IResourceLocator locator, Options options) throws OseeCoreException {
+ public IResource acquire(IResourceLocator locator, PropertyStore options) throws OseeCoreException {
IResourceProvider provider = getProvider(locator);
notifyPreOnAcquire(locator);
IResource toReturn = provider.acquire(locator, options);
@@ -115,7 +115,7 @@ public class ResourceManager implements IResourceManager {
}
@Override
- public IResourceLocator save(IResourceLocator locator, IResource resource, Options options) throws OseeCoreException {
+ public IResourceLocator save(IResourceLocator locator, IResource resource, PropertyStore options) throws OseeCoreException {
IResourceProvider provider = getProvider(locator);
notifyPreOnSave(locator, resource, options);
IResourceLocator actualLocator = provider.save(locator, resource, options);
diff --git a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/util/OptionsProcessor.java b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/util/OptionsProcessor.java
index d0f539680a..1f6440d3de 100644
--- a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/util/OptionsProcessor.java
+++ b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/util/OptionsProcessor.java
@@ -15,11 +15,11 @@ import java.net.URI;
import java.net.URISyntaxException;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeStateException;
+import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.resource.management.IResource;
import org.eclipse.osee.framework.resource.management.IResourceLocator;
-import org.eclipse.osee.framework.resource.management.Options;
import org.eclipse.osee.framework.resource.management.StandardOptions;
import org.eclipse.osee.framework.resource.management.exception.MalformedLocatorException;
@@ -38,7 +38,7 @@ public class OptionsProcessor {
private final boolean compressOnAcquire;
private final boolean overwrite;
- public OptionsProcessor(URI uri, IResourceLocator locator, IResource resource, Options options) throws MalformedLocatorException {
+ public OptionsProcessor(URI uri, IResourceLocator locator, IResource resource, PropertyStore options) throws MalformedLocatorException {
this.resource = resource;
decompressOnAcquire = options.getBoolean(StandardOptions.DecompressOnAquire.name());
compressOnAcquire = options.getBoolean(StandardOptions.CompressOnAcquire.name());

Back to the top