@Override public boolean hasAdvertised() { return as(JARArchive.class).get(REGISTRATION_CONF) != null; }
/** * Constructs a new instance using the underlying specified archive, which is required * * @param archive */ public TopologyArchiveImpl(ArchiveBase<?> archive) throws IOException { super(archive); Node regConf = as(JARArchive.class).get(REGISTRATION_CONF); if (regConf != null && regConf.getAsset() != null) { try (BufferedReader reader = new BufferedReader(new InputStreamReader(regConf.getAsset().openStream()))) { reader.lines().forEach(this::parseConfigLine); } } }
Node node = archive.as(JARArchive.class).get("WEB-INF/web.xml"); if (node == null) { webXmlAsset = new WebXmlAsset();
/** * Constructs a new instance using the underlying specified archive, which is required * * @param archive */ public SecuredImpl(ArchiveBase<?> archive) { super(archive); Node node = getArchive().as(JARArchive.class).get("WEB-INF/web.xml"); if (node == null) { this.asset = new WebXmlAsset(); getArchive().as(JARArchive.class).add(this.asset); } else { Asset asset = node.getAsset(); if (!(asset instanceof WebXmlAsset)) { this.asset = new WebXmlAsset(asset.openStream()); getArchive().as(JARArchive.class).add(this.asset); } else { this.asset = (WebXmlAsset) asset; } } // Setup web.xml this.asset.setContextParam("resteasy.scan", "true"); this.asset.setLoginConfig("KEYCLOAK", "ignored"); }
/** * Constructs a new instance using the underlying specified archive, which is required * * @param archive */ public SecuredImpl(ArchiveBase<?> archive) { super(archive); Node node = getArchive().as(JARArchive.class).get("WEB-INF/web.xml"); if (node == null) { this.asset = new WebXmlAsset(); getArchive().as(JARArchive.class).add(this.asset); } else { Asset asset = node.getAsset(); if (!(asset instanceof WebXmlAsset)) { this.asset = new WebXmlAsset(asset.openStream()); getArchive().as(JARArchive.class).add(this.asset); } else { this.asset = (WebXmlAsset) asset; } } // Setup web.xml this.asset.setContextParam("resteasy.scan", "true"); this.asset.setLoginConfig("KEYCLOAK", "ignored"); }