サービス
サービスは、JIRA 内で定期的に実行されるクラスです。サービスは JIRA 内で実行されるため、すべての JIRA API を使用できます - また、Java で記述されているため、任意の Java ライブラリを使用できます。
サービスが便利なのは、データを JIRA に定期的にプルすることにより、外部システムとの統合が可能になるためです。JIRA には、事前に作成されたサービスがいくつか付属していて、カスタム サービスを作成して、実行時にプラグインすることもできます。
新しいサービスを作成しませんか?
組み込みの JIRA サービスを拡張していない場合は、SAL API を使用した新しいサービスの作成をぜひとも検討すべきです。詳細については、 SAL チュートリアルを使用したイベント スケジュールの作成 を参照してください。
Note: For all of the following procedures, you must be logged in as a user with the JIRA Administrators global permission.
サービスの登録
For custom-written services, make sure your service class is in the classpath where JIRA can see it — the best locations are usually the
<jira-application-dir>/WEB-INF/classes
or <jira-application-dir>/WEB-INF/lib
subdirectories within of your JIRA application installation directory (as JAR files).
- > [システム] の順に選択します。
- 詳細 > サービス を選択し、すべての設定済みサービスを表示するページを開きます。
- ページの下部にある サービスの追加 フォームで、次のフィールドの入力を完了します。
- 名前 - このサービスの記述名。
- Class — the fully-qualified class name of your service. This is likely to have the form
com.atlassian.jira.service.services.
type.Type
Service
See Sample services for provided service class names.To use one of JIRA's built-in service classes, first click the Built-in Services link to expand the list of service classes and then click the name of the specific class in the list. The fully-qualified class name of the built-in service will be added to the Class field.
- 遅延 - サービス実行間の遅延(分単位)。
たとえば、デバッグ サービスを追加するには、組み込みサービスをクリックし、次にデバッグ サービスリンクをクリックします。
- After completing the fields on the Add Service form, click the Add Service button. This opens the Edit Service page, where you can configure your new service's options.
Your service's options will vary depending on the type (i.e. class) of service you chose.
- 編集サービス ページの残りのオプション設定を完了したあと、更新 ボタンをクリックして、新しいサービスのオプションを保存します。
サービス プロパティの編集
- > [システム] の順に選択します。
- 詳細 > サービス を選択し、すべての設定済みサービスを表示するページを開きます。
- プロパティを編集したいサービスに関連付けられた 編集 リンクをクリックします。
たとえば、JIRA からメールが送信される間隔を変更するには、メールキューサービス を編集し、遅延 を既定値の 1 分から変更します。
サービスの削除
- > [システム] の順に選択します。
- 詳細 > サービス を選択し、すべての設定済みサービスを表示するページを開きます。
- 削除したいサービスに関連付けられた 削除 リンクをクリックします。
組み込みサービス
JIRA にはすぐに利用できる便利なサービスがあり、そのまま使用することもできれば、独自の環境で使用するために修正することもできます。組み込みサービスのすべてのソースコードが利用可能で、独自のサービスを作成する簡単さがよくわかります。すべての組み込みサービスは JIRA に含まれており、使用に必要なのは設定だけです。
エクスポート サービス
エクスポート サービスは、定期的に JIRA をバックアップするのに便利です。このサービスが実行されるたびに、パラメーターとして用意されたディレクトリに、JIRA のデータがすべてエクスポートされます。エクスポート ファイルにはタイムスタンプが付けられるため、このサービスはバックアップシステムとして機能します。
To test this service, add a service with the class com.atlassian.jira.service.services.export.ExportService. JIRA sets up an ExportService in new JIRA installations (once the setup wizard has been completed). Hence, you may find you already have one.
You can find this class within the following directory of an expanded JIRA source archive (which can be downloaded by JIRA customers from https://my.atlassian.com):<source-installation-directory>/jira-project/jira-components/jira-core/src/main/java/com/atlassian/jira/service/services/export
メールハンドラ サービス
JIRA のメールハンドラ サービスは、JIRA の サービス ページで設定することはできません (削除する場合を除く)。カスタム メールハンドラの作成を含め、JIRA のメールハンドラ設定の詳細については、 メールから課題やコメントを作成する を参照してください。
カスタム サービス
If you are a JIRA developer who wishes to write your own JIRA service, please note that JIRA Service classes must all extend com.atlassian.jira.service.JiraService. Most do so by extending com.atlassian.jira.service.AbstractService or some more specialized subclass.