Skip to main content
summaryrefslogtreecommitdiffstats
blob: 879b95f02333de806bdc00b2a9e560be3c20aca6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*******************************************************************************
 * 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.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.PropertyStore;

/**
 * @author Roberto E. Escobar
 */
public interface IResourceManager {

   public static final int OK = 1;
   public static final int FAIL = 2;
   public static final int RESOURCE_NOT_FOUND = 3;

   /**
    * Add listener to list
    */
   public boolean addResourceListener(IResourceListener listener);

   /**
    * Remove listener from list
    */
   public boolean removeResourceListener(IResourceListener listener);

   /**
    * Add a resource provider
    * 
    * @param resourceProvider to add
    */
   public boolean addResourceProvider(IResourceProvider resourceProvider);

   /**
    * Remove a resource provider
    * 
    * @param resourceProvider to remove
    */
   public boolean removeResourceProvider(IResourceProvider resourceProvider);

   /**
    * Acquire resource specified by resource locator
    * 
    * @param locator location of the resource needed
    * @param options operation options
    * @return the resource
    */
   public IResource acquire(IResourceLocator locator, PropertyStore options) throws OseeCoreException;

   /**
    * Determines if a resource exists for the given locator.
    * 
    * @param locator location of the data to check
    */
   public boolean exists(IResourceLocator locator) throws OseeCoreException;

   /**
    * Save input to location specified by resource locator
    * 
    * @param locator location where to store the data
    * @param resource to store
    * @param options operation options
    */
   public IResourceLocator save(final IResourceLocator locatorHint, final IResource resource, final PropertyStore options) throws OseeCoreException;

   /**
    * Delete resource specified by resource locator
    * 
    * @param locator location of the resource to delete
    */
   public int delete(IResourceLocator locator) throws OseeCoreException;
}

Back to the top