1 19 package org.java.plugin.tools.mocks; 20 21 import org.java.plugin.registry.PluginPrerequisite; 22 import org.java.plugin.registry.Version; 23 24 27 public class MockPluginPrerequisite extends MockPluginElement implements 28 PluginPrerequisite { 29 private String match; 30 private String pluginId; 31 private Version pluginVersion; 32 private boolean isExported; 33 private boolean isOptional; 34 private boolean isReverseLookup; 35 private boolean matches = true; 36 37 40 public String getMatch() { 41 return match; 42 } 43 44 48 public MockPluginPrerequisite setMatch(final String value) { 49 match = value; 50 return this; 51 } 52 53 56 public String getPluginId() { 57 return pluginId; 58 } 59 60 64 public MockPluginPrerequisite setPluginId(final String value) { 65 pluginId = value; 66 return this; 67 } 68 69 72 public Version getPluginVersion() { 73 return pluginVersion; 74 } 75 76 80 public MockPluginPrerequisite setPluginVersion(final Version value) { 81 pluginVersion = value; 82 return this; 83 } 84 85 88 public boolean isExported() { 89 return isExported; 90 } 91 92 96 public MockPluginPrerequisite setExported(final boolean value) { 97 isExported = value; 98 return this; 99 } 100 101 104 public boolean isOptional() { 105 return isOptional; 106 } 107 108 112 public MockPluginPrerequisite setOptional(final boolean value) { 113 isOptional = value; 114 return this; 115 } 116 117 120 public boolean isReverseLookup() { 121 return isReverseLookup; 122 } 123 124 128 public MockPluginPrerequisite setReverseLookup(final boolean value) { 129 isReverseLookup = value; 130 return this; 131 } 132 133 136 public boolean matches() { 137 return matches; 138 } 139 140 144 public MockPluginPrerequisite setMatches(final boolean value) { 145 matches = value; 146 return this; 147 } 148 149 152 public String getUniqueId() { 153 return getDeclaringPluginDescriptor().getId() + '@' + getId(); 154 } 155 } 156 | Popular Tags |