Class PacketReaderServiceImpl
- java.lang.Object
-
- io.mosip.kernel.packetmanager.impl.PacketReaderServiceImpl
-
- All Implemented Interfaces:
PacketReaderService
public class PacketReaderServiceImpl extends Object implements PacketReaderService
The Class PacketReaderServiceImpl.- Author:
- Sowmya
-
-
Constructor Summary
Constructors Constructor Description PacketReaderServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckFileExistence(String id, String fileName, String source)Check file existence.ObjectgetCompleteIdObject(String rid, String sourcepackets)Get the complete idObjectInputStreamgetEncryptedSourcePacket(String rid, InputStream inputStream, String source)Get the encrypted source packet from the parent zipInputStreamgetFile(String id, String fileName, String source)Gets the file.DoublegetIdSchemaVersionFromPacket(String rid)Get the schema version from inside default packet
-
-
-
Method Detail
-
checkFileExistence
public boolean checkFileExistence(String id, String fileName, String source) throws PacketDecryptionFailureException, IOException, ApiNotAccessibleException
Description copied from interface:PacketReaderServiceCheck file existence.- Specified by:
checkFileExistencein interfacePacketReaderService- Parameters:
id- the idfileName- the file namesource- the source- Returns:
- true, if successful
- Throws:
PacketDecryptionFailureException- the packet decryption failure exceptionIOException- Signals that an I/O exception has occurred.ApiNotAccessibleException
-
getFile
public InputStream getFile(String id, String fileName, String source) throws PacketDecryptionFailureException, IOException, ApiNotAccessibleException
Description copied from interface:PacketReaderServiceGets the file.- Specified by:
getFilein interfacePacketReaderService- Parameters:
id- the idfileName- the file namesource- the source- Returns:
- the file
- Throws:
PacketDecryptionFailureException- the packet decryption failure exceptionIOException- Signals that an I/O exception has occurred.ApiNotAccessibleException
-
getEncryptedSourcePacket
public InputStream getEncryptedSourcePacket(String rid, InputStream inputStream, String source) throws IOException
Description copied from interface:PacketReaderServiceGet the encrypted source packet from the parent zip- Specified by:
getEncryptedSourcePacketin interfacePacketReaderService- Parameters:
rid- : The ridinputStream- : parent zip input streamsource- : the source (EX - id, evidence, optional)- Returns:
- : source zip
- Throws:
IOException
-
getCompleteIdObject
public Object getCompleteIdObject(String rid, String sourcepackets) throws PacketDecryptionFailureException, ApiNotAccessibleException, IOException
Description copied from interface:PacketReaderServiceGet the complete idObject- Specified by:
getCompleteIdObjectin interfacePacketReaderService- Parameters:
rid- : The rid- Throws:
PacketDecryptionFailureExceptionApiNotAccessibleExceptionIOException
-
getIdSchemaVersionFromPacket
public Double getIdSchemaVersionFromPacket(String rid) throws PacketDecryptionFailureException, ApiNotAccessibleException, IOException
Description copied from interface:PacketReaderServiceGet the schema version from inside default packet- Specified by:
getIdSchemaVersionFromPacketin interfacePacketReaderService- Parameters:
rid- : registration id to get default packet- Returns:
- : schema version
- Throws:
PacketDecryptionFailureExceptionApiNotAccessibleExceptionIOException
-
-