/** * Interface for extractors adding fields based on issues * @since 6.2 */ @ExperimentalSpi public interface IssueSearchExtractor extends EntitySearchExtractor<Issue> { }
/** * Interface for extractors adding fields based on comments * @since 6.2 */ @ExperimentalSpi public interface CommentSearchExtractor extends EntitySearchExtractor<Comment> { }
@ExperimentalSpi interface Context<T> { T getEntity(); /** * currently as for 6.2 one of issues, comments, changes, worklogs. See constants in * {@code SearchProviderFactory} for available indexes. * * @return index name */ String getIndexName(); }
/** * Interface for extractors adding fields based on comments * @since 6.2 */ @ExperimentalSpi public interface ChangeHistorySearchExtractor extends EntitySearchExtractor<ChangeHistoryGroup> { }
/** * Allows the products to create a {@link com.atlassian.plugins.hipchat.api.routes.HipChatRoutesProvider} * specific to the context. */ @ExperimentalSpi public interface HipChatRoutesProviderFactory { /** * Returns a (@link HipChatRoutesProvider} based on the given context. * @param context - the given context * @return a (@link HipChatRoutesProvider} based on the given context. */ public HipChatRoutesProvider getProvider(Map<String, Object> context); }
/** * Provides resources to be consumed by base plugin. */ @ExperimentalSpi public interface HipChatPluginResourceProvider { String getInstallingImage(); String getUninstallingImage(); String getInstalledImage(); }
/** * Parent interface for plugins to perform actions during the input process. * * @since v7.0 */ @ExperimentalSpi public interface PluggableImportRunnable extends PluggableImportHandler { /** * This will be called at the time defined by the plugin point. */ void run(); }
@ExperimentalSpi public interface ConnectDescriptorFactory { ConnectDescriptor buildDescriptorForServer(HipChatScope... scopes); }
/** * Defines a handler class that will be able to gather data from the backup, that can be used for validation or other purposes, * <p>This handler will be called in the initial stages of the import before the user is presented with a list of * projects from which to select the project to import.</p> * * <p>The role of this handler is gather information that is used in the backup that is required to check that the target system * is configured so that the import can be correctly completed.</p> * <p>For example: A Plugin that provides Test Planning, might store any Test Plans that are referenced by the issues * being imported.</p> * * @since v7.0 */ @ExperimentalSpi public interface PluggableOverviewAoEntityHandler extends AoEntityHandler { void setBackupOverviewBuilder(BackupOverviewBuilder backupOverviewBuilder); }
/** * Helper TestWatcher base that warns the user if they are using the rule as a regular @Rule, rather than a @ClassRule. * * @since 5.8 */ @ExperimentalSpi public abstract class ClassRuleTestWatcher extends TestWatcher { @Override public Statement apply(Statement base, Description description) { if (!description.isSuite()) { System.err.println("WARNING: Rule " + getClass().getSimpleName() + " is intended for use as a static @ClassRule. Using it as a regular Rule may have unintended effects, or unnecessarily slow down your tests."); } return super.apply(base, description); } }
/** * Manager that determines the URI to redirect the ConfigureServlet to * if any. */ @ExperimentalSpi public interface ConfigurationRedirectionManager { /** * Returns a defined option with the URI to redirect to * based on the request. * @param request the given request * @return a defined option with the URI to redirect to. If * no redirect is needed an empty option is returned. */ public Option<URI> getRedirectUri(HttpServletRequest request); }
/** * Defines a handler class that will be able to perform some operation given an entity name and the entities * attributes. * * @since v7.0 */ @ExperimentalSpi public interface PluggableImportAoEntityHandler extends PluggableImportHandler, AoEntityHandler { Long WEIGHT_NONE = Long.MAX_VALUE; /** * Return the weight for this entity. If this handler is does not handle the entity or care about it's ordering * return {@link #WEIGHT_NONE}. * * This is ignored (not called) during the pre-import stage where the entities are supplied in the backup XML order. * @return the weight by which to order this entity when importing. */ Long getEntityWeight(String entityName); }
/** * The interface to be implemented by classes wishing to listen to messages sent to a cluster. Implementing classes * need to be registered as listeners with the {@link com.atlassian.jira.cluster.ClusterMessagingService}. * * @since v6.3 */ @ExperimentalSpi public interface ClusterMessageConsumer { /** * Called by the ClusterMessagingService when there is a message waiting to be processed by a node. * * @param channel The channel the message was sent to * @param message The content of the message * @param senderId The id of the node that raised the message */ void receive(String channel, String message, String senderId); }
/** * Defines a validator class that will be able check if a project can be imported. * <p>A plugin can veto the import if configuration needs to be updated before an import of a project is valid and sensible.</p> * * <p>The validator is called when the user selects a particular project in the UI to import. Errors and Warnings from the validation * will be presented to the user and they can then modify the configuration of the target system to work around any problems reported.</p> * * <p>A validator would typically check the state of the target system against the data gathered in the {@link BackupProject} and * especially additional data from {@link BackupProject#getAdditionalData(String)} that may have been captured by the * plugins's own implementation of {@link com.atlassian.jira.imports.project.ao.handler.PluggableOverviewAoEntityHandler}.</p> * * @since v7.0 */ @ExperimentalSpi public interface PluggableValidator { ValidationMessage validate(BackupProject backupProject, I18nHelper i18n); }
/** * Provides context-dependent URL for given report. * * @since 6.4 */ @ExperimentalSpi public interface ReportUrlProvider { /** * <p>Generate Report URL for given {@link com.atlassian.jira.plugin.report.ReportModuleDescriptor}, within given * {@code context}.<br/> When given {@code context} does not satisfy report requirements, or Report should not * show in particular context, it should return {@link com.atlassian.fugue.Option#none()}</p> * * @param reportModule Descriptor of Report Module which URL has to be generated * @param context Context in which report will be displayed * @return Report URL or {@link com.atlassian.fugue.Option#none()} when report should not show in this context */ public Option<String> getUrl(ReportModuleDescriptor reportModule, Map<String, Object> context); }
/** * Defines a handler class that will be able to perform some operation given an entity name and the entities * attributes. * * @since v7.0 */ @ExperimentalSpi public interface PluggableImportOfBizEntityHandler extends PluggableImportHandler, ImportOfBizEntityHandler { /** * Provides the implementation an opportunity to perform some action when the document is starting to * be read. */ void startDocument(); /** * Provides the implementation an opportunity to perform some action when the document is finished being read. */ void endDocument(); /** * Return true if this handler should process the entity. * @param entityName Entities to process. */ boolean handlesEntity(String entityName); }
@ExperimentalSpi public class SimpleHipChatTokenReference implements HipChatTokenReference { private Supplier<Promise<String>> delegate; public SimpleHipChatTokenReference(Supplier<Promise<String>> delegate) { this.delegate = delegate; } public static SimpleHipChatTokenReference token(String token) { return new SimpleHipChatTokenReference(Suppliers.ofInstance(Promises.promise(token))); } @Override public Promise<HipChatToken> get() { return delegate.get().map(new Function<String, HipChatToken>() { @Override public HipChatToken apply(String input) { return new SimpleHipChatToken(input); } }); } }
@ExperimentalSpi public interface EntitySearchExtractor<T>
@ExperimentalSpi public interface ImportOfBizEntityHandler
@ExperimentalSpi public interface PluggableImportHandler