サービス

サービスは、Jira 内で定期的に実行されるクラスです。サービスは Jira 内で実行されるため、すべての Jira API を使用できます。また、Java で記述されているため、任意の Java ライブラリを使用できます。

サービスの利便性として、データを Jira に定期的にプルすることにより、外部システムとの統合が可能になります。Jira には事前に作成済みのサービスがいくつか付属していますが、カスタム サービスを作成して、実行中に接続することもできます。

(tick) 新しいサービスを作成しませんか?

組み込みの Jira サービスを拡張しない場合、SAL API を使用しサービスを新しく記述することをおすすめします。詳細については、「SAL チュートリアルを使用したイベント スケジュールの作成」を参照してください。

次のすべての手順を行うには、Jira システム管理者グローバル権限を持つユーザーとしてログインする必要があります。

サービスの登録

(info) 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).

  1. In the upper-right corner of the screen, select Administration > System
  2. 詳細 > サービス を選択し、すべての設定済みサービスを表示するページを開きます。
  3. ページの下部にある サービスの追加 フォームで、次のフィールドの入力を完了します。
    • 名前 - このサービスの記述名。
    • Class — the fully-qualified class name of your service. This is likely to have the form com.atlassian.jira.service.services.type.TypeService
      See Sample services for provided service class names.
      (info) 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.
    • 遅延 - サービス実行間の遅延(分単位)。
      たとえば、デバッグ サービスを追加するには、組み込みサービスをクリックし、次にデバッグ サービスリンクをクリックします。
  4. 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.
    (info) Your service's options will vary depending on the type (i.e. class) of service you chose.
  5. 編集サービス ページの残りのオプション設定を完了したあと、更新 ボタンをクリックして、新しいサービスのオプションを保存します。

サービス プロパティの編集

  1. In the upper-right corner of the screen, select Administration > System
  2. 詳細 > サービス を選択し、すべての設定済みサービスを表示するページを開きます。
  3. プロパティを編集したいサービスに関連付けられた 編集 リンクをクリックします。

たとえば、Jira からメールが送信される間隔を変更するには、[メール キュー サービス] を編集し、[遅延] を既定値の 1 分から変更します。

サービスの削除

  1. In the upper-right corner of the screen, select Administration > System
  2. 詳細 > サービス を選択し、すべての設定済みサービスを表示するページを開きます。
  3. 削除したいサービスに関連付けられた 削除 リンクをクリックします。

組み込みサービス

Jira にはすぐに利用できる便利なサービスが含まれており、そのまま使用することも、独自の環境で使用するために修正することもできます。組み込みサービスのすべてのソース コードが利用可能で、独自のサービスを作成するための例として利用できます。すべての組み込みサービスは Jira に含まれており、設定を行うだけで使用できます。

エクスポート サービス

エクスポート サービスは、Jira を定期的にバックアップするのに便利です。このサービスが実行されるたびに、パラメータとして指定されたディレクトリに、Jira のすべてのデータがエクスポートされます。エクスポート ファイルにはタイムスタンプが設定されるため、このサービスはバックアップ システムとして利用できます。

このサービスをテストするには、com.atlassian.jira.service.services.export.ExportService クラスを使用するサービスを追加します。Jira は (セットアップ ウィザードが完了したあとに) 新しい Jira インストールにエクスポート サービスを設定します。そのため、このサービスはすでに設定されている可能性があります。

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 のメール ハンドラ設定の詳細については、「メールから課題やコメントを作成する」を参照してください。

カスタム サービス

Jira を使用する開発者が独自の Jira サービスを作成する場合、Jira サービス クラスはすべて、com.atlassian.jira.service.JiraService を拡張する必要があることにご注意ください。大半のサービスは、com.atlassian.jira.service.AbstractService またはより特化したサブクラスによって拡張されます。

最終更新日: 2019 年 10 月 3 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.