resource providers
[fedora-idea.git] / xml / openapi / src / com / intellij / javaee / ExternalResourceManager.java
blob4471f3d412604044a390c5464e86fdcc2fc3713b
1 /*
2 * Copyright 2000-2007 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.intellij.javaee;
18 import com.intellij.openapi.components.ServiceManager;
19 import com.intellij.openapi.fileTypes.FileType;
20 import com.intellij.openapi.project.Project;
21 import com.intellij.openapi.util.ModificationTracker;
22 import com.intellij.psi.PsiFile;
23 import org.jetbrains.annotations.NonNls;
24 import org.jetbrains.annotations.NotNull;
25 import org.jetbrains.annotations.Nullable;
27 /**
28 * author: lesya
30 public abstract class ExternalResourceManager implements ModificationTracker {
32 public static ExternalResourceManager getInstance() {
33 return ServiceManager.getService(ExternalResourceManager.class);
36 public abstract void addResource(@NonNls String url, @NonNls String location);
37 public abstract void addResource(@NonNls String url, @NonNls String version, @NonNls String location);
39 public abstract void removeResource(String url);
40 public abstract void removeResource(String url, String version);
42 /** @see #getResourceLocation(String, com.intellij.openapi.project.Project) */
43 @Deprecated
44 public abstract String getResourceLocation(@NonNls String url);
45 public abstract String getResourceLocation(@NonNls String url, String version);
47 public abstract String getResourceLocation(@NonNls String url, @NotNull Project project);
49 @Nullable
50 public abstract PsiFile getResourceLocation(@NotNull @NonNls String url, @NotNull PsiFile baseFile, String version);
52 public abstract String[] getResourceUrls(@Nullable FileType fileType, final boolean includeStandard);
53 public abstract String[] getResourceUrls(@Nullable FileType fileType, @NonNls String version, final boolean includeStandard);