/** * Returns an {@code OperationPreprocessor} that will mask the href of hypermedia * links in the request or response. * @return the preprocessor */ public static OperationPreprocessor maskLinks() { return new ContentModifyingOperationPreprocessor( new LinkMaskingContentModifier()); }
@Test public void maskCanBeCustomized() throws Exception { assertThat(new LinkMaskingContentModifier("custom") .modifyContent(formattedAtomPayloadWithLinks(this.links), null)) .isEqualTo(formattedAtomPayloadWithLinks(new Link("a", "custom"), new Link("b", "custom"))); }
/** * Returns an {@code OperationPreprocessor} that will mask the href of hypermedia * links in the request or response. * @param mask the link mask * @return the preprocessor */ public static OperationPreprocessor maskLinks(String mask) { return new ContentModifyingOperationPreprocessor( new LinkMaskingContentModifier(mask)); }