Class SignDir
java.lang.Object
org.ofdrw.pkg.container.VirtualContainer
org.ofdrw.pkg.container.SignDir
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIndex()获取该签名容器索引获取签名容器名称,用于兼容非规范的签名容器名称getSeal()获取 电子印章文件获取 签名/签章 描述文件获取 签名值文件设置电子印章文件setSignature(Signature signature) 设置 签名/签章 描述文件setSignedValue(Path signedValue) 设置签名值文件Methods inherited from class VirtualContainer
addRaw, clean, close, deleteFile, exist, exit, flush, flushContainerByName, flushFileByName, getAbsLoc, getContainer, getContainerName, getContainerPath, getFile, getFile, getObj, getObj, getParent, getSysAbsPath, obtainContainer, putFile, putFile, putFile, putFileWithPath, putObj, setContainerPath, setParent, syncCacheWithFileSystemModifier and TypeMethodDescriptionaddRaw(String fileName, InputStream in) 向虚拟容器中直接加入流类型资源voidclean()删除整个虚拟容器voidclose()voiddeleteFile(String fileName) 删除文件boolean判断文件或对象是否存在booleanDeprecated.voidflush()将缓存中的对象写入到文件系统中flushContainerByName(String name) 从缓存中刷新指定容器到文件系统中flushFileByName(String name) 从缓存将指定对象写入到文件系统中获取在容器中的绝对路径<R extends VirtualContainer>
RgetContainer(String name, Function<Path, R> mapper) 获取虚拟容器获取虚拟容器的名称获取虚拟容器所处的文件系统路径获取容器中的文件对象通过路径获取文件org.dom4j.Element通过文件名获取元素对象org.dom4j.Element通过路径获取元素获取该容器所属容器获取当前容器完整路径<R extends VirtualContainer>
RobtainContainer(String name, Function<Path, R> mapper) 获取一个虚拟容器对象void向虚拟容器中加入文件voidputFile(String fileName, InputStream in) 向虚拟容器中加入文件向虚拟容器中加入文件putFileWithPath(Path file) 向虚拟容器中加入文件,并获取文件在容器中的绝对路径向虚拟容器加入对象setContainerPath(String actualFullPath) 修正容器的文件系统路径与名称protected VirtualContainersetParent(VirtualContainer parent) 设置所属容器使目录与文件缓存与当前文件系统保持一致(仅用于读取方向)
-
Field Details
-
SignContainerPrefix
-
SealFileName
-
SignatureFileName
-
SignedValueFileName
-
-
Constructor Details
-
SignDir
- Throws:
IllegalArgumentException
-
-
Method Details
-
getIndex
获取该签名容器索引- Returns:
- 第几个签名,从1开始
- Throws:
NumberFormatException- 非规范的签名索引可能导致该问题
-
getIndexStr
-
getSignature
获取 签名/签章 描述文件- Returns:
- 签名/签章 描述文件
- Throws:
FileNotFoundException- 容器中不存在该文件org.dom4j.DocumentException- XML文件解析异常,可能是格式不正确
-
setSignature
-
getSeal
获取 电子印章文件- Returns:
- 电子印章文件
- Throws:
FileNotFoundException- 文件不存在
-
setSeal
设置电子印章文件- Parameters:
seal- 电子印章文件- Returns:
- this
- Throws:
IOException- 文件复制过程中异常
-
getSignedValue
获取 签名值文件- Returns:
- 签名值文件
- Throws:
FileNotFoundException- 文件不存在
-
setSignedValue
设置签名值文件- Parameters:
signedValue- 签名值文件- Returns:
- this
- Throws:
IOException- 文件复制过程中异常
-
VirtualContainer.exist(String)