當前位置: 首頁>>代碼示例>>Java>>正文


Java ConcordionExtender類代碼示例

本文整理匯總了Java中org.concordion.api.extension.ConcordionExtender的典型用法代碼示例。如果您正苦於以下問題:Java ConcordionExtender類的具體用法?Java ConcordionExtender怎麽用?Java ConcordionExtender使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ConcordionExtender類屬於org.concordion.api.extension包,在下文中一共展示了ConcordionExtender類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addTo

import org.concordion.api.extension.ConcordionExtender; //導入依賴的package包/類
@Override
public void addTo(ConcordionExtender concordionExtender) {
  if (styleToReplace != null) {
    concordionExtender.withLinkedCSS(styleToReplace, new Resource("/concordion.css"));
  }
  concordionExtender.withDocumentParsingListener(document -> {
    Element html = document.getRootElement();
    Element head = html.getFirstChildElement("head");
    if (head != null) {
      Elements styles = head.getChildElements("style");
      for (int i = 0; i < styles.size(); i++) {
        Element style = styles.get(i);
        if (styleToRemove.equals(style.getValue())) {
          head.removeChild(style);
        }
      }
    }
  });
}
 
開發者ID:HuygensING,項目名稱:timbuctoo,代碼行數:20,代碼來源:ReplaceEmbeddedStylesheetExtension.java

示例2: addTo

import org.concordion.api.extension.ConcordionExtender; //導入依賴的package包/類
@Override
public void addTo(ConcordionExtender concordionExtender) {
  concordionExtender.withCommand(NAMESPACE, httpCommand.getName(), httpCommand);
  concordionExtender.withCommand(NAMESPACE, requestCommand.getName(), requestCommand);
  concordionExtender.withCommand(NAMESPACE, responseCommand.getName(), responseCommand);
  if (embedCss) {
    concordionExtender.withEmbeddedCSS(".defaultValue {\n" +
      "  color: gray;\n" +
      "}\n" +
      ".requestCaption, .responseCaption {\n" +
      "  margin-top: 1em;\n" +
      "  font-weight: bold;\n" +
      "  font-size: 0.8em;\n" +
      "}\n" +
      ".requestContent, .responseContent {\n" +
      "  background: #f6f9fc;\n" +
      "  padding: 10px;\n" +
      "  border: 1px solid #d0d4d9;\n" +
      "  font-family: monospace;\n" +
      "  border-radius: 3px;\n" +
      "}");
  }
}
 
開發者ID:HuygensING,項目名稱:timbuctoo,代碼行數:24,代碼來源:HttpCommandExtension.java

示例3: addTo

import org.concordion.api.extension.ConcordionExtender; //導入依賴的package包/類
@Override
public void addTo(final ConcordionExtender concordionExtender) {
    concordionExtender.withSpecificationLocator(new ClassNameAndTypeBasedSpecificationLocator() {
        @Override
        public Resource locateSpecification(final Object fixtureObject, final String typeSuffix) {
            String slashedClassName = fixtureObject.getClass().getName().replaceAll("\\.", "/");
            slashedClassName = slashedClassName.substring(0, slashedClassName.indexOf("$$"));
            String fixturePath = slashedClassName.replace(CdiEnabledNewDepositorFixture.class.getSimpleName(),
                    NewDepositorFixture.class.getSimpleName());
            fixturePath = fixturePath.replaceAll("(Fixture|Test)$", "");
            return new Resource("/" + fixturePath + "." + typeSuffix);
        }
    });
}
 
開發者ID:dadrus,項目名稱:jpa-unit,代碼行數:15,代碼來源:CdiEnabledNewDepositorFixture.java

示例4: addTo

import org.concordion.api.extension.ConcordionExtender; //導入依賴的package包/類
public void addTo(ConcordionExtender concordionExtender) {

		concordionExtender.withDocumentParsingListener(new DocumentParsingListener() {

			public void beforeParsing(Document document) {

				initEvaluator();

				evaluator.evaluateChildrenOf(document);
			}
		});
	}
 
開發者ID:codesandnotes,項目名稱:dyneval,代碼行數:13,代碼來源:DynEval.java


注:本文中的org.concordion.api.extension.ConcordionExtender類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。