private void createDocument() { this.document = DomDocumentHelper.create(); Node objectConfigNode = document.createElement(TransformInfoObjectConfigData.getInstance().NAME); this.document.appendChild(objectConfigNode); }
public String view() throws Exception { try { String success = DomDocumentHelper.toString(this.getDoc()); String result = new StoreTransformer(this.getTransformInfoInterface()).translate(success); return StringEscapeUtils.unescapeHtml(result); } catch (Exception e) { String error = "Failed to view Generic Body"; if (abcs.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains( abcs.logic.communication.log.config.type.LogConfigType.TAGHELPERERROR)) { LogUtil.put(LogFactory.getInstance(error, this, "view()", e)); } throw e; } }
public String toString() { try { if (this.document != null) { return DomDocumentHelper.toString(this.document); } else { return null; } } catch (Exception e) { if (abcs.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains( abcs.logic.communication.log.config.type.LogConfigType.VIEWERROR)) { LogUtil.put(LogFactory.getInstance("DOM Document error", this, "toString()")); } return null; } }
public TransformInfoObjectConfigInterface getInstance( TransformInfoInterface transformInfoInterface, AbPath objectConfigFileAbPath) throws Exception { try { String data = new CryptFileReader( TransformInfoObjectConfigData.getInstance().UNCRYPTED_EXTENSION, TransformInfoObjectConfigData.getInstance().ENCRYPTED_EXTENSION) .get(objectConfigFileAbPath); return this.getInstance(transformInfoInterface, DomDocumentHelper.create(data)); } catch (Exception e) { if (abcs.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains( abcs.logic.communication.log.config.type.LogConfigType.VIEWERROR)) { LogUtil.put( LogFactory.getInstance( "Could Not Load Object Config", getInstance(), "getInstance()", e)); } throw e; } }