jp.ossc.installer.tools.inventory
クラス AbstaractInventory

java.lang.Object
  上位を拡張 jp.ossc.installer.tools.inventory.AbstaractInventory
直系の既知のサブクラス:
AbstractCheckInventory, Install, UnInstall

public abstract class AbstaractInventory
extends java.lang.Object

インベントリーディレクトリーにおける抽象クラスです。

導入されたバージョン:
1.0
バージョン:
1.0
作成者:
S.Fujii

フィールドの概要
protected static java.lang.String ERR_MSG_FAILED_READ_FILE
          エラーメッセージ : ファイル読み込みに失敗した場合
protected  java.io.File inventory
          インベントリーファイル
protected static java.lang.String INVENTORY_TEMPLATE_XML_FILE_PATH_NAME
          インベントリーが格納されるXMLファイルのテンプレートのファイルパス名
protected static java.lang.String NOT_INSTALLED_VALUE
          OpenStandia/Installerやプロダクトがインストールされていない場合のバージョン代替文字列
protected  java.lang.String openStandiaHomeDir
          OpenStandiaホームディレクトリ
protected static java.lang.String PRODUCT_NAME
          プロダクト名を取得する際のkey名
protected static java.lang.String PRODUCT_VER
          プロダクトのバージョンを取得する際のkey名
protected static java.lang.String STACK_APPLICATION_NAME_KEY
          アプリケーション名を取得する際のkey名
protected static java.lang.String STACK_APPLICATION_VER_KEY
          アプリケーションのバージョンを取得する際のkey名
protected  java.util.Map<java.lang.String,java.lang.String> stackXmlMap
          スタック定義ファイル
protected static java.lang.String WARN_MSG_APPLICATION_NAME_IS_NULL
          警告メッセージ : アプリケーション名がnullの場合
protected static java.lang.String WARN_MSG_APPLICATION_VERSION_IS_NULL
          警告メッセージ : アプリケーションのバージョンがnullの場合
protected static java.lang.String WARN_MSG_PRODUCT_NAME_IS_NULL
          警告メッセージ : プロダクト名がnullの場合
protected static java.lang.String WARN_MSG_PRODUCT_VERSION_IS_NULL
          警告メッセージ : プロダクトのバージョンがnullの場合
 
コンストラクタの概要
AbstaractInventory()
           
 
メソッドの概要
protected  void createInventoryFile()
          リソースに含まれているテンプレートXMLファイルを
使用してインベントリーファイルを新規に生成する
protected  void deleteApplicationNode(java.lang.String name)
          インベントリーファイルからアプリケーション情報を削除
protected  void deleteInventoryFile()
          インベントリーファイルを削除する
protected  void deleteProductNode(java.lang.String name)
          インベントリーファイルからプロダクト情報を削除
 void execute(java.lang.String no, java.io.File stackXml)
          インベントリーファイルにインストール記録を残す
protected  boolean existsProductNode(java.lang.String name)
          インベントリーファイルからプロダクト情報が存在するかどうか
protected  java.lang.String getApplicationVerNode(java.lang.String name)
          インベントリーファイルからアプリケーションのバージョンを取得する
protected  int getProductNodeNum()
          インベントリーファイルからインストール済みのプロダクト数を取得する
protected  java.lang.String getProductVerNode(java.lang.String name)
          インベントリーファイルから指定されたプロダクトのバージョンを取得する
protected  java.io.InputStream getResouceInputStream(java.lang.String filePath)
          指定された相対パスからリソースのInputStreamを取得する
protected  java.lang.String getResoucePath(java.lang.String filePath)
          指定された相対パスからリソースパスを取得する
protected  org.w3c.dom.Document readInventoryFile(java.io.File inventory)
          インベントリーファイルを読み込む
protected  void writeApplicationNode(java.lang.String name, java.lang.String version)
          インベントリーファイルに下記を書き込む
・アプリケーション名
・アプリケーションのバージョン
protected  void writeInventoryFile(org.w3c.dom.Document xtree, java.io.File outputFile)
          インベントリーファイルに内容を転送する
protected  void writeProductNode(java.lang.String name, java.lang.String version)
          インベントリーファイルに下記を書き込む
・プロダクト名
・プロダクトのバージョン
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

NOT_INSTALLED_VALUE

protected static final java.lang.String NOT_INSTALLED_VALUE
OpenStandia/Installerやプロダクトがインストールされていない場合のバージョン代替文字列

関連項目:
定数フィールド値

INVENTORY_TEMPLATE_XML_FILE_PATH_NAME

protected static final java.lang.String INVENTORY_TEMPLATE_XML_FILE_PATH_NAME
インベントリーが格納されるXMLファイルのテンプレートのファイルパス名

関連項目:
定数フィールド値

STACK_APPLICATION_NAME_KEY

protected static final java.lang.String STACK_APPLICATION_NAME_KEY
アプリケーション名を取得する際のkey名

関連項目:
定数フィールド値

STACK_APPLICATION_VER_KEY

protected static final java.lang.String STACK_APPLICATION_VER_KEY
アプリケーションのバージョンを取得する際のkey名

関連項目:
定数フィールド値

PRODUCT_NAME

protected static final java.lang.String PRODUCT_NAME
プロダクト名を取得する際のkey名

関連項目:
定数フィールド値

PRODUCT_VER

protected static final java.lang.String PRODUCT_VER
プロダクトのバージョンを取得する際のkey名

関連項目:
定数フィールド値

ERR_MSG_FAILED_READ_FILE

protected static final java.lang.String ERR_MSG_FAILED_READ_FILE
エラーメッセージ : ファイル読み込みに失敗した場合

関連項目:
定数フィールド値

WARN_MSG_APPLICATION_NAME_IS_NULL

protected static final java.lang.String WARN_MSG_APPLICATION_NAME_IS_NULL
警告メッセージ : アプリケーション名がnullの場合

関連項目:
定数フィールド値

WARN_MSG_APPLICATION_VERSION_IS_NULL

protected static final java.lang.String WARN_MSG_APPLICATION_VERSION_IS_NULL
警告メッセージ : アプリケーションのバージョンがnullの場合

関連項目:
定数フィールド値

WARN_MSG_PRODUCT_NAME_IS_NULL

protected static final java.lang.String WARN_MSG_PRODUCT_NAME_IS_NULL
警告メッセージ : プロダクト名がnullの場合

関連項目:
定数フィールド値

WARN_MSG_PRODUCT_VERSION_IS_NULL

protected static final java.lang.String WARN_MSG_PRODUCT_VERSION_IS_NULL
警告メッセージ : プロダクトのバージョンがnullの場合

関連項目:
定数フィールド値

stackXmlMap

protected java.util.Map<java.lang.String,java.lang.String> stackXmlMap
スタック定義ファイル


openStandiaHomeDir

protected java.lang.String openStandiaHomeDir
OpenStandiaホームディレクトリ


inventory

protected java.io.File inventory
インベントリーファイル

コンストラクタの詳細

AbstaractInventory

public AbstaractInventory()
メソッドの詳細

execute

public void execute(java.lang.String no,
                    java.io.File stackXml)
             throws java.io.IOException,
                    javax.xml.parsers.ParserConfigurationException,
                    org.xml.sax.SAXException,
                    javax.xml.transform.TransformerException
インベントリーファイルにインストール記録を残す

パラメータ:
no - プロダクトNo
stackXml - スタック定義ファイル
例外:
java.io.IOException - IOException
org.xml.sax.SAXException - SAXException
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
javax.xml.transform.TransformerException - TransformerException

createInventoryFile

protected void createInventoryFile()
                            throws java.io.IOException,
                                   org.xml.sax.SAXException,
                                   javax.xml.parsers.ParserConfigurationException,
                                   javax.xml.transform.TransformerException
リソースに含まれているテンプレートXMLファイルを
使用してインベントリーファイルを新規に生成する

例外:
java.io.IOException - IOException
org.xml.sax.SAXException - SAXException
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
javax.xml.transform.TransformerException - TransformerException

deleteInventoryFile

protected void deleteInventoryFile()
インベントリーファイルを削除する


writeApplicationNode

protected void writeApplicationNode(java.lang.String name,
                                    java.lang.String version)
                             throws javax.xml.parsers.ParserConfigurationException,
                                    org.xml.sax.SAXException,
                                    java.io.IOException,
                                    javax.xml.transform.TransformerException
インベントリーファイルに下記を書き込む
・アプリケーション名
・アプリケーションのバージョン

パラメータ:
name - アプリケーション名
version - アプリケーションのバージョン
例外:
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
org.xml.sax.SAXException - SAXException
java.io.IOException - IOException
javax.xml.transform.TransformerException - TransformerException

writeProductNode

protected void writeProductNode(java.lang.String name,
                                java.lang.String version)
                         throws javax.xml.parsers.ParserConfigurationException,
                                org.xml.sax.SAXException,
                                java.io.IOException,
                                javax.xml.transform.TransformerException
インベントリーファイルに下記を書き込む
・プロダクト名
・プロダクトのバージョン

パラメータ:
name - プロダクト名
version - プロダクトのバージョン
例外:
java.io.IOException - IOException
org.xml.sax.SAXException - SAXException
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
javax.xml.transform.TransformerException - TransformerException

deleteApplicationNode

protected void deleteApplicationNode(java.lang.String name)
                              throws javax.xml.parsers.ParserConfigurationException,
                                     org.xml.sax.SAXException,
                                     java.io.IOException,
                                     javax.xml.transform.TransformerException
インベントリーファイルからアプリケーション情報を削除

パラメータ:
name - 削除するアプリケーション名
例外:
java.io.IOException - IOException
org.xml.sax.SAXException - SAXException
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
javax.xml.transform.TransformerException - TransformerException

deleteProductNode

protected void deleteProductNode(java.lang.String name)
                          throws javax.xml.parsers.ParserConfigurationException,
                                 org.xml.sax.SAXException,
                                 java.io.IOException,
                                 javax.xml.transform.TransformerException
インベントリーファイルからプロダクト情報を削除

パラメータ:
name - 削除するプロダクト名
例外:
java.io.IOException - IOException
org.xml.sax.SAXException - SAXException
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
javax.xml.transform.TransformerException - TransformerException

existsProductNode

protected boolean existsProductNode(java.lang.String name)
                             throws javax.xml.parsers.ParserConfigurationException,
                                    org.xml.sax.SAXException,
                                    java.io.IOException,
                                    javax.xml.transform.TransformerException
インベントリーファイルからプロダクト情報が存在するかどうか

パラメータ:
name - 取得するプロダクト名
戻り値:
true : 存在する / false : 存在しない
例外:
java.io.IOException - IOException
org.xml.sax.SAXException - SAXException
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
javax.xml.transform.TransformerException - TransformerException

getApplicationVerNode

protected java.lang.String getApplicationVerNode(java.lang.String name)
                                          throws javax.xml.parsers.ParserConfigurationException,
                                                 org.xml.sax.SAXException,
                                                 java.io.IOException
インベントリーファイルからアプリケーションのバージョンを取得する

パラメータ:
name - 取得するアプリケーション名
戻り値:
アプリケーションのバージョン
例外:
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
org.xml.sax.SAXException - SAXException
java.io.IOException - IOException

getProductVerNode

protected java.lang.String getProductVerNode(java.lang.String name)
                                      throws javax.xml.parsers.ParserConfigurationException,
                                             org.xml.sax.SAXException,
                                             java.io.IOException,
                                             javax.xml.transform.TransformerException
インベントリーファイルから指定されたプロダクトのバージョンを取得する

パラメータ:
name - 取得するプロダクト名
戻り値:
プロダクトのバージョン
例外:
java.io.IOException - IOException
org.xml.sax.SAXException - SAXException
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
javax.xml.transform.TransformerException - TransformerException

getProductNodeNum

protected int getProductNodeNum()
                         throws javax.xml.parsers.ParserConfigurationException,
                                org.xml.sax.SAXException,
                                java.io.IOException
インベントリーファイルからインストール済みのプロダクト数を取得する

戻り値:
プロダクト数
例外:
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
org.xml.sax.SAXException - SAXException
java.io.IOException - IOException

readInventoryFile

protected org.w3c.dom.Document readInventoryFile(java.io.File inventory)
                                          throws javax.xml.parsers.ParserConfigurationException,
                                                 org.xml.sax.SAXException,
                                                 java.io.IOException
インベントリーファイルを読み込む

パラメータ:
inventory - インベントリーファイル
戻り値:
インベントリーファイルを解析した結果
例外:
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
org.xml.sax.SAXException - SAXException
java.io.IOException - IOException

writeInventoryFile

protected void writeInventoryFile(org.w3c.dom.Document xtree,
                                  java.io.File outputFile)
                           throws java.io.FileNotFoundException,
                                  javax.xml.transform.TransformerException
インベントリーファイルに内容を転送する

パラメータ:
xtree - 書き込み内容Document
outputFile - 書き込み先ファイル
例外:
java.io.FileNotFoundException - FileNotFoundException
javax.xml.transform.TransformerException - TransformerException

getResoucePath

protected java.lang.String getResoucePath(java.lang.String filePath)
                                   throws java.io.IOException
指定された相対パスからリソースパスを取得する

パラメータ:
filePath - 相対パス
戻り値:
リソースパス
例外:
java.io.IOException - IOException

getResouceInputStream

protected java.io.InputStream getResouceInputStream(java.lang.String filePath)
                                             throws java.io.IOException
指定された相対パスからリソースのInputStreamを取得する

パラメータ:
filePath - 相対パス
戻り値:
リソースのInputStream
例外:
java.io.IOException - IOException