1 package com.atlassian.plugin.impl;
2
3
4
5
6
7
8 public class UnloadablePlugin extends StaticPlugin
9 {
10 private static final String UNKNOWN_KEY_PREFIX = "Unknown-";
11 private String errorText;
12 private boolean uninstallable = true;
13 private boolean deletable = true;
14
15 public UnloadablePlugin()
16 {
17 this(null);
18 }
19
20
21
22
23
24 public UnloadablePlugin(String text)
25 {
26 this.errorText = text;
27 setKey(UNKNOWN_KEY_PREFIX + System.identityHashCode(this));
28 }
29
30 public boolean isUninstallable()
31 {
32 return uninstallable;
33 }
34
35 public void setDeletable(boolean deletable)
36 {
37 this.deletable = deletable;
38 }
39
40 public boolean isDeleteable()
41 {
42 return deletable;
43 }
44
45 public void setUninstallable(boolean uninstallable)
46 {
47 this.uninstallable = uninstallable;
48 }
49
50 public boolean isEnabledByDefault()
51 {
52 return false;
53 }
54
55 public String getErrorText()
56 {
57 return errorText;
58 }
59
60 public void setErrorText(String errorText)
61 {
62 this.errorText = errorText;
63 }
64
65
66 public void close()
67 {
68
69 }
70 }