<li><ahref="../../../../com/djrapitops/plan/extension/ExtensionServerMethodCallerTask.html"title="class in com.djrapitops.plan.extension"><spanclass="typeNameLink">Prev Class</span></a></li>
<li><ahref="../../../../com/djrapitops/plan/extension/ExtensionService.ExtensionServiceHolder.html"title="class in com.djrapitops.plan.extension"><spanclass="typeNameLink">Next Class</span></a></li>
<dd><ahref="../../../../com/djrapitops/plan/extension/ExtensionServiceImplementation.html"title="class in com.djrapitops.plan.extension">ExtensionServiceImplementation</a></dd>
<divclass="block">Interface for registering <ahref="../../../../com/djrapitops/plan/extension/DataExtension.html"title="interface in com.djrapitops.plan.extension"><code>DataExtension</code></a>s.
<p>
Obtaining instance:
- Obtain instance with <ahref="../../../../com/djrapitops/plan/extension/ExtensionService.html#getInstance--"><code>getInstance()</code></a>.
- Make sure to catch a possible NoClassDefFoundError in case Plan is not installed
- Catch IllegalStateException in case ExtensionService is not enabled
<p>
Registering <ahref="../../../../com/djrapitops/plan/extension/DataExtension.html"title="interface in com.djrapitops.plan.extension"><code>DataExtension</code></a>:
- Register your <ahref="../../../../com/djrapitops/plan/extension/DataExtension.html"title="interface in com.djrapitops.plan.extension"><code>DataExtension</code></a> with <ahref="../../../../com/djrapitops/plan/extension/ExtensionService.html#register-com.djrapitops.plan.extension.DataExtension-"><code>register(DataExtension)</code></a>
- Catch a possible IllegalArgumentException in case the DataExtension implementation is invalid.</div>
<tdclass="colLast"><code><spanclass="memberNameLink"><ahref="../../../../com/djrapitops/plan/extension/ExtensionService.ExtensionServiceHolder.html"title="class in com.djrapitops.plan.extension">ExtensionService.ExtensionServiceHolder</a></span></code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ulclass="blockList">
<liclass="blockList"><aname="method.summary">
<!---->
</a>
<h3>Method Summary</h3>
<tableclass="memberSummary"border="0"cellpadding="3"cellspacing="0"summary="Method Summary table, listing methods, and an explanation">
<thclass="colFirst"scope="col">Modifier and Type</th>
<thclass="colLast"scope="col">Method and Description</th>
</tr>
<trid="i0"class="altColor">
<tdclass="colFirst"><code>static <ahref="../../../../com/djrapitops/plan/extension/ExtensionService.html"title="interface in com.djrapitops.plan.extension">ExtensionService</a></code></td>
<divclass="block">Obtain instance of ExtensionService.</div>
</td>
</tr>
<trid="i1"class="rowColor">
<tdclass="colFirst"><code>java.util.Optional<<ahref="../../../../com/djrapitops/plan/extension/Caller.html"title="interface in com.djrapitops.plan.extension">Caller</a>></code></td>
<tdclass="colLast"><code><spanclass="memberNameLink"><ahref="../../../../com/djrapitops/plan/extension/ExtensionService.html#register-com.djrapitops.plan.extension.DataExtension-">register</a></span>(<ahref="../../../../com/djrapitops/plan/extension/DataExtension.html"title="interface in com.djrapitops.plan.extension">DataExtension</a> extension)</code>
<divclass="block">Register your <ahref="../../../../com/djrapitops/plan/extension/DataExtension.html"title="interface in com.djrapitops.plan.extension"><code>DataExtension</code></a> implementation.</div>
</td>
</tr>
<trid="i2"class="altColor">
<tdclass="colFirst"><code>void</code></td>
<tdclass="colLast"><code><spanclass="memberNameLink"><ahref="../../../../com/djrapitops/plan/extension/ExtensionService.html#unregister-com.djrapitops.plan.extension.DataExtension-">unregister</a></span>(<ahref="../../../../com/djrapitops/plan/extension/DataExtension.html"title="interface in com.djrapitops.plan.extension">DataExtension</a> extension)</code>
<divclass="block">Unregister your <ahref="../../../../com/djrapitops/plan/extension/DataExtension.html"title="interface in com.djrapitops.plan.extension"><code>DataExtension</code></a> implementation.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<divclass="details">
<ulclass="blockList">
<liclass="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ulclass="blockList">
<liclass="blockList"><aname="method.detail">
<!---->
</a>
<h3>Method Detail</h3>
<aname="getInstance--">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>getInstance</h4>
<pre>static <ahref="../../../../com/djrapitops/plan/extension/ExtensionService.html"title="interface in com.djrapitops.plan.extension">ExtensionService</a> getInstance()</pre>
<divclass="block">Obtain instance of ExtensionService.</div>
<dl>
<dt><spanclass="returnLabel">Returns:</span></dt>
<dd>ExtensionService implementation.</dd>
<dt><spanclass="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NoClassDefFoundError</code> - If Plan is not installed and this class can not be found or if older Plan version is installed.</dd>
<dd><code>java.lang.IllegalStateException</code> - If Plan is installed, but not enabled.</dd>
<pre>java.util.Optional<<ahref="../../../../com/djrapitops/plan/extension/Caller.html"title="interface in com.djrapitops.plan.extension">Caller</a>> register(<ahref="../../../../com/djrapitops/plan/extension/DataExtension.html"title="interface in com.djrapitops.plan.extension">DataExtension</a> extension)</pre>
<divclass="block">Register your <ahref="../../../../com/djrapitops/plan/extension/DataExtension.html"title="interface in com.djrapitops.plan.extension"><code>DataExtension</code></a> implementation.
<p>
You can use <ahref="../../../../com/djrapitops/plan/extension/extractor/ExtensionExtractor.html#validateAnnotations--"><code>ExtensionExtractor.validateAnnotations()</code></a> in your Unit Tests to prevent IllegalArgumentExceptions here at runtime.</div>
<dd><code>extension</code> - Your DataExtension implementation, see <ahref="../../../../com/djrapitops/plan/extension/DataExtension.html"title="interface in com.djrapitops.plan.extension"><code>DataExtension</code></a> for requirements.</dd>
<dt><spanclass="returnLabel">Returns:</span></dt>
<dd>Optional <ahref="../../../../com/djrapitops/plan/extension/Caller.html"title="interface in com.djrapitops.plan.extension"><code>Caller</code></a> that can be used to call for data update in Plan database manually - If the Optional is not present the user has disabled the extension in Plan config.</dd>
<dt><spanclass="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - If an implementation violation is found.</dd>
<pre>void unregister(<ahref="../../../../com/djrapitops/plan/extension/DataExtension.html"title="interface in com.djrapitops.plan.extension">DataExtension</a> extension)</pre>
<divclass="block">Unregister your <ahref="../../../../com/djrapitops/plan/extension/DataExtension.html"title="interface in com.djrapitops.plan.extension"><code>DataExtension</code></a> implementation.
<p>
This method should be used if calling methods on the DataExtension suddenly becomes unavailable, due to
<li><ahref="../../../../com/djrapitops/plan/extension/ExtensionServerMethodCallerTask.html"title="class in com.djrapitops.plan.extension"><spanclass="typeNameLink">Prev Class</span></a></li>
<li><ahref="../../../../com/djrapitops/plan/extension/ExtensionService.ExtensionServiceHolder.html"title="class in com.djrapitops.plan.extension"><spanclass="typeNameLink">Next Class</span></a></li>