blob: 5cb476a7a7bc01ffff3c16af72b5f3f8c5802a8d (
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
|
/*******************************************************************************
* Copyright (c) 2010, 2019 IBM Corporation and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.jsf.common.internal.resource;
import java.util.List;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
/**
* A resource singleton object manager that manages singletons that are aware
* of the the resources they are singletons for.
*
* @author cbateman
* @param <RESTYPE>
*
*/
public abstract class ResourceManager<RESTYPE extends IResource> extends
ResourceSingletonObjectManager<ResourceTracker<RESTYPE>, IResource>
{
/**
* @param workspace
*/
public ResourceManager(IWorkspace workspace)
{
super(workspace);
}
public void dispose()
{
super.dispose();
}
/**
* @param listener
*/
public void addListener(final IResourceLifecycleListener listener)
{
super.addLifecycleEventListener(listener);
}
/**
* @param listener
*/
public void removeListener(final IResourceLifecycleListener listener)
{
super.removeLifecycleEventListener(listener);
}
/* (non-Javadoc)
* @see org.eclipse.jst.jsf.common.internal.resource.ResourceSingletonObjectManager#createNewInstance(org.eclipse.core.resources.IResource)
*/
protected abstract ResourceTracker<RESTYPE> createNewInstance(final IResource resource);
/**
* Initialize any state about the current resources we are managing.
*/
public abstract void initResources();
/**
* @return the current list of resources being managed.
*/
public abstract List<RESTYPE> getResources();
}
|