use of com.forgerock.openbanking.common.model.openbanking.obie.pain00200109.Document in project AndroidSampleLibrary by JackChen365.
the class AndroidManifest method parserAndroidManifest.
@Nonnull
private ManifestInformation parserAndroidManifest(File manifestFile) throws JDOMException, IOException {
ManifestInformation manifestInformation = new ManifestInformation();
if (!manifestFile.exists()) {
System.out.println("File:" + manifestFile.getPath() + " not exists!");
} else {
SAXBuilder saxBuilder = new SAXBuilder();
Document document = saxBuilder.build(manifestFile);
XPathFactory xPathFactory = XPathFactory.instance();
Namespace androidNameSpace = Namespace.getNamespace("android", "http://schemas.android.com/apk/res/android");
XPathExpression<Attribute> applicationExpression = xPathFactory.compile("//application/@android:name", Filters.attribute(), null, androidNameSpace);
Attribute applicationAttribute = applicationExpression.evaluateFirst(document);
if (null != applicationAttribute) {
manifestInformation.application = applicationAttribute.getValue();
}
XPathExpression<Attribute> applicationIdExpression = xPathFactory.compile("/manifest/@package", Filters.attribute(), null, androidNameSpace);
Attribute applicationIdAttribute = applicationIdExpression.evaluateFirst(document);
if (null != applicationIdAttribute) {
manifestInformation.applicationId = applicationIdAttribute.getValue();
}
XPathExpression<Attribute> expression = xPathFactory.compile("//activity/@android:name", Filters.attribute(), null, androidNameSpace);
List<Attribute> attributeList = expression.evaluate(document);
for (int i = 0; i < attributeList.size(); i++) {
Attribute attribute = attributeList.get(i);
manifestInformation.addActivity(attribute.getValue());
}
}
return manifestInformation;
}
use of com.forgerock.openbanking.common.model.openbanking.obie.pain00200109.Document in project bigwarp by saalfeldlab.
the class BigWarp method loadSettings.
protected void loadSettings(final String xmlFilename) throws IOException, JDOMException {
final SAXBuilder sax = new SAXBuilder();
final Document doc = sax.build(xmlFilename);
final Element root = doc.getRootElement();
viewerP.stateFromXml(root.getChild("viewerP"));
viewerQ.stateFromXml(root.getChild("viewerQ"));
setupAssignments.restoreFromXml(root);
bookmarks.restoreFromXml(root);
activeSourcesDialogP.update();
activeSourcesDialogQ.update();
// auto-save settings
Element autoSaveElem = root.getChild("autosave");
final String autoSavePath = autoSaveElem.getChild("location").getText();
final long autoSavePeriod = Integer.parseInt(autoSaveElem.getChild("period").getText());
setAutosaveFolder(new File(autoSavePath));
BigWarpAutoSaver.setAutosaveOptions(this, autoSavePeriod, autoSavePath);
viewerFrameP.repaint();
viewerFrameQ.repaint();
}
use of com.forgerock.openbanking.common.model.openbanking.obie.pain00200109.Document in project openbanking-aspsp by OpenBankingToolkit.
the class OBIEPainXmlReport1Builder method toOrgnlGrpInfAndSts.
private static OriginalGroupHeader13 toOrgnlGrpInfAndSts(com.forgerock.openbanking.common.model.openbanking.obie.pain001.Document paymentInitiationDocument) {
OriginalGroupHeader13 orgnlGrpInfAndSts = new OriginalGroupHeader13();
orgnlGrpInfAndSts.setOrgnlMsgId(paymentInitiationDocument.getCstmrCdtTrfInitn().getGrpHdr().getMsgId());
orgnlGrpInfAndSts.setOrgnlMsgNmId(REPORT_MESSAGE_TYPE);
log.debug("Mapped payment file group header {} into report file OrgnlGrpInfAndSts: {}", paymentInitiationDocument.getCstmrCdtTrfInitn().getGrpHdr(), orgnlGrpInfAndSts);
return orgnlGrpInfAndSts;
}
use of com.forgerock.openbanking.common.model.openbanking.obie.pain00200109.Document in project openbanking-aspsp by OpenBankingToolkit.
the class OBIEPainXmlReport1Builder method toReportGrpHeader.
private static GroupHeader74 toReportGrpHeader(com.forgerock.openbanking.common.model.openbanking.obie.pain001.Document paymentInitiationDocument) {
GroupHeader48 consentGrpHdr = paymentInitiationDocument.getCstmrCdtTrfInitn().getGrpHdr();
GroupHeader74 reportGrpHdr = new GroupHeader74();
reportGrpHdr.setMsgId(UUID.randomUUID().toString());
reportGrpHdr.setCreDtTm(consentGrpHdr.getCreDtTm());
log.debug("Mapped payment file group header {} into report file group header: {}", consentGrpHdr, reportGrpHdr);
return reportGrpHdr;
}
use of com.forgerock.openbanking.common.model.openbanking.obie.pain00200109.Document in project openbanking-aspsp by OpenBankingToolkit.
the class OBIEPainXmlReport1Builder method toPaymentReport.
String toPaymentReport(FRFileConsent consent) {
log.debug("Create {} report file for consent id: {}", consent.getFileType(), consent.getId());
final Document reportDocument = mapConsentToReportDocument(consent);
log.debug("Created JAXB object for report file: {}", reportDocument);
return marshalXML(consent.getId(), reportDocument);
}
Aggregations