@Component public class ImageViewHelper extends Object
修飾子とタイプ | フィールドと説明 |
---|---|
protected ConvertPdfHelper |
convertPdfHelper
ConvertPdfHelper.
|
protected IdentifierHelper |
identifierHelper
IdentifierHelper.
|
protected SessionScopeStorageFileHelper |
sessionScopeStorageFileHelper
SessionScopeStorageFileHelper.
|
コンストラクタと説明 |
---|
ImageViewHelper() |
修飾子とタイプ | メソッドと説明 |
---|---|
Map<String,Object> |
getConvertPdfInfo(String filePath)
画像のPDF変換可否取得.
|
String |
getViewFilePath(String filePath)
参照用画像のパスを返却します(PC用).
|
void |
getViewPathPublicStorage(String filePath)
参照用画像のパスを返却します.
|
void |
getViewPathSessionStorage(String filePath)
参照用画像のパスを返却します.
|
boolean |
isConvertPdf(String filePath)
画像変換ができるか判定.
|
boolean |
isConvertPdf(String filePath,
boolean isPublicStorage)
画像変換ができるか判定.
|
Map<String,String> |
joinPdfFiles(List<String> targetFilePaths)
複数のPDFファイルまたは画像ファイルを1つのPDFファイルに結合する.
|
@Autowired protected SessionScopeStorageFileHelper sessionScopeStorageFileHelper
@Autowired protected ConvertPdfHelper convertPdfHelper
@Autowired protected IdentifierHelper identifierHelper
public void getViewPathSessionStorage(String filePath) throws KaidenSystemException, IOException
元の画像⇒pdfに変換後jpegに変換し、 jpegの画像パスを返却します。.
filePath
- 参照したい画像のパスKaidenSystemException
- PDF変換に失敗した場合throwされるIOException
- ファイル操作に失敗した場合にthrowされるpublic void getViewPathPublicStorage(String filePath) throws KaidenSystemException, IOException
元の画像⇒pdfに変換後jpegに変換し、 jpegの画像パスを返却します。.
filePath
- 参照したい画像のパスKaidenSystemException
- PDF変換に失敗した場合throwされるIOException
- ファイル操作に失敗した場合にthrowされるpublic String getViewFilePath(String filePath) throws KaidenSystemException, IOException
元の画像⇒pdfに変換し、 pdfのファイルパスを返却します。.
filePath
- 参照したい画像のパスKaidenSystemException
- PDF変換に失敗した場合throwされるIOException
- ファイル操作に失敗した場合にthrowされるpublic boolean isConvertPdf(String filePath)
filePath
- 判定したい画像パスpublic boolean isConvertPdf(String filePath, boolean isPublicStorage)
filePath
- 判定したい画像パスisPublicStorage
- 対象ストレージ(true:パブリックストレージ, false:セッションストレージ)public Map<String,Object> getConvertPdfInfo(String filePath)
対象画像のPDF変換可否を取得します。
処理結果には下記の内容が格納されます。
取得キー | 値 |
---|---|
result | true(変換可)、false(変換不可) |
page | PDFのページ数(変換可の場合は実際のページ数、変換不可の場合は0) |
filePath
- 判定したい画像パスpublic Map<String,String> joinPdfFiles(List<String> targetFilePaths) throws KaidenSystemException
targetFilePaths
- 結合対象のファイルパスリストKaidenSystemException
- PDF結合エラーCopyright © 2024 Sumitomo Life Information Systems Co., Ltd. All Rights Reserved.