se.idsec.signservice.integration.document.pdf.utils.PDFIntegrationUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of signservice-integration-pdf Show documentation
Show all versions of signservice-integration-pdf Show documentation
SignService Integration PDF Processing
package se.idsec.signservice.integration.document.pdf.utils;
import se.idsec.signservice.integration.document.TbsDocument;
import se.idsec.signservice.security.sign.AdesProfileType;
/**
* Utilities for PDF integration implementations.
*
* @author Martin Lindström ([email protected])
* @author Stefan Santesson ([email protected])
*/
public class PDFIntegrationUtils {
/**
* Get the {@link AdesProfileType} for a PAdES requirement in a {@link TbsDocument}.
*
* @param requestedAdes
* AdES requirement
* @return enum the AdES requirement
*/
public static AdesProfileType getPadesRequirement(final TbsDocument.EtsiAdesRequirement requestedAdes) {
if (requestedAdes != null) {
final TbsDocument.AdesType adesType = requestedAdes.getAdesFormat();
if (TbsDocument.AdesType.BES.equals(adesType)) {
return AdesProfileType.BES;
}
else if (TbsDocument.AdesType.EPES.equals(adesType)) {
return AdesProfileType.EPES;
}
}
return AdesProfileType.None;
}
private PDFIntegrationUtils() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy